fix: JEQ bug

This commit is contained in:
xamidev
2024-10-24 17:28:48 +02:00
parent accbdc38e7
commit 52fa99817c
2 changed files with 2 additions and 2 deletions

View File

@@ -69,4 +69,5 @@ HLT
## Known bugs
- None for now? If you find one, please open an issue.
- (possibly) JEQ is inop
- If you find one, please open an issue.

1
cpu.c
View File

@@ -108,7 +108,6 @@ void cpu_exec(uint8_t opcode)
cpu.pc = addr;
break;
case JEQ:
reg1 = cpu.memory[cpu.pc++];
addr = cpu.memory[cpu.pc++];
if (cpu.equal_flag) {
cpu.pc = addr;