From 7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 3 Jan 2020 01:36:34 -0800 Subject: [PATCH] 5876 - address -> addr --- 050_write.subx | 2 +- 051test.subx | 2 +- 052kernel-string-equal.subx | 10 +-- 053new-segment.subx | 2 +- 054string-equal.subx | 10 +-- 055stream.subx | 8 +- 056trace.subx | 32 +++---- 057write.subx | 2 +- 058stream-equal.subx | 12 +-- 059stop.subx | 8 +- 060read.subx | 4 +- 061read-byte.subx | 8 +- 062write-stream.subx | 4 +- 063error.subx | 2 +- 064write-byte.subx | 12 +-- 065write-buffered.subx | 8 +- 066print-int.subx | 8 +- 067parse-hex.subx | 8 +- 068error-byte.subx | 2 +- 069allocate.subx | 4 +- 070new-stream.subx | 2 +- 071read-line.subx | 4 +- 072slice.subx | 34 ++++---- 073next-token.subx | 28 +++--- 074write-stream-data.subx | 2 +- 075print-int-decimal.subx | 6 +- 076next-word.subx | 2 +- 077subx-words.subx | 14 +-- 078emit-hex.subx | 2 +- 079emit.subx | 2 +- 080zero-out.subx | 2 +- 081table.subx | 60 ++++++------- 082slurp.subx | 2 +- 083subx-widths.subx | 6 +- 084emit-hex-array.subx | 6 +- 092write-int.subx | 2 +- 093array-equal.subx | 16 ++-- 094next-word-or-string.subx | 2 +- 095stack.subx | 12 +-- apps/assort.subx | 24 +++--- apps/braces.subx | 4 +- apps/calls.subx | 14 +-- apps/crenshaw2-1.subx | 8 +- apps/crenshaw2-1b.subx | 8 +- apps/dquotes.subx | 20 ++--- apps/ex11.subx | 4 +- apps/ex8.subx | 2 +- apps/handle.subx | 4 +- apps/hex.subx | 8 +- apps/mu.subx | 118 +++++++++++++------------- apps/mulisp.subx | 30 +++---- apps/pack.subx | 42 ++++----- apps/sigils.subx | 20 ++--- apps/survey.subx | 56 ++++++------ apps/tests.subx | 2 +- html/050_write.subx.html | 2 +- html/051test.subx.html | 2 +- html/052kernel-string-equal.subx.html | 10 +-- html/053new-segment.subx.html | 2 +- html/054string-equal.subx.html | 10 +-- html/055stream.subx.html | 8 +- html/056trace.subx.html | 32 +++---- html/057write.subx.html | 2 +- html/058stream-equal.subx.html | 12 +-- html/059stop.subx.html | 8 +- html/060read.subx.html | 4 +- html/061read-byte.subx.html | 8 +- html/062write-stream.subx.html | 4 +- html/063error.subx.html | 2 +- html/064write-byte.subx.html | 12 +-- html/065write-buffered.subx.html | 8 +- html/066print-int.subx.html | 8 +- html/067parse-hex.subx.html | 8 +- html/068error-byte.subx.html | 2 +- html/069allocate.subx.html | 4 +- html/070new-stream.subx.html | 2 +- html/071read-line.subx.html | 4 +- html/072slice.subx.html | 34 ++++---- html/073next-token.subx.html | 28 +++--- html/074write-stream-data.subx.html | 2 +- html/075print-int-decimal.subx.html | 6 +- html/076next-word.subx.html | 2 +- html/077subx-words.subx.html | 14 +-- html/078emit-hex.subx.html | 2 +- html/079emit.subx.html | 2 +- html/080zero-out.subx.html | 2 +- html/081table.subx.html | 60 ++++++------- html/082slurp.subx.html | 2 +- html/083subx-widths.subx.html | 6 +- html/084emit-hex-array.subx.html | 6 +- html/092write-int.subx.html | 2 +- html/093array-equal.subx.html | 16 ++-- html/094next-word-or-string.subx.html | 2 +- html/095stack.subx.html | 12 +-- html/apps/assort.subx.html | 24 +++--- html/apps/braces.subx.html | 4 +- html/apps/calls.subx.html | 14 +-- html/apps/crenshaw2-1.subx.html | 8 +- html/apps/crenshaw2-1b.subx.html | 8 +- html/apps/dquotes.subx.html | 20 ++--- html/apps/ex11.subx.html | 4 +- html/apps/ex8.subx.html | 2 +- html/apps/handle.subx.html | 4 +- html/apps/hex.subx.html | 8 +- html/apps/mu.subx.html | 118 +++++++++++++------------- html/apps/mulisp.subx.html | 30 +++---- html/apps/pack.subx.html | 42 ++++----- html/apps/sigils.subx.html | 20 ++--- html/apps/survey.subx.html | 56 ++++++------ html/apps/tests.subx.html | 2 +- 110 files changed, 716 insertions(+), 716 deletions(-) diff --git a/050_write.subx b/050_write.subx index f4b95c0d..9e848b0d 100644 --- a/050_write.subx +++ b/050_write.subx @@ -34,7 +34,7 @@ Entry: # just exit; can't test _write just yet # You can convert a ref or handle to an address, but not the other way around. # You can convert addresses to ints, but not the other way around. -_write: # fd : int, s : (address array byte) +_write: # fd : int, s : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/051test.subx b/051test.subx index ac0f32a5..f5771010 100644 --- a/051test.subx +++ b/051test.subx @@ -21,7 +21,7 @@ Entry: # manual test cd/syscall 0x80/imm8 # print msg to stderr if a != b, otherwise print "." -check-ints-equal: # a : int, b : int, msg : (address array byte) +check-ints-equal: # a : int, b : int, msg : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/052kernel-string-equal.subx b/052kernel-string-equal.subx index f63ef9ed..94953e59 100644 --- a/052kernel-string-equal.subx +++ b/052kernel-string-equal.subx @@ -30,7 +30,7 @@ Entry: # run all tests # compare a null-terminated ascii string with a more idiomatic length-prefixed byte array # reason for the name: the only place we should have null-terminated ascii strings is from commandline args -kernel-string-equal?: # s : (address kernel-string), benchmark : (address array byte) -> eax : boolean +kernel-string-equal?: # s : (addr kernel-string), benchmark : (addr array byte) -> eax : boolean # pseudocode: # n = benchmark->length # s1 = s @@ -61,12 +61,12 @@ kernel-string-equal?: # s : (address kernel-string), benchmark : (address array 53/push-ebx 56/push-esi 57/push-edi - # var s1/edi : (address byte) = s + # var s1/edi : (addr byte) = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi # var n/edx : int = benchmark->length 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx 8b/copy 0/mod/indirect 2/rm32/edx . . . 2/r32/edx . . # copy *edx to edx - # var s2/esi : (address byte) = benchmark->data + # var s2/esi : (addr byte) = benchmark->data 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi # var i/ecx : int = 0 @@ -262,10 +262,10 @@ test-compare-kernel-string-with-longer-array: == data -Null-kernel-string: # (address kernel-string) +Null-kernel-string: # (addr kernel-string) 00/null -_test-Abc-kernel-string: # (address kernel-string) +_test-Abc-kernel-string: # (addr kernel-string) 41/A 62/b 63/c 00/null # . . vim:nowrap:textwidth=0 diff --git a/053new-segment.subx b/053new-segment.subx index ba2487d5..d1cc7daf 100644 --- a/053new-segment.subx +++ b/053new-segment.subx @@ -29,7 +29,7 @@ Entry: # manual test e8/call new-segment/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # var eax : (address _) = ad->curr + # var eax : (addr _) = ad->curr 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax # write to *eax to check that we have access to the newly-allocated segment c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0x34/imm32 # copy to *eax diff --git a/054string-equal.subx b/054string-equal.subx index c63688a1..a34130ec 100644 --- a/054string-equal.subx +++ b/054string-equal.subx @@ -13,7 +13,7 @@ Entry: # run all tests b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -string-equal?: # s : (address array byte), benchmark : (address array byte) -> eax : boolean +string-equal?: # s : (addr array byte), benchmark : (addr array byte) -> eax : boolean # pseudocode: # if (s->length != benchmark->length) return false # currs = s->data @@ -51,11 +51,11 @@ $string-equal?:lengths: # if (ecx != benchmark->length) return false 39/compare 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # compare *edi and ecx 75/jump-if-not-equal $string-equal?:false/disp8 - # var currs/esi : (address byte) = s->data + # var currs/esi : (addr byte) = s->data 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi - # var maxs/ecx : (address byte) = &s->data[s->length] + # var maxs/ecx : (addr byte) = &s->data[s->length] 01/add 3/mod/direct 1/rm32/ecx . . . 6/r32/esi . . # add esi to ecx - # var currb/edi : (address byte) = benchmark->data + # var currb/edi : (addr byte) = benchmark->data 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi # var c1/eax : byte = 0 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -176,7 +176,7 @@ test-compare-inequal-strings-equal-lengths: c3/return # helper for later tests -check-strings-equal: # s : (address array byte), expected : (address array byte), msg : (address array byte) +check-strings-equal: # s : (addr array byte), expected : (addr array byte), msg : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/055stream.subx b/055stream.subx index 6568602a..cd2fc3db 100644 --- a/055stream.subx +++ b/055stream.subx @@ -14,7 +14,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -clear-stream: # f : (address stream byte) +clear-stream: # f : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -25,13 +25,13 @@ clear-stream: # f : (address stream byte) 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax # var count/ecx : int = f->length 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 1/r32/ecx 8/disp8 . # copy *(eax+8) to ecx - # var max/ecx : (address byte) = &f->data[f->length] + # var max/ecx : (addr byte) = &f->data[f->length] 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 0xc/disp8 . # copy eax+ecx+12 to ecx # f->write = 0 c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0/imm32 # copy to *eax # f->read = 0 c7 0/subop/copy 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 0/imm32 # copy to *(eax+4) - # var curr/eax : (address byte) = f->data + # var curr/eax : (addr byte) = f->data 81 0/subop/add 3/mod/direct 0/rm32/eax . . . . . 0xc/imm32 # add to eax $clear-stream:loop: # if (curr >= max) break @@ -51,7 +51,7 @@ $clear-stream:end: 5d/pop-to-ebp c3/return -rewind-stream: # f : (address stream byte) +rewind-stream: # f : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/056trace.subx b/056trace.subx index 0a09bd4f..14270887 100644 --- a/056trace.subx +++ b/056trace.subx @@ -79,7 +79,7 @@ $initialize-trace-stream:end: # Append a string to the given trace stream. # Silently give up if it's already full. Or truncate the string if there isn't enough room. -trace: # line : (address array byte) +trace: # line : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -90,7 +90,7 @@ trace: # line : (address array byte) 53/push-ebx 56/push-esi 57/push-edi - # var edi : (address stream byte) = *Trace-stream + # var edi : (addr stream byte) = *Trace-stream 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 7/r32/edi Trace-stream/disp32 # copy *Trace-stream to edi # esi = line 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi @@ -246,7 +246,7 @@ test-trace-empty-line: # end c3/return -check-trace-contains: # line : (address string), msg : (address string) +check-trace-contains: # line : (addr string), msg : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -271,7 +271,7 @@ $check-trace-contains:end: 5d/pop-to-ebp c3/return -check-trace-scans-to: # line : (address string), msg : (address string) +check-trace-scans-to: # line : (addr string), msg : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -302,7 +302,7 @@ $check-trace-scans-to:end: c3/return # Start scanning from Trace-stream->read for 'line'. If found, update Trace-stream->read and return true. -trace-scan: # line : (address array byte) -> result/eax : boolean +trace-scan: # line : (addr array byte) -> result/eax : boolean # pseudocode: # push Trace-stream->read # while true: @@ -554,7 +554,7 @@ test-trace-scan-failure-leaves-read-index-untouched: # . end c3/return -next-line-matches?: # t : (address stream byte), line : (address array byte) -> result/eax : boolean +next-line-matches?: # t : (addr stream byte), line : (addr array byte) -> result/eax : boolean # pseudocode: # while true: # if (currl >= maxl) break @@ -575,24 +575,24 @@ next-line-matches?: # t : (address stream byte), line : (address array byte) -> 57/push-edi # edx = line 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx - # var currl/esi : (address byte) = line->data + # var currl/esi : (addr byte) = line->data # . esi = line/edx->data 8d/copy-address 1/mod/*+disp8 2/rm32/edx . . . 6/r32/esi 4/disp8 . # copy edx+4 to esi - # var maxl/ecx : (address byte) = &line->data[line->size] + # var maxl/ecx : (addr byte) = &line->data[line->size] # . eax = line/edx->size 8b/copy 0/mod/indirect 2/rm32/edx . . 0/r32/eax . . # copy *edx to eax # . maxl = &line->data[line->size] 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/esi 0/index/eax . 1/r32/ecx . . # copy edx+eax to ecx # edi = t 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi - # var ebx : (address byte) = t->data + # var ebx : (addr byte) = t->data 8d/copy-address 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 0xc/disp8 . # copy edi+12 to ebx - # var maxt/edx : (address byte) = &t->data[t->write] + # var maxt/edx : (addr byte) = &t->data[t->write] # . eax = t->write 8b/copy 0/mod/indirect 7/rm32/edi . . 0/r32/eax . . # copy *edi to eax # . maxt = &t->data[t->write] 8d/copy-address 0/mod/indirect 4/rm32/sib 3/base/ebx 0/index/eax . 2/r32/edx . . # copy ebx+eax to edx - # var currt/edi : (address byte) = &t->data[t->read] + # var currt/edi : (addr byte) = &t->data[t->read] # . eax = t/edi->read 8b/copy 1/mod/*+disp8 7/rm32/edi . . 0/r32/eax 4/disp8 . # copy *(edi+4) to eax # . currt = &t->data[t->read] @@ -730,7 +730,7 @@ test-next-line-matches?-match: c3/return # move t->read to _after_ next newline -skip-next-line: # t : (address stream byte) +skip-next-line: # t : (addr stream byte) # pseudocode: # max = &t->data[t->write] # i = t->read @@ -756,11 +756,11 @@ skip-next-line: # t : (address stream byte) 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 0xc/disp8 . # copy ecx+12 to edx # eax = t->write 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax - # var max/ebx : (address byte) = &t->data[t->write] + # var max/ebx : (addr byte) = &t->data[t->write] 8d/copy-address 0/mod/indirect 4/rm32/sib 2/base/edx 0/index/eax . 3/r32/ebx . . # copy edx+eax to ebx # eax = t->read 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to edx - # var curr/ecx : (address byte) = &t->data[t->read] + # var curr/ecx : (addr byte) = &t->data[t->read] 8d/copy-address 0/mod/indirect 4/rm32/sib 2/base/edx 0/index/eax . 1/r32/ecx . . # copy edx+eax to ecx # var i/edx : int = t->read 89/copy 3/mod/direct 2/rm32/edx . . . 0/r32/eax . . # copy eax to edx @@ -858,7 +858,7 @@ $clear-trace-stream:end: # - helpers # 3-argument variant of _append -_append-3: # out : (address byte), outend : (address byte), s : (address array byte) -> num_bytes_appended/eax +_append-3: # out : (addr byte), outend : (addr byte), s : (addr array byte) -> num_bytes_appended/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -890,7 +890,7 @@ $_append-3:end: c3/return # 4-argument variant of _append -_append-4: # out : (address byte), outend : (address byte), in : (address byte), inend : (address byte) -> num_bytes_appended/eax : int +_append-4: # out : (addr byte), outend : (addr byte), in : (addr byte), inend : (addr byte) -> num_bytes_appended/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/057write.subx b/057write.subx index db3cb5cc..b768c22a 100644 --- a/057write.subx +++ b/057write.subx @@ -21,7 +21,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # TODO: come up with a way to signal when a write to disk fails -write: # f : fd or (address stream byte), s : (address array byte) +write: # f : fd or (addr stream byte), s : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/058stream-equal.subx b/058stream-equal.subx index bc3bc4d0..bcf6b6f2 100644 --- a/058stream-equal.subx +++ b/058stream-equal.subx @@ -6,7 +6,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # compare all the data in a stream (ignoring the read pointer) -stream-data-equal?: # f : (address stream byte), s : (address array byte) -> eax : boolean +stream-data-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -19,9 +19,9 @@ stream-data-equal?: # f : (address stream byte), s : (address array byte) -> ea 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi # eax = f->write 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax - # var maxf/edx : (address byte) = &f->data[f->write] + # var maxf/edx : (addr byte) = &f->data[f->write] 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 0/index/eax . 2/r32/edx 0xc/disp8 . # copy esi+eax+12 to edx - # var currf/esi : (address byte) = f->data + # var currf/esi : (addr byte) = f->data 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 0xc/imm32 # add to esi # edi = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0xc/disp8 . # copy *(ebp+12) to edi @@ -29,7 +29,7 @@ $stream-data-equal?:compare-lengths: # if (f->write != s->length) return false 39/compare 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . . # compare *edi and eax 75/jump-if-not-equal $stream-data-equal?:false/disp8 - # var currs/edi : (address byte) = s->data + # var currs/edi : (addr byte) = s->data 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi # var eax : byte = 0 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -191,7 +191,7 @@ test-stream-data-equal-length-check: c3/return # helper for later tests -check-stream-equal: # f : (address stream byte), s : (address array byte), msg : (address array byte) +check-stream-equal: # f : (addr stream byte), s : (addr array byte), msg : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -227,7 +227,7 @@ $check-stream-equal:end: # on success, set f->read to after the next newline # on failure, leave f->read unmodified # this function is usually used only in tests, so we repeatedly write f->read -next-stream-line-equal?: # f : (address stream byte), s : (address array byte) -> eax : boolean +next-stream-line-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean # pseudocode: # currf = f->read # bound: f->write # currs = 0 # bound : s->length diff --git a/059stop.subx b/059stop.subx index 7c1c776b..b224005c 100644 --- a/059stop.subx +++ b/059stop.subx @@ -41,7 +41,7 @@ # the stack. # Ugly that we need to know the size of args. Don't allocate variables between # tailor-exit-descriptor and the call it's for. -tailor-exit-descriptor: # ed : (address exit-descriptor), nbytes : int +tailor-exit-descriptor: # ed : (addr exit-descriptor), nbytes : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -89,7 +89,7 @@ $tailor-exit-descriptor:end: 5d/pop-to-ebp c3/return -stop: # ed : (address exit-descriptor), value : int +stop: # ed : (addr exit-descriptor), value : int # no prologue; one way or another, we're going to clobber registers # eax = ed 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # copy *(esp+4) to eax @@ -161,7 +161,7 @@ test-stop-skips-returns-on-exit: 5d/pop-to-ebp c3/return -_test-stop-1: # ed : (address exit-descriptor) +_test-stop-1: # ed : (addr exit-descriptor) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -188,7 +188,7 @@ $_test-stop-1:dead-end: 5d/pop-to-ebp c3/return -_test-stop-2: # ed : (address exit-descriptor) +_test-stop-2: # ed : (addr exit-descriptor) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/060read.subx b/060read.subx index 34658b7b..3fad28b4 100644 --- a/060read.subx +++ b/060read.subx @@ -45,7 +45,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -read: # f : fd or (address stream byte), s : (address stream byte) -> num-bytes-read/eax : int +read: # f : fd or (addr stream byte), s : (addr stream byte) -> num-bytes-read/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -195,7 +195,7 @@ $_buffer-4:end: # Unclear how I'd use it, though. Callers seem to need the check anyway. # Maybe a better helper would be 'empty-stream?' -_read: # fd : int, s : (address stream byte) -> num-bytes-read/eax : int +_read: # fd : int, s : (addr stream byte) -> num-bytes-read/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/061read-byte.subx b/061read-byte.subx index a90c05da..ae09a7a5 100644 --- a/061read-byte.subx +++ b/061read-byte.subx @@ -12,7 +12,7 @@ # The buffered file for standard input. Also illustrates the layout for # buffered-file: a pointer to the backing store, followed by a 'buffer' stream Stdin: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) 0/imm32 # standard input $Stdin->buffer: # inlined fields for a stream @@ -35,7 +35,7 @@ $Stdin->buffer: # return next byte value in eax, with top 3 bytes cleared. # On reaching end of file, return 0xffffffff (Eof). -read-byte-buffered: # f : (address buffered-file) -> byte-or-Eof/eax +read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -272,7 +272,7 @@ test-read-byte-buffered-refills-buffer: # a test buffered file for _test-stream _test-buffered-file: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) _test-stream/imm32 $_test-buffered-file->buffer: # current write index @@ -311,7 +311,7 @@ _test-input-stream: # (ref stream byte) # a test buffered file for _test-input-stream _test-input-buffered-file: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) _test-input-stream/imm32 $_test-input-buffered-file->buffer: # current write index diff --git a/062write-stream.subx b/062write-stream.subx index 2dab3fe8..2183e59b 100644 --- a/062write-stream.subx +++ b/062write-stream.subx @@ -15,7 +15,7 @@ #? b8/copy-to-eax 1/imm32/exit #? cd/syscall 0x80/imm8 -write-stream: # f : fd or (address stream byte), s : (address stream byte) +write-stream: # f : fd or (addr stream byte), s : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -75,7 +75,7 @@ $write-stream:end: 5d/pop-to-ebp c3/return -_write-stream: # fd : int, s : (address stream byte) +_write-stream: # fd : int, s : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/063error.subx b/063error.subx index bb1a8b71..aa1db47c 100644 --- a/063error.subx +++ b/063error.subx @@ -6,7 +6,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # write(out, "Error: "+msg+"\n") then stop(ed, 1) -error: # ed : (address exit-descriptor), out : fd or (address stream byte), msg : (address array byte) +error: # ed : (addr exit-descriptor), out : fd or (addr stream byte), msg : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/064write-byte.subx b/064write-byte.subx index 2e7a36f3..cd68eea7 100644 --- a/064write-byte.subx +++ b/064write-byte.subx @@ -8,7 +8,7 @@ # The buffered file for standard output. Stdout: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) 1/imm32 # standard output $Stdout->buffer: # inlined fields for a stream @@ -30,7 +30,7 @@ $Stdout->buffer: # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # Write lower byte of 'n' to 'f'. -write-byte-buffered: # f : (address buffered-file), n : int +write-byte-buffered: # f : (addr buffered-file), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -78,7 +78,7 @@ $write-byte-buffered:end: 5d/pop-to-ebp c3/return -flush: # f : (address buffered-file) +flush: # f : (addr buffered-file) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -205,7 +205,7 @@ test-write-byte-buffered-multiple-flushes: # - variant without buffering # Write lower byte of 'n' to 'f'. -append-byte: # f : (address stream byte), n : int +append-byte: # f : (addr stream byte), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -326,7 +326,7 @@ _test-output-stream: # (ref stream byte) # a test buffered file for _test-output-stream _test-output-buffered-file: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) _test-output-stream/imm32 $_test-output-buffered-file->buffer: # current write index @@ -357,7 +357,7 @@ _test-error-stream: # (ref stream byte) # a test buffered file for _test-error-stream _test-error-buffered-file: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) _test-error-stream/imm32 $_test-error-buffered-file->buffer: # current write index diff --git a/065write-buffered.subx b/065write-buffered.subx index 8c7ae9c5..16ad8381 100644 --- a/065write-buffered.subx +++ b/065write-buffered.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -write-buffered: # f : (address buffered-file), msg : (address array byte) +write-buffered: # f : (addr buffered-file), msg : (addr array byte) # pseudocode: # in = msg->data # inend = &msg->data[msg->length] @@ -38,9 +38,9 @@ write-buffered: # f : (address buffered-file), msg : (address array byte) 57/push-edi # eax = msg 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax - # var in/esi : (address byte) = msg->data + # var in/esi : (addr byte) = msg->data 8d/copy-address 1/mod/*+disp8 0/rm32/eax . . . 6/r32/esi 4/disp8 . # copy eax+4 to esi - # var inend/ecx : (address byte) = &msg->data[msg->length] + # var inend/ecx : (addr byte) = &msg->data[msg->length] 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/esi 1/index/ecx . 1/r32/ecx . . # copy esi+ecx to ecx # edi = f @@ -207,7 +207,7 @@ test-write-buffered-with-intermediate-flush: # The buffered file for standard error. Stderr: # (ref buffered-file) - # file descriptor or (address stream byte) + # file descriptor or (addr stream byte) 2/imm32 # standard error $Stderr->buffer: # inlined fields for a stream diff --git a/066print-int.subx b/066print-int.subx index a1f968f7..dacf9ef5 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -18,7 +18,7 @@ $to-hex-char:else: 05/add-to-eax 0x57/imm32/a-10 c3/return -append-byte-hex: # f : (address stream byte), n : int +append-byte-hex: # f : (addr stream byte), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -90,7 +90,7 @@ test-append-byte-hex: c3/return # print the hex representation for the lowest byte of a number -print-byte-buffered: # f : (address buffered-file), n : int +print-byte-buffered: # f : (addr buffered-file), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -175,7 +175,7 @@ test-print-byte-buffered: # . end c3/return -print-int32: # f : (address stream byte), n : int +print-int32: # f : (addr stream byte), n : int # pseudocode: # write(f, "0x") # ecx = 28 @@ -263,7 +263,7 @@ test-print-int32: # . end c3/return -print-int32-buffered: # f : (address buffered-file), n : int +print-int32-buffered: # f : (addr buffered-file), n : int # pseudocode: # write-buffered(f, "0x") # ecx = 28 diff --git a/067parse-hex.subx b/067parse-hex.subx index 105943ca..b1c5e7a0 100644 --- a/067parse-hex.subx +++ b/067parse-hex.subx @@ -6,7 +6,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -is-hex-int?: # in : (address slice) -> eax : boolean +is-hex-int?: # in : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -18,7 +18,7 @@ is-hex-int?: # in : (address slice) -> eax : boolean 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx # edx = s->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx - # var curr/ecx : (address byte) = s->start + # var curr/ecx : (addr byte) = s->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 1/r32/ecx . . # copy *ecx to ecx # if s is empty return false b8/copy-to-eax 0/imm32/false @@ -351,7 +351,7 @@ test-is-hex-int-handles-negative-0x-prefix: 5d/pop-to-ebp c3/return -parse-hex-int: # in : (address slice) -> result/eax : int +parse-hex-int: # in : (addr slice) -> result/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -366,7 +366,7 @@ parse-hex-int: # in : (address slice) -> result/eax : int 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx # edx = in->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx - # var curr/ecx : (address byte) = in->start + # var curr/ecx : (addr byte) = in->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 1/r32/ecx . . # copy *ecx to ecx # var negate?/esi : boolean = false 31/xor 3/mod/direct 6/rm32/esi . . . 6/r32/esi . . # clear esi diff --git a/068error-byte.subx b/068error-byte.subx index 5490f890..b3e7e2a0 100644 --- a/068error-byte.subx +++ b/068error-byte.subx @@ -24,7 +24,7 @@ #? cd/syscall 0x80/imm8 # write(out, "Error: "+msg+": "+byte) then stop(ed, 1) -error-byte: # ed : (address exit-descriptor), out : (address buffered-file), msg : (address array byte), n : byte +error-byte: # ed : (addr exit-descriptor), out : (addr buffered-file), msg : (addr array byte), n : byte # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/069allocate.subx b/069allocate.subx index 9b4dff57..5e05f873 100644 --- a/069allocate.subx +++ b/069allocate.subx @@ -56,7 +56,7 @@ $array-equal-main:end: # Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr. # Abort if there isn't enough memory in 'ad'. -allocate: # ad : (address allocation-descriptor), n : int -> address-or-null/eax : (address _) +allocate: # ad : (addr allocation-descriptor), n : int -> address-or-null/eax : (addr _) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -180,7 +180,7 @@ _pending-test-allocate-failure: c3/return # helper: create a nested allocation descriptor (useful for tests) -allocate-region: # ad : (address allocation-descriptor), n : int -> new-ad : (handle allocation-descriptor) +allocate-region: # ad : (addr allocation-descriptor), n : int -> new-ad : (handle allocation-descriptor) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/070new-stream.subx b/070new-stream.subx index 45076c91..8420e5c8 100644 --- a/070new-stream.subx +++ b/070new-stream.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -new-stream: # ad : (address allocation-descriptor), length : int, elemsize : int -> address/eax : (handle stream _) +new-stream: # ad : (addr allocation-descriptor), length : int, elemsize : int -> address/eax : (handle stream _) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/071read-line.subx b/071read-line.subx index ab336c52..ee52e44f 100644 --- a/071read-line.subx +++ b/071read-line.subx @@ -6,7 +6,7 @@ # read bytes from 'f' until (and including) a newline and store them into 's' # 's' fails to grow if and only if no data found # just abort if 's' is too small -read-line-buffered: # f : (address buffered-file), s : (address stream byte) +read-line-buffered: # f : (addr buffered-file), s : (addr stream byte) # pseudocode: # while true # if (s->write >= s->length) abort @@ -216,7 +216,7 @@ test-read-line-buffered-reads-final-line-until-Eof: # read bytes from 'f' until (and including) a newline and store them into 's' # 's' fails to grow if and only if no data found # just abort if 's' is too small -read-line: # f : (address stream byte), s : (address stream byte) +read-line: # f : (addr stream byte), s : (addr stream byte) # pseudocode: # while true # if (s->write >= s->length) abort diff --git a/072slice.subx b/072slice.subx index 30c1b356..317277cd 100644 --- a/072slice.subx +++ b/072slice.subx @@ -6,7 +6,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -slice-empty?: # s : (address slice) -> eax : boolean +slice-empty?: # s : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -88,7 +88,7 @@ test-slice-empty-false: 5d/pop-to-ebp c3/return -slice-equal?: # s : (address slice), p : (address array byte) -> eax : boolean +slice-equal?: # s : (addr slice), p : (addr array byte) -> eax : boolean # pseudocode: # if (p == 0) return (s == 0) # currs = s->start @@ -118,9 +118,9 @@ slice-equal?: # s : (address slice), p : (address array byte) -> eax : boolean 56/push-esi # esi = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var currs/edx : (address byte) = s->start + # var currs/edx : (addr byte) = s->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx - # var maxs/esi : (address byte) = s->end + # var maxs/esi : (addr byte) = s->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi # var slen/eax : int = maxs - currs 89/copy 3/mod/direct 0/rm32/eax . . . 6/r32/esi . . # copy esi to eax @@ -139,7 +139,7 @@ $slice-equal?:nonnull-string: # if (slen != p->length) return false 39/compare 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . . # compare *ebx and eax 75/jump-if-not-equal $slice-equal?:false/disp8 - # var currp/ebx : (address byte) = p->data + # var currp/ebx : (addr byte) = p->data 81 0/subop/add 3/mod/direct 3/rm32/ebx . . . . . 4/imm32 # add to ebx # var c1/eax : byte = 0 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -455,7 +455,7 @@ test-slice-equal-with-null: 5d/pop-to-ebp c3/return -slice-starts-with?: # s : (address slice), head : (address array byte) -> eax : boolean +slice-starts-with?: # s : (addr slice), head : (addr array byte) -> eax : boolean # pseudocode # lenh = head->length # if (lenh > s->end - s->start) return false @@ -498,9 +498,9 @@ slice-starts-with?: # s : (address slice), head : (address array byte) -> eax : # if (lenh > lens) return false 39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx 7f/jump-if-greater $slice-starts-with?:false/disp8 - # var currs/esi : (address byte) = s->start + # var currs/esi : (addr byte) = s->start 8b/subtract 0/mod/indirect 6/rm32/esi . . . 6/r32/esi . . # copy *esi to esi - # var currh/edi : (address byte) = head->data + # var currh/edi : (addr byte) = head->data 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi # var i/ecx : int = 0 31/xor 3/mod/direct 1/rm32/ecx . . . 1/r32/ecx . . # clear ecx @@ -761,7 +761,7 @@ test-slice-starts-with-fails-2: # write a slice to a stream # abort if the stream doesn't have enough space -write-slice: # out : (address stream byte), s : (address slice) +write-slice: # out : (addr stream byte), s : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -774,9 +774,9 @@ write-slice: # out : (address stream byte), s : (address slice) 57/push-edi # esi = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - # var curr/ecx : (address byte) = s->start + # var curr/ecx : (addr byte) = s->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx - # var max/esi : (address byte) = s->end + # var max/esi : (addr byte) = s->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi # edi = out 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi @@ -877,7 +877,7 @@ test-write-slice: c3/return # write a slice to a buffered-file -write-slice-buffered: # out : (address buffered-file), s : (address slice) +write-slice-buffered: # out : (addr buffered-file), s : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -890,9 +890,9 @@ write-slice-buffered: # out : (address buffered-file), s : (address slice) 57/push-edi # esi = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - # var curr/ecx : (address byte) = s->start + # var curr/ecx : (addr byte) = s->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx - # var max/esi : (address byte) = s->end + # var max/esi : (addr byte) = s->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi # edi = out 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi @@ -1012,7 +1012,7 @@ test-write-slice-buffered: c3/return # copy a slice into a new (dynamically allocated) string -slice-to-string: # ad : (address allocation-descriptor), in : (address slice) -> out/eax : (address array byte) +slice-to-string: # ad : (addr allocation-descriptor), in : (addr slice) -> out/eax : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1023,9 +1023,9 @@ slice-to-string: # ad : (address allocation-descriptor), in : (address slice) - 56/push-esi # esi = in 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - # var curr/edx : (address byte) = in->start + # var curr/edx : (addr byte) = in->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx - # var max/ebx : (address byte) = in->end + # var max/ebx : (addr byte) = in->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 3/r32/ebx 4/disp8 . # copy *(esi+4) to ebx # var size/ecx : int = max - curr + 4 # total size of output string (including the initial length) 89/copy 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # copy ebx to ecx diff --git a/073next-token.subx b/073next-token.subx index 567f0cce..b108d9f0 100644 --- a/073next-token.subx +++ b/073next-token.subx @@ -7,7 +7,7 @@ # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval -next-token: # in : (address stream byte), delimiter : byte, out : (address slice) +next-token: # in : (addr stream byte), delimiter : byte, out : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -160,7 +160,7 @@ test-next-token-Eof: # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval -next-token-from-slice: # start : (address byte), end : (address byte), delimiter : byte, out : (address slice) +next-token-from-slice: # start : (addr byte), end : (addr byte), delimiter : byte, out : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -338,7 +338,7 @@ test-next-token-from-slice-nothing: 5d/pop-to-ebp c3/return -skip-chars-matching: # in : (address stream byte), delimiter : byte +skip-chars-matching: # in : (addr stream byte), delimiter : byte # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -461,7 +461,7 @@ test-skip-chars-matching-none: # end c3/return -skip-chars-matching-whitespace: # in : (address stream byte) +skip-chars-matching-whitespace: # in : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -551,7 +551,7 @@ test-skip-chars-matching-whitespace: c3/return # minor fork of 'skip-chars-matching' -skip-chars-not-matching: # in : (address stream byte), delimiter : byte +skip-chars-not-matching: # in : (addr stream byte), delimiter : byte # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -713,7 +713,7 @@ test-skip-chars-not-matching-all: # end c3/return -skip-chars-not-matching-whitespace: # in : (address stream byte) +skip-chars-not-matching-whitespace: # in : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -801,7 +801,7 @@ test-skip-chars-not-matching-whitespace: # end c3/return -skip-chars-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax +skip-chars-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -897,7 +897,7 @@ test-skip-chars-matching-in-slice-none: # end c3/return -skip-chars-matching-whitespace-in-slice: # curr : (address byte), end : (address byte) -> curr/eax +skip-chars-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -970,7 +970,7 @@ test-skip-chars-matching-whitespace-in-slice: c3/return # minor fork of 'skip-chars-matching-in-slice' -skip-chars-not-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax +skip-chars-not-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1095,7 +1095,7 @@ test-skip-chars-not-matching-in-slice-all: # end c3/return -skip-chars-not-matching-whitespace-in-slice: # curr : (address byte), end : (address byte) -> curr/eax +skip-chars-not-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1168,7 +1168,7 @@ test-skip-chars-not-matching-whitespace-in-slice: # update line->read to end of string literal surrounded by double quotes # line->read must start out at a double-quote -skip-string: # line : (address stream byte) +skip-string: # line : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1410,7 +1410,7 @@ test-skip-string-works-from-mid-stream: 5d/pop-to-ebp c3/return -skip-string-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax +skip-string-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1596,7 +1596,7 @@ test-skip-string-in-slice-stops-at-end: # update line->read to ')' # line->read ends at ')' -skip-until-close-paren: # line : (address stream byte) +skip-until-close-paren: # line : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1783,7 +1783,7 @@ test-skip-until-close-paren-works-from-mid-stream: 5d/pop-to-ebp c3/return -skip-until-close-paren-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax : (address byte) +skip-until-close-paren-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax : (addr byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/074write-stream-data.subx b/074write-stream-data.subx index 074e9d29..a7ad60f4 100644 --- a/074write-stream-data.subx +++ b/074write-stream-data.subx @@ -8,7 +8,7 @@ # - construct a 'maximal slice' and pass it to write-slice-buffered # - flush the buffered-file and pass the stream directly to its fd (disabling buffering) # we'll go with the first way for now -write-stream-data: # f : (address buffered-file), s : (address stream byte) +write-stream-data: # f : (addr buffered-file), s : (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/075print-int-decimal.subx b/075print-int-decimal.subx index 6eba81a1..95e9e23b 100644 --- a/075print-int-decimal.subx +++ b/075print-int-decimal.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -print-int32-decimal: # out : (address stream byte), n : int32 +print-int32-decimal: # out : (addr stream byte), n : int32 # works by generating characters from lowest to highest and pushing them # to the stack, before popping them one by one into the stream # @@ -76,9 +76,9 @@ $print-int32-decimal:write: 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi # var w/edx : int = out->write 8b/copy 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # copy *edi to edx - # var curr/ecx : (address byte) = &out->data[out->write] + # var curr/ecx : (addr byte) = &out->data[out->write] 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx . 1/r32/ecx 0xc/disp8 . # copy ebx+edx+12 to ecx - # var max/ebx : (address byte) = &out->data[out->length] + # var max/ebx : (addr byte) = &out->data[out->length] 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 8/disp8 . # copy *(edi+8) to ebx 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 3/index/ebx . 3/r32/ebx 0xc/disp8 . # copy edi+ebx+12 to ebx $print-int32-decimal:write-loop: diff --git a/076next-word.subx b/076next-word.subx index 34dd9c4d..7d8bbd8b 100644 --- a/076next-word.subx +++ b/076next-word.subx @@ -7,7 +7,7 @@ # (re)compute the bounds of the next word in the line # return empty string on reaching end of file -next-word: # line : (address stream byte), out : (address slice) +next-word: # line : (addr stream byte), out : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/077subx-words.subx b/077subx-words.subx index a166217a..3b523cb6 100644 --- a/077subx-words.subx +++ b/077subx-words.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -has-metadata?: # word : (address slice), s : (address string) -> eax : boolean +has-metadata?: # word : (addr slice), s : (addr string) -> eax : boolean # pseudocode: # var twig : &slice = next-token-from-slice(word->start, word->end, '/') # skip name # curr = twig->end @@ -25,7 +25,7 @@ has-metadata?: # word : (address slice), s : (address string) -> eax : boolean 57/push-edi # esi = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var edx : (address byte) = word->end + # var edx : (addr byte) = word->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 . # copy *(esi+4) to edx # var twig/edi : (ref slice) 68/push 0/imm32/end @@ -275,7 +275,7 @@ test-has-metadata-multiple-false: #: - if it starts with '0x' it's treated as a number. (redundant) #: - if it's two characters long, it can't be a name. Either it's a hex #: byte, or it raises an error. -is-valid-name?: # in : (address slice) -> eax : boolean +is-valid-name?: # in : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -284,7 +284,7 @@ is-valid-name?: # in : (address slice) -> eax : boolean 56/push-esi # esi = in 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var start/ecx : (address byte) = in->start + # var start/ecx : (addr byte) = in->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx $is-valid-name?:check0: # if (start >= in->end) return false @@ -298,7 +298,7 @@ $is-valid-name?:check1: 3d/compare-eax-and 2/imm32 74/jump-if-equal $is-valid-name?:false/disp8 $is-valid-name?:check2: - # var c/eax : (address byte) = *start + # var c/eax : (addr byte) = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL # if (c == "-") return false @@ -532,7 +532,7 @@ test-is-valid-name-starts-with-digit: 5d/pop-to-ebp c3/return -is-label?: # word : (address slice) -> eax : boolean +is-label?: # word : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -540,7 +540,7 @@ is-label?: # word : (address slice) -> eax : boolean 51/push-ecx # ecx = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx - # var end/ecx : (address byte) = word->end + # var end/ecx : (addr byte) = word->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 1/r32/ecx 4/disp8 . # copy *(ecx+4) to ecx # return *(end - 1) == ':' # . eax = *(end-1) diff --git a/078emit-hex.subx b/078emit-hex.subx index caea7800..bc052642 100644 --- a/078emit-hex.subx +++ b/078emit-hex.subx @@ -4,7 +4,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # print 'n' in hex in 'width' bytes in lower-endian order, with a space after every byte -emit-hex: # out : (address buffered-file), n : int, width : int +emit-hex: # out : (addr buffered-file), n : int, width : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/079emit.subx b/079emit.subx index 0db46bdf..1f2a5b45 100644 --- a/079emit.subx +++ b/079emit.subx @@ -7,7 +7,7 @@ # it in 'width' bytes of hex, least significant first. # Otherwise just print the entire word including metadata. # Always print a trailing space. -emit: # out : (address buffered-file), word : (address slice), width : int +emit: # out : (addr buffered-file), word : (addr slice), width : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/080zero-out.subx b/080zero-out.subx index 19e8128f..b1f9c9dc 100644 --- a/080zero-out.subx +++ b/080zero-out.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -zero-out: # start : (address byte), len : int +zero-out: # start : (addr byte), len : int # pseudocode: # curr/esi = start # i/ecx = 0 diff --git a/081table.subx b/081table.subx index 46329ca0..859147ea 100644 --- a/081table.subx +++ b/081table.subx @@ -1,6 +1,6 @@ # A table is a stream of (key, value) rows. # -# Each row consists of a 4-byte key -- a 'string_key' which is (address array +# Each row consists of a 4-byte key -- a 'string_key' which is (addr array # byte) -- and a variable-size value. # # Accessing the table performs a linear scan for a key string, and always @@ -23,8 +23,8 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # if no row is found, abort -# type string_key = (address array byte) -get: # table : (address stream {string_key, T}), key : string_key, row-size : int, abort-message-prefix : (address array byte) -> eax : (address T) +# type string_key = (addr array byte) +get: # table : (addr stream {string_key, T}), key : string_key, row-size : int, abort-message-prefix : (addr array byte) -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -43,9 +43,9 @@ get: # table : (address stream {string_key, T}), key : string_key, row-size : i 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $get:search-loop: @@ -198,7 +198,7 @@ $test-get:end: c3/return # if no row is found, abort -get-slice: # table : (address stream {string_key, T}), key : (address slice), row-size : int, abort-message-prefix : (address array byte) -> eax : (address T) +get-slice: # table : (addr stream {string_key, T}), key : (addr slice), row-size : int, abort-message-prefix : (addr array byte) -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -217,9 +217,9 @@ get-slice: # table : (address stream {string_key, T}), key : (address slice), r 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $get-slice:search-loop: @@ -401,7 +401,7 @@ $test-get-slice:end: # return the address of the value # Beware: assume keys are immutable; they're inserted by reference # TODO: pass in an allocation descriptor -get-or-insert: # table : (address stream {string_key, T}), key : string_key, row-size : int -> eax : (address T) +get-or-insert: # table : (addr stream {string_key, T}), key : string_key, row-size : int -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -425,9 +425,9 @@ get-or-insert: # table : (address stream {string_key, T}), key : string_key, ro 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address string_key) = &table->data[table->write] + # var max/edx : (addr string_key) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $get-or-insert:search-loop: @@ -652,7 +652,7 @@ $test-get-or-insert:end: # if there are no rows free, abort # WARNING: leaks memory # TODO: pass in an allocation descriptor -leaky-get-or-insert-slice: # table : (address stream {string_key, T}), key : (address slice), row-size : int -> eax : (address T) +leaky-get-or-insert-slice: # table : (addr stream {string_key, T}), key : (addr slice), row-size : int -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -676,9 +676,9 @@ leaky-get-or-insert-slice: # table : (address stream {string_key, T}), key : (a 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address string_key) = &table->data[table->write] + # var max/edx : (addr string_key) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $leaky-get-or-insert-slice:search-loop: @@ -924,9 +924,9 @@ $test-leaky-get-or-insert-slice:end: c3/return # if no row is found, stop(ed) -get-or-stop: # table : (address stream {string_key, T}), key : string_key, row-size : int, - # abort-message-prefix : (address array byte), err : (address buffered-file), ed : (address exit-descriptor) - # -> eax : (address T) +get-or-stop: # table : (addr stream {string_key, T}), key : string_key, row-size : int, + # abort-message-prefix : (addr array byte), err : (addr buffered-file), ed : (addr exit-descriptor) + # -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -946,9 +946,9 @@ get-or-stop: # table : (address stream {string_key, T}), key : string_key, row- 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $get-or-stop:search-loop: @@ -1140,9 +1140,9 @@ $test-get-or-stop:end: c3/return # if no row is found, stop(ed) -get-slice-or-stop: # table : (address stream {string_key, _}), key : (address slice), row-size : int, - # abort-message-prefix : (address string), err : (address buffered-file), ed : (address exit-descriptor) - # -> eax : (address _) +get-slice-or-stop: # table : (addr stream {string_key, _}), key : (addr slice), row-size : int, + # abort-message-prefix : (addr string), err : (addr buffered-file), ed : (addr exit-descriptor) + # -> eax : (addr _) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1162,9 +1162,9 @@ get-slice-or-stop: # table : (address stream {string_key, _}), key : (address s 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $get-slice-or-stop:search-loop: @@ -1379,7 +1379,7 @@ $test-get-slice-or-stop:end: c3/return # if no row is found, return null (0) -maybe-get: # table : (address stream {string_key, T}), key : string_key, row-size : int -> eax : (address T) +maybe-get: # table : (addr stream {string_key, T}), key : string_key, row-size : int -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1398,9 +1398,9 @@ maybe-get: # table : (address stream {string_key, T}), key : string_key, row-si 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $maybe-get:search-loop: @@ -1526,7 +1526,7 @@ $test-maybe-get:end: c3/return # if no row is found, return null (0) -maybe-get-slice: # table : (address stream {string_key, T}), key : (address slice), row-size : int -> eax : (address T) +maybe-get-slice: # table : (addr stream {string_key, T}), key : (addr slice), row-size : int -> eax : (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1545,9 +1545,9 @@ maybe-get-slice: # table : (address stream {string_key, T}), key : (address sli 56/push-esi # esi = table 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var curr/ecx : (address string_key) = table->data + # var curr/ecx : (addr string_key) = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 . # copy esi+12 to ecx - # var max/edx : (address byte) = &table->data[table->write] + # var max/edx : (addr byte) = &table->data[table->write] 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . . # copy ecx+edx to edx $maybe-get-slice:search-loop: diff --git a/082slurp.subx b/082slurp.subx index 51fba1e2..11769bc9 100644 --- a/082slurp.subx +++ b/082slurp.subx @@ -5,7 +5,7 @@ # read all bytes from 'f' and store them into 's' # abort if 's' is too small -slurp: # f : (address buffered-file), s : (address stream byte) +slurp: # f : (addr buffered-file), s : (addr stream byte) # pseudocode: # while true # if (s->write >= s->length) abort diff --git a/083subx-widths.subx b/083subx-widths.subx index db5b84ba..524dd465 100644 --- a/083subx-widths.subx +++ b/083subx-widths.subx @@ -8,7 +8,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -compute-width: # word : (address array byte) -> eax : int +compute-width: # word : (addr array byte) -> eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -16,7 +16,7 @@ compute-width: # word : (address array byte) -> eax : int 51/push-ecx # eax = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to ecx - # var ecx : (address byte) = &word[word->length] + # var ecx : (addr byte) = &word[word->length] 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx # eax = word->data @@ -42,7 +42,7 @@ $compute-width:end: 5d/pop-to-ebp c3/return -compute-width-of-slice: # s : (address slice) -> eax : int +compute-width-of-slice: # s : (addr slice) -> eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/084emit-hex-array.subx b/084emit-hex-array.subx index 29f685f9..c554df2a 100644 --- a/084emit-hex-array.subx +++ b/084emit-hex-array.subx @@ -4,7 +4,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # print 'arr' in hex with a space after every byte -emit-hex-array: # out : (address buffered-file), arr : (address array byte) +emit-hex-array: # out : (addr buffered-file), arr : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -17,9 +17,9 @@ emit-hex-array: # out : (address buffered-file), arr : (address array byte) 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi # edx = arr 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx - # var curr/ecx : (address byte) = arr->data + # var curr/ecx : (addr byte) = arr->data 8d/copy-address 1/mod/*+disp8 2/rm32/edx . . . 1/r32/ecx 4/disp8 . # copy edx+4 to ecx - # var max/edx : (address byte) = &arr->data[arr->length] + # var max/edx : (addr byte) = &arr->data[arr->length] 8b/copy 0/mod/indirect 2/rm32/edx . . . 2/r32/edx . . # copy *edx to edx 01/add 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # add ecx to edx # var c/eax : byte = 0 diff --git a/092write-int.subx b/092write-int.subx index 5fe1c4d3..736fc684 100644 --- a/092write-int.subx +++ b/092write-int.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -write-int: # out : (address stream byte), n : int +write-int: # out : (addr stream byte), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/093array-equal.subx b/093array-equal.subx index f10a9463..eba1fe8a 100644 --- a/093array-equal.subx +++ b/093array-equal.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -array-equal?: # a : (address array int), b : (address array int) -> eax : boolean +array-equal?: # a : (addr array int), b : (addr array int) -> eax : boolean # pseudocode: # lena = a->length # if (lena != b->length) return false @@ -46,9 +46,9 @@ $array-equal?:lengths: # if (lena != b->length) return false 39/compare 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # compare *edi and edx 75/jump-if-not-equal $array-equal?:false/disp8 - # var curra/esi : (address byte) = a->data + # var curra/esi : (addr byte) = a->data 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi - # var currb/edi : (address byte) = b->data + # var currb/edi : (addr byte) = b->data 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi # var i/ecx : int = 0 31/xor 3/mod/direct 1/rm32/ecx . . . 1/r32/ecx . . # clear ecx @@ -230,7 +230,7 @@ test-compare-inequal-arrays-equal-lengths: 5d/pop-to-ebp c3/return -parse-array-of-ints: # ad : (address allocation-descriptor), s : (address string) -> result/eax : (handle array int) +parse-array-of-ints: # ad : (addr allocation-descriptor), s : (addr string) -> result/eax : (handle array int) # pseudocode # end = &s->data[s->length] # curr = s->data @@ -266,9 +266,9 @@ parse-array-of-ints: # ad : (address allocation-descriptor), s : (address strin 57/push-edi # esi = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - # var curr/ecx : (address byte) = s->data + # var curr/ecx : (addr byte) = s->data 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # copy esi+4 to ecx - # var end/edx : (address byte) = &s->data[s->length] + # var end/edx : (addr byte) = &s->data[s->length] # . edx = s->length 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx # . edx += curr @@ -334,7 +334,7 @@ $parse-array-of-ints:pass2: 51/push-ecx # . bookmark 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx - # var out/ebx : (address byte) = result->data + # var out/ebx : (addr byte) = result->data 8d/copy-address 1/mod/*+disp8 0/rm32/eax . . . 3/r32/ebx 4/disp8 . # copy eax+4 to ebx $parse-array-of-ints:loop2: # if (slice->start >= end) break @@ -536,7 +536,7 @@ test-parse-array-of-ints-extra-whitespace: # helper for later tests # compare an array with a string representation of an array literal -check-array-equal: # a : (address array int), expected : (address string), msg : (address string) +check-array-equal: # a : (addr array int), expected : (addr string), msg : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/094next-word-or-string.subx b/094next-word-or-string.subx index d3734fc9..5ffcd418 100644 --- a/094next-word-or-string.subx +++ b/094next-word-or-string.subx @@ -5,7 +5,7 @@ # (re)compute the bounds of the next word or string literal in the line # return empty string on reaching end of file -next-word-or-string: # line : (address stream byte), out : (address slice) +next-word-or-string: # line : (addr stream byte), out : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/095stack.subx b/095stack.subx index 692dece2..fdc4fa95 100644 --- a/095stack.subx +++ b/095stack.subx @@ -7,7 +7,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -clear-stack: # s : (address stack) +clear-stack: # s : (addr stack) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -16,12 +16,12 @@ clear-stack: # s : (address stack) 51/push-ecx # eax = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax - # var max/ecx : (address byte) = &s->data[s->length] + # var max/ecx : (addr byte) = &s->data[s->length] 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 1/r32/ecx 4/disp8 . # copy *(eax+4) to eax 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 8/disp8 . # copy eax+ecx+8 to ecx # s->top = 0 c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0/imm32 # copy to *eax - # var curr/eax : (address byte) = s->data + # var curr/eax : (addr byte) = s->data 81 0/subop/add 3/mod/direct 0/rm32/eax . . . . . 8/imm32 # add to eax $clear-stack:loop: # if (curr >= max) break @@ -107,7 +107,7 @@ test-clear-stack: 5d/pop-to-ebp c3/return -push: # s : (address stack), n : int +push: # s : (addr stack), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -227,7 +227,7 @@ test-push: 5d/pop-to-ebp c3/return -pop: # s : (address stack) -> n/eax : int +pop: # s : (addr stack) -> n/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -331,7 +331,7 @@ test-pop: 5d/pop-to-ebp c3/return -top: # s : (address stack) -> n/eax : int +top: # s : (addr stack) -> n/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/assort.subx b/apps/assort.subx index 0aa18555..87a940cb 100644 --- a/apps/assort.subx +++ b/apps/assort.subx @@ -83,12 +83,12 @@ $subx-assort-main:end: cd/syscall 0x80/imm8 # data structure: -# table: (address stream {string, (address stream byte)}) (8 bytes per row) +# table: (addr stream {string, (addr stream byte)}) (8 bytes per row) # inefficient; uses sequential search for looking up segments by name -subx-assort: # in : (address buffered-file), out : (address buffered-file) +subx-assort: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: - # var table : (address stream {string, (address stream byte)} 10/rows) + # var table : (addr stream {string, (addr stream byte)} 10/rows) # read-segments(in, table) # write-segments(out, table) # @@ -97,7 +97,7 @@ subx-assort: # in : (address buffered-file), out : (address buffered-file) 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers 51/push-ecx - # var table/ecx : (ref stream {string, (address stream byte)} 80) # 10 rows * 8 bytes/row + # var table/ecx : (ref stream {string, (addr stream byte)} 80) # 10 rows * 8 bytes/row 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x50/imm32 # subtract from esp 68/push 0x50/imm32/length 68/push 0/imm32/read @@ -450,10 +450,10 @@ test-subx-assort: 5d/pop-to-ebp c3/return -# type string_key = (address array byte) +# type string_key = (addr array byte) # beware: leaks memory (one name per segment read) -read-segments: # in : (address buffered-file), table : (address stream {string_key, (handle stream byte)}) +read-segments: # in : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)}) # pseudocode: # var curr-segment : (handle stream byte) = 0 # var line : (stream byte 512) @@ -599,7 +599,7 @@ $read-segments:check-for-comment: #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # }}} # if (slice-starts-with?(word-slice, "#")) continue - # . var start/esi : (address byte) = word-slice->start + # . var start/esi : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 2/rm32/edx . . . 6/r32/esi . . # copy *ecx to esi # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -717,7 +717,7 @@ $read-segments:check-for-segment-header: #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # }}} - # var segment-slot/eax : (address handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8) + # var segment-slot/eax : (addr handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8) # . . push args 68/push 8/imm32/row-size 52/push-edx @@ -843,7 +843,7 @@ $read-segments:end: 5d/pop-to-ebp c3/return -write-segments: # out : (address buffered-file), table : (address stream {string_key, (handle stream byte)}) +write-segments: # out : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)}) # pseudocode: # var curr = table->data # var max = &table->data[table->write] @@ -864,15 +864,15 @@ write-segments: # out : (address buffered-file), table : (address stream {strin 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi # var write/edx : int = table->write 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx - # var curr/esi : (address byte) = table->data + # var curr/esi : (addr byte) = table->data 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 0xc/imm32 # add to eax - # var max/edx : (address byte) = curr + write + # var max/edx : (addr byte) = curr + write 01/add 3/mod/direct 2/rm32/edx . . . 6/r32/esi . . # add esi to edx $write-segments:loop: # if (curr >= max) break 39/compare 3/mod/direct 6/rm32/esi . . . 2/r32/edx . . # compare esi with edx 73/jump-if-greater-or-equal-unsigned $write-segments:break/disp8 - # var stream/eax : (address stream byte) = table[i].stream + # var stream/eax : (addr stream byte) = table[i].stream 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax # write-stream-data(out, stream) # . . push args diff --git a/apps/braces.subx b/apps/braces.subx index 95b6a7ea..44e931a7 100644 --- a/apps/braces.subx +++ b/apps/braces.subx @@ -75,7 +75,7 @@ $subx-braces-main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -subx-braces: # in : (address buffered-file), out : (address buffered-file) +subx-braces: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: # var line : (ref stream byte 512) # var label-stack : (stack int 32) # at most 32 levels of nesting @@ -95,7 +95,7 @@ subx-braces: # in : (address buffered-file), out : (address buffered-file) # print(out, "_break" top ":\n") # continue # while true - # var word-slice : (address slice) = next-word-or-string(line) + # var word-slice : (addr slice) = next-word-or-string(line) # if slice-empty?(word-slice) # end of line # break # if slice-starts-with?(word-slice, "#") # comment diff --git a/apps/calls.subx b/apps/calls.subx index 0e4d113e..a4615297 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -75,7 +75,7 @@ $subx-calls-main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -subx-calls: # in : (address buffered-file), out : (address buffered-file) +subx-calls: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: # var line : (ref stream byte 512) # var words : (ref stream slice 16) # at most function name and 15 args @@ -231,7 +231,7 @@ $subx-calls:end: 5d/pop-to-ebp c3/return -parse-line: # line : (address stream byte), words : (address stream slice) +parse-line: # line : (addr stream byte), words : (addr stream slice) # pseudocode: # var word-slice : (ref slice) # while true @@ -340,7 +340,7 @@ $parse-line:end: 5d/pop-to-ebp c3/return -emit-call: # out : (address buffered-file), words : (address stream slice) +emit-call: # out : (addr buffered-file), words : (addr stream slice) # pseudocode: # if (words->write < 8) abort # curr = &words->data[words->write-8] @@ -381,9 +381,9 @@ emit-call: # out : (address buffered-file), words : (address stream slice) 8b/-> *esi 1/r32/ecx 81 5/subop/subtract %ecx 8/imm32 0f 8c/jump-if-lesser $emit-call:error1/disp32 - # var curr/ecx : (address slice) = &words->data[words->write-8] + # var curr/ecx : (addr slice) = &words->data[words->write-8] 8d/copy-address *(esi+ecx+0xc) 1/r32/ecx - # var min/edx : (address byte) = words->data + # var min/edx : (addr byte) = words->data 8d/copy-address *(esi+0xc) 2/r32/edx # - emit pushes $emit-call:push-loop: @@ -391,7 +391,7 @@ $emit-call:push-loop: 39/compare %ecx 2/r32/edx 0f 8e/jump-if-lesser-or-equal $emit-call:call-instruction/disp32 # if (*curr->start in '%' '*') goto push-rm32 - # . var start/eax : (address byte) = curr->start + # . var start/eax : (addr byte) = curr->start 8b/-> *ecx 0/r32/eax # . var c/eax : byte = *eax 8b/-> *eax 0/r32/eax @@ -741,7 +741,7 @@ test-subx-calls-processes-calls: 5d/pop-to-ebp c3/return -next-word-string-or-expression-without-metadata: # line : (address stream byte), out : (address slice) +next-word-string-or-expression-without-metadata: # line : (addr stream byte), out : (addr slice) # pseudocode: # skip-chars-matching(line, ' ') # if line->read >= line->write # end of line diff --git a/apps/crenshaw2-1.subx b/apps/crenshaw2-1.subx index 228f4696..c1dd79a7 100644 --- a/apps/crenshaw2-1.subx +++ b/apps/crenshaw2-1.subx @@ -90,7 +90,7 @@ $main:end: cd/syscall 0x80/imm8 # the main entry point -compile: # in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor) +compile: # in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -191,7 +191,7 @@ $compile:end: # space in 'out'. # Input comes from the global variable 'Look' (first byte) and the argument # 'in' (rest). We leave the next byte from 'in' into 'Look' on exit. -get-num: # in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor) +get-num: # in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor) # pseudocode: # if (!is-digit?(Look)) expected(ed, err, "integer") # if out->write >= out->length @@ -470,7 +470,7 @@ test-get-num-aborts-on-non-digit-in-Look: ## helpers # write(f, "Error: "+s+" expected\n") then stop(ed, 1) -expected: # ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte) +expected: # ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -512,7 +512,7 @@ $expected:dead-end: c3/return # read a byte from 'f', and save it in 'Look' -get-char: # f : (address buffered-file) +get-char: # f : (addr buffered-file) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/crenshaw2-1b.subx b/apps/crenshaw2-1b.subx index 374625e9..8efd9ca4 100644 --- a/apps/crenshaw2-1b.subx +++ b/apps/crenshaw2-1b.subx @@ -90,7 +90,7 @@ $main:end: cd/syscall 0x80/imm8 # the main entry point -compile: # in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor) +compile: # in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -191,7 +191,7 @@ $compile:end: # no space in 'out'. # Input comes from the global variable 'Look' (first byte) and the argument # 'in' (rest). We leave the next byte from 'in' into 'Look' on exit. -get-num: # in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor) +get-num: # in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor) # pseudocode: # if (!is-digit?(Look)) expected(ed, err, "integer") # do @@ -664,7 +664,7 @@ test-get-num-reads-multiple-digits-followed-by-nondigit: ## helpers # write(f, "Error: "+s+" expected\n") then stop(ed, 1) -expected: # ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte) +expected: # ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -706,7 +706,7 @@ $expected:dead-end: c3/return # read a byte from 'f', and save it in 'Look' -get-char: # f : (address buffered-file) +get-char: # f : (addr buffered-file) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/dquotes.subx b/apps/dquotes.subx index 4b985fbb..3f3fa452 100644 --- a/apps/dquotes.subx +++ b/apps/dquotes.subx @@ -82,7 +82,7 @@ $subx-dquotes-main:end: # line = words separated by ' ', maybe followed by comment starting with '#' # word = datum until '/', then 0 or more metadata separated by '/' -subx-dquotes: # in : (address buffered-file), out : (address buffered-file) +subx-dquotes: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: # var line : (ref stream byte 512) # var new-data-segment : (handle stream byte) = new-stream(Heap, Segment-size, 1) @@ -198,7 +198,7 @@ $subx-dquotes:check1: 0f 85/jump-if-not-equal $subx-dquotes:next-line/disp32 $subx-dquotes:check-for-comment: # if (slice-starts-with?(word-slice, "#")) continue - # . var start/esi : (address byte) = word-slice->start + # . var start/esi : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 2/rm32/edx . . . 6/r32/esi . . # copy *edx to esi # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -287,7 +287,7 @@ $subx-dquotes:end: # Write out 'string-literal' in a new format to 'out-segment', assign it a new # label, and write the new label out to 'out'. -process-string-literal: # string-literal : (address slice), out : (address buffered-file), out-segment : (address stream byte) +process-string-literal: # string-literal : (addr slice), out : (addr buffered-file), out-segment : (addr stream byte) # pseudocode: # print(out-segment, "_string#{Next-string-literal}:\n") # emit-string-literal-data(out-segment, string-literal) @@ -846,7 +846,7 @@ test-subx-dquotes-processes-string-literals: c3/return # generate the data segment contents byte by byte for a given slice -emit-string-literal-data: # out : (address stream byte), word : (address slice) +emit-string-literal-data: # out : (addr stream byte), word : (addr slice) # pseudocode # len = string-length-at-start-of-slice(word->start, word->end) # print(out, "#{len}/imm32 ") @@ -887,9 +887,9 @@ emit-string-literal-data: # out : (address stream byte), word : (address slice) 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi # var idx/ebx : int = 0 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx - # var curr/edx : (address byte) = word->start + # var curr/edx : (addr byte) = word->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx - # var max/esi : (address byte) = word->end + # var max/esi : (addr byte) = word->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi $emit-string-literal-data:emit-length: # var len/eax : int = string-length-at-start-of-slice(word->start, word->end) @@ -1379,7 +1379,7 @@ test-emit-string-literal-data-handles-newline-escape: c3/return # emit everything from a word except the initial datum -emit-metadata: # out : (address buffered-file), word : (address slice) +emit-metadata: # out : (addr buffered-file), word : (addr slice) # pseudocode # var slice : (ref slice) = {0, word->end} # curr = word->start @@ -1406,9 +1406,9 @@ emit-metadata: # out : (address buffered-file), word : (address slice) 56/push-esi # esi = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - # var curr/ecx : (address byte) = word->start + # var curr/ecx : (addr byte) = word->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx - # var end/edx : (address byte) = word->end + # var end/edx : (addr byte) = word->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 . # copy *(esi+4) to edx # var slice/ebx : (ref slice) = {0, end} 52/push-edx @@ -1778,7 +1778,7 @@ test-emit-metadata-in-string-literal: 5d/pop-to-ebp c3/return -string-length-at-start-of-slice: # curr : (address byte), end : (address byte) -> length/eax +string-length-at-start-of-slice: # curr : (addr byte), end : (addr byte) -> length/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/ex11.subx b/apps/ex11.subx index b235927d..2469542d 100644 --- a/apps/ex11.subx +++ b/apps/ex11.subx @@ -258,7 +258,7 @@ test-compare-kernel-string-with-longer-array: # - helpers # print msg to stderr if a != b, otherwise print "." -check-ints-equal: # (a : int, b : int, msg : (address array byte)) -> boolean +check-ints-equal: # (a : int, b : int, msg : (addr array byte)) -> boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -307,7 +307,7 @@ $check-ints-equal:end: 5d/pop-to-ebp c3/return -write-stderr: # s : (address array byte) -> +write-stderr: # s : (addr array byte) -> # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/ex8.subx b/apps/ex8.subx index 0e44a883..2ea653f1 100644 --- a/apps/ex8.subx +++ b/apps/ex8.subx @@ -34,7 +34,7 @@ Entry: 89/copy 3/mod/direct 3/rm32/ebx . . . 0/r32/eax . . # copy eax to ebx e8/call syscall_exit/disp32 -ascii-length: # s : (address array byte) -> n/eax +ascii-length: # s : (addr array byte) -> n/eax # edx = s 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 2/r32/edx 4/disp8 . # copy *(esp+4) to edx # var result/eax = 0 diff --git a/apps/handle.subx b/apps/handle.subx index 07611596..fba9db1c 100644 --- a/apps/handle.subx +++ b/apps/handle.subx @@ -44,7 +44,7 @@ $handle-main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -new: # ad : (address allocation-descriptor), n : int, out : (handle _) +new: # ad : (addr allocation-descriptor), n : int, out : (handle _) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -221,7 +221,7 @@ _pending-test-new-failure: 5d/pop-to-ebp c3/return -lookup: # h : (handle T) -> eax : (address T) +lookup: # h : (handle T) -> eax : (addr T) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/hex.subx b/apps/hex.subx index 09e394bd..d3af0105 100644 --- a/apps/hex.subx +++ b/apps/hex.subx @@ -77,7 +77,7 @@ $subx-hex-main:end: cd/syscall 0x80/imm8 # the main entry point -subx-hex: # in : (address buffered-file), out : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) +subx-hex: # in : (addr buffered-file), out : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) # pseudocode: # while true # eax = convert-next-octet(in, err, ed) @@ -135,7 +135,7 @@ $subx-hex:end: # raise an error and abort on all other unexpected bytes # return in eax an _octet_ containing the binary value of the two hex characters # return Eof on reaching end of file -convert-next-octet: # in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax +convert-next-octet: # in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax # pseudocode: # eax = scan-next-byte(in, err, ed) # if (eax == Eof) return @@ -481,7 +481,7 @@ $test-convert-next-octet-aborts-on-single-hex-byte:end: # return Eof if file ends without finding a hex byte # on '#' skip all bytes until newline # abort on any other byte -scan-next-byte: # in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax +scan-next-byte: # in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax # pseudocode: # while true # eax = read-byte-buffered(in) @@ -1350,7 +1350,7 @@ $test-scan-next-byte-aborts-on-invalid-byte:end: 5d/pop-to-ebp c3/return -skip-until-newline: # in : (address buffered-file) +skip-until-newline: # in : (addr buffered-file) # pseudocode: # push eax # while true diff --git a/apps/mu.subx b/apps/mu.subx index 7c056d46..534f247d 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -246,7 +246,7 @@ == data -Program: # (address (handle function)) +Program: # (addr (handle function)) 0/imm32 Function-name: @@ -378,7 +378,7 @@ $mu-main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -convert-mu: # in : (address buffered-file), out : (address buffered-file) +convert-mu: # in : (addr buffered-file), out : (addr buffered-file) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -952,9 +952,9 @@ test-convert-function-call-with-literal-arg: # Parsing ####################################################### -parse-mu: # in : (address buffered-file) +parse-mu: # in : (addr buffered-file) # pseudocode - # var curr-function : (address (handle function)) = Program + # var curr-function : (addr (handle function)) = Program # var line : (ref stream byte 512) # var word-slice : (ref slice) # while true # line loop @@ -968,7 +968,7 @@ parse-mu: # in : (address buffered-file) # continue # end of line # else if slice-equal(word-slice, "fn") # var new-function : (handle function) = allocate(function) - # var vars : (ref stack (address var) 256) + # var vars : (ref stack (addr var) 256) # populate-mu-function-header(in, new-function, vars) # populate-mu-function-body(in, new-function, vars) # assert(vars->top == 0) @@ -996,9 +996,9 @@ parse-mu: # in : (address buffered-file) 68/push 0/imm32/end 68/push 0/imm32/start 89/<- %edx 4/r32/esp - # var curr-function/edi : (address (handle function)) = Program + # var curr-function/edi : (addr (handle function)) = Program bf/copy-to-edi Program/imm32 - # var vars/ebx : (ref stack (address var) 256) + # var vars/ebx : (ref stack (addr var) 256) 81 5/subop/subtract %esp 0x400/imm32 68/push 0x400/imm32/length 68/push 0/imm32/top @@ -1100,7 +1100,7 @@ $parse-mu:error2: # ✓ fn foo x : int { # ✓ fn foo x: int { # ✓ fn foo x: int -> y/eax: int { -populate-mu-function-header: # first-line : (address stream byte), out : (handle function), vars : (address stack (handle var)) +populate-mu-function-header: # first-line : (addr stream byte), out : (handle function), vars : (addr stack (handle var)) # pseudocode: # var name : (ref slice) # next-word(first-line, name) @@ -1297,7 +1297,7 @@ test-function-header-with-arg: 2b/subtract-> *Function-size 4/r32/esp 89/<- %ecx 4/r32/esp (zero-out %ecx *Function-size) - # var vars/ebx : (ref stack (address var) 16) + # var vars/ebx : (ref stack (addr var) 16) 81 5/subop/subtract %esp 0x10/imm32 68/push 0x10/imm32/length 68/push 0/imm32/top @@ -1329,7 +1329,7 @@ test-function-header-with-multiple-args: 2b/subtract-> *Function-size 4/r32/esp 89/<- %ecx 4/r32/esp (zero-out %ecx *Function-size) - # var vars/ebx : (ref stack (address var) 16) + # var vars/ebx : (ref stack (addr var) 16) 81 5/subop/subtract %esp 0x10/imm32 68/push 0x10/imm32/length 68/push 0/imm32/top @@ -1376,7 +1376,7 @@ test-function-with-multiple-args-and-outputs: 2b/subtract-> *Function-size 4/r32/esp 89/<- %ecx 4/r32/esp (zero-out %ecx *Function-size) - # var vars/ebx : (ref stack (address var) 16) + # var vars/ebx : (ref stack (addr var) 16) 81 5/subop/subtract %esp 0x10/imm32 68/push 0x10/imm32/length 68/push 0/imm32/top @@ -1427,12 +1427,12 @@ test-function-with-multiple-args-and-outputs: # x: int # x: int, # ignores at most one trailing colon or comma -parse-var-with-type: # name: (address slice), first-line: (address stream byte) -> result/eax: (handle var) +parse-var-with-type: # name: (addr slice), first-line: (addr stream byte) -> result/eax: (handle var) # pseudocode: # var v : (handle var) = allocate(Heap, Var-size) # var s : (ref slice) # next-token-from-slice(name->start, name->end, '/', s) - # var end : (address byte) = s->end + # var end : (addr byte) = s->end # if (slice-ends-with(s, ":")) # decrement s->end # if (slice-ends-with(s, ",")) @@ -1603,7 +1603,7 @@ $parse-var-with-type:abort: cd/syscall 0x80/imm8 # never gets here -next-mu-token: # in: (address stream byte), out: (address slice) +next-mu-token: # in: (addr stream byte), out: (addr slice) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -1644,7 +1644,7 @@ $next-mu-token:end: 5d/pop-to-ebp c3/return -type-for: # name: (address slice) -> result/eax: (handle s-expression type-id) +type-for: # name: (addr slice) -> result/eax: (handle s-expression type-id) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -1778,7 +1778,7 @@ test-parse-var-with-register-and-trailing-characters: # identifier starts with a letter or '$' or '_' # no constraints at the moment on later letters # all we really want to do so far is exclude '{', '}' and '->' -is-identifier?: # in : (address slice) -> result/eax : boolean +is-identifier?: # in : (addr slice) -> result/eax : boolean # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2074,7 +2074,7 @@ test-is-identifier-hyphen: 5d/pop-to-ebp c3/return -populate-mu-function-body: # in : (address buffered-file), out : (handle function), vars : (address stack (handle var)) +populate-mu-function-body: # in : (addr buffered-file), out : (handle function), vars : (addr stack (handle var)) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2101,7 +2101,7 @@ $populate-mu-function-body:end: c3/return # parses a block, assuming that the leading '{' has already been read by the caller -parse-mu-block: # in : (address buffered-file), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle block) +parse-mu-block: # in : (addr buffered-file), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle block) # pseudocode: # var line : (ref stream byte 512) # var word-slice : (ref slice) @@ -2262,7 +2262,7 @@ $parse-mu-block:abort: cd/syscall 0x80/imm8 # never gets here -check-no-tokens-left: # line : (address stream byte) +check-no-tokens-left: # line : (addr stream byte) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2309,7 +2309,7 @@ $check-no-tokens-left:end: 5d/pop-to-ebp c3/return -parse-mu-named-block: # name : (address slice), first-line : (address stream byte), in : (address buffered-file), vars : (address stack (handle var)) -> result/eax : (handle stmt) +parse-mu-named-block: # name : (addr slice), first-line : (addr stream byte), in : (addr buffered-file), vars : (addr stack (handle var)) -> result/eax : (handle stmt) # pseudocode: # var line : (ref stream byte 512) # var word-slice : (ref slice) @@ -2353,7 +2353,7 @@ $parse-mu-named-block:end: 5d/pop-to-ebp c3/return -parse-mu-var-def: # line : (address stream byte), vars : (address stack (handle var)) -> result/eax : (handle stmt) +parse-mu-var-def: # line : (addr stream byte), vars : (addr stack (handle var)) -> result/eax : (handle stmt) # pseudocode: # # . prologue @@ -2368,7 +2368,7 @@ $parse-mu-var-def:end: 5d/pop-to-ebp c3/return -parse-mu-stmt: # line : (address stream byte), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle stmt) +parse-mu-stmt: # line : (addr stream byte), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle stmt) # pseudocode: # var name : (ref slice) # result = allocate(Heap, Stmt-size) @@ -2488,7 +2488,7 @@ $parse-mu-stmt:abort2: cd/syscall 0x80/imm8 # never gets here -stmt-has-outputs?: # line : (address stream byte) -> result/eax : boolean +stmt-has-outputs?: # line : (addr stream byte) -> result/eax : boolean # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2536,7 +2536,7 @@ $stmt-has-outputs:end: # if 'name' starts with a digit, create a new literal var for it # otherwise return first 'name' from the top (back) of 'vars' and abort if not found -lookup-var-or-literal: # name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var) +lookup-var-or-literal: # name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2584,7 +2584,7 @@ $lookup-var-or-literal:abort: # never gets here # return first 'name' from the top (back) of 'vars' and abort if not found -lookup-var: # name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var) +lookup-var: # name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2613,9 +2613,9 @@ $lookup-var:abort: # never gets here # return first 'name' from the top (back) of 'vars', and 0/null if not found -lookup-var-helper: # name: (address array byte), vars : (address stack (handle var)) -> result/eax: (handle var) +lookup-var-helper: # name: (addr array byte), vars : (addr stack (handle var)) -> result/eax: (handle var) # pseudocode: - # var curr : (address handle var) = &vars->data[vars->top - 4] + # var curr : (addr handle var) = &vars->data[vars->top - 4] # var min = vars->data # while curr >= min # var v : (handle var) = *curr @@ -2637,9 +2637,9 @@ lookup-var-helper: # name: (address array byte), vars : (address stack (handle # if (vars->top > vars->length) abort 3b/compare 0/r32/eax *(esi+4) 0f 8f/jump-if-greater $lookup-var-helper:error1/disp32 - # var min/edx : (address handle var) = vars->data + # var min/edx : (addr handle var) = vars->data 8d/copy-address *(esi+8) 2/r32/edx - # var curr/ebx : (address handle var) = &vars->data[vars->top - 4] + # var curr/ebx : (addr handle var) = &vars->data[vars->top - 4] 81 5/subop/subtract %ebx 4/imm32 8d/copy-address *(esi+ebx+8) 3/r32/ebx { @@ -2680,7 +2680,7 @@ $lookup-var-helper:error1: # never gets here # return first 'name' from the top (back) of 'vars' and create a new var for a fn output if not found -lookup-or-define-var: # name: (address slice), vars : (address stack (handle var)), fn : (handle function) -> result/eax: (handle var) +lookup-or-define-var: # name: (addr slice), vars : (addr stack (handle var)), fn : (handle function) -> result/eax: (handle var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2753,7 +2753,7 @@ test-parse-mu-stmt: # setup (clear-stream _test-input-stream) (write _test-input-stream "increment n\n") - # var vars/ecx : (ref stack (address var) 4) + # var vars/ecx : (ref stack (addr var) 4) 81 5/subop/subtract %esp 0x10/imm32 68/push 0x10/imm32/length 68/push 0/imm32/top @@ -2781,7 +2781,7 @@ test-parse-mu-stmt: 5d/pop-to-ebp c3/return -new-function: # ad: (address allocation-descriptor), name: (address array byte), subx-name: (address array byte), inouts: (handle list var), outputs: (handle list var), body: (handle block), next: (handle function) -> result/eax: (handle function) +new-function: # ad: (addr allocation-descriptor), name: (addr array byte), subx-name: (addr array byte), inouts: (handle list var), outputs: (handle list var), body: (handle block), next: (handle function) -> result/eax: (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2809,7 +2809,7 @@ $new-function:end: 5d/pop-to-ebp c3/return -new-var: # ad: (address allocation-descriptor), name: (address array byte), type: int, block: int, stack-offset: int, register: (address array byte) -> result/eax: (handle var) +new-var: # ad: (addr allocation-descriptor), name: (addr array byte), type: int, block: int, stack-offset: int, register: (addr array byte) -> result/eax: (handle var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2835,7 +2835,7 @@ $new-var:end: 5d/pop-to-ebp c3/return -new-literal-integer: # ad: (address allocation-descriptor), name: (address slice) -> result/eax: (handle var) +new-literal-integer: # ad: (addr allocation-descriptor), name: (addr slice) -> result/eax: (handle var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2845,7 +2845,7 @@ new-literal-integer: # ad: (address allocation-descriptor), name: (address slic (is-hex-int? *(ebp+0xc)) # => eax 3d/compare-eax-and 0/imm32 0f 84/jump-if-equal $new-literal-integer:abort/disp32 - # var s/ecx : (address array byte) + # var s/ecx : (addr array byte) (slice-to-string Heap *(ebp+0xc)) # => eax 89/<- %ecx 0/r32/eax # @@ -2874,7 +2874,7 @@ $new-literal-integer:abort: cd/syscall 0x80/imm8 # never gets here -new-block: # ad: (address allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement) +new-block: # ad: (addr allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2894,7 +2894,7 @@ $new-block:end: 5d/pop-to-ebp c3/return -new-stmt: # ad: (address allocation-descriptor), operation: (address array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement) +new-stmt: # ad: (addr allocation-descriptor), operation: (addr array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2918,7 +2918,7 @@ $new-stmt:end: 5d/pop-to-ebp c3/return -new-vardef: # ad: (address allocation-descriptor), name: (address array byte), type: int -> result/eax: (handle statement) +new-vardef: # ad: (addr allocation-descriptor), name: (addr array byte), type: int -> result/eax: (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2940,7 +2940,7 @@ $new-vardef:end: 5d/pop-to-ebp c3/return -new-regvardef: # ad: (address allocation-descriptor), name: (address array byte), type: int, register: (address array byte) -> result/eax: (handle statement) +new-regvardef: # ad: (addr allocation-descriptor), name: (addr array byte), type: int, register: (addr array byte) -> result/eax: (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2964,7 +2964,7 @@ $new-regvardef:end: 5d/pop-to-ebp c3/return -new-named-block: # ad: (address allocation-descriptor), name: (address array byte), data: (handle list statement) -> result/eax: (handle statement) +new-named-block: # ad: (addr allocation-descriptor), name: (addr array byte), data: (handle list statement) -> result/eax: (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -2986,7 +2986,7 @@ $new-named-block:end: 5d/pop-to-ebp c3/return -new-list: # ad: (address allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type) +new-list: # ad: (addr allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3006,7 +3006,7 @@ $new-list:end: 5d/pop-to-ebp c3/return -append-list: # ad: (address allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type) +append-list: # ad: (addr allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3042,7 +3042,7 @@ $append-list:end: 5d/pop-to-ebp c3/return -append-to-block: # ad: (address allocation-descriptor), block: (handle block), x: (handle stmt) +append-to-block: # ad: (addr allocation-descriptor), block: (handle block), x: (handle stmt) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3075,7 +3075,7 @@ $check-mu-types:end: 5d/pop-to-ebp c3/return -size-of: # n : (address var) +size-of: # n : (addr var) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3091,7 +3091,7 @@ $size-of:end: # Code-generation ####################################################### -emit-subx: # out : (address buffered-file) +emit-subx: # out : (addr buffered-file) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3122,7 +3122,7 @@ $emit-subx:end: 5d/pop-to-ebp c3/return -emit-subx-function: # out : (address buffered-file), f : (handle function) +emit-subx-function: # out : (addr buffered-file), f : (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3150,7 +3150,7 @@ $emit-subx-function:end: 5d/pop-to-ebp c3/return -emit-subx-block: # out : (address buffered-file), block : (handle block) +emit-subx-block: # out : (addr buffered-file), block : (handle block) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3180,7 +3180,7 @@ $emit-subx-block:end: 5d/pop-to-ebp c3/return -emit-subx-statement: # out : (address buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function) +emit-subx-statement: # out : (addr buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -3975,7 +3975,7 @@ Lit-var: 0/imm32/no-register == code -emit-subx-primitive: # out : (address buffered-file), stmt : (handle statement), primitive : (handle function) +emit-subx-primitive: # out : (addr buffered-file), stmt : (handle statement), primitive : (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4001,7 +4001,7 @@ $emit-subx-primitive:end: 5d/pop-to-ebp c3/return -emit-subx-rm32: # out : (address buffered-file), l : arg-location, stmt : (handle statement) +emit-subx-rm32: # out : (addr buffered-file), l : arg-location, stmt : (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4081,7 +4081,7 @@ $get-stmt-operand-from-arg-location:abort: cd/syscall 0x80/imm8 # never gets here -emit-subx-r32: # out : (address buffered-file), l : arg-location, stmt : (handle statement) +emit-subx-r32: # out : (addr buffered-file), l : arg-location, stmt : (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4093,7 +4093,7 @@ emit-subx-r32: # out : (address buffered-file), l : arg-location, stmt : (handl 0f 84/jump-if-equal $emit-subx-r32:end/disp32 # (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax - (maybe-get Registers *(eax+0x10) 8) # Var-register => eax : (address register-index) + (maybe-get Registers *(eax+0x10) 8) # Var-register => eax : (addr register-index) (write-buffered *(ebp+8) Space) (print-int32-buffered *(ebp+8) *eax) (write-buffered *(ebp+8) "/r32") @@ -4106,7 +4106,7 @@ $emit-subx-r32:end: 5d/pop-to-ebp c3/return -emit-subx-imm32: # out : (address buffered-file), l : arg-location, stmt : (handle statement) +emit-subx-imm32: # out : (addr buffered-file), l : arg-location, stmt : (handle statement) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4130,7 +4130,7 @@ $emit-subx-imm32:end: 5d/pop-to-ebp c3/return -emit-subx-call: # out : (address buffered-file), stmt : (handle statement), callee : (handle function) +emit-subx-call: # out : (addr buffered-file), stmt : (handle statement), callee : (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4167,7 +4167,7 @@ $emit-subx-call:end: 5d/pop-to-ebp c3/return -emit-subx-call-operand: # out : (address buffered-file), operand : (handle variable) +emit-subx-call-operand: # out : (addr buffered-file), operand : (handle variable) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4193,7 +4193,7 @@ $emit-subx-call-operand:end: 5d/pop-to-ebp c3/return -emit-subx-var-as-rm32: # out : (address buffered-file), operand : (handle variable) +emit-subx-var-as-rm32: # out : (addr buffered-file), operand : (handle variable) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -4228,7 +4228,7 @@ $emit-subx-var-as-rm32:end: 5d/pop-to-ebp c3/return -find-matching-function: # functions : (address function), stmt : (handle statement) -> result/eax : (handle function) +find-matching-function: # functions : (addr function), stmt : (handle statement) -> result/eax : (handle function) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -5402,7 +5402,7 @@ test-emit-subx-statement-function-call-with-literal-arg: 5d/pop-to-ebp c3/return -emit-subx-prologue: # out : (address buffered-file) +emit-subx-prologue: # out : (addr buffered-file) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -5416,7 +5416,7 @@ $emit-subx-prologue:end: 5d/pop-to-ebp c3/return -emit-subx-epilogue: # out : (address buffered-file) +emit-subx-epilogue: # out : (addr buffered-file) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp diff --git a/apps/mulisp.subx b/apps/mulisp.subx index 1cfdeb03..d9fbb594 100644 --- a/apps/mulisp.subx +++ b/apps/mulisp.subx @@ -49,7 +49,7 @@ $main:end: # NIL NUM CHAR STRING SYMBOL PAIR ARRAY # memory type: a type specifying memory layout at the SubX level. Starts # with a '$'. -# $int $array $(address _) +# $int $array $(addr _) # # Lisp values are represented in memory by the _cell_ data structure. A cell # is 12 bytes long: @@ -63,18 +63,18 @@ $main:end: # - char: cell{ tag: 2/CHAR, data: $int 0 } # data contains the utf-8 code of the character (no compound glyphs, no # modifiers, etc., etc.) -# - string: cell{ tag: 3/STRING, data: $(address stream byte) -# data contains an (address array byte) containing the string in utf-8 -# - symbol: cell{ tag: 4/SYMBOL, data: $(address array byte) 0 } -# data contains an (address array byte) containing the name of the symbol in utf-8 +# - string: cell{ tag: 3/STRING, data: $(addr stream byte) +# data contains an (addr array byte) containing the string in utf-8 +# - symbol: cell{ tag: 4/SYMBOL, data: $(addr array byte) 0 } +# data contains an (addr array byte) containing the name of the symbol in utf-8 # alternatively, data could contain an index into the table of interned symbols -# - pair: cell{ tag: 5/PAIR, data: $(address cell) $(address cell) } +# - pair: cell{ tag: 5/PAIR, data: $(addr cell) $(addr cell) } # data contains pointers to car and cdr -# - array: cell{ tag: 6/ARRAY, data: $tag $(address stream data) +# - array: cell{ tag: 6/ARRAY, data: $tag $(addr stream data) # data contains a pointer to an array of 8-byte data fields and the common # tag for them all -repl: # in : (address buffered-file), out : (address buffered-file) +repl: # in : (addr buffered-file), out : (addr buffered-file) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -104,7 +104,7 @@ $repl:end: # arrays start with '[' # symbols start with anything else but quote, backquote, unquote or splice # only one s-expression per line -lisp-read: # in : (address buffered-file) -> eax : (handle cell) +lisp-read: # in : (addr buffered-file) -> eax : (handle cell) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -142,14 +142,14 @@ $lisp-read:end: 5d/pop-to-ebp c3/return -# lisp-read: in : (address buffered-file) -> (handle cell) +# lisp-read: in : (addr buffered-file) -> (handle cell) # token tmp = next-mulisp-token(in) # if is-int(tmp) return cell(tmp) # if is-string(tmp) return cell(tmp) # if is-pair(tmp) ... # if is-array(tmp) ... -next-mulisp-token: # in : (address buffered-file), line : (address stream byte), result : (address slice) +next-mulisp-token: # in : (addr buffered-file), line : (addr stream byte), result : (addr slice) # pseudocode: # if (line->read >= line->write) # read-line-buffered(in, line) @@ -194,11 +194,11 @@ $next-mulisp-token:end: 5d/pop-to-ebp c3/return -new-int-cell: # in : (address slice) -> eax : (handle cell) +new-int-cell: # in : (addr slice) -> eax : (handle cell) -new-string-cell: # in : (address slice) -> eax : (handle cell) +new-string-cell: # in : (addr slice) -> eax : (handle cell) -lisp-eval: # in : (address cell) -> eax : (handle cell) +lisp-eval: # in : (addr cell) -> eax : (handle cell) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -211,7 +211,7 @@ $lisp-eval:end: 5d/pop-to-ebp c3/return -lisp-print: # out : (address buffered-file), x : (address cell) +lisp-print: # out : (addr buffered-file), x : (addr cell) # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp diff --git a/apps/pack.subx b/apps/pack.subx index df683f84..5d5d8033 100644 --- a/apps/pack.subx +++ b/apps/pack.subx @@ -97,7 +97,7 @@ $subx-pack-main:end: # next-token-from-slice(start, end, delim char) -> slice # slice-equal?(slice, string) -subx-pack: # in : (address buffered-file), out : (address buffered-file) +subx-pack: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: # var line : (ref stream byte 512) # var in-code? = false @@ -909,7 +909,7 @@ test-subx-pack-code-and-data-segments: 5d/pop-to-ebp c3/return -convert-data: # line : (address stream byte), out : (address buffered-file) +convert-data: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # var word-slice : (ref slice) # while true @@ -1029,7 +1029,7 @@ $convert-data:check0: 0f 85/jump-if-not-equal $convert-data:break/disp32 $convert-data:check-for-comment: # if (slice-starts-with?(word-slice, "#")) - # . var start/edx : (address byte) = word-slice->start + # . var start/edx : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -1050,7 +1050,7 @@ $convert-data:comment: 0f 85/jump-if-not-equal $convert-data:end/disp32 $convert-data:check-for-label: # if (slice-ends-with?(word-slice, ":")) - # . var end/edx : (address byte) = word-slice->end + # . var end/edx : (addr byte) = word-slice->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx # . var c/eax : byte = *(end-1) 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -1809,7 +1809,7 @@ test-convert-data-trailing-comment: # unceremoniously abort on non-numeric operands except disp or imm # opcodes must be lowercase and zero padded # opcodes with misleading operand metadata may get duplicated as operands as well. don't rely on this. -convert-instruction: # line : (address stream byte), out : (address buffered-file) +convert-instruction: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # # some early exits # var word-slice = next-word(line) @@ -1863,7 +1863,7 @@ $convert-instruction:check0: 75/jump-if-not-equal $convert-instruction:pass-through/disp8 $convert-instruction:check1: # if (slice-starts-with?(word-slice, "#")) write-stream-data(out, line) - # . var start/edx : (address byte) = word-slice->start + # . var start/edx : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -1873,7 +1873,7 @@ $convert-instruction:check1: 74/jump-if-equal $convert-instruction:pass-through/disp8 $convert-instruction:check2: # if (slice-ends-with?(word-slice, ":")) write-stream-data(out, line) - # . var end/edx : (address byte) = word-slice->end + # . var end/edx : (addr byte) = word-slice->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx # . var c/eax : byte = *(end-1) 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -1953,7 +1953,7 @@ $convert-instruction:end: 5d/pop-to-ebp c3/return -emit-opcodes: # line : (address stream byte), out : (address buffered-file) +emit-opcodes: # line : (addr stream byte), out : (addr buffered-file) # opcodes occupy 1-3 bytes: # xx # 0f xx @@ -2030,7 +2030,7 @@ $emit-opcodes:op1: 3d/compare-eax-and 0/imm32/false 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 # if (slice-starts-with?(op1, "#")) return - # . var start/ebx : (address byte) = op1->start + # . var start/ebx : (addr byte) = op1->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 3/r32/ebx . . # copy *ecx to ebx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -2123,7 +2123,7 @@ $emit-opcodes:op2: 3d/compare-eax-and 0/imm32/false 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 # if (slice-starts-with?(op2, "#")) return - # . var start/ebx : (address byte) = op2->start + # . var start/ebx : (addr byte) = op2->start 8b/copy 0/mod/indirect 2/rm32/edx . . . 3/r32/ebx . . # copy *edx to ebx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -2202,7 +2202,7 @@ $emit-opcodes:op3: 3d/compare-eax-and 0/imm32/false 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 # if (slice-starts-with?(op3, "#")) return - # . var start/ebx : (address byte) = op2->start + # . var start/ebx : (addr byte) = op2->start 8b/copy 0/mod/indirect 2/rm32/edx . . . 3/r32/ebx . . # copy *edx to ebx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -2249,7 +2249,7 @@ $emit-opcodes:end: 5d/pop-to-ebp c3/return -emit-modrm: # line : (address stream byte), out : (address buffered-file) +emit-modrm: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # rewind-stream(line) # var has-modrm? = false, mod = 0, rm32 = 0, r32 = 0 @@ -2402,7 +2402,7 @@ $emit-modrm:check1: # if (slice-starts-with?(word-slice, "#")) break # . spill edx 52/push-edx - # . var start/edx : (address byte) = word-slice->start + # . var start/edx : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -2566,7 +2566,7 @@ $emit-modrm:end: 5d/pop-to-ebp c3/return -emit-sib: # line : (address stream byte), out : (address buffered-file) +emit-sib: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # var has-sib? = false, base = 0, index = 0, scale = 0 # var word-slice : (ref slice) @@ -2711,7 +2711,7 @@ $emit-sib:check1: # if (slice-starts-with?(word-slice, "#")) break # . spill edx 52/push-edx - # . var start/edx : (address byte) = word-slice->start + # . var start/edx : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -2847,7 +2847,7 @@ $emit-sib:end: 5d/pop-to-ebp c3/return -emit-disp: # line : (address stream byte), out : (address buffered-file) +emit-disp: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # rewind-stream(line) # var word-slice : (ref slice) @@ -2972,7 +2972,7 @@ $emit-disp:check0: 0f 85/jump-if-not-equal $emit-disp:break/disp32 $emit-disp:check1: # if (slice-starts-with?(word-slice, "#")) break - # . var start/edx : (address byte) = word-slice->start + # . var start/edx : (addr byte) = word-slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -3066,7 +3066,7 @@ $emit-disp:break: 5d/pop-to-ebp c3/return -emit-imm: # line : (address stream byte), out : (address buffered-file) +emit-imm: # line : (addr stream byte), out : (addr buffered-file) # pseudocode: # rewind-stream(line) # var word-slice : (ref slice) @@ -3191,7 +3191,7 @@ $emit-imm:check0: 0f 85/jump-if-not-equal $emit-imm:break/disp32 $emit-imm:check1: # if (slice-starts-with?(word-slice, "#")) break - # . var start/edx : (address byte) = slice->start + # . var start/edx : (addr byte) = slice->start 8b/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy *ecx to edx # . var c/eax : byte = *start 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -3285,7 +3285,7 @@ $emit-imm:break: 5d/pop-to-ebp c3/return -emit-line-in-comment: # line : (address stream byte), out : (address buffered-file) +emit-line-in-comment: # line : (addr stream byte), out : (addr buffered-file) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -5837,7 +5837,7 @@ test-convert-instruction-handles-imm8-operand: c3/return # shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/')) -parse-datum-of-word: # word : (address slice) -> value/eax : int +parse-datum-of-word: # word : (addr slice) -> value/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/sigils.subx b/apps/sigils.subx index a22aee44..485463d7 100644 --- a/apps/sigils.subx +++ b/apps/sigils.subx @@ -104,7 +104,7 @@ $subx-sigils-main:end: # error messages considered: # *x + 34 -> error: base+disp addressing must be within '()' -subx-sigils: # in : (address buffered-file), out : (address buffered-file) +subx-sigils: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode: # var line : (stream byte 512) # while true @@ -1359,7 +1359,7 @@ test-subx-sigils-indirect-mode-without-register: 5d/pop-to-ebp c3/return -emit-direct-mode: # out : (address buffered-file), word-slice : (address slice) +emit-direct-mode: # out : (addr buffered-file), word-slice : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1599,7 +1599,7 @@ test-emit-direct-mode-2: # error messages considered: # * ... -> error: no space after '*' # *(... -> error: *(...) expression must be all on a single line -next-word-or-expression: # line : (address stream byte), out : (address slice) +next-word-or-expression: # line : (addr stream byte), out : (addr slice) # pseudocode: # skip-chars-matching(line, ' ') # if line->read >= line->write # end of line @@ -2207,7 +2207,7 @@ test-next-word-or-expression-returns-whole-expression: # *(reg1+reg2< 2/mod 4/rm32 reg1/base reg2/index s/scale disp/disp32 # Intermediate structure: base, index, scale, disp # Default values: base: 0, index: 4 (none), scale: 0, disp: 0 -parse-effective-address: # word-slice : (address slice) -> base/eax, index/ecx, scale/edx, disp/ebx +parse-effective-address: # word-slice : (addr slice) -> base/eax, index/ecx, scale/edx, disp/ebx # pseudocode: # var local-slice = {word-slice->start, word-slice->end} # ++local-slice->start to skip '*' @@ -2670,7 +2670,7 @@ $parse-effective-address:error4: # assumes 'in' starts with a register name, and returns pointer to its code # side-effect: modifies 'in' to scan past the initial register name -next-register: # in : (address slice) -> reg/eax : int +next-register: # in : (addr slice) -> reg/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3149,7 +3149,7 @@ test-parse-effective-address-base-index-scale-displacement: # if index is none, then mod = 2 and rm32 = base and disp32 = disp # emit-sib: # if index is not none, then mod = 2 and rm32 = 4 and base = base and index = index and disp32 = disp -emit-indirect-mode: # out : (address buffered-file), base : int, index : int, scale : int, disp : int +emit-indirect-mode: # out : (addr buffered-file), base : int, index : int, scale : int, disp : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3858,7 +3858,7 @@ test-emit-indirect-mode-esp: 5d/pop-to-ebp c3/return -disp32-mode?: # in : (address slice) -> reg/eax : boolean +disp32-mode?: # in : (addr slice) -> reg/eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3917,7 +3917,7 @@ $disp32-mode?:end: 5d/pop-to-ebp c3/return -emit-indirect-disp32: # out : (address buffered-file), word-slice : (address slice) +emit-indirect-disp32: # out : (addr buffered-file), word-slice : (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3967,7 +3967,7 @@ $emit-indirect-disp32:end: # assumes 'in' starts with optional '+' or '-', optional whitespace, and an unsigned integer # returns the value of the integer # side-effect: modifies 'in' to skip past the integer -next-hex-int: # in : (address slice) -> result/eax +next-hex-int: # in : (addr slice) -> result/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -4382,7 +4382,7 @@ test-next-hex-int-negative-with-space: # assumes 'in' starts a positive unsigned integer # returns the value of the integer # side-effect: modifies 'in' to skip past the integer -next-positive-hex-int: # in : (address slice) -> result/eax +next-positive-hex-int: # in : (addr slice) -> result/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/apps/survey.subx b/apps/survey.subx index e365ac1b..7983e6c5 100644 --- a/apps/survey.subx +++ b/apps/survey.subx @@ -107,13 +107,13 @@ $subx-survey-main:end: cd/syscall 0x80/imm8 # data structures: -# segment-info: {address, file-offset, size} (12 bytes) -# segments: (address stream {string, segment-info}) (16 bytes per row) -# label-info: {segment-name, segment-offset, address} (12 bytes) -# labels: (address stream {string, label-info}) (16 bytes per row) +# segment-info: {addr, file-offset, size} (12 bytes) +# segments: (addr stream {string, segment-info}) (16 bytes per row) +# label-info: {segment-name, segment-offset, addr} (12 bytes) +# labels: (addr stream {string, label-info}) (16 bytes per row) # these are all inefficient; use sequential scans for lookups -subx-survey: # infile : (address buffered-file), out : (address buffered-file) +subx-survey: # infile : (addr buffered-file), out : (addr buffered-file) # pseudocode # var in : (ref stream byte 4096) # slurp(infile, in) @@ -618,7 +618,7 @@ compute-offsets:segment-tmp: # slice == code -compute-offsets: # in : (address stream byte), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +compute-offsets: # in : (addr stream byte), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # skeleton: # for lines in 'in' # for words in line @@ -629,7 +629,7 @@ compute-offsets: # in : (address stream byte), segments : (address stream {stri # default # # pseudocode: - # curr-segment-name : (address string) = 0 + # curr-segment-name : (addr string) = 0 # var line : (stream byte 512) # while true # line loop # clear-stream(line) @@ -661,7 +661,7 @@ compute-offsets: # in : (address stream byte), segments : (address stream {stri # break (next line) # else if is-label?(word-slice) # strip trailing ':' from word-slice - # x : (address label-info) = get-or-insert(labels, name) + # x : (addr label-info) = get-or-insert(labels, name) # x->segment-name = curr-segment-name # trace("label '", word-slice, "' is in segment '", curr-segment-name, "'.") # x->segment-offset = segment-offset @@ -1378,9 +1378,9 @@ test-compute-offsets: 5d/pop-to-ebp c3/return -compute-addresses: # segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +compute-addresses: # segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # pseudocode: - # srow : (address segment-info) = segments->data + # srow : (addr segment-info) = segments->data # max = &segments->data[segments->write] # num-segments = segments->write / 16 # starting-offset = 0x34 + (num-segments * 0x20) @@ -1391,12 +1391,12 @@ compute-addresses: # segments : (address stream {string, segment-info}), labels # s->address += (s->file-offset & 0x00000fff) # trace-sssns("segment " s->key " starts at address " s->address) # srow += 16 # row-size - # lrow : (address label-info) = labels->data + # lrow : (addr label-info) = labels->data # max = &labels->data[labels->write] # while true # if (lrow >= max) break - # seg-name : (address string) = lrow->segment-name - # label-seg : (address segment-info) = get(segments, seg-name) + # seg-name : (addr string) = lrow->segment-name + # label-seg : (addr segment-info) = get(segments, seg-name) # lrow->address = label-seg->address + lrow->segment-offset # trace-sssns("label " lrow->key " is at address " lrow->address) # lrow += 16 # row-size @@ -1550,7 +1550,7 @@ $compute-addresses:label-loop: #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # }}} - # label-seg/edx : (address segment-info) = get(segments, seg-name, row-size=16, "segment table") + # label-seg/edx : (addr segment-info) = get(segments, seg-name, row-size=16, "segment table") # . save eax 50/push-eax # . eax = get(segments, seg-name, row-size=16) @@ -1871,7 +1871,7 @@ test-compute-addresses-large-segments: 5d/pop-to-ebp c3/return -emit-output: # in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +emit-output: # in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # pseudocode: # emit-headers(out, segments, labels) # emit-segments(in, out, segments, labels) @@ -1922,7 +1922,7 @@ $emit-output:end: 5d/pop-to-ebp c3/return -emit-segments: # in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +emit-segments: # in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # pseudocode: # var offset-of-next-instruction = 0 # var line : (stream byte 512) @@ -3173,7 +3173,7 @@ test-emit-segments-code-label-absolute: 5d/pop-to-ebp c3/return -emit-headers: # out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +emit-headers: # out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # pseudocode: # emit-elf-header(out, segments, labels) # curr-segment = segments->data @@ -3311,7 +3311,7 @@ $emit-headers:end: 5d/pop-to-ebp c3/return -emit-elf-header: # out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info}) +emit-elf-header: # out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info}) # pseudocode # *$Elf_e_entry = get(labels, "Entry")->address # *$Elf_e_phnum = segments->write / 16 # size of a row @@ -3379,7 +3379,7 @@ $emit-elf-header:end: 5d/pop-to-ebp c3/return -emit-elf-program-header-entry: # out : (address buffered-file), curr-segment : (address {string, segment-info}) +emit-elf-program-header-entry: # out : (addr buffered-file), curr-segment : (addr {string, segment-info}) # pseudocode: # *$Elf_p_offset = curr-segment->file-offset # *$Elf_p_vaddr = curr-segment->address @@ -3468,7 +3468,7 @@ $emit-elf-program-header-entry:end: # - some helpers for tests -stream-add4: # in : (address stream byte), key : address, val1 : address, val2 : address, val3 : address +stream-add4: # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, val3 : addr # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3550,11 +3550,11 @@ $stream-add4:abort: # some variants of 'trace' that take multiple arguments in different combinations of types: # n: int # c: character [4-bytes, will eventually be UTF-8] -# s: (address string) -# l: (address slice) +# s: (addr string) +# l: (addr slice) # one gotcha: 's5' must not be empty -trace-sssns: # s1 : (address string), s2 : (address string), s3 : (address string), n4 : int, s5 : (address string) +trace-sssns: # s1 : (addr string), s2 : (addr string), s3 : (addr string), n4 : int, s5 : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3661,7 +3661,7 @@ test-trace-sssns: 5d/pop-to-ebp c3/return -trace-snsns: # s1 : (address string), n2 : int, s3 : (address string), n4 : int, s5 : (address string) +trace-snsns: # s1 : (addr string), n2 : int, s3 : (addr string), n4 : int, s5 : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3768,7 +3768,7 @@ test-trace-snsns: 5d/pop-to-ebp c3/return -trace-slsls: # s1 : (address string), l2 : (address slice), s3 : (address string), l4 : (address slice), s5 : (address string) +trace-slsls: # s1 : (addr string), l2 : (addr slice), s3 : (addr string), l4 : (addr slice), s5 : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -3893,7 +3893,7 @@ test-trace-slsls: 5d/pop-to-ebp c3/return -trace-slsns: # s1 : (address string), l2 : (address slice), s3 : (address string), n4 : int, s5 : (address string) +trace-slsns: # s1 : (addr string), l2 : (addr slice), s3 : (addr string), n4 : int, s5 : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -4009,7 +4009,7 @@ test-trace-slsns: 5d/pop-to-ebp c3/return -trace-slsss: # s1 : (address string), l2 : (address slice), s3 : (address string), s4 : (address string), s5 : (address string) +trace-slsss: # s1 : (addr string), l2 : (addr slice), s3 : (addr string), s4 : (addr string), s5 : (addr string) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -4125,7 +4125,7 @@ test-trace-slsss: 5d/pop-to-ebp c3/return -num-bytes: # line : (address stream byte) -> eax : int +num-bytes: # line : (addr stream byte) -> eax : int # pseudocode: # result = 0 # while true diff --git a/apps/tests.subx b/apps/tests.subx index 1d00cf30..2cef958b 100644 --- a/apps/tests.subx +++ b/apps/tests.subx @@ -67,7 +67,7 @@ $subx-tests-main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -subx-gen-run-tests: # in : (address buffered-file), out : (address buffered-file) +subx-gen-run-tests: # in : (addr buffered-file), out : (addr buffered-file) # pseudocode # bool tests-found = false # var line : (stream byte 512) diff --git a/html/050_write.subx.html b/html/050_write.subx.html index c12ebd44..d676e839 100644 --- a/html/050_write.subx.html +++ b/html/050_write.subx.html @@ -93,7 +93,7 @@ if ('onhashchange' in window) { 34 # You can convert a ref or handle to an address, but not the other way around. 35 # You can convert addresses to ints, but not the other way around. 36 -37 _write: # fd : int, s : (address array byte) +37 _write: # fd : int, s : (addr array byte) 38 # . prologue 39 55/push-ebp 40 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/051test.subx.html b/html/051test.subx.html index 3ea121ab..2ea337aa 100644 --- a/html/051test.subx.html +++ b/html/051test.subx.html @@ -80,7 +80,7 @@ if ('onhashchange' in window) { 21 cd/syscall 0x80/imm8 22 23 # print msg to stderr if a != b, otherwise print "." - 24 check-ints-equal: # a : int, b : int, msg : (address array byte) + 24 check-ints-equal: # a : int, b : int, msg : (addr array byte) 25 # . prologue 26 55/push-ebp 27 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/052kernel-string-equal.subx.html b/html/052kernel-string-equal.subx.html index 8a2dc15e..f7818771 100644 --- a/html/052kernel-string-equal.subx.html +++ b/html/052kernel-string-equal.subx.html @@ -92,7 +92,7 @@ if ('onhashchange' in window) { 30 31 # compare a null-terminated ascii string with a more idiomatic length-prefixed byte array 32 # reason for the name: the only place we should have null-terminated ascii strings is from commandline args - 33 kernel-string-equal?: # s : (address kernel-string), benchmark : (address array byte) -> eax : boolean + 33 kernel-string-equal?: # s : (addr kernel-string), benchmark : (addr array byte) -> eax : boolean 34 # pseudocode: 35 # n = benchmark->length 36 # s1 = s @@ -123,12 +123,12 @@ if ('onhashchange' in window) { 61 53/push-ebx 62 56/push-esi 63 57/push-edi - 64 # var s1/edi : (address byte) = s + 64 # var s1/edi : (addr byte) = s 65 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi 66 # var n/edx : int = benchmark->length 67 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx 68 8b/copy 0/mod/indirect 2/rm32/edx . . . 2/r32/edx . . # copy *edx to edx - 69 # var s2/esi : (address byte) = benchmark->data + 69 # var s2/esi : (addr byte) = benchmark->data 70 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi 71 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi 72 # var i/ecx : int = 0 @@ -324,10 +324,10 @@ if ('onhashchange' in window) { 262 263 == data 264 -265 Null-kernel-string: # (address kernel-string) +265 Null-kernel-string: # (addr kernel-string) 266 00/null 267 -268 _test-Abc-kernel-string: # (address kernel-string) +268 _test-Abc-kernel-string: # (addr kernel-string) 269 41/A 62/b 63/c 00/null 270 271 # . . vim:nowrap:textwidth=0 diff --git a/html/053new-segment.subx.html b/html/053new-segment.subx.html index 142f7fda..6197950c 100644 --- a/html/053new-segment.subx.html +++ b/html/053new-segment.subx.html @@ -89,7 +89,7 @@ if ('onhashchange' in window) { 29 e8/call new-segment/disp32 30 # . . discard args 31 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -32 # var eax : (address _) = ad->curr +32 # var eax : (addr _) = ad->curr 33 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 34 # write to *eax to check that we have access to the newly-allocated segment 35 c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0x34/imm32 # copy to *eax diff --git a/html/054string-equal.subx.html b/html/054string-equal.subx.html index b79a5cd8..027d9c6c 100644 --- a/html/054string-equal.subx.html +++ b/html/054string-equal.subx.html @@ -75,7 +75,7 @@ if ('onhashchange' in window) { 13 b8/copy-to-eax 1/imm32/exit 14 cd/syscall 0x80/imm8 15 - 16 string-equal?: # s : (address array byte), benchmark : (address array byte) -> eax : boolean + 16 string-equal?: # s : (addr array byte), benchmark : (addr array byte) -> eax : boolean 17 # pseudocode: 18 # if (s->length != benchmark->length) return false 19 # currs = s->data @@ -113,11 +113,11 @@ if ('onhashchange' in window) { 51 # if (ecx != benchmark->length) return false 52 39/compare 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # compare *edi and ecx 53 75/jump-if-not-equal $string-equal?:false/disp8 - 54 # var currs/esi : (address byte) = s->data + 54 # var currs/esi : (addr byte) = s->data 55 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi - 56 # var maxs/ecx : (address byte) = &s->data[s->length] + 56 # var maxs/ecx : (addr byte) = &s->data[s->length] 57 01/add 3/mod/direct 1/rm32/ecx . . . 6/r32/esi . . # add esi to ecx - 58 # var currb/edi : (address byte) = benchmark->data + 58 # var currb/edi : (addr byte) = benchmark->data 59 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi 60 # var c1/eax : byte = 0 61 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -238,7 +238,7 @@ if ('onhashchange' in window) { 176 c3/return 177 178 # helper for later tests -179 check-strings-equal: # s : (address array byte), expected : (address array byte), msg : (address array byte) +179 check-strings-equal: # s : (addr array byte), expected : (addr array byte), msg : (addr array byte) 180 # . prologue 181 55/push-ebp 182 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/055stream.subx.html b/html/055stream.subx.html index 1aa67979..e4d5b8fb 100644 --- a/html/055stream.subx.html +++ b/html/055stream.subx.html @@ -72,7 +72,7 @@ if ('onhashchange' in window) { 14 # . op subop mod rm32 base index scale r32 15 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 16 -17 clear-stream: # f : (address stream byte) +17 clear-stream: # f : (addr stream byte) 18 # . prologue 19 55/push-ebp 20 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -83,13 +83,13 @@ if ('onhashchange' in window) { 25 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax 26 # var count/ecx : int = f->length 27 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 1/r32/ecx 8/disp8 . # copy *(eax+8) to ecx -28 # var max/ecx : (address byte) = &f->data[f->length] +28 # var max/ecx : (addr byte) = &f->data[f->length] 29 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 0xc/disp8 . # copy eax+ecx+12 to ecx 30 # f->write = 0 31 c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0/imm32 # copy to *eax 32 # f->read = 0 33 c7 0/subop/copy 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 0/imm32 # copy to *(eax+4) -34 # var curr/eax : (address byte) = f->data +34 # var curr/eax : (addr byte) = f->data 35 81 0/subop/add 3/mod/direct 0/rm32/eax . . . . . 0xc/imm32 # add to eax 36 $clear-stream:loop: 37 # if (curr >= max) break @@ -109,7 +109,7 @@ if ('onhashchange' in window) { 51 5d/pop-to-ebp 52 c3/return 53 -54 rewind-stream: # f : (address stream byte) +54 rewind-stream: # f : (addr stream byte) 55 # . prologue 56 55/push-ebp 57 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/056trace.subx.html b/html/056trace.subx.html index 7673a059..c11be5ae 100644 --- a/html/056trace.subx.html +++ b/html/056trace.subx.html @@ -142,7 +142,7 @@ if ('onhashchange' in window) { 79 80 # Append a string to the given trace stream. 81 # Silently give up if it's already full. Or truncate the string if there isn't enough room. - 82 trace: # line : (address array byte) + 82 trace: # line : (addr array byte) 83 # . prologue 84 55/push-ebp 85 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -153,7 +153,7 @@ if ('onhashchange' in window) { 90 53/push-ebx 91 56/push-esi 92 57/push-edi - 93 # var edi : (address stream byte) = *Trace-stream + 93 # var edi : (addr stream byte) = *Trace-stream 94 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 7/r32/edi Trace-stream/disp32 # copy *Trace-stream to edi 95 # esi = line 96 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi @@ -309,7 +309,7 @@ if ('onhashchange' in window) { 246 # end 247 c3/return 248 -249 check-trace-contains: # line : (address string), msg : (address string) +249 check-trace-contains: # line : (addr string), msg : (addr string) 250 # . prologue 251 55/push-ebp 252 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 271 5d/pop-to-ebp 272 c3/return 273 -274 check-trace-scans-to: # line : (address string), msg : (address string) +274 check-trace-scans-to: # line : (addr string), msg : (addr string) 275 # . prologue 276 55/push-ebp 277 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -365,7 +365,7 @@ if ('onhashchange' in window) { 302 c3/return 303 304 # Start scanning from Trace-stream->read for 'line'. If found, update Trace-stream->read and return true. -305 trace-scan: # line : (address array byte) -> result/eax : boolean +305 trace-scan: # line : (addr array byte) -> result/eax : boolean 306 # pseudocode: 307 # push Trace-stream->read 308 # while true: @@ -617,7 +617,7 @@ if ('onhashchange' in window) { 554 # . end 555 c3/return 556 -557 next-line-matches?: # t : (address stream byte), line : (address array byte) -> result/eax : boolean +557 next-line-matches?: # t : (addr stream byte), line : (addr array byte) -> result/eax : boolean 558 # pseudocode: 559 # while true: 560 # if (currl >= maxl) break @@ -638,24 +638,24 @@ if ('onhashchange' in window) { 575 57/push-edi 576 # edx = line 577 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx -578 # var currl/esi : (address byte) = line->data +578 # var currl/esi : (addr byte) = line->data 579 # . esi = line/edx->data 580 8d/copy-address 1/mod/*+disp8 2/rm32/edx . . . 6/r32/esi 4/disp8 . # copy edx+4 to esi -581 # var maxl/ecx : (address byte) = &line->data[line->size] +581 # var maxl/ecx : (addr byte) = &line->data[line->size] 582 # . eax = line/edx->size 583 8b/copy 0/mod/indirect 2/rm32/edx . . 0/r32/eax . . # copy *edx to eax 584 # . maxl = &line->data[line->size] 585 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/esi 0/index/eax . 1/r32/ecx . . # copy edx+eax to ecx 586 # edi = t 587 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi -588 # var ebx : (address byte) = t->data +588 # var ebx : (addr byte) = t->data 589 8d/copy-address 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 0xc/disp8 . # copy edi+12 to ebx -590 # var maxt/edx : (address byte) = &t->data[t->write] +590 # var maxt/edx : (addr byte) = &t->data[t->write] 591 # . eax = t->write 592 8b/copy 0/mod/indirect 7/rm32/edi . . 0/r32/eax . . # copy *edi to eax 593 # . maxt = &t->data[t->write] 594 8d/copy-address 0/mod/indirect 4/rm32/sib 3/base/ebx 0/index/eax . 2/r32/edx . . # copy ebx+eax to edx -595 # var currt/edi : (address byte) = &t->data[t->read] +595 # var currt/edi : (addr byte) = &t->data[t->read] 596 # . eax = t/edi->read 597 8b/copy 1/mod/*+disp8 7/rm32/edi . . 0/r32/eax 4/disp8 . # copy *(edi+4) to eax 598 # . currt = &t->data[t->read] @@ -793,7 +793,7 @@ if ('onhashchange' in window) { 730 c3/return 731 732 # move t->read to _after_ next newline -733 skip-next-line: # t : (address stream byte) +733 skip-next-line: # t : (addr stream byte) 734 # pseudocode: 735 # max = &t->data[t->write] 736 # i = t->read @@ -819,11 +819,11 @@ if ('onhashchange' in window) { 756 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 0xc/disp8 . # copy ecx+12 to edx 757 # eax = t->write 758 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax -759 # var max/ebx : (address byte) = &t->data[t->write] +759 # var max/ebx : (addr byte) = &t->data[t->write] 760 8d/copy-address 0/mod/indirect 4/rm32/sib 2/base/edx 0/index/eax . 3/r32/ebx . . # copy edx+eax to ebx 761 # eax = t->read 762 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to edx -763 # var curr/ecx : (address byte) = &t->data[t->read] +763 # var curr/ecx : (addr byte) = &t->data[t->read] 764 8d/copy-address 0/mod/indirect 4/rm32/sib 2/base/edx 0/index/eax . 1/r32/ecx . . # copy edx+eax to ecx 765 # var i/edx : int = t->read 766 89/copy 3/mod/direct 2/rm32/edx . . . 0/r32/eax . . # copy eax to edx @@ -921,7 +921,7 @@ if ('onhashchange' in window) { 858 # - helpers 859 860 # 3-argument variant of _append -861 _append-3: # out : (address byte), outend : (address byte), s : (address array byte) -> num_bytes_appended/eax +861 _append-3: # out : (addr byte), outend : (addr byte), s : (addr array byte) -> num_bytes_appended/eax 862 # . prologue 863 55/push-ebp 864 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -953,7 +953,7 @@ if ('onhashchange' in window) { 890 c3/return 891 892 # 4-argument variant of _append -893 _append-4: # out : (address byte), outend : (address byte), in : (address byte), inend : (address byte) -> num_bytes_appended/eax : int +893 _append-4: # out : (addr byte), outend : (addr byte), in : (addr byte), inend : (addr byte) -> num_bytes_appended/eax : int 894 # . prologue 895 55/push-ebp 896 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/057write.subx.html b/html/057write.subx.html index 38ad6630..bba690fc 100644 --- a/html/057write.subx.html +++ b/html/057write.subx.html @@ -81,7 +81,7 @@ if ('onhashchange' in window) { 21 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 22 23 # TODO: come up with a way to signal when a write to disk fails - 24 write: # f : fd or (address stream byte), s : (address array byte) + 24 write: # f : fd or (addr stream byte), s : (addr array byte) 25 # . prologue 26 55/push-ebp 27 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/058stream-equal.subx.html b/html/058stream-equal.subx.html index 2e24dba7..f4e87361 100644 --- a/html/058stream-equal.subx.html +++ b/html/058stream-equal.subx.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 8 # compare all the data in a stream (ignoring the read pointer) - 9 stream-data-equal?: # f : (address stream byte), s : (address array byte) -> eax : boolean + 9 stream-data-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean 10 # . prologue 11 55/push-ebp 12 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -78,9 +78,9 @@ if ('onhashchange' in window) { 19 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi 20 # eax = f->write 21 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax - 22 # var maxf/edx : (address byte) = &f->data[f->write] + 22 # var maxf/edx : (addr byte) = &f->data[f->write] 23 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 0/index/eax . 2/r32/edx 0xc/disp8 . # copy esi+eax+12 to edx - 24 # var currf/esi : (address byte) = f->data + 24 # var currf/esi : (addr byte) = f->data 25 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 0xc/imm32 # add to esi 26 # edi = s 27 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0xc/disp8 . # copy *(ebp+12) to edi @@ -88,7 +88,7 @@ if ('onhashchange' in window) { 29 # if (f->write != s->length) return false 30 39/compare 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . . # compare *edi and eax 31 75/jump-if-not-equal $stream-data-equal?:false/disp8 - 32 # var currs/edi : (address byte) = s->data + 32 # var currs/edi : (addr byte) = s->data 33 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi 34 # var eax : byte = 0 35 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -250,7 +250,7 @@ if ('onhashchange' in window) { 191 c3/return 192 193 # helper for later tests -194 check-stream-equal: # f : (address stream byte), s : (address array byte), msg : (address array byte) +194 check-stream-equal: # f : (addr stream byte), s : (addr array byte), msg : (addr array byte) 195 # . prologue 196 55/push-ebp 197 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -286,7 +286,7 @@ if ('onhashchange' in window) { 227 # on success, set f->read to after the next newline 228 # on failure, leave f->read unmodified 229 # this function is usually used only in tests, so we repeatedly write f->read -230 next-stream-line-equal?: # f : (address stream byte), s : (address array byte) -> eax : boolean +230 next-stream-line-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean 231 # pseudocode: 232 # currf = f->read # bound: f->write 233 # currs = 0 # bound : s->length diff --git a/html/059stop.subx.html b/html/059stop.subx.html index b7c0cd20..4ecff92e 100644 --- a/html/059stop.subx.html +++ b/html/059stop.subx.html @@ -102,7 +102,7 @@ if ('onhashchange' in window) { 41 # the stack. 42 # Ugly that we need to know the size of args. Don't allocate variables between 43 # tailor-exit-descriptor and the call it's for. - 44 tailor-exit-descriptor: # ed : (address exit-descriptor), nbytes : int + 44 tailor-exit-descriptor: # ed : (addr exit-descriptor), nbytes : int 45 # . prologue 46 55/push-ebp 47 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -150,7 +150,7 @@ if ('onhashchange' in window) { 89 5d/pop-to-ebp 90 c3/return 91 - 92 stop: # ed : (address exit-descriptor), value : int + 92 stop: # ed : (addr exit-descriptor), value : int 93 # no prologue; one way or another, we're going to clobber registers 94 # eax = ed 95 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # copy *(esp+4) to eax @@ -222,7 +222,7 @@ if ('onhashchange' in window) { 161 5d/pop-to-ebp 162 c3/return 163 -164 _test-stop-1: # ed : (address exit-descriptor) +164 _test-stop-1: # ed : (addr exit-descriptor) 165 # . prologue 166 55/push-ebp 167 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -249,7 +249,7 @@ if ('onhashchange' in window) { 188 5d/pop-to-ebp 189 c3/return 190 -191 _test-stop-2: # ed : (address exit-descriptor) +191 _test-stop-2: # ed : (addr exit-descriptor) 192 # . prologue 193 55/push-ebp 194 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/060read.subx.html b/html/060read.subx.html index 235389fa..137be892 100644 --- a/html/060read.subx.html +++ b/html/060read.subx.html @@ -106,7 +106,7 @@ if ('onhashchange' in window) { 45 # . op subop mod rm32 base index scale r32 46 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 47 - 48 read: # f : fd or (address stream byte), s : (address stream byte) -> num-bytes-read/eax : int + 48 read: # f : fd or (addr stream byte), s : (addr stream byte) -> num-bytes-read/eax : int 49 # . prologue 50 55/push-ebp 51 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -256,7 +256,7 @@ if ('onhashchange' in window) { 195 # Unclear how I'd use it, though. Callers seem to need the check anyway. 196 # Maybe a better helper would be 'empty-stream?' 197 -198 _read: # fd : int, s : (address stream byte) -> num-bytes-read/eax : int +198 _read: # fd : int, s : (addr stream byte) -> num-bytes-read/eax : int 199 # . prologue 200 55/push-ebp 201 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/061read-byte.subx.html b/html/061read-byte.subx.html index 9e5f62a6..e697f0c8 100644 --- a/html/061read-byte.subx.html +++ b/html/061read-byte.subx.html @@ -74,7 +74,7 @@ if ('onhashchange' in window) { 12 # The buffered file for standard input. Also illustrates the layout for 13 # buffered-file: a pointer to the backing store, followed by a 'buffer' stream 14 Stdin: # (ref buffered-file) - 15 # file descriptor or (address stream byte) + 15 # file descriptor or (addr stream byte) 16 0/imm32 # standard input 17 $Stdin->buffer: 18 # inlined fields for a stream @@ -97,7 +97,7 @@ if ('onhashchange' in window) { 35 36 # return next byte value in eax, with top 3 bytes cleared. 37 # On reaching end of file, return 0xffffffff (Eof). - 38 read-byte-buffered: # f : (address buffered-file) -> byte-or-Eof/eax + 38 read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax 39 # . prologue 40 55/push-ebp 41 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 272 273 # a test buffered file for _test-stream 274 _test-buffered-file: # (ref buffered-file) -275 # file descriptor or (address stream byte) +275 # file descriptor or (addr stream byte) 276 _test-stream/imm32 277 $_test-buffered-file->buffer: 278 # current write index @@ -373,7 +373,7 @@ if ('onhashchange' in window) { 311 312 # a test buffered file for _test-input-stream 313 _test-input-buffered-file: # (ref buffered-file) -314 # file descriptor or (address stream byte) +314 # file descriptor or (addr stream byte) 315 _test-input-stream/imm32 316 $_test-input-buffered-file->buffer: 317 # current write index diff --git a/html/062write-stream.subx.html b/html/062write-stream.subx.html index 49b3bfec..36a31115 100644 --- a/html/062write-stream.subx.html +++ b/html/062write-stream.subx.html @@ -76,7 +76,7 @@ if ('onhashchange' in window) { 15 #? b8/copy-to-eax 1/imm32/exit 16 #? cd/syscall 0x80/imm8 17 - 18 write-stream: # f : fd or (address stream byte), s : (address stream byte) + 18 write-stream: # f : fd or (addr stream byte), s : (addr stream byte) 19 # . prologue 20 55/push-ebp 21 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -136,7 +136,7 @@ if ('onhashchange' in window) { 75 5d/pop-to-ebp 76 c3/return 77 - 78 _write-stream: # fd : int, s : (address stream byte) + 78 _write-stream: # fd : int, s : (addr stream byte) 79 # . prologue 80 55/push-ebp 81 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/063error.subx.html b/html/063error.subx.html index dad098cd..b32602f1 100644 --- a/html/063error.subx.html +++ b/html/063error.subx.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 8 # write(out, "Error: "+msg+"\n") then stop(ed, 1) - 9 error: # ed : (address exit-descriptor), out : fd or (address stream byte), msg : (address array byte) + 9 error: # ed : (addr exit-descriptor), out : fd or (addr stream byte), msg : (addr array byte) 10 # . prologue 11 55/push-ebp 12 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/064write-byte.subx.html b/html/064write-byte.subx.html index 8ab5318f..9fba419d 100644 --- a/html/064write-byte.subx.html +++ b/html/064write-byte.subx.html @@ -70,7 +70,7 @@ if ('onhashchange' in window) { 8 9 # The buffered file for standard output. 10 Stdout: # (ref buffered-file) - 11 # file descriptor or (address stream byte) + 11 # file descriptor or (addr stream byte) 12 1/imm32 # standard output 13 $Stdout->buffer: 14 # inlined fields for a stream @@ -92,7 +92,7 @@ if ('onhashchange' in window) { 30 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 31 32 # Write lower byte of 'n' to 'f'. - 33 write-byte-buffered: # f : (address buffered-file), n : int + 33 write-byte-buffered: # f : (addr buffered-file), n : int 34 # . prologue 35 55/push-ebp 36 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -140,7 +140,7 @@ if ('onhashchange' in window) { 78 5d/pop-to-ebp 79 c3/return 80 - 81 flush: # f : (address buffered-file) + 81 flush: # f : (addr buffered-file) 82 # . prologue 83 55/push-ebp 84 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -267,7 +267,7 @@ if ('onhashchange' in window) { 205 # - variant without buffering 206 207 # Write lower byte of 'n' to 'f'. -208 append-byte: # f : (address stream byte), n : int +208 append-byte: # f : (addr stream byte), n : int 209 # . prologue 210 55/push-ebp 211 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -388,7 +388,7 @@ if ('onhashchange' in window) { 326 327 # a test buffered file for _test-output-stream 328 _test-output-buffered-file: # (ref buffered-file) -329 # file descriptor or (address stream byte) +329 # file descriptor or (addr stream byte) 330 _test-output-stream/imm32 331 $_test-output-buffered-file->buffer: 332 # current write index @@ -419,7 +419,7 @@ if ('onhashchange' in window) { 357 358 # a test buffered file for _test-error-stream 359 _test-error-buffered-file: # (ref buffered-file) -360 # file descriptor or (address stream byte) +360 # file descriptor or (addr stream byte) 361 _test-error-stream/imm32 362 $_test-error-buffered-file->buffer: 363 # current write index diff --git a/html/065write-buffered.subx.html b/html/065write-buffered.subx.html index ab9c8670..10545dec 100644 --- a/html/065write-buffered.subx.html +++ b/html/065write-buffered.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 write-buffered: # f : (address buffered-file), msg : (address array byte) + 8 write-buffered: # f : (addr buffered-file), msg : (addr array byte) 9 # pseudocode: 10 # in = msg->data 11 # inend = &msg->data[msg->length] @@ -99,9 +99,9 @@ if ('onhashchange' in window) { 38 57/push-edi 39 # eax = msg 40 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax - 41 # var in/esi : (address byte) = msg->data + 41 # var in/esi : (addr byte) = msg->data 42 8d/copy-address 1/mod/*+disp8 0/rm32/eax . . . 6/r32/esi 4/disp8 . # copy eax+4 to esi - 43 # var inend/ecx : (address byte) = &msg->data[msg->length] + 43 # var inend/ecx : (addr byte) = &msg->data[msg->length] 44 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 45 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/esi 1/index/ecx . 1/r32/ecx . . # copy esi+ecx to ecx 46 # edi = f @@ -268,7 +268,7 @@ if ('onhashchange' in window) { 207 208 # The buffered file for standard error. 209 Stderr: # (ref buffered-file) -210 # file descriptor or (address stream byte) +210 # file descriptor or (addr stream byte) 211 2/imm32 # standard error 212 $Stderr->buffer: 213 # inlined fields for a stream diff --git a/html/066print-int.subx.html b/html/066print-int.subx.html index d3adba30..1c024069 100644 --- a/html/066print-int.subx.html +++ b/html/066print-int.subx.html @@ -79,7 +79,7 @@ if ('onhashchange' in window) { 18 05/add-to-eax 0x57/imm32/a-10 19 c3/return 20 - 21 append-byte-hex: # f : (address stream byte), n : int + 21 append-byte-hex: # f : (addr stream byte), n : int 22 # . prologue 23 55/push-ebp 24 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -151,7 +151,7 @@ if ('onhashchange' in window) { 90 c3/return 91 92 # print the hex representation for the lowest byte of a number - 93 print-byte-buffered: # f : (address buffered-file), n : int + 93 print-byte-buffered: # f : (addr buffered-file), n : int 94 # . prologue 95 55/push-ebp 96 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -236,7 +236,7 @@ if ('onhashchange' in window) { 175 # . end 176 c3/return 177 -178 print-int32: # f : (address stream byte), n : int +178 print-int32: # f : (addr stream byte), n : int 179 # pseudocode: 180 # write(f, "0x") 181 # ecx = 28 @@ -324,7 +324,7 @@ if ('onhashchange' in window) { 263 # . end 264 c3/return 265 -266 print-int32-buffered: # f : (address buffered-file), n : int +266 print-int32-buffered: # f : (addr buffered-file), n : int 267 # pseudocode: 268 # write-buffered(f, "0x") 269 # ecx = 28 diff --git a/html/067parse-hex.subx.html b/html/067parse-hex.subx.html index ad3f8de9..2b607e42 100644 --- a/html/067parse-hex.subx.html +++ b/html/067parse-hex.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 6 # . op subop mod rm32 base index scale r32 7 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 8 - 9 is-hex-int?: # in : (address slice) -> eax : boolean + 9 is-hex-int?: # in : (addr slice) -> eax : boolean 10 # . prologue 11 55/push-ebp 12 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -78,7 +78,7 @@ if ('onhashchange' in window) { 18 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx 19 # edx = s->end 20 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx - 21 # var curr/ecx : (address byte) = s->start + 21 # var curr/ecx : (addr byte) = s->start 22 8b/copy 0/mod/indirect 1/rm32/ecx . . . 1/r32/ecx . . # copy *ecx to ecx 23 # if s is empty return false 24 b8/copy-to-eax 0/imm32/false @@ -411,7 +411,7 @@ if ('onhashchange' in window) { 351 5d/pop-to-ebp 352 c3/return 353 -354 parse-hex-int: # in : (address slice) -> result/eax : int +354 parse-hex-int: # in : (addr slice) -> result/eax : int 355 # . prologue 356 55/push-ebp 357 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -426,7 +426,7 @@ if ('onhashchange' in window) { 366 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx 367 # edx = in->end 368 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # copy *(ecx+4) to edx -369 # var curr/ecx : (address byte) = in->start +369 # var curr/ecx : (addr byte) = in->start 370 8b/copy 0/mod/indirect 1/rm32/ecx . . . 1/r32/ecx . . # copy *ecx to ecx 371 # var negate?/esi : boolean = false 372 31/xor 3/mod/direct 6/rm32/esi . . . 6/r32/esi . . # clear esi diff --git a/html/068error-byte.subx.html b/html/068error-byte.subx.html index acd6f8ab..d3c23edb 100644 --- a/html/068error-byte.subx.html +++ b/html/068error-byte.subx.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { 24 #? cd/syscall 0x80/imm8 25 26 # write(out, "Error: "+msg+": "+byte) then stop(ed, 1) -27 error-byte: # ed : (address exit-descriptor), out : (address buffered-file), msg : (address array byte), n : byte +27 error-byte: # ed : (addr exit-descriptor), out : (addr buffered-file), msg : (addr array byte), n : byte 28 # . prologue 29 55/push-ebp 30 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/069allocate.subx.html b/html/069allocate.subx.html index a1bca554..b8bb8681 100644 --- a/html/069allocate.subx.html +++ b/html/069allocate.subx.html @@ -117,7 +117,7 @@ if ('onhashchange' in window) { 56 57 # Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr. 58 # Abort if there isn't enough memory in 'ad'. - 59 allocate: # ad : (address allocation-descriptor), n : int -> address-or-null/eax : (address _) + 59 allocate: # ad : (addr allocation-descriptor), n : int -> address-or-null/eax : (addr _) 60 # . prologue 61 55/push-ebp 62 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -241,7 +241,7 @@ if ('onhashchange' in window) { 180 c3/return 181 182 # helper: create a nested allocation descriptor (useful for tests) -183 allocate-region: # ad : (address allocation-descriptor), n : int -> new-ad : (handle allocation-descriptor) +183 allocate-region: # ad : (addr allocation-descriptor), n : int -> new-ad : (handle allocation-descriptor) 184 # . prologue 185 55/push-ebp 186 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/070new-stream.subx.html b/html/070new-stream.subx.html index 8db50f60..09c8b9be 100644 --- a/html/070new-stream.subx.html +++ b/html/070new-stream.subx.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 new-stream: # ad : (address allocation-descriptor), length : int, elemsize : int -> address/eax : (handle stream _) + 8 new-stream: # ad : (addr allocation-descriptor), length : int, elemsize : int -> address/eax : (handle stream _) 9 # . prologue 10 55/push-ebp 11 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/071read-line.subx.html b/html/071read-line.subx.html index b97cc706..8abf926d 100644 --- a/html/071read-line.subx.html +++ b/html/071read-line.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 6 # read bytes from 'f' until (and including) a newline and store them into 's' 7 # 's' fails to grow if and only if no data found 8 # just abort if 's' is too small - 9 read-line-buffered: # f : (address buffered-file), s : (address stream byte) + 9 read-line-buffered: # f : (addr buffered-file), s : (addr stream byte) 10 # pseudocode: 11 # while true 12 # if (s->write >= s->length) abort @@ -276,7 +276,7 @@ if ('onhashchange' in window) { 216 # read bytes from 'f' until (and including) a newline and store them into 's' 217 # 's' fails to grow if and only if no data found 218 # just abort if 's' is too small -219 read-line: # f : (address stream byte), s : (address stream byte) +219 read-line: # f : (addr stream byte), s : (addr stream byte) 220 # pseudocode: 221 # while true 222 # if (s->write >= s->length) abort diff --git a/html/072slice.subx.html b/html/072slice.subx.html index 6a525e2e..8176b4d7 100644 --- a/html/072slice.subx.html +++ b/html/072slice.subx.html @@ -67,7 +67,7 @@ if ('onhashchange' in window) { 6 # . op subop mod rm32 base index scale r32 7 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 8 - 9 slice-empty?: # s : (address slice) -> eax : boolean + 9 slice-empty?: # s : (addr slice) -> eax : boolean 10 # . prologue 11 55/push-ebp 12 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -149,7 +149,7 @@ if ('onhashchange' in window) { 88 5d/pop-to-ebp 89 c3/return 90 - 91 slice-equal?: # s : (address slice), p : (address array byte) -> eax : boolean + 91 slice-equal?: # s : (addr slice), p : (addr array byte) -> eax : boolean 92 # pseudocode: 93 # if (p == 0) return (s == 0) 94 # currs = s->start @@ -179,9 +179,9 @@ if ('onhashchange' in window) { 118 56/push-esi 119 # esi = s 120 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - 121 # var currs/edx : (address byte) = s->start + 121 # var currs/edx : (addr byte) = s->start 122 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx - 123 # var maxs/esi : (address byte) = s->end + 123 # var maxs/esi : (addr byte) = s->end 124 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi 125 # var slen/eax : int = maxs - currs 126 89/copy 3/mod/direct 0/rm32/eax . . . 6/r32/esi . . # copy esi to eax @@ -200,7 +200,7 @@ if ('onhashchange' in window) { 139 # if (slen != p->length) return false 140 39/compare 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . . # compare *ebx and eax 141 75/jump-if-not-equal $slice-equal?:false/disp8 - 142 # var currp/ebx : (address byte) = p->data + 142 # var currp/ebx : (addr byte) = p->data 143 81 0/subop/add 3/mod/direct 3/rm32/ebx . . . . . 4/imm32 # add to ebx 144 # var c1/eax : byte = 0 145 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax @@ -516,7 +516,7 @@ if ('onhashchange' in window) { 455 5d/pop-to-ebp 456 c3/return 457 - 458 slice-starts-with?: # s : (address slice), head : (address array byte) -> eax : boolean + 458 slice-starts-with?: # s : (addr slice), head : (addr array byte) -> eax : boolean 459 # pseudocode 460 # lenh = head->length 461 # if (lenh > s->end - s->start) return false @@ -559,9 +559,9 @@ if ('onhashchange' in window) { 498 # if (lenh > lens) return false 499 39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx 500 7f/jump-if-greater $slice-starts-with?:false/disp8 - 501 # var currs/esi : (address byte) = s->start + 501 # var currs/esi : (addr byte) = s->start 502 8b/subtract 0/mod/indirect 6/rm32/esi . . . 6/r32/esi . . # copy *esi to esi - 503 # var currh/edi : (address byte) = head->data + 503 # var currh/edi : (addr byte) = head->data 504 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi 505 # var i/ecx : int = 0 506 31/xor 3/mod/direct 1/rm32/ecx . . . 1/r32/ecx . . # clear ecx @@ -822,7 +822,7 @@ if ('onhashchange' in window) { 761 762 # write a slice to a stream 763 # abort if the stream doesn't have enough space - 764 write-slice: # out : (address stream byte), s : (address slice) + 764 write-slice: # out : (addr stream byte), s : (addr slice) 765 # . prologue 766 55/push-ebp 767 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -835,9 +835,9 @@ if ('onhashchange' in window) { 774 57/push-edi 775 # esi = s 776 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - 777 # var curr/ecx : (address byte) = s->start + 777 # var curr/ecx : (addr byte) = s->start 778 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx - 779 # var max/esi : (address byte) = s->end + 779 # var max/esi : (addr byte) = s->end 780 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi 781 # edi = out 782 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi @@ -938,7 +938,7 @@ if ('onhashchange' in window) { 877 c3/return 878 879 # write a slice to a buffered-file - 880 write-slice-buffered: # out : (address buffered-file), s : (address slice) + 880 write-slice-buffered: # out : (addr buffered-file), s : (addr slice) 881 # . prologue 882 55/push-ebp 883 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -951,9 +951,9 @@ if ('onhashchange' in window) { 890 57/push-edi 891 # esi = s 892 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - 893 # var curr/ecx : (address byte) = s->start + 893 # var curr/ecx : (addr byte) = s->start 894 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx - 895 # var max/esi : (address byte) = s->end + 895 # var max/esi : (addr byte) = s->end 896 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 6/r32/esi 4/disp8 . # copy *(esi+4) to esi 897 # edi = out 898 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi @@ -1073,7 +1073,7 @@ if ('onhashchange' in window) { 1012 c3/return 1013 1014 # copy a slice into a new (dynamically allocated) string -1015 slice-to-string: # ad : (address allocation-descriptor), in : (address slice) -> out/eax : (address array byte) +1015 slice-to-string: # ad : (addr allocation-descriptor), in : (addr slice) -> out/eax : (addr array byte) 1016 # . prologue 1017 55/push-ebp 1018 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1084,9 +1084,9 @@ if ('onhashchange' in window) { 1023 56/push-esi 1024 # esi = in 1025 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi -1026 # var curr/edx : (address byte) = in->start +1026 # var curr/edx : (addr byte) = in->start 1027 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . . # copy *esi to edx -1028 # var max/ebx : (address byte) = in->end +1028 # var max/ebx : (addr byte) = in->end 1029 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 3/r32/ebx 4/disp8 . # copy *(esi+4) to ebx 1030 # var size/ecx : int = max - curr + 4 # total size of output string (including the initial length) 1031 89/copy 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # copy ebx to ecx diff --git a/html/073next-token.subx.html b/html/073next-token.subx.html index 8fa3ac22..4165500e 100644 --- a/html/073next-token.subx.html +++ b/html/073next-token.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 7 8 # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) 9 # on reaching end of file, return an empty interval - 10 next-token: # in : (address stream byte), delimiter : byte, out : (address slice) + 10 next-token: # in : (addr stream byte), delimiter : byte, out : (addr slice) 11 # . prologue 12 55/push-ebp 13 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -219,7 +219,7 @@ if ('onhashchange' in window) { 160 161 # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) 162 # on reaching end of file, return an empty interval - 163 next-token-from-slice: # start : (address byte), end : (address byte), delimiter : byte, out : (address slice) + 163 next-token-from-slice: # start : (addr byte), end : (addr byte), delimiter : byte, out : (addr slice) 164 # . prologue 165 55/push-ebp 166 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -397,7 +397,7 @@ if ('onhashchange' in window) { 338 5d/pop-to-ebp 339 c3/return 340 - 341 skip-chars-matching: # in : (address stream byte), delimiter : byte + 341 skip-chars-matching: # in : (addr stream byte), delimiter : byte 342 # . prologue 343 55/push-ebp 344 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -520,7 +520,7 @@ if ('onhashchange' in window) { 461 # end 462 c3/return 463 - 464 skip-chars-matching-whitespace: # in : (address stream byte) + 464 skip-chars-matching-whitespace: # in : (addr stream byte) 465 # . prologue 466 55/push-ebp 467 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -610,7 +610,7 @@ if ('onhashchange' in window) { 551 c3/return 552 553 # minor fork of 'skip-chars-matching' - 554 skip-chars-not-matching: # in : (address stream byte), delimiter : byte + 554 skip-chars-not-matching: # in : (addr stream byte), delimiter : byte 555 # . prologue 556 55/push-ebp 557 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -772,7 +772,7 @@ if ('onhashchange' in window) { 713 # end 714 c3/return 715 - 716 skip-chars-not-matching-whitespace: # in : (address stream byte) + 716 skip-chars-not-matching-whitespace: # in : (addr stream byte) 717 # . prologue 718 55/push-ebp 719 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -860,7 +860,7 @@ if ('onhashchange' in window) { 801 # end 802 c3/return 803 - 804 skip-chars-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax + 804 skip-chars-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax 805 # . prologue 806 55/push-ebp 807 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -956,7 +956,7 @@ if ('onhashchange' in window) { 897 # end 898 c3/return 899 - 900 skip-chars-matching-whitespace-in-slice: # curr : (address byte), end : (address byte) -> curr/eax + 900 skip-chars-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax 901 # . prologue 902 55/push-ebp 903 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1029,7 +1029,7 @@ if ('onhashchange' in window) { 970 c3/return 971 972 # minor fork of 'skip-chars-matching-in-slice' - 973 skip-chars-not-matching-in-slice: # curr : (address byte), end : (address byte), delimiter : byte -> curr/eax + 973 skip-chars-not-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax 974 # . prologue 975 55/push-ebp 976 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1154,7 +1154,7 @@ if ('onhashchange' in window) { 1095 # end 1096 c3/return 1097 -1098 skip-chars-not-matching-whitespace-in-slice: # curr : (address byte), end : (address byte) -> curr/eax +1098 skip-chars-not-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax 1099 # . prologue 1100 55/push-ebp 1101 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1227,7 +1227,7 @@ if ('onhashchange' in window) { 1168 1169 # update line->read to end of string literal surrounded by double quotes 1170 # line->read must start out at a double-quote -1171 skip-string: # line : (address stream byte) +1171 skip-string: # line : (addr stream byte) 1172 # . prologue 1173 55/push-ebp 1174 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1469,7 +1469,7 @@ if ('onhashchange' in window) { 1410 5d/pop-to-ebp 1411 c3/return 1412 -1413 skip-string-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax +1413 skip-string-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax 1414 # . prologue 1415 55/push-ebp 1416 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1655,7 +1655,7 @@ if ('onhashchange' in window) { 1596 1597 # update line->read to ')' 1598 # line->read ends at ')' -1599 skip-until-close-paren: # line : (address stream byte) +1599 skip-until-close-paren: # line : (addr stream byte) 1600 # . prologue 1601 55/push-ebp 1602 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1842,7 +1842,7 @@ if ('onhashchange' in window) { 1783 5d/pop-to-ebp 1784 c3/return 1785 -1786 skip-until-close-paren-in-slice: # curr : (address byte), end : (address byte) -> new_curr/eax : (address byte) +1786 skip-until-close-paren-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax : (addr byte) 1787 # . prologue 1788 55/push-ebp 1789 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/074write-stream-data.subx.html b/html/074write-stream-data.subx.html index 9f9f5aa4..5ea6ff9a 100644 --- a/html/074write-stream-data.subx.html +++ b/html/074write-stream-data.subx.html @@ -67,7 +67,7 @@ if ('onhashchange' in window) { 8 # - construct a 'maximal slice' and pass it to write-slice-buffered 9 # - flush the buffered-file and pass the stream directly to its fd (disabling buffering) 10 # we'll go with the first way for now - 11 write-stream-data: # f : (address buffered-file), s : (address stream byte) + 11 write-stream-data: # f : (addr buffered-file), s : (addr stream byte) 12 # . prologue 13 55/push-ebp 14 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/075print-int-decimal.subx.html b/html/075print-int-decimal.subx.html index 88ace8b1..e811484b 100644 --- a/html/075print-int-decimal.subx.html +++ b/html/075print-int-decimal.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 print-int32-decimal: # out : (address stream byte), n : int32 + 8 print-int32-decimal: # out : (addr stream byte), n : int32 9 # works by generating characters from lowest to highest and pushing them 10 # to the stack, before popping them one by one into the stream 11 # @@ -137,9 +137,9 @@ if ('onhashchange' in window) { 76 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi 77 # var w/edx : int = out->write 78 8b/copy 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # copy *edi to edx - 79 # var curr/ecx : (address byte) = &out->data[out->write] + 79 # var curr/ecx : (addr byte) = &out->data[out->write] 80 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx . 1/r32/ecx 0xc/disp8 . # copy ebx+edx+12 to ecx - 81 # var max/ebx : (address byte) = &out->data[out->length] + 81 # var max/ebx : (addr byte) = &out->data[out->length] 82 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 8/disp8 . # copy *(edi+8) to ebx 83 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 3/index/ebx . 3/r32/ebx 0xc/disp8 . # copy edi+ebx+12 to ebx 84 $print-int32-decimal:write-loop: diff --git a/html/076next-word.subx.html b/html/076next-word.subx.html index c383fbd9..5eae28e9 100644 --- a/html/076next-word.subx.html +++ b/html/076next-word.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 7 8 # (re)compute the bounds of the next word in the line 9 # return empty string on reaching end of file - 10 next-word: # line : (address stream byte), out : (address slice) + 10 next-word: # line : (addr stream byte), out : (addr slice) 11 # . prologue 12 55/push-ebp 13 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/077subx-words.subx.html b/html/077subx-words.subx.html index df5994ba..e45bfd7f 100644 --- a/html/077subx-words.subx.html +++ b/html/077subx-words.subx.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 has-metadata?: # word : (address slice), s : (address string) -> eax : boolean + 8 has-metadata?: # word : (addr slice), s : (addr string) -> eax : boolean 9 # pseudocode: 10 # var twig : &slice = next-token-from-slice(word->start, word->end, '/') # skip name 11 # curr = twig->end @@ -84,7 +84,7 @@ if ('onhashchange' in window) { 25 57/push-edi 26 # esi = word 27 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - 28 # var edx : (address byte) = word->end + 28 # var edx : (addr byte) = word->end 29 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 . # copy *(esi+4) to edx 30 # var twig/edi : (ref slice) 31 68/push 0/imm32/end @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 275 #: - if it starts with '0x' it's treated as a number. (redundant) 276 #: - if it's two characters long, it can't be a name. Either it's a hex 277 #: byte, or it raises an error. -278 is-valid-name?: # in : (address slice) -> eax : boolean +278 is-valid-name?: # in : (addr slice) -> eax : boolean 279 # . prologue 280 55/push-ebp 281 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -343,7 +343,7 @@ if ('onhashchange' in window) { 284 56/push-esi 285 # esi = in 286 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi -287 # var start/ecx : (address byte) = in->start +287 # var start/ecx : (addr byte) = in->start 288 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx 289 $is-valid-name?:check0: 290 # if (start >= in->end) return false @@ -357,7 +357,7 @@ if ('onhashchange' in window) { 298 3d/compare-eax-and 2/imm32 299 74/jump-if-equal $is-valid-name?:false/disp8 300 $is-valid-name?:check2: -301 # var c/eax : (address byte) = *start +301 # var c/eax : (addr byte) = *start 302 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax 303 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL 304 # if (c == "-") return false @@ -591,7 +591,7 @@ if ('onhashchange' in window) { 532 5d/pop-to-ebp 533 c3/return 534 -535 is-label?: # word : (address slice) -> eax : boolean +535 is-label?: # word : (addr slice) -> eax : boolean 536 # . prologue 537 55/push-ebp 538 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -599,7 +599,7 @@ if ('onhashchange' in window) { 540 51/push-ecx 541 # ecx = word 542 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx -543 # var end/ecx : (address byte) = word->end +543 # var end/ecx : (addr byte) = word->end 544 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 1/r32/ecx 4/disp8 . # copy *(ecx+4) to ecx 545 # return *(end - 1) == ':' 546 # . eax = *(end-1) diff --git a/html/078emit-hex.subx.html b/html/078emit-hex.subx.html index d9e0dc6a..94b7eea1 100644 --- a/html/078emit-hex.subx.html +++ b/html/078emit-hex.subx.html @@ -63,7 +63,7 @@ if ('onhashchange' in window) { 4 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 5 6 # print 'n' in hex in 'width' bytes in lower-endian order, with a space after every byte - 7 emit-hex: # out : (address buffered-file), n : int, width : int + 7 emit-hex: # out : (addr buffered-file), n : int, width : int 8 # . prologue 9 55/push-ebp 10 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/079emit.subx.html b/html/079emit.subx.html index ed61ad03..18e9631e 100644 --- a/html/079emit.subx.html +++ b/html/079emit.subx.html @@ -68,7 +68,7 @@ if ('onhashchange' in window) { 7 # it in 'width' bytes of hex, least significant first. 8 # Otherwise just print the entire word including metadata. 9 # Always print a trailing space. - 10 emit: # out : (address buffered-file), word : (address slice), width : int + 10 emit: # out : (addr buffered-file), word : (addr slice), width : int 11 # . prologue 12 55/push-ebp 13 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp diff --git a/html/080zero-out.subx.html b/html/080zero-out.subx.html index f9163495..9f39374e 100644 --- a/html/080zero-out.subx.html +++ b/html/080zero-out.subx.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 zero-out: # start : (address byte), len : int + 8 zero-out: # start : (addr byte), len : int 9 # pseudocode: 10 # curr/esi = start 11 # i/ecx = 0 diff --git a/html/081table.subx.html b/html/081table.subx.html index 3080d171..439aec66 100644 --- a/html/081table.subx.html +++ b/html/081table.subx.html @@ -61,7 +61,7 @@ if ('onhashchange' in window) {
    1 # A table is a stream of (key, value) rows.
    2 #
