3 typedef unsigned char BYTE;
6 char *format_euro(char * s, int maxlen, int cent);
7 void c128_perror(BYTE, char*);
9 #define POKE(addr,val) (*(unsigned char*) (addr) = (val))
10 #define POKEW(addr,val) (*(unsigned*) (addr) = (val))
11 #define PEEK(addr) (*(unsigned char*) (addr))
12 #define PEEKW(addr) (*(unsigned*) (addr))
14 #define VIDEOMODE (((* (BYTE *)0xD7) == 0x80) ? 80 : 40)
16 /* because there is no macro expansion when stringifying, we need to use two
17 * levels of macros to stringify the value of a macro (for example
18 * MAX_ITEM_NAME_LENGTH) */
19 #define xstr(s) str(s)
22 #define max(a, b) ((a) > (b) ? (a) : (b))
23 #define min(a, b) ((a) > (b) ? (b) : (a))