fix R0 bug

This commit is contained in:
xamidev
2024-10-24 16:28:45 +02:00
parent 6eb02b3b58
commit 59688d05c4
4 changed files with 7 additions and 9 deletions

2
cpu.c
View File

@@ -197,7 +197,7 @@ void cpu_dump()
{
printf("\n*** CPU state dump ***\nPC: 0x%x\nEqual flag: %d\nHalted: %d\n\n", cpu.pc, cpu.equal_flag, cpu.halted);
for (size_t i=1; i<NUM_REGISTERS; i+=2)
for (size_t i=0; i<NUM_REGISTERS; i+=2)
{
printf("R%lu: 0x%04x R%lu: 0x%04x\n", i, cpu.reg[i], i+1, cpu.reg[i+1]);
}