Skip to content

Commit

Permalink
INC & DEC with HL
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Nov 30, 2023
1 parent ab0c4d8 commit 2bcc76e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ impl CPU {
self.reg.set_hl(a - 1); 2 },
0x33 => { let sp = self.reg.sp;
self.reg.sp = sp.wrapping_add(1); 2 },
0x34 => { let a = self.reg.get_hl();
let mut v = self.mem.read(a);
v = self.alu_inc(v);
self.mem.write(a, v); 3 },
0x35 => { let a = self.reg.get_hl();
let mut v = self.mem.read(a);
v = self.alu_dec(v);
self.mem.write(a, v); 3 },
0x36 => { let a = self.reg.get_hl();
let b = self.read_byte();
self.mem.write(a, b); 3 },
Expand Down

0 comments on commit 2bcc76e

Please sign in to comment.