a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

Commit
33f698448da2f46ef2ee3aaefdb789a6af2d2cd2
Parent
67fa9141d6d16cf6121dbaa5823700b3a89c8d9b
Author
Pablo Escobar Gaviria <gark.garcia@protonmail.com>
Date

Fixed indexing issue in the DOS x86 implementation.

Diffstat

1 file changed, 4 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified Extra/x86/PROGRAM.ASM 4 4 0
diff --git a/Extra/x86/PROGRAM.ASM b/Extra/x86/PROGRAM.ASM
@@ -75,18 +75,22 @@ test_pair:
         ; S(a + b) = sums_cache[a + b]
         mov  si, offset sums_cache
         add  si, ax
+        add  si, ax
+        add  si, bx
         add  si, bx
         mov  ax, [si]
         mov  [bp - 6], ax
 
         ; S(a) = sums_cache[a]
         sub  si, bx
+        sub  si, bx
         mov  ax, [si]
         mov  [bp - 4], ax
 
         ; S(b) = sums_cache[b]
         mov  si, offset sums_cache
         add  si, bx
+        add  si, bx
         mov  ax, [si]
         mov  [bp - 2], ax