So the reset code looks like this:
Code: Select all
1383 .8849 COLDSTART
1384 .8849 d8 CLD ;Disable decimal mode
1385 .884a a2 ff LDX #$FF ;Initialize STACK POINTER
1386 .884c 9a TXS
1388 .884d a5 ab LDA <DOINTERRUPT
1389 .884f 8d 02 03 STA INTERRUPTVECTOR
1390 .8852 a5 89 LDA >DOINTERRUPT
1391 .8854 8d 03 03 STA INTERRUPTVECTOR+1
....
The ISR looks like this.
Code: Select all
1601 .89a8 INTERRUPT
1602 .89a8 6c 02 03 JMP (INTERRUPTVECTOR)
1604 .89ab DOINTERRUPT
1605 .89ab 85 ed STA AINTSAV ;Save ACCUMULATOR
1606 .89ad 86 ee STX XINTSAV ;Save X-REGISTER
1607 .89af 84 ef STY YINTSAV ;Save Y-REGISTER
1608 .89b1 ad e1 7f LDA SIOSTAT ;Read 6551 ACIA status register
1609 .89b4 29 88 AND #$88 ;Isolate bits. bit 7: Interrupt has occured and bit 3: receive data register full
1610 .89b6 49 88 EOR #$88 ;Invert state of both bits
.....
The initialisation of the vectors looks like this
Code: Select all
3232 >fffa 00 03 .word $0300 ;NMI
3233 >fffc 49 88 .word COLDSTART ;RESET
3234 >fffe a8 89 .word INTERRUPT ;IRQ
I know I'm missing something trivial but I can't find figure out why it is not working.
Any ideas anyone?
/Jgroth