diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-11 21:52:56 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-11 21:52:56 -0700 |
commit | 2c45de094b4851c3cabed4ab6a1c916d41a22e8a (patch) | |
tree | 7a3f3bbe5f01e95b87a3cd67fcfa66e0ead60ed5 /subx/apps | |
parent | 98994d5bccb87935870fc0a96da8f1a63aaf9dfe (diff) | |
download | mu-2c45de094b4851c3cabed4ab6a1c916d41a22e8a.tar.gz |
.
Pseudocode is a little more truthful now about what variables are on the stack.
Diffstat (limited to 'subx/apps')
-rw-r--r-- | subx/apps/survey.subx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx index a5e82759..5ae984d1 100644 --- a/subx/apps/survey.subx +++ b/subx/apps/survey.subx @@ -320,19 +320,19 @@ test-convert-computes-addresses: # global scratch space for compute-offsets in the data segment == data -compute-offsets:curr-segment-name: +compute-offsets:curr-segment-name: # slice 0/imm32/start compute-offsets:curr-segment-name:end: 0/imm32/end -compute-offsets:file-offset: +compute-offsets:file-offset: # int 0/imm32 -compute-offsets:segment-offset: +compute-offsets:segment-offset: # int 0/imm32 compute-offsets:word-slice: 0/imm32/start compute-offsets:word-slice:end: 0/imm32/end -compute-offsets:segment-start: +compute-offsets:segment-start: # slice 0/imm32/start 0/imm32/end @@ -340,15 +340,13 @@ compute-offsets:segment-start: compute-offsets: # in : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) # pseudocode: - # var curr-segment-name : (address slice) = {0, 0} - # var file-offset = 0, segment-offset = 0 # var line = new-stream(512, 1) # while true # line loop # clear-stream(line) # read-line-buffered(in, line) # if (line->write == 0) break # end of file # while true # word loop - # var word-slice = next-word(line) + # word-slice = next-word(line) # if slice-empty?(word-slice) # end of line # break # if slice-starts-with?(word-slice, "#") # comment |