/* 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);
}
