; ### clr $0060 clr $0061 ; ### CLI ; Enable interrupts RTS;** ===================================================================;** Interrupt handler : isrVtpmovf;**;** Description :;** User interrupt service routine. ;** Parameters : None;** Returns : Nothing;** =================================================================== XDEF isrVtpmovfisrVtpmovf: psha ; Write your interrupt code here ... inc $0060 lda $0060 ; every 20 s cmp #$02 bne isrNext clr $0060 inc $0061isrNext: lda $0061 cmp #$00 beq LED1 cmp #$01 beq LED2 cmp #$02 beq LED3 cmp #$03 beq LED4 cmp #$04 beq LED5 cmp #$05 beq LED6 cmp #$06 beq LED7 clr $0061LED1: brclr 0, PTAD, LED1b bclr 0, PTAD bra isrEndLED1b: bset 0, PTAD bra isrEndLED2: brclr 1, PTAD, LED2b bclr 1, PTAD bra isrEndLED2b: bset 1, PTAD bra isrEndLED3: brclr 2, PTAD, LED3b bclr 2, PTAD bra isrEndLED3b: bset 2, PTAD bra isrEndLED4: brclr 3, PTAD, LED4b bclr 3, PTAD bra isrEndLED4b: bset 3, PTAD bra isrEndLED5: brclr 6, PTBD, LED5b bclr 6, PTBD bra isrEndLED5b: bset 6, PTBD bra isrEndLED6: brclr 7, PTBD, LED6b bclr 7, PTBD bra isrEndLED6b: bset 7, PTBD bra isrEndLED7: brclr 1, PTBD, LED7b bclr 1, PTBD bra isrEndLED7b: bset 1, PTBDisrEnd: ;bclr 7, TPMSC pula rti; end of isrVtpmovf
Hello and welcome to the fora, Asde.
Place a breakpoint at the start of your ISR. Then when it breaks, single step throught the isr. This will show you where you have gone wrong.
BTW it is not necessary to push and pull A in the ISR this is done automatically for you.