From 82a0184c26f0cf24e88d7cc7ec4933295bb5c7e9 Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 26 Dec 2002 16:00:35 +0000 Subject: [PATCH] Use callay instead of jmpvec git-svn-id: svn://svn.cc65.org/cc65/trunk@1850 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/common/atexit.s | 9 ++++----- libsrc/runtime/condes.s | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/libsrc/common/atexit.s b/libsrc/common/atexit.s index c8c14e268..940023300 100644 --- a/libsrc/common/atexit.s +++ b/libsrc/common/atexit.s @@ -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 diff --git a/libsrc/runtime/condes.s b/libsrc/runtime/condes.s index dbe6d01f8..feffeaf35 100644 --- a/libsrc/runtime/condes.s +++ b/libsrc/runtime/condes.s @@ -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 -- 2.39.5