work on interrupts
This commit is contained in:
parent
7bc15c9806
commit
e4458e0f9e
|
@ -44,7 +44,6 @@ internal_stack_pointer:
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
; Initialize the interrupt handler vectors.
|
; Initialize the interrupt handler vectors.
|
||||||
.extern __program_start
|
|
||||||
interrupts_init:
|
interrupts_init:
|
||||||
long_a
|
long_a
|
||||||
sei
|
sei
|
||||||
|
@ -109,6 +108,7 @@ interrupts_init:
|
||||||
sta long:0x00FF80
|
sta long:0x00FF80
|
||||||
|
|
||||||
; Reset vector
|
; Reset vector
|
||||||
|
.extern __program_start
|
||||||
lda ##.near(__program_start)
|
lda ##.near(__program_start)
|
||||||
sta long:0x00FFFC
|
sta long:0x00FFFC
|
||||||
|
|
||||||
|
@ -118,14 +118,6 @@ interrupts_init:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
|
||||||
; Null interrupt handler
|
|
||||||
;
|
|
||||||
; This handler intentionally does nothing. It is used to populate interrupt
|
|
||||||
; vectors that do nothing, without wasting space on multiple such functions.
|
|
||||||
null_handler:
|
|
||||||
rti
|
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
; The COP handler is the primary interface to the kernel from user code. The
|
; The COP handler is the primary interface to the kernel from user code. The
|
||||||
; user program loads the function number into X, and any appropriate arguments
|
; user program loads the function number into X, and any appropriate arguments
|
||||||
|
@ -159,6 +151,13 @@ cop_handler_native:
|
||||||
jsr (.kbank cop_jump_table,x)
|
jsr (.kbank cop_jump_table,x)
|
||||||
|
|
||||||
plb
|
plb
|
||||||
|
|
||||||
|
; -----------------------------------------------------------------------------
|
||||||
|
; Null interrupt handler
|
||||||
|
;
|
||||||
|
; This handler intentionally does nothing. It is used to populate interrupt
|
||||||
|
; vectors that do nothing, without wasting space on multiple such functions.
|
||||||
|
null_handler:
|
||||||
rti
|
rti
|
||||||
|
|
||||||
cop_jump_table:
|
cop_jump_table:
|
||||||
|
|
Loading…
Reference in New Issue