Created a tokenizer and the supporting code, currently processes text that is not a string literal.
This commit is contained in:
+3
-3
@@ -10,13 +10,13 @@ typedef enum {
|
||||
} Registers;
|
||||
|
||||
typedef enum {
|
||||
ADD = 0x01, SUB, MUL, DIV, MOV, AND, OR, XOR, NOT, SHL, SHR, NOP, CMP, JMP, JG, JL,
|
||||
OUTB, INB, HLT, ENI, INT, LIVT, PUSHA, POPA, CALL, RET, PUSH, POP
|
||||
ADD = 0x01, SUB, MUL, DIV, MOV, AND, OR, XOR, NOT, SHL, SHR, NOP, CMP, JMP, JZ, JG, JL,
|
||||
OUTB, INB, HLT, CLI, ENI, INT, LIVT, PUSHA, POPA, CALL, RET, PUSH, POP
|
||||
} Mnemonic;
|
||||
|
||||
int IsOpcode(const char*, Mnemonic*);
|
||||
int IsRegister(const char*, Registers*);
|
||||
void GetMnemonicText(Mnemonic mnemonic, char buffer[12]);
|
||||
void GetRegisterText(Registers reg, char buffer[3]);
|
||||
void GetRegisterText(Registers reg, char buffer[4]);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user