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);
|
||||
}
|
||||
|
||||
state.SP-=2;
|
||||
|
||||
bus->write16(state.SP, data);
|
||||
pushStack16(data);
|
||||
|
||||
mcycles = 4;
|
||||
}
|
||||
else if((op & 0xCF) == 0xC1) // POP rr
|
||||
{
|
||||
u16 data = bus->read16(state.SP);
|
||||
|
||||
state.SP+=2;
|
||||
u16 data = popStack16();
|
||||
|
||||
switch((op >> 4) & 0x3)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue