Both the assembler and the disassembler should now support all the instructions I've layed out thus far.
This commit is contained in:
+8
-1
@@ -14,7 +14,8 @@ Instruction instructions[OPCODECOUNT] = {
|
||||
{ "in", IN, Constant | Reg, None},
|
||||
{ "out", OUT, None, None},
|
||||
{ "nop", NOP, None, None},
|
||||
{ "jz", JZ, Address, None}
|
||||
{ "jmp", JMP, Address, None},
|
||||
{ "call", CALL, Address, None}
|
||||
};
|
||||
|
||||
unsigned char GetInstructionMask(TokenType type, TokenClass parameterOneType) {
|
||||
@@ -33,6 +34,12 @@ unsigned char GetInstructionMask(TokenType type, TokenClass parameterOneType) {
|
||||
return 0x01;//0b00000001;
|
||||
case INT:
|
||||
return 0x02; //0b00000010;
|
||||
case YLD:
|
||||
return 0x03;
|
||||
case RET:
|
||||
return 0x04;
|
||||
case CALL:
|
||||
return 0x05;
|
||||
case JMP:
|
||||
return 0x06;//0b00000110;
|
||||
case IN:
|
||||
|
||||
Reference in New Issue
Block a user