summaryrefslogtreecommitdiff
path: root/emulate/emulator.cpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2018-06-16 16:11:01 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2018-06-16 16:11:01 +0200
commit95bc5cd73abd425045889638ccd7dc756419ac15 (patch)
treeb028dce9fb6bb81feae1c6b2ce3f80f614c89932 /emulate/emulator.cpp
parentca642d0c8b0a3dd5f768749b58ba66ac35472610 (diff)
downloadopenwar-95bc5cd73abd425045889638ccd7dc756419ac15.tar.gz
openwar-95bc5cd73abd425045889638ccd7dc756419ac15.tar.bz2
openwar-95bc5cd73abd425045889638ccd7dc756419ac15.zip
Implements CLD and O_SMEM as src operand.
Diffstat (limited to 'emulate/emulator.cpp')
-rw-r--r--emulate/emulator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/emulate/emulator.cpp b/emulate/emulator.cpp
index 8c606a5..805b305 100644
--- a/emulate/emulator.cpp
+++ b/emulate/emulator.cpp
@@ -263,6 +263,11 @@ void Emulator::handle_I_PUSH(_DInst inst)
}
}
+void Emulator::handle_I_CLD(_DInst inst)
+{
+ cpu.df() = 0;
+}
+
void Emulator::int_0x21() {
switch(cpu.ah()) {
//Dos Version
@@ -339,6 +344,7 @@ Emulator::Emulator(binparse::Offset32 init_eip, binparse::Offset32 init_esp, std
REGISTER_HANDLER(I_OR );
REGISTER_HANDLER(I_ADD );
REGISTER_HANDLER(I_PUSH);
+ REGISTER_HANDLER(I_CLD );
#undef REGISTER_HANDLER
@@ -353,6 +359,7 @@ Emulator::Emulator(binparse::Offset32 init_eip, binparse::Offset32 init_esp, std
REGISTER_GETTER(R_BX, bx );
REGISTER_GETTER(R_EBX, ebx);
+ REGISTER_GETTER(R_CL, cl );
REGISTER_GETTER(R_CX, cx );
REGISTER_GETTER(R_ECX, ecx);