Skip to content

Add number of operands the opcodes need to recieved to the opcodes table #7

@dassaf1

Description

@dassaf1

Current table:
image

Suggested table in order to do syntax checking:
opcodes opcodes_table[] = {
{ "mov", "0000", 2},
{ "cmp", "0001", 2},
{ "add", "0010", 2},
{ "sub", "0011", 2},
{ "not", "0100", 1},
{ "clr", "0101", 1},
{ "lea", "0110", 2},
{ "inc", "0111", 1},
{ "dec", "1000", 1},
{ "jmp", "0101", 1},
{ "bne", "1010", 1},
{ "red", "1011", 1},
{ "prn", "1100", 1},
{ "jsr", "1101", 1},
{ "rts", "1110", 0},
{ "stop", "1111", 0}
};

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions