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 /* C128 color codes, see PDF page 127 of
15 * http://www.pagetable.com/docs/Commodore%20128%20Programmer%27s%20Reference%20Guide.pdf */
26 /* This is the good red */
27 #define TC_LIGHT_RED 11
28 #define TC_DARK_GRAY 12
29 #define TC_MEDIUM_GRAY 13
30 /* This is the good green */
31 #define TC_LIGHT_GREEN 14
32 #define TC_LIGHT_BLUE 15
33 #define TC_LIGHT_GRAY 16
35 #define VIDEOMODE (((* (BYTE *)0xD7) == 0x80) ? 80 : 40)
37 /* because there is no macro expansion when stringifying, we need to use two
38 * levels of macros to stringify the value of a macro (for example
39 * MAX_ITEM_NAME_LENGTH) */
40 #define xstr(s) str(s)
43 #define max(a, b) ((a) > (b) ? (a) : (b))
44 #define min(a, b) ((a) > (b) ? (b) : (a))