Work on interrupts
This commit is contained in:
parent
1d22547834
commit
022f276a28
|
@ -11,6 +11,10 @@
|
|||
|
||||
#define long_i rep #0b00010000
|
||||
|
||||
#define short_reg sep #0b00110000
|
||||
|
||||
#define long_reg rep #0b00110000
|
||||
|
||||
#ifdef __CALYPSI_CODE_MODEL_SMALL__
|
||||
|
||||
#define libcode code
|
||||
|
|
|
@ -31,8 +31,8 @@ interrupts_init:
|
|||
long_a
|
||||
sei
|
||||
|
||||
lda #.near(cop_handler_native)
|
||||
sta 0x00FFB4
|
||||
lda ##.near(cop_handler_native)
|
||||
sta long:0x00FFB4
|
||||
|
||||
rts
|
||||
|
||||
|
@ -44,7 +44,7 @@ cop_handler_native:
|
|||
|
||||
; Set the data bank register to 0.
|
||||
pha
|
||||
lda #0
|
||||
lda ##0
|
||||
short_a
|
||||
pha
|
||||
plb
|
||||
|
@ -66,21 +66,21 @@ cop_handler_native:
|
|||
; modifying anything but the X register.
|
||||
|
||||
; Now, we do an indirect, indexed jump through the jump table.
|
||||
jsr (cop_jump_table,x)
|
||||
jsr (.kbank(cop_jump_table),x)
|
||||
|
||||
; And we're done.
|
||||
plb
|
||||
rti
|
||||
|
||||
cop_jump_table:
|
||||
.word .near(cop_reset)
|
||||
.word .near(cop_get_version)
|
||||
.word .word0(cop_exit)
|
||||
.word .word0(cop_get_version)
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
.extern __program_start
|
||||
|
||||
cop_reset:
|
||||
cop_exit:
|
||||
jmp long:__program_start
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue