about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-09 16:50:29 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-09 16:55:55 -0700
commit5821a0f61241b3e83d251affc5a93ef0de5a9b2b (patch)
tree606dc38a4f2a108ba039121b51f90ad466244e8f
parentf6ea25613f80814a4fc9ff1185abcf5e908b7469 (diff)
downloadmu-5821a0f61241b3e83d251affc5a93ef0de5a9b2b.tar.gz
clean up after a few calls
-rwxr-xr-xsubx/apps/surveybin37321 -> 37339 bytes
-rw-r--r--subx/apps/survey.subx13
2 files changed, 9 insertions, 4 deletions
diff --git a/subx/apps/survey b/subx/apps/survey
index 17fb88f4..e8e6c9e6 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index e6ab7e1d..a4c6a5a4 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -486,6 +486,8 @@ $compute-offsets:label:
     68/push  "label '"/imm32
     # . . call
     e8/call  trace-slsls/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x14/imm32        # add to ESP
     # trace-slsns("label '" word-slice/EDX "' is at offset '" *file-offset/EAX "'")
     # . . EAX = file-offset
     b8/copy-to-EAX compute-offsets:file-offset/imm32
@@ -499,6 +501,8 @@ $compute-offsets:label:
     68/push  "label '"/imm32
     # . . call
     e8/call  trace-slsns/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x14/imm32        # add to ESP
     # continue
     e9/jump  $compute-offsets:word-loop/disp32
 $compute-offsets:segment:
@@ -602,16 +606,17 @@ $compute-offsets:construct-next-segment:
     # seg->file-offset = *file-offset
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           0/r32/EAX   compute-offsets:file-offset/disp32 # copy *file-offset to EAX
     89/copy                         1/mod/*+disp8   3/rm32/EBX    .           .             .           0/r32/EAX   4/disp8         .                 # copy EAX to *(EBX+4)
-    # trace-slsns("segment '", curr-segment-name, "' is at file offset ", seg->file-offset/EAX, "")
-    # . push args
+    # trace-slsns("segment '", curr-segment-name, "' is at file offset ", seg->file-offset, "")
+    # . . push args
     68/push  "."/imm32
     50/push-EAX
     68/push  "' is at file offset "/imm32
     68/push  compute-offsets:curr-segment-name/imm32
     68/push  "segment '"/imm32
-    # . call
+    # . . call
     e8/call  trace-slsns/disp32
-    # . discard args
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x14/imm32        # add to ESP
     # segment-offset = 0
     c7          0/subop/copy        0/mod/indirect  5/rm32/.disp32            .             .           .     compute-offsets:segment-offset/disp32  0/imm32           # copy to *segment-offset
     e9/jump $compute-offsets:line-loop/disp32