mirror of
https://github.com/cc65/cc65.git
synced 2024-07-05 21:29:03 +00:00
Don't use callax because condes is called in interrupt handlers
git-svn-id: svn://svn.cc65.org/cc65/trunk@2755 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ad6a85b255
commit
9f48c6509c
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
.export initlib, donelib, condes
|
.export initlib, donelib, condes
|
||||||
|
|
||||||
.import callax
|
|
||||||
.import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
|
.import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
|
||||||
.import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
|
.import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
|
||||||
|
|
||||||
@ -52,7 +51,8 @@
|
|||||||
|
|
||||||
|
|
||||||
; --------------------------------------------------------------------------
|
; --------------------------------------------------------------------------
|
||||||
; Generic table call handler
|
; Generic table call handler. We cannot use callax here, since condes is also
|
||||||
|
; used for interrupt handlers, and callax clobbers ptr1.
|
||||||
|
|
||||||
.proc condes
|
.proc condes
|
||||||
|
|
||||||
@ -64,11 +64,12 @@ loop: ldy index
|
|||||||
beq done
|
beq done
|
||||||
dey
|
dey
|
||||||
jsr getbyt
|
jsr getbyt
|
||||||
tax
|
sta jmpvec+1
|
||||||
dey
|
dey
|
||||||
jsr getbyt
|
jsr getbyt
|
||||||
|
sta jmpvec+2
|
||||||
sty index
|
sty index
|
||||||
jsr callax
|
jsr jmpvec
|
||||||
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
||||||
bra loop
|
bra loop
|
||||||
.else
|
.else
|
||||||
@ -81,8 +82,8 @@ done: rts
|
|||||||
|
|
||||||
|
|
||||||
; --------------------------------------------------------------------------
|
; --------------------------------------------------------------------------
|
||||||
; Data. The getbyte routine is placed in the data segment cause it's patched
|
; Data. The getbyte and jmpvec routines are placed in the data segment
|
||||||
; at runtime.
|
; cause they're patched at runtime.
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
@ -93,4 +94,4 @@ index: .byte 0
|
|||||||
getbyt: lda $FFFF,y
|
getbyt: lda $FFFF,y
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
jmpvec: jmp $0000
|
||||||
|
Loading…
Reference in New Issue
Block a user