diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-08 16:38:32 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-08 16:38:32 -0700 |
commit | 01b45300ed1307c31a9792341a93e1f97a8f10c1 (patch) | |
tree | 3ab42f9f280597ce0cb30689c365e1e5cbc3d796 | |
parent | de3d48163eadc77e2c0a0ed5951ae012bc940d7d (diff) | |
download | mu-01b45300ed1307c31a9792341a93e1f97a8f10c1.tar.gz |
colocate compute-offsets with its globals
-rwxr-xr-x | subx/apps/survey | bin | 37431 -> 37431 bytes | |||
-rw-r--r-- | subx/apps/survey.subx | 23 |
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 |