#53 Reduce interrupts to 128

This commit is contained in:
Byron Lathi
2023-11-21 08:17:36 -08:00
parent e7f8be44b7
commit 4392a01de8
5 changed files with 37 additions and 37 deletions

View File

@@ -34,7 +34,7 @@ IRQ_CMD_EOI = $ff
cmd_all: ; Send the same value to all 32 bytes
txa
add #$20
add #$10
sta tmp1
loop:
txa
@@ -51,12 +51,10 @@ loop:
; void enable_irq(uint8_t type, uint8_t irqnum);
; in A:
.proc _enable_irq
; Decide which byte we need to modify by dividing by 32 (>> 5)
; Decide which byte we need to modify by dividing by 8 (>> 3)
pha
lsr
lsr
lsr
lsr
lsr ; A is now bytesel
sta tmp2 ; tmp2 is now bytesel
add #IRQ_CMD_ENABLE
@@ -97,13 +95,12 @@ L3: sta IRQ_DAT_ADDR
.endproc
; TODO this is mostly the same as enable, why copy?
.proc _disable_irq
; Decide which byte we need to modify by dividing by 32 (>> 5)
pha
lsr
lsr
lsr
lsr
lsr ; A is now bytesel
add #IRQ_CMD_ENABLE
sta IRQ_CMD_ADDR

View File

@@ -54,7 +54,7 @@ _init:
cmd_all:
txa
add #$20
add #$10
sta tmp1
loop:
txa