cpu/decoder - Actually use pushStack16 and popStack16 for POP and PUSH
This commit is contained in:
parent
310fb99ad2
commit
c08fd5d68d
1 changed files with 2 additions and 6 deletions
|
@ -67,17 +67,13 @@ void Cpu::executeInstruction()
|
||||||
default: data = state.reg16((op >> 4) & 0x3);
|
default: data = state.reg16((op >> 4) & 0x3);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.SP-=2;
|
pushStack16(data);
|
||||||
|
|
||||||
bus->write16(state.SP, data);
|
|
||||||
|
|
||||||
mcycles = 4;
|
mcycles = 4;
|
||||||
}
|
}
|
||||||
else if((op & 0xCF) == 0xC1) // POP rr
|
else if((op & 0xCF) == 0xC1) // POP rr
|
||||||
{
|
{
|
||||||
u16 data = bus->read16(state.SP);
|
u16 data = popStack16();
|
||||||
|
|
||||||
state.SP+=2;
|
|
||||||
|
|
||||||
switch((op >> 4) & 0x3)
|
switch((op >> 4) & 0x3)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue