1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 02:55:20 +00:00

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:
cuz 2002-12-26 16:00:35 +00:00
parent 92d9a7cb40
commit 82a0184c26
2 changed files with 8 additions and 10 deletions

View File

@ -7,7 +7,7 @@
.export _atexit
.destructor doatexit, 5
.import __errno
.import jmpvec
.import callax
.include "errno.inc"
@ -58,12 +58,11 @@
beq @L9 ; Jump if done
dey
lda exitfunc_table,y
sta jmpvec+2
tax
dey
lda exitfunc_table,y
sta jmpvec+1
sty exitfunc_index
jsr jmpvec ; Call the function
jsr callax ; Call the function
.ifpc02
bra doatexit
.else
@ -72,7 +71,7 @@
@L9: rts
.endproc
.endproc

View File

@ -15,7 +15,7 @@
.export initlib, donelib, condes
.import jmpvec
.import callax
.import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
.import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
@ -58,18 +58,17 @@
sta getbyt+1
stx getbyt+2
sty index
sty index
loop: ldy index
beq done
dey
jsr getbyt
sta jmpvec+2
tax
dey
jsr getbyt
sta jmpvec+1
sty index
jsr jmpvec
jsr callax
.ifpc02
bra loop
.else