Interrupts on Commodore 128

Discussion about other targets
Post Reply
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Interrupts on Commodore 128

Post by stefano »

I post the experiment results, just not to forget them.
Changing the interrupt pointer in $FDFD partially works, but not in a stable way (code starts doing strange things with interrupts enabled, in non-CP/M mode).
I didn't this trick under CP/M, but it could give better results:

Code: Select all

; hopefully the interrupt vector is already initialized
;        ld bc,$FC00
;vecloop:
;        ld a,$FD
;        out (c),a
;        inc bc
;        ld a,b
;        cp $fd
;        jr nz,vecloop
        
        LD BC,$FDFD        ; INTVECTOR
        LD A, c128_irq&$FF
        OUT (C),A
        LD A, c128_irq/256
        INC C
        OUT (C),A
        EI
Post Reply