Add irq_set_status

irq_set_status can be used to clear the irq status bit so that the
interrupt will stop occuring.
This commit is contained in:
Byron Lathi
2022-03-14 13:34:33 -05:00
parent a5474b5ae5
commit f5dbe46060
3 changed files with 7 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
.import _handle_irq
.export _irq_int, _nmi_int
.export _irq_get_status
.export _irq_get_status, _irq_set_status
.include "io.inc65"
@@ -51,4 +51,8 @@ break: JMP break ; If BRK is detected, something very bad
_irq_get_status:
lda IRQ_STATUS
ldx #$00
rts
_irq_set_status:
sta IRQ_STATUS
rts