From 21837544bbe98def31d32c40a073516f8cd8cf6f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jul 2020 23:03:22 +0200 Subject: [PATCH] UserspaceEmulator: Implement MOV_EAX_moff32 --- DevTools/UserspaceEmulator/SoftCPU.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp index c3a4ee0472..46c6f69466 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -846,7 +846,11 @@ void SoftCPU::MOV_AL_moff8(const X86::Instruction&) { TODO(); } void SoftCPU::MOV_AX_moff16(const X86::Instruction&) { TODO(); } void SoftCPU::MOV_CR_reg32(const X86::Instruction&) { TODO(); } void SoftCPU::MOV_DR_reg32(const X86::Instruction&) { TODO(); } -void SoftCPU::MOV_EAX_moff32(const X86::Instruction&) { TODO(); } + +void SoftCPU::MOV_EAX_moff32(const X86::Instruction& insn) +{ + set_eax(read_memory32({ segment(insn.segment_prefix().value_or(X86::SegmentRegister::DS)), insn.imm_address() })); +} void SoftCPU::MOV_RM16_imm16(const X86::Instruction& insn) {