Skip to content

Commit

Permalink
Fix execution of prefix instructions (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
kremi151 committed Dec 27, 2020
1 parent d73ab1a commit a665323
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/source/operands/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,11 @@ const Operand * Operands::decodeOpcode(u8 opcode, Memory &memory, InstrContext &
// prefix
case 0xCB: {
debug_print_4("prefix (CB)\n");
context.instr = memory.read8BitsAt(context.progCounter++);
#ifdef FB_DEBUG_WRITE_EXECUTION_LOG
return Operands::decodePrefix(memory.read8BitsAt(context.progCounter++), context);
return Operands::decodePrefix(context.instr, context);
#else
return Operands::decodePrefix(memory.read8BitsAt(context.progCounter++));
return Operands::decodePrefix(context.instr);
#endif
}
default: {
Expand Down

0 comments on commit a665323

Please sign in to comment.