about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-11 21:23:17 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-11 21:24:09 -0700
commitf57a458e7b4fc0eb30f8dbadb9d20ecf10e4a1bb (patch)
tree82c1f54248bb0d9d48e9964947b20789e34f895e /subx
parent3a3e7a90d75ceaa6c7e7e5c6472baef13e299332 (diff)
downloadmu-f57a458e7b4fc0eb30f8dbadb9d20ecf10e4a1bb.tar.gz
.
Diffstat (limited to 'subx')
-rw-r--r--subx/apps/survey.subx5
1 files changed, 3 insertions, 2 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index 31b98e6a..04056762 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -354,6 +354,7 @@ compute-offsets:  # in : (address buffered-file), segments : (address stream {st
     #       if slice-starts-with?(word-slice, "#")  # comment
     #         continue
     #       if is-label?(word-slice)
+    #         strip trailing ':' from word-slice
     #         x : (address label-info) = get-or-insert(labels, name)
     #         x->segment-offset = segment-offset
     #         trace("label '", word-slice, "' is in segment '", curr-segment-name, "'")
@@ -465,8 +466,8 @@ $compute-offsets:label:
     # . if (EAX == 0) goto next check
     3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $compute-offsets:segment/disp8
-    # word-slice->end--
-    ff          1/subop/dec        1/mod/*+disp8    2/rm32/EDX    .           .             .           .           4/disp8         .                 # decrement *(EDX+4)
+    # strip trailing ':' from word-slice
+    ff          1/subop/decrement   1/mod/*+disp8   2/rm32/EDX    .           .             .           .           4/disp8         .                 # decrement *(EDX+4)
     # x/EAX = get-or-insert-slice(labels, word-slice)
     # . . push args
     68/push  0x10/imm32/row-size