Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / regression / ports / mos6502 / support.c
blob6b1a69bf6984601d258b1cfb7e2379ba9812b90d
2 // sim65 constants
3 #define SYS_open 0xfff4
4 #define SYS_close 0xfff5
5 #define SYS_read 0xfff6
6 #define SYS_write 0xfff7
7 #define SYS_args 0xfff8
8 #define SYS_exit 0xfff9
10 typedef void (*sim65_write_t)(int count, const char* buf, int fd) __reentrant;
12 // sim65 expects a software stack
13 unsigned short stack[8];
15 // stack pointer location defined in sim65 header
16 unsigned short* __at(0x0) stackptr;
18 void
19 _putchar(unsigned char c)
21 stackptr = stack;
22 stackptr[0] = (short)&c;
23 stackptr[1] = 1;
24 (*(sim65_write_t)SYS_write)(1, &c, 1);
27 void
28 _initEmu(void)
32 void
33 _exitEmu(void)
35 __asm
36 jsr SYS_exit
37 __endasm;