summaryrefslogtreecommitdiff
path: root/disasm.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-02-13 13:59:48 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2021-02-13 13:59:48 -0500
commit8d7f27d9a0b61d3694a62f3e54be885d8073f02b (patch)
treeb505454c79dba2e691ee19f716ccfd0d0aba1430 /disasm.c
parentac778a4d39ba6c80651ce20ce780dfe859c3dcff (diff)
- 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.
Diffstat (limited to 'disasm.c')
-rw-r--r--disasm.c32
1 files changed, 1 insertions, 31 deletions
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;