Add DEFINE preprocessor directive
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#DECLARE MEMORY_SIZE $4096;
|
||||
#DEFINE
|
||||
|
||||
addi $10 $-5 %A;
|
||||
subi %A $2 %B;
|
||||
@@ -22,16 +22,17 @@ seti %A %B;
|
||||
lti %A $10;
|
||||
jmp count_loop;
|
||||
|
||||
#DEFINE PRINT_CHAR $0
|
||||
# Hello world
|
||||
seti %A $72; # H
|
||||
int $0;
|
||||
int PRINT_CHAR;
|
||||
seti %A $101; # e
|
||||
int $0;
|
||||
int PRINT_CHAR;
|
||||
seti %A $108; # l
|
||||
int $0;
|
||||
int $0;
|
||||
int PRINT_CHAR;
|
||||
int PRINT_CHAR;
|
||||
seti %A $111; # o
|
||||
int $0;
|
||||
int PRINT_CHAR;
|
||||
|
||||
seti %A $32; # space
|
||||
int $0;
|
||||
|
||||
Reference in New Issue
Block a user