2018-01-28 19:47:06 +00:00
|
|
|
/* Test C02 define directive */
|
|
|
|
|
2018-03-03 19:35:12 +00:00
|
|
|
#pragma origin 1000
|
|
|
|
|
2018-08-03 15:22:12 +00:00
|
|
|
#define TRUE $FF
|
|
|
|
#define FALSE 0
|
2018-01-28 19:47:06 +00:00
|
|
|
|
2018-08-03 15:22:12 +00:00
|
|
|
#define BITS %01010101
|
|
|
|
#define ZED 'Z'
|
2018-03-07 16:38:22 +00:00
|
|
|
|
2018-08-03 15:22:12 +00:00
|
|
|
enum {SOLO};
|
|
|
|
enum {ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN};
|
2018-03-03 19:35:12 +00:00
|
|
|
|
2018-08-04 22:29:04 +00:00
|
|
|
const char b = {#TRUE, #FALSE};
|
2018-08-03 15:22:12 +00:00
|
|
|
char c, i;
|
2018-08-04 22:29:04 +00:00
|
|
|
const char f = #FALSE;
|
|
|
|
const char t = #TRUE;
|
2018-08-03 15:22:12 +00:00
|
|
|
char zed;
|
2018-01-28 19:47:06 +00:00
|
|
|
|
2018-08-04 22:29:04 +00:00
|
|
|
//b = #TRUE; ***Error: Illegal use of const variable 'B'
|
2018-08-03 15:22:12 +00:00
|
|
|
|
2018-08-04 22:29:04 +00:00
|
|
|
const char nums = {#ZERO, #ONE, #TWO, #THREE, #FOUR, #FIVE, #SIX, #SEVEN, #EIGHT, #NINE, #TEN};
|
2018-08-03 15:22:12 +00:00
|
|
|
|
|
|
|
for (i=#ZERO; i<#TEN; i++) {
|
|
|
|
c = (i = nums[i]) ? #TRUE : #FALSE;
|
|
|
|
putdec(c);
|
|
|
|
}
|