diff options
author | 2019-12-04 17:17:49 -0500 | |
---|---|---|
committer | 2019-12-04 17:17:49 -0500 | |
commit | 12684d33ee608628987d1504f71ff03fd6204c94 (patch) | |
tree | 38a7367d930b9ee5b5f6ab317e1d7faa79a1c585 | |
parent | 5f95c10b36dfc76ecf1bec8632cd891c83fd9d48 (diff) |
mc68hc11: Fix disassembly and execution of BRCLR/BRSET (IND, Y)
-rw-r--r-- | src/devices/cpu/mc68hc11/hc11dasm.cpp | 2 | ||||
-rw-r--r-- | src/devices/cpu/mc68hc11/hc11ops.hxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/cpu/mc68hc11/hc11dasm.cpp b/src/devices/cpu/mc68hc11/hc11dasm.cpp index c77eaaee08a..48068929b52 100644 --- a/src/devices/cpu/mc68hc11/hc11dasm.cpp +++ b/src/devices/cpu/mc68hc11/hc11dasm.cpp @@ -1227,7 +1227,7 @@ offs_t hc11_disassembler::disassemble(std::ostream &stream, offs_t pc, const dat imm8 = opcodes.r8(cpc++); mask = opcodes.r8(cpc++); rel8 = opcodes.r8(cpc++); - util::stream_format(stream, "%s (Y+0x%02X), 0x%02X, [0x%04X]", op_table->mnemonic, imm8, mask, pc+2+rel8); + util::stream_format(stream, "%s (Y+0x%02X), 0x%02X, [0x%04X]", op_table->mnemonic, imm8, mask, pc+5+rel8); break; case PAGE2: diff --git a/src/devices/cpu/mc68hc11/hc11ops.hxx b/src/devices/cpu/mc68hc11/hc11ops.hxx index 7ad9da594ae..58db8f00c09 100644 --- a/src/devices/cpu/mc68hc11/hc11ops.hxx +++ b/src/devices/cpu/mc68hc11/hc11ops.hxx @@ -1191,7 +1191,7 @@ void HC11OP(brclr_indx)() CYCLES(7); } -/* BRCLR INDX 0x18, 0x1F */ +/* BRCLR INDY 0x18, 0x1F */ void HC11OP(brclr_indy)() { uint8_t offset = FETCH(); @@ -1202,7 +1202,7 @@ void HC11OP(brclr_indy)() if ((i & mask) == 0) { - SET_PC(m_ppc + rel + 4); + SET_PC(m_ppc + rel + 5); } CYCLES(8); @@ -1216,7 +1216,7 @@ void HC11OP(brset_dir)() int8_t rel = FETCH(); uint8_t i = READ8(d); - if(i & mask) + if ((~i & mask) == 0) { SET_PC(m_ppc + rel + 4); } @@ -1253,7 +1253,7 @@ void HC11OP(brset_indy)() if ((~i & mask) == 0) { - SET_PC(m_ppc + rel + 4); + SET_PC(m_ppc + rel + 5); } CYCLES(8); |