Author: aandrejevic
Date: Tue Oct 1 15:02:07 2013
New Revision: 60492
URL:
http://svn.reactos.org/svn/reactos?rev=60492&view=rev
Log:
[SOFT386]
Implement the (undocumented) opcode SALC.
Modified:
branches/ntvdm/lib/soft386/opcodes.c
branches/ntvdm/lib/soft386/opcodes.h
Modified: branches/ntvdm/lib/soft386/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Tue Oct 1 15:02:07 2013
@@ -253,7 +253,7 @@
Soft386OpcodeGroupD3,
Soft386OpcodeAam,
Soft386OpcodeAad,
- NULL, // TODO: OPCODE 0xD6 NOT SUPPORTED
+ Soft386OpcodeSalc,
Soft386OpcodeXlat,
NULL, // TODO: OPCODE 0xD8 NOT SUPPORTED
NULL, // TODO: OPCODE 0xD9 NOT SUPPORTED
@@ -5588,3 +5588,21 @@
sizeof(USHORT));
}
}
+
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSalc)
+{
+ /* Make sure this is the right instruction */
+ ASSERT(Opcode == 0xD6);
+
+ if (State->PrefixFlags & SOFT386_PREFIX_LOCK)
+ {
+ /* Invalid prefix */
+ Soft386Exception(State, SOFT386_EXCEPTION_UD);
+ return FALSE;
+ }
+
+ /* Set all the bits of AL to CF */
+ State->GeneralRegs[SOFT386_REG_EAX].LowByte = State->Flags.Cf ? 0xFF : 0x00;
+
+ return TRUE;
+}
Modified: branches/ntvdm/lib/soft386/opcodes.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.h?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] Tue Oct 1 15:02:07 2013
@@ -147,5 +147,6 @@
SOFT386_OPCODE_HANDLER(Soft386OpcodeMovEaxOffset);
SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetAl);
SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetEax);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSalc);
#endif // _OPCODES_H_