mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-28 10:51:14 +00:00
32 lines
728 B
Plaintext
32 lines
728 B
Plaintext
/* Test C02 define directive */
|
|
|
|
#pragma origin 1000
|
|
|
|
#define TRUE $FF
|
|
#define FALSE 0
|
|
|
|
#define BITS %01010101
|
|
#define ZED 'Z'
|
|
|
|
enum {SOLO};
|
|
enum {ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN};
|
|
enum {?, FIRST, SECOND, THIRD};
|
|
bitmask {BLUE, GREEN, RED, BRIGHT, INVERT, BLINK, FLIP, BKGRND};
|
|
bitmask {RD, RTS, DTR, RI, CD, ?, CTS, DSR};
|
|
bitmask {HNDSHK, ?, ?, ?, DUPLEX};
|
|
|
|
const char b = {#TRUE, #FALSE};
|
|
char c, i;
|
|
const char f = #FALSE;
|
|
const char t = #TRUE;
|
|
char zed;
|
|
|
|
//b = #TRUE; ***Error: Illegal use of const variable 'B'
|
|
|
|
const char nums = {#ZERO, #ONE, #TWO, #THREE, #FOUR, #FIVE, #SIX, #SEVEN, #EIGHT, #NINE, #TEN};
|
|
|
|
for (i=#ZERO; i<#TEN; i++) {
|
|
c = (i = nums[i]) ? #TRUE : #FALSE;
|
|
putdec(c);
|
|
}
|