summaryrefslogtreecommitdiff
path: root/disasm.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-12-08 10:42:10 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2020-12-09 11:43:33 -0500
commita232e9f691187fdb05c35c14d4152d17f4babaf5 (patch)
tree9fdf364ce91506ed4490cd95ced6355459d7e8b5 /disasm.c
parent50875a80729eaf3be2b1473e385eca1102fce4e6 (diff)
- Implemented support for the Orthogonal extension into
both the assembler, and the emulator. I finally figured out how I could get support for the Ortho extension implemented into the old assembler. The only reason for doing this, is to buy me some while I start work on the new assembler, and to help me get an idea for how to do the same in the new assembler.
Diffstat (limited to 'disasm.c')
-rw-r--r--disasm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/disasm.c b/disasm.c
index 010bc2f..e0f4fbc 100644
--- a/disasm.c
+++ b/disasm.c
@@ -159,6 +159,7 @@ static void disasm_ortho(struct sux *cpu, uint8_t opcode, uint8_t prefix, uint8_
memset(address, 0, sizeof(address));
memset(idx, 0, sizeof(idx));
memset(scale, 0, sizeof(scale));
+
for (int i = 0; i < 2; i++) {
int is_ind = 0;
int is_rind = 0;
@@ -251,7 +252,7 @@ static void disasm_ortho(struct sux *cpu, uint8_t opcode, uint8_t prefix, uint8_
case 4: sprintf(opr[i], "%s", reg[i]); break;
}
}
- char *cc = "";
+ const char *cc = "";
char *op2 = "";
int op_count;
char *os = ""; /* Ortho Suffix. */
@@ -264,7 +265,8 @@ static void disasm_ortho(struct sux *cpu, uint8_t opcode, uint8_t prefix, uint8_
op_count = 1;
}
if (is_1cc(opcode)) {
- switch (opcode) {
+ cc = set_cc[opcode >> 5];
+ /*switch (opcode) {
case ORTHO_1CC(SET, NG): cc = "NG"; break;
case ORTHO_1CC(SET, PO): cc = "PO"; break;
case ORTHO_1CC(SET, CS): cc = "CS"; break;
@@ -273,8 +275,8 @@ static void disasm_ortho(struct sux *cpu, uint8_t opcode, uint8_t prefix, uint8_
case ORTHO_1CC(SET, NE): cc = "NE"; break;
case ORTHO_1CC(SET, VS): cc = "VS"; break;
case ORTHO_1CC(SET, VC): cc = "VC"; break;
- }
- op2 = cc;
+ }*/
+ op2 = (char *)cc;
} else if (is_2op(opcode)) {
op2 = opr[1];
}