From 2f4594cf3069fc62d3564e6086c3872daeedcaf5 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Tue, 15 Oct 2013 19:03:40 +0000 Subject: [PATCH] [SOFT386] Implement the PUSH instruction in opcode group 0xFF. svn path=/branches/ntvdm/; revision=60681 --- lib/soft386/opgroups.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/soft386/opgroups.c b/lib/soft386/opgroups.c index d55ad87a89c..a2628b151ed 100644 --- a/lib/soft386/opgroups.c +++ b/lib/soft386/opgroups.c @@ -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 -- 2.17.1