Author: hbelusca Date: Wed Feb 19 19:27:05 2014 New Revision: 62256
URL: http://svn.reactos.org/svn/reactos?rev=62256&view=rev Log: [FAST486]: Hardcoded_values--;
Modified: branches/ntvdm/lib/fast486/common.inl
Modified: branches/ntvdm/lib/fast486/common.inl URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?rev... ============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Feb 19 19:27:05 2014 @@ -281,7 +281,7 @@ }
/* Subtract ESP by 4 */ - State->GeneralRegs[FAST486_REG_ESP].Long -= 4; + State->GeneralRegs[FAST486_REG_ESP].Long -= sizeof(ULONG);
/* Store the value in SS:ESP */ return Fast486WriteMemory(State, @@ -303,7 +303,7 @@ }
/* Subtract SP by 2 */ - State->GeneralRegs[FAST486_REG_ESP].LowWord -= 2; + State->GeneralRegs[FAST486_REG_ESP].LowWord -= sizeof(USHORT);
/* Store the value in SS:SP */ return Fast486WriteMemory(State, @@ -319,8 +319,6 @@ Fast486StackPop(PFAST486_STATE State, PULONG Value) { - ULONG LongValue; - USHORT ShortValue; BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size;
/* The OPSIZE prefix toggles the size */ @@ -329,6 +327,7 @@ if (Size) { /* 32-bit size */ + ULONG LongValue;
/* Check if ESP is 0xFFFFFFFF */ if (State->GeneralRegs[FAST486_REG_ESP].Long == 0xFFFFFFFF) @@ -350,7 +349,7 @@ }
/* Increment ESP by 4 */ - State->GeneralRegs[FAST486_REG_ESP].Long += 4; + State->GeneralRegs[FAST486_REG_ESP].Long += sizeof(ULONG);
/* Store the value in the result */ *Value = LongValue; @@ -358,6 +357,7 @@ else { /* 16-bit size */ + USHORT ShortValue;
/* Check if SP is 0xFFFF */ if (State->GeneralRegs[FAST486_REG_ESP].LowWord == 0xFFFF) @@ -379,7 +379,7 @@ }
/* Increment SP by 2 */ - State->GeneralRegs[FAST486_REG_ESP].LowWord += 2; + State->GeneralRegs[FAST486_REG_ESP].LowWord += sizeof(USHORT);
/* Store the value in the result */ *Value = ShortValue;