about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-08 16:38:32 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-08 16:38:32 -0700
commit01b45300ed1307c31a9792341a93e1f97a8f10c1 (patch)
tree3ab42f9f280597ce0cb30689c365e1e5cbc3d796
parentde3d48163eadc77e2c0a0ed5951ae012bc940d7d (diff)
downloadmu-01b45300ed1307c31a9792341a93e1f97a8f10c1.tar.gz
colocate compute-offsets with its globals
-rwxr-xr-xsubx/apps/surveybin37431 -> 37431 bytes
-rw-r--r--subx/apps/survey.subx23
2 files changed, 14 insertions, 9 deletions
diff --git a/subx/apps/survey b/subx/apps/survey
index a76934f2..074b4ab6 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index bc1b6650..50e5a705 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -317,6 +317,20 @@ test-convert-computes-addresses:
     5d/pop-to-EBP
     c3/return
 
+# global scratch space for compute-offsets in the data segment
+== data
+
+compute-offsets:curr-segment-name: 0/imm32/curr
+compute-offsets:curr-segment-name:end: 0/imm32/limit
+compute-offsets:file-offset: 0/imm32
+compute-offsets:segment-offset: 0/imm32
+compute-offsets:word-slice: 0/imm32/curr
+compute-offsets:word-slice:end: 0/imm32/limit
+compute-offsets:heap: 0/imm32/curr
+compute-offsets:heap:end: 0/imm32/limit
+
+== code
+
 compute-offsets:  # in : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
     # pseudocode:
     #   var curr-segment-name = 0
@@ -2698,13 +2712,4 @@ $p_align:
   # compute the starting address for each segment
   0x1000/imm32
 
-compute-offsets:curr-segment-name: 0/imm32/curr
-compute-offsets:curr-segment-name:end: 0/imm32/limit
-compute-offsets:file-offset: 0/imm32
-compute-offsets:segment-offset: 0/imm32
-compute-offsets:word-slice: 0/imm32/curr
-compute-offsets:word-slice:end: 0/imm32/limit
-compute-offsets:heap: 0/imm32/curr
-compute-offsets:heap:end: 0/imm32/limit
-
 # . . vim:nowrap:textwidth=0