]> git.sur5r.net Git - cc65/commitdiff
Use callay instead of jmpvec
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 26 Dec 2002 16:00:35 +0000 (16:00 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 26 Dec 2002 16:00:35 +0000 (16:00 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1850 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/atexit.s
libsrc/runtime/condes.s

index c8c14e26885b3abade3ae35498f567f50f04728f..940023300ddf56e7a8968a7da6daf39c92514881 100644 (file)
@@ -7,7 +7,7 @@
        .export         _atexit
                .destructor     doatexit, 5
        .import         __errno
-       .import         jmpvec
+       .import         callax
 
        .include        "errno.inc"
 
                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                      
 
 
 
index dbe6d01f86cf09a2eb0483c3658754cb30ef53c2..feffeaf35dea6c0af17a4b6f6fa5d33e8f8cbf34 100644 (file)
@@ -15,7 +15,7 @@
 
                .export initlib, donelib, condes
 
-        .import jmpvec
+        .import callax
                .import __CONSTRUCTOR_TABLE__, __CONSTRUCTOR_COUNT__
        .import __DESTRUCTOR_TABLE__, __DESTRUCTOR_COUNT__
 
 
        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