work on interrupts
This commit is contained in:
parent
9751efd22c
commit
c9a74be5ea
|
@ -21,10 +21,12 @@ irq_enter .macro
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
irq_exit .macro
|
irq_exit .macro
|
||||||
|
sta long:tmp_register_a
|
||||||
tsc
|
tsc
|
||||||
sta long:internal_stack_pointer
|
sta long:internal_stack_pointer
|
||||||
lda long:external_stack_pointer
|
lda long:external_stack_pointer
|
||||||
tcs
|
tcs
|
||||||
|
lda long:tmp_register_a
|
||||||
pld
|
pld
|
||||||
plb
|
plb
|
||||||
rti
|
rti
|
||||||
|
@ -81,6 +83,8 @@ cop_handler_native:
|
||||||
|
|
||||||
; Now, we do an indirect, indexed jump through the jump table.
|
; Now, we do an indirect, indexed jump through the jump table.
|
||||||
jsr (cop_jump_table,x)
|
jsr (cop_jump_table,x)
|
||||||
|
|
||||||
|
; And we're done.
|
||||||
irq_exit
|
irq_exit
|
||||||
|
|
||||||
cop_jump_table:
|
cop_jump_table:
|
||||||
|
@ -89,8 +93,10 @@ cop_jump_table:
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.extern __program_start
|
||||||
|
|
||||||
cop_reset:
|
cop_reset:
|
||||||
rts
|
jmp long:__program_start
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue