diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-03 01:36:34 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-03 01:36:34 -0800 |
commit | 7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077 (patch) | |
tree | 405503a31b48f5c5e13f103efc5762e57b290625 /html/apps | |
parent | c9bda4d13ea33873dd5bce1eef0434cb11763d19 (diff) | |
download | mu-7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077.tar.gz |
5876 - address -> addr
Diffstat (limited to 'html/apps')
-rw-r--r-- | html/apps/assort.subx.html | 24 | ||||
-rw-r--r-- | html/apps/braces.subx.html | 4 | ||||
-rw-r--r-- | html/apps/calls.subx.html | 14 | ||||
-rw-r--r-- | html/apps/crenshaw2-1.subx.html | 8 | ||||
-rw-r--r-- | html/apps/crenshaw2-1b.subx.html | 8 | ||||
-rw-r--r-- | html/apps/dquotes.subx.html | 20 | ||||
-rw-r--r-- | html/apps/ex11.subx.html | 4 | ||||
-rw-r--r-- | html/apps/ex8.subx.html | 2 | ||||
-rw-r--r-- | html/apps/handle.subx.html | 4 | ||||
-rw-r--r-- | html/apps/hex.subx.html | 8 | ||||
-rw-r--r-- | html/apps/mu.subx.html | 118 | ||||
-rw-r--r-- | html/apps/mulisp.subx.html | 30 | ||||
-rw-r--r-- | html/apps/pack.subx.html | 42 | ||||
-rw-r--r-- | html/apps/sigils.subx.html | 20 | ||||
-rw-r--r-- | html/apps/survey.subx.html | 56 | ||||
-rw-r--r-- | html/apps/tests.subx.html | 2 |
16 files changed, 182 insertions, 182 deletions
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) { <span id="L83" class="LineNr"> 83 </span> cd/syscall 0x80/imm8 <span id="L84" class="LineNr"> 84 </span> <span id="L85" class="LineNr"> 85 </span><span class="subxComment"># data structure:</span> -<span id="L86" class="LineNr"> 86 </span><span class="subxComment"># table: (address stream {string, (address stream byte)}) (8 bytes per row)</span> +<span id="L86" class="LineNr"> 86 </span><span class="subxComment"># table: (addr stream {string, (addr stream byte)}) (8 bytes per row)</span> <span id="L87" class="LineNr"> 87 </span><span class="subxComment"># inefficient; uses sequential search for looking up segments by name</span> <span id="L88" class="LineNr"> 88 </span> -<span id="L89" class="LineNr"> 89 </span><span class="subxFunction">subx-assort</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L89" class="LineNr"> 89 </span><span class="subxFunction">subx-assort</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L90" class="LineNr"> 90 </span> <span class="subxComment"># pseudocode:</span> -<span id="L91" class="LineNr"> 91 </span> <span class="subxComment"># var table : (address stream {string, (address stream byte)} 10/rows)</span> +<span id="L91" class="LineNr"> 91 </span> <span class="subxComment"># var table : (addr stream {string, (addr stream byte)} 10/rows)</span> <span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># read-segments(in, table)</span> <span id="L93" class="LineNr"> 93 </span> <span class="subxComment"># write-segments(out, table)</span> <span id="L94" class="LineNr"> 94 </span> <span class="subxComment">#</span> @@ -159,7 +159,7 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> <span id="L98" class="LineNr"> 98 </span> <span class="subxS1Comment"># . save registers</span> <span id="L99" class="LineNr"> 99 </span> 51/push-ecx -<span id="L100" class="LineNr">100 </span> <span class="subxComment"># var table/ecx : (ref stream {string, (address stream byte)} 80) # 10 rows * 8 bytes/row</span> +<span id="L100" class="LineNr">100 </span> <span class="subxComment"># var table/ecx : (ref stream {string, (addr stream byte)} 80) # 10 rows * 8 bytes/row</span> <span id="L101" class="LineNr">101 </span> 81 5/subop/subtract 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x50/imm32 <span class="subxComment"># subtract from esp</span> <span id="L102" class="LineNr">102 </span> 68/push 0x50/imm32/length <span id="L103" class="LineNr">103 </span> 68/push 0/imm32/read @@ -464,10 +464,10 @@ if ('onhashchange' in window) { <span id="L450" class="LineNr">450 </span> 5d/pop-to-ebp <span id="L451" class="LineNr">451 </span> c3/return <span id="L452" class="LineNr">452 </span> -<span id="L453" class="LineNr">453 </span><span class="subxComment"># type string_key = (address array byte)</span> +<span id="L453" class="LineNr">453 </span><span class="subxComment"># type string_key = (addr array byte)</span> <span id="L454" class="LineNr">454 </span> <span id="L455" class="LineNr">455 </span><span class="subxComment"># beware: leaks memory (one name per segment read)</span> -<span id="L456" class="LineNr">456 </span><span class="subxFunction">read-segments</span>: <span class="subxComment"># in : (address buffered-file), table : (address stream {string_key, (handle stream byte)})</span> +<span id="L456" class="LineNr">456 </span><span class="subxFunction">read-segments</span>: <span class="subxComment"># in : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)})</span> <span id="L457" class="LineNr">457 </span> <span class="subxComment"># pseudocode:</span> <span id="L458" class="LineNr">458 </span> <span class="subxComment"># var curr-segment : (handle stream byte) = 0</span> <span id="L459" class="LineNr">459 </span> <span class="subxComment"># var line : (stream byte 512)</span> @@ -565,7 +565,7 @@ if ('onhashchange' in window) { <span id="L591" class="LineNr">591 </span><span class="Constant">$read-segments:check-for-comment</span>: <span id="L592" class="Folded">592 </span><span class="Folded">+-- 9 lines: #? # print("check for comment\n") ----------------------------------------------------------------------------------------------------------</span> <span id="L601" class="LineNr">601 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) continue</span> -<span id="L602" class="LineNr">602 </span> <span class="subxS1Comment"># . var start/esi : (address byte) = word-slice->start</span> +<span id="L602" class="LineNr">602 </span> <span class="subxS1Comment"># . var start/esi : (addr byte) = word-slice->start</span> <span id="L603" class="LineNr">603 </span> 8b/copy 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to esi</span> <span id="L604" class="LineNr">604 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L605" class="LineNr">605 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -597,7 +597,7 @@ if ('onhashchange' in window) { <span id="L678" class="LineNr">678 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L679" class="LineNr">679 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> <span id="L680" class="Folded">680 </span><span class="Folded">+-- 40 lines: #? # dump segment name ---------------------------------------------------------------------------------------------------------------------</span> -<span id="L720" class="LineNr">720 </span> <span class="subxComment"># var segment-slot/eax : (address handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8)</span> +<span id="L720" class="LineNr">720 </span> <span class="subxComment"># var segment-slot/eax : (addr handle stream byte) = leaky-get-or-insert-slice(table, segment-name, row-size=8)</span> <span id="L721" class="LineNr">721 </span> <span class="subxS2Comment"># . . push args</span> <span id="L722" class="LineNr">722 </span> 68/push 8/imm32/row-size <span id="L723" class="LineNr">723 </span> 52/push-edx @@ -667,7 +667,7 @@ if ('onhashchange' in window) { <span id="L843" class="LineNr">843 </span> 5d/pop-to-ebp <span id="L844" class="LineNr">844 </span> c3/return <span id="L845" class="LineNr">845 </span> -<span id="L846" class="LineNr">846 </span><span class="subxFunction">write-segments</span>: <span class="subxComment"># out : (address buffered-file), table : (address stream {string_key, (handle stream byte)})</span> +<span id="L846" class="LineNr">846 </span><span class="subxFunction">write-segments</span>: <span class="subxComment"># out : (addr buffered-file), table : (addr stream {string_key, (handle stream byte)})</span> <span id="L847" class="LineNr">847 </span> <span class="subxComment"># pseudocode:</span> <span id="L848" class="LineNr">848 </span> <span class="subxComment"># var curr = table->data</span> <span id="L849" class="LineNr">849 </span> <span class="subxComment"># var max = &table->data[table->write]</span> @@ -688,15 +688,15 @@ if ('onhashchange' in window) { <span id="L864" class="LineNr">864 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> <span id="L865" class="LineNr">865 </span> <span class="subxComment"># var write/edx : int = table->write</span> <span id="L866" class="LineNr">866 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to edx</span> -<span id="L867" class="LineNr">867 </span> <span class="subxComment"># var curr/esi : (address byte) = table->data</span> +<span id="L867" class="LineNr">867 </span> <span class="subxComment"># var curr/esi : (addr byte) = table->data</span> <span id="L868" class="LineNr">868 </span> 81 0/subop/add 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to eax</span> -<span id="L869" class="LineNr">869 </span> <span class="subxComment"># var max/edx : (address byte) = curr + write</span> +<span id="L869" class="LineNr">869 </span> <span class="subxComment"># var max/edx : (addr byte) = curr + write</span> <span id="L870" class="LineNr">870 </span> 01/add 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># add esi to edx</span> <span id="L871" class="LineNr">871 </span><span class="Constant">$write-segments:loop</span>: <span id="L872" class="LineNr">872 </span> <span class="subxComment"># if (curr >= max) break</span> <span id="L873" class="LineNr">873 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with edx</span> <span id="L874" class="LineNr">874 </span> 73/jump-if-greater-or-equal-unsigned $write-segments:<span class="Constant">break</span>/disp8 -<span id="L875" class="LineNr">875 </span> <span class="subxComment"># var stream/eax : (address stream byte) = table[i].stream</span> +<span id="L875" class="LineNr">875 </span> <span class="subxComment"># var stream/eax : (addr stream byte) = table[i].stream</span> <span id="L876" class="LineNr">876 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to eax</span> <span id="L877" class="LineNr">877 </span> <span class="subxComment"># write-stream-data(out, stream)</span> <span id="L878" class="LineNr">878 </span> <span class="subxS2Comment"># . . push args</span> 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) { <span id="L75" class="LineNr"> 75 </span> b8/copy-to-eax 1/imm32/exit <span id="L76" class="LineNr"> 76 </span> cd/syscall 0x80/imm8 <span id="L77" class="LineNr"> 77 </span> -<span id="L78" class="LineNr"> 78 </span><span class="subxFunction">subx-braces</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L78" class="LineNr"> 78 </span><span class="subxFunction">subx-braces</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># pseudocode:</span> <span id="L80" class="LineNr"> 80 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># var label-stack : (stack int 32) # at most 32 levels of nesting</span> @@ -154,7 +154,7 @@ if ('onhashchange' in window) { <span id="L95" class="LineNr"> 95 </span> <span class="subxComment"># print(out, "_break" top ":\n")</span> <span id="L96" class="LineNr"> 96 </span> <span class="subxComment"># continue</span> <span id="L97" class="LineNr"> 97 </span> <span class="subxComment"># while true</span> -<span id="L98" class="LineNr"> 98 </span> <span class="subxComment"># var word-slice : (address slice) = next-word-or-string(line)</span> +<span id="L98" class="LineNr"> 98 </span> <span class="subxComment"># var word-slice : (addr slice) = next-word-or-string(line)</span> <span id="L99" class="LineNr"> 99 </span> <span class="subxComment"># if slice-empty?(word-slice) # end of line</span> <span id="L100" class="LineNr">100 </span> <span class="subxComment"># break</span> <span id="L101" class="LineNr">101 </span> <span class="subxComment"># if slice-starts-with?(word-slice, "#") # comment</span> 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) { <span id="L75" class="LineNr"> 75 </span> b8/copy-to-eax 1/imm32/exit <span id="L76" class="LineNr"> 76 </span> cd/syscall 0x80/imm8 <span id="L77" class="LineNr"> 77 </span> -<span id="L78" class="LineNr"> 78 </span><span class="subxFunction">subx-calls</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L78" class="LineNr"> 78 </span><span class="subxFunction">subx-calls</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># pseudocode:</span> <span id="L80" class="LineNr"> 80 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># var words : (ref stream slice 16) # at most function name and 15 args</span> @@ -292,7 +292,7 @@ if ('onhashchange' in window) { <span id="L231" class="LineNr"> 231 </span> 5d/pop-to-ebp <span id="L232" class="LineNr"> 232 </span> c3/return <span id="L233" class="LineNr"> 233 </span> -<span id="L234" class="LineNr"> 234 </span><span class="subxFunction">parse-line</span>: <span class="subxComment"># line : (address stream byte), words : (address stream slice)</span> +<span id="L234" class="LineNr"> 234 </span><span class="subxFunction">parse-line</span>: <span class="subxComment"># line : (addr stream byte), words : (addr stream slice)</span> <span id="L235" class="LineNr"> 235 </span> <span class="subxComment"># pseudocode:</span> <span id="L236" class="LineNr"> 236 </span> <span class="subxComment"># var word-slice : (ref slice)</span> <span id="L237" class="LineNr"> 237 </span> <span class="subxComment"># while true</span> @@ -362,7 +362,7 @@ if ('onhashchange' in window) { <span id="L340" class="LineNr"> 340 </span> 5d/pop-to-ebp <span id="L341" class="LineNr"> 341 </span> c3/return <span id="L342" class="LineNr"> 342 </span> -<span id="L343" class="LineNr"> 343 </span><span class="subxFunction">emit-call</span>: <span class="subxComment"># out : (address buffered-file), words : (address stream slice)</span> +<span id="L343" class="LineNr"> 343 </span><span class="subxFunction">emit-call</span>: <span class="subxComment"># out : (addr buffered-file), words : (addr stream slice)</span> <span id="L344" class="LineNr"> 344 </span> <span class="subxComment"># pseudocode:</span> <span id="L345" class="LineNr"> 345 </span> <span class="subxComment"># if (words->write < 8) abort</span> <span id="L346" class="LineNr"> 346 </span> <span class="subxComment"># curr = &words->data[words->write-8]</span> @@ -403,9 +403,9 @@ if ('onhashchange' in window) { <span id="L381" class="LineNr"> 381 </span> 8b/-> *esi 1/r32/ecx <span id="L382" class="LineNr"> 382 </span> 81 5/subop/subtract %ecx 8/imm32 <span id="L383" class="LineNr"> 383 </span> 0f 8c/jump-if-lesser $emit-call:error1/disp32 -<span id="L384" class="LineNr"> 384 </span> <span class="subxComment"># var curr/ecx : (address slice) = &words->data[words->write-8]</span> +<span id="L384" class="LineNr"> 384 </span> <span class="subxComment"># var curr/ecx : (addr slice) = &words->data[words->write-8]</span> <span id="L385" class="LineNr"> 385 </span> 8d/copy-address *(esi+ecx+0xc) 1/r32/ecx -<span id="L386" class="LineNr"> 386 </span> <span class="subxComment"># var min/edx : (address byte) = words->data</span> +<span id="L386" class="LineNr"> 386 </span> <span class="subxComment"># var min/edx : (addr byte) = words->data</span> <span id="L387" class="LineNr"> 387 </span> 8d/copy-address *(esi+0xc) 2/r32/edx <span id="L388" class="LineNr"> 388 </span> <span class="subxH1Comment"># - emit pushes</span> <span id="L389" class="LineNr"> 389 </span><span class="Constant">$emit-call:push-loop</span>: @@ -413,7 +413,7 @@ if ('onhashchange' in window) { <span id="L391" class="LineNr"> 391 </span> 39/compare %ecx 2/r32/edx <span id="L392" class="LineNr"> 392 </span> 0f 8e/jump-if-lesser-or-equal $emit-call:call-instruction/disp32 <span id="L393" class="LineNr"> 393 </span> <span class="subxComment"># if (*curr->start in '%' '*') goto push-rm32</span> -<span id="L394" class="LineNr"> 394 </span> <span class="subxS1Comment"># . var start/eax : (address byte) = curr->start</span> +<span id="L394" class="LineNr"> 394 </span> <span class="subxS1Comment"># . var start/eax : (addr byte) = curr->start</span> <span id="L395" class="LineNr"> 395 </span> 8b/-> *ecx 0/r32/eax <span id="L396" class="LineNr"> 396 </span> <span class="subxS1Comment"># . var c/eax : byte = *eax</span> <span id="L397" class="LineNr"> 397 </span> 8b/-> *eax 0/r32/eax @@ -731,7 +731,7 @@ if ('onhashchange' in window) { <span id="L741" class="LineNr"> 741 </span> 5d/pop-to-ebp <span id="L742" class="LineNr"> 742 </span> c3/return <span id="L743" class="LineNr"> 743 </span> -<span id="L744" class="LineNr"> 744 </span><span class="subxFunction">next-word-string-or-expression-without-metadata</span>: <span class="subxComment"># line : (address stream byte), out : (address slice)</span> +<span id="L744" class="LineNr"> 744 </span><span class="subxFunction">next-word-string-or-expression-without-metadata</span>: <span class="subxComment"># line : (addr stream byte), out : (addr slice)</span> <span id="L745" class="LineNr"> 745 </span> <span class="subxComment"># pseudocode:</span> <span id="L746" class="LineNr"> 746 </span> <span class="subxComment"># skip-chars-matching(line, ' ')</span> <span id="L747" class="LineNr"> 747 </span> <span class="subxComment"># if line->read >= line->write # end of line</span> 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) { <span id="L90" class="LineNr"> 90 </span> cd/syscall 0x80/imm8 <span id="L91" class="LineNr"> 91 </span> <span id="L92" class="LineNr"> 92 </span><span class="subxComment"># the main entry point</span> -<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">compile</span>: <span class="subxComment"># in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)</span> +<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">compile</span>: <span class="subxComment"># in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)</span> <span id="L94" class="LineNr"> 94 </span> <span class="subxS1Comment"># . prologue</span> <span id="L95" class="LineNr"> 95 </span> 55/push-ebp <span id="L96" class="LineNr"> 96 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -252,7 +252,7 @@ if ('onhashchange' in window) { <span id="L191" class="LineNr">191 </span><span class="subxComment"># space in 'out'.</span> <span id="L192" class="LineNr">192 </span><span class="subxComment"># Input comes from the global variable 'Look' (first byte) and the argument</span> <span id="L193" class="LineNr">193 </span><span class="subxComment"># 'in' (rest). We leave the next byte from 'in' into 'Look' on exit.</span> -<span id="L194" class="LineNr">194 </span><span class="subxFunction">get-num</span>: <span class="subxComment"># in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)</span> +<span id="L194" class="LineNr">194 </span><span class="subxFunction">get-num</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)</span> <span id="L195" class="LineNr">195 </span> <span class="subxComment"># pseudocode:</span> <span id="L196" class="LineNr">196 </span> <span class="subxComment"># if (!is-digit?(Look)) expected(ed, err, "integer")</span> <span id="L197" class="LineNr">197 </span> <span class="subxComment"># if out->write >= out->length</span> @@ -531,7 +531,7 @@ if ('onhashchange' in window) { <span id="L470" class="LineNr">470 </span><span class="subxComment">## helpers</span> <span id="L471" class="LineNr">471 </span> <span id="L472" class="LineNr">472 </span><span class="subxComment"># write(f, "Error: "+s+" expected\n") then stop(ed, 1)</span> -<span id="L473" class="LineNr">473 </span><span class="subxFunction">expected</span>: <span class="subxComment"># ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte)</span> +<span id="L473" class="LineNr">473 </span><span class="subxFunction">expected</span>: <span class="subxComment"># ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte)</span> <span id="L474" class="LineNr">474 </span> <span class="subxS1Comment"># . prologue</span> <span id="L475" class="LineNr">475 </span> 55/push-ebp <span id="L476" class="LineNr">476 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -573,7 +573,7 @@ if ('onhashchange' in window) { <span id="L512" class="LineNr">512 </span> c3/return <span id="L513" class="LineNr">513 </span> <span id="L514" class="LineNr">514 </span><span class="subxComment"># read a byte from 'f', and save it in 'Look'</span> -<span id="L515" class="LineNr">515 </span><span class="subxFunction">get-char</span>: <span class="subxComment"># f : (address buffered-file)</span> +<span id="L515" class="LineNr">515 </span><span class="subxFunction">get-char</span>: <span class="subxComment"># f : (addr buffered-file)</span> <span id="L516" class="LineNr">516 </span> <span class="subxS1Comment"># . prologue</span> <span id="L517" class="LineNr">517 </span> 55/push-ebp <span id="L518" class="LineNr">518 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L90" class="LineNr"> 90 </span> cd/syscall 0x80/imm8 <span id="L91" class="LineNr"> 91 </span> <span id="L92" class="LineNr"> 92 </span><span class="subxComment"># the main entry point</span> -<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">compile</span>: <span class="subxComment"># in : (address buffered-file), out : fd or (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)</span> +<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">compile</span>: <span class="subxComment"># in : (addr buffered-file), out : fd or (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)</span> <span id="L94" class="LineNr"> 94 </span> <span class="subxS1Comment"># . prologue</span> <span id="L95" class="LineNr"> 95 </span> 55/push-ebp <span id="L96" class="LineNr"> 96 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -252,7 +252,7 @@ if ('onhashchange' in window) { <span id="L191" class="LineNr">191 </span><span class="subxComment"># no space in 'out'.</span> <span id="L192" class="LineNr">192 </span><span class="subxComment"># Input comes from the global variable 'Look' (first byte) and the argument</span> <span id="L193" class="LineNr">193 </span><span class="subxComment"># 'in' (rest). We leave the next byte from 'in' into 'Look' on exit.</span> -<span id="L194" class="LineNr">194 </span><span class="subxFunction">get-num</span>: <span class="subxComment"># in : (address buffered-file), out : (address stream byte), err : fd or (address stream byte), ed : (address exit-descriptor)</span> +<span id="L194" class="LineNr">194 </span><span class="subxFunction">get-num</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr stream byte), err : fd or (addr stream byte), ed : (addr exit-descriptor)</span> <span id="L195" class="LineNr">195 </span> <span class="subxComment"># pseudocode:</span> <span id="L196" class="LineNr">196 </span> <span class="subxComment"># if (!is-digit?(Look)) expected(ed, err, "integer")</span> <span id="L197" class="LineNr">197 </span> <span class="subxComment"># do</span> @@ -725,7 +725,7 @@ if ('onhashchange' in window) { <span id="L664" class="LineNr">664 </span><span class="subxComment">## helpers</span> <span id="L665" class="LineNr">665 </span> <span id="L666" class="LineNr">666 </span><span class="subxComment"># write(f, "Error: "+s+" expected\n") then stop(ed, 1)</span> -<span id="L667" class="LineNr">667 </span><span class="subxFunction">expected</span>: <span class="subxComment"># ed : (address exit-descriptor), f : fd or (address stream byte), s : (address array byte)</span> +<span id="L667" class="LineNr">667 </span><span class="subxFunction">expected</span>: <span class="subxComment"># ed : (addr exit-descriptor), f : fd or (addr stream byte), s : (addr array byte)</span> <span id="L668" class="LineNr">668 </span> <span class="subxS1Comment"># . prologue</span> <span id="L669" class="LineNr">669 </span> 55/push-ebp <span id="L670" class="LineNr">670 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -767,7 +767,7 @@ if ('onhashchange' in window) { <span id="L706" class="LineNr">706 </span> c3/return <span id="L707" class="LineNr">707 </span> <span id="L708" class="LineNr">708 </span><span class="subxComment"># read a byte from 'f', and save it in 'Look'</span> -<span id="L709" class="LineNr">709 </span><span class="subxFunction">get-char</span>: <span class="subxComment"># f : (address buffered-file)</span> +<span id="L709" class="LineNr">709 </span><span class="subxFunction">get-char</span>: <span class="subxComment"># f : (addr buffered-file)</span> <span id="L710" class="LineNr">710 </span> <span class="subxS1Comment"># . prologue</span> <span id="L711" class="LineNr">711 </span> 55/push-ebp <span id="L712" class="LineNr">712 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L82" class="LineNr"> 82 </span><span class="subxComment"># line = words separated by ' ', maybe followed by comment starting with '#'</span> <span id="L83" class="LineNr"> 83 </span><span class="subxComment"># word = datum until '/', then 0 or more metadata separated by '/'</span> <span id="L84" class="LineNr"> 84 </span> -<span id="L85" class="LineNr"> 85 </span><span class="subxFunction">subx-dquotes</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L85" class="LineNr"> 85 </span><span class="subxFunction">subx-dquotes</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L86" class="LineNr"> 86 </span> <span class="subxComment"># pseudocode:</span> <span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L88" class="LineNr"> 88 </span> <span class="subxComment"># var new-data-segment : (handle stream byte) = new-stream(Heap, Segment-size, 1)</span> @@ -261,7 +261,7 @@ if ('onhashchange' in window) { <span id="L198" class="LineNr"> 198 </span> 0f 85/jump-if-not-equal $subx-dquotes:next-line/disp32 <span id="L199" class="LineNr"> 199 </span><span class="Constant">$subx-dquotes:check-for-comment</span>: <span id="L200" class="LineNr"> 200 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) continue</span> -<span id="L201" class="LineNr"> 201 </span> <span class="subxS1Comment"># . var start/esi : (address byte) = word-slice->start</span> +<span id="L201" class="LineNr"> 201 </span> <span class="subxS1Comment"># . var start/esi : (addr byte) = word-slice->start</span> <span id="L202" class="LineNr"> 202 </span> 8b/copy 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edx to esi</span> <span id="L203" class="LineNr"> 203 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L204" class="LineNr"> 204 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -350,7 +350,7 @@ if ('onhashchange' in window) { <span id="L287" class="LineNr"> 287 </span> <span id="L288" class="LineNr"> 288 </span><span class="subxComment"># Write out 'string-literal' in a new format to 'out-segment', assign it a new</span> <span id="L289" class="LineNr"> 289 </span><span class="subxComment"># label, and write the new label out to 'out'.</span> -<span id="L290" class="LineNr"> 290 </span><span class="subxFunction">process-string-literal</span>: <span class="subxComment"># string-literal : (address slice), out : (address buffered-file), out-segment : (address stream byte)</span> +<span id="L290" class="LineNr"> 290 </span><span class="subxFunction">process-string-literal</span>: <span class="subxComment"># string-literal : (addr slice), out : (addr buffered-file), out-segment : (addr stream byte)</span> <span id="L291" class="LineNr"> 291 </span> <span class="subxComment"># pseudocode:</span> <span id="L292" class="LineNr"> 292 </span> <span class="subxComment"># print(out-segment, "_string#{Next-string-literal}:\n")</span> <span id="L293" class="LineNr"> 293 </span> <span class="subxComment"># emit-string-literal-data(out-segment, string-literal)</span> @@ -852,7 +852,7 @@ if ('onhashchange' in window) { <span id="L846" class="LineNr"> 846 </span> c3/return <span id="L847" class="LineNr"> 847 </span> <span id="L848" class="LineNr"> 848 </span><span class="subxComment"># generate the data segment contents byte by byte for a given slice</span> -<span id="L849" class="LineNr"> 849 </span><span class="subxFunction">emit-string-literal-data</span>: <span class="subxComment"># out : (address stream byte), word : (address slice)</span> +<span id="L849" class="LineNr"> 849 </span><span class="subxFunction">emit-string-literal-data</span>: <span class="subxComment"># out : (addr stream byte), word : (addr slice)</span> <span id="L850" class="LineNr"> 850 </span> <span class="subxComment"># pseudocode</span> <span id="L851" class="LineNr"> 851 </span> <span class="subxComment"># len = string-length-at-start-of-slice(word->start, word->end)</span> <span id="L852" class="LineNr"> 852 </span> <span class="subxComment"># print(out, "#{len}/imm32 ")</span> @@ -893,9 +893,9 @@ if ('onhashchange' in window) { <span id="L887" class="LineNr"> 887 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> <span id="L888" class="LineNr"> 888 </span> <span class="subxComment"># var idx/ebx : int = 0</span> <span id="L889" class="LineNr"> 889 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span> -<span id="L890" class="LineNr"> 890 </span> <span class="subxComment"># var curr/edx : (address byte) = word->start</span> +<span id="L890" class="LineNr"> 890 </span> <span class="subxComment"># var curr/edx : (addr byte) = word->start</span> <span id="L891" class="LineNr"> 891 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to edx</span> -<span id="L892" class="LineNr"> 892 </span> <span class="subxComment"># var max/esi : (address byte) = word->end</span> +<span id="L892" class="LineNr"> 892 </span> <span class="subxComment"># var max/esi : (addr byte) = word->end</span> <span id="L893" class="LineNr"> 893 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to esi</span> <span id="L894" class="LineNr"> 894 </span><span class="Constant">$emit-string-literal-data:emit-length</span>: <span id="L895" class="LineNr"> 895 </span> <span class="subxComment"># var len/eax : int = string-length-at-start-of-slice(word->start, word->end)</span> @@ -1260,7 +1260,7 @@ if ('onhashchange' in window) { <span id="L1379" class="LineNr">1379 </span> c3/return <span id="L1380" class="LineNr">1380 </span> <span id="L1381" class="LineNr">1381 </span><span class="subxComment"># emit everything from a word except the initial datum</span> -<span id="L1382" class="LineNr">1382 </span><span class="subxFunction">emit-metadata</span>: <span class="subxComment"># out : (address buffered-file), word : (address slice)</span> +<span id="L1382" class="LineNr">1382 </span><span class="subxFunction">emit-metadata</span>: <span class="subxComment"># out : (addr buffered-file), word : (addr slice)</span> <span id="L1383" class="LineNr">1383 </span> <span class="subxComment"># pseudocode</span> <span id="L1384" class="LineNr">1384 </span> <span class="subxComment"># var slice : (ref slice) = {0, word->end}</span> <span id="L1385" class="LineNr">1385 </span> <span class="subxComment"># curr = word->start</span> @@ -1287,9 +1287,9 @@ if ('onhashchange' in window) { <span id="L1406" class="LineNr">1406 </span> 56/push-esi <span id="L1407" class="LineNr">1407 </span> <span class="subxComment"># esi = word</span> <span id="L1408" class="LineNr">1408 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> -<span id="L1409" class="LineNr">1409 </span> <span class="subxComment"># var curr/ecx : (address byte) = word->start</span> +<span id="L1409" class="LineNr">1409 </span> <span class="subxComment"># var curr/ecx : (addr byte) = word->start</span> <span id="L1410" class="LineNr">1410 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to ecx</span> -<span id="L1411" class="LineNr">1411 </span> <span class="subxComment"># var end/edx : (address byte) = word->end</span> +<span id="L1411" class="LineNr">1411 </span> <span class="subxComment"># var end/edx : (addr byte) = word->end</span> <span id="L1412" class="LineNr">1412 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to edx</span> <span id="L1413" class="LineNr">1413 </span> <span class="subxComment"># var slice/ebx : (ref slice) = {0, end}</span> <span id="L1414" class="LineNr">1414 </span> 52/push-edx @@ -1634,7 +1634,7 @@ if ('onhashchange' in window) { <span id="L1778" class="LineNr">1778 </span> 5d/pop-to-ebp <span id="L1779" class="LineNr">1779 </span> c3/return <span id="L1780" class="LineNr">1780 </span> -<span id="L1781" class="LineNr">1781 </span><span class="subxFunction">string-length-at-start-of-slice</span>: <span class="subxComment"># curr : (address byte), end : (address byte) -> length/eax</span> +<span id="L1781" class="LineNr">1781 </span><span class="subxFunction">string-length-at-start-of-slice</span>: <span class="subxComment"># curr : (addr byte), end : (addr byte) -> length/eax</span> <span id="L1782" class="LineNr">1782 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1783" class="LineNr">1783 </span> 55/push-ebp <span id="L1784" class="LineNr">1784 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L258" class="LineNr">258 </span><span class="subxH1Comment"># - helpers</span> <span id="L259" class="LineNr">259 </span> <span id="L260" class="LineNr">260 </span><span class="subxComment"># print msg to stderr if a != b, otherwise print "."</span> -<span id="L261" class="LineNr">261 </span><span class="subxFunction">check-ints-equal</span>: <span class="subxComment"># (a : int, b : int, msg : (address array byte)) -> boolean</span> +<span id="L261" class="LineNr">261 </span><span class="subxFunction">check-ints-equal</span>: <span class="subxComment"># (a : int, b : int, msg : (addr array byte)) -> boolean</span> <span id="L262" class="LineNr">262 </span> <span class="subxS1Comment"># . prologue</span> <span id="L263" class="LineNr">263 </span> 55/push-ebp <span id="L264" class="LineNr">264 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -369,7 +369,7 @@ if ('onhashchange' in window) { <span id="L307" class="LineNr">307 </span> 5d/pop-to-ebp <span id="L308" class="LineNr">308 </span> c3/return <span id="L309" class="LineNr">309 </span> -<span id="L310" class="LineNr">310 </span><span class="subxFunction">write-stderr</span>: <span class="subxComment"># s : (address array byte) -> <void></span> +<span id="L310" class="LineNr">310 </span><span class="subxFunction">write-stderr</span>: <span class="subxComment"># s : (addr array byte) -> <void></span> <span id="L311" class="LineNr">311 </span> <span class="subxS1Comment"># . prologue</span> <span id="L312" class="LineNr">312 </span> 55/push-ebp <span id="L313" class="LineNr">313 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L34" class="LineNr">34 </span> 89/copy 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to ebx</span> <span id="L35" class="LineNr">35 </span> e8/call syscall_exit/disp32 <span id="L36" class="LineNr">36 </span> -<span id="L37" class="LineNr">37 </span><span class="subxFunction">ascii-length</span>: <span class="subxComment"># s : (address array byte) -> n/eax</span> +<span id="L37" class="LineNr">37 </span><span class="subxFunction">ascii-length</span>: <span class="subxComment"># s : (addr array byte) -> n/eax</span> <span id="L38" class="LineNr">38 </span> <span class="subxComment"># edx = s</span> <span id="L39" class="LineNr">39 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esp+4) to edx</span> <span id="L40" class="LineNr">40 </span> <span class="subxComment"># var result/eax = 0</span> 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) { <span id="L44" class="LineNr"> 44 </span> b8/copy-to-eax 1/imm32/exit <span id="L45" class="LineNr"> 45 </span> cd/syscall 0x80/imm8 <span id="L46" class="LineNr"> 46 </span> -<span id="L47" class="LineNr"> 47 </span><span class="subxFunction">new</span>: <span class="subxComment"># ad : (address allocation-descriptor), n : int, out : (handle _)</span> +<span id="L47" class="LineNr"> 47 </span><span class="subxFunction">new</span>: <span class="subxComment"># ad : (addr allocation-descriptor), n : int, out : (handle _)</span> <span id="L48" class="LineNr"> 48 </span> <span class="subxS1Comment"># . prologue</span> <span id="L49" class="LineNr"> 49 </span> 55/push-ebp <span id="L50" class="LineNr"> 50 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -284,7 +284,7 @@ if ('onhashchange' in window) { <span id="L221" class="LineNr">221 </span> 5d/pop-to-ebp <span id="L222" class="LineNr">222 </span> c3/return <span id="L223" class="LineNr">223 </span> -<span id="L224" class="LineNr">224 </span><span class="subxFunction">lookup</span>: <span class="subxComment"># h : (handle T) -> eax : (address T)</span> +<span id="L224" class="LineNr">224 </span><span class="subxFunction">lookup</span>: <span class="subxComment"># h : (handle T) -> eax : (addr T)</span> <span id="L225" class="LineNr">225 </span> <span class="subxS1Comment"># . prologue</span> <span id="L226" class="LineNr">226 </span> 55/push-ebp <span id="L227" class="LineNr">227 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L77" class="LineNr"> 77 </span> cd/syscall 0x80/imm8 <span id="L78" class="LineNr"> 78 </span> <span id="L79" class="LineNr"> 79 </span><span class="subxComment"># the main entry point</span> -<span id="L80" class="LineNr"> 80 </span><span class="subxFunction">subx-hex</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor)</span> +<span id="L80" class="LineNr"> 80 </span><span class="subxFunction">subx-hex</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor)</span> <span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># pseudocode:</span> <span id="L82" class="LineNr"> 82 </span> <span class="subxComment"># while true</span> <span id="L83" class="LineNr"> 83 </span> <span class="subxComment"># eax = convert-next-octet(in, err, ed)</span> @@ -196,7 +196,7 @@ if ('onhashchange' in window) { <span id="L135" class="LineNr"> 135 </span><span class="subxComment"># raise an error and abort on all other unexpected bytes</span> <span id="L136" class="LineNr"> 136 </span><span class="subxComment"># return in eax an _octet_ containing the binary value of the two hex characters</span> <span id="L137" class="LineNr"> 137 </span><span class="subxComment"># return Eof on reaching end of file</span> -<span id="L138" class="LineNr"> 138 </span><span class="subxFunction">convert-next-octet</span>: <span class="subxComment"># in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax</span> +<span id="L138" class="LineNr"> 138 </span><span class="subxFunction">convert-next-octet</span>: <span class="subxComment"># in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax</span> <span id="L139" class="LineNr"> 139 </span> <span class="subxComment"># pseudocode:</span> <span id="L140" class="LineNr"> 140 </span> <span class="subxComment"># eax = scan-next-byte(in, err, ed)</span> <span id="L141" class="LineNr"> 141 </span> <span class="subxComment"># if (eax == Eof) return</span> @@ -542,7 +542,7 @@ if ('onhashchange' in window) { <span id="L481" class="LineNr"> 481 </span><span class="subxComment"># return Eof if file ends without finding a hex byte</span> <span id="L482" class="LineNr"> 482 </span><span class="subxComment"># on '#' skip all bytes until newline</span> <span id="L483" class="LineNr"> 483 </span><span class="subxComment"># abort on any other byte</span> -<span id="L484" class="LineNr"> 484 </span><span class="subxFunction">scan-next-byte</span>: <span class="subxComment"># in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/eax</span> +<span id="L484" class="LineNr"> 484 </span><span class="subxFunction">scan-next-byte</span>: <span class="subxComment"># in : (addr buffered-file), err : (addr buffered-file), ed : (addr exit-descriptor) -> byte-or-Eof/eax</span> <span id="L485" class="LineNr"> 485 </span> <span class="subxComment"># pseudocode:</span> <span id="L486" class="LineNr"> 486 </span> <span class="subxComment"># while true</span> <span id="L487" class="LineNr"> 487 </span> <span class="subxComment"># eax = read-byte-buffered(in)</span> @@ -1411,7 +1411,7 @@ if ('onhashchange' in window) { <span id="L1350" class="LineNr">1350 </span> 5d/pop-to-ebp <span id="L1351" class="LineNr">1351 </span> c3/return <span id="L1352" class="LineNr">1352 </span> -<span id="L1353" class="LineNr">1353 </span><span class="subxFunction">skip-until-newline</span>: <span class="subxComment"># in : (address buffered-file)</span> +<span id="L1353" class="LineNr">1353 </span><span class="subxFunction">skip-until-newline</span>: <span class="subxComment"># in : (addr buffered-file)</span> <span id="L1354" class="LineNr">1354 </span> <span class="subxComment"># pseudocode:</span> <span id="L1355" class="LineNr">1355 </span> <span class="subxComment"># push eax</span> <span id="L1356" class="LineNr">1356 </span> <span class="subxComment"># while true</span> 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) { <span id="L246" class="LineNr"> 246 </span> <span id="L247" class="LineNr"> 247 </span>== data <span id="L248" class="LineNr"> 248 </span> -<span id="L249" class="LineNr"> 249 </span><span class="SpecialChar">Program</span>: <span class="subxComment"># (address (handle function))</span> +<span id="L249" class="LineNr"> 249 </span><span class="SpecialChar">Program</span>: <span class="subxComment"># (addr (handle function))</span> <span id="L250" class="LineNr"> 250 </span> 0/imm32 <span id="L251" class="LineNr"> 251 </span> <span id="L252" class="LineNr"> 252 </span><span class="SpecialChar">Function-name</span>: @@ -440,7 +440,7 @@ if ('onhashchange' in window) { <span id="L378" class="LineNr"> 378 </span> b8/copy-to-eax 1/imm32/exit <span id="L379" class="LineNr"> 379 </span> cd/syscall 0x80/imm8 <span id="L380" class="LineNr"> 380 </span> -<span id="L381" class="LineNr"> 381 </span><span class="subxFunction">convert-mu</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L381" class="LineNr"> 381 </span><span class="subxFunction">convert-mu</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L382" class="LineNr"> 382 </span> <span class="subxS1Comment"># . prologue</span> <span id="L383" class="LineNr"> 383 </span> 55/push-ebp <span id="L384" class="LineNr"> 384 </span> 89/<- %ebp 4/r32/esp @@ -969,9 +969,9 @@ if ('onhashchange' in window) { <span id="L952" class="LineNr"> 952 </span><span class="subxComment"># Parsing</span> <span id="L953" class="LineNr"> 953 </span><span class="subxComment">#######################################################</span> <span id="L954" class="LineNr"> 954 </span> -<span id="L955" class="LineNr"> 955 </span><span class="subxFunction">parse-mu</span>: <span class="subxComment"># in : (address buffered-file)</span> +<span id="L955" class="LineNr"> 955 </span><span class="subxFunction">parse-mu</span>: <span class="subxComment"># in : (addr buffered-file)</span> <span id="L956" class="LineNr"> 956 </span> <span class="subxComment"># pseudocode</span> -<span id="L957" class="LineNr"> 957 </span> <span class="subxComment"># var curr-function : (address (handle function)) = Program</span> +<span id="L957" class="LineNr"> 957 </span> <span class="subxComment"># var curr-function : (addr (handle function)) = Program</span> <span id="L958" class="LineNr"> 958 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L959" class="LineNr"> 959 </span> <span class="subxComment"># var word-slice : (ref slice)</span> <span id="L960" class="LineNr"> 960 </span> <span class="subxComment"># while true # line loop</span> @@ -985,7 +985,7 @@ if ('onhashchange' in window) { <span id="L968" class="LineNr"> 968 </span> <span class="subxComment"># continue # end of line</span> <span id="L969" class="LineNr"> 969 </span> <span class="subxComment"># else if slice-equal(word-slice, "fn")</span> <span id="L970" class="LineNr"> 970 </span> <span class="subxComment"># var new-function : (handle function) = allocate(function)</span> -<span id="L971" class="LineNr"> 971 </span> <span class="subxComment"># var vars : (ref stack (address var) 256)</span> +<span id="L971" class="LineNr"> 971 </span> <span class="subxComment"># var vars : (ref stack (addr var) 256)</span> <span id="L972" class="LineNr"> 972 </span> <span class="subxComment"># populate-mu-function-header(in, new-function, vars)</span> <span id="L973" class="LineNr"> 973 </span> <span class="subxComment"># populate-mu-function-body(in, new-function, vars)</span> <span id="L974" class="LineNr"> 974 </span> <span class="subxComment"># assert(vars->top == 0)</span> @@ -1013,9 +1013,9 @@ if ('onhashchange' in window) { <span id="L996" class="LineNr"> 996 </span> 68/push 0/imm32/end <span id="L997" class="LineNr"> 997 </span> 68/push 0/imm32/start <span id="L998" class="LineNr"> 998 </span> 89/<- %edx 4/r32/esp -<span id="L999" class="LineNr"> 999 </span> <span class="subxComment"># var curr-function/edi : (address (handle function)) = Program</span> +<span id="L999" class="LineNr"> 999 </span> <span class="subxComment"># var curr-function/edi : (addr (handle function)) = Program</span> <span id="L1000" class="LineNr">1000 </span> bf/copy-to-edi <span class="SpecialChar"><a href='mu.subx.html#L249'>Program</a></span>/imm32 -<span id="L1001" class="LineNr">1001 </span> <span class="subxComment"># var vars/ebx : (ref stack (address var) 256)</span> +<span id="L1001" class="LineNr">1001 </span> <span class="subxComment"># var vars/ebx : (ref stack (addr var) 256)</span> <span id="L1002" class="LineNr">1002 </span> 81 5/subop/subtract %esp 0x400/imm32 <span id="L1003" class="LineNr">1003 </span> 68/push 0x400/imm32/length <span id="L1004" class="LineNr">1004 </span> 68/push 0/imm32/top @@ -1112,7 +1112,7 @@ if ('onhashchange' in window) { <span id="L1100" class="LineNr">1100 </span><span class="subxComment"># ✓ fn foo x : int {</span> <span id="L1101" class="LineNr">1101 </span><span class="subxComment"># ✓ fn foo x: int {</span> <span id="L1102" class="LineNr">1102 </span><span class="subxComment"># ✓ fn foo x: int -> y/eax: int {</span> -<span id="L1103" class="LineNr">1103 </span><span class="subxFunction">populate-mu-function-header</span>: <span class="subxComment"># first-line : (address stream byte), out : (handle function), vars : (address stack (handle var))</span> +<span id="L1103" class="LineNr">1103 </span><span class="subxFunction">populate-mu-function-header</span>: <span class="subxComment"># first-line : (addr stream byte), out : (handle function), vars : (addr stack (handle var))</span> <span id="L1104" class="LineNr">1104 </span> <span class="subxComment"># pseudocode:</span> <span id="L1105" class="LineNr">1105 </span> <span class="subxComment"># var name : (ref slice)</span> <span id="L1106" class="LineNr">1106 </span> <span class="subxComment"># next-word(first-line, name)</span> @@ -1309,7 +1309,7 @@ if ('onhashchange' in window) { <span id="L1297" class="LineNr">1297 </span> 2b/subtract-> *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span> 4/r32/esp <span id="L1298" class="LineNr">1298 </span> 89/<- %ecx 4/r32/esp <span id="L1299" class="LineNr">1299 </span> (<a href='../080zero-out.subx.html#L8'>zero-out</a> %ecx *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span>) -<span id="L1300" class="LineNr">1300 </span> <span class="subxComment"># var vars/ebx : (ref stack (address var) 16)</span> +<span id="L1300" class="LineNr">1300 </span> <span class="subxComment"># var vars/ebx : (ref stack (addr var) 16)</span> <span id="L1301" class="LineNr">1301 </span> 81 5/subop/subtract %esp 0x10/imm32 <span id="L1302" class="LineNr">1302 </span> 68/push 0x10/imm32/length <span id="L1303" class="LineNr">1303 </span> 68/push 0/imm32/top @@ -1341,7 +1341,7 @@ if ('onhashchange' in window) { <span id="L1329" class="LineNr">1329 </span> 2b/subtract-> *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span> 4/r32/esp <span id="L1330" class="LineNr">1330 </span> 89/<- %ecx 4/r32/esp <span id="L1331" class="LineNr">1331 </span> (<a href='../080zero-out.subx.html#L8'>zero-out</a> %ecx *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span>) -<span id="L1332" class="LineNr">1332 </span> <span class="subxComment"># var vars/ebx : (ref stack (address var) 16)</span> +<span id="L1332" class="LineNr">1332 </span> <span class="subxComment"># var vars/ebx : (ref stack (addr var) 16)</span> <span id="L1333" class="LineNr">1333 </span> 81 5/subop/subtract %esp 0x10/imm32 <span id="L1334" class="LineNr">1334 </span> 68/push 0x10/imm32/length <span id="L1335" class="LineNr">1335 </span> 68/push 0/imm32/top @@ -1388,7 +1388,7 @@ if ('onhashchange' in window) { <span id="L1376" class="LineNr">1376 </span> 2b/subtract-> *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span> 4/r32/esp <span id="L1377" class="LineNr">1377 </span> 89/<- %ecx 4/r32/esp <span id="L1378" class="LineNr">1378 </span> (<a href='../080zero-out.subx.html#L8'>zero-out</a> %ecx *<span class="SpecialChar"><a href='mu.subx.html#L264'>Function-size</a></span>) -<span id="L1379" class="LineNr">1379 </span> <span class="subxComment"># var vars/ebx : (ref stack (address var) 16)</span> +<span id="L1379" class="LineNr">1379 </span> <span class="subxComment"># var vars/ebx : (ref stack (addr var) 16)</span> <span id="L1380" class="LineNr">1380 </span> 81 5/subop/subtract %esp 0x10/imm32 <span id="L1381" class="LineNr">1381 </span> 68/push 0x10/imm32/length <span id="L1382" class="LineNr">1382 </span> 68/push 0/imm32/top @@ -1439,12 +1439,12 @@ if ('onhashchange' in window) { <span id="L1427" class="LineNr">1427 </span><span class="subxComment"># x: int</span> <span id="L1428" class="LineNr">1428 </span><span class="subxComment"># x: int,</span> <span id="L1429" class="LineNr">1429 </span><span class="subxComment"># ignores at most one trailing colon or comma</span> -<span id="L1430" class="LineNr">1430 </span><span class="subxFunction">parse-var-with-type</span>: <span class="subxComment"># name: (address slice), first-line: (address stream byte) -> result/eax: (handle var)</span> +<span id="L1430" class="LineNr">1430 </span><span class="subxFunction">parse-var-with-type</span>: <span class="subxComment"># name: (addr slice), first-line: (addr stream byte) -> result/eax: (handle var)</span> <span id="L1431" class="LineNr">1431 </span> <span class="subxComment"># pseudocode:</span> <span id="L1432" class="LineNr">1432 </span> <span class="subxComment"># var v : (handle var) = allocate(Heap, Var-size)</span> <span id="L1433" class="LineNr">1433 </span> <span class="subxComment"># var s : (ref slice)</span> <span id="L1434" class="LineNr">1434 </span> <span class="subxComment"># next-token-from-slice(name->start, name->end, '/', s)</span> -<span id="L1435" class="LineNr">1435 </span> <span class="subxComment"># var end : (address byte) = s->end</span> +<span id="L1435" class="LineNr">1435 </span> <span class="subxComment"># var end : (addr byte) = s->end</span> <span id="L1436" class="LineNr">1436 </span> <span class="subxComment"># if (slice-ends-with(s, ":"))</span> <span id="L1437" class="LineNr">1437 </span> <span class="subxComment"># decrement s->end</span> <span id="L1438" class="LineNr">1438 </span> <span class="subxComment"># if (slice-ends-with(s, ","))</span> @@ -1615,7 +1615,7 @@ if ('onhashchange' in window) { <span id="L1603" class="LineNr">1603 </span> cd/syscall 0x80/imm8 <span id="L1604" class="LineNr">1604 </span> <span class="subxComment"># never gets here</span> <span id="L1605" class="LineNr">1605 </span> -<span id="L1606" class="LineNr">1606 </span><span class="subxFunction">next-mu-token</span>: <span class="subxComment"># in: (address stream byte), out: (address slice)</span> +<span id="L1606" class="LineNr">1606 </span><span class="subxFunction">next-mu-token</span>: <span class="subxComment"># in: (addr stream byte), out: (addr slice)</span> <span id="L1607" class="LineNr">1607 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1608" class="LineNr">1608 </span> 55/push-ebp <span id="L1609" class="LineNr">1609 </span> 89/<- %ebp 4/r32/esp @@ -1656,7 +1656,7 @@ if ('onhashchange' in window) { <span id="L1644" class="LineNr">1644 </span> 5d/pop-to-ebp <span id="L1645" class="LineNr">1645 </span> c3/return <span id="L1646" class="LineNr">1646 </span> -<span id="L1647" class="LineNr">1647 </span><span class="subxFunction">type-for</span>: <span class="subxComment"># name: (address slice) -> result/eax: (handle s-expression type-id)</span> +<span id="L1647" class="LineNr">1647 </span><span class="subxFunction">type-for</span>: <span class="subxComment"># name: (addr slice) -> result/eax: (handle s-expression type-id)</span> <span id="L1648" class="LineNr">1648 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1649" class="LineNr">1649 </span> 55/push-ebp <span id="L1650" class="LineNr">1650 </span> 89/<- %ebp 4/r32/esp @@ -1790,7 +1790,7 @@ if ('onhashchange' in window) { <span id="L1778" class="LineNr">1778 </span><span class="subxComment"># identifier starts with a letter or '$' or '_'</span> <span id="L1779" class="LineNr">1779 </span><span class="subxComment"># no constraints at the moment on later letters</span> <span id="L1780" class="LineNr">1780 </span><span class="subxComment"># all we really want to do so far is exclude '{', '}' and '->'</span> -<span id="L1781" class="LineNr">1781 </span><span class="subxFunction">is-identifier?</span>: <span class="subxComment"># in : (address slice) -> result/eax : boolean</span> +<span id="L1781" class="LineNr">1781 </span><span class="subxFunction">is-identifier?</span>: <span class="subxComment"># in : (addr slice) -> result/eax : boolean</span> <span id="L1782" class="LineNr">1782 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1783" class="LineNr">1783 </span> 55/push-ebp <span id="L1784" class="LineNr">1784 </span> 89/<- %ebp 4/r32/esp @@ -2086,7 +2086,7 @@ if ('onhashchange' in window) { <span id="L2074" class="LineNr">2074 </span> 5d/pop-to-ebp <span id="L2075" class="LineNr">2075 </span> c3/return <span id="L2076" class="LineNr">2076 </span> -<span id="L2077" class="LineNr">2077 </span><span class="subxFunction">populate-mu-function-body</span>: <span class="subxComment"># in : (address buffered-file), out : (handle function), vars : (address stack (handle var))</span> +<span id="L2077" class="LineNr">2077 </span><span class="subxFunction">populate-mu-function-body</span>: <span class="subxComment"># in : (addr buffered-file), out : (handle function), vars : (addr stack (handle var))</span> <span id="L2078" class="LineNr">2078 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2079" class="LineNr">2079 </span> 55/push-ebp <span id="L2080" class="LineNr">2080 </span> 89/<- %ebp 4/r32/esp @@ -2113,7 +2113,7 @@ if ('onhashchange' in window) { <span id="L2101" class="LineNr">2101 </span> c3/return <span id="L2102" class="LineNr">2102 </span> <span id="L2103" class="LineNr">2103 </span><span class="subxComment"># parses a block, assuming that the leading '{' has already been read by the caller</span> -<span id="L2104" class="LineNr">2104 </span><span class="subxFunction">parse-mu-block</span>: <span class="subxComment"># in : (address buffered-file), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle block)</span> +<span id="L2104" class="LineNr">2104 </span><span class="subxFunction">parse-mu-block</span>: <span class="subxComment"># in : (addr buffered-file), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle block)</span> <span id="L2105" class="LineNr">2105 </span> <span class="subxComment"># pseudocode:</span> <span id="L2106" class="LineNr">2106 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L2107" class="LineNr">2107 </span> <span class="subxComment"># var word-slice : (ref slice)</span> @@ -2274,7 +2274,7 @@ if ('onhashchange' in window) { <span id="L2262" class="LineNr">2262 </span> cd/syscall 0x80/imm8 <span id="L2263" class="LineNr">2263 </span> <span class="subxComment"># never gets here</span> <span id="L2264" class="LineNr">2264 </span> -<span id="L2265" class="LineNr">2265 </span><span class="subxFunction">check-no-tokens-left</span>: <span class="subxComment"># line : (address stream byte)</span> +<span id="L2265" class="LineNr">2265 </span><span class="subxFunction">check-no-tokens-left</span>: <span class="subxComment"># line : (addr stream byte)</span> <span id="L2266" class="LineNr">2266 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2267" class="LineNr">2267 </span> 55/push-ebp <span id="L2268" class="LineNr">2268 </span> 89/<- %ebp 4/r32/esp @@ -2321,7 +2321,7 @@ if ('onhashchange' in window) { <span id="L2309" class="LineNr">2309 </span> 5d/pop-to-ebp <span id="L2310" class="LineNr">2310 </span> c3/return <span id="L2311" class="LineNr">2311 </span> -<span id="L2312" class="LineNr">2312 </span><span class="subxFunction">parse-mu-named-block</span>: <span class="subxComment"># name : (address slice), first-line : (address stream byte), in : (address buffered-file), vars : (address stack (handle var)) -> result/eax : (handle stmt)</span> +<span id="L2312" class="LineNr">2312 </span><span class="subxFunction">parse-mu-named-block</span>: <span class="subxComment"># name : (addr slice), first-line : (addr stream byte), in : (addr buffered-file), vars : (addr stack (handle var)) -> result/eax : (handle stmt)</span> <span id="L2313" class="LineNr">2313 </span> <span class="subxComment"># pseudocode:</span> <span id="L2314" class="LineNr">2314 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L2315" class="LineNr">2315 </span> <span class="subxComment"># var word-slice : (ref slice)</span> @@ -2365,7 +2365,7 @@ if ('onhashchange' in window) { <span id="L2353" class="LineNr">2353 </span> 5d/pop-to-ebp <span id="L2354" class="LineNr">2354 </span> c3/return <span id="L2355" class="LineNr">2355 </span> -<span id="L2356" class="LineNr">2356 </span><span class="subxFunction">parse-mu-var-def</span>: <span class="subxComment"># line : (address stream byte), vars : (address stack (handle var)) -> result/eax : (handle stmt)</span> +<span id="L2356" class="LineNr">2356 </span><span class="subxFunction">parse-mu-var-def</span>: <span class="subxComment"># line : (addr stream byte), vars : (addr stack (handle var)) -> result/eax : (handle stmt)</span> <span id="L2357" class="LineNr">2357 </span> <span class="subxComment"># pseudocode:</span> <span id="L2358" class="LineNr">2358 </span> <span class="subxComment">#</span> <span id="L2359" class="LineNr">2359 </span> <span class="subxS1Comment"># . prologue</span> @@ -2380,7 +2380,7 @@ if ('onhashchange' in window) { <span id="L2368" class="LineNr">2368 </span> 5d/pop-to-ebp <span id="L2369" class="LineNr">2369 </span> c3/return <span id="L2370" class="LineNr">2370 </span> -<span id="L2371" class="LineNr">2371 </span><span class="subxFunction">parse-mu-stmt</span>: <span class="subxComment"># line : (address stream byte), vars : (address stack (handle var)), fn : (handle function) -> result/eax : (handle stmt)</span> +<span id="L2371" class="LineNr">2371 </span><span class="subxFunction">parse-mu-stmt</span>: <span class="subxComment"># line : (addr stream byte), vars : (addr stack (handle var)), fn : (handle function) -> result/eax : (handle stmt)</span> <span id="L2372" class="LineNr">2372 </span> <span class="subxComment"># pseudocode:</span> <span id="L2373" class="LineNr">2373 </span> <span class="subxComment"># var name : (ref slice)</span> <span id="L2374" class="LineNr">2374 </span> <span class="subxComment"># result = allocate(Heap, Stmt-size)</span> @@ -2500,7 +2500,7 @@ if ('onhashchange' in window) { <span id="L2488" class="LineNr">2488 </span> cd/syscall 0x80/imm8 <span id="L2489" class="LineNr">2489 </span> <span class="subxComment"># never gets here</span> <span id="L2490" class="LineNr">2490 </span> -<span id="L2491" class="LineNr">2491 </span><span class="subxFunction">stmt-has-outputs?</span>: <span class="subxComment"># line : (address stream byte) -> result/eax : boolean</span> +<span id="L2491" class="LineNr">2491 </span><span class="subxFunction">stmt-has-outputs?</span>: <span class="subxComment"># line : (addr stream byte) -> result/eax : boolean</span> <span id="L2492" class="LineNr">2492 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2493" class="LineNr">2493 </span> 55/push-ebp <span id="L2494" class="LineNr">2494 </span> 89/<- %ebp 4/r32/esp @@ -2548,7 +2548,7 @@ if ('onhashchange' in window) { <span id="L2536" class="LineNr">2536 </span> <span id="L2537" class="LineNr">2537 </span><span class="subxComment"># if 'name' starts with a digit, create a new literal var for it</span> <span id="L2538" class="LineNr">2538 </span><span class="subxComment"># otherwise return first 'name' from the top (back) of 'vars' and abort if not found</span> -<span id="L2539" class="LineNr">2539 </span><span class="subxFunction">lookup-var-or-literal</span>: <span class="subxComment"># name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var)</span> +<span id="L2539" class="LineNr">2539 </span><span class="subxFunction">lookup-var-or-literal</span>: <span class="subxComment"># name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var)</span> <span id="L2540" class="LineNr">2540 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2541" class="LineNr">2541 </span> 55/push-ebp <span id="L2542" class="LineNr">2542 </span> 89/<- %ebp 4/r32/esp @@ -2596,7 +2596,7 @@ if ('onhashchange' in window) { <span id="L2584" class="LineNr">2584 </span> <span class="subxComment"># never gets here</span> <span id="L2585" class="LineNr">2585 </span> <span id="L2586" class="LineNr">2586 </span><span class="subxComment"># return first 'name' from the top (back) of 'vars' and abort if not found</span> -<span id="L2587" class="LineNr">2587 </span><span class="subxFunction">lookup-var</span>: <span class="subxComment"># name: (address slice), vars : (address stack (handle var)) -> result/eax: (handle var)</span> +<span id="L2587" class="LineNr">2587 </span><span class="subxFunction">lookup-var</span>: <span class="subxComment"># name: (addr slice), vars : (addr stack (handle var)) -> result/eax: (handle var)</span> <span id="L2588" class="LineNr">2588 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2589" class="LineNr">2589 </span> 55/push-ebp <span id="L2590" class="LineNr">2590 </span> 89/<- %ebp 4/r32/esp @@ -2625,9 +2625,9 @@ if ('onhashchange' in window) { <span id="L2613" class="LineNr">2613 </span> <span class="subxComment"># never gets here</span> <span id="L2614" class="LineNr">2614 </span> <span id="L2615" class="LineNr">2615 </span><span class="subxComment"># return first 'name' from the top (back) of 'vars', and 0/null if not found</span> -<span id="L2616" class="LineNr">2616 </span><span class="subxFunction">lookup-var-helper</span>: <span class="subxComment"># name: (address array byte), vars : (address stack (handle var)) -> result/eax: (handle var)</span> +<span id="L2616" class="LineNr">2616 </span><span class="subxFunction">lookup-var-helper</span>: <span class="subxComment"># name: (addr array byte), vars : (addr stack (handle var)) -> result/eax: (handle var)</span> <span id="L2617" class="LineNr">2617 </span> <span class="subxComment"># pseudocode:</span> -<span id="L2618" class="LineNr">2618 </span> <span class="subxComment"># var curr : (address handle var) = &vars->data[vars->top - 4]</span> +<span id="L2618" class="LineNr">2618 </span> <span class="subxComment"># var curr : (addr handle var) = &vars->data[vars->top - 4]</span> <span id="L2619" class="LineNr">2619 </span> <span class="subxComment"># var min = vars->data</span> <span id="L2620" class="LineNr">2620 </span> <span class="subxComment"># while curr >= min</span> <span id="L2621" class="LineNr">2621 </span> <span class="subxComment"># var v : (handle var) = *curr</span> @@ -2649,9 +2649,9 @@ if ('onhashchange' in window) { <span id="L2637" class="LineNr">2637 </span> <span class="subxComment"># if (vars->top > vars->length) abort</span> <span id="L2638" class="LineNr">2638 </span> 3b/compare 0/r32/eax *(esi+4) <span id="L2639" class="LineNr">2639 </span> 0f 8f/jump-if-greater $lookup-var-helper:error1/disp32 -<span id="L2640" class="LineNr">2640 </span> <span class="subxComment"># var min/edx : (address handle var) = vars->data</span> +<span id="L2640" class="LineNr">2640 </span> <span class="subxComment"># var min/edx : (addr handle var) = vars->data</span> <span id="L2641" class="LineNr">2641 </span> 8d/copy-address *(esi+8) 2/r32/edx -<span id="L2642" class="LineNr">2642 </span> <span class="subxComment"># var curr/ebx : (address handle var) = &vars->data[vars->top - 4]</span> +<span id="L2642" class="LineNr">2642 </span> <span class="subxComment"># var curr/ebx : (addr handle var) = &vars->data[vars->top - 4]</span> <span id="L2643" class="LineNr">2643 </span> 81 5/subop/subtract %ebx 4/imm32 <span id="L2644" class="LineNr">2644 </span> 8d/copy-address *(esi+ebx+8) 3/r32/ebx <span id="L2645" class="LineNr">2645 </span> { @@ -2692,7 +2692,7 @@ if ('onhashchange' in window) { <span id="L2680" class="LineNr">2680 </span> <span class="subxComment"># never gets here</span> <span id="L2681" class="LineNr">2681 </span> <span id="L2682" class="LineNr">2682 </span><span class="subxComment"># return first 'name' from the top (back) of 'vars' and create a new var for a fn output if not found</span> -<span id="L2683" class="LineNr">2683 </span><span class="subxFunction">lookup-or-define-var</span>: <span class="subxComment"># name: (address slice), vars : (address stack (handle var)), fn : (handle function) -> result/eax: (handle var)</span> +<span id="L2683" class="LineNr">2683 </span><span class="subxFunction">lookup-or-define-var</span>: <span class="subxComment"># name: (addr slice), vars : (addr stack (handle var)), fn : (handle function) -> result/eax: (handle var)</span> <span id="L2684" class="LineNr">2684 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2685" class="LineNr">2685 </span> 55/push-ebp <span id="L2686" class="LineNr">2686 </span> 89/<- %ebp 4/r32/esp @@ -2765,7 +2765,7 @@ if ('onhashchange' in window) { <span id="L2753" class="LineNr">2753 </span> <span class="subxComment"># setup</span> <span id="L2754" class="LineNr">2754 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../061read-byte.subx.html#L287'>_test-input-stream</a>) <span id="L2755" class="LineNr">2755 </span> (<a href='../057write.subx.html#L24'>write</a> <a href='../061read-byte.subx.html#L287'>_test-input-stream</a> <span class="Constant">"increment n\n"</span>) -<span id="L2756" class="LineNr">2756 </span> <span class="subxComment"># var vars/ecx : (ref stack (address var) 4)</span> +<span id="L2756" class="LineNr">2756 </span> <span class="subxComment"># var vars/ecx : (ref stack (addr var) 4)</span> <span id="L2757" class="LineNr">2757 </span> 81 5/subop/subtract %esp 0x10/imm32 <span id="L2758" class="LineNr">2758 </span> 68/push 0x10/imm32/length <span id="L2759" class="LineNr">2759 </span> 68/push 0/imm32/top @@ -2793,7 +2793,7 @@ if ('onhashchange' in window) { <span id="L2781" class="LineNr">2781 </span> 5d/pop-to-ebp <span id="L2782" class="LineNr">2782 </span> c3/return <span id="L2783" class="LineNr">2783 </span> -<span id="L2784" class="LineNr">2784 </span><span class="subxFunction">new-function</span>: <span class="subxComment"># 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)</span> +<span id="L2784" class="LineNr">2784 </span><span class="subxFunction">new-function</span>: <span class="subxComment"># 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)</span> <span id="L2785" class="LineNr">2785 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2786" class="LineNr">2786 </span> 55/push-ebp <span id="L2787" class="LineNr">2787 </span> 89/<- %ebp 4/r32/esp @@ -2821,7 +2821,7 @@ if ('onhashchange' in window) { <span id="L2809" class="LineNr">2809 </span> 5d/pop-to-ebp <span id="L2810" class="LineNr">2810 </span> c3/return <span id="L2811" class="LineNr">2811 </span> -<span id="L2812" class="LineNr">2812 </span><span class="subxFunction">new-var</span>: <span class="subxComment"># ad: (address allocation-descriptor), name: (address array byte), type: int, block: int, stack-offset: int, register: (address array byte) -> result/eax: (handle var)</span> +<span id="L2812" class="LineNr">2812 </span><span class="subxFunction">new-var</span>: <span class="subxComment"># ad: (addr allocation-descriptor), name: (addr array byte), type: int, block: int, stack-offset: int, register: (addr array byte) -> result/eax: (handle var)</span> <span id="L2813" class="LineNr">2813 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2814" class="LineNr">2814 </span> 55/push-ebp <span id="L2815" class="LineNr">2815 </span> 89/<- %ebp 4/r32/esp @@ -2847,7 +2847,7 @@ if ('onhashchange' in window) { <span id="L2835" class="LineNr">2835 </span> 5d/pop-to-ebp <span id="L2836" class="LineNr">2836 </span> c3/return <span id="L2837" class="LineNr">2837 </span> -<span id="L2838" class="LineNr">2838 </span><span class="subxFunction">new-literal-integer</span>: <span class="subxComment"># ad: (address allocation-descriptor), name: (address slice) -> result/eax: (handle var)</span> +<span id="L2838" class="LineNr">2838 </span><span class="subxFunction">new-literal-integer</span>: <span class="subxComment"># ad: (addr allocation-descriptor), name: (addr slice) -> result/eax: (handle var)</span> <span id="L2839" class="LineNr">2839 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2840" class="LineNr">2840 </span> 55/push-ebp <span id="L2841" class="LineNr">2841 </span> 89/<- %ebp 4/r32/esp @@ -2857,7 +2857,7 @@ if ('onhashchange' in window) { <span id="L2845" class="LineNr">2845 </span> (<a href='../067parse-hex.subx.html#L9'>is-hex-int?</a> *(ebp+0xc)) <span class="subxComment"># => eax</span> <span id="L2846" class="LineNr">2846 </span> 3d/compare-eax-and 0/imm32 <span id="L2847" class="LineNr">2847 </span> 0f 84/jump-if-equal $new-literal-integer:abort/disp32 -<span id="L2848" class="LineNr">2848 </span> <span class="subxComment"># var s/ecx : (address array byte)</span> +<span id="L2848" class="LineNr">2848 </span> <span class="subxComment"># var s/ecx : (addr array byte)</span> <span id="L2849" class="LineNr">2849 </span> (<a href='../072slice.subx.html#L1015'>slice-to-string</a> <span class="SpecialChar"><a href='../069allocate.subx.html#L22'>Heap</a></span> *(ebp+0xc)) <span class="subxComment"># => eax</span> <span id="L2850" class="LineNr">2850 </span> 89/<- %ecx 0/r32/eax <span id="L2851" class="LineNr">2851 </span> <span class="subxComment">#</span> @@ -2886,7 +2886,7 @@ if ('onhashchange' in window) { <span id="L2874" class="LineNr">2874 </span> cd/syscall 0x80/imm8 <span id="L2875" class="LineNr">2875 </span> <span class="subxComment"># never gets here</span> <span id="L2876" class="LineNr">2876 </span> -<span id="L2877" class="LineNr">2877 </span><span class="subxFunction">new-block</span>: <span class="subxComment"># ad: (address allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement)</span> +<span id="L2877" class="LineNr">2877 </span><span class="subxFunction">new-block</span>: <span class="subxComment"># ad: (addr allocation-descriptor), data: (handle list statement) -> result/eax: (handle statement)</span> <span id="L2878" class="LineNr">2878 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2879" class="LineNr">2879 </span> 55/push-ebp <span id="L2880" class="LineNr">2880 </span> 89/<- %ebp 4/r32/esp @@ -2906,7 +2906,7 @@ if ('onhashchange' in window) { <span id="L2894" class="LineNr">2894 </span> 5d/pop-to-ebp <span id="L2895" class="LineNr">2895 </span> c3/return <span id="L2896" class="LineNr">2896 </span> -<span id="L2897" class="LineNr">2897 </span><span class="subxFunction">new-stmt</span>: <span class="subxComment"># ad: (address allocation-descriptor), operation: (address array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement)</span> +<span id="L2897" class="LineNr">2897 </span><span class="subxFunction">new-stmt</span>: <span class="subxComment"># ad: (addr allocation-descriptor), operation: (addr array byte), inouts: (handle list var), outputs: (handle list var) -> result/eax: (handle statement)</span> <span id="L2898" class="LineNr">2898 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2899" class="LineNr">2899 </span> 55/push-ebp <span id="L2900" class="LineNr">2900 </span> 89/<- %ebp 4/r32/esp @@ -2930,7 +2930,7 @@ if ('onhashchange' in window) { <span id="L2918" class="LineNr">2918 </span> 5d/pop-to-ebp <span id="L2919" class="LineNr">2919 </span> c3/return <span id="L2920" class="LineNr">2920 </span> -<span id="L2921" class="LineNr">2921 </span><span class="subxFunction">new-vardef</span>: <span class="subxComment"># ad: (address allocation-descriptor), name: (address array byte), type: int -> result/eax: (handle statement)</span> +<span id="L2921" class="LineNr">2921 </span><span class="subxFunction">new-vardef</span>: <span class="subxComment"># ad: (addr allocation-descriptor), name: (addr array byte), type: int -> result/eax: (handle statement)</span> <span id="L2922" class="LineNr">2922 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2923" class="LineNr">2923 </span> 55/push-ebp <span id="L2924" class="LineNr">2924 </span> 89/<- %ebp 4/r32/esp @@ -2952,7 +2952,7 @@ if ('onhashchange' in window) { <span id="L2940" class="LineNr">2940 </span> 5d/pop-to-ebp <span id="L2941" class="LineNr">2941 </span> c3/return <span id="L2942" class="LineNr">2942 </span> -<span id="L2943" class="LineNr">2943 </span><span class="subxFunction">new-regvardef</span>: <span class="subxComment"># ad: (address allocation-descriptor), name: (address array byte), type: int, register: (address array byte) -> result/eax: (handle statement)</span> +<span id="L2943" class="LineNr">2943 </span><span class="subxFunction">new-regvardef</span>: <span class="subxComment"># ad: (addr allocation-descriptor), name: (addr array byte), type: int, register: (addr array byte) -> result/eax: (handle statement)</span> <span id="L2944" class="LineNr">2944 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2945" class="LineNr">2945 </span> 55/push-ebp <span id="L2946" class="LineNr">2946 </span> 89/<- %ebp 4/r32/esp @@ -2976,7 +2976,7 @@ if ('onhashchange' in window) { <span id="L2964" class="LineNr">2964 </span> 5d/pop-to-ebp <span id="L2965" class="LineNr">2965 </span> c3/return <span id="L2966" class="LineNr">2966 </span> -<span id="L2967" class="LineNr">2967 </span><span class="subxFunction">new-named-block</span>: <span class="subxComment"># ad: (address allocation-descriptor), name: (address array byte), data: (handle list statement) -> result/eax: (handle statement)</span> +<span id="L2967" class="LineNr">2967 </span><span class="subxFunction">new-named-block</span>: <span class="subxComment"># ad: (addr allocation-descriptor), name: (addr array byte), data: (handle list statement) -> result/eax: (handle statement)</span> <span id="L2968" class="LineNr">2968 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2969" class="LineNr">2969 </span> 55/push-ebp <span id="L2970" class="LineNr">2970 </span> 89/<- %ebp 4/r32/esp @@ -2998,7 +2998,7 @@ if ('onhashchange' in window) { <span id="L2986" class="LineNr">2986 </span> 5d/pop-to-ebp <span id="L2987" class="LineNr">2987 </span> c3/return <span id="L2988" class="LineNr">2988 </span> -<span id="L2989" class="LineNr">2989 </span><span class="subxFunction">new-list</span>: <span class="subxComment"># ad: (address allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type)</span> +<span id="L2989" class="LineNr">2989 </span><span class="subxFunction">new-list</span>: <span class="subxComment"># ad: (addr allocation-descriptor), value: _type, next: (handle list _type) -> result/eax : (handle list _type)</span> <span id="L2990" class="LineNr">2990 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2991" class="LineNr">2991 </span> 55/push-ebp <span id="L2992" class="LineNr">2992 </span> 89/<- %ebp 4/r32/esp @@ -3018,7 +3018,7 @@ if ('onhashchange' in window) { <span id="L3006" class="LineNr">3006 </span> 5d/pop-to-ebp <span id="L3007" class="LineNr">3007 </span> c3/return <span id="L3008" class="LineNr">3008 </span> -<span id="L3009" class="LineNr">3009 </span><span class="subxFunction">append-list</span>: <span class="subxComment"># ad: (address allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type)</span> +<span id="L3009" class="LineNr">3009 </span><span class="subxFunction">append-list</span>: <span class="subxComment"># ad: (addr allocation-descriptor), value: _type, list: (handle list _type) -> result/eax : (handle list _type)</span> <span id="L3010" class="LineNr">3010 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3011" class="LineNr">3011 </span> 55/push-ebp <span id="L3012" class="LineNr">3012 </span> 89/<- %ebp 4/r32/esp @@ -3054,7 +3054,7 @@ if ('onhashchange' in window) { <span id="L3042" class="LineNr">3042 </span> 5d/pop-to-ebp <span id="L3043" class="LineNr">3043 </span> c3/return <span id="L3044" class="LineNr">3044 </span> -<span id="L3045" class="LineNr">3045 </span><span class="subxFunction">append-to-block</span>: <span class="subxComment"># ad: (address allocation-descriptor), block: (handle block), x: (handle stmt)</span> +<span id="L3045" class="LineNr">3045 </span><span class="subxFunction">append-to-block</span>: <span class="subxComment"># ad: (addr allocation-descriptor), block: (handle block), x: (handle stmt)</span> <span id="L3046" class="LineNr">3046 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3047" class="LineNr">3047 </span> 55/push-ebp <span id="L3048" class="LineNr">3048 </span> 89/<- %ebp 4/r32/esp @@ -3087,7 +3087,7 @@ if ('onhashchange' in window) { <span id="L3075" class="LineNr">3075 </span> 5d/pop-to-ebp <span id="L3076" class="LineNr">3076 </span> c3/return <span id="L3077" class="LineNr">3077 </span> -<span id="L3078" class="LineNr">3078 </span><span class="subxFunction">size-of</span>: <span class="subxComment"># n : (address var)</span> +<span id="L3078" class="LineNr">3078 </span><span class="subxFunction">size-of</span>: <span class="subxComment"># n : (addr var)</span> <span id="L3079" class="LineNr">3079 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3080" class="LineNr">3080 </span> 55/push-ebp <span id="L3081" class="LineNr">3081 </span> 89/<- %ebp 4/r32/esp @@ -3103,7 +3103,7 @@ if ('onhashchange' in window) { <span id="L3091" class="LineNr">3091 </span><span class="subxComment"># Code-generation</span> <span id="L3092" class="LineNr">3092 </span><span class="subxComment">#######################################################</span> <span id="L3093" class="LineNr">3093 </span> -<span id="L3094" class="LineNr">3094 </span><span class="subxFunction">emit-subx</span>: <span class="subxComment"># out : (address buffered-file)</span> +<span id="L3094" class="LineNr">3094 </span><span class="subxFunction">emit-subx</span>: <span class="subxComment"># out : (addr buffered-file)</span> <span id="L3095" class="LineNr">3095 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3096" class="LineNr">3096 </span> 55/push-ebp <span id="L3097" class="LineNr">3097 </span> 89/<- %ebp 4/r32/esp @@ -3134,7 +3134,7 @@ if ('onhashchange' in window) { <span id="L3122" class="LineNr">3122 </span> 5d/pop-to-ebp <span id="L3123" class="LineNr">3123 </span> c3/return <span id="L3124" class="LineNr">3124 </span> -<span id="L3125" class="LineNr">3125 </span><span class="subxFunction">emit-subx-function</span>: <span class="subxComment"># out : (address buffered-file), f : (handle function)</span> +<span id="L3125" class="LineNr">3125 </span><span class="subxFunction">emit-subx-function</span>: <span class="subxComment"># out : (addr buffered-file), f : (handle function)</span> <span id="L3126" class="LineNr">3126 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3127" class="LineNr">3127 </span> 55/push-ebp <span id="L3128" class="LineNr">3128 </span> 89/<- %ebp 4/r32/esp @@ -3162,7 +3162,7 @@ if ('onhashchange' in window) { <span id="L3150" class="LineNr">3150 </span> 5d/pop-to-ebp <span id="L3151" class="LineNr">3151 </span> c3/return <span id="L3152" class="LineNr">3152 </span> -<span id="L3153" class="LineNr">3153 </span><span class="subxFunction">emit-subx-block</span>: <span class="subxComment"># out : (address buffered-file), block : (handle block)</span> +<span id="L3153" class="LineNr">3153 </span><span class="subxFunction">emit-subx-block</span>: <span class="subxComment"># out : (addr buffered-file), block : (handle block)</span> <span id="L3154" class="LineNr">3154 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3155" class="LineNr">3155 </span> 55/push-ebp <span id="L3156" class="LineNr">3156 </span> 89/<- %ebp 4/r32/esp @@ -3192,7 +3192,7 @@ if ('onhashchange' in window) { <span id="L3180" class="LineNr">3180 </span> 5d/pop-to-ebp <span id="L3181" class="LineNr">3181 </span> c3/return <span id="L3182" class="LineNr">3182 </span> -<span id="L3183" class="LineNr">3183 </span><span class="subxFunction">emit-subx-statement</span>: <span class="subxComment"># out : (address buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function)</span> +<span id="L3183" class="LineNr">3183 </span><span class="subxFunction">emit-subx-statement</span>: <span class="subxComment"># out : (addr buffered-file), stmt : (handle statement), primitives : (handle primitive), functions : (handle function)</span> <span id="L3184" class="LineNr">3184 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3185" class="LineNr">3185 </span> 55/push-ebp <span id="L3186" class="LineNr">3186 </span> 89/<- %ebp 4/r32/esp @@ -3987,7 +3987,7 @@ if ('onhashchange' in window) { <span id="L3975" class="LineNr">3975 </span> 0/imm32/no-register <span id="L3976" class="LineNr">3976 </span> <span id="L3977" class="LineNr">3977 </span>== code -<span id="L3978" class="LineNr">3978 </span><span class="subxFunction">emit-subx-primitive</span>: <span class="subxComment"># out : (address buffered-file), stmt : (handle statement), primitive : (handle function)</span> +<span id="L3978" class="LineNr">3978 </span><span class="subxFunction">emit-subx-primitive</span>: <span class="subxComment"># out : (addr buffered-file), stmt : (handle statement), primitive : (handle function)</span> <span id="L3979" class="LineNr">3979 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3980" class="LineNr">3980 </span> 55/push-ebp <span id="L3981" class="LineNr">3981 </span> 89/<- %ebp 4/r32/esp @@ -4013,7 +4013,7 @@ if ('onhashchange' in window) { <span id="L4001" class="LineNr">4001 </span> 5d/pop-to-ebp <span id="L4002" class="LineNr">4002 </span> c3/return <span id="L4003" class="LineNr">4003 </span> -<span id="L4004" class="LineNr">4004 </span><span class="subxFunction">emit-subx-rm32</span>: <span class="subxComment"># out : (address buffered-file), l : arg-location, stmt : (handle statement)</span> +<span id="L4004" class="LineNr">4004 </span><span class="subxFunction">emit-subx-rm32</span>: <span class="subxComment"># out : (addr buffered-file), l : arg-location, stmt : (handle statement)</span> <span id="L4005" class="LineNr">4005 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4006" class="LineNr">4006 </span> 55/push-ebp <span id="L4007" class="LineNr">4007 </span> 89/<- %ebp 4/r32/esp @@ -4093,7 +4093,7 @@ if ('onhashchange' in window) { <span id="L4081" class="LineNr">4081 </span> cd/syscall 0x80/imm8 <span id="L4082" class="LineNr">4082 </span> <span class="subxComment"># never gets here</span> <span id="L4083" class="LineNr">4083 </span> -<span id="L4084" class="LineNr">4084 </span><span class="subxFunction">emit-subx-r32</span>: <span class="subxComment"># out : (address buffered-file), l : arg-location, stmt : (handle statement)</span> +<span id="L4084" class="LineNr">4084 </span><span class="subxFunction">emit-subx-r32</span>: <span class="subxComment"># out : (addr buffered-file), l : arg-location, stmt : (handle statement)</span> <span id="L4085" class="LineNr">4085 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4086" class="LineNr">4086 </span> 55/push-ebp <span id="L4087" class="LineNr">4087 </span> 89/<- %ebp 4/r32/esp @@ -4105,7 +4105,7 @@ if ('onhashchange' in window) { <span id="L4093" class="LineNr">4093 </span> 0f 84/jump-if-equal $emit-subx-r32:end/disp32 <span id="L4094" class="LineNr">4094 </span> <span class="subxComment">#</span> <span id="L4095" class="LineNr">4095 </span> (<a href='mu.subx.html#L4024'>get-stmt-operand-from-arg-location</a> *(ebp+0x10) *(ebp+0xc)) <span class="subxComment"># stmt, l => var/eax</span> -<span id="L4096" class="LineNr">4096 </span> (<a href='../081table.subx.html#L1382'>maybe-get</a> <span class="SpecialChar"><a href='../085register-names.subx.html#L2'>Registers</a></span> *(eax+0x10) 8) <span class="subxComment"># Var-register => eax : (address register-index)</span> +<span id="L4096" class="LineNr">4096 </span> (<a href='../081table.subx.html#L1382'>maybe-get</a> <span class="SpecialChar"><a href='../085register-names.subx.html#L2'>Registers</a></span> *(eax+0x10) 8) <span class="subxComment"># Var-register => eax : (addr register-index)</span> <span id="L4097" class="LineNr">4097 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="SpecialChar"><a href='../051test.subx.html#L94'>Space</a></span>) <span id="L4098" class="LineNr">4098 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax) <span id="L4099" class="LineNr">4099 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"/r32"</span>) @@ -4118,7 +4118,7 @@ if ('onhashchange' in window) { <span id="L4106" class="LineNr">4106 </span> 5d/pop-to-ebp <span id="L4107" class="LineNr">4107 </span> c3/return <span id="L4108" class="LineNr">4108 </span> -<span id="L4109" class="LineNr">4109 </span><span class="subxFunction">emit-subx-imm32</span>: <span class="subxComment"># out : (address buffered-file), l : arg-location, stmt : (handle statement)</span> +<span id="L4109" class="LineNr">4109 </span><span class="subxFunction">emit-subx-imm32</span>: <span class="subxComment"># out : (addr buffered-file), l : arg-location, stmt : (handle statement)</span> <span id="L4110" class="LineNr">4110 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4111" class="LineNr">4111 </span> 55/push-ebp <span id="L4112" class="LineNr">4112 </span> 89/<- %ebp 4/r32/esp @@ -4142,7 +4142,7 @@ if ('onhashchange' in window) { <span id="L4130" class="LineNr">4130 </span> 5d/pop-to-ebp <span id="L4131" class="LineNr">4131 </span> c3/return <span id="L4132" class="LineNr">4132 </span> -<span id="L4133" class="LineNr">4133 </span><span class="subxFunction">emit-subx-call</span>: <span class="subxComment"># out : (address buffered-file), stmt : (handle statement), callee : (handle function)</span> +<span id="L4133" class="LineNr">4133 </span><span class="subxFunction">emit-subx-call</span>: <span class="subxComment"># out : (addr buffered-file), stmt : (handle statement), callee : (handle function)</span> <span id="L4134" class="LineNr">4134 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4135" class="LineNr">4135 </span> 55/push-ebp <span id="L4136" class="LineNr">4136 </span> 89/<- %ebp 4/r32/esp @@ -4179,7 +4179,7 @@ if ('onhashchange' in window) { <span id="L4167" class="LineNr">4167 </span> 5d/pop-to-ebp <span id="L4168" class="LineNr">4168 </span> c3/return <span id="L4169" class="LineNr">4169 </span> -<span id="L4170" class="LineNr">4170 </span><span class="subxFunction">emit-subx-call-operand</span>: <span class="subxComment"># out : (address buffered-file), operand : (handle variable)</span> +<span id="L4170" class="LineNr">4170 </span><span class="subxFunction">emit-subx-call-operand</span>: <span class="subxComment"># out : (addr buffered-file), operand : (handle variable)</span> <span id="L4171" class="LineNr">4171 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4172" class="LineNr">4172 </span> 55/push-ebp <span id="L4173" class="LineNr">4173 </span> 89/<- %ebp 4/r32/esp @@ -4205,7 +4205,7 @@ if ('onhashchange' in window) { <span id="L4193" class="LineNr">4193 </span> 5d/pop-to-ebp <span id="L4194" class="LineNr">4194 </span> c3/return <span id="L4195" class="LineNr">4195 </span> -<span id="L4196" class="LineNr">4196 </span><span class="subxFunction">emit-subx-var-as-rm32</span>: <span class="subxComment"># out : (address buffered-file), operand : (handle variable)</span> +<span id="L4196" class="LineNr">4196 </span><span class="subxFunction">emit-subx-var-as-rm32</span>: <span class="subxComment"># out : (addr buffered-file), operand : (handle variable)</span> <span id="L4197" class="LineNr">4197 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4198" class="LineNr">4198 </span> 55/push-ebp <span id="L4199" class="LineNr">4199 </span> 89/<- %ebp 4/r32/esp @@ -4240,7 +4240,7 @@ if ('onhashchange' in window) { <span id="L4228" class="LineNr">4228 </span> 5d/pop-to-ebp <span id="L4229" class="LineNr">4229 </span> c3/return <span id="L4230" class="LineNr">4230 </span> -<span id="L4231" class="LineNr">4231 </span><span class="subxFunction">find-matching-function</span>: <span class="subxComment"># functions : (address function), stmt : (handle statement) -> result/eax : (handle function)</span> +<span id="L4231" class="LineNr">4231 </span><span class="subxFunction">find-matching-function</span>: <span class="subxComment"># functions : (addr function), stmt : (handle statement) -> result/eax : (handle function)</span> <span id="L4232" class="LineNr">4232 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4233" class="LineNr">4233 </span> 55/push-ebp <span id="L4234" class="LineNr">4234 </span> 89/<- %ebp 4/r32/esp @@ -5344,7 +5344,7 @@ if ('onhashchange' in window) { <span id="L5402" class="LineNr">5402 </span> 5d/pop-to-ebp <span id="L5403" class="LineNr">5403 </span> c3/return <span id="L5404" class="LineNr">5404 </span> -<span id="L5405" class="LineNr">5405 </span><span class="subxFunction">emit-subx-prologue</span>: <span class="subxComment"># out : (address buffered-file)</span> +<span id="L5405" class="LineNr">5405 </span><span class="subxFunction">emit-subx-prologue</span>: <span class="subxComment"># out : (addr buffered-file)</span> <span id="L5406" class="LineNr">5406 </span> <span class="subxS1Comment"># . prologue</span> <span id="L5407" class="LineNr">5407 </span> 55/push-ebp <span id="L5408" class="LineNr">5408 </span> 89/<- %ebp 4/r32/esp @@ -5358,7 +5358,7 @@ if ('onhashchange' in window) { <span id="L5416" class="LineNr">5416 </span> 5d/pop-to-ebp <span id="L5417" class="LineNr">5417 </span> c3/return <span id="L5418" class="LineNr">5418 </span> -<span id="L5419" class="LineNr">5419 </span><span class="subxFunction">emit-subx-epilogue</span>: <span class="subxComment"># out : (address buffered-file)</span> +<span id="L5419" class="LineNr">5419 </span><span class="subxFunction">emit-subx-epilogue</span>: <span class="subxComment"># out : (addr buffered-file)</span> <span id="L5420" class="LineNr">5420 </span> <span class="subxS1Comment"># . prologue</span> <span id="L5421" class="LineNr">5421 </span> 55/push-ebp <span id="L5422" class="LineNr">5422 </span> 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) { <span id="L49" class="LineNr"> 49 </span><span class="subxComment"># NIL NUM CHAR STRING SYMBOL PAIR ARRAY</span> <span id="L50" class="LineNr"> 50 </span><span class="subxComment"># memory type: a type specifying memory layout at the SubX level. Starts</span> <span id="L51" class="LineNr"> 51 </span><span class="subxComment"># with a '$'.</span> -<span id="L52" class="LineNr"> 52 </span><span class="subxComment"># $int $array $(address _)</span> +<span id="L52" class="LineNr"> 52 </span><span class="subxComment"># $int $array $(addr _)</span> <span id="L53" class="LineNr"> 53 </span><span class="subxComment">#</span> <span id="L54" class="LineNr"> 54 </span><span class="subxComment"># Lisp values are represented in memory by the _cell_ data structure. A cell</span> <span id="L55" class="LineNr"> 55 </span><span class="subxComment"># is 12 bytes long:</span> @@ -121,18 +121,18 @@ if ('onhashchange' in window) { <span id="L63" class="LineNr"> 63 </span><span class="subxComment"># - char: cell{ tag: 2/CHAR, data: $int 0 }</span> <span id="L64" class="LineNr"> 64 </span><span class="subxComment"># data contains the utf-8 code of the character (no compound glyphs, no</span> <span id="L65" class="LineNr"> 65 </span><span class="subxComment"># modifiers, etc., etc.)</span> -<span id="L66" class="LineNr"> 66 </span><span class="subxComment"># - string: cell{ tag: 3/STRING, data: $(address stream byte)</span> -<span id="L67" class="LineNr"> 67 </span><span class="subxComment"># data contains an (address array byte) containing the string in utf-8</span> -<span id="L68" class="LineNr"> 68 </span><span class="subxComment"># - symbol: cell{ tag: 4/SYMBOL, data: $(address array byte) 0 }</span> -<span id="L69" class="LineNr"> 69 </span><span class="subxComment"># data contains an (address array byte) containing the name of the symbol in utf-8</span> +<span id="L66" class="LineNr"> 66 </span><span class="subxComment"># - string: cell{ tag: 3/STRING, data: $(addr stream byte)</span> +<span id="L67" class="LineNr"> 67 </span><span class="subxComment"># data contains an (addr array byte) containing the string in utf-8</span> +<span id="L68" class="LineNr"> 68 </span><span class="subxComment"># - symbol: cell{ tag: 4/SYMBOL, data: $(addr array byte) 0 }</span> +<span id="L69" class="LineNr"> 69 </span><span class="subxComment"># data contains an (addr array byte) containing the name of the symbol in utf-8</span> <span id="L70" class="LineNr"> 70 </span><span class="subxComment"># alternatively, data could contain an index into the table of interned symbols</span> -<span id="L71" class="LineNr"> 71 </span><span class="subxComment"># - pair: cell{ tag: 5/PAIR, data: $(address cell) $(address cell) }</span> +<span id="L71" class="LineNr"> 71 </span><span class="subxComment"># - pair: cell{ tag: 5/PAIR, data: $(addr cell) $(addr cell) }</span> <span id="L72" class="LineNr"> 72 </span><span class="subxComment"># data contains pointers to car and cdr</span> -<span id="L73" class="LineNr"> 73 </span><span class="subxComment"># - array: cell{ tag: 6/ARRAY, data: $tag $(address stream data)</span> +<span id="L73" class="LineNr"> 73 </span><span class="subxComment"># - array: cell{ tag: 6/ARRAY, data: $tag $(addr stream data)</span> <span id="L74" class="LineNr"> 74 </span><span class="subxComment"># data contains a pointer to an array of 8-byte data fields and the common</span> <span id="L75" class="LineNr"> 75 </span><span class="subxComment"># tag for them all</span> <span id="L76" class="LineNr"> 76 </span> -<span id="L77" class="LineNr"> 77 </span><span class="subxFunction">repl</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L77" class="LineNr"> 77 </span><span class="subxFunction">repl</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L78" class="LineNr"> 78 </span> <span class="subxS1Comment"># . prologue</span> <span id="L79" class="LineNr"> 79 </span> 55/push-ebp <span id="L80" class="LineNr"> 80 </span> 89/<- %ebp 4/r32/esp @@ -162,7 +162,7 @@ if ('onhashchange' in window) { <span id="L104" class="LineNr">104 </span><span class="subxComment"># arrays start with '['</span> <span id="L105" class="LineNr">105 </span><span class="subxComment"># symbols start with anything else but quote, backquote, unquote or splice</span> <span id="L106" class="LineNr">106 </span><span class="subxComment"># only one s-expression per line</span> -<span id="L107" class="LineNr">107 </span><span class="subxFunction">lisp-read</span>: <span class="subxComment"># in : (address buffered-file) -> eax : (handle cell)</span> +<span id="L107" class="LineNr">107 </span><span class="subxFunction">lisp-read</span>: <span class="subxComment"># in : (addr buffered-file) -> eax : (handle cell)</span> <span id="L108" class="LineNr">108 </span> <span class="subxS1Comment"># . prologue</span> <span id="L109" class="LineNr">109 </span> 55/push-ebp <span id="L110" class="LineNr">110 </span> 89/<- %ebp 4/r32/esp @@ -200,14 +200,14 @@ if ('onhashchange' in window) { <span id="L142" class="LineNr">142 </span> 5d/pop-to-ebp <span id="L143" class="LineNr">143 </span> c3/return <span id="L144" class="LineNr">144 </span> -<span id="L145" class="LineNr">145 </span><span class="subxComment"># lisp-read: in : (address buffered-file) -> (handle cell)</span> +<span id="L145" class="LineNr">145 </span><span class="subxComment"># lisp-read: in : (addr buffered-file) -> (handle cell)</span> <span id="L146" class="LineNr">146 </span><span class="subxComment"># token tmp = next-mulisp-token(in)</span> <span id="L147" class="LineNr">147 </span><span class="subxComment"># if is-int(tmp) return cell(tmp)</span> <span id="L148" class="LineNr">148 </span><span class="subxComment"># if is-string(tmp) return cell(tmp)</span> <span id="L149" class="LineNr">149 </span><span class="subxComment"># if is-pair(tmp) ...</span> <span id="L150" class="LineNr">150 </span><span class="subxComment"># if is-array(tmp) ...</span> <span id="L151" class="LineNr">151 </span> -<span id="L152" class="LineNr">152 </span><span class="subxFunction">next-mulisp-token</span>: <span class="subxComment"># in : (address buffered-file), line : (address stream byte), result : (address slice)</span> +<span id="L152" class="LineNr">152 </span><span class="subxFunction">next-mulisp-token</span>: <span class="subxComment"># in : (addr buffered-file), line : (addr stream byte), result : (addr slice)</span> <span id="L153" class="LineNr">153 </span> <span class="subxComment"># pseudocode:</span> <span id="L154" class="LineNr">154 </span> <span class="subxComment"># if (line->read >= line->write)</span> <span id="L155" class="LineNr">155 </span> <span class="subxComment"># read-line-buffered(in, line)</span> @@ -252,11 +252,11 @@ if ('onhashchange' in window) { <span id="L194" class="LineNr">194 </span> 5d/pop-to-ebp <span id="L195" class="LineNr">195 </span> c3/return <span id="L196" class="LineNr">196 </span> -<span id="L197" class="LineNr">197 </span><span class="subxFunction">new-int-cell</span>: <span class="subxComment"># in : (address slice) -> eax : (handle cell)</span> +<span id="L197" class="LineNr">197 </span><span class="subxFunction">new-int-cell</span>: <span class="subxComment"># in : (addr slice) -> eax : (handle cell)</span> <span id="L198" class="LineNr">198 </span> -<span id="L199" class="LineNr">199 </span><span class="subxFunction">new-string-cell</span>: <span class="subxComment"># in : (address slice) -> eax : (handle cell)</span> +<span id="L199" class="LineNr">199 </span><span class="subxFunction">new-string-cell</span>: <span class="subxComment"># in : (addr slice) -> eax : (handle cell)</span> <span id="L200" class="LineNr">200 </span> -<span id="L201" class="LineNr">201 </span><span class="subxFunction">lisp-eval</span>: <span class="subxComment"># in : (address cell) -> eax : (handle cell)</span> +<span id="L201" class="LineNr">201 </span><span class="subxFunction">lisp-eval</span>: <span class="subxComment"># in : (addr cell) -> eax : (handle cell)</span> <span id="L202" class="LineNr">202 </span> <span class="subxS1Comment"># . prologue</span> <span id="L203" class="LineNr">203 </span> 55/push-ebp <span id="L204" class="LineNr">204 </span> 89/<- %ebp 4/r32/esp @@ -269,7 +269,7 @@ if ('onhashchange' in window) { <span id="L211" class="LineNr">211 </span> 5d/pop-to-ebp <span id="L212" class="LineNr">212 </span> c3/return <span id="L213" class="LineNr">213 </span> -<span id="L214" class="LineNr">214 </span><span class="subxFunction">lisp-print</span>: <span class="subxComment"># out : (address buffered-file), x : (address cell)</span> +<span id="L214" class="LineNr">214 </span><span class="subxFunction">lisp-print</span>: <span class="subxComment"># out : (addr buffered-file), x : (addr cell)</span> <span id="L215" class="LineNr">215 </span> <span class="subxS1Comment"># . prologue</span> <span id="L216" class="LineNr">216 </span> 55/push-ebp <span id="L217" class="LineNr">217 </span> 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) { <span id="L97" class="LineNr"> 97 </span><span class="subxComment"># next-token-from-slice(start, end, delim char) -> slice</span> <span id="L98" class="LineNr"> 98 </span><span class="subxComment"># slice-equal?(slice, string)</span> <span id="L99" class="LineNr"> 99 </span> -<span id="L100" class="LineNr"> 100 </span><span class="subxFunction">subx-pack</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L100" class="LineNr"> 100 </span><span class="subxFunction">subx-pack</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L101" class="LineNr"> 101 </span> <span class="subxComment"># pseudocode:</span> <span id="L102" class="LineNr"> 102 </span> <span class="subxComment"># var line : (ref stream byte 512)</span> <span id="L103" class="LineNr"> 103 </span> <span class="subxComment"># var in-code? = false</span> @@ -818,7 +818,7 @@ if ('onhashchange' in window) { <span id="L909" class="LineNr"> 909 </span> 5d/pop-to-ebp <span id="L910" class="LineNr"> 910 </span> c3/return <span id="L911" class="LineNr"> 911 </span> -<span id="L912" class="LineNr"> 912 </span><span class="subxFunction">convert-data</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L912" class="LineNr"> 912 </span><span class="subxFunction">convert-data</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L913" class="LineNr"> 913 </span> <span class="subxComment"># pseudocode:</span> <span id="L914" class="LineNr"> 914 </span> <span class="subxComment"># var word-slice : (ref slice)</span> <span id="L915" class="LineNr"> 915 </span> <span class="subxComment"># while true</span> @@ -874,7 +874,7 @@ if ('onhashchange' in window) { <span id="L1029" class="LineNr">1029 </span> 0f 85/jump-if-not-equal $convert-data:<span class="Constant">break</span>/disp32 <span id="L1030" class="LineNr">1030 </span><span class="Constant">$convert-data:check-for-comment</span>: <span id="L1031" class="LineNr">1031 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#"))</span> -<span id="L1032" class="LineNr">1032 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = word-slice->start</span> +<span id="L1032" class="LineNr">1032 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = word-slice->start</span> <span id="L1033" class="LineNr">1033 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L1034" class="LineNr">1034 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L1035" class="LineNr">1035 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -895,7 +895,7 @@ if ('onhashchange' in window) { <span id="L1050" class="LineNr">1050 </span> 0f 85/jump-if-not-equal $convert-data:end/disp32 <span id="L1051" class="LineNr">1051 </span><span class="Constant">$convert-data:check-for-label</span>: <span id="L1052" class="LineNr">1052 </span> <span class="subxComment"># if (slice-ends-with?(word-slice, ":"))</span> -<span id="L1053" class="LineNr">1053 </span> <span class="subxS1Comment"># . var end/edx : (address byte) = word-slice->end</span> +<span id="L1053" class="LineNr">1053 </span> <span class="subxS1Comment"># . var end/edx : (addr byte) = word-slice->end</span> <span id="L1054" class="LineNr">1054 </span> 8b/copy 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ecx+4) to edx</span> <span id="L1055" class="LineNr">1055 </span> <span class="subxS1Comment"># . var c/eax : byte = *(end-1)</span> <span id="L1056" class="LineNr">1056 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -1579,7 +1579,7 @@ if ('onhashchange' in window) { <span id="L1809" class="LineNr">1809 </span><span class="subxComment"># unceremoniously abort on non-numeric operands except disp or imm</span> <span id="L1810" class="LineNr">1810 </span><span class="subxComment"># opcodes must be lowercase and zero padded</span> <span id="L1811" class="LineNr">1811 </span><span class="subxComment"># opcodes with misleading operand metadata may get duplicated as operands as well. don't rely on this.</span> -<span id="L1812" class="LineNr">1812 </span><span class="subxFunction">convert-instruction</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L1812" class="LineNr">1812 </span><span class="subxFunction">convert-instruction</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L1813" class="LineNr">1813 </span> <span class="subxComment"># pseudocode:</span> <span id="L1814" class="LineNr">1814 </span> <span class="subxComment"># # some early exits</span> <span id="L1815" class="LineNr">1815 </span> <span class="subxComment"># var word-slice = next-word(line)</span> @@ -1633,7 +1633,7 @@ if ('onhashchange' in window) { <span id="L1863" class="LineNr">1863 </span> 75/jump-if-not-equal $convert-instruction:pass-through/disp8 <span id="L1864" class="LineNr">1864 </span><span class="Constant">$convert-instruction:check1</span>: <span id="L1865" class="LineNr">1865 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) write-stream-data(out, line)</span> -<span id="L1866" class="LineNr">1866 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = word-slice->start</span> +<span id="L1866" class="LineNr">1866 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = word-slice->start</span> <span id="L1867" class="LineNr">1867 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L1868" class="LineNr">1868 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L1869" class="LineNr">1869 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -1643,7 +1643,7 @@ if ('onhashchange' in window) { <span id="L1873" class="LineNr">1873 </span> 74/jump-if-equal $convert-instruction:pass-through/disp8 <span id="L1874" class="LineNr">1874 </span><span class="Constant">$convert-instruction:check2</span>: <span id="L1875" class="LineNr">1875 </span> <span class="subxComment"># if (slice-ends-with?(word-slice, ":")) write-stream-data(out, line)</span> -<span id="L1876" class="LineNr">1876 </span> <span class="subxS1Comment"># . var end/edx : (address byte) = word-slice->end</span> +<span id="L1876" class="LineNr">1876 </span> <span class="subxS1Comment"># . var end/edx : (addr byte) = word-slice->end</span> <span id="L1877" class="LineNr">1877 </span> 8b/copy 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ecx+4) to edx</span> <span id="L1878" class="LineNr">1878 </span> <span class="subxS1Comment"># . var c/eax : byte = *(end-1)</span> <span id="L1879" class="LineNr">1879 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -1723,7 +1723,7 @@ if ('onhashchange' in window) { <span id="L1953" class="LineNr">1953 </span> 5d/pop-to-ebp <span id="L1954" class="LineNr">1954 </span> c3/return <span id="L1955" class="LineNr">1955 </span> -<span id="L1956" class="LineNr">1956 </span><span class="subxFunction">emit-opcodes</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L1956" class="LineNr">1956 </span><span class="subxFunction">emit-opcodes</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L1957" class="LineNr">1957 </span> <span class="subxComment"># opcodes occupy 1-3 bytes:</span> <span id="L1958" class="LineNr">1958 </span> <span class="subxComment"># xx</span> <span id="L1959" class="LineNr">1959 </span> <span class="subxComment"># 0f xx</span> @@ -1800,7 +1800,7 @@ if ('onhashchange' in window) { <span id="L2030" class="LineNr">2030 </span> 3d/compare-eax-and 0/imm32/false <span id="L2031" class="LineNr">2031 </span> 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 <span id="L2032" class="LineNr">2032 </span> <span class="subxComment"># if (slice-starts-with?(op1, "#")) return</span> -<span id="L2033" class="LineNr">2033 </span> <span class="subxS1Comment"># . var start/ebx : (address byte) = op1->start</span> +<span id="L2033" class="LineNr">2033 </span> <span class="subxS1Comment"># . var start/ebx : (addr byte) = op1->start</span> <span id="L2034" class="LineNr">2034 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to ebx</span> <span id="L2035" class="LineNr">2035 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2036" class="LineNr">2036 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -1893,7 +1893,7 @@ if ('onhashchange' in window) { <span id="L2123" class="LineNr">2123 </span> 3d/compare-eax-and 0/imm32/false <span id="L2124" class="LineNr">2124 </span> 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 <span id="L2125" class="LineNr">2125 </span> <span class="subxComment"># if (slice-starts-with?(op2, "#")) return</span> -<span id="L2126" class="LineNr">2126 </span> <span class="subxS1Comment"># . var start/ebx : (address byte) = op2->start</span> +<span id="L2126" class="LineNr">2126 </span> <span class="subxS1Comment"># . var start/ebx : (addr byte) = op2->start</span> <span id="L2127" class="LineNr">2127 </span> 8b/copy 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edx to ebx</span> <span id="L2128" class="LineNr">2128 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2129" class="LineNr">2129 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -1972,7 +1972,7 @@ if ('onhashchange' in window) { <span id="L2202" class="LineNr">2202 </span> 3d/compare-eax-and 0/imm32/false <span id="L2203" class="LineNr">2203 </span> 0f 85/jump-if-not-equal $emit-opcodes:end/disp32 <span id="L2204" class="LineNr">2204 </span> <span class="subxComment"># if (slice-starts-with?(op3, "#")) return</span> -<span id="L2205" class="LineNr">2205 </span> <span class="subxS1Comment"># . var start/ebx : (address byte) = op2->start</span> +<span id="L2205" class="LineNr">2205 </span> <span class="subxS1Comment"># . var start/ebx : (addr byte) = op2->start</span> <span id="L2206" class="LineNr">2206 </span> 8b/copy 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edx to ebx</span> <span id="L2207" class="LineNr">2207 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2208" class="LineNr">2208 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -2019,7 +2019,7 @@ if ('onhashchange' in window) { <span id="L2249" class="LineNr">2249 </span> 5d/pop-to-ebp <span id="L2250" class="LineNr">2250 </span> c3/return <span id="L2251" class="LineNr">2251 </span> -<span id="L2252" class="LineNr">2252 </span><span class="subxFunction">emit-modrm</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L2252" class="LineNr">2252 </span><span class="subxFunction">emit-modrm</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L2253" class="LineNr">2253 </span> <span class="subxComment"># pseudocode:</span> <span id="L2254" class="LineNr">2254 </span> <span class="subxComment"># rewind-stream(line)</span> <span id="L2255" class="LineNr">2255 </span> <span class="subxComment"># var has-modrm? = false, mod = 0, rm32 = 0, r32 = 0</span> @@ -2101,7 +2101,7 @@ if ('onhashchange' in window) { <span id="L2402" class="LineNr">2402 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) break</span> <span id="L2403" class="LineNr">2403 </span> <span class="subxS1Comment"># . spill edx</span> <span id="L2404" class="LineNr">2404 </span> 52/push-edx -<span id="L2405" class="LineNr">2405 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = word-slice->start</span> +<span id="L2405" class="LineNr">2405 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = word-slice->start</span> <span id="L2406" class="LineNr">2406 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L2407" class="LineNr">2407 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2408" class="LineNr">2408 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -2265,7 +2265,7 @@ if ('onhashchange' in window) { <span id="L2566" class="LineNr">2566 </span> 5d/pop-to-ebp <span id="L2567" class="LineNr">2567 </span> c3/return <span id="L2568" class="LineNr">2568 </span> -<span id="L2569" class="LineNr">2569 </span><span class="subxFunction">emit-sib</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L2569" class="LineNr">2569 </span><span class="subxFunction">emit-sib</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L2570" class="LineNr">2570 </span> <span class="subxComment"># pseudocode:</span> <span id="L2571" class="LineNr">2571 </span> <span class="subxComment"># var has-sib? = false, base = 0, index = 0, scale = 0</span> <span id="L2572" class="LineNr">2572 </span> <span class="subxComment"># var word-slice : (ref slice)</span> @@ -2346,7 +2346,7 @@ if ('onhashchange' in window) { <span id="L2711" class="LineNr">2711 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) break</span> <span id="L2712" class="LineNr">2712 </span> <span class="subxS1Comment"># . spill edx</span> <span id="L2713" class="LineNr">2713 </span> 52/push-edx -<span id="L2714" class="LineNr">2714 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = word-slice->start</span> +<span id="L2714" class="LineNr">2714 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = word-slice->start</span> <span id="L2715" class="LineNr">2715 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L2716" class="LineNr">2716 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2717" class="LineNr">2717 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -2482,7 +2482,7 @@ if ('onhashchange' in window) { <span id="L2847" class="LineNr">2847 </span> 5d/pop-to-ebp <span id="L2848" class="LineNr">2848 </span> c3/return <span id="L2849" class="LineNr">2849 </span> -<span id="L2850" class="LineNr">2850 </span><span class="subxFunction">emit-disp</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L2850" class="LineNr">2850 </span><span class="subxFunction">emit-disp</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L2851" class="LineNr">2851 </span> <span class="subxComment"># pseudocode:</span> <span id="L2852" class="LineNr">2852 </span> <span class="subxComment"># rewind-stream(line)</span> <span id="L2853" class="LineNr">2853 </span> <span class="subxComment"># var word-slice : (ref slice)</span> @@ -2543,7 +2543,7 @@ if ('onhashchange' in window) { <span id="L2972" class="LineNr">2972 </span> 0f 85/jump-if-not-equal $emit-disp:<span class="Constant">break</span>/disp32 <span id="L2973" class="LineNr">2973 </span><span class="Constant">$emit-disp:check1</span>: <span id="L2974" class="LineNr">2974 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) break</span> -<span id="L2975" class="LineNr">2975 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = word-slice->start</span> +<span id="L2975" class="LineNr">2975 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = word-slice->start</span> <span id="L2976" class="LineNr">2976 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L2977" class="LineNr">2977 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L2978" class="LineNr">2978 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -2637,7 +2637,7 @@ if ('onhashchange' in window) { <span id="L3066" class="LineNr">3066 </span> 5d/pop-to-ebp <span id="L3067" class="LineNr">3067 </span> c3/return <span id="L3068" class="LineNr">3068 </span> -<span id="L3069" class="LineNr">3069 </span><span class="subxFunction">emit-imm</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L3069" class="LineNr">3069 </span><span class="subxFunction">emit-imm</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L3070" class="LineNr">3070 </span> <span class="subxComment"># pseudocode:</span> <span id="L3071" class="LineNr">3071 </span> <span class="subxComment"># rewind-stream(line)</span> <span id="L3072" class="LineNr">3072 </span> <span class="subxComment"># var word-slice : (ref slice)</span> @@ -2698,7 +2698,7 @@ if ('onhashchange' in window) { <span id="L3191" class="LineNr">3191 </span> 0f 85/jump-if-not-equal $emit-imm:<span class="Constant">break</span>/disp32 <span id="L3192" class="LineNr">3192 </span><span class="Constant">$emit-imm:check1</span>: <span id="L3193" class="LineNr">3193 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) break</span> -<span id="L3194" class="LineNr">3194 </span> <span class="subxS1Comment"># . var start/edx : (address byte) = slice->start</span> +<span id="L3194" class="LineNr">3194 </span> <span class="subxS1Comment"># . var start/edx : (addr byte) = slice->start</span> <span id="L3195" class="LineNr">3195 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to edx</span> <span id="L3196" class="LineNr">3196 </span> <span class="subxS1Comment"># . var c/eax : byte = *start</span> <span id="L3197" class="LineNr">3197 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -2792,7 +2792,7 @@ if ('onhashchange' in window) { <span id="L3285" class="LineNr">3285 </span> 5d/pop-to-ebp <span id="L3286" class="LineNr">3286 </span> c3/return <span id="L3287" class="LineNr">3287 </span> -<span id="L3288" class="LineNr">3288 </span><span class="subxFunction">emit-line-in-comment</span>: <span class="subxComment"># line : (address stream byte), out : (address buffered-file)</span> +<span id="L3288" class="LineNr">3288 </span><span class="subxFunction">emit-line-in-comment</span>: <span class="subxComment"># line : (addr stream byte), out : (addr buffered-file)</span> <span id="L3289" class="LineNr">3289 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3290" class="LineNr">3290 </span> 55/push-ebp <span id="L3291" class="LineNr">3291 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -4694,7 +4694,7 @@ if ('onhashchange' in window) { <span id="L5837" class="LineNr">5837 </span> c3/return <span id="L5838" class="LineNr">5838 </span> <span id="L5839" class="LineNr">5839 </span><span class="subxComment"># shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/'))</span> -<span id="L5840" class="LineNr">5840 </span><span class="subxFunction">parse-datum-of-word</span>: <span class="subxComment"># word : (address slice) -> value/eax : int</span> +<span id="L5840" class="LineNr">5840 </span><span class="subxFunction">parse-datum-of-word</span>: <span class="subxComment"># word : (addr slice) -> value/eax : int</span> <span id="L5841" class="LineNr">5841 </span> <span class="subxS1Comment"># . prologue</span> <span id="L5842" class="LineNr">5842 </span> 55/push-ebp <span id="L5843" class="LineNr">5843 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L104" class="LineNr"> 104 </span> <span id="L105" class="LineNr"> 105 </span><span class="subxComment"># error messages considered:</span> <span id="L106" class="LineNr"> 106 </span><span class="subxComment"># *x + 34 -> error: base+disp addressing must be within '()'</span> -<span id="L107" class="LineNr"> 107 </span><span class="subxFunction">subx-sigils</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L107" class="LineNr"> 107 </span><span class="subxFunction">subx-sigils</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L108" class="LineNr"> 108 </span> <span class="subxComment"># pseudocode:</span> <span id="L109" class="LineNr"> 109 </span> <span class="subxComment"># var line : (stream byte 512)</span> <span id="L110" class="LineNr"> 110 </span> <span class="subxComment"># while true</span> @@ -1182,7 +1182,7 @@ if ('onhashchange' in window) { <span id="L1359" class="LineNr">1359 </span> 5d/pop-to-ebp <span id="L1360" class="LineNr">1360 </span> c3/return <span id="L1361" class="LineNr">1361 </span> -<span id="L1362" class="LineNr">1362 </span><span class="subxFunction">emit-direct-mode</span>: <span class="subxComment"># out : (address buffered-file), word-slice : (address slice)</span> +<span id="L1362" class="LineNr">1362 </span><span class="subxFunction">emit-direct-mode</span>: <span class="subxComment"># out : (addr buffered-file), word-slice : (addr slice)</span> <span id="L1363" class="LineNr">1363 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1364" class="LineNr">1364 </span> 55/push-ebp <span id="L1365" class="LineNr">1365 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -1372,7 +1372,7 @@ if ('onhashchange' in window) { <span id="L1599" class="LineNr">1599 </span><span class="subxComment"># error messages considered:</span> <span id="L1600" class="LineNr">1600 </span><span class="subxComment"># * ... -> error: no space after '*'</span> <span id="L1601" class="LineNr">1601 </span><span class="subxComment"># *(... -> error: *(...) expression must be all on a single line</span> -<span id="L1602" class="LineNr">1602 </span><span class="subxFunction">next-word-or-expression</span>: <span class="subxComment"># line : (address stream byte), out : (address slice)</span> +<span id="L1602" class="LineNr">1602 </span><span class="subxFunction">next-word-or-expression</span>: <span class="subxComment"># line : (addr stream byte), out : (addr slice)</span> <span id="L1603" class="LineNr">1603 </span> <span class="subxComment"># pseudocode:</span> <span id="L1604" class="LineNr">1604 </span> <span class="subxComment"># skip-chars-matching(line, ' ')</span> <span id="L1605" class="LineNr">1605 </span> <span class="subxComment"># if line->read >= line->write # end of line</span> @@ -1980,7 +1980,7 @@ if ('onhashchange' in window) { <span id="L2207" class="LineNr">2207 </span><span class="subxComment"># *(reg1+reg2<<s+disp) -> 2/mod 4/rm32 reg1/base reg2/index s/scale disp/disp32</span> <span id="L2208" class="LineNr">2208 </span><span class="subxComment"># Intermediate structure: base, index, scale, disp</span> <span id="L2209" class="LineNr">2209 </span><span class="subxComment"># Default values: base: 0, index: 4 (none), scale: 0, disp: 0</span> -<span id="L2210" class="LineNr">2210 </span><span class="subxFunction">parse-effective-address</span>: <span class="subxComment"># word-slice : (address slice) -> base/eax, index/ecx, scale/edx, disp/ebx</span> +<span id="L2210" class="LineNr">2210 </span><span class="subxFunction">parse-effective-address</span>: <span class="subxComment"># word-slice : (addr slice) -> base/eax, index/ecx, scale/edx, disp/ebx</span> <span id="L2211" class="LineNr">2211 </span> <span class="subxComment"># pseudocode:</span> <span id="L2212" class="LineNr">2212 </span> <span class="subxComment"># var local-slice = {word-slice->start, word-slice->end}</span> <span id="L2213" class="LineNr">2213 </span> <span class="subxComment"># ++local-slice->start to skip '*'</span> @@ -2443,7 +2443,7 @@ if ('onhashchange' in window) { <span id="L2670" class="LineNr">2670 </span> <span id="L2671" class="LineNr">2671 </span><span class="subxComment"># assumes 'in' starts with a register name, and returns pointer to its code</span> <span id="L2672" class="LineNr">2672 </span><span class="subxComment"># side-effect: modifies 'in' to scan past the initial register name</span> -<span id="L2673" class="LineNr">2673 </span><span class="subxFunction">next-register</span>: <span class="subxComment"># in : (address slice) -> reg/eax : int</span> +<span id="L2673" class="LineNr">2673 </span><span class="subxFunction">next-register</span>: <span class="subxComment"># in : (addr slice) -> reg/eax : int</span> <span id="L2674" class="LineNr">2674 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2675" class="LineNr">2675 </span> 55/push-ebp <span id="L2676" class="LineNr">2676 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -2922,7 +2922,7 @@ if ('onhashchange' in window) { <span id="L3149" class="LineNr">3149 </span><span class="subxComment"># if index is none, then mod = 2 and rm32 = base and disp32 = disp</span> <span id="L3150" class="LineNr">3150 </span><span class="subxComment"># emit-sib:</span> <span id="L3151" class="LineNr">3151 </span><span class="subxComment"># if index is not none, then mod = 2 and rm32 = 4 and base = base and index = index and disp32 = disp</span> -<span id="L3152" class="LineNr">3152 </span><span class="subxFunction">emit-indirect-mode</span>: <span class="subxComment"># out : (address buffered-file), base : int, index : int, scale : int, disp : int</span> +<span id="L3152" class="LineNr">3152 </span><span class="subxFunction">emit-indirect-mode</span>: <span class="subxComment"># out : (addr buffered-file), base : int, index : int, scale : int, disp : int</span> <span id="L3153" class="LineNr">3153 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3154" class="LineNr">3154 </span> 55/push-ebp <span id="L3155" class="LineNr">3155 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3456,7 +3456,7 @@ if ('onhashchange' in window) { <span id="L3858" class="LineNr">3858 </span> 5d/pop-to-ebp <span id="L3859" class="LineNr">3859 </span> c3/return <span id="L3860" class="LineNr">3860 </span> -<span id="L3861" class="LineNr">3861 </span><span class="subxFunction">disp32-mode?</span>: <span class="subxComment"># in : (address slice) -> reg/eax : boolean</span> +<span id="L3861" class="LineNr">3861 </span><span class="subxFunction">disp32-mode?</span>: <span class="subxComment"># in : (addr slice) -> reg/eax : boolean</span> <span id="L3862" class="LineNr">3862 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3863" class="LineNr">3863 </span> 55/push-ebp <span id="L3864" class="LineNr">3864 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3515,7 +3515,7 @@ if ('onhashchange' in window) { <span id="L3917" class="LineNr">3917 </span> 5d/pop-to-ebp <span id="L3918" class="LineNr">3918 </span> c3/return <span id="L3919" class="LineNr">3919 </span> -<span id="L3920" class="LineNr">3920 </span><span class="subxFunction">emit-indirect-disp32</span>: <span class="subxComment"># out : (address buffered-file), word-slice : (address slice)</span> +<span id="L3920" class="LineNr">3920 </span><span class="subxFunction">emit-indirect-disp32</span>: <span class="subxComment"># out : (addr buffered-file), word-slice : (addr slice)</span> <span id="L3921" class="LineNr">3921 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3922" class="LineNr">3922 </span> 55/push-ebp <span id="L3923" class="LineNr">3923 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3565,7 +3565,7 @@ if ('onhashchange' in window) { <span id="L3967" class="LineNr">3967 </span><span class="subxComment"># assumes 'in' starts with optional '+' or '-', optional whitespace, and an unsigned integer</span> <span id="L3968" class="LineNr">3968 </span><span class="subxComment"># returns the value of the integer</span> <span id="L3969" class="LineNr">3969 </span><span class="subxComment"># side-effect: modifies 'in' to skip past the integer</span> -<span id="L3970" class="LineNr">3970 </span><span class="subxFunction">next-hex-int</span>: <span class="subxComment"># in : (address slice) -> result/eax</span> +<span id="L3970" class="LineNr">3970 </span><span class="subxFunction">next-hex-int</span>: <span class="subxComment"># in : (addr slice) -> result/eax</span> <span id="L3971" class="LineNr">3971 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3972" class="LineNr">3972 </span> 55/push-ebp <span id="L3973" class="LineNr">3973 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3980,7 +3980,7 @@ if ('onhashchange' in window) { <span id="L4382" class="LineNr">4382 </span><span class="subxComment"># assumes 'in' starts a positive unsigned integer</span> <span id="L4383" class="LineNr">4383 </span><span class="subxComment"># returns the value of the integer</span> <span id="L4384" class="LineNr">4384 </span><span class="subxComment"># side-effect: modifies 'in' to skip past the integer</span> -<span id="L4385" class="LineNr">4385 </span><span class="subxFunction">next-positive-hex-int</span>: <span class="subxComment"># in : (address slice) -> result/eax</span> +<span id="L4385" class="LineNr">4385 </span><span class="subxFunction">next-positive-hex-int</span>: <span class="subxComment"># in : (addr slice) -> result/eax</span> <span id="L4386" class="LineNr">4386 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4387" class="LineNr">4387 </span> 55/push-ebp <span id="L4388" class="LineNr">4388 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> 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) { <span id="L107" class="LineNr"> 107 </span> cd/syscall 0x80/imm8 <span id="L108" class="LineNr"> 108 </span> <span id="L109" class="LineNr"> 109 </span><span class="subxComment"># data structures:</span> -<span id="L110" class="LineNr"> 110 </span><span class="subxComment"># segment-info: {address, file-offset, size} (12 bytes)</span> -<span id="L111" class="LineNr"> 111 </span><span class="subxComment"># segments: (address stream {string, segment-info}) (16 bytes per row)</span> -<span id="L112" class="LineNr"> 112 </span><span class="subxComment"># label-info: {segment-name, segment-offset, address} (12 bytes)</span> -<span id="L113" class="LineNr"> 113 </span><span class="subxComment"># labels: (address stream {string, label-info}) (16 bytes per row)</span> +<span id="L110" class="LineNr"> 110 </span><span class="subxComment"># segment-info: {addr, file-offset, size} (12 bytes)</span> +<span id="L111" class="LineNr"> 111 </span><span class="subxComment"># segments: (addr stream {string, segment-info}) (16 bytes per row)</span> +<span id="L112" class="LineNr"> 112 </span><span class="subxComment"># label-info: {segment-name, segment-offset, addr} (12 bytes)</span> +<span id="L113" class="LineNr"> 113 </span><span class="subxComment"># labels: (addr stream {string, label-info}) (16 bytes per row)</span> <span id="L114" class="LineNr"> 114 </span><span class="subxComment"># these are all inefficient; use sequential scans for lookups</span> <span id="L115" class="LineNr"> 115 </span> -<span id="L116" class="LineNr"> 116 </span><span class="subxFunction">subx-survey</span>: <span class="subxComment"># infile : (address buffered-file), out : (address buffered-file)</span> +<span id="L116" class="LineNr"> 116 </span><span class="subxFunction">subx-survey</span>: <span class="subxComment"># infile : (addr buffered-file), out : (addr buffered-file)</span> <span id="L117" class="LineNr"> 117 </span> <span class="subxComment"># pseudocode</span> <span id="L118" class="LineNr"> 118 </span> <span class="subxComment"># var in : (ref stream byte 4096)</span> <span id="L119" class="LineNr"> 119 </span> <span class="subxComment"># slurp(infile, in)</span> @@ -449,7 +449,7 @@ if ('onhashchange' in window) { <span id="L618" class="LineNr"> 618 </span> <span id="L619" class="LineNr"> 619 </span>== code <span id="L620" class="LineNr"> 620 </span> -<span id="L621" class="LineNr"> 621 </span><span class="subxFunction">compute-offsets</span>: <span class="subxComment"># in : (address stream byte), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L621" class="LineNr"> 621 </span><span class="subxFunction">compute-offsets</span>: <span class="subxComment"># in : (addr stream byte), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L622" class="LineNr"> 622 </span> <span class="subxComment"># skeleton:</span> <span id="L623" class="LineNr"> 623 </span> <span class="subxComment"># for lines in 'in'</span> <span id="L624" class="LineNr"> 624 </span> <span class="subxComment"># for words in line</span> @@ -460,7 +460,7 @@ if ('onhashchange' in window) { <span id="L629" class="LineNr"> 629 </span> <span class="subxComment"># default</span> <span id="L630" class="LineNr"> 630 </span> <span class="subxComment">#</span> <span id="L631" class="LineNr"> 631 </span> <span class="subxComment"># pseudocode:</span> -<span id="L632" class="LineNr"> 632 </span> <span class="subxComment"># curr-segment-name : (address string) = 0</span> +<span id="L632" class="LineNr"> 632 </span> <span class="subxComment"># curr-segment-name : (addr string) = 0</span> <span id="L633" class="LineNr"> 633 </span> <span class="subxComment"># var line : (stream byte 512)</span> <span id="L634" class="LineNr"> 634 </span> <span class="subxComment"># while true # line loop</span> <span id="L635" class="LineNr"> 635 </span> <span class="subxComment"># clear-stream(line)</span> @@ -492,7 +492,7 @@ if ('onhashchange' in window) { <span id="L661" class="LineNr"> 661 </span> <span class="subxComment"># break (next line)</span> <span id="L662" class="LineNr"> 662 </span> <span class="subxComment"># else if is-label?(word-slice)</span> <span id="L663" class="LineNr"> 663 </span> <span class="subxComment"># strip trailing ':' from word-slice</span> -<span id="L664" class="LineNr"> 664 </span> <span class="subxComment"># x : (address label-info) = get-or-insert(labels, name)</span> +<span id="L664" class="LineNr"> 664 </span> <span class="subxComment"># x : (addr label-info) = get-or-insert(labels, name)</span> <span id="L665" class="LineNr"> 665 </span> <span class="subxComment"># x->segment-name = curr-segment-name</span> <span id="L666" class="LineNr"> 666 </span> <span class="subxComment"># trace("label '", word-slice, "' is in segment '", curr-segment-name, "'.")</span> <span id="L667" class="LineNr"> 667 </span> <span class="subxComment"># x->segment-offset = segment-offset</span> @@ -995,9 +995,9 @@ if ('onhashchange' in window) { <span id="L1378" class="LineNr">1378 </span> 5d/pop-to-ebp <span id="L1379" class="LineNr">1379 </span> c3/return <span id="L1380" class="LineNr">1380 </span> -<span id="L1381" class="LineNr">1381 </span><span class="subxFunction">compute-addresses</span>: <span class="subxComment"># segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L1381" class="LineNr">1381 </span><span class="subxFunction">compute-addresses</span>: <span class="subxComment"># segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L1382" class="LineNr">1382 </span> <span class="subxComment"># pseudocode:</span> -<span id="L1383" class="LineNr">1383 </span> <span class="subxComment"># srow : (address segment-info) = segments->data</span> +<span id="L1383" class="LineNr">1383 </span> <span class="subxComment"># srow : (addr segment-info) = segments->data</span> <span id="L1384" class="LineNr">1384 </span> <span class="subxComment"># max = &segments->data[segments->write]</span> <span id="L1385" class="LineNr">1385 </span> <span class="subxComment"># num-segments = segments->write / 16</span> <span id="L1386" class="LineNr">1386 </span> <span class="subxComment"># starting-offset = 0x34 + (num-segments * 0x20)</span> @@ -1008,12 +1008,12 @@ if ('onhashchange' in window) { <span id="L1391" class="LineNr">1391 </span> <span class="subxComment"># s->address += (s->file-offset & 0x00000fff)</span> <span id="L1392" class="LineNr">1392 </span> <span class="subxComment"># trace-sssns("segment " s->key " starts at address " s->address)</span> <span id="L1393" class="LineNr">1393 </span> <span class="subxComment"># srow += 16 # row-size</span> -<span id="L1394" class="LineNr">1394 </span> <span class="subxComment"># lrow : (address label-info) = labels->data</span> +<span id="L1394" class="LineNr">1394 </span> <span class="subxComment"># lrow : (addr label-info) = labels->data</span> <span id="L1395" class="LineNr">1395 </span> <span class="subxComment"># max = &labels->data[labels->write]</span> <span id="L1396" class="LineNr">1396 </span> <span class="subxComment"># while true</span> <span id="L1397" class="LineNr">1397 </span> <span class="subxComment"># if (lrow >= max) break</span> -<span id="L1398" class="LineNr">1398 </span> <span class="subxComment"># seg-name : (address string) = lrow->segment-name</span> -<span id="L1399" class="LineNr">1399 </span> <span class="subxComment"># label-seg : (address segment-info) = get(segments, seg-name)</span> +<span id="L1398" class="LineNr">1398 </span> <span class="subxComment"># seg-name : (addr string) = lrow->segment-name</span> +<span id="L1399" class="LineNr">1399 </span> <span class="subxComment"># label-seg : (addr segment-info) = get(segments, seg-name)</span> <span id="L1400" class="LineNr">1400 </span> <span class="subxComment"># lrow->address = label-seg->address + lrow->segment-offset</span> <span id="L1401" class="LineNr">1401 </span> <span class="subxComment"># trace-sssns("label " lrow->key " is at address " lrow->address)</span> <span id="L1402" class="LineNr">1402 </span> <span class="subxComment"># lrow += 16 # row-size</span> @@ -1092,7 +1092,7 @@ if ('onhashchange' in window) { <span id="L1525" class="LineNr">1525 </span> <span class="subxComment"># seg-name/edx = lrow->segment-name</span> <span id="L1526" class="LineNr">1526 </span> 8b/copy 1/mod/*+disp8 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *eax to edx</span> <span id="L1527" class="Folded">1527 </span><span class="Folded">+-- 26 lines: #? # dump seg-name -------------------------------------------------------------------------------------------------------------------------</span> -<span id="L1553" class="LineNr">1553 </span> <span class="subxComment"># label-seg/edx : (address segment-info) = get(segments, seg-name, row-size=16, "segment table")</span> +<span id="L1553" class="LineNr">1553 </span> <span class="subxComment"># label-seg/edx : (addr segment-info) = get(segments, seg-name, row-size=16, "segment table")</span> <span id="L1554" class="LineNr">1554 </span> <span class="subxS1Comment"># . save eax</span> <span id="L1555" class="LineNr">1555 </span> 50/push-eax <span id="L1556" class="LineNr">1556 </span> <span class="subxS1Comment"># . eax = get(segments, seg-name, row-size=16)</span> @@ -1388,7 +1388,7 @@ if ('onhashchange' in window) { <span id="L1871" class="LineNr">1871 </span> 5d/pop-to-ebp <span id="L1872" class="LineNr">1872 </span> c3/return <span id="L1873" class="LineNr">1873 </span> -<span id="L1874" class="LineNr">1874 </span><span class="subxFunction">emit-output</span>: <span class="subxComment"># in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L1874" class="LineNr">1874 </span><span class="subxFunction">emit-output</span>: <span class="subxComment"># in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L1875" class="LineNr">1875 </span> <span class="subxComment"># pseudocode:</span> <span id="L1876" class="LineNr">1876 </span> <span class="subxComment"># emit-headers(out, segments, labels)</span> <span id="L1877" class="LineNr">1877 </span> <span class="subxComment"># emit-segments(in, out, segments, labels)</span> @@ -1423,7 +1423,7 @@ if ('onhashchange' in window) { <span id="L1922" class="LineNr">1922 </span> 5d/pop-to-ebp <span id="L1923" class="LineNr">1923 </span> c3/return <span id="L1924" class="LineNr">1924 </span> -<span id="L1925" class="LineNr">1925 </span><span class="subxFunction">emit-segments</span>: <span class="subxComment"># in : (address stream byte), out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L1925" class="LineNr">1925 </span><span class="subxFunction">emit-segments</span>: <span class="subxComment"># in : (addr stream byte), out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L1926" class="LineNr">1926 </span> <span class="subxComment"># pseudocode:</span> <span id="L1927" class="LineNr">1927 </span> <span class="subxComment"># var offset-of-next-instruction = 0</span> <span id="L1928" class="LineNr">1928 </span> <span class="subxComment"># var line : (stream byte 512)</span> @@ -2425,7 +2425,7 @@ if ('onhashchange' in window) { <span id="L3173" class="LineNr">3173 </span> 5d/pop-to-ebp <span id="L3174" class="LineNr">3174 </span> c3/return <span id="L3175" class="LineNr">3175 </span> -<span id="L3176" class="LineNr">3176 </span><span class="subxFunction">emit-headers</span>: <span class="subxComment"># out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L3176" class="LineNr">3176 </span><span class="subxFunction">emit-headers</span>: <span class="subxComment"># out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L3177" class="LineNr">3177 </span> <span class="subxComment"># pseudocode:</span> <span id="L3178" class="LineNr">3178 </span> <span class="subxComment"># emit-elf-header(out, segments, labels)</span> <span id="L3179" class="LineNr">3179 </span> <span class="subxComment"># curr-segment = segments->data</span> @@ -2485,7 +2485,7 @@ if ('onhashchange' in window) { <span id="L3311" class="LineNr">3311 </span> 5d/pop-to-ebp <span id="L3312" class="LineNr">3312 </span> c3/return <span id="L3313" class="LineNr">3313 </span> -<span id="L3314" class="LineNr">3314 </span><span class="subxFunction">emit-elf-header</span>: <span class="subxComment"># out : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})</span> +<span id="L3314" class="LineNr">3314 </span><span class="subxFunction">emit-elf-header</span>: <span class="subxComment"># out : (addr buffered-file), segments : (addr stream {string, segment-info}), labels : (addr stream {string, label-info})</span> <span id="L3315" class="LineNr">3315 </span> <span class="subxComment"># pseudocode</span> <span id="L3316" class="LineNr">3316 </span> <span class="subxComment"># *$Elf_e_entry = get(labels, "Entry")->address</span> <span id="L3317" class="LineNr">3317 </span> <span class="subxComment"># *$Elf_e_phnum = segments->write / 16 # size of a row</span> @@ -2553,7 +2553,7 @@ if ('onhashchange' in window) { <span id="L3379" class="LineNr">3379 </span> 5d/pop-to-ebp <span id="L3380" class="LineNr">3380 </span> c3/return <span id="L3381" class="LineNr">3381 </span> -<span id="L3382" class="LineNr">3382 </span><span class="subxFunction">emit-elf-program-header-entry</span>: <span class="subxComment"># out : (address buffered-file), curr-segment : (address {string, segment-info})</span> +<span id="L3382" class="LineNr">3382 </span><span class="subxFunction">emit-elf-program-header-entry</span>: <span class="subxComment"># out : (addr buffered-file), curr-segment : (addr {string, segment-info})</span> <span id="L3383" class="LineNr">3383 </span> <span class="subxComment"># pseudocode:</span> <span id="L3384" class="LineNr">3384 </span> <span class="subxComment"># *$Elf_p_offset = curr-segment->file-offset</span> <span id="L3385" class="LineNr">3385 </span> <span class="subxComment"># *$Elf_p_vaddr = curr-segment->address</span> @@ -2642,7 +2642,7 @@ if ('onhashchange' in window) { <span id="L3468" class="LineNr">3468 </span> <span id="L3469" class="LineNr">3469 </span><span class="subxH1Comment"># - some helpers for tests</span> <span id="L3470" class="LineNr">3470 </span> -<span id="L3471" class="LineNr">3471 </span><span class="subxFunction">stream-add4</span>: <span class="subxComment"># in : (address stream byte), key : address, val1 : address, val2 : address, val3 : address</span> +<span id="L3471" class="LineNr">3471 </span><span class="subxFunction">stream-add4</span>: <span class="subxComment"># in : (addr stream byte), key : addr, val1 : addr, val2 : addr, val3 : addr</span> <span id="L3472" class="LineNr">3472 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3473" class="LineNr">3473 </span> 55/push-ebp <span id="L3474" class="LineNr">3474 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -2724,11 +2724,11 @@ if ('onhashchange' in window) { <span id="L3550" class="LineNr">3550 </span><span class="subxComment"># some variants of 'trace' that take multiple arguments in different combinations of types:</span> <span id="L3551" class="LineNr">3551 </span><span class="subxComment"># n: int</span> <span id="L3552" class="LineNr">3552 </span><span class="subxComment"># c: character [4-bytes, will eventually be UTF-8]</span> -<span id="L3553" class="LineNr">3553 </span><span class="subxComment"># s: (address string)</span> -<span id="L3554" class="LineNr">3554 </span><span class="subxComment"># l: (address slice)</span> +<span id="L3553" class="LineNr">3553 </span><span class="subxComment"># s: (addr string)</span> +<span id="L3554" class="LineNr">3554 </span><span class="subxComment"># l: (addr slice)</span> <span id="L3555" class="LineNr">3555 </span><span class="subxComment"># one gotcha: 's5' must not be empty</span> <span id="L3556" class="LineNr">3556 </span> -<span id="L3557" class="LineNr">3557 </span><span class="subxFunction">trace-sssns</span>: <span class="subxComment"># s1 : (address string), s2 : (address string), s3 : (address string), n4 : int, s5 : (address string)</span> +<span id="L3557" class="LineNr">3557 </span><span class="subxFunction">trace-sssns</span>: <span class="subxComment"># s1 : (addr string), s2 : (addr string), s3 : (addr string), n4 : int, s5 : (addr string)</span> <span id="L3558" class="LineNr">3558 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3559" class="LineNr">3559 </span> 55/push-ebp <span id="L3560" class="LineNr">3560 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -2810,7 +2810,7 @@ if ('onhashchange' in window) { <span id="L3661" class="LineNr">3661 </span> 5d/pop-to-ebp <span id="L3662" class="LineNr">3662 </span> c3/return <span id="L3663" class="LineNr">3663 </span> -<span id="L3664" class="LineNr">3664 </span><span class="subxFunction">trace-snsns</span>: <span class="subxComment"># s1 : (address string), n2 : int, s3 : (address string), n4 : int, s5 : (address string)</span> +<span id="L3664" class="LineNr">3664 </span><span class="subxFunction">trace-snsns</span>: <span class="subxComment"># s1 : (addr string), n2 : int, s3 : (addr string), n4 : int, s5 : (addr string)</span> <span id="L3665" class="LineNr">3665 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3666" class="LineNr">3666 </span> 55/push-ebp <span id="L3667" class="LineNr">3667 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -2892,7 +2892,7 @@ if ('onhashchange' in window) { <span id="L3768" class="LineNr">3768 </span> 5d/pop-to-ebp <span id="L3769" class="LineNr">3769 </span> c3/return <span id="L3770" class="LineNr">3770 </span> -<span id="L3771" class="LineNr">3771 </span><span class="subxFunction">trace-slsls</span>: <span class="subxComment"># s1 : (address string), l2 : (address slice), s3 : (address string), l4 : (address slice), s5 : (address string)</span> +<span id="L3771" class="LineNr">3771 </span><span class="subxFunction">trace-slsls</span>: <span class="subxComment"># s1 : (addr string), l2 : (addr slice), s3 : (addr string), l4 : (addr slice), s5 : (addr string)</span> <span id="L3772" class="LineNr">3772 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3773" class="LineNr">3773 </span> 55/push-ebp <span id="L3774" class="LineNr">3774 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -2992,7 +2992,7 @@ if ('onhashchange' in window) { <span id="L3893" class="LineNr">3893 </span> 5d/pop-to-ebp <span id="L3894" class="LineNr">3894 </span> c3/return <span id="L3895" class="LineNr">3895 </span> -<span id="L3896" class="LineNr">3896 </span><span class="subxFunction">trace-slsns</span>: <span class="subxComment"># s1 : (address string), l2 : (address slice), s3 : (address string), n4 : int, s5 : (address string)</span> +<span id="L3896" class="LineNr">3896 </span><span class="subxFunction">trace-slsns</span>: <span class="subxComment"># s1 : (addr string), l2 : (addr slice), s3 : (addr string), n4 : int, s5 : (addr string)</span> <span id="L3897" class="LineNr">3897 </span> <span class="subxS1Comment"># . prologue</span> <span id="L3898" class="LineNr">3898 </span> 55/push-ebp <span id="L3899" class="LineNr">3899 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3083,7 +3083,7 @@ if ('onhashchange' in window) { <span id="L4009" class="LineNr">4009 </span> 5d/pop-to-ebp <span id="L4010" class="LineNr">4010 </span> c3/return <span id="L4011" class="LineNr">4011 </span> -<span id="L4012" class="LineNr">4012 </span><span class="subxFunction">trace-slsss</span>: <span class="subxComment"># s1 : (address string), l2 : (address slice), s3 : (address string), s4 : (address string), s5 : (address string)</span> +<span id="L4012" class="LineNr">4012 </span><span class="subxFunction">trace-slsss</span>: <span class="subxComment"># s1 : (addr string), l2 : (addr slice), s3 : (addr string), s4 : (addr string), s5 : (addr string)</span> <span id="L4013" class="LineNr">4013 </span> <span class="subxS1Comment"># . prologue</span> <span id="L4014" class="LineNr">4014 </span> 55/push-ebp <span id="L4015" class="LineNr">4015 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> @@ -3174,7 +3174,7 @@ if ('onhashchange' in window) { <span id="L4125" class="LineNr">4125 </span> 5d/pop-to-ebp <span id="L4126" class="LineNr">4126 </span> c3/return <span id="L4127" class="LineNr">4127 </span> -<span id="L4128" class="LineNr">4128 </span><span class="subxFunction">num-bytes</span>: <span class="subxComment"># line : (address stream byte) -> eax : int</span> +<span id="L4128" class="LineNr">4128 </span><span class="subxFunction">num-bytes</span>: <span class="subxComment"># line : (addr stream byte) -> eax : int</span> <span id="L4129" class="LineNr">4129 </span> <span class="subxComment"># pseudocode:</span> <span id="L4130" class="LineNr">4130 </span> <span class="subxComment"># result = 0</span> <span id="L4131" class="LineNr">4131 </span> <span class="subxComment"># while true</span> 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) { <span id="L67" class="LineNr"> 67 </span> b8/copy-to-eax 1/imm32/exit <span id="L68" class="LineNr"> 68 </span> cd/syscall 0x80/imm8 <span id="L69" class="LineNr"> 69 </span> -<span id="L70" class="LineNr"> 70 </span><span class="subxFunction">subx-gen-run-tests</span>: <span class="subxComment"># in : (address buffered-file), out : (address buffered-file)</span> +<span id="L70" class="LineNr"> 70 </span><span class="subxFunction">subx-gen-run-tests</span>: <span class="subxComment"># in : (addr buffered-file), out : (addr buffered-file)</span> <span id="L71" class="LineNr"> 71 </span> <span class="subxComment"># pseudocode</span> <span id="L72" class="LineNr"> 72 </span> <span class="subxComment"># bool tests-found = false</span> <span id="L73" class="LineNr"> 73 </span> <span class="subxComment"># var line : (stream byte 512)</span> |