[SOFT386]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Tue, 15 Oct 2013 19:03:40 +0000 (19:03 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Tue, 15 Oct 2013 19:03:40 +0000 (19:03 +0000)
Implement the PUSH instruction in opcode group 0xFF.

svn path=/branches/ntvdm/; revision=60681

lib/soft386/opgroups.c

index d55ad87..a2628b1 100644 (file)
@@ -1496,6 +1496,11 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFF)
             Value--;
             State->Flags.Af = ((Value & 0x0F) == 0x0F);
         }
+        else if (ModRegRm.Register == 6)
+        {
+            /* Push the value on to the stack */
+            return Soft386StackPush(State, Value);
+        }
 
         if (ModRegRm.Register <= 1)
         {
@@ -1535,6 +1540,11 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFF)
             Value--;
             State->Flags.Af = ((Value & 0x0F) == 0x0F);
         }
+        else if (ModRegRm.Register == 6)
+        {
+            /* Push the value on to the stack */
+            return Soft386StackPush(State, Value);
+        }
 
         if (ModRegRm.Register <= 1)
         {
@@ -1551,7 +1561,7 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFF)
         }
     }
 
-    if (ModRegRm.Register > 1)
+    if ((ModRegRm.Register > 1) && (ModRegRm.Register != 6))
     {
         UNIMPLEMENTED;
         return FALSE; // NOT IMPLEMENTED