Author: aandrejevic
Date: Mon Sep 30 00:02:53 2013
New Revision: 60463
URL:
http://svn.reactos.org/svn/reactos?rev=60463&view=rev
Log:
[SOFT386]
Fix the LOOP instruction. LOOP should loop while ECX is not zero, not otherwise.
Modified:
branches/ntvdm/lib/soft386/opcodes.c
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] Mon Sep 30 00:02:53 2013
@@ -5186,8 +5186,8 @@
Size = !Size;
}
- if (Size) Condition = ((--State->GeneralRegs[SOFT386_REG_ECX].Long) == 0);
- else Condition = ((--State->GeneralRegs[SOFT386_REG_ECX].LowWord) == 0);
+ if (Size) Condition = ((--State->GeneralRegs[SOFT386_REG_ECX].Long) != 0);
+ else Condition = ((--State->GeneralRegs[SOFT386_REG_ECX].LowWord) != 0);
if (Opcode == 0xE0)
{