cpu - Fix push operations
This commit is contained in:
parent
002b745917
commit
1fc081b3c5
1 changed files with 2 additions and 2 deletions
|
@ -65,8 +65,8 @@ u16 Cpu::readPC16()
|
|||
|
||||
void Cpu::pushStack8(u8 data)
|
||||
{
|
||||
bus->write8(state.SP, data);
|
||||
state.SP--;
|
||||
bus->write8(state.SP, data);
|
||||
}
|
||||
|
||||
u8 Cpu::popStack8()
|
||||
|
@ -78,8 +78,8 @@ u8 Cpu::popStack8()
|
|||
|
||||
void Cpu::pushStack16(u16 data)
|
||||
{
|
||||
bus->write16(state.SP,data);
|
||||
state.SP-=2;
|
||||
bus->write16(state.SP,data);
|
||||
}
|
||||
|
||||
u16 Cpu::popStack16()
|
||||
|
|
Loading…
Reference in a new issue