[FAST486]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Sun, 3 Nov 2013 18:31:00 +0000 (18:31 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Sun, 3 Nov 2013 18:31:00 +0000 (18:31 +0000)
BP is certainly not the same register as BX.

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

lib/fast486/common.inl

index 5ab2f9f..d11fd23 100644 (file)
@@ -550,9 +550,8 @@ Fast486ParseModRegRm(PFAST486_STATE State,
         switch (RegMem)
         {
             case 0:
         switch (RegMem)
         {
             case 0:
-            case 2:
             {
             {
-                /* (SS:)[BX + SI] */
+                /* [BX + SI] */
                 ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord
                                            + State->GeneralRegs[FAST486_REG_ESI].LowWord;
 
                 ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord
                                            + State->GeneralRegs[FAST486_REG_ESI].LowWord;
 
@@ -560,15 +559,32 @@ Fast486ParseModRegRm(PFAST486_STATE State,
             }
 
             case 1:
             }
 
             case 1:
-            case 3:
             {
             {
-                /* (SS:)[BX + DI] */
+                /* [BX + DI] */
                 ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord
                                            + State->GeneralRegs[FAST486_REG_EDI].LowWord;
 
                 break;
             }
 
                 ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord
                                            + State->GeneralRegs[FAST486_REG_EDI].LowWord;
 
                 break;
             }
 
+            case 2:
+            {
+                /* SS:[BP + SI] */
+                ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBP].LowWord
+                                           + State->GeneralRegs[FAST486_REG_ESI].LowWord;
+
+                break;
+            }
+
+            case 3:
+            {
+                /* SS:[BP + DI] */
+                ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBP].LowWord
+                                           + State->GeneralRegs[FAST486_REG_EDI].LowWord;
+
+                break;
+            }
+
             case 4:
             {
                 /* [SI] */
             case 4:
             {
                 /* [SI] */