Use callay instead of jmpvec
git-svn-id: svn://svn.cc65.org/cc65/trunk@1850 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
.export _atexit
|
.export _atexit
|
||||||
.destructor doatexit, 5
|
.destructor doatexit, 5
|
||||||
.import __errno
|
.import __errno
|
||||||
.import jmpvec
|
.import callax
|
||||||
|
|
||||||
.include "errno.inc"
|
.include "errno.inc"
|
||||||
|
|
||||||
@@ -58,12 +58,11 @@
|
|||||||
beq @L9 ; Jump if done
|
beq @L9 ; Jump if done
|
||||||
dey
|
dey
|
||||||
lda exitfunc_table,y
|
lda exitfunc_table,y
|
||||||
sta jmpvec+2
|
tax
|
||||||
dey
|
dey
|
||||||
lda exitfunc_table,y
|
lda exitfunc_table,y
|
||||||
sta jmpvec+1
|
|
||||||
sty exitfunc_index
|
sty exitfunc_index
|
||||||
jsr jmpvec ; Call the function
|
jsr callax ; Call the function
|
||||||
.ifpc02
|
.ifpc02
|
||||||
bra doatexit
|
bra doatexit
|
||||||
.else
|
.else
|
||||||
@@ -72,7 +71,7 @@
|
|||||||
|
|
||||||
@L9: rts
|
@L9: rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
.export initlib, donelib, condes
|
.export initlib, donelib, condes
|
||||||
|
|
||||||
.import jmpvec
|
.import callax
|
||||||
.import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
|
.import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
|
||||||
.import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
|
.import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
|
||||||
|
|
||||||
@@ -58,18 +58,17 @@
|
|||||||
|
|
||||||
sta getbyt+1
|
sta getbyt+1
|
||||||
stx getbyt+2
|
stx getbyt+2
|
||||||
sty index
|
sty index
|
||||||
|
|
||||||
loop: ldy index
|
loop: ldy index
|
||||||
beq done
|
beq done
|
||||||
dey
|
dey
|
||||||
jsr getbyt
|
jsr getbyt
|
||||||
sta jmpvec+2
|
tax
|
||||||
dey
|
dey
|
||||||
jsr getbyt
|
jsr getbyt
|
||||||
sta jmpvec+1
|
|
||||||
sty index
|
sty index
|
||||||
jsr jmpvec
|
jsr callax
|
||||||
.ifpc02
|
.ifpc02
|
||||||
bra loop
|
bra loop
|
||||||
.else
|
.else
|
||||||
|
|||||||
Reference in New Issue
Block a user