Fixed a misunderstanding of autoincrement/autodecrement mode; now EKBB prints its header message

This commit is contained in:
2023-09-26 23:54:53 +02:00
parent b8b356b8b3
commit 62e6987919

View File

@@ -731,7 +731,7 @@ class CPU(val mbus: MemBus, val tracer: ITracer = NullTracer()) {
val mode = operand shr 3
val reg = operand and 0x7
val is_pc = reg == 7
val increment = if (byte_mode && !is_pc) 1U else 2U
val increment = if (byte_mode && reg < 6) 1U else 2U
val decoded = 0x80_FFFFu and when (mode and 0x7) {
0 -> reg.toUInt() bis PADDR_REG_BIT
1 -> registers[reg].toUInt()