work on interrupts

This commit is contained in:
Kyle Cardoza 2024-03-30 07:16:04 -04:00
parent 9751efd22c
commit c9a74be5ea
1 changed files with 7 additions and 1 deletions

View File

@ -21,10 +21,12 @@ irq_enter .macro
.endm
irq_exit .macro
sta long:tmp_register_a
tsc
sta long:internal_stack_pointer
lda long:external_stack_pointer
tcs
lda long:tmp_register_a
pld
plb
rti
@ -81,6 +83,8 @@ cop_handler_native:
; Now, we do an indirect, indexed jump through the jump table.
jsr (cop_jump_table,x)
; And we're done.
irq_exit
cop_jump_table:
@ -89,8 +93,10 @@ cop_jump_table:
; -----------------------------------------------------------------------------
.extern __program_start
cop_reset:
rts
jmp long:__program_start
; -----------------------------------------------------------------------------