Author: aandrejevic
Date: Thu Aug 29 22:18:28 2013
New Revision: 59892
URL:
http://svn.reactos.org/svn/reactos?rev=59892&view=rev
Log:
[SOFT386]
Implement CMC instruction.
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] Thu Aug 29 22:18:28 2013
@@ -269,7 +269,7 @@
Soft386OpcodePrefix,
Soft386OpcodePrefix,
Soft386OpcodeHalt,
- NULL, // TODO: OPCODE 0xF5 NOT SUPPORTED
+ Soft386OpcodeComplCarry,
NULL, // TODO: OPCODE 0xF6 NOT SUPPORTED
NULL, // TODO: OPCODE 0xF7 NOT SUPPORTED
Soft386OpcodeClearCarry,
@@ -782,6 +782,25 @@
BOOLEAN
FASTCALL
+Soft386OpcodeComplCarry(PSOFT386_STATE State, UCHAR Opcode)
+{
+ /* Make sure this is the right instruction */
+ ASSERT(Opcode == 0xF5);
+
+ /* No prefixes allowed */
+ if (State->PrefixFlags)
+ {
+ Soft386Exception(State, SOFT386_EXCEPTION_UD);
+ return FALSE;
+ }
+
+ /* Toggle CF and return success */
+ State->Flags.Cf = !State->Flags.Cf;
+ return TRUE;
+}
+
+BOOLEAN
+FASTCALL
Soft386OpcodeClearInt(PSOFT386_STATE State, UCHAR Opcode)
{
/* Make sure this is the right instruction */
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] Thu Aug 29 22:18:28 2013
@@ -105,6 +105,14 @@
BOOLEAN
FASTCALL
+Soft386OpcodeComplCarry
+(
+ PSOFT386_STATE State,
+ UCHAR Opcode
+);
+
+BOOLEAN
+FASTCALL
Soft386OpcodeClearInt
(
PSOFT386_STATE State,