additional instructions are only ^0111 and not ^1111
This commit is contained in:
parent
2bf8b92217
commit
e6d89c425e
1 changed files with 10 additions and 11 deletions
7
cpu.cpp
7
cpu.cpp
|
@ -410,7 +410,7 @@ bool cpu::double_operand_instructions(const uint16_t instr)
|
||||||
if (operation == 0b000)
|
if (operation == 0b000)
|
||||||
return single_operand_instructions(instr);
|
return single_operand_instructions(instr);
|
||||||
|
|
||||||
if (operation == 0b111)
|
if (operation == 0b111 && word_mode == false)
|
||||||
return additional_double_operand_instructions(instr);
|
return additional_double_operand_instructions(instr);
|
||||||
|
|
||||||
const uint8_t src = (instr >> 6) & 63;
|
const uint8_t src = (instr >> 6) & 63;
|
||||||
|
@ -752,7 +752,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
case 0b00000011: { // SWAB
|
case 0b00000011: { // SWAB
|
||||||
if (word_mode) // handled elsewhere
|
if (word_mode) // handled elsewhere
|
||||||
return false;
|
return false;
|
||||||
else {
|
|
||||||
auto g_dst = getGAM(dst_mode, dst_reg, word_mode, false);
|
auto g_dst = getGAM(dst_mode, dst_reg, word_mode, false);
|
||||||
|
|
||||||
uint16_t v = g_dst.value.value();
|
uint16_t v = g_dst.value.value();
|
||||||
|
@ -765,7 +765,6 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
setPSW_flags_nzv(v, true);
|
setPSW_flags_nzv(v, true);
|
||||||
setPSW_c(false);
|
setPSW_c(false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1837,7 +1836,7 @@ std::map<std::string, std::vector<std::string> > cpu::disassemble(const uint16_t
|
||||||
if (text.empty() == false && next_word != -1)
|
if (text.empty() == false && next_word != -1)
|
||||||
instruction_words.push_back(next_word);
|
instruction_words.push_back(next_word);
|
||||||
}
|
}
|
||||||
else if (do_opcode == 0b111) {
|
else if (do_opcode == 0b111 && word_mode == false) {
|
||||||
std::string src_text = format("R%d", (instruction >> 6) & 7);
|
std::string src_text = format("R%d", (instruction >> 6) & 7);
|
||||||
auto dst_text { addressing_to_string(dst_register, (addr + 2) & 65535, word_mode) };
|
auto dst_text { addressing_to_string(dst_register, (addr + 2) & 65535, word_mode) };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue