public void Push(ushort value) { var spAddress = GetRegister(Registers.SP); MemoryMapper.SetUInt16(spAddress, value); SetRegister(Registers.SP, (ushort)(spAddress - 2)); StackFrameSize += 2; }
public void SetRegister(Registers reg, ushort value) { MemoryMapper.SetUInt16((ushort)RegisterMap[reg], value); }