cpu/decoder - Implement INC rr and DEC rr

This commit is contained in:
madmaurice 2023-08-29 23:04:59 +02:00
parent e893d2b9f5
commit 8f1b1eb924

View file

@ -119,6 +119,16 @@ void Cpu::executeInstruction()
break; break;
} }
} }
else if((op & 0xCF) == 0x03) // INC rr
{
state.reg16((op >> 4) & 0x3) += 1;
mcycles = 2;
}
else if((op & 0xCF) == 0x0B) // INC rr
{
state.reg16((op >> 4) & 0x3) -= 1;
mcycles = 2;
}
else if((op & 0xE7) == 0xC2) // JP cc, nn: else if((op & 0xE7) == 0xC2) // JP cc, nn:
{ {
u16 nn = readPC16(); u16 nn = readPC16();