Author: aandrejevic Date: Wed Oct 9 19:49:41 2013 New Revision: 60589
URL: http://svn.reactos.org/svn/reactos?rev=60589&view=rev Log: [SOFT386] Fix the carry flag in the SAR instruction.
Modified: branches/ntvdm/lib/soft386/opgroups.c
Modified: branches/ntvdm/lib/soft386/opgroups.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opgroups.c?rev... ============================================================================== --- branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] Wed Oct 9 19:49:41 2013 @@ -273,7 +273,7 @@ if (Value & HighestBit) Result |= ((1 << Count) - 1) << (Bits - Count);
/* Update CF and OF */ - State->Flags.Cf = Value & 1; + State->Flags.Cf = (Value & (1 << (Count - 1))) ? TRUE : FALSE; if (Count == 1) State->Flags.Of = FALSE;
break;