GBDK 2020 Docs 4.4.0 API Documentation for GBDK 2020

stdarg.h
Go to the documentation of this file.
1 #ifndef ASM_SM83_STDARG_INCLUDE
2 #define ASM_SM83_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 z80 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
va_list
unsigned char * va_list
Definition: stdarg.h:12