1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

UserspaceEmulator: Add proper segment registers

Some things will flow better if we're able to index into a table of our
segment registers.
This commit is contained in:
Andreas Kling 2020-07-10 16:29:18 +02:00
parent 4f41fada39
commit 30ef30ca09
2 changed files with 13 additions and 4 deletions

View file

@ -36,6 +36,11 @@ SoftCPU::SoftCPU(Emulator& emulator)
: m_emulator(emulator)
{
memset(m_gpr, 0, sizeof(m_gpr));
m_segment[(int)X86::SegmentRegister::CS] = 0x18;
m_segment[(int)X86::SegmentRegister::DS] = 0x20;
m_segment[(int)X86::SegmentRegister::ES] = 0x20;
m_segment[(int)X86::SegmentRegister::SS] = 0x20;
}
void SoftCPU::dump() const