Added a distinction between constant numbers and what are effectively memory addresses (i.e. strings and labels).
This commit is contained in:
+5
-4
@@ -26,7 +26,7 @@ typedef enum {
|
||||
DB, ORG,
|
||||
//Opcodes
|
||||
COPY, ADD, SUB, JZ, INT, YLD, RET,
|
||||
CMP, IN, OUT,
|
||||
CMP, NOP, IN, OUT,
|
||||
//Registers
|
||||
R1, R2, R3, R4, R5, R6, R7, R8
|
||||
} TokenType;
|
||||
@@ -34,9 +34,10 @@ typedef enum {
|
||||
typedef enum {
|
||||
None = 0,
|
||||
Reg = 1,
|
||||
Immediate16 = 2,
|
||||
Opcode = 4,
|
||||
Directive = 8
|
||||
Constant = 2,
|
||||
Address = 4,
|
||||
Opcode = 8,
|
||||
Directive = 16
|
||||
} TokenClass;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user