This feels like a trainwreck but eh. Changed the way the opcodes are managed. Hopefully this is the right direction when I add support for multiple ASM files.
This commit is contained in:
+2
-4
@@ -18,12 +18,10 @@ Instruction instructions[OPCODECOUNT] = {
|
||||
{ "call", CALL, Address, None}
|
||||
};
|
||||
|
||||
unsigned char GetInstructionMask(TokenType type, TokenClass parameterOneType) {
|
||||
unsigned char GetInstructionMask(TokenType type) {
|
||||
switch (type) {
|
||||
case COPY:
|
||||
if (parameterOneType & Reg) return 0x20; //0b00100000;
|
||||
|
||||
return 0xA0;//0b10100000;
|
||||
return 0x20; //0b00100000; ORing 0x80 marks the first parameter as an address
|
||||
case ADD:
|
||||
return 0x40;//0b01000000;
|
||||
case SUB:
|
||||
|
||||
Reference in New Issue
Block a user