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);