Electron ULA
initial page
&FE00
&FE01
&FE02
&FE03
&FE04
&FE05
This register combines ROM selection and interupt acknowledge.
b7 b6 b5 b4 b3 b2 b1 b0 nmi -+ | | | | | | | high ----+ | | | | | | rtc -------+ | | | | | frame ----------+ | | | | pe -------------+ | | | p2 ----------------+ | | p1 -------------------+ | p0 ----------------------+
- Writing %0000rrrr writes to the ROMSEL register
- Writing %nnnnxxxx where any n<>0 acknowledges an interupt and makes no change to the ROMSEL register
The select a paged ROM ROMSEL normally has to be written twice. First store &0C then store the ROM number:
.SelectROM \ X=ROM number LDA #12:JSR SelectROM2:TXA .SelectROM2 STA &F4:STA &FE05:RTS
Machine-specific code can be avoided by using OSRDRM.