add comments to instruction operand types
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
#include "instruction.h"
|
#include "instruction.h"
|
||||||
|
|
||||||
const OperandType INSTRUCTION_OPERAND_TYPES[][3] = {
|
const OperandType INSTRUCTION_OPERAND_TYPES[][3] = {
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // MOV
|
||||||
{OP_REG, OP_IMM16, OP_NONE},
|
{OP_REG, OP_IMM16, OP_NONE}, // MVI
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // ADD
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // SUB
|
||||||
{OP_REG, OP_REG, OP_REG},
|
{OP_REG, OP_REG, OP_REG}, // LOAD
|
||||||
{OP_REG, OP_REG, OP_REG},
|
{OP_REG, OP_REG, OP_REG}, // STORE
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // AND
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // OR
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // XOR
|
||||||
{OP_REG, OP_REG, OP_REG},
|
{OP_REG, OP_REG, OP_REG}, // SHF
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // JMP
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // JIZ
|
||||||
{OP_REG, OP_REG, OP_NONE},
|
{OP_REG, OP_REG, OP_NONE}, // CALL
|
||||||
{OP_NONE, OP_NONE, OP_NONE},
|
{OP_NONE, OP_NONE, OP_NONE}, // RET
|
||||||
{OP_REG, OP_REG, OP_REG},
|
{OP_REG, OP_REG, OP_REG}, // SYS
|
||||||
{OP_NONE, OP_NONE, OP_NONE}
|
{OP_NONE, OP_NONE, OP_NONE} // HLT
|
||||||
};
|
};
|
||||||
|
|
||||||
char* opcodeToCStr(InstructionOpcode opcode) {
|
char* opcodeToCStr(InstructionOpcode opcode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user