about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-17 23:04:45 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-17 23:04:45 -0700
commit5030d67c85f63fc09ee506a90394c50f2db4f3be (patch)
tree4b24be1d2d510b787ad52481e123df5c2021a604 /subx/apps
parent7fe1e2434911d682f9ac5358c8cabbaab7964084 (diff)
downloadmu-5030d67c85f63fc09ee506a90394c50f2db4f3be.tar.gz
5415
Bugfix thirteen: displacement calculations were wrong because current
offset was not being updated properly as words were being read and
emitted.

Now 10/12 example programs are translated correctly.
Diffstat (limited to 'subx/apps')
-rwxr-xr-xsubx/apps/surveybin41174 -> 41174 bytes
-rw-r--r--subx/apps/survey.subx4
2 files changed, 2 insertions, 2 deletions
diff --git a/subx/apps/survey b/subx/apps/survey
index 6971e511..61e2f974 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index bc96fe14..d868132a 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -1884,8 +1884,8 @@ $emit-segments:check0:
     e8/call  num-bytes/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-    # . EBX = EAX
-    89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                 # copy EAX to EBX
+    # . EBX += EAX
+    01/add                          3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                 # add EAX to EBX
 $emit-segments:word-loop:
     # next-word(line, word-slice)
     # . . push args