]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/vsprintf.s
Fixed more bugs, shortened the code where possible.
[cc65] / libsrc / common / vsprintf.s
index 4c265ec220b935cd8d0984d91f9711e42b4d039e..f1a2fe5d8dd6b6b04e5664f02ab7338a90a76ae7 100644 (file)
@@ -4,9 +4,9 @@
 ; Ullrich von Bassewitz, 2009-09-26
 ;
 
-       .export         _vsprintf
-       .import         pushw0sp, staxysp
-       .import         _vsnprintf
+       .export         _vsprintf
+       .import         pushw0sp, staxysp
+       .import         vsnprintf
 
 
 ; ----------------------------------------------------------------------------
@@ -30,10 +30,8 @@ _vsprintf:
         ldy     #2
         jsr     staxysp
 
-; Retrieve ap and contine by jumping to _vsnprintf, which will cleanup the stack
+; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will 
+; cleanup the C stack
 
-        pla
-        tax
-        pla
-        jmp     _vsnprintf
+        jmp     vsnprintf