#53 Reduce interrupts to 128
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -54,7 +54,7 @@ _init:
|
||||
|
||||
cmd_all:
|
||||
txa
|
||||
add #$20
|
||||
add #$10
|
||||
sta tmp1
|
||||
loop:
|
||||
txa
|
||||
|
||||
Reference in New Issue
Block a user