Skip to content

Commit

Permalink
Add missing ADD opcode (0xC6)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke committed Dec 23, 2023
1 parent 233c84a commit 8dd367b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ func (cpu *CPU) Execute(mmu *mem.MMU, inst *isa.Instruction) (nextPC uint16, cyc
case 0xC5:
// PUSH BC
cpu.push(mmu, cpu.Reg.BC.Read())
case 0xC6:
// ADD A, n8
cpu.add8(cpu.Reg.A, cpu.readNext8(mmu))
case 0xC7:
// RST 00H
return cpu.rst(mmu, opcode, 0x00)
Expand Down

0 comments on commit 8dd367b

Please sign in to comment.