2 ; int __fastcall__ vscanf (const char* format, va_list ap);
4 ; Ullrich von Bassewitz, 2004-11-27
12 .include "zeropage.inc"
15 ; ----------------------------------------------------------------------------
16 ; int __fastcall__ vscanf (const char* format, va_list ap)
17 ; /* Standard C function */
19 ; return vfscanf (stdin, format, ap);
25 pha ; Save low byte of ap
27 ; Decrement the stack pointer by two for the additional parameter.
29 jsr decsp2 ; Won't touch X
31 ; Move the format down
34 lda (sp),y ; Load byte of format
42 ; Store stdin into the stack frame
51 ; Restore the low byte of ap and jump to vfscanf, which will cleanup the stack