From 8d7f27d9a0b61d3694a62f3e54be885d8073f02b Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 13 Feb 2021 13:59:48 -0500 Subject: - Reverted back one commit before the previous commit. This is because the previous commit actually created a bug, rather than fixing one. - Added JMP, and JSR to the ortho extension, and implemented them both in the assembler, and emulator. --- disasm.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'disasm.c') diff --git a/disasm.c b/disasm.c index 1982c17..645d17e 100644 --- a/disasm.c +++ b/disasm.c @@ -217,36 +217,6 @@ static int is_os(uint8_t opcode, operand *op) { return 0; } -static int is_1cc(uint8_t opcode) { - switch (opcode) { - case ORTHO_1CC(SET, NG): - case ORTHO_1CC(SET, PO): - case ORTHO_1CC(SET, CS): - case ORTHO_1CC(SET, CC): - case ORTHO_1CC(SET, EQ): - case ORTHO_1CC(SET, NE): - case ORTHO_1CC(SET, VS): - case ORTHO_1CC(SET, VC): return 1; - } - return 0; -} - -static int is_1op(uint8_t opcode) { - switch (opcode) { - case ORTHO_1OP(PSH): - case ORTHO_1OP(PEA): - case ORTHO_1OP(PUL): - case ORTHO_1OP(SWP): - case ORTHO_1OP(NOT): - case ORTHO_1OP(NEG): - case ORTHO_1OP(DEC): - case ORTHO_1OP(INC): - case ORTHO_1OP(CLZ): - case ORTHO_1OP(CLO): return 1; - } - return 0; -} - static int is_2op(uint8_t opcode) { switch (opcode) { case ORTHO_2OP(MNG): @@ -437,7 +407,7 @@ void disasm(struct sux *cpu, WINDOW *w, uint8_t lines, uint8_t opcode, uint8_t p if (ext_prefix != 0x1D) { address = get_addr(cpu, opcode, prefix, ext_prefix, 0, 0, thread); } else { - get_ortho_addr(cpu, prefix, cpu->pc, ortho_op, ortho_addr, op_type, op_id, 0, 0, thread); + get_ortho_addr(cpu, opcode, prefix, cpu->pc, ortho_op, ortho_addr, op_type, op_id, 0, 0, thread); } uint8_t rs = (prefix >> 4) & 3; char *postfix; -- cgit v1.2.3-13-gbd6f