-   3 # Each row consists of a 4-byte key -- a 'string_key' which is (address array
+   3 # Each row consists of a 4-byte key -- a 'string_key' which is (addr array
    4 # byte) -- and a variable-size value.
    5 #
    6 # Accessing the table performs a linear scan for a key string, and always
@@ -84,8 +84,8 @@ if ('onhashchange' in window) {
   23 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   24 
   25 # if no row is found, abort
-  26 # type string_key = (address array byte)
-  27 get:  # table : (address stream {string_key, T}), key : string_key, row-size : int, abort-message-prefix : (address array byte) -> eax : (address T)
+  26 # type string_key = (addr array byte)
+  27 get:  # table : (addr stream {string_key, T}), key : string_key, row-size : int, abort-message-prefix : (addr array byte) -> eax : (addr T)
   28     # pseudocode:
   29     #   curr = table->data
   30     #   max = &table->data[table->write]
@@ -104,9 +104,9 @@ if ('onhashchange' in window) {
   43     56/push-esi
   44     # esi = table
   45     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
-  46     # var curr/ecx : (address string_key) = table->data
+  46     # var curr/ecx : (addr string_key) = table->data
   47     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
-  48     # var max/edx : (address byte) = &table->data[table->write]
+  48     # var max/edx : (addr byte) = &table->data[table->write]
   49     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
   50     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
   51 $get:search-loop:
@@ -259,7 +259,7 @@ if ('onhashchange' in window) {
  198     c3/return
  199 
  200 # if no row is found, abort
- 201 get-slice:  # table : (address stream {string_key, T}), key : (address slice), row-size : int, abort-message-prefix : (address array byte) -> eax : (address T)
+ 201 get-slice:  # table : (addr stream {string_key, T}), key : (addr slice), row-size : int, abort-message-prefix : (addr array byte) -> eax : (addr T)
  202     # pseudocode:
  203     #   curr = table->data
  204     #   max = &table->data[table->write]
@@ -278,9 +278,9 @@ if ('onhashchange' in window) {
  217     56/push-esi
  218     # esi = table
  219     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
- 220     # var curr/ecx : (address string_key) = table->data
+ 220     # var curr/ecx : (addr string_key) = table->data
  221     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
- 222     # var max/edx : (address byte) = &table->data[table->write]
+ 222     # var max/edx : (addr byte) = &table->data[table->write]
  223     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
  224     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
  225 $get-slice:search-loop:
@@ -462,7 +462,7 @@ if ('onhashchange' in window) {
  401 # return the address of the value
  402 # Beware: assume keys are immutable; they're inserted by reference
  403 # TODO: pass in an allocation descriptor
- 404 get-or-insert:  # table : (address stream {string_key, T}), key : string_key, row-size : int -> eax : (address T)
+ 404 get-or-insert:  # table : (addr stream {string_key, T}), key : string_key, row-size : int -> eax : (addr T)
  405     # pseudocode:
  406     #   curr = table->data
  407     #   max = &table->data[table->write]
@@ -486,9 +486,9 @@ if ('onhashchange' in window) {
  425     56/push-esi
  426     # esi = table
  427     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
- 428     # var curr/ecx : (address string_key) = table->data
+ 428     # var curr/ecx : (addr string_key) = table->data
  429     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
- 430     # var max/edx : (address string_key) = &table->data[table->write]
+ 430     # var max/edx : (addr string_key) = &table->data[table->write]
  431     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
  432     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
  433 $get-or-insert:search-loop:
@@ -713,7 +713,7 @@ if ('onhashchange' in window) {
  652 # if there are no rows free, abort
  653 # WARNING: leaks memory
  654 # TODO: pass in an allocation descriptor
- 655 leaky-get-or-insert-slice:  # table : (address stream {string_key, T}), key : (address slice), row-size : int -> eax : (address T)
+ 655 leaky-get-or-insert-slice:  # table : (addr stream {string_key, T}), key : (addr slice), row-size : int -> eax : (addr T)
  656     # pseudocode:
  657     #   curr = table->data
  658     #   max = &table->data[table->write]
@@ -737,9 +737,9 @@ if ('onhashchange' in window) {
  676     56/push-esi
  677     # esi = table
  678     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
- 679     # var curr/ecx : (address string_key) = table->data
+ 679     # var curr/ecx : (addr string_key) = table->data
  680     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
- 681     # var max/edx : (address string_key) = &table->data[table->write]
+ 681     # var max/edx : (addr string_key) = &table->data[table->write]
  682     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
  683     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
  684 $leaky-get-or-insert-slice:search-loop:
@@ -985,9 +985,9 @@ if ('onhashchange' in window) {
  924     c3/return
  925 
  926 # if no row is found, stop(ed)
- 927 get-or-stop:  # table : (address stream {string_key, T}), key : string_key, row-size : int,
- 928               # abort-message-prefix : (address array byte), err : (address buffered-file), ed : (address exit-descriptor)
- 929               # -> eax : (address T)
+ 927 get-or-stop:  # table : (addr stream {string_key, T}), key : string_key, row-size : int,
+ 928               # abort-message-prefix : (addr array byte), err : (addr buffered-file), ed : (addr exit-descriptor)
+ 929               # -> eax : (addr T)
  930     # pseudocode:
  931     #   curr = table->data
  932     #   max = &table->data[table->write]
@@ -1007,9 +1007,9 @@ if ('onhashchange' in window) {
  946     56/push-esi
  947     # esi = table
  948     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
- 949     # var curr/ecx : (address string_key) = table->data
+ 949     # var curr/ecx : (addr string_key) = table->data
  950     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
- 951     # var max/edx : (address byte) = &table->data[table->write]
+ 951     # var max/edx : (addr byte) = &table->data[table->write]
  952     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
  953     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
  954 $get-or-stop:search-loop:
@@ -1201,9 +1201,9 @@ if ('onhashchange' in window) {
 1140     c3/return
 1141 
 1142 # if no row is found, stop(ed)
-1143 get-slice-or-stop:  # table : (address stream {string_key, _}), key : (address slice), row-size : int,
-1144                     # abort-message-prefix : (address string), err : (address buffered-file), ed : (address exit-descriptor)
-1145                     # -> eax : (address _)
+1143 get-slice-or-stop:  # table : (addr stream {string_key, _}), key : (addr slice), row-size : int,
+1144                     # abort-message-prefix : (addr string), err : (addr buffered-file), ed : (addr exit-descriptor)
+1145                     # -> eax : (addr _)
 1146     # pseudocode:
 1147     #   curr = table->data
 1148     #   max = &table->data[table->write]
@@ -1223,9 +1223,9 @@ if ('onhashchange' in window) {
 1162     56/push-esi
 1163     # esi = table
 1164     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
-1165     # var curr/ecx : (address string_key) = table->data
+1165     # var curr/ecx : (addr string_key) = table->data
 1166     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
-1167     # var max/edx : (address byte) = &table->data[table->write]
+1167     # var max/edx : (addr byte) = &table->data[table->write]
 1168     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
 1169     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
 1170 $get-slice-or-stop:search-loop:
@@ -1440,7 +1440,7 @@ if ('onhashchange' in window) {
 1379     c3/return
 1380 
 1381 # if no row is found, return null (0)
-1382 maybe-get:  # table : (address stream {string_key, T}), key : string_key, row-size : int -> eax : (address T)
+1382 maybe-get:  # table : (addr stream {string_key, T}), key : string_key, row-size : int -> eax : (addr T)
 1383     # pseudocode:
 1384     #   curr = table->data
 1385     #   max = &table->data[table->write]
@@ -1459,9 +1459,9 @@ if ('onhashchange' in window) {
 1398     56/push-esi
 1399     # esi = table
 1400     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
-1401     # var curr/ecx : (address string_key) = table->data
+1401     # var curr/ecx : (addr string_key) = table->data
 1402     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
-1403     # var max/edx : (address byte) = &table->data[table->write]
+1403     # var max/edx : (addr byte) = &table->data[table->write]
 1404     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
 1405     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
 1406 $maybe-get:search-loop:
@@ -1587,7 +1587,7 @@ if ('onhashchange' in window) {
 1526     c3/return
 1527 
 1528 # if no row is found, return null (0)
-1529 maybe-get-slice:  # table : (address stream {string_key, T}), key : (address slice), row-size : int -> eax : (address T)
+1529 maybe-get-slice:  # table : (addr stream {string_key, T}), key : (addr slice), row-size : int -> eax : (addr T)
 1530     # pseudocode:
 1531     #   curr = table->data
 1532     #   max = &table->data[table->write]
@@ -1606,9 +1606,9 @@ if ('onhashchange' in window) {
 1545     56/push-esi
 1546     # esi = table
 1547     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
-1548     # var curr/ecx : (address string_key) = table->data
+1548     # var curr/ecx : (addr string_key) = table->data
 1549     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy esi+12 to ecx
-1550     # var max/edx : (address byte) = &table->data[table->write]
+1550     # var max/edx : (addr byte) = &table->data[table->write]
 1551     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
 1552     8d/copy-address                 0/mod/indirect  4/rm32/sib    1/base/ecx  2/index/edx   .           2/r32/edx   .               .                 # copy ecx+edx to edx
 1553 $maybe-get-slice:search-loop:
diff --git a/html/082slurp.subx.html b/html/082slurp.subx.html
index aabab90e..3a21e3f3 100644
--- a/html/082slurp.subx.html
+++ b/html/082slurp.subx.html
@@ -64,7 +64,7 @@ if ('onhashchange' in window) {
   5 
   6 # read all bytes from 'f' and store them into 's'
   7 # abort if 's' is too small
-  8 slurp:  # f : (address buffered-file), s : (address stream byte)
+  8 slurp:  # f : (addr buffered-file), s : (addr stream byte)
   9     # pseudocode:
  10     #   while true
  11     #     if (s->write >= s->length) abort
diff --git a/html/083subx-widths.subx.html b/html/083subx-widths.subx.html
index 82006604..9c06167a 100644
--- a/html/083subx-widths.subx.html
+++ b/html/083subx-widths.subx.html
@@ -67,7 +67,7 @@ if ('onhashchange' in window) {
   8 # . op          subop               mod             rm32          base        index         scale       r32
   9 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
  10 
- 11 compute-width: # word : (address array byte) -> eax : int
+ 11 compute-width: # word : (addr array byte) -> eax : int
  12     # . prologue
  13     55/push-ebp
  14     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -75,7 +75,7 @@ if ('onhashchange' in window) {
  16     51/push-ecx
  17     # eax = word
  18     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   8/disp8         .                 # copy *(ebp+8) to ecx
- 19     # var ecx : (address byte) = &word[word->length]
+ 19     # var ecx : (addr byte) = &word[word->length]
  20     8b/copy                         0/mod/indirect  0/rm32/eax    .           .             .           1/r32/ecx   .               .                 # copy *eax to ecx
  21     8d/copy-address                 1/mod/*+disp8   4/rm32/sib    0/base/eax  1/index/ecx   .           1/r32/ecx   4/disp8         .                 # copy eax+ecx+4 to ecx
  22     # eax = word->data
@@ -101,7 +101,7 @@ if ('onhashchange' in window) {
  42     5d/pop-to-ebp
  43     c3/return
  44 
- 45 compute-width-of-slice: # s : (address slice) -> eax : int
+ 45 compute-width-of-slice: # s : (addr slice) -> eax : int
  46     # . prologue
  47     55/push-ebp
  48     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/084emit-hex-array.subx.html b/html/084emit-hex-array.subx.html
index e4d39d23..836f53f9 100644
--- a/html/084emit-hex-array.subx.html
+++ b/html/084emit-hex-array.subx.html
@@ -64,7 +64,7 @@ if ('onhashchange' in window) {
   4 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   5 
   6 # print 'arr' in hex with a space after every byte
-  7 emit-hex-array:  # out : (address buffered-file), arr : (address array byte)
+  7 emit-hex-array:  # out : (addr buffered-file), arr : (addr array byte)
   8     # . prologue
   9     55/push-ebp
  10     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -77,9 +77,9 @@ if ('onhashchange' in window) {
  17     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           7/r32/edi   8/disp8         .                 # copy *(ebp+8) to edi
  18     # edx = arr
  19     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           2/r32/edx   0xc/disp8       .                 # copy *(ebp+12) to edx
- 20     # var curr/ecx : (address byte) = arr->data
+ 20     # var curr/ecx : (addr byte) = arr->data
  21     8d/copy-address                 1/mod/*+disp8   2/rm32/edx    .           .             .           1/r32/ecx   4/disp8         .                 # copy edx+4 to ecx
- 22     # var max/edx : (address byte) = &arr->data[arr->length]
+ 22     # var max/edx : (addr byte) = &arr->data[arr->length]
  23     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           2/r32/edx   .               .                 # copy *edx to edx
  24     01/add                          3/mod/direct    2/rm32/edx    .           .             .           1/r32/ecx   .               .                 # add ecx to edx
  25     # var c/eax : byte = 0
diff --git a/html/092write-int.subx.html b/html/092write-int.subx.html
index 44989ebf..fe9d318e 100644
--- a/html/092write-int.subx.html
+++ b/html/092write-int.subx.html
@@ -65,7 +65,7 @@ if ('onhashchange' in window) {
   5 # . op          subop               mod             rm32          base        index         scale       r32
   6 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   7 
-  8 write-int:  # out : (address stream byte), n : int
+  8 write-int:  # out : (addr stream byte), n : int
   9     # . prologue
  10     55/push-ebp
  11     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/093array-equal.subx.html b/html/093array-equal.subx.html
index 4da63790..dabe8ef2 100644
--- a/html/093array-equal.subx.html
+++ b/html/093array-equal.subx.html
@@ -66,7 +66,7 @@ if ('onhashchange' in window) {
   5 # . op          subop               mod             rm32          base        index         scale       r32
   6 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   7 
-  8 array-equal?:  # a : (address array int), b : (address array int) -> eax : boolean
+  8 array-equal?:  # a : (addr array int), b : (addr array int) -> eax : boolean
   9     # pseudocode:
  10     #   lena = a->length
  11     #   if (lena != b->length) return false
@@ -107,9 +107,9 @@ if ('onhashchange' in window) {
  46     # if (lena != b->length) return false
  47     39/compare                      0/mod/indirect  7/rm32/edi    .           .             .           2/r32/edx   .               .                 # compare *edi and edx
  48     75/jump-if-not-equal  $array-equal?:false/disp8
- 49     # var curra/esi : (address byte) = a->data
+ 49     # var curra/esi : (addr byte) = a->data
  50     81          0/subop/add         3/mod/direct    6/rm32/esi    .           .             .           .           .               4/imm32           # add to esi
- 51     # var currb/edi : (address byte) = b->data
+ 51     # var currb/edi : (addr byte) = b->data
  52     81          0/subop/add         3/mod/direct    7/rm32/edi    .           .             .           .           .               4/imm32           # add to edi
  53     # var i/ecx : int = 0
  54     31/xor                          3/mod/direct    1/rm32/ecx    .           .             .           1/r32/ecx   .               .                 # clear ecx
@@ -291,7 +291,7 @@ if ('onhashchange' in window) {
 230     5d/pop-to-ebp
 231     c3/return
 232 
-233 parse-array-of-ints:  # ad : (address allocation-descriptor), s : (address string) -> result/eax : (handle array int)
+233 parse-array-of-ints:  # ad : (addr allocation-descriptor), s : (addr string) -> result/eax : (handle array int)
 234     # pseudocode
 235     #   end = &s->data[s->length]
 236     #   curr = s->data
@@ -327,9 +327,9 @@ if ('onhashchange' in window) {
 266     57/push-edi
 267     # esi = s
 268     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   0xc/disp8       .                 # copy *(ebp+12) to esi
-269     # var curr/ecx : (address byte) = s->data
+269     # var curr/ecx : (addr byte) = s->data
 270     8d/copy-address                 1/mod/*+disp8   6/rm32/esi    .           .             .           1/r32/ecx   4/disp8         .                 # copy esi+4 to ecx
-271     # var end/edx : (address byte) = &s->data[s->length]
+271     # var end/edx : (addr byte) = &s->data[s->length]
 272     # . edx = s->length
 273     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
 274     # . edx += curr
@@ -395,7 +395,7 @@ if ('onhashchange' in window) {
 334     51/push-ecx
 335     # . bookmark
 336     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-337     # var out/ebx : (address byte) = result->data
+337     # var out/ebx : (addr byte) = result->data
 338     8d/copy-address                 1/mod/*+disp8   0/rm32/eax    .           .             .           3/r32/ebx   4/disp8         .                 # copy eax+4 to ebx
 339 $parse-array-of-ints:loop2:
 340     # if (slice->start >= end) break
@@ -597,7 +597,7 @@ if ('onhashchange' in window) {
 536 
 537 # helper for later tests
 538 # compare an array with a string representation of an array literal
-539 check-array-equal:  # a : (address array int), expected : (address string), msg : (address string)
+539 check-array-equal:  # a : (addr array int), expected : (addr string), msg : (addr string)
 540     # . prologue
 541     55/push-ebp
 542     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/094next-word-or-string.subx.html b/html/094next-word-or-string.subx.html
index 71530620..df152bca 100644
--- a/html/094next-word-or-string.subx.html
+++ b/html/094next-word-or-string.subx.html
@@ -64,7 +64,7 @@ if ('onhashchange' in window) {
   5 
   6 # (re)compute the bounds of the next word or string literal in the line
   7 # return empty string on reaching end of file
-  8 next-word-or-string:  # line : (address stream byte), out : (address slice)
+  8 next-word-or-string:  # line : (addr stream byte), out : (addr slice)
   9     # . prologue
  10     55/push-ebp
  11     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/095stack.subx.html b/html/095stack.subx.html
index 988bac36..29c47744 100644
--- a/html/095stack.subx.html
+++ b/html/095stack.subx.html
@@ -67,7 +67,7 @@ if ('onhashchange' in window) {
   7 # . op          subop               mod             rm32          base        index         scale       r32
   8 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   9 
- 10 clear-stack:  # s : (address stack)
+ 10 clear-stack:  # s : (addr stack)
  11     # . prologue
  12     55/push-ebp
  13     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -76,12 +76,12 @@ if ('onhashchange' in window) {
  16     51/push-ecx
  17     # eax = s
  18     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           0/r32/eax   8/disp8         .                 # copy *(ebp+8) to eax
- 19     # var max/ecx : (address byte) = &s->data[s->length]
+ 19     # var max/ecx : (addr byte) = &s->data[s->length]
  20     8b/copy                         1/mod/*+disp8   0/rm32/eax    .           .             .           1/r32/ecx   4/disp8         .                 # copy *(eax+4) to eax
  21     8d/copy-address                 1/mod/*+disp8   4/rm32/sib    0/base/eax  1/index/ecx   .           1/r32/ecx   8/disp8         .                 # copy eax+ecx+8 to ecx
  22     # s->top = 0
  23     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm32           # copy to *eax
- 24     # var curr/eax : (address byte) = s->data
+ 24     # var curr/eax : (addr byte) = s->data
  25     81          0/subop/add         3/mod/direct    0/rm32/eax    .           .             .           .           .               8/imm32           # add to eax
  26 $clear-stack:loop:
  27     # if (curr >= max) break
@@ -167,7 +167,7 @@ if ('onhashchange' in window) {
 107     5d/pop-to-ebp
 108     c3/return
 109 
-110 push:  # s : (address stack), n : int
+110 push:  # s : (addr stack), n : int
 111     # . prologue
 112     55/push-ebp
 113     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -287,7 +287,7 @@ if ('onhashchange' in window) {
 227     5d/pop-to-ebp
 228     c3/return
 229 
-230 pop:  # s : (address stack) -> n/eax : int
+230 pop:  # s : (addr stack) -> n/eax : int
 231     # . prologue
 232     55/push-ebp
 233     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -391,7 +391,7 @@ if ('onhashchange' in window) {
 331     5d/pop-to-ebp
 332     c3/return
 333 
-334 top:  # s : (address stack) -> n/eax : int
+334 top:  # s : (addr stack) -> n/eax : int
 335     # . prologue
 336     55/push-ebp
 337     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/assort.subx.html b/html/apps/assort.subx.html
index d6c66612..9823f5f6 100644
--- a/html/apps/assort.subx.html
+++ b/html/apps/assort.subx.html
@@ -145,12 +145,12 @@ if ('onhashchange' in window) {
  83     cd/syscall  0x80/imm8
  84 
  85 # data structure:
- 86 #   table: (address stream {string, (address stream byte)})     (8 bytes per row)
+ 86 #   table: (addr stream {string, (addr stream byte)})     (8 bytes per row)
  87 # inefficient; uses sequential search for looking up segments by name
  88 
- 89 subx-assort:  # in : (address buffered-file), out : (address buffered-file)
+ 89 subx-assort:  # in : (addr buffered-file), out : (addr buffered-file)
  90     # pseudocode:
- 91     #   var table : (address stream {string, (address stream byte)} 10/rows)
+ 91     #   var table : (addr stream {string, (addr stream byte)} 10/rows)
  92     #   read-segments(in, table)
  93     #   write-segments(out, table)
  94     #
@@ -159,7 +159,7 @@ if ('onhashchange' in window) {
  97     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
  98     # . save registers
  99     51/push-ecx
-100     # var table/ecx : (ref stream {string, (address stream byte)} 80)  # 10 rows * 8 bytes/row
+100     # var table/ecx : (ref stream {string, (addr stream byte)} 80)  # 10 rows * 8 bytes/row
 101     81          5/subop/subtract    3/mod/direct    4/rm32/esp    .           .             .           .           .               0x50/imm32        # subtract from esp
 102     68/push  0x50/imm32/length
 103     68/push  0/imm32/read
@@ -464,10 +464,10 @@ if ('onhashchange' in window) {
 450     5d/pop-to-ebp
 451     c3/return
 452 
-453 # type string_key = (address array byte)
+453 # type string_key = (addr array byte)
 454 
 455 # beware: leaks memory (one name per segment read)
-456 read-segments:  # in : (address buffered-file), table : (address stream {string_key, (handle stream byte)})
+456 read-segments:  # in : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)})
 457     # pseudocode:
 458     #   var curr-segment : (handle stream byte) = 0
 459     #   var line : (stream byte 512)
@@ -565,7 +565,7 @@ if ('onhashchange' in window) {
 591 $read-segments:check-for-comment:
 592 +--  9 lines: #?     # print("check for comment\n") ----------------------------------------------------------------------------------------------------------
 601     # if (slice-starts-with?(word-slice, "#")) continue
-602     # . var start/esi : (address byte) = word-slice->start
+602     # . var start/esi : (addr byte) = word-slice->start
 603     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           6/r32/esi   .               .                 # copy *ecx to esi
 604     # . var c/eax : byte = *start
 605     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -597,7 +597,7 @@ if ('onhashchange' in window) {
 678     # . . discard args
 679     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 680 +-- 40 lines: #?     # dump segment name ---------------------------------------------------------------------------------------------------------------------
-720     # var segment-slot/eax : (address handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8)
+720     # var segment-slot/eax : (addr handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8)
 721     # . . push args
 722     68/push  8/imm32/row-size
 723     52/push-edx
@@ -667,7 +667,7 @@ if ('onhashchange' in window) {
 843     5d/pop-to-ebp
 844     c3/return
 845 
-846 write-segments:  # out : (address buffered-file), table : (address stream {string_key, (handle stream byte)})
+846 write-segments:  # out : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)})
 847     # pseudocode:
 848     #   var curr = table->data
 849     #   var max = &table->data[table->write]
@@ -688,15 +688,15 @@ if ('onhashchange' in window) {
 864     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   0xc/disp8       .                 # copy *(ebp+12) to esi
 865     # var write/edx : int = table->write
 866     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
-867     # var curr/esi : (address byte) = table->data
+867     # var curr/esi : (addr byte) = table->data
 868     81          0/subop/add         3/mod/direct    6/rm32/esi    .           .             .           .           .               0xc/imm32         # add to eax
-869     # var max/edx : (address byte) = curr + write
+869     # var max/edx : (addr byte) = curr + write
 870     01/add                          3/mod/direct    2/rm32/edx    .           .             .           6/r32/esi   .               .                 # add esi to edx
 871 $write-segments:loop:
 872     # if (curr >= max) break
 873     39/compare                      3/mod/direct    6/rm32/esi    .           .             .           2/r32/edx   .               .                 # compare esi with edx
 874     73/jump-if-greater-or-equal-unsigned  $write-segments:break/disp8
-875     # var stream/eax : (address stream byte) = table[i].stream
+875     # var stream/eax : (addr stream byte) = table[i].stream
 876     8b/copy                         1/mod/*+disp8   6/rm32/esi    .           .             .           0/r32/eax   4/disp8         .                 # copy *(esi+4) to eax
 877     # write-stream-data(out, stream)
 878     # . . push args
diff --git a/html/apps/braces.subx.html b/html/apps/braces.subx.html
index 50639b81..9f8256cf 100644
--- a/html/apps/braces.subx.html
+++ b/html/apps/braces.subx.html
@@ -134,7 +134,7 @@ if ('onhashchange' in window) {
  75     b8/copy-to-eax 1/imm32/exit
  76     cd/syscall 0x80/imm8
  77 
- 78 subx-braces:  # in : (address buffered-file), out : (address buffered-file)
+ 78 subx-braces:  # in : (addr buffered-file), out : (addr buffered-file)
  79     # pseudocode:
  80     #   var line : (ref stream byte 512)
  81     #   var label-stack : (stack int 32)  # at most 32 levels of nesting
@@ -154,7 +154,7 @@ if ('onhashchange' in window) {
  95     #       print(out, "_break" top ":\n")
  96     #       continue
  97     #     while true
- 98     #       var word-slice : (address slice) = next-word-or-string(line)
+ 98     #       var word-slice : (addr slice) = next-word-or-string(line)
  99     #       if slice-empty?(word-slice)                         # end of line
 100     #         break
 101     #       if slice-starts-with?(word-slice, "#")              # comment
diff --git a/html/apps/calls.subx.html b/html/apps/calls.subx.html
index 9f78d04d..c8949bbd 100644
--- a/html/apps/calls.subx.html
+++ b/html/apps/calls.subx.html
@@ -136,7 +136,7 @@ if ('onhashchange' in window) {
   75     b8/copy-to-eax 1/imm32/exit
   76     cd/syscall 0x80/imm8
   77 
-  78 subx-calls:  # in : (address buffered-file), out : (address buffered-file)
+  78 subx-calls:  # in : (addr buffered-file), out : (addr buffered-file)
   79     # pseudocode:
   80     #   var line : (ref stream byte 512)
   81     #   var words : (ref stream slice 16)  # at most function name and 15 args
@@ -292,7 +292,7 @@ if ('onhashchange' in window) {
  231     5d/pop-to-ebp
  232     c3/return
  233 
- 234 parse-line:  # line : (address stream byte), words : (address stream slice)
+ 234 parse-line:  # line : (addr stream byte), words : (addr stream slice)
  235     # pseudocode:
  236     #   var word-slice : (ref slice)
  237     #   while true
@@ -362,7 +362,7 @@ if ('onhashchange' in window) {
  340     5d/pop-to-ebp
  341     c3/return
  342 
- 343 emit-call:  # out : (address buffered-file), words : (address stream slice)
+ 343 emit-call:  # out : (addr buffered-file), words : (addr stream slice)
  344     # pseudocode:
  345     #   if (words->write < 8) abort
  346     #   curr = &words->data[words->write-8]
@@ -403,9 +403,9 @@ if ('onhashchange' in window) {
  381     8b/-> *esi 1/r32/ecx
  382     81 5/subop/subtract %ecx 8/imm32
  383     0f 8c/jump-if-lesser $emit-call:error1/disp32
- 384     # var curr/ecx : (address slice) = &words->data[words->write-8]
+ 384     # var curr/ecx : (addr slice) = &words->data[words->write-8]
  385     8d/copy-address *(esi+ecx+0xc) 1/r32/ecx
- 386     # var min/edx : (address byte) = words->data
+ 386     # var min/edx : (addr byte) = words->data
  387     8d/copy-address *(esi+0xc) 2/r32/edx
  388     # - emit pushes
  389 $emit-call:push-loop:
@@ -413,7 +413,7 @@ if ('onhashchange' in window) {
  391     39/compare %ecx 2/r32/edx
  392     0f 8e/jump-if-lesser-or-equal $emit-call:call-instruction/disp32
  393     # if (*curr->start in '%' '*') goto push-rm32
- 394     # . var start/eax : (address byte) = curr->start
+ 394     # . var start/eax : (addr byte) = curr->start
  395     8b/-> *ecx 0/r32/eax
  396     # . var c/eax : byte = *eax
  397     8b/-> *eax 0/r32/eax
@@ -731,7 +731,7 @@ if ('onhashchange' in window) {
  741     5d/pop-to-ebp
  742     c3/return
  743 
- 744 next-word-string-or-expression-without-metadata:  # line : (address stream byte), out : (address slice)
+ 744 next-word-string-or-expression-without-metadata:  # line : (addr stream byte), out : (addr slice)
  745     # pseudocode:
  746     #   skip-chars-matching(line, ' ')
  747     #   if line->read >= line->write              # end of line
diff --git a/html/apps/crenshaw2-1.subx.html b/html/apps/crenshaw2-1.subx.html
index df65b454..35d75540 100644
--- a/html/apps/crenshaw2-1.subx.html
+++ b/html/apps/crenshaw2-1.subx.html
@@ -151,7 +151,7 @@ if ('onhashchange' in window) {
  90     cd/syscall  0x80/imm8
  91 
  92 # the main entry point
- 93 compile:  # in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)
+ 93 compile:  # in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)
  94     # . prologue
  95     55/push-ebp
  96     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -252,7 +252,7 @@ if ('onhashchange' in window) {
 191 # space in 'out'.
 192 # Input comes from the global variable 'Look' (first byte) and the argument
 193 # 'in' (rest). We leave the next byte from 'in' into 'Look' on exit.
-194 get-num:  # in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)
+194 get-num:  # in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)
 195     # pseudocode:
 196     #   if (!is-digit?(Look)) expected(ed, err, "integer")
 197     #   if out->write >= out->length
@@ -531,7 +531,7 @@ if ('onhashchange' in window) {
 470 ## helpers
 471 
 472 # write(f, "Error: "+s+" expected\n") then stop(ed, 1)
-473 expected:  # ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte)
+473 expected:  # ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte)
 474     # . prologue
 475     55/push-ebp
 476     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -573,7 +573,7 @@ if ('onhashchange' in window) {
 512     c3/return
 513 
 514 # read a byte from 'f', and save it in 'Look'
-515 get-char:  # f : (address buffered-file)
+515 get-char:  # f : (addr buffered-file)
 516     # . prologue
 517     55/push-ebp
 518     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/crenshaw2-1b.subx.html b/html/apps/crenshaw2-1b.subx.html
index 1c15f4f9..097d27f4 100644
--- a/html/apps/crenshaw2-1b.subx.html
+++ b/html/apps/crenshaw2-1b.subx.html
@@ -151,7 +151,7 @@ if ('onhashchange' in window) {
  90     cd/syscall  0x80/imm8
  91 
  92 # the main entry point
- 93 compile:  # in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)
+ 93 compile:  # in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)
  94     # . prologue
  95     55/push-ebp
  96     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -252,7 +252,7 @@ if ('onhashchange' in window) {
 191 # no space in 'out'.
 192 # Input comes from the global variable 'Look' (first byte) and the argument
 193 # 'in' (rest). We leave the next byte from 'in' into 'Look' on exit.
-194 get-num:  # in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)
+194 get-num:  # in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)
 195     # pseudocode:
 196     #   if (!is-digit?(Look)) expected(ed, err, "integer")
 197     #   do
@@ -725,7 +725,7 @@ if ('onhashchange' in window) {
 664 ## helpers
 665 
 666 # write(f, "Error: "+s+" expected\n") then stop(ed, 1)
-667 expected:  # ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte)
+667 expected:  # ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte)
 668     # . prologue
 669     55/push-ebp
 670     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -767,7 +767,7 @@ if ('onhashchange' in window) {
 706     c3/return
 707 
 708 # read a byte from 'f', and save it in 'Look'
-709 get-char:  # f : (address buffered-file)
+709 get-char:  # f : (addr buffered-file)
 710     # . prologue
 711     55/push-ebp
 712     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/dquotes.subx.html b/html/apps/dquotes.subx.html
index b0d80c00..f6a880b6 100644
--- a/html/apps/dquotes.subx.html
+++ b/html/apps/dquotes.subx.html
@@ -145,7 +145,7 @@ if ('onhashchange' in window) {
   82 #   line = words separated by ' ', maybe followed by comment starting with '#'
   83 #   word = datum until '/', then 0 or more metadata separated by '/'
   84 
-  85 subx-dquotes:  # in : (address buffered-file), out : (address buffered-file)
+  85 subx-dquotes:  # in : (addr buffered-file), out : (addr buffered-file)
   86     # pseudocode:
   87     #   var line : (ref stream byte 512)
   88     #   var new-data-segment : (handle stream byte) = new-stream(Heap, Segment-size, 1)
@@ -261,7 +261,7 @@ if ('onhashchange' in window) {
  198     0f 85/jump-if-not-equal  $subx-dquotes:next-line/disp32
  199 $subx-dquotes:check-for-comment:
  200     # if (slice-starts-with?(word-slice, "#")) continue
- 201     # . var start/esi : (address byte) = word-slice->start
+ 201     # . var start/esi : (addr byte) = word-slice->start
  202     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           6/r32/esi   .               .                 # copy *edx to esi
  203     # . var c/eax : byte = *start
  204     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -350,7 +350,7 @@ if ('onhashchange' in window) {
  287 
  288 # Write out 'string-literal' in a new format to 'out-segment', assign it a new
  289 # label, and write the new label out to 'out'.
- 290 process-string-literal:  # string-literal : (address slice), out : (address buffered-file), out-segment : (address stream byte)
+ 290 process-string-literal:  # string-literal : (addr slice), out : (addr buffered-file), out-segment : (addr stream byte)
  291     # pseudocode:
  292     #   print(out-segment, "_string#{Next-string-literal}:\n")
  293     #   emit-string-literal-data(out-segment, string-literal)
@@ -852,7 +852,7 @@ if ('onhashchange' in window) {
  846     c3/return
  847 
  848 # generate the data segment contents byte by byte for a given slice
- 849 emit-string-literal-data:  # out : (address stream byte), word : (address slice)
+ 849 emit-string-literal-data:  # out : (addr stream byte), word : (addr slice)
  850     # pseudocode
  851     #   len = string-length-at-start-of-slice(word->start, word->end)
  852     #   print(out, "#{len}/imm32 ")
@@ -893,9 +893,9 @@ if ('onhashchange' in window) {
  887     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   0xc/disp8       .                 # copy *(ebp+12) to esi
  888     # var idx/ebx : int = 0
  889     31/xor                          3/mod/direct    3/rm32/ebx    .           .             .           3/r32/ebx   .               .                 # clear ebx
- 890     # var curr/edx : (address byte) = word->start
+ 890     # var curr/edx : (addr byte) = word->start
  891     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           2/r32/edx   .               .                 # copy *esi to edx
- 892     # var max/esi : (address byte) = word->end
+ 892     # var max/esi : (addr byte) = word->end
  893     8b/copy                         1/mod/*+disp8   6/rm32/esi    .           .             .           6/r32/esi   4/disp8         .                 # copy *(esi+4) to esi
  894 $emit-string-literal-data:emit-length:
  895     # var len/eax : int = string-length-at-start-of-slice(word->start, word->end)
@@ -1260,7 +1260,7 @@ if ('onhashchange' in window) {
 1379     c3/return
 1380 
 1381 # emit everything from a word except the initial datum
-1382 emit-metadata:  # out : (address buffered-file), word : (address slice)
+1382 emit-metadata:  # out : (addr buffered-file), word : (addr slice)
 1383     # pseudocode
 1384     #   var slice : (ref slice) = {0, word->end}
 1385     #   curr = word->start
@@ -1287,9 +1287,9 @@ if ('onhashchange' in window) {
 1406     56/push-esi
 1407     # esi = word
 1408     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   0xc/disp8       .                 # copy *(ebp+12) to esi
-1409     # var curr/ecx : (address byte) = word->start
+1409     # var curr/ecx : (addr byte) = word->start
 1410     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           1/r32/ecx   .               .                 # copy *esi to ecx
-1411     # var end/edx : (address byte) = word->end
+1411     # var end/edx : (addr byte) = word->end
 1412     8b/copy                         1/mod/*+disp8   6/rm32/esi    .           .             .           2/r32/edx   4/disp8         .                 # copy *(esi+4) to edx
 1413     # var slice/ebx : (ref slice) = {0, end}
 1414     52/push-edx
@@ -1634,7 +1634,7 @@ if ('onhashchange' in window) {
 1778     5d/pop-to-ebp
 1779     c3/return
 1780 
-1781 string-length-at-start-of-slice:  # curr : (address byte), end : (address byte) -> length/eax
+1781 string-length-at-start-of-slice:  # curr : (addr byte), end : (addr byte) -> length/eax
 1782     # . prologue
 1783     55/push-ebp
 1784     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/ex11.subx.html b/html/apps/ex11.subx.html
index 28fa18f0..84519e0e 100644
--- a/html/apps/ex11.subx.html
+++ b/html/apps/ex11.subx.html
@@ -320,7 +320,7 @@ if ('onhashchange' in window) {
 258 # - helpers
 259 
 260 # print msg to stderr if a != b, otherwise print "."
-261 check-ints-equal:  # (a : int, b : int, msg : (address array byte)) -> boolean
+261 check-ints-equal:  # (a : int, b : int, msg : (addr array byte)) -> boolean
 262     # . prologue
 263     55/push-ebp
 264     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -369,7 +369,7 @@ if ('onhashchange' in window) {
 307     5d/pop-to-ebp
 308     c3/return
 309 
-310 write-stderr:  # s : (address array byte) -> <void>
+310 write-stderr:  # s : (addr array byte) -> <void>
 311     # . prologue
 312     55/push-ebp
 313     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/ex8.subx.html b/html/apps/ex8.subx.html
index ab67bb1f..04c0e1cb 100644
--- a/html/apps/ex8.subx.html
+++ b/html/apps/ex8.subx.html
@@ -93,7 +93,7 @@ if ('onhashchange' in window) {
 34     89/copy                         3/mod/direct    3/rm32/ebx    .           .             .           0/r32/eax   .               .                 # copy eax to ebx
 35     e8/call  syscall_exit/disp32
 36 
-37 ascii-length:  # s : (address array byte) -> n/eax
+37 ascii-length:  # s : (addr array byte) -> n/eax
 38     # edx = s
 39     8b/copy                         1/mod/*+disp8   4/rm32/sib    4/base/esp  4/index/none  .           2/r32/edx   4/disp8         .                 # copy *(esp+4) to edx
 40     # var result/eax = 0
diff --git a/html/apps/handle.subx.html b/html/apps/handle.subx.html
index e4f90531..a7a8d6aa 100644
--- a/html/apps/handle.subx.html
+++ b/html/apps/handle.subx.html
@@ -107,7 +107,7 @@ if ('onhashchange' in window) {
  44     b8/copy-to-eax  1/imm32/exit
  45     cd/syscall  0x80/imm8
  46 
- 47 new:  # ad : (address allocation-descriptor), n : int, out : (handle _)
+ 47 new:  # ad : (addr allocation-descriptor), n : int, out : (handle _)
  48     # . prologue
  49     55/push-ebp
  50     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -284,7 +284,7 @@ if ('onhashchange' in window) {
 221     5d/pop-to-ebp
 222     c3/return
 223 
-224 lookup:  # h : (handle T) -> eax : (address T)
+224 lookup:  # h : (handle T) -> eax : (addr T)
 225     # . prologue
 226     55/push-ebp
 227     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/hex.subx.html b/html/apps/hex.subx.html
index e09ac4cd..bbf94945 100644
--- a/html/apps/hex.subx.html
+++ b/html/apps/hex.subx.html
@@ -138,7 +138,7 @@ if ('onhashchange' in window) {
   77     cd/syscall  0x80/imm8
   78 
   79 # the main entry point
-  80 subx-hex:  # in : (address buffered-file), out : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor)
+  80 subx-hex:  # in : (addr buffered-file), out : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor)
   81     # pseudocode:
   82     #   while true
   83     #     eax = convert-next-octet(in, err, ed)
@@ -196,7 +196,7 @@ if ('onhashchange' in window) {
  135 # raise an error and abort on all other unexpected bytes
  136 # return in eax an _octet_ containing the binary value of the two hex characters
  137 # return Eof on reaching end of file
- 138 convert-next-octet:  # in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax
+ 138 convert-next-octet:  # in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax
  139     # pseudocode:
  140     #   eax = scan-next-byte(in, err, ed)
  141     #   if (eax == Eof) return
@@ -542,7 +542,7 @@ if ('onhashchange' in window) {
  481 # return Eof if file ends without finding a hex byte
  482 # on '#' skip all bytes until newline
  483 # abort on any other byte
- 484 scan-next-byte:  # in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax
+ 484 scan-next-byte:  # in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax
  485     # pseudocode:
  486     #   while true
  487     #     eax = read-byte-buffered(in)
@@ -1411,7 +1411,7 @@ if ('onhashchange' in window) {
 1350     5d/pop-to-ebp
 1351     c3/return
 1352 
-1353 skip-until-newline:  # in : (address buffered-file)
+1353 skip-until-newline:  # in : (addr buffered-file)
 1354     # pseudocode:
 1355     #   push eax
 1356     #   while true
diff --git a/html/apps/mu.subx.html b/html/apps/mu.subx.html
index 8201c261..af5d5389 100644
--- a/html/apps/mu.subx.html
+++ b/html/apps/mu.subx.html
@@ -308,7 +308,7 @@ if ('onhashchange' in window) {
  246 
  247 == data
  248 
- 249 Program:  # (address (handle function))
+ 249 Program:  # (addr (handle function))
  250   0/imm32
  251 
  252 Function-name:
@@ -440,7 +440,7 @@ if ('onhashchange' in window) {
  378     b8/copy-to-eax 1/imm32/exit
  379     cd/syscall 0x80/imm8
  380 
- 381 convert-mu:  # in : (address buffered-file), out : (address buffered-file)
+ 381 convert-mu:  # in : (addr buffered-file), out : (addr buffered-file)
  382     # . prologue
  383     55/push-ebp
  384     89/<- %ebp 4/r32/esp
@@ -969,9 +969,9 @@ if ('onhashchange' in window) {
  952 # Parsing
  953 #######################################################
  954 
- 955 parse-mu:  # in : (address buffered-file)
+ 955 parse-mu:  # in : (addr buffered-file)
  956     # pseudocode
- 957     #   var curr-function : (address (handle function)) = Program
+ 957     #   var curr-function : (addr (handle function)) = Program
  958     #   var line : (ref stream byte 512)
  959     #   var word-slice : (ref slice)
  960     #   while true                                  # line loop
@@ -985,7 +985,7 @@ if ('onhashchange' in window) {
  968     #       continue                                # end of line
  969     #     else if slice-equal(word-slice, "fn")
  970     #       var new-function : (handle function) = allocate(function)
- 971     #       var vars : (ref stack (address var) 256)
+ 971     #       var vars : (ref stack (addr var) 256)
  972     #       populate-mu-function-header(in, new-function, vars)
  973     #       populate-mu-function-body(in, new-function, vars)
  974     #       assert(vars->top == 0)
@@ -1013,9 +1013,9 @@ if ('onhashchange' in window) {
  996     68/push 0/imm32/end
  997     68/push 0/imm32/start
  998     89/<- %edx 4/r32/esp
- 999     # var curr-function/edi : (address (handle function)) = Program
+ 999     # var curr-function/edi : (addr (handle function)) = Program
 1000     bf/copy-to-edi Program/imm32
-1001     # var vars/ebx : (ref stack (address var) 256)
+1001     # var vars/ebx : (ref stack (addr var) 256)
 1002     81 5/subop/subtract %esp 0x400/imm32
 1003     68/push 0x400/imm32/length
 1004     68/push 0/imm32/top
@@ -1112,7 +1112,7 @@ if ('onhashchange' in window) {
 1100 # ✓ fn foo x : int {
 1101 # ✓ fn foo x: int {
 1102 # ✓ fn foo x: int -> y/eax: int {
-1103 populate-mu-function-header:  # first-line : (address stream byte), out : (handle function), vars : (address stack (handle var))
+1103 populate-mu-function-header:  # first-line : (addr stream byte), out : (handle function), vars : (addr stack (handle var))
 1104     # pseudocode:
 1105     #   var name : (ref slice)
 1106     #   next-word(first-line, name)
@@ -1309,7 +1309,7 @@ if ('onhashchange' in window) {
 1297     2b/subtract-> *Function-size 4/r32/esp
 1298     89/<- %ecx 4/r32/esp
 1299     (zero-out %ecx *Function-size)
-1300     # var vars/ebx : (ref stack (address var) 16)
+1300     # var vars/ebx : (ref stack (addr var) 16)
 1301     81 5/subop/subtract %esp 0x10/imm32
 1302     68/push 0x10/imm32/length
 1303     68/push 0/imm32/top
@@ -1341,7 +1341,7 @@ if ('onhashchange' in window) {
 1329     2b/subtract-> *Function-size 4/r32/esp
 1330     89/<- %ecx 4/r32/esp
 1331     (zero-out %ecx *Function-size)
-1332     # var vars/ebx : (ref stack (address var) 16)
+1332     # var vars/ebx : (ref stack (addr var) 16)
 1333     81 5/subop/subtract %esp 0x10/imm32
 1334     68/push 0x10/imm32/length
 1335     68/push 0/imm32/top
@@ -1388,7 +1388,7 @@ if ('onhashchange' in window) {
 1376     2b/subtract-> *Function-size 4/r32/esp
 1377     89/<- %ecx 4/r32/esp
 1378     (zero-out %ecx *Function-size)
-1379     # var vars/ebx : (ref stack (address var) 16)
+1379     # var vars/ebx : (ref stack (addr var) 16)
 1380     81 5/subop/subtract %esp 0x10/imm32
 1381     68/push 0x10/imm32/length
 1382     68/push 0/imm32/top
@@ -1439,12 +1439,12 @@ if ('onhashchange' in window) {
 1427 #   x: int
 1428 #   x: int,
 1429 # ignores at most one trailing colon or comma
-1430 parse-var-with-type:  # name: (address slice), first-line: (address stream byte) -> result/eax: (handle var)
+1430 parse-var-with-type:  # name: (addr slice), first-line: (addr stream byte) -> result/eax: (handle var)
 1431     # pseudocode:
 1432     #   var v : (handle var) = allocate(Heap, Var-size)
 1433     #   var s : (ref slice)
 1434     #   next-token-from-slice(name->start, name->end, '/', s)
-1435     #   var end : (address byte) = s->end
+1435     #   var end : (addr byte) = s->end
 1436     #   if (slice-ends-with(s, ":"))
 1437     #     decrement s->end
 1438     #   if (slice-ends-with(s, ","))
@@ -1615,7 +1615,7 @@ if ('onhashchange' in window) {
 1603     cd/syscall  0x80/imm8
 1604     # never gets here
 1605 
-1606 next-mu-token:  # in: (address stream byte), out: (address slice)
+1606 next-mu-token:  # in: (addr stream byte), out: (addr slice)
 1607     # . prologue
 1608     55/push-ebp
 1609     89/<- %ebp 4/r32/esp
@@ -1656,7 +1656,7 @@ if ('onhashchange' in window) {
 1644     5d/pop-to-ebp
 1645     c3/return
 1646 
-1647 type-for:  # name: (address slice) -> result/eax: (handle s-expression type-id)
+1647 type-for:  # name: (addr slice) -> result/eax: (handle s-expression type-id)
 1648     # . prologue
 1649     55/push-ebp
 1650     89/<- %ebp 4/r32/esp
@@ -1790,7 +1790,7 @@ if ('onhashchange' in window) {
 1778 # identifier starts with a letter or '$' or '_'
 1779 # no constraints at the moment on later letters
 1780 # all we really want to do so far is exclude '{', '}' and '->'
-1781 is-identifier?:  # in : (address slice) -> result/eax : boolean
+1781 is-identifier?:  # in : (addr slice) -> result/eax : boolean
 1782     # . prologue
 1783     55/push-ebp
 1784     89/<- %ebp 4/r32/esp
@@ -2086,7 +2086,7 @@ if ('onhashchange' in window) {
 2074     5d/pop-to-ebp
 2075     c3/return
 2076 
-2077 populate-mu-function-body:  # in : (address buffered-file), out : (handle function), vars : (address stack (handle var))
+2077 populate-mu-function-body:  # in : (addr buffered-file), out : (handle function), vars : (addr stack (handle var))
 2078     # . prologue
 2079     55/push-ebp
 2080     89/<- %ebp 4/r32/esp
@@ -2113,7 +2113,7 @@ if ('onhashchange' in window) {
 2101     c3/return
 2102 
 2103 # parses a block, assuming that the leading '{' has already been read by the caller
-2104 parse-mu-block:  # in : (address buffered-file), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle block)
+2104 parse-mu-block:  # in : (addr buffered-file), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle block)
 2105     # pseudocode:
 2106     #   var line : (ref stream byte 512)
 2107     #   var word-slice : (ref slice)
@@ -2274,7 +2274,7 @@ if ('onhashchange' in window) {
 2262     cd/syscall  0x80/imm8
 2263     # never gets here
 2264 
-2265 check-no-tokens-left:  # line : (address stream byte)
+2265 check-no-tokens-left:  # line : (addr stream byte)
 2266     # . prologue
 2267     55/push-ebp
 2268     89/<- %ebp 4/r32/esp
@@ -2321,7 +2321,7 @@ if ('onhashchange' in window) {
 2309     5d/pop-to-ebp
 2310     c3/return
 2311 
-2312 parse-mu-named-block:  # name : (address slice), first-line : (address stream byte), in : (address buffered-file), vars : (address stack (handle var)) -> result/eax : (handle stmt)
+2312 parse-mu-named-block:  # name : (addr slice), first-line : (addr stream byte), in : (addr buffered-file), vars : (addr stack (handle var)) -> result/eax : (handle stmt)
 2313     # pseudocode:
 2314     #   var line : (ref stream byte 512)
 2315     #   var word-slice : (ref slice)
@@ -2365,7 +2365,7 @@ if ('onhashchange' in window) {
 2353     5d/pop-to-ebp
 2354     c3/return
 2355 
-2356 parse-mu-var-def:  # line : (address stream byte), vars : (address stack (handle var)) -> result/eax : (handle stmt)
+2356 parse-mu-var-def:  # line : (addr stream byte), vars : (addr stack (handle var)) -> result/eax : (handle stmt)
 2357     # pseudocode:
 2358     #
 2359     # . prologue
@@ -2380,7 +2380,7 @@ if ('onhashchange' in window) {
 2368     5d/pop-to-ebp
 2369     c3/return
 2370 
-2371 parse-mu-stmt:  # line : (address stream byte), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle stmt)
+2371 parse-mu-stmt:  # line : (addr stream byte), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle stmt)
 2372     # pseudocode:
 2373     #   var name : (ref slice)
 2374     #   result = allocate(Heap, Stmt-size)
@@ -2500,7 +2500,7 @@ if ('onhashchange' in window) {
 2488     cd/syscall  0x80/imm8
 2489     # never gets here
 2490 
-2491 stmt-has-outputs?:  # line : (address stream byte) -> result/eax : boolean
+2491 stmt-has-outputs?:  # line : (addr stream byte) -> result/eax : boolean
 2492     # . prologue
 2493     55/push-ebp
 2494     89/<- %ebp 4/r32/esp
@@ -2548,7 +2548,7 @@ if ('onhashchange' in window) {
 2536 
 2537 # if 'name' starts with a digit, create a new literal var for it
 2538 # otherwise return first 'name' from the top (back) of 'vars' and abort if not found
-2539 lookup-var-or-literal:  # name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var)
+2539 lookup-var-or-literal:  # name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var)
 2540     # . prologue
 2541     55/push-ebp
 2542     89/<- %ebp 4/r32/esp
@@ -2596,7 +2596,7 @@ if ('onhashchange' in window) {
 2584     # never gets here
 2585 
 2586 # return first 'name' from the top (back) of 'vars' and abort if not found
-2587 lookup-var:  # name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var)
+2587 lookup-var:  # name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var)
 2588     # . prologue
 2589     55/push-ebp
 2590     89/<- %ebp 4/r32/esp
@@ -2625,9 +2625,9 @@ if ('onhashchange' in window) {
 2613     # never gets here
 2614 
 2615 # return first 'name' from the top (back) of 'vars', and 0/null if not found
-2616 lookup-var-helper:  # name: (address array byte), vars : (address stack (handle var)) -> result/eax: (handle var)
+2616 lookup-var-helper:  # name: (addr array byte), vars : (addr stack (handle var)) -> result/eax: (handle var)
 2617     # pseudocode:
-2618     #   var curr : (address handle var) = &vars->data[vars->top - 4]
+2618     #   var curr : (addr handle var) = &vars->data[vars->top - 4]
 2619     #   var min = vars->data
 2620     #   while curr >= min
 2621     #     var v : (handle var) = *curr
@@ -2649,9 +2649,9 @@ if ('onhashchange' in window) {
 2637     # if (vars->top > vars->length) abort
 2638     3b/compare 0/r32/eax *(esi+4)
 2639     0f 8f/jump-if-greater $lookup-var-helper:error1/disp32
-2640     # var min/edx : (address handle var) = vars->data
+2640     # var min/edx : (addr handle var) = vars->data
 2641     8d/copy-address *(esi+8) 2/r32/edx
-2642     # var curr/ebx : (address handle var) = &vars->data[vars->top - 4]
+2642     # var curr/ebx : (addr handle var) = &vars->data[vars->top - 4]
 2643     81 5/subop/subtract %ebx 4/imm32
 2644     8d/copy-address *(esi+ebx+8) 3/r32/ebx
 2645     {
@@ -2692,7 +2692,7 @@ if ('onhashchange' in window) {
 2680     # never gets here
 2681 
 2682 # return first 'name' from the top (back) of 'vars' and create a new var for a fn output if not found
-2683 lookup-or-define-var:  # name: (address slice), vars : (address stack (handle var)), fn : (handle function) -> result/eax: (handle var)
+2683 lookup-or-define-var:  # name: (addr slice), vars : (addr stack (handle var)), fn : (handle function) -> result/eax: (handle var)
 2684     # . prologue
 2685     55/push-ebp
 2686     89/<- %ebp 4/r32/esp
@@ -2765,7 +2765,7 @@ if ('onhashchange' in window) {
 2753     # setup
 2754     (clear-stream _test-input-stream)
 2755     (write _test-input-stream "increment n\n")
-2756     # var vars/ecx : (ref stack (address var) 4)
+2756     # var vars/ecx : (ref stack (addr var) 4)
 2757     81 5/subop/subtract %esp 0x10/imm32
 2758     68/push 0x10/imm32/length
 2759     68/push 0/imm32/top
@@ -2793,7 +2793,7 @@ if ('onhashchange' in window) {
 2781     5d/pop-to-ebp
 2782     c3/return
 2783 
-2784 new-function:  # ad: (address allocation-descriptor), name: (address array byte), subx-name: (address array byte), inouts: (handle list var), outputs: (handle list var), body: (handle block), next: (handle function) -> result/eax: (handle function)
+2784 new-function:  # ad: (addr allocation-descriptor), name: (addr array byte), subx-name: (addr array byte), inouts: (handle list var), outputs: (handle list var), body: (handle block), next: (handle function) -> result/eax: (handle function)
 2785     # . prologue
 2786     55/push-ebp
 2787     89/<- %ebp 4/r32/esp
@@ -2821,7 +2821,7 @@ if ('onhashchange' in window) {
 2809     5d/pop-to-ebp
 2810     c3/return
 2811 
-2812 new-var:  # ad: (address allocation-descriptor), name: (address array byte), type: int, block: int, stack-offset: int, register: (address array byte) -> result/eax: (handle var)
+2812 new-var:  # ad: (addr allocation-descriptor), name: (addr array byte), type: int, block: int, stack-offset: int, register: (addr array byte) -> result/eax: (handle var)
 2813     # . prologue
 2814     55/push-ebp
 2815     89/<- %ebp 4/r32/esp
@@ -2847,7 +2847,7 @@ if ('onhashchange' in window) {
 2835     5d/pop-to-ebp
 2836     c3/return
 2837 
-2838 new-literal-integer:  # ad: (address allocation-descriptor), name: (address slice) -> result/eax: (handle var)
+2838 new-literal-integer:  # ad: (addr allocation-descriptor), name: (addr slice) -> result/eax: (handle var)
 2839     # . prologue
 2840     55/push-ebp
 2841     89/<- %ebp 4/r32/esp
@@ -2857,7 +2857,7 @@ if ('onhashchange' in window) {
 2845     (is-hex-int? *(ebp+0xc))  # => eax
 2846     3d/compare-eax-and 0/imm32
 2847     0f 84/jump-if-equal $new-literal-integer:abort/disp32
-2848     # var s/ecx : (address array byte)
+2848     # var s/ecx : (addr array byte)
 2849     (slice-to-string Heap *(ebp+0xc))  # => eax
 2850     89/<- %ecx 0/r32/eax
 2851     #
@@ -2886,7 +2886,7 @@ if ('onhashchange' in window) {
 2874     cd/syscall  0x80/imm8
 2875     # never gets here
 2876 
-2877 new-block:  # ad: (address allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement)
+2877 new-block:  # ad: (addr allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement)
 2878     # . prologue
 2879     55/push-ebp
 2880     89/<- %ebp 4/r32/esp
@@ -2906,7 +2906,7 @@ if ('onhashchange' in window) {
 2894     5d/pop-to-ebp
 2895     c3/return
 2896 
-2897 new-stmt:  # ad: (address allocation-descriptor), operation: (address array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement)
+2897 new-stmt:  # ad: (addr allocation-descriptor), operation: (addr array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement)
 2898     # . prologue
 2899     55/push-ebp
 2900     89/<- %ebp 4/r32/esp
@@ -2930,7 +2930,7 @@ if ('onhashchange' in window) {
 2918     5d/pop-to-ebp
 2919     c3/return
 2920 
-2921 new-vardef:  # ad: (address allocation-descriptor), name: (address array byte), type: int -> result/eax: (handle statement)
+2921 new-vardef:  # ad: (addr allocation-descriptor), name: (addr array byte), type: int -> result/eax: (handle statement)
 2922     # . prologue
 2923     55/push-ebp
 2924     89/<- %ebp 4/r32/esp
@@ -2952,7 +2952,7 @@ if ('onhashchange' in window) {
 2940     5d/pop-to-ebp
 2941     c3/return
 2942 
-2943 new-regvardef:  # ad: (address allocation-descriptor), name: (address array byte), type: int, register: (address array byte) -> result/eax: (handle statement)
+2943 new-regvardef:  # ad: (addr allocation-descriptor), name: (addr array byte), type: int, register: (addr array byte) -> result/eax: (handle statement)
 2944     # . prologue
 2945     55/push-ebp
 2946     89/<- %ebp 4/r32/esp
@@ -2976,7 +2976,7 @@ if ('onhashchange' in window) {
 2964     5d/pop-to-ebp
 2965     c3/return
 2966 
-2967 new-named-block:  # ad: (address allocation-descriptor), name: (address array byte), data: (handle list statement) -> result/eax: (handle statement)
+2967 new-named-block:  # ad: (addr allocation-descriptor), name: (addr array byte), data: (handle list statement) -> result/eax: (handle statement)
 2968     # . prologue
 2969     55/push-ebp
 2970     89/<- %ebp 4/r32/esp
@@ -2998,7 +2998,7 @@ if ('onhashchange' in window) {
 2986     5d/pop-to-ebp
 2987     c3/return
 2988 
-2989 new-list:  # ad: (address allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type)
+2989 new-list:  # ad: (addr allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type)
 2990     # . prologue
 2991     55/push-ebp
 2992     89/<- %ebp 4/r32/esp
@@ -3018,7 +3018,7 @@ if ('onhashchange' in window) {
 3006     5d/pop-to-ebp
 3007     c3/return
 3008 
-3009 append-list:  # ad: (address allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type)
+3009 append-list:  # ad: (addr allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type)
 3010     # . prologue
 3011     55/push-ebp
 3012     89/<- %ebp 4/r32/esp
@@ -3054,7 +3054,7 @@ if ('onhashchange' in window) {
 3042     5d/pop-to-ebp
 3043     c3/return
 3044 
-3045 append-to-block:  # ad: (address allocation-descriptor), block: (handle block), x: (handle stmt)
+3045 append-to-block:  # ad: (addr allocation-descriptor), block: (handle block), x: (handle stmt)
 3046     # . prologue
 3047     55/push-ebp
 3048     89/<- %ebp 4/r32/esp
@@ -3087,7 +3087,7 @@ if ('onhashchange' in window) {
 3075     5d/pop-to-ebp
 3076     c3/return
 3077 
-3078 size-of:  # n : (address var)
+3078 size-of:  # n : (addr var)
 3079     # . prologue
 3080     55/push-ebp
 3081     89/<- %ebp 4/r32/esp
@@ -3103,7 +3103,7 @@ if ('onhashchange' in window) {
 3091 # Code-generation
 3092 #######################################################
 3093 
-3094 emit-subx:  # out : (address buffered-file)
+3094 emit-subx:  # out : (addr buffered-file)
 3095     # . prologue
 3096     55/push-ebp
 3097     89/<- %ebp 4/r32/esp
@@ -3134,7 +3134,7 @@ if ('onhashchange' in window) {
 3122     5d/pop-to-ebp
 3123     c3/return
 3124 
-3125 emit-subx-function:  # out : (address buffered-file), f : (handle function)
+3125 emit-subx-function:  # out : (addr buffered-file), f : (handle function)
 3126     # . prologue
 3127     55/push-ebp
 3128     89/<- %ebp 4/r32/esp
@@ -3162,7 +3162,7 @@ if ('onhashchange' in window) {
 3150     5d/pop-to-ebp
 3151     c3/return
 3152 
-3153 emit-subx-block:  # out : (address buffered-file), block : (handle block)
+3153 emit-subx-block:  # out : (addr buffered-file), block : (handle block)
 3154     # . prologue
 3155     55/push-ebp
 3156     89/<- %ebp 4/r32/esp
@@ -3192,7 +3192,7 @@ if ('onhashchange' in window) {
 3180     5d/pop-to-ebp
 3181     c3/return
 3182 
-3183 emit-subx-statement:  # out : (address buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function)
+3183 emit-subx-statement:  # out : (addr buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function)
 3184     # . prologue
 3185     55/push-ebp
 3186     89/<- %ebp 4/r32/esp
@@ -3987,7 +3987,7 @@ if ('onhashchange' in window) {
 3975     0/imm32/no-register
 3976 
 3977 == code
-3978 emit-subx-primitive:  # out : (address buffered-file), stmt : (handle statement), primitive : (handle function)
+3978 emit-subx-primitive:  # out : (addr buffered-file), stmt : (handle statement), primitive : (handle function)
 3979     # . prologue
 3980     55/push-ebp
 3981     89/<- %ebp 4/r32/esp
@@ -4013,7 +4013,7 @@ if ('onhashchange' in window) {
 4001     5d/pop-to-ebp
 4002     c3/return
 4003 
-4004 emit-subx-rm32:  # out : (address buffered-file), l : arg-location, stmt : (handle statement)
+4004 emit-subx-rm32:  # out : (addr buffered-file), l : arg-location, stmt : (handle statement)
 4005     # . prologue
 4006     55/push-ebp
 4007     89/<- %ebp 4/r32/esp
@@ -4093,7 +4093,7 @@ if ('onhashchange' in window) {
 4081     cd/syscall  0x80/imm8
 4082     # never gets here
 4083 
-4084 emit-subx-r32:  # out : (address buffered-file), l : arg-location, stmt : (handle statement)
+4084 emit-subx-r32:  # out : (addr buffered-file), l : arg-location, stmt : (handle statement)
 4085     # . prologue
 4086     55/push-ebp
 4087     89/<- %ebp 4/r32/esp
@@ -4105,7 +4105,7 @@ if ('onhashchange' in window) {
 4093     0f 84/jump-if-equal $emit-subx-r32:end/disp32
 4094     #
 4095     (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))  # stmt, l => var/eax
-4096     (maybe-get Registers *(eax+0x10) 8)  # Var-register => eax : (address register-index)
+4096     (maybe-get Registers *(eax+0x10) 8)  # Var-register => eax : (addr register-index)
 4097     (write-buffered *(ebp+8) Space)
 4098     (print-int32-buffered *(ebp+8) *eax)
 4099     (write-buffered *(ebp+8) "/r32")
@@ -4118,7 +4118,7 @@ if ('onhashchange' in window) {
 4106     5d/pop-to-ebp
 4107     c3/return
 4108 
-4109 emit-subx-imm32:  # out : (address buffered-file), l : arg-location, stmt : (handle statement)
+4109 emit-subx-imm32:  # out : (addr buffered-file), l : arg-location, stmt : (handle statement)
 4110     # . prologue
 4111     55/push-ebp
 4112     89/<- %ebp 4/r32/esp
@@ -4142,7 +4142,7 @@ if ('onhashchange' in window) {
 4130     5d/pop-to-ebp
 4131     c3/return
 4132 
-4133 emit-subx-call:  # out : (address buffered-file), stmt : (handle statement), callee : (handle function)
+4133 emit-subx-call:  # out : (addr buffered-file), stmt : (handle statement), callee : (handle function)
 4134     # . prologue
 4135     55/push-ebp
 4136     89/<- %ebp 4/r32/esp
@@ -4179,7 +4179,7 @@ if ('onhashchange' in window) {
 4167     5d/pop-to-ebp
 4168     c3/return
 4169 
-4170 emit-subx-call-operand:  # out : (address buffered-file), operand : (handle variable)
+4170 emit-subx-call-operand:  # out : (addr buffered-file), operand : (handle variable)
 4171     # . prologue
 4172     55/push-ebp
 4173     89/<- %ebp 4/r32/esp
@@ -4205,7 +4205,7 @@ if ('onhashchange' in window) {
 4193     5d/pop-to-ebp
 4194     c3/return
 4195 
-4196 emit-subx-var-as-rm32:  # out : (address buffered-file), operand : (handle variable)
+4196 emit-subx-var-as-rm32:  # out : (addr buffered-file), operand : (handle variable)
 4197     # . prologue
 4198     55/push-ebp
 4199     89/<- %ebp 4/r32/esp
@@ -4240,7 +4240,7 @@ if ('onhashchange' in window) {
 4228     5d/pop-to-ebp
 4229     c3/return
 4230 
-4231 find-matching-function:  # functions : (address function), stmt : (handle statement) -> result/eax : (handle function)
+4231 find-matching-function:  # functions : (addr function), stmt : (handle statement) -> result/eax : (handle function)
 4232     # . prologue
 4233     55/push-ebp
 4234     89/<- %ebp 4/r32/esp
@@ -5344,7 +5344,7 @@ if ('onhashchange' in window) {
 5402     5d/pop-to-ebp
 5403     c3/return
 5404 
-5405 emit-subx-prologue:  # out : (address buffered-file)
+5405 emit-subx-prologue:  # out : (addr buffered-file)
 5406     # . prologue
 5407     55/push-ebp
 5408     89/<- %ebp 4/r32/esp
@@ -5358,7 +5358,7 @@ if ('onhashchange' in window) {
 5416     5d/pop-to-ebp
 5417     c3/return
 5418 
-5419 emit-subx-epilogue:  # out : (address buffered-file)
+5419 emit-subx-epilogue:  # out : (addr buffered-file)
 5420     # . prologue
 5421     55/push-ebp
 5422     89/<- %ebp 4/r32/esp
diff --git a/html/apps/mulisp.subx.html b/html/apps/mulisp.subx.html
index 17c2e7c3..4d3ba8fb 100644
--- a/html/apps/mulisp.subx.html
+++ b/html/apps/mulisp.subx.html
@@ -107,7 +107,7 @@ if ('onhashchange' in window) {
  49 #     NIL NUM CHAR STRING SYMBOL PAIR ARRAY
  50 #   memory type: a type specifying memory layout at the SubX level. Starts
  51 #   with a '$'.
- 52 #     $int $array $(address _)
+ 52 #     $int $array $(addr _)
  53 #
  54 # Lisp values are represented in memory by the _cell_ data structure. A cell
  55 # is 12 bytes long:
@@ -121,18 +121,18 @@ if ('onhashchange' in window) {
  63 #   - char: cell{ tag: 2/CHAR, data: $int 0 }
  64 #     data contains the utf-8 code of the character (no compound glyphs, no
  65 #     modifiers, etc., etc.)
- 66 #   - string: cell{ tag: 3/STRING, data: $(address stream byte)
- 67 #     data contains an (address array byte) containing the string in utf-8
- 68 #   - symbol: cell{ tag: 4/SYMBOL, data: $(address array byte) 0 }
- 69 #     data contains an (address array byte) containing the name of the symbol in utf-8
+ 66 #   - string: cell{ tag: 3/STRING, data: $(addr stream byte)
+ 67 #     data contains an (addr array byte) containing the string in utf-8
+ 68 #   - symbol: cell{ tag: 4/SYMBOL, data: $(addr array byte) 0 }
+ 69 #     data contains an (addr array byte) containing the name of the symbol in utf-8
  70 #     alternatively, data could contain an index into the table of interned symbols
- 71 #   - pair: cell{ tag: 5/PAIR, data: $(address cell) $(address cell)  }
+ 71 #   - pair: cell{ tag: 5/PAIR, data: $(addr cell) $(addr cell)  }
  72 #     data contains pointers to car and cdr
- 73 #   - array: cell{ tag: 6/ARRAY, data: $tag $(address stream data)
+ 73 #   - array: cell{ tag: 6/ARRAY, data: $tag $(addr stream data)
  74 #     data contains a pointer to an array of 8-byte data fields and the common
  75 #     tag for them all
  76 
- 77 repl:  # in : (address buffered-file), out : (address buffered-file)
+ 77 repl:  # in : (addr buffered-file), out : (addr buffered-file)
  78     # . prologue
  79     55/push-ebp
  80     89/<- %ebp 4/r32/esp
@@ -162,7 +162,7 @@ if ('onhashchange' in window) {
 104 # arrays start with '['
 105 # symbols start with anything else but quote, backquote, unquote or splice
 106 # only one s-expression per line
-107 lisp-read:  # in : (address buffered-file) -> eax : (handle cell)
+107 lisp-read:  # in : (addr buffered-file) -> eax : (handle cell)
 108     # . prologue
 109     55/push-ebp
 110     89/<- %ebp 4/r32/esp
@@ -200,14 +200,14 @@ if ('onhashchange' in window) {
 142     5d/pop-to-ebp
 143     c3/return
 144 
-145 # lisp-read:  in : (address buffered-file) -> (handle cell)
+145 # lisp-read:  in : (addr buffered-file) -> (handle cell)
 146 #   token tmp = next-mulisp-token(in)
 147 #   if is-int(tmp) return cell(tmp)
 148 #   if is-string(tmp) return cell(tmp)
 149 #   if is-pair(tmp) ...
 150 #   if is-array(tmp) ...
 151 
-152 next-mulisp-token:  # in : (address buffered-file), line : (address stream byte), result : (address slice)
+152 next-mulisp-token:  # in : (addr buffered-file), line : (addr stream byte), result : (addr slice)
 153     # pseudocode:
 154     #   if (line->read >= line->write)
 155     #     read-line-buffered(in, line)
@@ -252,11 +252,11 @@ if ('onhashchange' in window) {
 194     5d/pop-to-ebp
 195     c3/return
 196 
-197 new-int-cell:  # in : (address slice) -> eax : (handle cell)
+197 new-int-cell:  # in : (addr slice) -> eax : (handle cell)
 198 
-199 new-string-cell:  # in : (address slice) -> eax : (handle cell)
+199 new-string-cell:  # in : (addr slice) -> eax : (handle cell)
 200 
-201 lisp-eval:  # in : (address cell) -> eax : (handle cell)
+201 lisp-eval:  # in : (addr cell) -> eax : (handle cell)
 202     # . prologue
 203     55/push-ebp
 204     89/<- %ebp 4/r32/esp
@@ -269,7 +269,7 @@ if ('onhashchange' in window) {
 211     5d/pop-to-ebp
 212     c3/return
 213 
-214 lisp-print:  # out : (address buffered-file), x : (address cell)
+214 lisp-print:  # out : (addr buffered-file), x : (addr cell)
 215     # . prologue
 216     55/push-ebp
 217     89/<- %ebp 4/r32/esp
diff --git a/html/apps/pack.subx.html b/html/apps/pack.subx.html
index 16e28c46..aa7afa7b 100644
--- a/html/apps/pack.subx.html
+++ b/html/apps/pack.subx.html
@@ -159,7 +159,7 @@ if ('onhashchange' in window) {
   97 #   next-token-from-slice(start, end, delim char) -> slice
   98 #   slice-equal?(slice, string)
   99 
- 100 subx-pack:  # in : (address buffered-file), out : (address buffered-file)
+ 100 subx-pack:  # in : (addr buffered-file), out : (addr buffered-file)
  101     # pseudocode:
  102     #   var line : (ref stream byte 512)
  103     #   var in-code? = false
@@ -818,7 +818,7 @@ if ('onhashchange' in window) {
  909     5d/pop-to-ebp
  910     c3/return
  911 
- 912 convert-data:  # line : (address stream byte), out : (address buffered-file)
+ 912 convert-data:  # line : (addr stream byte), out : (addr buffered-file)
  913     # pseudocode:
  914     #   var word-slice : (ref slice)
  915     #   while true
@@ -874,7 +874,7 @@ if ('onhashchange' in window) {
 1029     0f 85/jump-if-not-equal  $convert-data:break/disp32
 1030 $convert-data:check-for-comment:
 1031     # if (slice-starts-with?(word-slice, "#"))
-1032     # . var start/edx : (address byte) = word-slice->start
+1032     # . var start/edx : (addr byte) = word-slice->start
 1033     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 1034     # . var c/eax : byte = *start
 1035     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -895,7 +895,7 @@ if ('onhashchange' in window) {
 1050     0f 85/jump-if-not-equal  $convert-data:end/disp32
 1051 $convert-data:check-for-label:
 1052     # if (slice-ends-with?(word-slice, ":"))
-1053     # . var end/edx : (address byte) = word-slice->end
+1053     # . var end/edx : (addr byte) = word-slice->end
 1054     8b/copy                         1/mod/*+disp8   1/rm32/ecx    .           .             .           2/r32/edx   4/disp8         .                 # copy *(ecx+4) to edx
 1055     # . var c/eax : byte = *(end-1)
 1056     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -1579,7 +1579,7 @@ if ('onhashchange' in window) {
 1809 #   unceremoniously abort on non-numeric operands except disp or imm
 1810 #   opcodes must be lowercase and zero padded
 1811 #   opcodes with misleading operand metadata may get duplicated as operands as well. don't rely on this.
-1812 convert-instruction:  # line : (address stream byte), out : (address buffered-file)
+1812 convert-instruction:  # line : (addr stream byte), out : (addr buffered-file)
 1813     # pseudocode:
 1814     #   # some early exits
 1815     #   var word-slice = next-word(line)
@@ -1633,7 +1633,7 @@ if ('onhashchange' in window) {
 1863     75/jump-if-not-equal  $convert-instruction:pass-through/disp8
 1864 $convert-instruction:check1:
 1865     # if (slice-starts-with?(word-slice, "#")) write-stream-data(out, line)
-1866     # . var start/edx : (address byte) = word-slice->start
+1866     # . var start/edx : (addr byte) = word-slice->start
 1867     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 1868     # . var c/eax : byte = *start
 1869     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -1643,7 +1643,7 @@ if ('onhashchange' in window) {
 1873     74/jump-if-equal  $convert-instruction:pass-through/disp8
 1874 $convert-instruction:check2:
 1875     # if (slice-ends-with?(word-slice, ":")) write-stream-data(out, line)
-1876     # . var end/edx : (address byte) = word-slice->end
+1876     # . var end/edx : (addr byte) = word-slice->end
 1877     8b/copy                         1/mod/*+disp8   1/rm32/ecx    .           .             .           2/r32/edx   4/disp8         .                 # copy *(ecx+4) to edx
 1878     # . var c/eax : byte = *(end-1)
 1879     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -1723,7 +1723,7 @@ if ('onhashchange' in window) {
 1953     5d/pop-to-ebp
 1954     c3/return
 1955 
-1956 emit-opcodes:  # line : (address stream byte), out : (address buffered-file)
+1956 emit-opcodes:  # line : (addr stream byte), out : (addr buffered-file)
 1957     # opcodes occupy 1-3 bytes:
 1958     #   xx
 1959     #   0f xx
@@ -1800,7 +1800,7 @@ if ('onhashchange' in window) {
 2030     3d/compare-eax-and  0/imm32/false
 2031     0f 85/jump-if-not-equal  $emit-opcodes:end/disp32
 2032     # if (slice-starts-with?(op1, "#")) return
-2033     # . var start/ebx : (address byte) = op1->start
+2033     # . var start/ebx : (addr byte) = op1->start
 2034     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           3/r32/ebx   .               .                 # copy *ecx to ebx
 2035     # . var c/eax : byte = *start
 2036     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -1893,7 +1893,7 @@ if ('onhashchange' in window) {
 2123     3d/compare-eax-and  0/imm32/false
 2124     0f 85/jump-if-not-equal  $emit-opcodes:end/disp32
 2125     # if (slice-starts-with?(op2, "#")) return
-2126     # . var start/ebx : (address byte) = op2->start
+2126     # . var start/ebx : (addr byte) = op2->start
 2127     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           3/r32/ebx   .               .                 # copy *edx to ebx
 2128     # . var c/eax : byte = *start
 2129     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -1972,7 +1972,7 @@ if ('onhashchange' in window) {
 2202     3d/compare-eax-and  0/imm32/false
 2203     0f 85/jump-if-not-equal  $emit-opcodes:end/disp32
 2204     # if (slice-starts-with?(op3, "#")) return
-2205     # . var start/ebx : (address byte) = op2->start
+2205     # . var start/ebx : (addr byte) = op2->start
 2206     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           3/r32/ebx   .               .                 # copy *edx to ebx
 2207     # . var c/eax : byte = *start
 2208     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -2019,7 +2019,7 @@ if ('onhashchange' in window) {
 2249     5d/pop-to-ebp
 2250     c3/return
 2251 
-2252 emit-modrm:  # line : (address stream byte), out : (address buffered-file)
+2252 emit-modrm:  # line : (addr stream byte), out : (addr buffered-file)
 2253     # pseudocode:
 2254     #   rewind-stream(line)
 2255     #   var has-modrm? = false, mod = 0, rm32 = 0, r32 = 0
@@ -2101,7 +2101,7 @@ if ('onhashchange' in window) {
 2402     # if (slice-starts-with?(word-slice, "#")) break
 2403     # . spill edx
 2404     52/push-edx
-2405     # . var start/edx : (address byte) = word-slice->start
+2405     # . var start/edx : (addr byte) = word-slice->start
 2406     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 2407     # . var c/eax : byte = *start
 2408     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -2265,7 +2265,7 @@ if ('onhashchange' in window) {
 2566     5d/pop-to-ebp
 2567     c3/return
 2568 
-2569 emit-sib:  # line : (address stream byte), out : (address buffered-file)
+2569 emit-sib:  # line : (addr stream byte), out : (addr buffered-file)
 2570     # pseudocode:
 2571     #   var has-sib? = false, base = 0, index = 0, scale = 0
 2572     #   var word-slice : (ref slice)
@@ -2346,7 +2346,7 @@ if ('onhashchange' in window) {
 2711     # if (slice-starts-with?(word-slice, "#")) break
 2712     # . spill edx
 2713     52/push-edx
-2714     # . var start/edx : (address byte) = word-slice->start
+2714     # . var start/edx : (addr byte) = word-slice->start
 2715     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 2716     # . var c/eax : byte = *start
 2717     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -2482,7 +2482,7 @@ if ('onhashchange' in window) {
 2847     5d/pop-to-ebp
 2848     c3/return
 2849 
-2850 emit-disp:  # line : (address stream byte), out : (address buffered-file)
+2850 emit-disp:  # line : (addr stream byte), out : (addr buffered-file)
 2851     # pseudocode:
 2852     #   rewind-stream(line)
 2853     #   var word-slice : (ref slice)
@@ -2543,7 +2543,7 @@ if ('onhashchange' in window) {
 2972     0f 85/jump-if-not-equal  $emit-disp:break/disp32
 2973 $emit-disp:check1:
 2974     # if (slice-starts-with?(word-slice, "#")) break
-2975     # . var start/edx : (address byte) = word-slice->start
+2975     # . var start/edx : (addr byte) = word-slice->start
 2976     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 2977     # . var c/eax : byte = *start
 2978     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -2637,7 +2637,7 @@ if ('onhashchange' in window) {
 3066     5d/pop-to-ebp
 3067     c3/return
 3068 
-3069 emit-imm:  # line : (address stream byte), out : (address buffered-file)
+3069 emit-imm:  # line : (addr stream byte), out : (addr buffered-file)
 3070     # pseudocode:
 3071     #   rewind-stream(line)
 3072     #   var word-slice : (ref slice)
@@ -2698,7 +2698,7 @@ if ('onhashchange' in window) {
 3191     0f 85/jump-if-not-equal  $emit-imm:break/disp32
 3192 $emit-imm:check1:
 3193     # if (slice-starts-with?(word-slice, "#")) break
-3194     # . var start/edx : (address byte) = slice->start
+3194     # . var start/edx : (addr byte) = slice->start
 3195     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           2/r32/edx   .               .                 # copy *ecx to edx
 3196     # . var c/eax : byte = *start
 3197     31/xor                          3/mod/direct    0/rm32/eax    .           .             .           0/r32/eax   .               .                 # clear eax
@@ -2792,7 +2792,7 @@ if ('onhashchange' in window) {
 3285     5d/pop-to-ebp
 3286     c3/return
 3287 
-3288 emit-line-in-comment:  # line : (address stream byte), out : (address buffered-file)
+3288 emit-line-in-comment:  # line : (addr stream byte), out : (addr buffered-file)
 3289     # . prologue
 3290     55/push-ebp
 3291     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -4694,7 +4694,7 @@ if ('onhashchange' in window) {
 5837     c3/return
 5838 
 5839 # shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/'))
-5840 parse-datum-of-word:  # word : (address slice) -> value/eax : int
+5840 parse-datum-of-word:  # word : (addr slice) -> value/eax : int
 5841     # . prologue
 5842     55/push-ebp
 5843     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/sigils.subx.html b/html/apps/sigils.subx.html
index 0283638e..bdcc8605 100644
--- a/html/apps/sigils.subx.html
+++ b/html/apps/sigils.subx.html
@@ -166,7 +166,7 @@ if ('onhashchange' in window) {
  104 
  105 # error messages considered:
  106 #   *x + 34                 -> error: base+disp addressing must be within '()'
- 107 subx-sigils:  # in : (address buffered-file), out : (address buffered-file)
+ 107 subx-sigils:  # in : (addr buffered-file), out : (addr buffered-file)
  108     # pseudocode:
  109     #   var line : (stream byte 512)
  110     #   while true
@@ -1182,7 +1182,7 @@ if ('onhashchange' in window) {
 1359     5d/pop-to-ebp
 1360     c3/return
 1361 
-1362 emit-direct-mode:  # out : (address buffered-file), word-slice : (address slice)
+1362 emit-direct-mode:  # out : (addr buffered-file), word-slice : (addr slice)
 1363     # . prologue
 1364     55/push-ebp
 1365     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -1372,7 +1372,7 @@ if ('onhashchange' in window) {
 1599 # error messages considered:
 1600 #   * ...                   -> error: no space after '*'
 1601 #   *(...                   -> error: *(...) expression must be all on a single line
-1602 next-word-or-expression:  # line : (address stream byte), out : (address slice)
+1602 next-word-or-expression:  # line : (addr stream byte), out : (addr slice)
 1603     # pseudocode:
 1604     #   skip-chars-matching(line, ' ')
 1605     #   if line->read >= line->write              # end of line
@@ -1980,7 +1980,7 @@ if ('onhashchange' in window) {
 2207 #   *(reg1+reg2<<s+disp)    -> 2/mod 4/rm32 reg1/base reg2/index s/scale disp/disp32
 2208 # Intermediate structure: base, index, scale, disp
 2209 # Default values: base: 0, index: 4 (none), scale: 0, disp: 0
-2210 parse-effective-address:  # word-slice : (address slice) -> base/eax, index/ecx, scale/edx, disp/ebx
+2210 parse-effective-address:  # word-slice : (addr slice) -> base/eax, index/ecx, scale/edx, disp/ebx
 2211     # pseudocode:
 2212     #   var local-slice = {word-slice->start, word-slice->end}
 2213     #   ++local-slice->start to skip '*'
@@ -2443,7 +2443,7 @@ if ('onhashchange' in window) {
 2670 
 2671 # assumes 'in' starts with a register name, and returns pointer to its code
 2672 # side-effect: modifies 'in' to scan past the initial register name
-2673 next-register:  # in : (address slice) -> reg/eax : int
+2673 next-register:  # in : (addr slice) -> reg/eax : int
 2674     # . prologue
 2675     55/push-ebp
 2676     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -2922,7 +2922,7 @@ if ('onhashchange' in window) {
 3149 #   if index is none, then mod = 2 and rm32 = base and disp32 = disp
 3150 # emit-sib:
 3151 #   if index is not none, then mod = 2 and rm32 = 4 and base = base and index = index and disp32 = disp
-3152 emit-indirect-mode:  # out : (address buffered-file), base : int, index : int, scale : int, disp : int
+3152 emit-indirect-mode:  # out : (addr buffered-file), base : int, index : int, scale : int, disp : int
 3153     # . prologue
 3154     55/push-ebp
 3155     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3456,7 +3456,7 @@ if ('onhashchange' in window) {
 3858     5d/pop-to-ebp
 3859     c3/return
 3860 
-3861 disp32-mode?:  # in : (address slice) -> reg/eax : boolean
+3861 disp32-mode?:  # in : (addr slice) -> reg/eax : boolean
 3862     # . prologue
 3863     55/push-ebp
 3864     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3515,7 +3515,7 @@ if ('onhashchange' in window) {
 3917     5d/pop-to-ebp
 3918     c3/return
 3919 
-3920 emit-indirect-disp32:  # out : (address buffered-file), word-slice : (address slice)
+3920 emit-indirect-disp32:  # out : (addr buffered-file), word-slice : (addr slice)
 3921     # . prologue
 3922     55/push-ebp
 3923     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3565,7 +3565,7 @@ if ('onhashchange' in window) {
 3967 # assumes 'in' starts with optional '+' or '-', optional whitespace, and an unsigned integer
 3968 # returns the value of the integer
 3969 # side-effect: modifies 'in' to skip past the integer
-3970 next-hex-int:  # in : (address slice) -> result/eax
+3970 next-hex-int:  # in : (addr slice) -> result/eax
 3971     # . prologue
 3972     55/push-ebp
 3973     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3980,7 +3980,7 @@ if ('onhashchange' in window) {
 4382 # assumes 'in' starts a positive unsigned integer
 4383 # returns the value of the integer
 4384 # side-effect: modifies 'in' to skip past the integer
-4385 next-positive-hex-int:  # in : (address slice) -> result/eax
+4385 next-positive-hex-int:  # in : (addr slice) -> result/eax
 4386     # . prologue
 4387     55/push-ebp
 4388     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/html/apps/survey.subx.html b/html/apps/survey.subx.html
index 475d3ad4..9c918fef 100644
--- a/html/apps/survey.subx.html
+++ b/html/apps/survey.subx.html
@@ -170,13 +170,13 @@ if ('onhashchange' in window) {
  107     cd/syscall  0x80/imm8
  108 
  109 # data structures:
- 110 #   segment-info: {address, file-offset, size}            (12 bytes)
- 111 #   segments: (address stream {string, segment-info})     (16 bytes per row)
- 112 #   label-info: {segment-name, segment-offset, address}   (12 bytes)
- 113 #   labels: (address stream {string, label-info})         (16 bytes per row)
+ 110 #   segment-info: {addr, file-offset, size}            (12 bytes)
+ 111 #   segments: (addr stream {string, segment-info})     (16 bytes per row)
+ 112 #   label-info: {segment-name, segment-offset, addr}   (12 bytes)
+ 113 #   labels: (addr stream {string, label-info})         (16 bytes per row)
  114 # these are all inefficient; use sequential scans for lookups
  115 
- 116 subx-survey:  # infile : (address buffered-file), out : (address buffered-file)
+ 116 subx-survey:  # infile : (addr buffered-file), out : (addr buffered-file)
  117     # pseudocode
  118     #   var in : (ref stream byte 4096)
  119     #   slurp(infile, in)
@@ -449,7 +449,7 @@ if ('onhashchange' in window) {
  618 
  619 == code
  620 
- 621 compute-offsets:  # in : (address stream byte), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+ 621 compute-offsets:  # in : (addr stream byte), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
  622     # skeleton:
  623     #   for lines in 'in'
  624     #     for words in line
@@ -460,7 +460,7 @@ if ('onhashchange' in window) {
  629     #         default
  630     #
  631     # pseudocode:
- 632     #   curr-segment-name : (address string) = 0
+ 632     #   curr-segment-name : (addr string) = 0
  633     #   var line : (stream byte 512)
  634     #   while true                                  # line loop
  635     #     clear-stream(line)
@@ -492,7 +492,7 @@ if ('onhashchange' in window) {
  661     #         break  (next line)
  662     #       else if is-label?(word-slice)
  663     #         strip trailing ':' from word-slice
- 664     #         x : (address label-info) = get-or-insert(labels, name)
+ 664     #         x : (addr label-info) = get-or-insert(labels, name)
  665     #         x->segment-name = curr-segment-name
  666     #         trace("label '", word-slice, "' is in segment '", curr-segment-name, "'.")
  667     #         x->segment-offset = segment-offset
@@ -995,9 +995,9 @@ if ('onhashchange' in window) {
 1378     5d/pop-to-ebp
 1379     c3/return
 1380 
-1381 compute-addresses:  # segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+1381 compute-addresses:  # segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
 1382     # pseudocode:
-1383     #   srow : (address segment-info) = segments->data
+1383     #   srow : (addr segment-info) = segments->data
 1384     #   max = &segments->data[segments->write]
 1385     #   num-segments = segments->write / 16
 1386     #   starting-offset = 0x34 + (num-segments * 0x20)
@@ -1008,12 +1008,12 @@ if ('onhashchange' in window) {
 1391     #     s->address += (s->file-offset & 0x00000fff)
 1392     #     trace-sssns("segment " s->key " starts at address " s->address)
 1393     #     srow += 16  # row-size
-1394     #   lrow : (address label-info) = labels->data
+1394     #   lrow : (addr label-info) = labels->data
 1395     #   max = &labels->data[labels->write]
 1396     #   while true
 1397     #     if (lrow >= max) break
-1398     #     seg-name : (address string) = lrow->segment-name
-1399     #     label-seg : (address segment-info) = get(segments, seg-name)
+1398     #     seg-name : (addr string) = lrow->segment-name
+1399     #     label-seg : (addr segment-info) = get(segments, seg-name)
 1400     #     lrow->address = label-seg->address + lrow->segment-offset
 1401     #     trace-sssns("label " lrow->key " is at address " lrow->address)
 1402     #     lrow += 16  # row-size
@@ -1092,7 +1092,7 @@ if ('onhashchange' in window) {
 1525     # seg-name/edx = lrow->segment-name
 1526     8b/copy                         1/mod/*+disp8   0/rm32/eax    .           .             .           2/r32/edx   4/disp8         .                 # copy *eax to edx
 1527 +-- 26 lines: #?     # dump seg-name -------------------------------------------------------------------------------------------------------------------------
-1553     # label-seg/edx : (address segment-info) = get(segments, seg-name, row-size=16, "segment table")
+1553     # label-seg/edx : (addr segment-info) = get(segments, seg-name, row-size=16, "segment table")
 1554     # . save eax
 1555     50/push-eax
 1556     # . eax = get(segments, seg-name, row-size=16)
@@ -1388,7 +1388,7 @@ if ('onhashchange' in window) {
 1871     5d/pop-to-ebp
 1872     c3/return
 1873 
-1874 emit-output:  # in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+1874 emit-output:  # in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
 1875     # pseudocode:
 1876     #   emit-headers(out, segments, labels)
 1877     #   emit-segments(in, out, segments, labels)
@@ -1423,7 +1423,7 @@ if ('onhashchange' in window) {
 1922     5d/pop-to-ebp
 1923     c3/return
 1924 
-1925 emit-segments:  # in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+1925 emit-segments:  # in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
 1926     # pseudocode:
 1927     #   var offset-of-next-instruction = 0
 1928     #   var line : (stream byte 512)
@@ -2425,7 +2425,7 @@ if ('onhashchange' in window) {
 3173     5d/pop-to-ebp
 3174     c3/return
 3175 
-3176 emit-headers:  # out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+3176 emit-headers:  # out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
 3177     # pseudocode:
 3178     #   emit-elf-header(out, segments, labels)
 3179     #   curr-segment = segments->data
@@ -2485,7 +2485,7 @@ if ('onhashchange' in window) {
 3311     5d/pop-to-ebp
 3312     c3/return
 3313 
-3314 emit-elf-header:  # out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
+3314 emit-elf-header:  # out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})
 3315     # pseudocode
 3316     #   *$Elf_e_entry = get(labels, "Entry")->address
 3317     #   *$Elf_e_phnum = segments->write / 16         # size of a row
@@ -2553,7 +2553,7 @@ if ('onhashchange' in window) {
 3379     5d/pop-to-ebp
 3380     c3/return
 3381 
-3382 emit-elf-program-header-entry:  # out : (address buffered-file), curr-segment : (address {string, segment-info})
+3382 emit-elf-program-header-entry:  # out : (addr buffered-file), curr-segment : (addr {string, segment-info})
 3383     # pseudocode:
 3384     #   *$Elf_p_offset = curr-segment->file-offset
 3385     #   *$Elf_p_vaddr = curr-segment->address
@@ -2642,7 +2642,7 @@ if ('onhashchange' in window) {
 3468 
 3469 # - some helpers for tests
 3470 
-3471 stream-add4:  # in : (address stream byte), key : address, val1 : address, val2 : address, val3 : address
+3471 stream-add4:  # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, val3 : addr
 3472     # . prologue
 3473     55/push-ebp
 3474     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -2724,11 +2724,11 @@ if ('onhashchange' in window) {
 3550 # some variants of 'trace' that take multiple arguments in different combinations of types:
 3551 #   n: int
 3552 #   c: character [4-bytes, will eventually be UTF-8]
-3553 #   s: (address string)
-3554 #   l: (address slice)
+3553 #   s: (addr string)
+3554 #   l: (addr slice)
 3555 # one gotcha: 's5' must not be empty
 3556 
-3557 trace-sssns:  # s1 : (address string), s2 : (address string), s3 : (address string), n4 : int, s5 : (address string)
+3557 trace-sssns:  # s1 : (addr string), s2 : (addr string), s3 : (addr string), n4 : int, s5 : (addr string)
 3558     # . prologue
 3559     55/push-ebp
 3560     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -2810,7 +2810,7 @@ if ('onhashchange' in window) {
 3661     5d/pop-to-ebp
 3662     c3/return
 3663 
-3664 trace-snsns:  # s1 : (address string), n2 : int, s3 : (address string), n4 : int, s5 : (address string)
+3664 trace-snsns:  # s1 : (addr string), n2 : int, s3 : (addr string), n4 : int, s5 : (addr string)
 3665     # . prologue
 3666     55/push-ebp
 3667     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -2892,7 +2892,7 @@ if ('onhashchange' in window) {
 3768     5d/pop-to-ebp
 3769     c3/return
 3770 
-3771 trace-slsls:  # s1 : (address string), l2 : (address slice), s3 : (address string), l4 : (address slice), s5 : (address string)
+3771 trace-slsls:  # s1 : (addr string), l2 : (addr slice), s3 : (addr string), l4 : (addr slice), s5 : (addr string)
 3772     # . prologue
 3773     55/push-ebp
 3774     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -2992,7 +2992,7 @@ if ('onhashchange' in window) {
 3893     5d/pop-to-ebp
 3894     c3/return
 3895 
-3896 trace-slsns:  # s1 : (address string), l2 : (address slice), s3 : (address string), n4 : int, s5 : (address string)
+3896 trace-slsns:  # s1 : (addr string), l2 : (addr slice), s3 : (addr string), n4 : int, s5 : (addr string)
 3897     # . prologue
 3898     55/push-ebp
 3899     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3083,7 +3083,7 @@ if ('onhashchange' in window) {
 4009     5d/pop-to-ebp
 4010     c3/return
 4011 
-4012 trace-slsss:  # s1 : (address string), l2 : (address slice), s3 : (address string), s4 : (address string), s5 : (address string)
+4012 trace-slsss:  # s1 : (addr string), l2 : (addr slice), s3 : (addr string), s4 : (addr string), s5 : (addr string)
 4013     # . prologue
 4014     55/push-ebp
 4015     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -3174,7 +3174,7 @@ if ('onhashchange' in window) {
 4125     5d/pop-to-ebp
 4126     c3/return
 4127 
-4128 num-bytes:  # line : (address stream byte) -> eax : int
+4128 num-bytes:  # line : (addr stream byte) -> eax : int
 4129     # pseudocode:
 4130     #   result = 0
 4131     #   while true
diff --git a/html/apps/tests.subx.html b/html/apps/tests.subx.html
index 3c9c8237..f7abb994 100644
--- a/html/apps/tests.subx.html
+++ b/html/apps/tests.subx.html
@@ -127,7 +127,7 @@ if ('onhashchange' in window) {
  67     b8/copy-to-eax  1/imm32/exit
  68     cd/syscall  0x80/imm8
  69 
- 70 subx-gen-run-tests:  # in : (address buffered-file), out : (address buffered-file)
+ 70 subx-gen-run-tests:  # in : (addr buffered-file), out : (addr buffered-file)
  71     # pseudocode
  72     #   bool tests-found = false
  73     #   var line : (stream byte 512)