gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/include/asm/mos6502/stdarg.h
1 #ifndef ASM_MOS6502_STDARG_INCLUDE
2 #define ASM_MOS6502_STDARG_INCLUDE
3
4 /* sdcc pushes right to left with the real sizes, not cast up
5 to an int.
6 so printf(int, char, long)
7 results in push long, push char, push int
8 On the 6502 the stack grows down, so the things seem to be in
9 the correct order.
10 */
11
12 typedef unsigned char * va_list;
13 #define va_start(list, last) list = (unsigned char *)&last + sizeof(last)
14 #define va_arg(list, type) *((type *)((list += sizeof(type)) - sizeof(type)))
15
16 #define va_end(list)
17
18 #endif
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.