|
|
@ -680,6 +680,7 @@ class ADD_HL_RR(Insn): |
|
|
|
hl = cpu.get_reg16(R16.HL) + cpu.get_reg16(self.rr) |
|
|
|
cpu.carry = 1 if hl > 0xFFFF else 0 |
|
|
|
cpu.set_reg16(R16.HL, hl) |
|
|
|
cpu.cycles += 8 |
|
|
|
|
|
|
|
def pretty(self) -> str: |
|
|
|
return f"ADD HL, {self.rr.value}" |
|
|
@ -691,6 +692,7 @@ class INC_RR(Insn): |
|
|
|
|
|
|
|
def exec(self, cpu: CPU) -> None: |
|
|
|
cpu.set_reg16(self.rr, cpu.get_reg16(self.rr) + 1) |
|
|
|
cpu.cycles += 8 |
|
|
|
|
|
|
|
def pretty(self) -> str: |
|
|
|
return f"INC {self.rr.value}" |
|
|
@ -702,6 +704,7 @@ class DEC_RR(Insn): |
|
|
|
|
|
|
|
def exec(self, cpu: CPU) -> None: |
|
|
|
cpu.set_reg16(self.rr, cpu.get_reg16(self.rr) - 1) |
|
|
|
cpu.cycles += 8 |
|
|
|
|
|
|
|
def pretty(self) -> str: |
|
|
|
return f"DEC {self.rr.value}" |
|
|
|