This commit is contained in:
Kartik Agaram 2020-06-30 14:54:30 -07:00
parent 8bd3c2b5a8
commit 2655a4a91d
29 changed files with 469 additions and 329 deletions

View File

@ -56,7 +56,7 @@ fn main -> exit-status/ebx: int {
fn simplify -> result/eax: int, look/esi: byte {
# prime the pump
look <- get-char # prime the pump
look <- get-char
# do it
result, look <- expression look
}

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 066print-int.subx</title>
<title>Mu - 066write-int-hex.subx</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
@ -57,9 +57,9 @@ if ('onhashchange' in window) {
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/066print-int.subx'>https://github.com/akkartik/mu/blob/master/066print-int.subx</a>
<a href='https://github.com/akkartik/mu/blob/master/066write-int-hex.subx'>https://github.com/akkartik/mu/blob/master/066write-int-hex.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Print the (hex) textual representation of numbers.</span>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Write out the (hex) textual representation of numbers.</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span>== code
<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># instruction effective address register displacement immediate</span>
@ -90,7 +90,7 @@ if ('onhashchange' in window) {
<span id="L29" class="LineNr"> 29 </span> c1/shift 5/subop/logic-right 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm8 <span class="subxComment"># shift eax right by 4 bits, while padding zeroes</span>
<span id="L30" class="LineNr"> 30 </span> 25/and-eax 0xf/imm32
<span id="L31" class="LineNr"> 31 </span> <span class="subxS1Comment"># . AL = to-hex-char(AL)</span>
<span id="L32" class="LineNr"> 32 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L32" class="LineNr"> 32 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L33" class="LineNr"> 33 </span> <span class="subxComment"># append-byte(f, AL)</span>
<span id="L34" class="LineNr"> 34 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L35" class="LineNr"> 35 </span> 50/push-eax
@ -103,7 +103,7 @@ if ('onhashchange' in window) {
<span id="L42" class="LineNr"> 42 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L43" class="LineNr"> 43 </span> 25/and-eax 0xf/imm32
<span id="L44" class="LineNr"> 44 </span> <span class="subxS1Comment"># . AL = to-hex-char(AL)</span>
<span id="L45" class="LineNr"> 45 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L45" class="LineNr"> 45 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># append-byte(f, AL)</span>
<span id="L47" class="LineNr"> 47 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L48" class="LineNr"> 48 </span> 50/push-eax
@ -135,7 +135,7 @@ if ('onhashchange' in window) {
<span id="L74" class="LineNr"> 74 </span> 68/push 0xa/imm32
<span id="L75" class="LineNr"> 75 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L76" class="LineNr"> 76 </span> <span class="subxS2Comment"># . . call</span>
<span id="L77" class="LineNr"> 77 </span> e8/call <a href='066print-int.subx.html#L21'>append-byte-hex</a>/disp32
<span id="L77" class="LineNr"> 77 </span> e8/call <a href='066write-int-hex.subx.html#L21'>append-byte-hex</a>/disp32
<span id="L78" class="LineNr"> 78 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L79" class="LineNr"> 79 </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="L80" class="LineNr"> 80 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0a&quot;, msg)</span>
@ -151,7 +151,7 @@ if ('onhashchange' in window) {
<span id="L90" class="LineNr"> 90 </span> c3/return
<span id="L91" class="LineNr"> 91 </span>
<span id="L92" class="LineNr"> 92 </span><span class="subxComment"># print the hex representation for the lowest byte of a number</span>
<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">print-byte-buffered</span>: <span class="subxComment"># f: (addr buffered-file), n: int</span>
<span id="L93" class="LineNr"> 93 </span><span class="subxFunction">write-byte-hex-buffered</span>: <span class="subxComment"># f: (addr buffered-file), n: int</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>
@ -162,7 +162,7 @@ if ('onhashchange' in window) {
<span id="L101" class="LineNr">101 </span> c1/shift 5/subop/logic-right 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm8 <span class="subxComment"># shift eax right by 4 bits, while padding zeroes</span>
<span id="L102" class="LineNr">102 </span> 25/and-eax 0xf/imm32
<span id="L103" class="LineNr">103 </span> <span class="subxS1Comment"># . AL = to-hex-char(AL)</span>
<span id="L104" class="LineNr">104 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L104" class="LineNr">104 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L105" class="LineNr">105 </span> <span class="subxComment"># write-byte-buffered(f, AL)</span>
<span id="L106" class="LineNr">106 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L107" class="LineNr">107 </span> 50/push-eax
@ -175,7 +175,7 @@ if ('onhashchange' in window) {
<span id="L114" class="LineNr">114 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L115" class="LineNr">115 </span> 25/and-eax 0xf/imm32
<span id="L116" class="LineNr">116 </span> <span class="subxS1Comment"># . AL = to-hex-char(AL)</span>
<span id="L117" class="LineNr">117 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L117" class="LineNr">117 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L118" class="LineNr">118 </span> <span class="subxComment"># write-byte-buffered(f, AL)</span>
<span id="L119" class="LineNr">119 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L120" class="LineNr">120 </span> 50/push-eax
@ -184,7 +184,7 @@ if ('onhashchange' in window) {
<span id="L123" class="LineNr">123 </span> e8/call <a href='064write-byte.subx.html#L33'>write-byte-buffered</a>/disp32
<span id="L124" class="LineNr">124 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L125" class="LineNr">125 </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="L126" class="LineNr">126 </span><span class="Constant">$print-byte-buffered:end</span>:
<span id="L126" class="LineNr">126 </span><span class="Constant">$write-byte-hex-buffered:end</span>:
<span id="L127" class="LineNr">127 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L128" class="LineNr">128 </span> 58/pop-to-eax
<span id="L129" class="LineNr">129 </span> <span class="subxS1Comment"># . epilogue</span>
@ -192,8 +192,8 @@ if ('onhashchange' in window) {
<span id="L131" class="LineNr">131 </span> 5d/pop-to-ebp
<span id="L132" class="LineNr">132 </span> c3/return
<span id="L133" class="LineNr">133 </span>
<span id="L134" class="LineNr">134 </span><span class="subxTest">test-print-byte-buffered</span>:
<span id="L135" class="LineNr">135 </span> <span class="subxH1Comment"># - check that print-byte-buffered prints the hex textual representation</span>
<span id="L134" class="LineNr">134 </span><span class="subxTest">test-write-byte-hex-buffered</span>:
<span id="L135" class="LineNr">135 </span> <span class="subxH1Comment"># - check that write-byte-hex-buffered prints the hex textual representation</span>
<span id="L136" class="LineNr">136 </span> <span class="subxComment"># setup</span>
<span id="L137" class="LineNr">137 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
<span id="L138" class="LineNr">138 </span> <span class="subxS2Comment"># . . push args</span>
@ -209,12 +209,12 @@ if ('onhashchange' in window) {
<span id="L148" class="LineNr">148 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L149" class="LineNr">149 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L150" class="LineNr">150 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L151" class="LineNr">151 </span> <span class="subxComment"># print-byte-buffered(_test-buffered-file, 0xa) # exercises digit, non-digit as well as leading zero</span>
<span id="L151" class="LineNr">151 </span> <span class="subxComment"># write-byte-hex-buffered(_test-buffered-file, 0xa) # exercises digit, non-digit as well as leading zero</span>
<span id="L152" class="LineNr">152 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L153" class="LineNr">153 </span> 68/push 0xa/imm32
<span id="L154" class="LineNr">154 </span> 68/push <a href='061read-byte.subx.html#L274'>_test-buffered-file</a>/imm32
<span id="L155" class="LineNr">155 </span> <span class="subxS2Comment"># . . call</span>
<span id="L156" class="LineNr">156 </span> e8/call <a href='066print-int.subx.html#L93'>print-byte-buffered</a>/disp32
<span id="L156" class="LineNr">156 </span> e8/call <a href='066write-int-hex.subx.html#L93'>write-byte-hex-buffered</a>/disp32
<span id="L157" class="LineNr">157 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L158" class="LineNr">158 </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="L159" class="LineNr">159 </span> <span class="subxComment"># flush(_test-buffered-file)</span>
@ -226,7 +226,7 @@ if ('onhashchange' in window) {
<span id="L165" class="LineNr">165 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L166" class="LineNr">166 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0a&quot;, msg)</span>
<span id="L167" class="LineNr">167 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L168" class="LineNr">168 </span> 68/push <span class="Constant">&quot;F - test-print-byte-buffered&quot;</span>/imm32
<span id="L168" class="LineNr">168 </span> 68/push <span class="Constant">&quot;F - test-write-byte-hex-buffered&quot;</span>/imm32
<span id="L169" class="LineNr">169 </span> 68/push <span class="Constant">&quot;0a&quot;</span>/imm32
<span id="L170" class="LineNr">170 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L171" class="LineNr">171 </span> <span class="subxS2Comment"># . . call</span>
@ -236,7 +236,7 @@ if ('onhashchange' in window) {
<span id="L175" class="LineNr">175 </span> <span class="subxS1Comment"># . end</span>
<span id="L176" class="LineNr">176 </span> c3/return
<span id="L177" class="LineNr">177 </span>
<span id="L178" class="LineNr">178 </span><span class="subxFunction">print-int32</span>: <span class="subxComment"># f: (addr stream byte), n: int</span>
<span id="L178" class="LineNr">178 </span><span class="subxFunction">write-int32-hex</span>: <span class="subxComment"># f: (addr stream byte), n: int</span>
<span id="L179" class="LineNr">179 </span> <span class="subxComment"># pseudocode:</span>
<span id="L180" class="LineNr">180 </span> <span class="subxComment"># write(f, &quot;0x&quot;)</span>
<span id="L181" class="LineNr">181 </span> <span class="subxComment"># ecx = 28</span>
@ -255,7 +255,7 @@ if ('onhashchange' in window) {
<span id="L194" class="LineNr">194 </span> 51/push-ecx
<span id="L195" class="LineNr">195 </span> <span class="subxComment"># ecx = 28</span>
<span id="L196" class="LineNr">196 </span> b9/copy-to-ecx 0x1c/imm32
<span id="L197" class="LineNr">197 </span><span class="Constant">$print-int32:print-hex-prefix</span>:
<span id="L197" class="LineNr">197 </span><span class="Constant">$write-int32-hex:hex-prefix</span>:
<span id="L198" class="LineNr">198 </span> <span class="subxComment"># write(f, &quot;0x&quot;)</span>
<span id="L199" class="LineNr">199 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L200" class="LineNr">200 </span> 68/push <span class="Constant">&quot;0x&quot;</span>/imm32
@ -264,16 +264,16 @@ if ('onhashchange' in window) {
<span id="L203" class="LineNr">203 </span> e8/call <a href='057write.subx.html#L24'>write</a>/disp32
<span id="L204" class="LineNr">204 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L205" class="LineNr">205 </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="L206" class="LineNr">206 </span><span class="Constant">$print-int32:loop</span>:
<span id="L206" class="LineNr">206 </span><span class="Constant">$write-int32-hex:loop</span>:
<span id="L207" class="LineNr">207 </span> <span class="subxComment"># if (ecx &lt; 0) break</span>
<span id="L208" class="LineNr">208 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ecx</span>
<span id="L209" class="LineNr">209 </span> 7c/jump-if-&lt; $print-int32:end/disp8
<span id="L209" class="LineNr">209 </span> 7c/jump-if-&lt; $write-int32-hex:end/disp8
<span id="L210" class="LineNr">210 </span> <span class="subxComment"># eax = n &gt;&gt; ecx</span>
<span id="L211" class="LineNr">211 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L212" class="LineNr">212 </span> d3/&gt;&gt;ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># shift eax right by ecx bits, padding zeroes</span>
<span id="L213" class="LineNr">213 </span> <span class="subxComment"># eax = to-hex-char(AL)</span>
<span id="L214" class="LineNr">214 </span> 25/and-eax 0xf/imm32
<span id="L215" class="LineNr">215 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L215" class="LineNr">215 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L216" class="LineNr">216 </span> <span class="subxComment"># append-byte(f, AL)</span>
<span id="L217" class="LineNr">217 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L218" class="LineNr">218 </span> 50/push-eax
@ -284,8 +284,8 @@ if ('onhashchange' in window) {
<span id="L223" class="LineNr">223 </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="L224" class="LineNr">224 </span> <span class="subxComment"># ecx -= 4</span>
<span id="L225" class="LineNr">225 </span> 81 5/subop/subtract 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># subtract from ecx</span>
<span id="L226" class="LineNr">226 </span> eb/jump $print-int32:<span class="Constant">loop</span>/disp8
<span id="L227" class="LineNr">227 </span><span class="Constant">$print-int32:end</span>:
<span id="L226" class="LineNr">226 </span> eb/jump $write-int32-hex:<span class="Constant">loop</span>/disp8
<span id="L227" class="LineNr">227 </span><span class="Constant">$write-int32-hex:end</span>:
<span id="L228" class="LineNr">228 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L229" class="LineNr">229 </span> 59/pop-to-ecx
<span id="L230" class="LineNr">230 </span> 58/pop-to-eax
@ -294,8 +294,8 @@ if ('onhashchange' in window) {
<span id="L233" class="LineNr">233 </span> 5d/pop-to-ebp
<span id="L234" class="LineNr">234 </span> c3/return
<span id="L235" class="LineNr">235 </span>
<span id="L236" class="LineNr">236 </span><span class="subxTest">test-print-int32</span>:
<span id="L237" class="LineNr">237 </span> <span class="subxH1Comment"># - check that print-int32 prints the hex textual representation</span>
<span id="L236" class="LineNr">236 </span><span class="subxTest">test-write-int32-hex</span>:
<span id="L237" class="LineNr">237 </span> <span class="subxH1Comment"># - check that write-int32-hex prints the hex textual representation</span>
<span id="L238" class="LineNr">238 </span> <span class="subxComment"># setup</span>
<span id="L239" class="LineNr">239 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
<span id="L240" class="LineNr">240 </span> <span class="subxS2Comment"># . . push args</span>
@ -304,17 +304,17 @@ if ('onhashchange' in window) {
<span id="L243" class="LineNr">243 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L244" class="LineNr">244 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L245" class="LineNr">245 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L246" class="LineNr">246 </span> <span class="subxComment"># print-int32(_test-stream, 0x8899aa)</span>
<span id="L246" class="LineNr">246 </span> <span class="subxComment"># write-int32-hex(_test-stream, 0x8899aa)</span>
<span id="L247" class="LineNr">247 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L248" class="LineNr">248 </span> 68/push 0x8899aa/imm32
<span id="L249" class="LineNr">249 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L250" class="LineNr">250 </span> <span class="subxS2Comment"># . . call</span>
<span id="L251" class="LineNr">251 </span> e8/call <a href='066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L251" class="LineNr">251 </span> e8/call <a href='066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L252" class="LineNr">252 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L253" class="LineNr">253 </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="L254" class="LineNr">254 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0x008899aa&quot;, msg)</span>
<span id="L255" class="LineNr">255 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L256" class="LineNr">256 </span> 68/push <span class="Constant">&quot;F - test-print-int32&quot;</span>/imm32
<span id="L256" class="LineNr">256 </span> 68/push <span class="Constant">&quot;F - test-write-int32-hex&quot;</span>/imm32
<span id="L257" class="LineNr">257 </span> 68/push <span class="Constant">&quot;0x008899aa&quot;</span>/imm32
<span id="L258" class="LineNr">258 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L259" class="LineNr">259 </span> <span class="subxS2Comment"># . . call</span>
@ -324,7 +324,7 @@ if ('onhashchange' in window) {
<span id="L263" class="LineNr">263 </span> <span class="subxS1Comment"># . end</span>
<span id="L264" class="LineNr">264 </span> c3/return
<span id="L265" class="LineNr">265 </span>
<span id="L266" class="LineNr">266 </span><span class="subxFunction">print-int32-buffered</span>: <span class="subxComment"># f: (addr buffered-file), n: int</span>
<span id="L266" class="LineNr">266 </span><span class="subxFunction">write-int32-hex-buffered</span>: <span class="subxComment"># f: (addr buffered-file), n: int</span>
<span id="L267" class="LineNr">267 </span> <span class="subxComment"># pseudocode:</span>
<span id="L268" class="LineNr">268 </span> <span class="subxComment"># write-buffered(f, &quot;0x&quot;)</span>
<span id="L269" class="LineNr">269 </span> <span class="subxComment"># ecx = 28</span>
@ -343,7 +343,7 @@ if ('onhashchange' in window) {
<span id="L282" class="LineNr">282 </span> 51/push-ecx
<span id="L283" class="LineNr">283 </span> <span class="subxComment"># ecx = 28</span>
<span id="L284" class="LineNr">284 </span> b9/copy-to-ecx 0x1c/imm32
<span id="L285" class="LineNr">285 </span><span class="Constant">$print-int32-buffered:print-hex-prefix</span>:
<span id="L285" class="LineNr">285 </span><span class="Constant">$write-int32-hex-buffered:hex-prefix</span>:
<span id="L286" class="LineNr">286 </span> <span class="subxComment"># write-buffered(f, &quot;0x&quot;)</span>
<span id="L287" class="LineNr">287 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L288" class="LineNr">288 </span> 68/push <span class="Constant">&quot;0x&quot;</span>/imm32
@ -352,16 +352,16 @@ if ('onhashchange' in window) {
<span id="L291" class="LineNr">291 </span> e8/call <a href='065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L292" class="LineNr">292 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L293" class="LineNr">293 </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="L294" class="LineNr">294 </span><span class="Constant">$print-int32-buffered:loop</span>:
<span id="L294" class="LineNr">294 </span><span class="Constant">$write-int32-hex-buffered:loop</span>:
<span id="L295" class="LineNr">295 </span> <span class="subxComment"># if (ecx &lt; 0) break</span>
<span id="L296" class="LineNr">296 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ecx</span>
<span id="L297" class="LineNr">297 </span> 7c/jump-if-&lt; $print-int32-buffered:end/disp8
<span id="L297" class="LineNr">297 </span> 7c/jump-if-&lt; $write-int32-hex-buffered:end/disp8
<span id="L298" class="LineNr">298 </span> <span class="subxComment"># eax = n &gt;&gt; ecx</span>
<span id="L299" class="LineNr">299 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L300" class="LineNr">300 </span> d3/&gt;&gt;ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># shift eax right by ecx bits, padding zeroes</span>
<span id="L301" class="LineNr">301 </span> <span class="subxComment"># eax = to-hex-char(AL)</span>
<span id="L302" class="LineNr">302 </span> 25/and-eax 0xf/imm32
<span id="L303" class="LineNr">303 </span> e8/call <a href='066print-int.subx.html#L9'>to-hex-char</a>/disp32
<span id="L303" class="LineNr">303 </span> e8/call <a href='066write-int-hex.subx.html#L9'>to-hex-char</a>/disp32
<span id="L304" class="LineNr">304 </span> <span class="subxComment"># write-byte-buffered(f, AL)</span>
<span id="L305" class="LineNr">305 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L306" class="LineNr">306 </span> 50/push-eax
@ -372,8 +372,8 @@ if ('onhashchange' in window) {
<span id="L311" class="LineNr">311 </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="L312" class="LineNr">312 </span> <span class="subxComment"># ecx -= 4</span>
<span id="L313" class="LineNr">313 </span> 81 5/subop/subtract 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># subtract from ecx</span>
<span id="L314" class="LineNr">314 </span> eb/jump $print-int32-buffered:<span class="Constant">loop</span>/disp8
<span id="L315" class="LineNr">315 </span><span class="Constant">$print-int32-buffered:end</span>:
<span id="L314" class="LineNr">314 </span> eb/jump $write-int32-hex-buffered:<span class="Constant">loop</span>/disp8
<span id="L315" class="LineNr">315 </span><span class="Constant">$write-int32-hex-buffered:end</span>:
<span id="L316" class="LineNr">316 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L317" class="LineNr">317 </span> 59/pop-to-ecx
<span id="L318" class="LineNr">318 </span> 58/pop-to-eax
@ -382,8 +382,8 @@ if ('onhashchange' in window) {
<span id="L321" class="LineNr">321 </span> 5d/pop-to-ebp
<span id="L322" class="LineNr">322 </span> c3/return
<span id="L323" class="LineNr">323 </span>
<span id="L324" class="LineNr">324 </span><span class="subxTest">test-print-int32-buffered</span>:
<span id="L325" class="LineNr">325 </span> <span class="subxH1Comment"># - check that print-int32-buffered prints the hex textual representation</span>
<span id="L324" class="LineNr">324 </span><span class="subxTest">test-write-int32-hex-buffered</span>:
<span id="L325" class="LineNr">325 </span> <span class="subxH1Comment"># - check that write-int32-hex-buffered prints the hex textual representation</span>
<span id="L326" class="LineNr">326 </span> <span class="subxComment"># setup</span>
<span id="L327" class="LineNr">327 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
<span id="L328" class="LineNr">328 </span> <span class="subxS2Comment"># . . push args</span>
@ -399,12 +399,12 @@ if ('onhashchange' in window) {
<span id="L338" class="LineNr">338 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L339" class="LineNr">339 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L340" class="LineNr">340 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L341" class="LineNr">341 </span> <span class="subxComment"># print-int32-buffered(_test-buffered-file, 0x8899aa)</span>
<span id="L341" class="LineNr">341 </span> <span class="subxComment"># write-int32-hex-buffered(_test-buffered-file, 0x8899aa)</span>
<span id="L342" class="LineNr">342 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L343" class="LineNr">343 </span> 68/push 0x8899aa/imm32
<span id="L344" class="LineNr">344 </span> 68/push <a href='061read-byte.subx.html#L274'>_test-buffered-file</a>/imm32
<span id="L345" class="LineNr">345 </span> <span class="subxS2Comment"># . . call</span>
<span id="L346" class="LineNr">346 </span> e8/call <a href='066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L346" class="LineNr">346 </span> e8/call <a href='066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L347" class="LineNr">347 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L348" class="LineNr">348 </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="L349" class="LineNr">349 </span> <span class="subxComment"># flush(_test-buffered-file)</span>
@ -417,7 +417,7 @@ if ('onhashchange' in window) {
<span id="L356" class="Folded">356 </span><span class="Folded">+-- 18 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L374" class="LineNr">374 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0x008899aa&quot;, msg)</span>
<span id="L375" class="LineNr">375 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L376" class="LineNr">376 </span> 68/push <span class="Constant">&quot;F - test-print-int32-buffered&quot;</span>/imm32
<span id="L376" class="LineNr">376 </span> 68/push <span class="Constant">&quot;F - test-write-int32-hex-buffered&quot;</span>/imm32
<span id="L377" class="LineNr">377 </span> 68/push <span class="Constant">&quot;0x008899aa&quot;</span>/imm32
<span id="L378" class="LineNr">378 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L379" class="LineNr">379 </span> <span class="subxS2Comment"># . . call</span>

View File

@ -967,12 +967,12 @@ if ('onhashchange' in window) {
<span id="L907" class="LineNr">907 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L908" class="LineNr">908 </span> <span class="subxS2Comment"># . . restore eax</span>
<span id="L909" class="LineNr">909 </span> 58/pop-to-eax
<span id="L910" class="LineNr">910 </span> <span class="subxS1Comment"># . print-int32-buffered(Stderr, eax)</span>
<span id="L910" class="LineNr">910 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(Stderr, eax)</span>
<span id="L911" class="LineNr">911 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L912" class="LineNr">912 </span> 50/push-eax
<span id="L913" class="LineNr">913 </span> 68/push <span class="SpecialChar"><a href='065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L914" class="LineNr">914 </span> <span class="subxS2Comment"># . . call</span>
<span id="L915" class="LineNr">915 </span> e8/call <a href='066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L915" class="LineNr">915 </span> e8/call <a href='066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L916" class="LineNr">916 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L917" class="LineNr">917 </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="L918" class="LineNr">918 </span> <span class="subxS1Comment"># . flush(Stderr)</span>

View File

@ -111,12 +111,12 @@ if ('onhashchange' in window) {
<span id="L51" class="LineNr">51 </span> e8/call <a href='065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L52" class="LineNr">52 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L53" class="LineNr">53 </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="L54" class="LineNr">54 </span> <span class="subxComment"># print-byte-buffered(out, byte)</span>
<span id="L54" class="LineNr">54 </span> <span class="subxComment"># write-byte-hex-buffered(out, byte)</span>
<span id="L55" class="LineNr">55 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L56" class="LineNr">56 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+20)</span>
<span id="L57" class="LineNr">57 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L58" class="LineNr">58 </span> <span class="subxS2Comment"># . . call</span>
<span id="L59" class="LineNr">59 </span> e8/call <a href='066print-int.subx.html#L93'>print-byte-buffered</a>/disp32
<span id="L59" class="LineNr">59 </span> e8/call <a href='066write-int-hex.subx.html#L93'>write-byte-hex-buffered</a>/disp32
<span id="L60" class="LineNr">60 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L61" class="LineNr">61 </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="L62" class="LineNr">62 </span> <span class="subxComment"># write-buffered(out, Newline)</span>

View File

@ -734,7 +734,7 @@ if ('onhashchange' in window) {
<span id="L673" class="LineNr">673 </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> 0xc/imm32 <span class="subxComment"># add to esp</span>
<span id="L674" class="LineNr">674 </span> <span class="subxComment"># check-ints-equal(h-&gt;payload-&gt;size, 3, msg)</span>
<span id="L675" class="LineNr">675 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L676" class="LineNr">676 </span> 68/push <span class="Constant">&quot;F - <a href='069allocate.subx.html#L614'>test-allocate-array</a>: sets array size in payload&quot;</span>/imm32
<span id="L676" class="LineNr">676 </span> 68/push <span class="Constant">&quot;F - <a href='069allocate.subx.html#L614'>test-allocate-array</a>: sets array <a href='106size.subx.html#L5'>size</a> in payload&quot;</span>/imm32
<span id="L677" class="LineNr">677 </span> 68/push 3/imm32
<span id="L678" class="LineNr">678 </span> ff 6/subop/push 1/mod/*+disp8 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebx+4)</span>
<span id="L679" class="LineNr">679 </span> <span class="subxS2Comment"># . . call</span>
@ -900,7 +900,7 @@ if ('onhashchange' in window) {
<span id="L839" class="LineNr">839 </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="L840" class="LineNr">840 </span> <span class="subxComment"># check-ints-equal(payload-&gt;size, 0xc, msg)</span>
<span id="L841" class="LineNr">841 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L842" class="LineNr">842 </span> 68/push <span class="Constant">&quot;F - <a href='069allocate.subx.html#L766'>test-copy-array</a>: sets array size in payload&quot;</span>/imm32
<span id="L842" class="LineNr">842 </span> 68/push <span class="Constant">&quot;F - <a href='069allocate.subx.html#L766'>test-copy-array</a>: sets array <a href='106size.subx.html#L5'>size</a> in payload&quot;</span>/imm32
<span id="L843" class="LineNr">843 </span> 68/push 0xc/imm32
<span id="L844" class="LineNr">844 </span> ff 6/subop/push 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># push *eax</span>
<span id="L845" class="LineNr">845 </span> <span class="subxS2Comment"># . . call</span>

View File

@ -119,7 +119,7 @@ if ('onhashchange' in window) {
<span id="L60" class="LineNr"> 60 </span><span class="Constant">$new-stream:abort</span>:
<span id="L61" class="LineNr"> 61 </span> <span class="subxS1Comment"># . _write(2/stderr, error)</span>
<span id="L62" class="LineNr"> 62 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L63" class="LineNr"> 63 </span> 68/push <span class="Constant">&quot;new-stream: size too large\n&quot;</span>/imm32
<span id="L63" class="LineNr"> 63 </span> 68/push <span class="Constant">&quot;new-stream: <a href='106size.subx.html#L5'>size</a> too large\n&quot;</span>/imm32
<span id="L64" class="LineNr"> 64 </span> 68/push 2/imm32/stderr
<span id="L65" class="LineNr"> 65 </span> <span class="subxS2Comment"># . . call</span>
<span id="L66" class="LineNr"> 66 </span> e8/call <a href='050_write.subx.html#L12'>_write</a>/disp32
@ -177,7 +177,7 @@ if ('onhashchange' in window) {
<span id="L118" class="LineNr">118 </span> 05/add-to-eax 4/imm32
<span id="L119" class="LineNr">119 </span> <span class="subxComment"># check-ints-equal(eax-&gt;size, 6, msg)</span>
<span id="L120" class="LineNr">120 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L121" class="LineNr">121 </span> 68/push <span class="Constant">&quot;F - <a href='070new-stream.subx.html#L74'>test-new-stream</a>: sets size correctly&quot;</span>/imm32
<span id="L121" class="LineNr">121 </span> 68/push <span class="Constant">&quot;F - <a href='070new-stream.subx.html#L74'>test-new-stream</a>: sets <a href='106size.subx.html#L5'>size</a> correctly&quot;</span>/imm32
<span id="L122" class="LineNr">122 </span> 68/push 6/imm32
<span id="L123" class="LineNr">123 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="subxComment"># push *(eax+8)</span>
<span id="L124" class="LineNr">124 </span> <span class="subxS2Comment"># . . call</span>

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 075print-int-decimal.subx</title>
<title>Mu - 075write-int-decimal.subx</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
@ -20,6 +20,8 @@ a { color:inherit; }
.subxFunction { color: #af5f00; text-decoration: underline; }
.LineNr { }
.subxS1Comment { color: #0000af; }
.CommentedCode { color: #8a8a8a; }
.SpecialChar { color: #d70000; }
.Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; }
.Folded { color: #080808; background-color: #949494; }
.Constant { color: #008787; }
@ -57,7 +59,7 @@ if ('onhashchange' in window) {
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/075print-int-decimal.subx'>https://github.com/akkartik/mu/blob/master/075print-int-decimal.subx</a>
<a href='https://github.com/akkartik/mu/blob/master/075write-int-decimal.subx'>https://github.com/akkartik/mu/blob/master/075write-int-decimal.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Helper to print an int32 in decimal.</span>
<span id="L2" class="LineNr"> 2 </span>
@ -66,7 +68,7 @@ if ('onhashchange' in window) {
<span id="L5" class="LineNr"> 5 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span>
<span id="L6" class="LineNr"> 6 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span>
<span id="L7" class="LineNr"> 7 </span>
<span id="L8" class="LineNr"> 8 </span><span class="subxFunction">print-int32-decimal</span>: <span class="subxComment"># out: (addr stream byte), n: int32</span>
<span id="L8" class="LineNr"> 8 </span><span class="subxFunction">write-int32-decimal</span>: <span class="subxComment"># out: (addr stream byte), n: int32</span>
<span id="L9" class="LineNr"> 9 </span> <span class="subxComment"># works by generating characters from lowest to highest and pushing them</span>
<span id="L10" class="LineNr"> 10 </span> <span class="subxComment"># to the stack, before popping them one by one into the stream</span>
<span id="L11" class="LineNr"> 11 </span> <span class="subxComment">#</span>
@ -112,10 +114,10 @@ if ('onhashchange' in window) {
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># var eax: int = abs(n)</span>
<span id="L52" class="LineNr"> 52 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L53" class="LineNr"> 53 </span> 3d/compare-eax-with 0/imm32
<span id="L54" class="LineNr"> 54 </span> 7d/jump-if-&gt;= $print-int32-decimal:read-loop/disp8
<span id="L55" class="LineNr"> 55 </span><span class="Constant">$print-int32-decimal:negative</span>:
<span id="L54" class="LineNr"> 54 </span> 7d/jump-if-&gt;= $write-int32-decimal:read-loop/disp8
<span id="L55" class="LineNr"> 55 </span><span class="Constant">$write-int32-decimal:negative</span>:
<span id="L56" class="LineNr"> 56 </span> f7 3/subop/negate 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># negate eax</span>
<span id="L57" class="LineNr"> 57 </span><span class="Constant">$print-int32-decimal:read-loop</span>:
<span id="L57" class="LineNr"> 57 </span><span class="Constant">$write-int32-decimal:read-loop</span>:
<span id="L58" class="LineNr"> 58 </span> <span class="subxComment"># eax, edx = eax / 10, eax % 10</span>
<span id="L59" class="LineNr"> 59 </span> 99/sign-extend-eax-into-edx
<span id="L60" class="LineNr"> 60 </span> f7 7/subop/idiv 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># divide edx:eax by ecx, storing quotient in eax and remainder in edx</span>
@ -125,14 +127,14 @@ if ('onhashchange' in window) {
<span id="L64" class="LineNr"> 64 </span> 52/push-edx
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># if (eax == 0) break</span>
<span id="L66" class="LineNr"> 66 </span> 3d/compare-eax-and 0/imm32
<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-&gt; $print-int32-decimal:read-loop/disp8
<span id="L68" class="LineNr"> 68 </span><span class="Constant">$print-int32-decimal:read-break</span>:
<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-&gt; $write-int32-decimal:read-loop/disp8
<span id="L68" class="LineNr"> 68 </span><span class="Constant">$write-int32-decimal:read-break</span>:
<span id="L69" class="LineNr"> 69 </span> <span class="subxComment"># if (n &lt; 0) push('-')</span>
<span id="L70" class="LineNr"> 70 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 0/imm32 <span class="subxComment"># compare *(ebp+12)</span>
<span id="L71" class="LineNr"> 71 </span> 7d/jump-if-&gt;= $print-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8
<span id="L72" class="LineNr"> 72 </span><span class="Constant">$print-int32-decimal:push-negative</span>:
<span id="L71" class="LineNr"> 71 </span> 7d/jump-if-&gt;= $write-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8
<span id="L72" class="LineNr"> 72 </span><span class="Constant">$write-int32-decimal:push-negative</span>:
<span id="L73" class="LineNr"> 73 </span> 68/push 0x2d/imm32/-
<span id="L74" class="LineNr"> 74 </span><span class="Constant">$print-int32-decimal:<a href='057write.subx.html#L24'>write</a></span>:
<span id="L74" class="LineNr"> 74 </span><span class="Constant">$write-int32-decimal:<a href='057write.subx.html#L24'>write</a></span>:
<span id="L75" class="LineNr"> 75 </span> <span class="subxComment"># edi = out</span>
<span id="L76" class="LineNr"> 76 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 7/r32/edi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to edi</span>
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># var w/edx: int = out-&gt;write</span>
@ -142,27 +144,27 @@ if ('onhashchange' in window) {
<span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># var max/ebx: (addr byte) = &amp;out-&gt;data[out-&gt;size]</span>
<span id="L82" class="LineNr"> 82 </span> 8b/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(edi+8) to ebx</span>
<span id="L83" class="LineNr"> 83 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 3/index/ebx <span class="Normal"> . </span> 3/r32/ebx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy edi+ebx+12 to ebx</span>
<span id="L84" class="LineNr"> 84 </span><span class="Constant">$print-int32-decimal:write-loop</span>:
<span id="L84" class="LineNr"> 84 </span><span class="Constant">$write-int32-decimal:write-loop</span>:
<span id="L85" class="LineNr"> 85 </span> <span class="subxComment"># pop into eax</span>
<span id="L86" class="LineNr"> 86 </span> 58/pop-to-eax
<span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># if (eax == sentinel) break</span>
<span id="L88" class="LineNr"> 88 </span> 3d/compare-eax-and 0/imm32/sentinel
<span id="L89" class="LineNr"> 89 </span> 74/jump-if-= $print-int32-decimal:write-break/disp8
<span id="L89" class="LineNr"> 89 </span> 74/jump-if-= $write-int32-decimal:write-break/disp8
<span id="L90" class="LineNr"> 90 </span> <span class="subxComment"># if (curr &gt;= max) abort</span>
<span id="L91" class="LineNr"> 91 </span> 39/compare 3/mod/direct 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"># compare ecx with ebx</span>
<span id="L92" class="LineNr"> 92 </span> 73/jump-if-addr&gt;= $print-int32-decimal:abort/disp8
<span id="L93" class="LineNr"> 93 </span><span class="Constant">$print-int32-decimal:write-char</span>:
<span id="L92" class="LineNr"> 92 </span> 73/jump-if-addr&gt;= $write-int32-decimal:abort/disp8
<span id="L93" class="LineNr"> 93 </span><span class="Constant">$write-int32-decimal:write-char</span>:
<span id="L94" class="LineNr"> 94 </span> <span class="subxComment"># *curr = AL</span>
<span id="L95" class="LineNr"> 95 </span> 88/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy AL to byte at *ecx</span>
<span id="L96" class="LineNr"> 96 </span> <span class="subxComment"># ++curr</span>
<span id="L97" class="LineNr"> 97 </span> 41/increment-ecx
<span id="L98" class="LineNr"> 98 </span> <span class="subxComment"># ++w</span>
<span id="L99" class="LineNr"> 99 </span> 42/increment-edx
<span id="L100" class="LineNr">100 </span> eb/jump $print-int32-decimal:write-loop/disp8
<span id="L101" class="LineNr">101 </span><span class="Constant">$print-int32-decimal:write-break</span>:
<span id="L100" class="LineNr">100 </span> eb/jump $write-int32-decimal:write-loop/disp8
<span id="L101" class="LineNr">101 </span><span class="Constant">$write-int32-decimal:write-break</span>:
<span id="L102" class="LineNr">102 </span> <span class="subxComment"># out-&gt;write = w</span>
<span id="L103" class="LineNr">103 </span> 89/copy 0/mod/indirect 7/rm32/edi <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 edx to *edi</span>
<span id="L104" class="LineNr">104 </span><span class="Constant">$print-int32-decimal:end</span>:
<span id="L104" class="LineNr">104 </span><span class="Constant">$write-int32-decimal:end</span>:
<span id="L105" class="LineNr">105 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L106" class="LineNr">106 </span> 5f/pop-to-edi
<span id="L107" class="LineNr">107 </span> 5b/pop-to-ebx
@ -174,10 +176,10 @@ if ('onhashchange' in window) {
<span id="L113" class="LineNr">113 </span> 5d/pop-to-ebp
<span id="L114" class="LineNr">114 </span> c3/return
<span id="L115" class="LineNr">115 </span>
<span id="L116" class="LineNr">116 </span><span class="Constant">$print-int32-decimal:abort</span>:
<span id="L116" class="LineNr">116 </span><span class="Constant">$write-int32-decimal:abort</span>:
<span id="L117" class="LineNr">117 </span> <span class="subxS1Comment"># . _write(2/stderr, error)</span>
<span id="L118" class="LineNr">118 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L119" class="LineNr">119 </span> 68/push <span class="Constant">&quot;print-int32-decimal: out of space\n&quot;</span>/imm32
<span id="L119" class="LineNr">119 </span> 68/push <span class="Constant">&quot;write-int32-decimal: out of space\n&quot;</span>/imm32
<span id="L120" class="LineNr">120 </span> 68/push 2/imm32/stderr
<span id="L121" class="LineNr">121 </span> <span class="subxS2Comment"># . . call</span>
<span id="L122" class="LineNr">122 </span> e8/call <a href='050_write.subx.html#L12'>_write</a>/disp32
@ -188,7 +190,7 @@ if ('onhashchange' in window) {
<span id="L127" class="LineNr">127 </span> e8/call syscall_exit/disp32
<span id="L128" class="LineNr">128 </span> <span class="subxComment"># never gets here</span>
<span id="L129" class="LineNr">129 </span>
<span id="L130" class="LineNr">130 </span><span class="subxTest">test-print-int32-decimal</span>:
<span id="L130" class="LineNr">130 </span><span class="subxTest">test-write-int32-decimal</span>:
<span id="L131" class="LineNr">131 </span> <span class="subxH1Comment"># - check that a single-digit number converts correctly</span>
<span id="L132" class="LineNr">132 </span> <span class="subxComment"># setup</span>
<span id="L133" class="LineNr">133 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
@ -198,17 +200,17 @@ if ('onhashchange' in window) {
<span id="L137" class="LineNr">137 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L138" class="LineNr">138 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L139" class="LineNr">139 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L140" class="LineNr">140 </span> <span class="subxComment"># print-int32-decimal(_test-stream, 9)</span>
<span id="L140" class="LineNr">140 </span> <span class="subxComment"># write-int32-decimal(_test-stream, 9)</span>
<span id="L141" class="LineNr">141 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L142" class="LineNr">142 </span> 68/push 9/imm32
<span id="L143" class="LineNr">143 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L144" class="LineNr">144 </span> <span class="subxS2Comment"># . . call</span>
<span id="L145" class="LineNr">145 </span> e8/call <a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L145" class="LineNr">145 </span> e8/call <a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L146" class="LineNr">146 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L147" class="LineNr">147 </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="L148" class="LineNr">148 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;9&quot;, msg)</span>
<span id="L149" class="LineNr">149 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L150" class="LineNr">150 </span> 68/push <span class="Constant">&quot;F - test-print-int32-decimal&quot;</span>/imm32
<span id="L150" class="LineNr">150 </span> 68/push <span class="Constant">&quot;F - test-write-int32-decimal&quot;</span>/imm32
<span id="L151" class="LineNr">151 </span> 68/push <span class="Constant">&quot;9&quot;</span>/imm32
<span id="L152" class="LineNr">152 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L153" class="LineNr">153 </span> <span class="subxS2Comment"># . . call</span>
@ -218,7 +220,7 @@ if ('onhashchange' in window) {
<span id="L157" class="LineNr">157 </span> <span class="subxS1Comment"># . end</span>
<span id="L158" class="LineNr">158 </span> c3/return
<span id="L159" class="LineNr">159 </span>
<span id="L160" class="LineNr">160 </span><span class="subxTest">test-print-int32-decimal-zero</span>:
<span id="L160" class="LineNr">160 </span><span class="subxTest">test-write-int32-decimal-zero</span>:
<span id="L161" class="LineNr">161 </span> <span class="subxH1Comment"># - check that 0 converts correctly</span>
<span id="L162" class="LineNr">162 </span> <span class="subxComment"># setup</span>
<span id="L163" class="LineNr">163 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
@ -228,17 +230,17 @@ if ('onhashchange' in window) {
<span id="L167" class="LineNr">167 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L168" class="LineNr">168 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L169" class="LineNr">169 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L170" class="LineNr">170 </span> <span class="subxComment"># print-int32-decimal(_test-stream, 0)</span>
<span id="L170" class="LineNr">170 </span> <span class="subxComment"># write-int32-decimal(_test-stream, 0)</span>
<span id="L171" class="LineNr">171 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L172" class="LineNr">172 </span> 68/push 0/imm32
<span id="L173" class="LineNr">173 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L174" class="LineNr">174 </span> <span class="subxS2Comment"># . . call</span>
<span id="L175" class="LineNr">175 </span> e8/call <a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L175" class="LineNr">175 </span> e8/call <a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L176" class="LineNr">176 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L177" class="LineNr">177 </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="L178" class="LineNr">178 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0&quot;, msg)</span>
<span id="L179" class="LineNr">179 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L180" class="LineNr">180 </span> 68/push <span class="Constant">&quot;F - test-print-int32-decimal-zero&quot;</span>/imm32
<span id="L180" class="LineNr">180 </span> 68/push <span class="Constant">&quot;F - test-write-int32-decimal-zero&quot;</span>/imm32
<span id="L181" class="LineNr">181 </span> 68/push <span class="Constant">&quot;0&quot;</span>/imm32
<span id="L182" class="LineNr">182 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L183" class="LineNr">183 </span> <span class="subxS2Comment"># . . call</span>
@ -248,7 +250,7 @@ if ('onhashchange' in window) {
<span id="L187" class="LineNr">187 </span> <span class="subxS1Comment"># . end</span>
<span id="L188" class="LineNr">188 </span> c3/return
<span id="L189" class="LineNr">189 </span>
<span id="L190" class="LineNr">190 </span><span class="subxTest">test-print-int32-decimal-multiple-digits</span>:
<span id="L190" class="LineNr">190 </span><span class="subxTest">test-write-int32-decimal-multiple-digits</span>:
<span id="L191" class="LineNr">191 </span> <span class="subxH1Comment"># - check that a multi-digit number converts correctly</span>
<span id="L192" class="LineNr">192 </span> <span class="subxComment"># setup</span>
<span id="L193" class="LineNr">193 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
@ -258,17 +260,17 @@ if ('onhashchange' in window) {
<span id="L197" class="LineNr">197 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L198" class="LineNr">198 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L199" class="LineNr">199 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L200" class="LineNr">200 </span> <span class="subxComment"># print-int32-decimal(_test-stream, 10)</span>
<span id="L200" class="LineNr">200 </span> <span class="subxComment"># write-int32-decimal(_test-stream, 10)</span>
<span id="L201" class="LineNr">201 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L202" class="LineNr">202 </span> 68/push 0xa/imm32
<span id="L203" class="LineNr">203 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L204" class="LineNr">204 </span> <span class="subxS2Comment"># . . call</span>
<span id="L205" class="LineNr">205 </span> e8/call <a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L205" class="LineNr">205 </span> e8/call <a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L206" class="LineNr">206 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L207" class="LineNr">207 </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="L208" class="LineNr">208 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;10&quot;, msg)</span>
<span id="L209" class="LineNr">209 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L210" class="LineNr">210 </span> 68/push <span class="Constant">&quot;F - test-print-int32-decimal-multiple-digits&quot;</span>/imm32
<span id="L210" class="LineNr">210 </span> 68/push <span class="Constant">&quot;F - test-write-int32-decimal-multiple-digits&quot;</span>/imm32
<span id="L211" class="LineNr">211 </span> 68/push <span class="Constant">&quot;10&quot;</span>/imm32
<span id="L212" class="LineNr">212 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L213" class="LineNr">213 </span> <span class="subxS2Comment"># . . call</span>
@ -278,7 +280,7 @@ if ('onhashchange' in window) {
<span id="L217" class="LineNr">217 </span> <span class="subxS1Comment"># . end</span>
<span id="L218" class="LineNr">218 </span> c3/return
<span id="L219" class="LineNr">219 </span>
<span id="L220" class="LineNr">220 </span><span class="subxTest">test-print-int32-decimal-negative</span>:
<span id="L220" class="LineNr">220 </span><span class="subxTest">test-write-int32-decimal-negative</span>:
<span id="L221" class="LineNr">221 </span> <span class="subxH1Comment"># - check that a negative single-digit number converts correctly</span>
<span id="L222" class="LineNr">222 </span> <span class="subxComment"># setup</span>
<span id="L223" class="LineNr">223 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
@ -288,18 +290,18 @@ if ('onhashchange' in window) {
<span id="L227" class="LineNr">227 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L228" class="LineNr">228 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L229" class="LineNr">229 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L230" class="LineNr">230 </span> <span class="subxComment"># print-int32-decimal(_test-stream, -9)</span>
<span id="L230" class="LineNr">230 </span> <span class="subxComment"># write-int32-decimal(_test-stream, -9)</span>
<span id="L231" class="LineNr">231 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L232" class="LineNr">232 </span> 68/push -9/imm32
<span id="L233" class="LineNr">233 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L234" class="LineNr">234 </span> <span class="subxS2Comment"># . . call</span>
<span id="L235" class="LineNr">235 </span> e8/call <a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L235" class="LineNr">235 </span> e8/call <a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L236" class="LineNr">236 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L237" class="LineNr">237 </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="L238" class="Folded">238 </span><span class="Folded">+-- 26 lines: #? # dump _test-stream ------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L264" class="LineNr">264 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;-9&quot;, msg)</span>
<span id="L265" class="LineNr">265 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L266" class="LineNr">266 </span> 68/push <span class="Constant">&quot;F - test-print-int32-decimal-negative&quot;</span>/imm32
<span id="L266" class="LineNr">266 </span> 68/push <span class="Constant">&quot;F - test-write-int32-decimal-negative&quot;</span>/imm32
<span id="L267" class="LineNr">267 </span> 68/push <span class="Constant">&quot;-9&quot;</span>/imm32
<span id="L268" class="LineNr">268 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L269" class="LineNr">269 </span> <span class="subxS2Comment"># . . call</span>
@ -309,7 +311,7 @@ if ('onhashchange' in window) {
<span id="L273" class="LineNr">273 </span> <span class="subxS1Comment"># . end</span>
<span id="L274" class="LineNr">274 </span> c3/return
<span id="L275" class="LineNr">275 </span>
<span id="L276" class="LineNr">276 </span><span class="subxTest">test-print-int32-decimal-negative-multiple-digits</span>:
<span id="L276" class="LineNr">276 </span><span class="subxTest">test-write-int32-decimal-negative-multiple-digits</span>:
<span id="L277" class="LineNr">277 </span> <span class="subxH1Comment"># - check that a multi-digit number converts correctly</span>
<span id="L278" class="LineNr">278 </span> <span class="subxComment"># setup</span>
<span id="L279" class="LineNr">279 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span>
@ -319,17 +321,17 @@ if ('onhashchange' in window) {
<span id="L283" class="LineNr">283 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32
<span id="L284" class="LineNr">284 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L285" class="LineNr">285 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L286" class="LineNr">286 </span> <span class="subxComment"># print-int32-decimal(_test-stream, -10)</span>
<span id="L286" class="LineNr">286 </span> <span class="subxComment"># write-int32-decimal(_test-stream, -10)</span>
<span id="L287" class="LineNr">287 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L288" class="LineNr">288 </span> 68/push -0xa/imm32
<span id="L289" class="LineNr">289 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L290" class="LineNr">290 </span> <span class="subxS2Comment"># . . call</span>
<span id="L291" class="LineNr">291 </span> e8/call <a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L291" class="LineNr">291 </span> e8/call <a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L292" class="LineNr">292 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L293" class="LineNr">293 </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="L294" class="LineNr">294 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;-10&quot;, msg)</span>
<span id="L295" class="LineNr">295 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L296" class="LineNr">296 </span> 68/push <span class="Constant">&quot;F - test-print-int32-decimal-negative-multiple-digits&quot;</span>/imm32
<span id="L296" class="LineNr">296 </span> 68/push <span class="Constant">&quot;F - test-write-int32-decimal-negative-multiple-digits&quot;</span>/imm32
<span id="L297" class="LineNr">297 </span> 68/push <span class="Constant">&quot;-10&quot;</span>/imm32
<span id="L298" class="LineNr">298 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32
<span id="L299" class="LineNr">299 </span> <span class="subxS2Comment"># . . call</span>
@ -370,7 +372,7 @@ if ('onhashchange' in window) {
<span id="L334" class="LineNr">334 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L335" class="LineNr">335 </span> 68/push 0x2f/imm32
<span id="L336" class="LineNr">336 </span> <span class="subxS2Comment"># . . call</span>
<span id="L337" class="LineNr">337 </span> e8/call <a href='075print-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L337" class="LineNr">337 </span> e8/call <a href='075write-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L338" class="LineNr">338 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L339" class="LineNr">339 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L340" class="LineNr">340 </span> <span class="subxComment"># check-ints-equal(eax, 0, msg)</span>
@ -389,7 +391,7 @@ if ('onhashchange' in window) {
<span id="L353" class="LineNr">353 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L354" class="LineNr">354 </span> 68/push 0x30/imm32
<span id="L355" class="LineNr">355 </span> <span class="subxS2Comment"># . . call</span>
<span id="L356" class="LineNr">356 </span> e8/call <a href='075print-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L356" class="LineNr">356 </span> e8/call <a href='075write-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L357" class="LineNr">357 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L358" class="LineNr">358 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L359" class="LineNr">359 </span> <span class="subxComment"># check-ints-equal(eax, 1, msg)</span>
@ -405,7 +407,7 @@ if ('onhashchange' in window) {
<span id="L369" class="LineNr">369 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L370" class="LineNr">370 </span> 68/push 0x39/imm32
<span id="L371" class="LineNr">371 </span> <span class="subxS2Comment"># . . call</span>
<span id="L372" class="LineNr">372 </span> e8/call <a href='075print-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L372" class="LineNr">372 </span> e8/call <a href='075write-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L373" class="LineNr">373 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L374" class="LineNr">374 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L375" class="LineNr">375 </span> <span class="subxComment"># check-ints-equal(eax, 1, msg)</span>
@ -424,7 +426,7 @@ if ('onhashchange' in window) {
<span id="L388" class="LineNr">388 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L389" class="LineNr">389 </span> 68/push 0x3a/imm32
<span id="L390" class="LineNr">390 </span> <span class="subxS2Comment"># . . call</span>
<span id="L391" class="LineNr">391 </span> e8/call <a href='075print-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L391" class="LineNr">391 </span> e8/call <a href='075write-int-decimal.subx.html#L306'>is-decimal-digit?</a>/disp32
<span id="L392" class="LineNr">392 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L393" class="LineNr">393 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L394" class="LineNr">394 </span> <span class="subxComment"># check-ints-equal(eax, 0, msg)</span>
@ -438,7 +440,68 @@ if ('onhashchange' in window) {
<span id="L402" class="LineNr">402 </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> 0xc/imm32 <span class="subxComment"># add to esp</span>
<span id="L403" class="LineNr">403 </span> c3/return
<span id="L404" class="LineNr">404 </span>
<span id="L405" class="LineNr">405 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span>
<span id="L405" class="LineNr">405 </span><span class="subxFunction">to-decimal-digit</span>: <span class="subxComment"># in: byte -&gt; out/eax: int</span>
<span id="L406" class="LineNr">406 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L407" class="LineNr">407 </span> 55/push-ebp
<span id="L408" class="LineNr">408 </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="L409" class="LineNr">409 </span> <span class="subxComment"># eax = in</span>
<span id="L410" class="LineNr">410 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to eax</span>
<span id="L411" class="LineNr">411 </span><span class="Constant">$to-decimal-digit:check0</span>:
<span id="L412" class="LineNr">412 </span> <span class="subxComment"># if (eax &lt; '0') goto abort</span>
<span id="L413" class="LineNr">413 </span> 3d/compare-eax-with 0x30/imm32/0
<span id="L414" class="LineNr">414 </span> 7c/jump-if-&lt; $to-decimal-digit:abort/disp8
<span id="L415" class="LineNr">415 </span><span class="Constant">$to-decimal-digit:check1</span>:
<span id="L416" class="LineNr">416 </span> <span class="subxComment"># if (eax &gt; '9') goto abort</span>
<span id="L417" class="LineNr">417 </span> 3d/compare-eax-with 0x39/imm32/f
<span id="L418" class="LineNr">418 </span> 7f/jump-if-&gt; $to-decimal-digit:abort/disp8
<span id="L419" class="LineNr">419 </span><span class="Constant">$to-decimal-digit:digit</span>:
<span id="L420" class="LineNr">420 </span> <span class="subxComment"># return eax - '0'</span>
<span id="L421" class="LineNr">421 </span> 2d/subtract-from-eax 0x30/imm32/0
<span id="L422" class="LineNr">422 </span><span class="Constant">$to-decimal-digit:end</span>:
<span id="L423" class="LineNr">423 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L424" class="LineNr">424 </span> 89/copy 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ebp to esp</span>
<span id="L425" class="LineNr">425 </span> 5d/pop-to-ebp
<span id="L426" class="LineNr">426 </span> c3/return
<span id="L427" class="LineNr">427 </span>
<span id="L428" class="LineNr">428 </span><span class="Constant">$to-decimal-digit:abort</span>:
<span id="L429" class="LineNr">429 </span> <span class="subxS1Comment"># . write-buffered(stderr, error)</span>
<span id="L430" class="LineNr">430 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L431" class="LineNr">431 </span> 68/push <span class="Constant">&quot;to-decimal-digit: not a digit character: &quot;</span>/imm32
<span id="L432" class="LineNr">432 </span> 68/push <span class="SpecialChar"><a href='065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L433" class="LineNr">433 </span> <span class="subxS2Comment"># . . call</span>
<span id="L434" class="LineNr">434 </span> e8/call <a href='065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L435" class="LineNr">435 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L436" class="LineNr">436 </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="L437" class="LineNr">437 </span> <span class="subxS1Comment"># . write-byte-buffered(stderr, %eax)</span>
<span id="L438" class="LineNr">438 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L439" class="LineNr">439 </span> 50/push-eax
<span id="L440" class="LineNr">440 </span> 68/push <span class="SpecialChar"><a href='065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L441" class="LineNr">441 </span> <span class="subxS2Comment"># . . call</span>
<span id="L442" class="LineNr">442 </span><span class="CommentedCode">#? e8/call write-byte-buffered/disp32</span>
<span id="L443" class="LineNr">443 </span> e8/call <a href='066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L444" class="LineNr">444 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L445" class="LineNr">445 </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="L446" class="LineNr">446 </span> <span class="subxS1Comment"># . write-buffered(stderr, &quot;\n&quot;)</span>
<span id="L447" class="LineNr">447 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L448" class="LineNr">448 </span> 68/push <span class="SpecialChar"><a href='051test.subx.html#L82'>Newline</a></span>/imm32
<span id="L449" class="LineNr">449 </span> 68/push <span class="SpecialChar"><a href='065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L450" class="LineNr">450 </span> <span class="subxS2Comment"># . . call</span>
<span id="L451" class="LineNr">451 </span> e8/call <a href='065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L452" class="LineNr">452 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L453" class="LineNr">453 </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="L454" class="LineNr">454 </span> <span class="subxS1Comment"># . flush(Stderr)</span>
<span id="L455" class="LineNr">455 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L456" class="LineNr">456 </span> 68/push <span class="SpecialChar"><a href='065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L457" class="LineNr">457 </span> <span class="subxS2Comment"># . . call</span>
<span id="L458" class="LineNr">458 </span> e8/call <a href='064write-byte.subx.html#L81'>flush</a>/disp32
<span id="L459" class="LineNr">459 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L460" class="LineNr">460 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L461" class="LineNr">461 </span> <span class="subxS1Comment"># . syscall(exit, 1)</span>
<span id="L462" class="LineNr">462 </span> bb/copy-to-ebx 1/imm32
<span id="L463" class="LineNr">463 </span> e8/call syscall_exit/disp32
<span id="L464" class="LineNr">464 </span> <span class="subxComment"># never gets here</span>
<span id="L465" class="LineNr">465 </span>
<span id="L466" class="LineNr">466 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span>
</pre>
</body>
</html>

View File

@ -85,12 +85,12 @@ if ('onhashchange' in window) {
<span id="L26" class="LineNr"> 26 </span> <span class="subxComment"># if (curr &gt;= width) break</span>
<span id="L27" class="LineNr"> 27 </span> 39/compare 3/mod/direct 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"># compare ecx with edx</span>
<span id="L28" class="LineNr"> 28 </span> 7d/jump-if-&gt;= $emit-hex:end/disp8
<span id="L29" class="LineNr"> 29 </span> <span class="subxComment"># print-byte-buffered(out, ebx) # only BL used</span>
<span id="L29" class="LineNr"> 29 </span> <span class="subxComment"># write-byte-hex-buffered(out, ebx) # only BL used</span>
<span id="L30" class="LineNr"> 30 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L31" class="LineNr"> 31 </span> 53/push-ebx
<span id="L32" class="LineNr"> 32 </span> 57/push-edi
<span id="L33" class="LineNr"> 33 </span> <span class="subxS2Comment"># . . call</span>
<span id="L34" class="LineNr"> 34 </span> e8/call <a href='066print-int.subx.html#L93'>print-byte-buffered</a>/disp32
<span id="L34" class="LineNr"> 34 </span> e8/call <a href='066write-int-hex.subx.html#L93'>write-byte-hex-buffered</a>/disp32
<span id="L35" class="LineNr"> 35 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L36" class="LineNr"> 36 </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="L37" class="LineNr"> 37 </span> <span class="subxComment"># write-byte-buffered(out, ' ')</span>

View File

@ -58,7 +58,7 @@ if ('onhashchange' in window) {
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/091write-int.subx'>https://github.com/akkartik/mu/blob/master/091write-int.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># write-int: add a single int to a stream</span>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># write-int: add (the binary representation of) a single int to a stream</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span>== code
<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># instruction effective address register displacement immediate</span>

View File

@ -146,7 +146,7 @@ if ('onhashchange' in window) {
<span id="L88" class="LineNr"> 88 </span> c3/return
<span id="L89" class="LineNr"> 89 </span>
<span id="L90" class="LineNr"> 90 </span><span class="subxComment"># row and col count from the top-left as (1, 1)</span>
<span id="L91" class="LineNr"> 91 </span><span class="subxFunction">move-cursor</span>: <span class="subxComment"># row: int, column: int</span>
<span id="L91" class="LineNr"> 91 </span><span class="subxFunction">move-cursor-on-screen</span>: <span class="subxComment"># row: int, column: int</span>
<span id="L92" class="LineNr"> 92 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L93" class="LineNr"> 93 </span> 55/push-ebp
<span id="L94" class="LineNr"> 94 </span> 89/&lt;- %ebp 4/r32/esp
@ -161,13 +161,13 @@ if ('onhashchange' in window) {
<span id="L103" class="LineNr">103 </span> <span class="subxComment"># construct directive in buf</span>
<span id="L104" class="LineNr">104 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L105" class="LineNr">105 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;[&quot;</span>)
<span id="L106" class="LineNr">106 </span> (<a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a> %ecx *(ebp+8))
<span id="L106" class="LineNr">106 </span> (<a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a> %ecx *(ebp+8))
<span id="L107" class="LineNr">107 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;;&quot;</span>)
<span id="L108" class="LineNr">108 </span> (<a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a> %ecx *(ebp+0xc))
<span id="L108" class="LineNr">108 </span> (<a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a> %ecx *(ebp+0xc))
<span id="L109" class="LineNr">109 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;H&quot;</span>)
<span id="L110" class="LineNr">110 </span> <span class="subxComment"># flush</span>
<span id="L111" class="LineNr">111 </span> (<a href='062write-stream.subx.html#L17'>write-stream</a> 2 %ecx)
<span id="L112" class="LineNr">112 </span><span class="Constant">$move-cursor:end</span>:
<span id="L112" class="LineNr">112 </span><span class="Constant">$move-cursor-on-screen:end</span>:
<span id="L113" class="LineNr">113 </span> <span class="subxS1Comment"># . reclaim locals</span>
<span id="L114" class="LineNr">114 </span> 81 0/subop/add %esp 0x2c/imm32
<span id="L115" class="LineNr">115 </span> <span class="subxS1Comment"># . restore registers</span>
@ -177,20 +177,20 @@ if ('onhashchange' in window) {
<span id="L119" class="LineNr">119 </span> 5d/pop-to-ebp
<span id="L120" class="LineNr">120 </span> c3/return
<span id="L121" class="LineNr">121 </span>
<span id="L122" class="LineNr">122 </span><span class="subxFunction">print-string</span>: <span class="subxComment"># s: (addr array byte)</span>
<span id="L122" class="LineNr">122 </span><span class="subxFunction">print-string-to-screen</span>: <span class="subxComment"># s: (addr array byte)</span>
<span id="L123" class="LineNr">123 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L124" class="LineNr">124 </span> 55/push-ebp
<span id="L125" class="LineNr">125 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L126" class="LineNr">126 </span> <span class="subxComment">#</span>
<span id="L127" class="LineNr">127 </span> (<a href='057write.subx.html#L24'>write</a> 2 *(ebp+8))
<span id="L128" class="LineNr">128 </span><span class="Constant">$print-string:end</span>:
<span id="L128" class="LineNr">128 </span><span class="Constant">$print-string-to-screen:end</span>:
<span id="L129" class="LineNr">129 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L130" class="LineNr">130 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L131" class="LineNr">131 </span> 5d/pop-to-ebp
<span id="L132" class="LineNr">132 </span> c3/return
<span id="L133" class="LineNr">133 </span>
<span id="L134" class="LineNr">134 </span><span class="subxComment"># just because Mu has no support for global variables yet</span>
<span id="L135" class="LineNr">135 </span><span class="subxFunction">print-byte</span>: <span class="subxComment"># c: byte</span>
<span id="L135" class="LineNr">135 </span><span class="subxFunction">print-byte-to-screen</span>: <span class="subxComment"># c: byte</span>
<span id="L136" class="LineNr">136 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L137" class="LineNr">137 </span> 55/push-ebp
<span id="L138" class="LineNr">138 </span> 89/&lt;- %ebp 4/r32/esp
@ -201,7 +201,7 @@ if ('onhashchange' in window) {
<span id="L143" class="LineNr">143 </span> 68/push 4/imm32/size
<span id="L144" class="LineNr">144 </span> 89/&lt;- %ecx 4/r32/esp
<span id="L145" class="LineNr">145 </span> (<a href='057write.subx.html#L24'>write</a> 2 %ecx)
<span id="L146" class="LineNr">146 </span><span class="Constant">$print-byte:end</span>:
<span id="L146" class="LineNr">146 </span><span class="Constant">$print-byte-to-screen:end</span>:
<span id="L147" class="LineNr">147 </span> <span class="subxS1Comment"># . reclaim locals</span>
<span id="L148" class="LineNr">148 </span> 81 0/subop/add %esp 8/imm32
<span id="L149" class="LineNr">149 </span> <span class="subxS1Comment"># . restore registers</span>
@ -212,20 +212,20 @@ if ('onhashchange' in window) {
<span id="L154" class="LineNr">154 </span> c3/return
<span id="L155" class="LineNr">155 </span>
<span id="L156" class="LineNr">156 </span><span class="subxComment"># just because Mu has no support for global variables yet</span>
<span id="L157" class="LineNr">157 </span><span class="subxFunction">print-int32-to-screen</span>: <span class="subxComment"># n: int</span>
<span id="L157" class="LineNr">157 </span><span class="subxFunction">print-int32-hex-to-screen</span>: <span class="subxComment"># n: int</span>
<span id="L158" class="LineNr">158 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L159" class="LineNr">159 </span> 55/push-ebp
<span id="L160" class="LineNr">160 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L161" class="LineNr">161 </span> <span class="subxComment">#</span>
<span id="L162" class="LineNr">162 </span> (<a href='066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='064write-byte.subx.html#L10'>Stdout</a></span> *(ebp+8))
<span id="L162" class="LineNr">162 </span> (<a href='066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='064write-byte.subx.html#L10'>Stdout</a></span> *(ebp+8))
<span id="L163" class="LineNr">163 </span> (<a href='064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='064write-byte.subx.html#L10'>Stdout</a></span>)
<span id="L164" class="LineNr">164 </span><span class="Constant">$print-int32-to-screen:end</span>:
<span id="L164" class="LineNr">164 </span><span class="Constant">$print-int32-hex-to-screen:end</span>:
<span id="L165" class="LineNr">165 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L166" class="LineNr">166 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L167" class="LineNr">167 </span> 5d/pop-to-ebp
<span id="L168" class="LineNr">168 </span> c3/return
<span id="L169" class="LineNr">169 </span>
<span id="L170" class="LineNr">170 </span><span class="subxFunction">reset-formatting</span>:
<span id="L170" class="LineNr">170 </span><span class="subxFunction">reset-formatting-on-screen</span>:
<span id="L171" class="LineNr">171 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L172" class="LineNr">172 </span> 55/push-ebp
<span id="L173" class="LineNr">173 </span> 89/&lt;- %ebp 4/r32/esp
@ -234,13 +234,13 @@ if ('onhashchange' in window) {
<span id="L176" class="LineNr">176 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;(B&quot;</span>)
<span id="L177" class="LineNr">177 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L178" class="LineNr">178 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[m&quot;</span>)
<span id="L179" class="LineNr">179 </span><span class="Constant">$reset-formatting:end</span>:
<span id="L179" class="LineNr">179 </span><span class="Constant">$reset-formatting-on-screen:end</span>:
<span id="L180" class="LineNr">180 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L181" class="LineNr">181 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L182" class="LineNr">182 </span> 5d/pop-to-ebp
<span id="L183" class="LineNr">183 </span> c3/return
<span id="L184" class="LineNr">184 </span>
<span id="L185" class="LineNr">185 </span><span class="subxFunction">start-color</span>: <span class="subxComment"># fg: int, bg: int</span>
<span id="L185" class="LineNr">185 </span><span class="subxFunction">start-color-on-screen</span>: <span class="subxComment"># fg: int, bg: int</span>
<span id="L186" class="LineNr">186 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L187" class="LineNr">187 </span> 55/push-ebp
<span id="L188" class="LineNr">188 </span> 89/&lt;- %ebp 4/r32/esp
@ -256,16 +256,16 @@ if ('onhashchange' in window) {
<span id="L198" class="LineNr">198 </span> <span class="subxS1Comment"># . set fg</span>
<span id="L199" class="LineNr">199 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L200" class="LineNr">200 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;[38;5;&quot;</span>)
<span id="L201" class="LineNr">201 </span> (<a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a> %ecx *(ebp+8))
<span id="L201" class="LineNr">201 </span> (<a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a> %ecx *(ebp+8))
<span id="L202" class="LineNr">202 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;m&quot;</span>)
<span id="L203" class="LineNr">203 </span> <span class="subxS1Comment"># . set bg</span>
<span id="L204" class="LineNr">204 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L205" class="LineNr">205 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;[48;5;&quot;</span>)
<span id="L206" class="LineNr">206 </span> (<a href='075print-int-decimal.subx.html#L8'>print-int32-decimal</a> %ecx *(ebp+0xc))
<span id="L206" class="LineNr">206 </span> (<a href='075write-int-decimal.subx.html#L8'>write-int32-decimal</a> %ecx *(ebp+0xc))
<span id="L207" class="LineNr">207 </span> (<a href='057write.subx.html#L24'>write</a> %ecx <span class="Constant">&quot;m&quot;</span>)
<span id="L208" class="LineNr">208 </span> <span class="subxComment"># flush</span>
<span id="L209" class="LineNr">209 </span> (<a href='062write-stream.subx.html#L17'>write-stream</a> 2 %ecx)
<span id="L210" class="LineNr">210 </span><span class="Constant">$start-color:end</span>:
<span id="L210" class="LineNr">210 </span><span class="Constant">$start-color-on-screen:end</span>:
<span id="L211" class="LineNr">211 </span> <span class="subxS1Comment"># . reclaim locals</span>
<span id="L212" class="LineNr">212 </span> 81 0/subop/add %esp 0x2c/imm32
<span id="L213" class="LineNr">213 </span> <span class="subxS1Comment"># . restore registers</span>
@ -275,73 +275,73 @@ if ('onhashchange' in window) {
<span id="L217" class="LineNr">217 </span> 5d/pop-to-ebp
<span id="L218" class="LineNr">218 </span> c3/return
<span id="L219" class="LineNr">219 </span>
<span id="L220" class="LineNr">220 </span><span class="subxFunction">start-bold</span>:
<span id="L220" class="LineNr">220 </span><span class="subxFunction">start-bold-on-screen</span>:
<span id="L221" class="LineNr">221 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L222" class="LineNr">222 </span> 55/push-ebp
<span id="L223" class="LineNr">223 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L224" class="LineNr">224 </span> <span class="subxComment">#</span>
<span id="L225" class="LineNr">225 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L226" class="LineNr">226 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[1m&quot;</span>)
<span id="L227" class="LineNr">227 </span><span class="Constant">$start-bold:end</span>:
<span id="L227" class="LineNr">227 </span><span class="Constant">$start-bold-on-screen:end</span>:
<span id="L228" class="LineNr">228 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L229" class="LineNr">229 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L230" class="LineNr">230 </span> 5d/pop-to-ebp
<span id="L231" class="LineNr">231 </span> c3/return
<span id="L232" class="LineNr">232 </span>
<span id="L233" class="LineNr">233 </span><span class="subxFunction">start-underline</span>:
<span id="L233" class="LineNr">233 </span><span class="subxFunction">start-underline-on-screen</span>:
<span id="L234" class="LineNr">234 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L235" class="LineNr">235 </span> 55/push-ebp
<span id="L236" class="LineNr">236 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L237" class="LineNr">237 </span> <span class="subxComment">#</span>
<span id="L238" class="LineNr">238 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L239" class="LineNr">239 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[4m&quot;</span>)
<span id="L240" class="LineNr">240 </span><span class="Constant">$start-underline:end</span>:
<span id="L240" class="LineNr">240 </span><span class="Constant">$start-underline-on-screen:end</span>:
<span id="L241" class="LineNr">241 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L242" class="LineNr">242 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L243" class="LineNr">243 </span> 5d/pop-to-ebp
<span id="L244" class="LineNr">244 </span> c3/return
<span id="L245" class="LineNr">245 </span>
<span id="L246" class="LineNr">246 </span><span class="subxFunction">start-reverse-video</span>:
<span id="L246" class="LineNr">246 </span><span class="subxFunction">start-reverse-video-on-screen</span>:
<span id="L247" class="LineNr">247 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L248" class="LineNr">248 </span> 55/push-ebp
<span id="L249" class="LineNr">249 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L250" class="LineNr">250 </span> <span class="subxComment">#</span>
<span id="L251" class="LineNr">251 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L252" class="LineNr">252 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[7m&quot;</span>)
<span id="L253" class="LineNr">253 </span><span class="Constant">$start-reverse-video:end</span>:
<span id="L253" class="LineNr">253 </span><span class="Constant">$start-reverse-video-on-screen:end</span>:
<span id="L254" class="LineNr">254 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L255" class="LineNr">255 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L256" class="LineNr">256 </span> 5d/pop-to-ebp
<span id="L257" class="LineNr">257 </span> c3/return
<span id="L258" class="LineNr">258 </span>
<span id="L259" class="LineNr">259 </span><span class="subxComment"># might require enabling blinking in your terminal program</span>
<span id="L260" class="LineNr">260 </span><span class="subxFunction">start-blinking</span>:
<span id="L260" class="LineNr">260 </span><span class="subxFunction">start-blinking-on-screen</span>:
<span id="L261" class="LineNr">261 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L262" class="LineNr">262 </span> 55/push-ebp
<span id="L263" class="LineNr">263 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L264" class="LineNr">264 </span> <span class="subxComment">#</span>
<span id="L265" class="LineNr">265 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L266" class="LineNr">266 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[5m&quot;</span>)
<span id="L267" class="LineNr">267 </span><span class="Constant">$start-blinking:end</span>:
<span id="L267" class="LineNr">267 </span><span class="Constant">$start-blinking-on-screen:end</span>:
<span id="L268" class="LineNr">268 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L269" class="LineNr">269 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L270" class="LineNr">270 </span> 5d/pop-to-ebp
<span id="L271" class="LineNr">271 </span> c3/return
<span id="L272" class="LineNr">272 </span>
<span id="L273" class="LineNr">273 </span><span class="subxFunction">hide-cursor</span>:
<span id="L273" class="LineNr">273 </span><span class="subxFunction">hide-cursor-on-screen</span>:
<span id="L274" class="LineNr">274 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L275" class="LineNr">275 </span> 55/push-ebp
<span id="L276" class="LineNr">276 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L277" class="LineNr">277 </span> <span class="subxComment">#</span>
<span id="L278" class="LineNr">278 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L279" class="LineNr">279 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[?25l&quot;</span>)
<span id="L280" class="LineNr">280 </span><span class="Constant">$hide-cursor:end</span>:
<span id="L280" class="LineNr">280 </span><span class="Constant">$hide-cursor-on-screen:end</span>:
<span id="L281" class="LineNr">281 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L282" class="LineNr">282 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L283" class="LineNr">283 </span> 5d/pop-to-ebp
<span id="L284" class="LineNr">284 </span> c3/return
<span id="L285" class="LineNr">285 </span>
<span id="L286" class="LineNr">286 </span><span class="subxFunction">show-cursor</span>:
<span id="L286" class="LineNr">286 </span><span class="subxFunction">show-cursor-on-screen</span>:
<span id="L287" class="LineNr">287 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L288" class="LineNr">288 </span> 55/push-ebp
<span id="L289" class="LineNr">289 </span> 89/&lt;- %ebp 4/r32/esp
@ -350,7 +350,7 @@ if ('onhashchange' in window) {
<span id="L292" class="LineNr">292 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[?12l&quot;</span>)
<span id="L293" class="LineNr">293 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="SpecialChar"><a href='103screen.subx.html#L330'>Esc</a></span>)
<span id="L294" class="LineNr">294 </span> (<a href='057write.subx.html#L24'>write</a> 2 <span class="Constant">&quot;[?25h&quot;</span>)
<span id="L295" class="LineNr">295 </span><span class="Constant">$show-cursor:end</span>:
<span id="L295" class="LineNr">295 </span><span class="Constant">$show-cursor-on-screen:end</span>:
<span id="L296" class="LineNr">296 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L297" class="LineNr">297 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L298" class="LineNr">298 </span> 5d/pop-to-ebp

View File

@ -85,26 +85,26 @@ if ('onhashchange' in window) {
<span id="L27" class="LineNr"> 27 </span> e8/call syscall_ioctl/disp32
<span id="L28" class="LineNr"> 28 </span> <span class="subxComment"># terminal-info-&gt;c_iflags &amp;= Keyboard-immediate-mode-iflags</span>
<span id="L29" class="LineNr"> 29 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;iflags before: &quot;)</span>
<span id="L30" class="LineNr"> 30 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *esi)</span>
<span id="L30" class="LineNr"> 30 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *esi)</span>
<span id="L31" class="LineNr"> 31 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L33" class="LineNr"> 33 </span> 8b/-&gt; *esi 0/r32/eax <span class="subxComment"># Termios-c_iflag</span>
<span id="L34" class="LineNr"> 34 </span> 23/and *<span class="SpecialChar"><a href='104keyboard.subx.html#L184'>Keyboard-immediate-mode-iflags</a></span> 0/r32/eax
<span id="L35" class="LineNr"> 35 </span> 89/&lt;- *esi 0/r32/eax <span class="subxComment"># Termios-c_iflag</span>
<span id="L36" class="LineNr"> 36 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;iflags after: &quot;)</span>
<span id="L37" class="LineNr"> 37 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *esi)</span>
<span id="L37" class="LineNr"> 37 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *esi)</span>
<span id="L38" class="LineNr"> 38 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L39" class="LineNr"> 39 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L40" class="LineNr"> 40 </span> <span class="subxComment"># terminal-info-&gt;c_lflags &amp;= Keyboard-immediate-mode-lflags</span>
<span id="L41" class="LineNr"> 41 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;lflags before: &quot;)</span>
<span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(esi+0xc))</span>
<span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(esi+0xc))</span>
<span id="L43" class="LineNr"> 43 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L44" class="LineNr"> 44 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L45" class="LineNr"> 45 </span> 8b/-&gt; *(esi+0xc) 0/r32/eax <span class="subxComment"># Termios-c_lflag</span>
<span id="L46" class="LineNr"> 46 </span> 23/and *<span class="SpecialChar"><a href='104keyboard.subx.html#L188'>Keyboard-immediate-mode-lflags</a></span> 0/r32/eax
<span id="L47" class="LineNr"> 47 </span> 89/&lt;- *(esi+0xc) 0/r32/eax <span class="subxComment"># Termios-c_lflag</span>
<span id="L48" class="LineNr"> 48 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;lflags after: &quot;)</span>
<span id="L49" class="LineNr"> 49 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(esi+0xc))</span>
<span id="L49" class="LineNr"> 49 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(esi+0xc))</span>
<span id="L50" class="LineNr"> 50 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L51" class="LineNr"> 51 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># ioctl(*Terminal-file-descriptor, TCSETS, terminal-info)</span>

77
html/106size.subx.html generated Normal file
View File

@ -0,0 +1,77 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 106size.subx</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="minimal-light">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #c6c6c6; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.subxComment { color: #005faf; }
.subxFunction { color: #af5f00; text-decoration: underline; }
.LineNr { }
.subxS1Comment { color: #0000af; }
.Constant { color: #008787; }
-->
</style>
<script type='text/javascript'>
<!--
/* function to open any folds containing a jumped-to line before jumping to it */
function JumpToLine()
{
var lineNum;
lineNum = window.location.hash;
lineNum = lineNum.substr(1); /* strip off '#' */
if (lineNum.indexOf('L') == -1) {
lineNum = 'L'+lineNum;
}
var lineElem = document.getElementById(lineNum);
/* Always jump to new location even if the line was hidden inside a fold, or
* we corrected the raw number to a line ID.
*/
if (lineElem) {
lineElem.scrollIntoView(true);
}
return true;
}
if ('onhashchange' in window) {
window.onhashchange = JumpToLine;
}
-->
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/106size.subx'>https://github.com/akkartik/mu/blob/master/106size.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Size of an array in bytes.</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span>== code
<span id="L4" class="LineNr"> 4 </span>
<span id="L5" class="LineNr"> 5 </span><span class="subxFunction">size</span>: <span class="subxComment"># in: (addr array _) -&gt; result/eax: int</span>
<span id="L6" class="LineNr"> 6 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L7" class="LineNr"> 7 </span> 55/push-ebp
<span id="L8" class="LineNr"> 8 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L9" class="LineNr"> 9 </span> <span class="subxComment"># eax = in</span>
<span id="L10" class="LineNr">10 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L11" class="LineNr">11 </span> <span class="subxComment">#</span>
<span id="L12" class="LineNr">12 </span> 8b/-&gt; *eax 0/r32/eax
<span id="L13" class="LineNr">13 </span><span class="Constant">$size:end</span>:
<span id="L14" class="LineNr">14 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L15" class="LineNr">15 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L16" class="LineNr">16 </span> 5d/pop-to-ebp
<span id="L17" class="LineNr">17 </span> c3/return
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -94,19 +94,19 @@ if ('onhashchange' in window) {
<span id="L35" class="LineNr"> 35 </span><span class="PreProc">fn</span> <span class="muFunction">main</span><span class="PreProc"> -&gt; </span>exit-status/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">var</span> look/<span class="Constant">esi</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span> <span class="Comment"># lookahead</span>
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">var</span> n/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span> <span class="Comment"># result of each expression</span>
<span id="L38" class="LineNr"> 38 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;press ctrl-c or ctrl-d to exit\n&quot;</span>
<span id="L38" class="LineNr"> 38 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;press ctrl-c or ctrl-d to exit\n&quot;</span>
<span id="L39" class="LineNr"> 39 </span> <span class="Comment"># read-eval-print loop</span>
<span id="L40" class="LineNr"> 40 </span> <span class="Delimiter">{</span>
<span id="L41" class="LineNr"> 41 </span> <span class="Comment"># print prompt</span>
<span id="L42" class="LineNr"> 42 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;&gt; &quot;</span>
<span id="L42" class="LineNr"> 42 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;&gt; &quot;</span>
<span id="L43" class="LineNr"> 43 </span> <span class="Comment"># read and eval</span>
<span id="L44" class="LineNr"> 44 </span> n, look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L57'>simplify</a> <span class="Comment"># we explicitly thread 'look' everywhere</span>
<span id="L45" class="LineNr"> 45 </span> <span class="Comment"># if (look == 0) break</span>
<span id="L46" class="LineNr"> 46 </span> compare look, <span class="Constant">0</span>
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">break-if-=</span>
<span id="L48" class="LineNr"> 48 </span> <span class="Comment"># print</span>
<span id="L49" class="LineNr"> 49 </span> <a href='../103screen.subx.html#L157'>print-int32-to-screen</a> n
<span id="L50" class="LineNr"> 50 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;\n&quot;</span>
<span id="L49" class="LineNr"> 49 </span> print-int32-to-screen n
<span id="L50" class="LineNr"> 50 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;\n&quot;</span>
<span id="L51" class="LineNr"> 51 </span> <span class="Comment">#</span>
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">loop</span>
<span id="L53" class="LineNr"> 53 </span> <span class="Delimiter">}</span>
@ -115,7 +115,7 @@ if ('onhashchange' in window) {
<span id="L56" class="LineNr"> 56 </span>
<span id="L57" class="LineNr"> 57 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='arith.mu.html#L57'>simplify</a></span><span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: int, look/<span class="Constant">esi</span>: byte <span class="Delimiter">{</span>
<span id="L58" class="LineNr"> 58 </span> <span class="Comment"># prime the pump</span>
<span id="L59" class="LineNr"> 59 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a> <span class="Comment"># prime the pump</span>
<span id="L59" class="LineNr"> 59 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a>
<span id="L60" class="LineNr"> 60 </span> <span class="Comment"># do it</span>
<span id="L61" class="LineNr"> 61 </span> result, look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L64'>expression</a> look
<span id="L62" class="LineNr"> 62 </span><span class="Delimiter">}</span>
@ -218,14 +218,14 @@ if ('onhashchange' in window) {
<span id="L159" class="LineNr">159 </span> <span class="PreProc">break</span> $factor:body
<span id="L160" class="LineNr">160 </span> <span class="Delimiter">}</span>
<span id="L161" class="LineNr">161 </span> <span class="Comment"># otherwise recurse</span>
<span id="L162" class="LineNr">162 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a> look <span class="Comment"># '('</span>
<span id="L162" class="LineNr">162 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a> <span class="Comment"># '('</span>
<span id="L163" class="LineNr">163 </span> result, look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L64'>expression</a> look
<span id="L164" class="LineNr">164 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L236'>skip-spaces</a> look
<span id="L165" class="LineNr">165 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a> look <span class="Comment"># ')'</span>
<span id="L165" class="LineNr">165 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a> <span class="Comment"># ')'</span>
<span id="L166" class="LineNr">166 </span><span class="Delimiter">}</span> <span class="Comment"># $factor:body</span>
<span id="L167" class="LineNr">167 </span><span class="Delimiter">}</span>
<span id="L168" class="LineNr">168 </span>
<span id="L169" class="LineNr">169 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='arith.mu.html#L169'>is-mul-or-div?</a></span> c: byte<span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: bool <span class="Delimiter">{</span>
<span id="L169" class="LineNr">169 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='arith.mu.html#L169'>is-mul-or-div?</a></span> c: byte<span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: boolean <span class="Delimiter">{</span>
<span id="L170" class="LineNr">170 </span>$is-mul-or-div?:body: <span class="Delimiter">{</span>
<span id="L171" class="LineNr">171 </span> compare c, <span class="Constant">0x2a</span> <span class="Comment"># '*'</span>
<span id="L172" class="LineNr">172 </span> <span class="Delimiter">{</span>
@ -243,7 +243,7 @@ if ('onhashchange' in window) {
<span id="L184" class="LineNr">184 </span><span class="Delimiter">}</span> <span class="Comment"># $is-mul-or-div?:body</span>
<span id="L185" class="LineNr">185 </span><span class="Delimiter">}</span>
<span id="L186" class="LineNr">186 </span>
<span id="L187" class="LineNr">187 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='arith.mu.html#L187'>is-add-or-sub?</a></span> c: byte<span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: bool <span class="Delimiter">{</span>
<span id="L187" class="LineNr">187 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='arith.mu.html#L187'>is-add-or-sub?</a></span> c: byte<span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: boolean <span class="Delimiter">{</span>
<span id="L188" class="LineNr">188 </span>$is-add-or-sub?:body: <span class="Delimiter">{</span>
<span id="L189" class="LineNr">189 </span> compare c, <span class="Constant">0x2b</span> <span class="Comment"># '+'</span>
<span id="L190" class="LineNr">190 </span> <span class="Delimiter">{</span>
@ -270,13 +270,13 @@ if ('onhashchange' in window) {
<span id="L211" class="LineNr">211 </span> look <span class="SpecialChar">&lt;-</span> copy _look <span class="Comment"># should be a no-op</span>
<span id="L212" class="LineNr">212 </span> <span class="PreProc">var</span> out/<span class="Constant">edi</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L213" class="LineNr">213 </span> <span class="Delimiter">{</span>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">var</span> first-digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075print-int-decimal.subx.html#L405'>to-decimal-digit</a> look
<span id="L214" class="LineNr">214 </span> <span class="PreProc">var</span> first-digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075write-int-decimal.subx.html#L405'>to-decimal-digit</a> look
<span id="L215" class="LineNr">215 </span> out <span class="SpecialChar">&lt;-</span> copy first-digit
<span id="L216" class="LineNr">216 </span> <span class="Delimiter">}</span>
<span id="L217" class="LineNr">217 </span> <span class="Delimiter">{</span>
<span id="L218" class="LineNr">218 </span> look <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L246'>get-char</a>
<span id="L219" class="LineNr">219 </span> <span class="Comment"># done?</span>
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> digit?/<span class="Constant">eax</span>: bool <span class="SpecialChar">&lt;-</span> <a href='../075print-int-decimal.subx.html#L306'>is-decimal-digit?</a> look
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> digit?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../075write-int-decimal.subx.html#L306'>is-decimal-digit?</a> look
<span id="L221" class="LineNr">221 </span> compare digit?, <span class="Constant">0</span> <span class="Comment"># false</span>
<span id="L222" class="LineNr">222 </span> <span class="PreProc">break-if-=</span>
<span id="L223" class="LineNr">223 </span> <span class="Comment"># out *= 10</span>
@ -285,7 +285,7 @@ if ('onhashchange' in window) {
<span id="L226" class="LineNr">226 </span> out <span class="SpecialChar">&lt;-</span> multiply ten
<span id="L227" class="LineNr">227 </span> <span class="Delimiter">}</span>
<span id="L228" class="LineNr">228 </span> <span class="Comment"># out += digit(look)</span>
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075print-int-decimal.subx.html#L405'>to-decimal-digit</a> look
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075write-int-decimal.subx.html#L405'>to-decimal-digit</a> look
<span id="L230" class="LineNr">230 </span> out <span class="SpecialChar">&lt;-</span> add digit
<span id="L231" class="LineNr">231 </span> <span class="PreProc">loop</span>
<span id="L232" class="LineNr">232 </span> <span class="Delimiter">}</span>
@ -308,7 +308,7 @@ if ('onhashchange' in window) {
<span id="L249" class="LineNr">249 </span> compare look, <span class="Constant">0</span>
<span id="L250" class="LineNr">250 </span> <span class="Delimiter">{</span>
<span id="L251" class="LineNr">251 </span> <span class="PreProc">break-if-!=</span>
<span id="L252" class="LineNr">252 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;^D\n&quot;</span>
<span id="L252" class="LineNr">252 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;^D\n&quot;</span>
<span id="L253" class="LineNr">253 </span> syscall_exit
<span id="L254" class="LineNr">254 </span> <span class="Delimiter">}</span>
<span id="L255" class="LineNr">255 </span><span class="Delimiter">}</span>

View File

@ -218,7 +218,7 @@ if ('onhashchange' in window) {
<span id="L159" class="LineNr">159 </span><span class="Constant">$subx-braces:emit-curly-open</span>:
<span id="L160" class="LineNr">160 </span> <span class="subxComment"># print(out, &quot;_loop&quot; next-label-id &quot;:&quot;)</span>
<span id="L161" class="LineNr">161 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;_loop&quot;</span>)
<span id="L162" class="LineNr">162 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) %ebx)
<span id="L162" class="LineNr">162 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) %ebx)
<span id="L163" class="LineNr">163 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;:&quot;</span>)
<span id="L164" class="LineNr">164 </span> <span class="subxComment"># push(label-stack, next-label-id)</span>
<span id="L165" class="LineNr">165 </span> (<a href='../092stack.subx.html#L114'>push</a> %edx %ebx)
@ -235,7 +235,7 @@ if ('onhashchange' in window) {
<span id="L176" class="LineNr">176 </span> (<a href='../092stack.subx.html#L234'>pop</a> %edx)
<span id="L177" class="LineNr">177 </span> <span class="subxComment"># print(out, &quot;_break&quot; eax &quot;:&quot;)</span>
<span id="L178" class="LineNr">178 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;_break&quot;</span>)
<span id="L179" class="LineNr">179 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) %eax)
<span id="L179" class="LineNr">179 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) %eax)
<span id="L180" class="LineNr">180 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;:&quot;</span>)
<span id="L181" class="LineNr">181 </span> <span class="subxComment"># continue</span>
<span id="L182" class="LineNr">182 </span> e9/jump $subx-braces:next-line/disp32
@ -266,7 +266,7 @@ if ('onhashchange' in window) {
<span id="L207" class="LineNr">207 </span> (<a href='../092stack.subx.html#L338'>top</a> %edx)
<span id="L208" class="LineNr">208 </span> <span class="subxComment"># print(out, &quot;_break&quot; eax)</span>
<span id="L209" class="LineNr">209 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;_break&quot;</span>)
<span id="L210" class="LineNr">210 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) %eax)
<span id="L210" class="LineNr">210 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) %eax)
<span id="L211" class="LineNr">211 </span> <span class="subxComment"># word-slice-&gt;start += len(&quot;break&quot;)</span>
<span id="L212" class="LineNr">212 </span> 81 0/subop/add *edi 5/imm32/strlen
<span id="L213" class="LineNr">213 </span> <span class="subxComment"># emit rest of word as usual</span>
@ -282,7 +282,7 @@ if ('onhashchange' in window) {
<span id="L223" class="LineNr">223 </span> (<a href='../092stack.subx.html#L338'>top</a> %edx)
<span id="L224" class="LineNr">224 </span> <span class="subxComment"># print(out, &quot;_loop&quot; eax)</span>
<span id="L225" class="LineNr">225 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;_loop&quot;</span>)
<span id="L226" class="LineNr">226 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) %eax)
<span id="L226" class="LineNr">226 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) %eax)
<span id="L227" class="LineNr">227 </span> <span class="subxComment"># word-slice-&gt;start += len(&quot;loop&quot;)</span>
<span id="L228" class="LineNr">228 </span> 81 0/subop/add *edi 4/imm32/strlen
<span id="L229" class="LineNr">229 </span> <span class="subxComment"># fall through</span>

View File

@ -66,7 +66,7 @@ if ('onhashchange' in window) {
<span id="L7" class="LineNr"> 7 </span><span class="Comment"># Press 'q' to quit. All other keys scroll down.</span>
<span id="L8" class="LineNr"> 8 </span>
<span id="L9" class="LineNr"> 9 </span><span class="PreProc">fn</span> <span class="muFunction">main</span> args-on-stack: (addr array (addr array byte))<span class="PreProc"> -&gt; </span>exit-status/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L10" class="Folded"> 10 </span><span class="Folded">+-- 20 lines: # var file/esi: (addr buffered-file) = open args-on-stack[1] for reading -------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L10" class="Folded"> 10 </span><span class="Folded">+-- 20 lines: # var file/esi: (addr buffered-file) = open args-on-stack[1] for reading --------------------------------------------------------------------------------------------------</span>
<span id="L30" class="LineNr"> 30 </span> <a href='../103screen.subx.html#L6'>enable-screen-grid-mode</a>
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> nrows/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
@ -105,7 +105,7 @@ if ('onhashchange' in window) {
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> leftcol/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">5</span> <span class="Comment"># page-margin</span>
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> rightcol/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy leftcol
<span id="L67" class="LineNr"> 67 </span> rightcol <span class="SpecialChar">&lt;-</span> add <span class="Constant">0x40</span> <span class="Comment"># page-width = 64 characters</span>
<span id="L68" class="LineNr"> 68 </span> <a href='../103screen.subx.html#L185'>start-color</a> <span class="Constant">0xec</span>, <span class="Constant">7</span> <span class="Comment"># 236 = darkish gray</span>
<span id="L68" class="LineNr"> 68 </span> <a href='../103screen.subx.html#L185'>start-color-on-screen</a> <span class="Constant">0xec</span>, <span class="Constant">7</span> <span class="Comment"># 236 = darkish gray</span>
<span id="L69" class="LineNr"> 69 </span> <span class="Delimiter">{</span>
<span id="L70" class="LineNr"> 70 </span> compare rightcol, ncols
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">break-if-&gt;=</span>
@ -126,7 +126,7 @@ if ('onhashchange' in window) {
<span id="L86" class="LineNr"> 86 </span> compare row, botrow
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy leftcol
<span id="L89" class="LineNr"> 89 </span> <a href='../103screen.subx.html#L91'>move-cursor</a> row, col
<span id="L89" class="LineNr"> 89 </span> <a href='../103screen.subx.html#L91'>move-cursor-on-screen</a> row, col
<span id="L90" class="LineNr"> 90 </span> <span class="Delimiter">{</span>
<span id="L91" class="LineNr"> 91 </span> compare col, rightcol
<span id="L92" class="LineNr"> 92 </span> <span class="PreProc">break-if-&gt;=</span>
@ -136,7 +136,7 @@ if ('onhashchange' in window) {
<span id="L96" class="LineNr"> 96 </span> <a href='browse.mu.html#L108'>update-attributes</a> c, r
<span id="L97" class="LineNr"> 97 </span> compare c, <span class="Constant">0xa</span> <span class="Comment"># newline</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">break-if-=</span> <span class="Comment"># no need to print newlines</span>
<span id="L99" class="LineNr"> 99 </span> <a href='../103screen.subx.html#L135'>print-byte</a> c
<span id="L99" class="LineNr"> 99 </span> <a href='../103screen.subx.html#L135'>print-byte-to-screen</a> c
<span id="L100" class="LineNr">100 </span> col <span class="SpecialChar">&lt;-</span> increment
<span id="L101" class="LineNr">101 </span> <span class="PreProc">loop</span>
<span id="L102" class="LineNr">102 </span> <span class="Delimiter">}</span>
@ -156,7 +156,7 @@ if ('onhashchange' in window) {
<span id="L116" class="LineNr">116 </span> <span class="Delimiter">{</span>
<span id="L117" class="LineNr">117 </span> <span class="PreProc">break-if-!=</span>
<span id="L118" class="LineNr">118 </span> <span class="Comment"># r-&gt;current-state == 0 &amp;&amp; c == '*'</span>
<span id="L119" class="LineNr">119 </span> <a href='../103screen.subx.html#L220'>start-bold</a>
<span id="L119" class="LineNr">119 </span> <a href='../103screen.subx.html#L220'>start-bold-on-screen</a>
<span id="L120" class="LineNr">120 </span> copy-to *state, <span class="Constant">1</span>
<span id="L121" class="LineNr">121 </span> <span class="PreProc">break</span> $update-attributes:check-state
<span id="L122" class="LineNr">122 </span> <span class="Delimiter">}</span>
@ -164,7 +164,7 @@ if ('onhashchange' in window) {
<span id="L124" class="LineNr">124 </span> <span class="Delimiter">{</span>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">break-if-!=</span>
<span id="L126" class="LineNr">126 </span> <span class="Comment"># r-&gt;current-state == 0 &amp;&amp; c == '_'</span>
<span id="L127" class="LineNr">127 </span> <a href='../103screen.subx.html#L220'>start-bold</a>
<span id="L127" class="LineNr">127 </span> <a href='../103screen.subx.html#L220'>start-bold-on-screen</a>
<span id="L128" class="LineNr">128 </span> copy-to *state, <span class="Constant">1</span>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">break</span> $update-attributes:check-state
<span id="L130" class="LineNr">130 </span> <span class="Delimiter">}</span>
@ -176,7 +176,7 @@ if ('onhashchange' in window) {
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">break-if-!=</span>
<span id="L138" class="LineNr">138 </span> <span class="Comment"># r-&gt;current-state == 1 &amp;&amp; c == '*'</span>
<span id="L139" class="LineNr">139 </span> <a href='../103screen.subx.html#L170'>reset-formatting</a>
<span id="L139" class="LineNr">139 </span> <a href='../103screen.subx.html#L170'>reset-formatting-on-screen</a>
<span id="L140" class="LineNr">140 </span> copy-to *state, <span class="Constant">0</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">break</span> $update-attributes:check-state
<span id="L142" class="LineNr">142 </span> <span class="Delimiter">}</span>
@ -184,7 +184,7 @@ if ('onhashchange' in window) {
<span id="L144" class="LineNr">144 </span> <span class="Delimiter">{</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">break-if-!=</span>
<span id="L146" class="LineNr">146 </span> <span class="Comment"># r-&gt;current-state == 1 &amp;&amp; c == '_'</span>
<span id="L147" class="LineNr">147 </span> <a href='../103screen.subx.html#L170'>reset-formatting</a>
<span id="L147" class="LineNr">147 </span> <a href='../103screen.subx.html#L170'>reset-formatting-on-screen</a>
<span id="L148" class="LineNr">148 </span> copy-to *state, <span class="Constant">0</span>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">break</span> $update-attributes:check-state
<span id="L150" class="LineNr">150 </span> <span class="Delimiter">}</span>
@ -199,11 +199,11 @@ if ('onhashchange' in window) {
<span id="L159" class="LineNr">159 </span> compare row, botrow
<span id="L160" class="LineNr">160 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy leftcol
<span id="L162" class="LineNr">162 </span> <a href='../103screen.subx.html#L91'>move-cursor</a> row, col
<span id="L162" class="LineNr">162 </span> <a href='../103screen.subx.html#L91'>move-cursor-on-screen</a> row, col
<span id="L163" class="LineNr">163 </span> <span class="Delimiter">{</span>
<span id="L164" class="LineNr">164 </span> compare col, rightcol
<span id="L165" class="LineNr">165 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L166" class="LineNr">166 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot; &quot;</span>
<span id="L166" class="LineNr">166 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot; &quot;</span>
<span id="L167" class="LineNr">167 </span> col <span class="SpecialChar">&lt;-</span> increment
<span id="L168" class="LineNr">168 </span> <span class="PreProc">loop</span>
<span id="L169" class="LineNr">169 </span> <span class="Delimiter">}</span>
@ -216,7 +216,7 @@ if ('onhashchange' in window) {
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> c/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> <a href='../061read-byte.subx.html#L38'>read-byte-buffered</a> in
<span id="L177" class="LineNr">177 </span> compare c, <span class="Constant">0xffffffff</span> <span class="Comment"># EOF marker</span>
<span id="L178" class="LineNr">178 </span> <span class="PreProc">break-if-=</span>
<span id="L179" class="LineNr">179 </span> <a href='../103screen.subx.html#L135'>print-byte</a> c
<span id="L179" class="LineNr">179 </span> <a href='../103screen.subx.html#L135'>print-byte-to-screen</a> c
<span id="L180" class="LineNr">180 </span> <span class="PreProc">loop</span>
<span id="L181" class="LineNr">181 </span><span class="Delimiter">}</span>
</pre>

View File

@ -385,7 +385,7 @@ if ('onhashchange' in window) {
<span id="L363" class="LineNr"> 363 </span> <span class="subxComment"># write-buffered(out, &quot;/disp32\n&quot;)</span>
<span id="L364" class="LineNr"> 364 </span> <span class="subxComment"># # emit pops</span>
<span id="L365" class="LineNr"> 365 </span> <span class="subxComment"># write-buffered(out, &quot;81 0/subop/add %esp &quot;)</span>
<span id="L366" class="LineNr"> 366 </span> <span class="subxComment"># print-int32-buffered(out, words-&gt;write &gt;&gt; 1 - 4)</span>
<span id="L366" class="LineNr"> 366 </span> <span class="subxComment"># write-int32-hex-buffered(out, words-&gt;write &gt;&gt; 1 - 4)</span>
<span id="L367" class="LineNr"> 367 </span> <span class="subxComment"># write-buffered(out, &quot;/imm32\n&quot;)</span>
<span id="L368" class="LineNr"> 368 </span> <span class="subxComment">#</span>
<span id="L369" class="LineNr"> 369 </span> <span class="subxS1Comment"># . prologue</span>
@ -509,7 +509,7 @@ if ('onhashchange' in window) {
<span id="L487" class="LineNr"> 487 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L488" class="LineNr"> 488 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L489" class="LineNr"> 489 </span> 81 0/subop/add %esp 8/imm32
<span id="L490" class="LineNr"> 490 </span> <span class="subxComment"># print-int32-buffered(out, words-&gt;write &gt;&gt; 1 - 4)</span>
<span id="L490" class="LineNr"> 490 </span> <span class="subxComment"># write-int32-hex-buffered(out, words-&gt;write &gt;&gt; 1 - 4)</span>
<span id="L491" class="LineNr"> 491 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L492" class="LineNr"> 492 </span> 8b/-&gt; *esi 0/r32/eax
<span id="L493" class="LineNr"> 493 </span> c1/shift 7/subop/arith-right %eax 1/imm8
@ -517,7 +517,7 @@ if ('onhashchange' in window) {
<span id="L495" class="LineNr"> 495 </span> 50/push-eax
<span id="L496" class="LineNr"> 496 </span> ff 6/subop/push *(ebp+8)
<span id="L497" class="LineNr"> 497 </span> <span class="subxS2Comment"># . . call</span>
<span id="L498" class="LineNr"> 498 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L498" class="LineNr"> 498 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L499" class="LineNr"> 499 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L500" class="LineNr"> 500 </span> 81 0/subop/add %esp 8/imm32
<span id="L501" class="LineNr"> 501 </span> <span class="subxComment"># write-buffered(out, &quot;/imm32\n&quot;)</span>

View File

@ -392,12 +392,12 @@ if ('onhashchange' in window) {
<span id="L329" class="LineNr"> 329 </span> e8/call <a href='../057write.subx.html#L24'>write</a>/disp32
<span id="L330" class="LineNr"> 330 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L331" class="LineNr"> 331 </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="L332" class="LineNr"> 332 </span> <span class="subxS1Comment"># . print-int32-decimal(out-segment, *Next-string-literal)</span>
<span id="L332" class="LineNr"> 332 </span> <span class="subxS1Comment"># . write-int32-decimal(out-segment, *Next-string-literal)</span>
<span id="L333" class="LineNr"> 333 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L334" class="LineNr"> 334 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='dquotes.subx.html#L1910'>Next-string-literal</a></span>/disp32 <span class="subxComment"># push *Next-string-literal</span>
<span id="L335" class="LineNr"> 335 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+16)</span>
<span id="L336" class="LineNr"> 336 </span> <span class="subxS2Comment"># . . call</span>
<span id="L337" class="LineNr"> 337 </span> e8/call <a href='../075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L337" class="LineNr"> 337 </span> e8/call <a href='../075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L338" class="LineNr"> 338 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L339" class="LineNr"> 339 </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="L340" class="LineNr"> 340 </span> <span class="subxS1Comment"># . write(out-segment, &quot;:\n&quot;)</span>
@ -433,12 +433,12 @@ if ('onhashchange' in window) {
<span id="L370" class="LineNr"> 370 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L371" class="LineNr"> 371 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L372" class="LineNr"> 372 </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="L373" class="LineNr"> 373 </span> <span class="subxS1Comment"># . print-int32-decimal(int32-stream, *Next-string-literal)</span>
<span id="L373" class="LineNr"> 373 </span> <span class="subxS1Comment"># . write-int32-decimal(int32-stream, *Next-string-literal)</span>
<span id="L374" class="LineNr"> 374 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L375" class="LineNr"> 375 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='dquotes.subx.html#L1910'>Next-string-literal</a></span>/disp32 <span class="subxComment"># push *Next-string-literal</span>
<span id="L376" class="LineNr"> 376 </span> 51/push-ecx
<span id="L377" class="LineNr"> 377 </span> <span class="subxS2Comment"># . . call</span>
<span id="L378" class="LineNr"> 378 </span> e8/call <a href='../075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L378" class="LineNr"> 378 </span> e8/call <a href='../075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L379" class="LineNr"> 379 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L380" class="LineNr"> 380 </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="L381" class="LineNr"> 381 </span> <span class="subxS1Comment"># . write-stream-data(out, int32-stream)</span>
@ -921,12 +921,12 @@ if ('onhashchange' in window) {
<span id="L915" class="LineNr"> 915 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L916" class="LineNr"> 916 </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="L917" class="LineNr"> 917 </span> <span class="subxComment"># print(out, &quot;#{len}/imm32 &quot;)</span>
<span id="L918" class="LineNr"> 918 </span> <span class="subxS1Comment"># . print-int32(out, len)</span>
<span id="L918" class="LineNr"> 918 </span> <span class="subxS1Comment"># . write-int32-hex(out, len)</span>
<span id="L919" class="LineNr"> 919 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L920" class="LineNr"> 920 </span> 50/push-eax
<span id="L921" class="LineNr"> 921 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L922" class="LineNr"> 922 </span> <span class="subxS2Comment"># . . call</span>
<span id="L923" class="LineNr"> 923 </span> e8/call <a href='../066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L923" class="LineNr"> 923 </span> e8/call <a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L924" class="LineNr"> 924 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L925" class="LineNr"> 925 </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="L926" class="LineNr"> 926 </span> <span class="subxS1Comment"># . write(out, &quot;/imm32 &quot;)</span>
@ -971,7 +971,7 @@ if ('onhashchange' in window) {
<span id="L965" class="LineNr"> 965 </span> 51/push-ecx
<span id="L966" class="LineNr"> 966 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L967" class="LineNr"> 967 </span> <span class="subxS2Comment"># . . call</span>
<span id="L968" class="LineNr"> 968 </span> e8/call <a href='../066print-int.subx.html#L21'>append-byte-hex</a>/disp32
<span id="L968" class="LineNr"> 968 </span> e8/call <a href='../066write-int-hex.subx.html#L21'>append-byte-hex</a>/disp32
<span id="L969" class="LineNr"> 969 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L970" class="LineNr"> 970 </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="L971" class="LineNr"> 971 </span> <span class="subxComment"># if (is-alphanumeric?(*curr)) print(out, &quot;/#{*curr}&quot;)</span>

6
html/apps/ex1.mu.html generated
View File

@ -14,11 +14,11 @@ pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.muFunction { color: #af5f00; text-decoration: underline; }
.LineNr { }
.muFunction { color: #af5f00; text-decoration: underline; }
.SpecialChar { color: #d70000; }
.Comment { color: #005faf; }
.Constant { color: #008787; }
.Special { color: #ff6060; }
.Delimiter { color: #c000c0; }
.PreProc { color: #c000c0; }
-->
@ -67,7 +67,7 @@ if ('onhashchange' in window) {
<span id="L9" class="LineNr"> 9 </span><span class="Comment"># 42</span>
<span id="L10" class="LineNr">10 </span>
<span id="L11" class="LineNr">11 </span><span class="PreProc">fn</span> <span class="muFunction">main</span><span class="PreProc"> -&gt; </span>result/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L12" class="LineNr">12 </span> result <span class="Special">&lt;-</span> copy <span class="Constant">0x2a</span> <span class="Comment"># Mu requires hexadecimal</span>
<span id="L12" class="LineNr">12 </span> result <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x2a</span> <span class="Comment"># Mu requires hexadecimal</span>
<span id="L13" class="LineNr">13 </span><span class="Delimiter">}</span>
</pre>
</body>

10
html/apps/ex2.mu.html generated
View File

@ -14,11 +14,11 @@ pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.muFunction { color: #af5f00; text-decoration: underline; }
.LineNr { }
.muFunction { color: #af5f00; text-decoration: underline; }
.SpecialChar { color: #d70000; }
.Comment { color: #005faf; }
.Constant { color: #008787; }
.Special { color: #ff6060; }
.Delimiter { color: #c000c0; }
.PreProc { color: #c000c0; }
-->
@ -66,12 +66,12 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span><span class="Comment"># 7</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction">main</span><span class="PreProc"> -&gt; </span>result/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> result <span class="Special">&lt;-</span> <a href='ex2.mu.html#L14'>do-add</a> <span class="Constant">3</span> <span class="Constant">4</span>
<span id="L11" class="LineNr">11 </span> result <span class="SpecialChar">&lt;-</span> <a href='ex2.mu.html#L14'>do-add</a> <span class="Constant">3</span> <span class="Constant">4</span>
<span id="L12" class="LineNr">12 </span><span class="Delimiter">}</span>
<span id="L13" class="LineNr">13 </span>
<span id="L14" class="LineNr">14 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex2.mu.html#L14'>do-add</a></span> a: int, b: int<span class="PreProc"> -&gt; </span>result/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> result <span class="Special">&lt;-</span> copy a
<span id="L16" class="LineNr">16 </span> result <span class="Special">&lt;-</span> add b
<span id="L15" class="LineNr">15 </span> result <span class="SpecialChar">&lt;-</span> copy a
<span id="L16" class="LineNr">16 </span> result <span class="SpecialChar">&lt;-</span> add b
<span id="L17" class="LineNr">17 </span><span class="Delimiter">}</span>
</pre>
</body>

View File

@ -14,11 +14,11 @@ pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.muFunction { color: #af5f00; text-decoration: underline; }
.LineNr { }
.muFunction { color: #af5f00; text-decoration: underline; }
.SpecialChar { color: #d70000; }
.Comment { color: #005faf; }
.Constant { color: #008787; }
.Special { color: #ff6060; }
.Delimiter { color: #c000c0; }
.PreProc { color: #c000c0; }
-->
@ -67,24 +67,24 @@ if ('onhashchange' in window) {
<span id="L9" class="LineNr"> 9 </span><span class="PreProc">fn</span> <span class="muFunction">main</span><span class="PreProc"> -&gt; </span>result/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span>
<span id="L10" class="LineNr">10 </span> <span class="Comment"># populate a</span>
<span id="L11" class="LineNr">11 </span> <span class="PreProc">var</span> a: (array int <span class="Constant">0xb</span>) <span class="Comment"># 11; we waste index 0</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L13" class="LineNr">13 </span> <span class="Delimiter">{</span>
<span id="L14" class="LineNr">14 </span> compare i, <span class="Constant">0xb</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: (addr int) <span class="Special">&lt;-</span> index a, i
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> index a, i
<span id="L17" class="LineNr">17 </span> copy-to *x, i
<span id="L18" class="LineNr">18 </span> i <span class="Special">&lt;-</span> increment
<span id="L18" class="LineNr">18 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L19" class="LineNr">19 </span> <span class="PreProc">loop</span>
<span id="L20" class="LineNr">20 </span> <span class="Delimiter">}</span>
<span id="L21" class="LineNr">21 </span> <span class="Comment"># sum</span>
<span id="L22" class="LineNr">22 </span> result <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L23" class="LineNr">23 </span> i <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L22" class="LineNr">22 </span> result <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L23" class="LineNr">23 </span> i <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L24" class="LineNr">24 </span> <span class="Delimiter">{</span>
<span id="L25" class="LineNr">25 </span> compare i, <span class="Constant">0xb</span>
<span id="L26" class="LineNr">26 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L27" class="LineNr">27 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: (addr int) <span class="Special">&lt;-</span> index a, i
<span id="L28" class="LineNr">28 </span> result <span class="Special">&lt;-</span> add *x
<span id="L29" class="LineNr">29 </span> i <span class="Special">&lt;-</span> increment
<span id="L27" class="LineNr">27 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> index a, i
<span id="L28" class="LineNr">28 </span> result <span class="SpecialChar">&lt;-</span> add *x
<span id="L29" class="LineNr">29 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L30" class="LineNr">30 </span> <span class="PreProc">loop</span>
<span id="L31" class="LineNr">31 </span> <span class="Delimiter">}</span>
<span id="L32" class="LineNr">32 </span><span class="Delimiter">}</span>

View File

@ -129,12 +129,12 @@ if ('onhashchange' in window) {
<span id="L68" class="LineNr"> 68 </span> 68/push 0/imm32/read
<span id="L69" class="LineNr"> 69 </span> 68/push 0/imm32/write
<span id="L70" class="LineNr"> 70 </span> 89/copy 3/mod/direct 1/rm32/ecx <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 ecx</span>
<span id="L71" class="LineNr"> 71 </span> <span class="subxComment"># print-int32-decimal(buffer, eax)</span>
<span id="L71" class="LineNr"> 71 </span> <span class="subxComment"># write-int32-decimal(buffer, eax)</span>
<span id="L72" class="LineNr"> 72 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L73" class="LineNr"> 73 </span> 50/push-eax
<span id="L74" class="LineNr"> 74 </span> 51/push-ecx
<span id="L75" class="LineNr"> 75 </span> <span class="subxS2Comment"># . . call</span>
<span id="L76" class="LineNr"> 76 </span> e8/call <a href='../075print-int-decimal.subx.html#L8'>print-int32-decimal</a>/disp32
<span id="L76" class="LineNr"> 76 </span> e8/call <a href='../075write-int-decimal.subx.html#L8'>write-int32-decimal</a>/disp32
<span id="L77" class="LineNr"> 77 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L78" class="LineNr"> 78 </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="L79" class="LineNr"> 79 </span> <span class="subxComment"># write-stream(stderr, buffer)</span>

162
html/apps/mu.subx.html generated
View File

@ -5620,7 +5620,7 @@ if ('onhashchange' in window) {
<span id="L6088" class="LineNr"> 6088 </span>
<span id="L6089" class="LineNr"> 6089 </span><span class="Constant">$parse-mu:error2</span>:
<span id="L6090" class="LineNr"> 6090 </span> <span class="subxComment"># error(vars-&gt;top &quot; vars not reclaimed after fn '&quot; new-function-&gt;name &quot;'\n&quot;)</span>
<span id="L6091" class="LineNr"> 6091 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) *ebx)
<span id="L6091" class="LineNr"> 6091 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) *ebx)
<span id="L6092" class="LineNr"> 6092 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot; vars not reclaimed after fn '&quot;</span>)
<span id="L6093" class="LineNr"> 6093 </span> (<a href='../072slice.subx.html#L908'>write-slice-buffered</a> *(ebp+0xc) *eax) <span class="subxComment"># Function-name</span>
<span id="L6094" class="LineNr"> 6094 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;'\n&quot;</span>)
@ -6528,7 +6528,7 @@ if ('onhashchange' in window) {
<span id="L6996" class="LineNr"> 6996 </span> 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
<span id="L6997" class="LineNr"> 6997 </span> {
<span id="L6998" class="LineNr"> 6998 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; &quot;)</span>
<span id="L6999" class="LineNr"> 6999 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ecx)</span>
<span id="L6999" class="LineNr"> 6999 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ecx)</span>
<span id="L7000" class="LineNr"> 7000 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;\n&quot;)</span>
<span id="L7001" class="LineNr"> 7001 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L7002" class="LineNr"> 7002 </span> <span class="subxComment"># if (curr &gt;= max) return -1</span>
@ -6550,7 +6550,7 @@ if ('onhashchange' in window) {
<span id="L7018" class="LineNr"> 7018 </span> 89/&lt;- %eax 1/r32/ecx
<span id="L7019" class="LineNr"> 7019 </span><span class="Constant">$pos-slice:end</span>:
<span id="L7020" class="LineNr"> 7020 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;=&gt; &quot;)</span>
<span id="L7021" class="LineNr"> 7021 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L7021" class="LineNr"> 7021 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L7022" class="LineNr"> 7022 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;\n&quot;)</span>
<span id="L7023" class="LineNr"> 7023 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L7024" class="LineNr"> 7024 </span> 5e/pop-to-esi
@ -7349,7 +7349,7 @@ if ('onhashchange' in window) {
<span id="L7817" class="LineNr"> 7817 </span> (<a href='../057write.subx.html#L24'>write</a> %edx <span class="Constant">&quot;$&quot;</span>)
<span id="L7818" class="LineNr"> 7818 </span> (<a href='../057write.subx.html#L24'>write</a> %edx %eax)
<span id="L7819" class="LineNr"> 7819 </span> (<a href='../057write.subx.html#L24'>write</a> %edx <span class="Constant">&quot;:&quot;</span>)
<span id="L7820" class="LineNr"> 7820 </span> (<a href='../066print-int.subx.html#L178'>print-int32</a> %edx *<span class="SpecialChar"><a href='mu.subx.html#L5909'>Next-block-index</a></span>)
<span id="L7820" class="LineNr"> 7820 </span> (<a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a> %edx *<span class="SpecialChar"><a href='mu.subx.html#L5909'>Next-block-index</a></span>)
<span id="L7821" class="LineNr"> 7821 </span> ff 0/subop/increment *<span class="SpecialChar"><a href='mu.subx.html#L5909'>Next-block-index</a></span>
<span id="L7822" class="LineNr"> 7822 </span> <span class="subxComment"># var s/eax: slice = {name-&gt;data, name-&gt;data + name-&gt;write} (clobbering edx)</span>
<span id="L7823" class="LineNr"> 7823 </span> <span class="subxS1Comment"># . eax = name-&gt;write</span>
@ -7366,9 +7366,9 @@ if ('onhashchange' in window) {
<span id="L7834" class="LineNr"> 7834 </span> (<a href='mu.subx.html#L9172'>new-literal</a> <span class="SpecialChar"><a href='../069allocate.subx.html#L27'>Heap</a></span> %eax *(ebp+0xc))
<span id="L7835" class="LineNr"> 7835 </span><span class="CommentedCode">#? 8b/-&gt; *(ebp+0xc) 0/r32/eax</span>
<span id="L7836" class="LineNr"> 7836 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;type allocid in caller after new-literal: &quot;)</span>
<span id="L7837" class="LineNr"> 7837 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(eax+8))</span>
<span id="L7837" class="LineNr"> 7837 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(eax+8))</span>
<span id="L7838" class="LineNr"> 7838 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; for var &quot;)</span>
<span id="L7839" class="LineNr"> 7839 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L7839" class="LineNr"> 7839 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L7840" class="LineNr"> 7840 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L7841" class="LineNr"> 7841 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L7842" class="LineNr"> 7842 </span><span class="Constant">$new-block-name:end</span>:
@ -7883,7 +7883,7 @@ if ('onhashchange' in window) {
<span id="L8351" class="LineNr"> 8351 </span> (<a href='mu.subx.html#L9431'>lookup-or-create-constant</a> %eax %ecx %esi)
<span id="L8352" class="LineNr"> 8352 </span><span class="CommentedCode">#? (lookup *esi *(esi+4))</span>
<span id="L8353" class="LineNr"> 8353 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;creating new output var &quot;)</span>
<span id="L8354" class="LineNr"> 8354 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L8354" class="LineNr"> 8354 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L8355" class="LineNr"> 8355 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; for field called &quot;)</span>
<span id="L8356" class="LineNr"> 8356 </span><span class="CommentedCode">#? (write-slice-buffered Stderr %ecx)</span>
<span id="L8357" class="LineNr"> 8357 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;; var name &quot;)</span>
@ -8010,7 +8010,7 @@ if ('onhashchange' in window) {
<span id="L8478" class="LineNr"> 8478 </span> 81 4/subop/and %ecx 0xff/imm32
<span id="L8479" class="LineNr"> 8479 </span> <span class="subxComment"># if is-decimal-digit?(c) return new var(name)</span>
<span id="L8480" class="LineNr"> 8480 </span> {
<span id="L8481" class="LineNr"> 8481 </span> (<a href='../075print-int-decimal.subx.html#L306'>is-decimal-digit?</a> %ecx) <span class="subxComment"># =&gt; eax</span>
<span id="L8481" class="LineNr"> 8481 </span> (<a href='../075write-int-decimal.subx.html#L306'>is-decimal-digit?</a> %ecx) <span class="subxComment"># =&gt; eax</span>
<span id="L8482" class="LineNr"> 8482 </span> 3d/compare-eax-and 0/imm32/false
<span id="L8483" class="LineNr"> 8483 </span> 74/jump-if-= <span class="Constant">break</span>/disp8
<span id="L8484" class="LineNr"> 8484 </span><span class="Constant">$lookup-var-or-literal:literal</span>:
@ -8640,7 +8640,7 @@ if ('onhashchange' in window) {
<span id="L9108" class="LineNr"> 9108 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; at &quot;)</span>
<span id="L9109" class="LineNr"> 9109 </span><span class="CommentedCode">#? 8b/-&gt; *(ebp+0x14) 1/r32/ecx</span>
<span id="L9110" class="LineNr"> 9110 </span><span class="CommentedCode">#? (lookup *ecx *(ecx+4)) # =&gt; eax</span>
<span id="L9111" class="LineNr"> 9111 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L9111" class="LineNr"> 9111 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L9112" class="LineNr"> 9112 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9113" class="LineNr"> 9113 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9114" class="LineNr"> 9114 </span><span class="Constant">$new-var:end</span>:
@ -8986,14 +8986,14 @@ if ('onhashchange' in window) {
<span id="L9454" class="LineNr"> 9454 </span><span class="CommentedCode">#? 8b/-&gt; *(ebp+0x10) 0/r32/eax</span>
<span id="L9455" class="LineNr"> 9455 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;@&quot;)</span>
<span id="L9456" class="LineNr"> 9456 </span><span class="CommentedCode">#? (lookup *eax *(eax+4))</span>
<span id="L9457" class="LineNr"> 9457 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L9457" class="LineNr"> 9457 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L9458" class="LineNr"> 9458 </span><span class="CommentedCode">#? (lookup *eax *(eax+4))</span>
<span id="L9459" class="LineNr"> 9459 </span><span class="CommentedCode">#? (write-buffered Stderr %eax)</span>
<span id="L9460" class="LineNr"> 9460 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9461" class="LineNr"> 9461 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9462" class="LineNr"> 9462 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;offset: &quot;)</span>
<span id="L9463" class="LineNr"> 9463 </span><span class="CommentedCode">#? 8b/-&gt; *(eax+0x14) 0/r32/eax</span>
<span id="L9464" class="LineNr"> 9464 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L9464" class="LineNr"> 9464 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L9465" class="LineNr"> 9465 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9466" class="LineNr"> 9466 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9467" class="LineNr"> 9467 </span><span class="Constant">$lookup-or-create-constant:end</span>:
@ -9075,9 +9075,9 @@ if ('onhashchange' in window) {
<span id="L9543" class="LineNr"> 9543 </span> <span class="subxComment"># var tmp/eax: (addr typeinfo) = lookup(*out)</span>
<span id="L9544" class="LineNr"> 9544 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *edi *(edi+4)) <span class="subxComment"># =&gt; eax</span>
<span id="L9545" class="LineNr"> 9545 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;created typeinfo at &quot;)</span>
<span id="L9546" class="LineNr"> 9546 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L9546" class="LineNr"> 9546 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L9547" class="LineNr"> 9547 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; for type-id &quot;)</span>
<span id="L9548" class="LineNr"> 9548 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ebp+8))</span>
<span id="L9548" class="LineNr"> 9548 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ebp+8))</span>
<span id="L9549" class="LineNr"> 9549 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9550" class="LineNr"> 9550 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9551" class="LineNr"> 9551 </span> <span class="subxComment"># tmp-&gt;id = t</span>
@ -9251,18 +9251,18 @@ if ('onhashchange' in window) {
<span id="L9719" class="LineNr"> 9719 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L9720" class="LineNr"> 9720 </span> (<a href='../069allocate.subx.html#L66'>allocate</a> <span class="SpecialChar"><a href='../069allocate.subx.html#L27'>Heap</a></span> *<span class="SpecialChar"><a href='mu.subx.html#L443'>Typeinfo-entry-size</a></span> %esi)
<span id="L9721" class="LineNr"> 9721 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;handle at &quot;)</span>
<span id="L9722" class="LineNr"> 9722 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %esi)</span>
<span id="L9722" class="LineNr"> 9722 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %esi)</span>
<span id="L9723" class="LineNr"> 9723 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;: &quot;)</span>
<span id="L9724" class="LineNr"> 9724 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *esi)</span>
<span id="L9724" class="LineNr"> 9724 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *esi)</span>
<span id="L9725" class="LineNr"> 9725 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; &quot;)</span>
<span id="L9726" class="LineNr"> 9726 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(esi+4))</span>
<span id="L9726" class="LineNr"> 9726 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(esi+4))</span>
<span id="L9727" class="LineNr"> 9727 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9728" class="LineNr"> 9728 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9729" class="LineNr"> 9729 </span><span class="CommentedCode">#? (lookup *esi *(esi+4))</span>
<span id="L9730" class="LineNr"> 9730 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;created typeinfo fields at &quot;)</span>
<span id="L9731" class="LineNr"> 9731 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %esi)</span>
<span id="L9731" class="LineNr"> 9731 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %esi)</span>
<span id="L9732" class="LineNr"> 9732 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; for &quot;)</span>
<span id="L9733" class="LineNr"> 9733 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ebp+8))</span>
<span id="L9733" class="LineNr"> 9733 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ebp+8))</span>
<span id="L9734" class="LineNr"> 9734 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9735" class="LineNr"> 9735 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9736" class="LineNr"> 9736 </span> }
@ -9371,9 +9371,9 @@ if ('onhashchange' in window) {
<span id="L9844" class="LineNr"> 9844 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *ebx *(ebx+4)) <span class="subxComment"># =&gt; eax</span>
<span id="L9845" class="LineNr"> 9845 </span> 8b/-&gt; *(ebp-4) 1/r32/ecx
<span id="L9846" class="LineNr"> 9846 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;saving index &quot;)</span>
<span id="L9847" class="LineNr"> 9847 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ecx)</span>
<span id="L9847" class="LineNr"> 9847 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ecx)</span>
<span id="L9848" class="LineNr"> 9848 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; at &quot;)</span>
<span id="L9849" class="LineNr"> 9849 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %edi)</span>
<span id="L9849" class="LineNr"> 9849 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %edi)</span>
<span id="L9850" class="LineNr"> 9850 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L9851" class="LineNr"> 9851 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L9852" class="LineNr"> 9852 </span> 89/&lt;- *(eax+8) 1/r32/ecx <span class="subxComment"># Typeinfo-entry-index</span>
@ -9691,9 +9691,9 @@ if ('onhashchange' in window) {
<span id="L10164" class="LineNr">10164 </span> 39/compare %ebx 2/r32/edx
<span id="L10165" class="LineNr">10165 </span> 0f 8d/jump-if-&gt;= <span class="Constant">break</span>/disp32
<span id="L10166" class="LineNr">10166 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;looking up index &quot;)</span>
<span id="L10167" class="LineNr">10167 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ebx)</span>
<span id="L10167" class="LineNr">10167 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ebx)</span>
<span id="L10168" class="LineNr">10168 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; in &quot;)</span>
<span id="L10169" class="LineNr">10169 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ebp+8))</span>
<span id="L10169" class="LineNr">10169 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ebp+8))</span>
<span id="L10170" class="LineNr">10170 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L10171" class="LineNr">10171 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L10172" class="LineNr">10172 </span> <span class="subxComment"># var v/esi: (addr typeinfo-entry)</span>
@ -9756,9 +9756,9 @@ if ('onhashchange' in window) {
<span id="L10229" class="LineNr">10229 </span> <span class="subxComment"># if (v-&gt;index == idx) return v</span>
<span id="L10230" class="LineNr">10230 </span> 8b/-&gt; *(eax+8) 3/r32/ebx <span class="subxComment"># Typeinfo-entry-index</span>
<span id="L10231" class="LineNr">10231 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;comparing &quot;)</span>
<span id="L10232" class="LineNr">10232 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ebx)</span>
<span id="L10232" class="LineNr">10232 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ebx)</span>
<span id="L10233" class="LineNr">10233 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; and &quot;)</span>
<span id="L10234" class="LineNr">10234 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ebp+0xc))</span>
<span id="L10234" class="LineNr">10234 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ebp+0xc))</span>
<span id="L10235" class="LineNr">10235 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L10236" class="LineNr">10236 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L10237" class="LineNr">10237 </span> 39/compare *(ebp+0xc) 3/r32/ebx
@ -9772,7 +9772,7 @@ if ('onhashchange' in window) {
<span id="L10245" class="LineNr">10245 </span> b8/copy-to-eax 0/imm32
<span id="L10246" class="LineNr">10246 </span><span class="Constant">$locate-typeinfo-entry-with-index:end</span>:
<span id="L10247" class="LineNr">10247 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;returning &quot;)</span>
<span id="L10248" class="LineNr">10248 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L10248" class="LineNr">10248 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L10249" class="LineNr">10249 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L10250" class="LineNr">10250 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L10251" class="LineNr">10251 </span> <span class="subxS1Comment"># . restore registers</span>
@ -9833,22 +9833,22 @@ if ('onhashchange' in window) {
<span id="L10306" class="LineNr">10306 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(esi+4) *(esi+8)) <span class="subxComment"># Typeinfo-fields Typeinfo-fields =&gt; eax</span>
<span id="L10307" class="LineNr">10307 </span> 89/&lt;- %ecx 0/r32/eax
<span id="L10308" class="LineNr">10308 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;id:&quot;</span>)
<span id="L10309" class="LineNr">10309 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *esi)
<span id="L10309" class="LineNr">10309 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *esi)
<span id="L10310" class="LineNr">10310 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;\n&quot;</span>)
<span id="L10311" class="LineNr">10311 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;fields @ &quot;</span>)
<span id="L10312" class="LineNr">10312 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %ecx)
<span id="L10312" class="LineNr">10312 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %ecx)
<span id="L10313" class="LineNr">10313 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10314" class="LineNr">10314 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10315" class="LineNr">10315 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; <a href='../057write.subx.html#L24'>write</a>: &quot;</span>)
<span id="L10316" class="LineNr">10316 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ecx)
<span id="L10316" class="LineNr">10316 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ecx)
<span id="L10317" class="LineNr">10317 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10318" class="LineNr">10318 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10319" class="LineNr">10319 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; <a href='../060read.subx.html#L48'>read</a>: &quot;</span>)
<span id="L10320" class="LineNr">10320 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+4))
<span id="L10320" class="LineNr">10320 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+4))
<span id="L10321" class="LineNr">10321 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10322" class="LineNr">10322 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10323" class="LineNr">10323 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; <a href='../106size.subx.html#L5'>size</a>: &quot;</span>)
<span id="L10324" class="LineNr">10324 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+8))
<span id="L10324" class="LineNr">10324 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+8))
<span id="L10325" class="LineNr">10325 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10326" class="LineNr">10326 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10327" class="LineNr">10327 </span> <span class="subxComment"># var table-size/edx: int = table-&gt;write</span>
@ -9864,30 +9864,30 @@ if ('onhashchange' in window) {
<span id="L10337" class="LineNr">10337 </span> 0f 83/jump-if-addr&gt;= <span class="Constant">break</span>/disp32
<span id="L10338" class="LineNr">10338 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; row:\n&quot;</span>)
<span id="L10339" class="LineNr">10339 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; key: &quot;</span>)
<span id="L10340" class="LineNr">10340 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ecx)
<span id="L10340" class="LineNr">10340 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ecx)
<span id="L10341" class="LineNr">10341 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;,&quot;</span>)
<span id="L10342" class="LineNr">10342 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+4))
<span id="L10342" class="LineNr">10342 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+4))
<span id="L10343" class="LineNr">10343 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; = '&quot;</span>)
<span id="L10344" class="LineNr">10344 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *ecx *(ecx+4))
<span id="L10345" class="LineNr">10345 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10346" class="LineNr">10346 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;' @ &quot;</span>)
<span id="L10347" class="LineNr">10347 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10347" class="LineNr">10347 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10348" class="LineNr">10348 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10349" class="LineNr">10349 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10350" class="LineNr">10350 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; value: &quot;</span>)
<span id="L10351" class="LineNr">10351 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+8))
<span id="L10351" class="LineNr">10351 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+8))
<span id="L10352" class="LineNr">10352 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;,&quot;</span>)
<span id="L10353" class="LineNr">10353 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+0xc))
<span id="L10353" class="LineNr">10353 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ecx+0xc))
<span id="L10354" class="LineNr">10354 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; = typeinfo-entry@&quot;</span>)
<span id="L10355" class="LineNr">10355 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(ecx+8) *(ecx+0xc))
<span id="L10356" class="LineNr">10356 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10356" class="LineNr">10356 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10357" class="LineNr">10357 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10358" class="LineNr">10358 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10359" class="LineNr">10359 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; input var@&quot;</span>)
<span id="L10360" class="LineNr">10360 </span> (<a href='mu.subx.html#L10388'>dump-var</a> 5 %eax)
<span id="L10361" class="LineNr">10361 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(ecx+8) *(ecx+0xc))
<span id="L10362" class="LineNr">10362 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; index: &quot;</span>)
<span id="L10363" class="LineNr">10363 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(eax+8))
<span id="L10363" class="LineNr">10363 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(eax+8))
<span id="L10364" class="LineNr">10364 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10365" class="LineNr">10365 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10366" class="LineNr">10366 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot; output var@&quot;</span>)
@ -9922,12 +9922,12 @@ if ('onhashchange' in window) {
<span id="L10395" class="LineNr">10395 </span> <span class="subxComment"># eax = v</span>
<span id="L10396" class="LineNr">10396 </span> 8b/-&gt; *(ebp+0xc) 0/r32/eax
<span id="L10397" class="LineNr">10397 </span> <span class="subxComment">#</span>
<span id="L10398" class="LineNr">10398 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *eax)
<span id="L10398" class="LineNr">10398 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *eax)
<span id="L10399" class="LineNr">10399 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;,&quot;</span>)
<span id="L10400" class="LineNr">10400 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(eax+4))
<span id="L10400" class="LineNr">10400 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(eax+4))
<span id="L10401" class="LineNr">10401 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;-&gt;&quot;</span>)
<span id="L10402" class="LineNr">10402 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *eax *(eax+4))
<span id="L10403" class="LineNr">10403 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10403" class="LineNr">10403 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10404" class="LineNr">10404 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10405" class="LineNr">10405 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10406" class="LineNr">10406 </span> {
@ -9936,12 +9936,12 @@ if ('onhashchange' in window) {
<span id="L10409" class="LineNr">10409 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebp+8))
<span id="L10410" class="LineNr">10410 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;name: &quot;</span>)
<span id="L10411" class="LineNr">10411 </span> 89/&lt;- %ebx 0/r32/eax
<span id="L10412" class="LineNr">10412 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ebx) <span class="subxComment"># Var-name</span>
<span id="L10412" class="LineNr">10412 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *ebx) <span class="subxComment"># Var-name</span>
<span id="L10413" class="LineNr">10413 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;,&quot;</span>)
<span id="L10414" class="LineNr">10414 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+4)) <span class="subxComment"># Var-name</span>
<span id="L10414" class="LineNr">10414 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+4)) <span class="subxComment"># Var-name</span>
<span id="L10415" class="LineNr">10415 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;-&gt;&quot;</span>)
<span id="L10416" class="LineNr">10416 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *ebx *(ebx+4)) <span class="subxComment"># Var-name</span>
<span id="L10417" class="LineNr">10417 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10417" class="LineNr">10417 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10418" class="LineNr">10418 </span> {
<span id="L10419" class="LineNr">10419 </span> 3d/compare-eax-and 0/imm32
<span id="L10420" class="LineNr">10420 </span> 74/jump-if-= <span class="Constant">break</span>/disp8
@ -9952,23 +9952,23 @@ if ('onhashchange' in window) {
<span id="L10425" class="LineNr">10425 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10426" class="LineNr">10426 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebp+8))
<span id="L10427" class="LineNr">10427 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;block depth: &quot;</span>)
<span id="L10428" class="LineNr">10428 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x10)) <span class="subxComment"># Var-block-depth</span>
<span id="L10428" class="LineNr">10428 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x10)) <span class="subxComment"># Var-block-depth</span>
<span id="L10429" class="LineNr">10429 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10430" class="LineNr">10430 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10431" class="LineNr">10431 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebp+8))
<span id="L10432" class="LineNr">10432 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;stack offset: &quot;</span>)
<span id="L10433" class="LineNr">10433 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L10433" class="LineNr">10433 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L10434" class="LineNr">10434 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L10435" class="LineNr">10435 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10436" class="LineNr">10436 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebp+8))
<span id="L10437" class="LineNr">10437 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;reg: &quot;</span>)
<span id="L10438" class="LineNr">10438 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x18)) <span class="subxComment"># Var-register</span>
<span id="L10438" class="LineNr">10438 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x18)) <span class="subxComment"># Var-register</span>
<span id="L10439" class="LineNr">10439 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;,&quot;</span>)
<span id="L10440" class="LineNr">10440 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x1c)) <span class="subxComment"># Var-register</span>
<span id="L10440" class="LineNr">10440 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> *(ebx+0x1c)) <span class="subxComment"># Var-register</span>
<span id="L10441" class="LineNr">10441 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> <span class="Constant">&quot;-&gt;&quot;</span>)
<span id="L10442" class="LineNr">10442 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>)
<span id="L10443" class="LineNr">10443 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(ebx+0x18) *(ebx+0x1c)) <span class="subxComment"># Var-register</span>
<span id="L10444" class="LineNr">10444 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10444" class="LineNr">10444 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span> %eax)
<span id="L10445" class="LineNr">10445 </span> {
<span id="L10446" class="LineNr">10446 </span> 3d/compare-eax-and 0/imm32
<span id="L10447" class="LineNr">10447 </span> 74/jump-if-= <span class="Constant">break</span>/disp8
@ -11151,10 +11151,10 @@ if ('onhashchange' in window) {
<span id="L11624" class="LineNr">11624 </span> <span class="subxComment"># var t/ecx: (addr tree type-id) = lookup(v-&gt;type)</span>
<span id="L11625" class="LineNr">11625 </span> 8b/-&gt; *(ebp+8) 1/r32/ecx
<span id="L11626" class="LineNr">11626 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;size-of &quot;)</span>
<span id="L11627" class="LineNr">11627 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ecx)</span>
<span id="L11627" class="LineNr">11627 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ecx)</span>
<span id="L11628" class="LineNr">11628 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L11629" class="LineNr">11629 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;type allocid: &quot;)</span>
<span id="L11630" class="LineNr">11630 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ecx+8))</span>
<span id="L11630" class="LineNr">11630 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ecx+8))</span>
<span id="L11631" class="LineNr">11631 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L11632" class="LineNr">11632 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L11633" class="LineNr">11633 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(ecx+8) *(ecx+0xc)) <span class="subxComment"># Var-type Var-type =&gt; eax</span>
@ -11506,9 +11506,9 @@ if ('onhashchange' in window) {
<span id="L11979" class="LineNr">11979 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;setting offset of fn inout &quot;)</span>
<span id="L11980" class="LineNr">11980 </span><span class="CommentedCode">#? (write-buffered Stderr %eax)</span>
<span id="L11981" class="LineNr">11981 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;@&quot;)</span>
<span id="L11982" class="LineNr">11982 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %ebx)</span>
<span id="L11982" class="LineNr">11982 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %ebx)</span>
<span id="L11983" class="LineNr">11983 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; to &quot;)</span>
<span id="L11984" class="LineNr">11984 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %edx)</span>
<span id="L11984" class="LineNr">11984 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %edx)</span>
<span id="L11985" class="LineNr">11985 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L11986" class="LineNr">11986 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L11987" class="LineNr">11987 </span> <span class="subxComment"># v-&gt;offset = next-offset</span>
@ -11648,7 +11648,7 @@ if ('onhashchange' in window) {
<span id="L12217" class="LineNr">12217 </span><span class="CommentedCode">#? (lookup *ecx *(ecx+4))</span>
<span id="L12218" class="LineNr">12218 </span><span class="CommentedCode">#? (write-buffered Stderr %eax)</span>
<span id="L12219" class="LineNr">12219 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; at depth &quot;)</span>
<span id="L12220" class="LineNr">12220 </span><span class="CommentedCode">#? (print-int32-buffered Stderr *(ecx+0x10))</span>
<span id="L12220" class="LineNr">12220 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr *(ecx+0x10))</span>
<span id="L12221" class="LineNr">12221 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L12222" class="LineNr">12222 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L12223" class="LineNr">12223 </span> <span class="subxComment"># ensure that v is in a register</span>
@ -11956,7 +11956,7 @@ if ('onhashchange' in window) {
<span id="L12525" class="LineNr">12525 </span><span class="Constant">$emit-cleanup-code-until-depth:reclaim-var-on-stack</span>:
<span id="L12526" class="LineNr">12526 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L12527" class="LineNr">12527 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;81 0/subop/add %esp &quot;</span>)
<span id="L12528" class="LineNr">12528 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L12528" class="LineNr">12528 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L12529" class="LineNr">12529 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm32\n&quot;</span>)
<span id="L12530" class="LineNr">12530 </span> }
<span id="L12531" class="LineNr">12531 </span><span class="Constant">$emit-cleanup-code-until-depth:continue</span>:
@ -12037,7 +12037,7 @@ if ('onhashchange' in window) {
<span id="L12606" class="LineNr">12606 </span> <span class="subxComment">#</span>
<span id="L12607" class="LineNr">12607 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L12608" class="LineNr">12608 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;81 0/subop/add %esp &quot;</span>)
<span id="L12609" class="LineNr">12609 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L12609" class="LineNr">12609 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L12610" class="LineNr">12610 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm32\n&quot;</span>)
<span id="L12611" class="LineNr">12611 </span> }
<span id="L12612" class="LineNr">12612 </span><span class="Constant">$emit-cleanup-code-until-target:continue</span>:
@ -12575,11 +12575,11 @@ if ('onhashchange' in window) {
<span id="L13144" class="LineNr">13144 </span> 81 5/subop/subtract %edx 4/imm32
<span id="L13145" class="LineNr">13145 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L13146" class="LineNr">13146 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;(<a href='../101stack_allocate.subx.html#L34'>push-n-zero-bytes</a> &quot;</span>)
<span id="L13147" class="LineNr">13147 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %edx)
<span id="L13147" class="LineNr">13147 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %edx)
<span id="L13148" class="LineNr">13148 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;)\n&quot;</span>)
<span id="L13149" class="LineNr">13149 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L13150" class="LineNr">13150 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;68/push &quot;</span>)
<span id="L13151" class="LineNr">13151 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %edx)
<span id="L13151" class="LineNr">13151 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %edx)
<span id="L13152" class="LineNr">13152 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm32\n&quot;</span>)
<span id="L13153" class="LineNr">13153 </span> eb/jump $emit-subx-var-def:end/disp8
<span id="L13154" class="LineNr">13154 </span> }
@ -12750,7 +12750,7 @@ if ('onhashchange' in window) {
<span id="L13319" class="LineNr">13319 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;31/xor %edx 2/r32/edx\n&quot;</span>)
<span id="L13320" class="LineNr">13320 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L13321" class="LineNr">13321 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;b9/copy-to-ecx &quot;</span>)
<span id="L13322" class="LineNr">13322 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %ecx)
<span id="L13322" class="LineNr">13322 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %ecx)
<span id="L13323" class="LineNr">13323 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm32\n&quot;</span>)
<span id="L13324" class="LineNr">13324 </span> (<a href='mu.subx.html#L20155'>emit-indent</a> *(ebp+8) *<span class="SpecialChar"><a href='mu.subx.html#L5912'>Curr-block-depth</a></span>)
<span id="L13325" class="LineNr">13325 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;f7 7/subop/idiv-eax-edx-by %ecx\n&quot;</span>)
@ -12857,13 +12857,13 @@ if ('onhashchange' in window) {
<span id="L13426" class="LineNr">13426 </span> 74/jump-if-= <span class="Constant">break</span>/disp8
<span id="L13427" class="LineNr">13427 </span><span class="Constant">$emit-save-size-to:emit-base-from-stack</span>:
<span id="L13428" class="LineNr">13428 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;(ebp+&quot;</span>)
<span id="L13429" class="LineNr">13429 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *(ebx+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L13429" class="LineNr">13429 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *(ebx+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L13430" class="LineNr">13430 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;)&quot;</span>)
<span id="L13431" class="LineNr">13431 </span> }
<span id="L13432" class="LineNr">13432 </span><span class="Constant">$emit-save-size-to:emit-output</span>:
<span id="L13433" class="LineNr">13433 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot; &quot;</span>)
<span id="L13434" class="LineNr">13434 </span> (<a href='../081table.subx.html#L26'>get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> *(ebp+0x10) 0xc <span class="Constant">&quot;Mu-registers&quot;</span>) <span class="subxComment"># =&gt; eax</span>
<span id="L13435" class="LineNr">13435 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L13435" class="LineNr">13435 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L13436" class="LineNr">13436 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32\n&quot;</span>)
<span id="L13437" class="LineNr">13437 </span><span class="Constant">$emit-save-size-to:end</span>:
<span id="L13438" class="LineNr">13438 </span> <span class="subxS1Comment"># . restore registers</span>
@ -12886,7 +12886,7 @@ if ('onhashchange' in window) {
<span id="L13455" class="LineNr">13455 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) *(ebp+0xc))
<span id="L13456" class="LineNr">13456 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="SpecialChar"><a href='../051test.subx.html#L93'>Space</a></span>)
<span id="L13457" class="LineNr">13457 </span> (<a href='mu.subx.html#L13989'>num-shift-rights</a> *(ebp+0x10)) <span class="subxComment"># =&gt; eax</span>
<span id="L13458" class="LineNr">13458 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13458" class="LineNr">13458 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13459" class="LineNr">13459 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm8\n&quot;</span>)
<span id="L13460" class="LineNr">13460 </span><span class="Constant">$emit-divide-by-shift-right:end</span>:
<span id="L13461" class="LineNr">13461 </span> <span class="subxS1Comment"># . restore registers</span>
@ -12994,7 +12994,7 @@ if ('onhashchange' in window) {
<span id="L13563" class="LineNr">13563 </span> <span class="subxComment"># TODO: ensure size is a power of 2</span>
<span id="L13564" class="LineNr">13564 </span> (<a href='mu.subx.html#L13369'>array-element-size</a> %ebx *(ebp+0x10) *(ebp+0x14)) <span class="subxComment"># =&gt; eax</span>
<span id="L13565" class="LineNr">13565 </span> (<a href='mu.subx.html#L13989'>num-shift-rights</a> %eax) <span class="subxComment"># =&gt; eax</span>
<span id="L13566" class="LineNr">13566 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13566" class="LineNr">13566 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13567" class="LineNr">13567 </span> e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
<span id="L13568" class="LineNr">13568 </span> }
<span id="L13569" class="LineNr">13569 </span> <span class="subxComment"># if index-&gt;type is any other atom, abort</span>
@ -13034,7 +13034,7 @@ if ('onhashchange' in window) {
<span id="L13603" class="LineNr">13603 </span> 05/add-to-eax 4/imm32
<span id="L13604" class="LineNr">13604 </span> <span class="subxComment"># TODO: check edx for overflow</span>
<span id="L13605" class="LineNr">13605 </span> <span class="subxComment"># print offset</span>
<span id="L13606" class="LineNr">13606 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13606" class="LineNr">13606 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13607" class="LineNr">13607 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;) &quot;</span>)
<span id="L13608" class="LineNr">13608 </span> e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
<span id="L13609" class="LineNr">13609 </span> }
@ -13047,7 +13047,7 @@ if ('onhashchange' in window) {
<span id="L13616" class="LineNr">13616 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *eax *(eax+4)) <span class="subxComment"># Stmt-var-value Stmt-var-value =&gt; eax</span>
<span id="L13617" class="LineNr">13617 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L13618" class="LineNr">13618 </span> (<a href='../081table.subx.html#L26'>get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> %eax 0xc <span class="Constant">&quot;Mu-registers&quot;</span>) <span class="subxComment"># =&gt; eax: (addr int)</span>
<span id="L13619" class="LineNr">13619 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L13619" class="LineNr">13619 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L13620" class="LineNr">13620 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32\n&quot;</span>)
<span id="L13621" class="LineNr">13621 </span><span class="Constant">$translate-mu-index-stmt-with-array-in-register:end</span>:
<span id="L13622" class="LineNr">13622 </span> <span class="subxS1Comment"># . restore registers</span>
@ -13105,13 +13105,13 @@ if ('onhashchange' in window) {
<span id="L13674" class="LineNr">13674 </span> <span class="subxComment"># TODO: ensure size is a power of 2</span>
<span id="L13675" class="LineNr">13675 </span> (<a href='mu.subx.html#L13369'>array-element-size</a> %ecx *(ebp+0x10) *(ebp+0x14)) <span class="subxComment"># =&gt; eax</span>
<span id="L13676" class="LineNr">13676 </span> (<a href='mu.subx.html#L13989'>num-shift-rights</a> %eax) <span class="subxComment"># =&gt; eax</span>
<span id="L13677" class="LineNr">13677 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13677" class="LineNr">13677 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13678" class="LineNr">13678 </span> <span class="subxComment">#</span>
<span id="L13679" class="LineNr">13679 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot; + &quot;</span>)
<span id="L13680" class="LineNr">13680 </span> <span class="subxComment">#</span>
<span id="L13681" class="LineNr">13681 </span> 8b/-&gt; *(ecx+0x14) 0/r32/eax <span class="subxComment"># Var-offset</span>
<span id="L13682" class="LineNr">13682 </span> 05/add-to-eax 4/imm32 <span class="subxComment"># for array length</span>
<span id="L13683" class="LineNr">13683 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13683" class="LineNr">13683 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13684" class="LineNr">13684 </span> e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
<span id="L13685" class="LineNr">13685 </span> }
<span id="L13686" class="LineNr">13686 </span> <span class="subxComment"># if index-&gt;type is any other atom, abort</span>
@ -13153,7 +13153,7 @@ if ('onhashchange' in window) {
<span id="L13722" class="LineNr">13722 </span> 05/add-to-eax 4/imm32
<span id="L13723" class="LineNr">13723 </span> <span class="subxComment"># TODO: check edx for overflow</span>
<span id="L13724" class="LineNr">13724 </span> <span class="subxComment"># print offset</span>
<span id="L13725" class="LineNr">13725 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13725" class="LineNr">13725 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13726" class="LineNr">13726 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;) &quot;</span>)
<span id="L13727" class="LineNr">13727 </span> e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
<span id="L13728" class="LineNr">13728 </span> }
@ -13166,7 +13166,7 @@ if ('onhashchange' in window) {
<span id="L13735" class="LineNr">13735 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *eax *(eax+4)) <span class="subxComment"># Stmt-var-value Stmt-var-value =&gt; eax</span>
<span id="L13736" class="LineNr">13736 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L13737" class="LineNr">13737 </span> (<a href='../081table.subx.html#L26'>get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> %eax 0xc <span class="Constant">&quot;Mu-registers&quot;</span>) <span class="subxComment"># =&gt; eax: (addr int)</span>
<span id="L13738" class="LineNr">13738 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L13738" class="LineNr">13738 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L13739" class="LineNr">13739 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32\n&quot;</span>)
<span id="L13740" class="LineNr">13740 </span><span class="Constant">$translate-mu-index-stmt-with-array-on-stack:end</span>:
<span id="L13741" class="LineNr">13741 </span> <span class="subxS1Comment"># . restore registers</span>
@ -13206,7 +13206,7 @@ if ('onhashchange' in window) {
<span id="L13775" class="LineNr">13775 </span> 89/&lt;- %ebx 0/r32/eax
<span id="L13776" class="LineNr">13776 </span> <span class="subxComment"># print array-element-size(base)</span>
<span id="L13777" class="LineNr">13777 </span> (<a href='mu.subx.html#L13369'>array-element-size</a> %ebx *(ebp+0x10) *(ebp+0x14)) <span class="subxComment"># =&gt; eax</span>
<span id="L13778" class="LineNr">13778 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L13778" class="LineNr">13778 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L13779" class="LineNr">13779 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/imm32 &quot;</span>)
<span id="L13780" class="LineNr">13780 </span><span class="Constant">$translate-mu-compute-index-stmt:emit-output</span>:
<span id="L13781" class="LineNr">13781 </span> <span class="subxComment"># outputs[0] &quot;/r32&quot;</span>
@ -13214,7 +13214,7 @@ if ('onhashchange' in window) {
<span id="L13783" class="LineNr">13783 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *eax *(eax+4)) <span class="subxComment"># Stmt-var-value Stmt-var-value =&gt; eax</span>
<span id="L13784" class="LineNr">13784 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L13785" class="LineNr">13785 </span> (<a href='../081table.subx.html#L26'>get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> %eax 0xc <span class="Constant">&quot;Mu-registers&quot;</span>) <span class="subxComment"># =&gt; eax: (addr int)</span>
<span id="L13786" class="LineNr">13786 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L13786" class="LineNr">13786 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L13787" class="LineNr">13787 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32\n&quot;</span>)
<span id="L13788" class="LineNr">13788 </span><span class="Constant">$translate-mu-compute-index-stmt:end</span>:
<span id="L13789" class="LineNr">13789 </span> <span class="subxS1Comment"># . restore registers</span>
@ -13256,7 +13256,7 @@ if ('onhashchange' in window) {
<span id="L13825" class="LineNr">13825 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L13826" class="LineNr">13826 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) %eax)
<span id="L13827" class="LineNr">13827 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot; + &quot;</span>)
<span id="L13828" class="LineNr">13828 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %edx)
<span id="L13828" class="LineNr">13828 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %edx)
<span id="L13829" class="LineNr">13829 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;) &quot;</span>)
<span id="L13830" class="LineNr">13830 </span> e9/jump $translate-mu-get-stmt:emit-output/disp32
<span id="L13831" class="LineNr">13831 </span> }
@ -13266,7 +13266,7 @@ if ('onhashchange' in window) {
<span id="L13835" class="LineNr">13835 </span> <span class="subxComment"># emit &quot;*(ebp + &quot; inouts[0]-&gt;stack-offset + offset &quot;) &quot;</span>
<span id="L13836" class="LineNr">13836 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;*(ebp+&quot;</span>)
<span id="L13837" class="LineNr">13837 </span> 03/add *(eax+0x14) 2/r32/edx <span class="subxComment"># Var-offset</span>
<span id="L13838" class="LineNr">13838 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %edx)
<span id="L13838" class="LineNr">13838 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %edx)
<span id="L13839" class="LineNr">13839 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;) &quot;</span>)
<span id="L13840" class="LineNr">13840 </span> eb/jump $translate-mu-get-stmt:emit-output/disp8
<span id="L13841" class="LineNr">13841 </span> }
@ -13277,7 +13277,7 @@ if ('onhashchange' in window) {
<span id="L13846" class="LineNr">13846 </span> <span class="subxComment"># emit offset-&gt;register &quot;/r32&quot;</span>
<span id="L13847" class="LineNr">13847 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L13848" class="LineNr">13848 </span> (<a href='../081table.subx.html#L26'>get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> %eax 0xc <span class="Constant">&quot;Mu-registers&quot;</span>) <span class="subxComment"># =&gt; eax: (addr int)</span>
<span id="L13849" class="LineNr">13849 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L13849" class="LineNr">13849 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L13850" class="LineNr">13850 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32\n&quot;</span>)
<span id="L13851" class="LineNr">13851 </span><span class="Constant">$translate-mu-get-stmt:end</span>:
<span id="L13852" class="LineNr">13852 </span> <span class="subxS1Comment"># . restore registers</span>
@ -13369,7 +13369,7 @@ if ('onhashchange' in window) {
<span id="L13938" class="LineNr">13938 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) %eax)
<span id="L13939" class="LineNr">13939 </span> 58/pop-to-eax
<span id="L13940" class="LineNr">13940 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;' has atomic type &quot;</span>)
<span id="L13941" class="LineNr">13941 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0xc) *(eax+4)) <span class="subxComment"># Tree-value</span>
<span id="L13941" class="LineNr">13941 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0xc) *(eax+4)) <span class="subxComment"># Tree-value</span>
<span id="L13942" class="LineNr">13942 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L13943" class="LineNr">13943 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> *(ebp+0xc))
<span id="L13944" class="LineNr">13944 </span> (<a href='../059stop.subx.html#L92'>stop</a> *(ebp+0x10) 1)
@ -13455,7 +13455,7 @@ if ('onhashchange' in window) {
<span id="L14024" class="LineNr">14024 </span> <span class="subxComment"># var output-var/eax: (addr var) = second-inout-&gt;value</span>
<span id="L14025" class="LineNr">14025 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *eax *(eax+4)) <span class="subxComment"># Stmt-var-value Stmt-var-value =&gt; eax</span>
<span id="L14026" class="LineNr">14026 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;mu-get-offset: &quot;)</span>
<span id="L14027" class="LineNr">14027 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L14027" class="LineNr">14027 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L14028" class="LineNr">14028 </span><span class="CommentedCode">#? (write-buffered Stderr &quot; name: &quot;)</span>
<span id="L14029" class="LineNr">14029 </span><span class="CommentedCode">#? 50/push-eax</span>
<span id="L14030" class="LineNr">14030 </span><span class="CommentedCode">#? (lookup *eax *(eax+4)) # Var-name</span>
@ -13466,7 +13466,7 @@ if ('onhashchange' in window) {
<span id="L14035" class="LineNr">14035 </span> <span class="subxComment"># return output-var-&gt;stack-offset</span>
<span id="L14036" class="LineNr">14036 </span> 8b/-&gt; *(eax+0x14) 0/r32/eax <span class="subxComment"># Var-offset</span>
<span id="L14037" class="LineNr">14037 </span><span class="CommentedCode">#? (write-buffered Stderr &quot;=&gt; &quot;)</span>
<span id="L14038" class="LineNr">14038 </span><span class="CommentedCode">#? (print-int32-buffered Stderr %eax)</span>
<span id="L14038" class="LineNr">14038 </span><span class="CommentedCode">#? (write-int32-hex-buffered Stderr %eax)</span>
<span id="L14039" class="LineNr">14039 </span><span class="CommentedCode">#? (write-buffered Stderr Newline)</span>
<span id="L14040" class="LineNr">14040 </span><span class="CommentedCode">#? (flush Stderr)</span>
<span id="L14041" class="LineNr">14041 </span><span class="Constant">$emit-get-offset:end</span>:
@ -16621,7 +16621,7 @@ if ('onhashchange' in window) {
<span id="L17190" class="LineNr">17190 </span><span class="Constant">$get-stmt-operand-from-arg-location:abort</span>:
<span id="L17191" class="LineNr">17191 </span> <span class="subxComment"># error(&quot;invalid arg-location &quot; eax)</span>
<span id="L17192" class="LineNr">17192 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0x10) <span class="Constant">&quot;invalid arg-location &quot;</span>)
<span id="L17193" class="LineNr">17193 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+0x10) %eax)
<span id="L17193" class="LineNr">17193 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+0x10) %eax)
<span id="L17194" class="LineNr">17194 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0x10) <span class="SpecialChar"><a href='../051test.subx.html#L82'>Newline</a></span>)
<span id="L17195" class="LineNr">17195 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> *(ebp+0x10))
<span id="L17196" class="LineNr">17196 </span> (<a href='../059stop.subx.html#L92'>stop</a> *(ebp+0x14) 1)
@ -16643,7 +16643,7 @@ if ('onhashchange' in window) {
<span id="L17212" class="LineNr">17212 </span> (<a href='../069allocate.subx.html#L256'>lookup</a> *(eax+0x18) *(eax+0x1c)) <span class="subxComment"># Var-register Var-register =&gt; eax</span>
<span id="L17213" class="LineNr">17213 </span> (<a href='../081table.subx.html#L1800'>maybe-get</a> <span class="SpecialChar"><a href='mu.subx.html#L8756'>Mu-registers</a></span> %eax 0xc) <span class="subxComment"># =&gt; eax: (addr register-index)</span>
<span id="L17214" class="LineNr">17214 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="SpecialChar"><a href='../051test.subx.html#L93'>Space</a></span>)
<span id="L17215" class="LineNr">17215 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *eax)
<span id="L17215" class="LineNr">17215 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *eax)
<span id="L17216" class="LineNr">17216 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;/r32&quot;</span>)
<span id="L17217" class="LineNr">17217 </span><span class="Constant">$emit-subx-r32:end</span>:
<span id="L17218" class="LineNr">17218 </span> <span class="subxS1Comment"># . restore registers</span>
@ -16857,7 +16857,7 @@ if ('onhashchange' in window) {
<span id="L17426" class="LineNr">17426 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot; *(&quot;</span>)
<span id="L17427" class="LineNr">17427 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) %esi)
<span id="L17428" class="LineNr">17428 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;+&quot;</span>)
<span id="L17429" class="LineNr">17429 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %eax)
<span id="L17429" class="LineNr">17429 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %eax)
<span id="L17430" class="LineNr">17430 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;)&quot;</span>)
<span id="L17431" class="LineNr">17431 </span> <span class="subxComment"># i += 4</span>
<span id="L17432" class="LineNr">17432 </span> 05/add-to-eax 4/imm32
@ -16897,7 +16897,7 @@ if ('onhashchange' in window) {
<span id="L17466" class="LineNr">17466 </span> 7d/jump-if-&gt;= <span class="Constant">break</span>/disp8
<span id="L17467" class="LineNr">17467 </span> <span class="subxComment"># emit &quot; *(ebp+&quot; curr &quot;)&quot;</span>
<span id="L17468" class="LineNr">17468 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot; *(ebp+&quot;</span>)
<span id="L17469" class="LineNr">17469 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) %ecx)
<span id="L17469" class="LineNr">17469 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) %ecx)
<span id="L17470" class="LineNr">17470 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;)&quot;</span>)
<span id="L17471" class="LineNr">17471 </span> <span class="subxComment"># i += 4</span>
<span id="L17472" class="LineNr">17472 </span> 81 0/subop/add %ecx 4/imm32
@ -16960,7 +16960,7 @@ if ('onhashchange' in window) {
<span id="L17529" class="LineNr">17529 </span><span class="Constant">$emit-subx-var-as-rm32:stack</span>:
<span id="L17530" class="LineNr">17530 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="SpecialChar"><a href='../051test.subx.html#L93'>Space</a></span>)
<span id="L17531" class="LineNr">17531 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;*(ebp+&quot;</span>)
<span id="L17532" class="LineNr">17532 </span> (<a href='../066print-int.subx.html#L266'>print-int32-buffered</a> *(ebp+8) *(esi+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L17532" class="LineNr">17532 </span> (<a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a> *(ebp+8) *(esi+0x14)) <span class="subxComment"># Var-offset</span>
<span id="L17533" class="LineNr">17533 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">&quot;)&quot;</span>)
<span id="L17534" class="LineNr">17534 </span> }
<span id="L17535" class="LineNr">17535 </span><span class="Constant">$emit-subx-var-as-rm32:end</span>:

View File

@ -72,7 +72,7 @@ if ('onhashchange' in window) {
<span id="L14" class="LineNr">14 </span> compare n, <span class="Constant">1</span>
<span id="L15" class="LineNr">15 </span> <span class="Delimiter">{</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;usage: <a href='parse-int.mu.html#L28'>parse-int</a> &lt;integer&gt;\n&quot;</span>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;usage: <a href='parse-int.mu.html#L28'>parse-int</a> &lt;integer&gt;\n&quot;</span>
<span id="L18" class="LineNr">18 </span> exit-status <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L19" class="LineNr">19 </span> <span class="PreProc">break</span> $main-body
<span id="L20" class="LineNr">20 </span> <span class="Delimiter">}</span>
@ -99,7 +99,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr">41 </span> <span class="PreProc">var</span> c/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L42" class="LineNr">42 </span> c <span class="SpecialChar">&lt;-</span> copy-byte *tmp
<span id="L43" class="LineNr">43 </span> <span class="Comment">#</span>
<span id="L44" class="LineNr">44 </span> <span class="PreProc">var</span> digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075print-int-decimal.subx.html#L405'>to-decimal-digit</a> c
<span id="L44" class="LineNr">44 </span> <span class="PreProc">var</span> digit/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../075write-int-decimal.subx.html#L405'>to-decimal-digit</a> c
<span id="L45" class="LineNr">45 </span> out <span class="SpecialChar">&lt;-</span> add digit
<span id="L46" class="LineNr">46 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L47" class="LineNr">47 </span> <span class="PreProc">loop</span>

View File

@ -72,7 +72,7 @@ if ('onhashchange' in window) {
<span id="L14" class="LineNr">14 </span> compare n, <span class="Constant">1</span>
<span id="L15" class="LineNr">15 </span> <span class="Delimiter">{</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;usage: cat &lt;filename&gt;\n&quot;</span>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;usage: cat &lt;filename&gt;\n&quot;</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">break</span> $main-body
<span id="L19" class="LineNr">19 </span> <span class="Delimiter">}</span>
<span id="L20" class="LineNr">20 </span> <span class="Delimiter">{</span>
@ -83,13 +83,13 @@ if ('onhashchange' in window) {
<span id="L25" class="LineNr">25 </span> <span class="PreProc">var</span> addr-in/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> address in
<span id="L26" class="LineNr">26 </span> <a href='../105files.subx.html#L3'>open</a> *filename, <span class="Constant">0</span>, addr-in
<span id="L27" class="LineNr">27 </span> <span class="Delimiter">}</span>
<span id="L28" class="LineNr">28 </span> <span class="PreProc">var</span> _in-addr/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../069allocate.subx.html#L258'>lookup</a> in
<span id="L28" class="LineNr">28 </span> <span class="PreProc">var</span> _in-addr/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../069allocate.subx.html#L256'>lookup</a> in
<span id="L29" class="LineNr">29 </span> <span class="PreProc">var</span> in-addr/<span class="Constant">ecx</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> copy _in-addr
<span id="L30" class="LineNr">30 </span> <span class="Delimiter">{</span>
<span id="L31" class="LineNr">31 </span> <span class="PreProc">var</span> c/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> <a href='../061read-byte.subx.html#L38'>read-byte-buffered</a> in-addr
<span id="L32" class="LineNr">32 </span> compare c, <span class="Constant">0xffffffff</span> <span class="Comment"># EOF marker</span>
<span id="L33" class="LineNr">33 </span> <span class="PreProc">break-if-=</span>
<span id="L34" class="LineNr">34 </span> <a href='../103screen.subx.html#L135'>print-byte</a> c
<span id="L34" class="LineNr">34 </span> <a href='../103screen.subx.html#L135'>print-byte-to-screen</a> c
<span id="L35" class="LineNr">35 </span> <span class="PreProc">loop</span>
<span id="L36" class="LineNr">36 </span> <span class="Delimiter">}</span>
<span id="L37" class="LineNr">37 </span> <span class="Delimiter">}</span>

View File

@ -84,12 +84,12 @@ if ('onhashchange' in window) {
<span id="L26" class="LineNr">26 </span> ba/copy-to-edx 4/imm32/size
<span id="L27" class="LineNr">27 </span> e8/call syscall_read/disp32
<span id="L28" class="LineNr">28 </span>
<span id="L29" class="LineNr">29 </span> <span class="subxComment"># print-int32-buffered(Stdout, *N)</span>
<span id="L29" class="LineNr">29 </span> <span class="subxComment"># write-int32-hex-buffered(Stdout, *N)</span>
<span id="L30" class="LineNr">30 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L31" class="LineNr">31 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='random.subx.html#L53'>N</a></span>/disp32 <span class="subxComment"># push *N</span>
<span id="L32" class="LineNr">32 </span> 68/push <span class="SpecialChar"><a href='../064write-byte.subx.html#L10'>Stdout</a></span>/imm32
<span id="L33" class="LineNr">33 </span> <span class="subxS2Comment"># . . call</span>
<span id="L34" class="LineNr">34 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L34" class="LineNr">34 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L35" class="LineNr">35 </span>
<span id="L36" class="LineNr">36 </span> <span class="subxComment"># write-buffered(Stdout, Newline)</span>
<span id="L37" class="LineNr">37 </span> <span class="subxS2Comment"># . . push args</span>

View File

@ -1223,12 +1223,12 @@ if ('onhashchange' in window) {
<span id="L1423" class="LineNr">1423 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L1424" class="LineNr">1424 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1425" class="LineNr">1425 </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="L1426" class="LineNr">1426 </span> <span class="subxComment"># print-int32-buffered(out, *reg-num)</span>
<span id="L1426" class="LineNr">1426 </span> <span class="subxComment"># write-int32-hex-buffered(out, *reg-num)</span>
<span id="L1427" class="LineNr">1427 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1428" class="LineNr">1428 </span> ff 6/subop/push 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># push *eax</span>
<span id="L1429" class="LineNr">1429 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L1430" class="LineNr">1430 </span> <span class="subxS2Comment"># . . call</span>
<span id="L1431" class="LineNr">1431 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L1431" class="LineNr">1431 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L1432" class="LineNr">1432 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1433" class="LineNr">1433 </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="L1434" class="LineNr">1434 </span> <span class="subxComment"># write-buffered(out, &quot;/rm32&quot;)</span>
@ -2292,12 +2292,12 @@ if ('onhashchange' in window) {
<span id="L2542" class="LineNr">2542 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L2543" class="LineNr">2543 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2544" class="LineNr">2544 </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="L2545" class="LineNr">2545 </span> <span class="subxS1Comment"># . print-int32-buffered(out, eax)</span>
<span id="L2545" class="LineNr">2545 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, eax)</span>
<span id="L2546" class="LineNr">2546 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2547" class="LineNr">2547 </span> 50/push-eax
<span id="L2548" class="LineNr">2548 </span> 68/push <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L2549" class="LineNr">2549 </span> <span class="subxS2Comment"># . . call</span>
<span id="L2550" class="LineNr">2550 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L2550" class="LineNr">2550 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L2551" class="LineNr">2551 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2552" class="LineNr">2552 </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="L2553" class="LineNr">2553 </span> <span class="subxS1Comment"># . write-buffered(Stderr, &quot;\n&quot;)</span>
@ -2330,12 +2330,12 @@ if ('onhashchange' in window) {
<span id="L2580" class="LineNr">2580 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L2581" class="LineNr">2581 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2582" class="LineNr">2582 </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="L2583" class="LineNr">2583 </span> <span class="subxS1Comment"># . print-int32-buffered(out, eax)</span>
<span id="L2583" class="LineNr">2583 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, eax)</span>
<span id="L2584" class="LineNr">2584 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2585" class="LineNr">2585 </span> 50/push-eax
<span id="L2586" class="LineNr">2586 </span> 68/push <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L2587" class="LineNr">2587 </span> <span class="subxS2Comment"># . . call</span>
<span id="L2588" class="LineNr">2588 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L2588" class="LineNr">2588 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L2589" class="LineNr">2589 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2590" class="LineNr">2590 </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="L2591" class="LineNr">2591 </span> <span class="subxS1Comment"># . write-buffered(Stderr, &quot;\n&quot;)</span>
@ -2368,12 +2368,12 @@ if ('onhashchange' in window) {
<span id="L2618" class="LineNr">2618 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L2619" class="LineNr">2619 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2620" class="LineNr">2620 </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="L2621" class="LineNr">2621 </span> <span class="subxS1Comment"># . print-int32-buffered(out, eax)</span>
<span id="L2621" class="LineNr">2621 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, eax)</span>
<span id="L2622" class="LineNr">2622 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2623" class="LineNr">2623 </span> 50/push-eax
<span id="L2624" class="LineNr">2624 </span> 68/push <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L2625" class="LineNr">2625 </span> <span class="subxS2Comment"># . . call</span>
<span id="L2626" class="LineNr">2626 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L2626" class="LineNr">2626 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L2627" class="LineNr">2627 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2628" class="LineNr">2628 </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="L2629" class="LineNr">2629 </span> <span class="subxS1Comment"># . write-buffered(Stderr, &quot;\n&quot;)</span>
@ -2406,12 +2406,12 @@ if ('onhashchange' in window) {
<span id="L2656" class="LineNr">2656 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L2657" class="LineNr">2657 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2658" class="LineNr">2658 </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="L2659" class="LineNr">2659 </span> <span class="subxS1Comment"># . print-int32-buffered(out, eax)</span>
<span id="L2659" class="LineNr">2659 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, eax)</span>
<span id="L2660" class="LineNr">2660 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2661" class="LineNr">2661 </span> 50/push-eax
<span id="L2662" class="LineNr">2662 </span> 68/push <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L2663" class="LineNr">2663 </span> <span class="subxS2Comment"># . . call</span>
<span id="L2664" class="LineNr">2664 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L2664" class="LineNr">2664 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L2665" class="LineNr">2665 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2666" class="LineNr">2666 </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="L2667" class="LineNr">2667 </span> <span class="subxS1Comment"># . write-buffered(Stderr, &quot;; expected ')' to wrap up\n&quot;)</span>
@ -2941,12 +2941,12 @@ if ('onhashchange' in window) {
<span id="L3191" class="LineNr">3191 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3192" class="LineNr">3192 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3193" class="LineNr">3193 </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="L3194" class="LineNr">3194 </span> <span class="subxS1Comment"># . print-int32-buffered(out, base)</span>
<span id="L3194" class="LineNr">3194 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, base)</span>
<span id="L3195" class="LineNr">3195 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3196" class="LineNr">3196 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L3197" class="LineNr">3197 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3198" class="LineNr">3198 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3199" class="LineNr">3199 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3199" class="LineNr">3199 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3200" class="LineNr">3200 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3201" class="LineNr">3201 </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="L3202" class="LineNr">3202 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/base &quot;)</span>
@ -2957,12 +2957,12 @@ if ('onhashchange' in window) {
<span id="L3207" class="LineNr">3207 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3208" class="LineNr">3208 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3209" class="LineNr">3209 </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="L3210" class="LineNr">3210 </span> <span class="subxS1Comment"># . print-int32-buffered(out, index)</span>
<span id="L3210" class="LineNr">3210 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, index)</span>
<span id="L3211" class="LineNr">3211 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3212" class="LineNr">3212 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+16)</span>
<span id="L3213" class="LineNr">3213 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3214" class="LineNr">3214 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3215" class="LineNr">3215 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3215" class="LineNr">3215 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3216" class="LineNr">3216 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3217" class="LineNr">3217 </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="L3218" class="LineNr">3218 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/index &quot;)</span>
@ -2973,12 +2973,12 @@ if ('onhashchange' in window) {
<span id="L3223" class="LineNr">3223 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3224" class="LineNr">3224 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3225" class="LineNr">3225 </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="L3226" class="LineNr">3226 </span> <span class="subxS1Comment"># . print-int32-buffered(out, scale)</span>
<span id="L3226" class="LineNr">3226 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, scale)</span>
<span id="L3227" class="LineNr">3227 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3228" class="LineNr">3228 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+20)</span>
<span id="L3229" class="LineNr">3229 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3230" class="LineNr">3230 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3231" class="LineNr">3231 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3231" class="LineNr">3231 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3232" class="LineNr">3232 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3233" class="LineNr">3233 </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="L3234" class="LineNr">3234 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/scale &quot;)</span>
@ -2989,12 +2989,12 @@ if ('onhashchange' in window) {
<span id="L3239" class="LineNr">3239 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3240" class="LineNr">3240 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3241" class="LineNr">3241 </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="L3242" class="LineNr">3242 </span> <span class="subxS1Comment"># . print-int32-buffered(out, disp)</span>
<span id="L3242" class="LineNr">3242 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, disp)</span>
<span id="L3243" class="LineNr">3243 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3244" class="LineNr">3244 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x18/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+24)</span>
<span id="L3245" class="LineNr">3245 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3246" class="LineNr">3246 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3247" class="LineNr">3247 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3247" class="LineNr">3247 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3248" class="LineNr">3248 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3249" class="LineNr">3249 </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="L3250" class="LineNr">3250 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/disp32&quot;)</span>
@ -3020,12 +3020,12 @@ if ('onhashchange' in window) {
<span id="L3270" class="LineNr">3270 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3271" class="LineNr">3271 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3272" class="LineNr">3272 </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="L3273" class="LineNr">3273 </span> <span class="subxS1Comment"># . print-int32-buffered(out, base)</span>
<span id="L3273" class="LineNr">3273 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, base)</span>
<span id="L3274" class="LineNr">3274 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3275" class="LineNr">3275 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L3276" class="LineNr">3276 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3277" class="LineNr">3277 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3278" class="LineNr">3278 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3278" class="LineNr">3278 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3279" class="LineNr">3279 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3280" class="LineNr">3280 </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="L3281" class="LineNr">3281 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/rm32 &quot;)</span>
@ -3036,12 +3036,12 @@ if ('onhashchange' in window) {
<span id="L3286" class="LineNr">3286 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3287" class="LineNr">3287 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3288" class="LineNr">3288 </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="L3289" class="LineNr">3289 </span> <span class="subxS1Comment"># . print-int32-buffered(out, disp)</span>
<span id="L3289" class="LineNr">3289 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, disp)</span>
<span id="L3290" class="LineNr">3290 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3291" class="LineNr">3291 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x18/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+24)</span>
<span id="L3292" class="LineNr">3292 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3293" class="LineNr">3293 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3294" class="LineNr">3294 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3294" class="LineNr">3294 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3295" class="LineNr">3295 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3296" class="LineNr">3296 </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="L3297" class="LineNr">3297 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/disp32&quot;)</span>
@ -3063,12 +3063,12 @@ if ('onhashchange' in window) {
<span id="L3313" class="LineNr">3313 </span> e8/call <a href='../065write-buffered.subx.html#L8'>write-buffered</a>/disp32
<span id="L3314" class="LineNr">3314 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3315" class="LineNr">3315 </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="L3316" class="LineNr">3316 </span> <span class="subxS1Comment"># . print-int32-buffered(out, base)</span>
<span id="L3316" class="LineNr">3316 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(out, base)</span>
<span id="L3317" class="LineNr">3317 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3318" class="LineNr">3318 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L3319" class="LineNr">3319 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
<span id="L3320" class="LineNr">3320 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3321" class="LineNr">3321 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L3321" class="LineNr">3321 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L3322" class="LineNr">3322 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3323" class="LineNr">3323 </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="L3324" class="LineNr">3324 </span> <span class="subxS1Comment"># . write-buffered(out, &quot;/rm32&quot;)</span>
@ -3703,12 +3703,12 @@ if ('onhashchange' in window) {
<span id="L4128" class="LineNr">4128 </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> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L4129" class="LineNr">4129 </span> <span class="subxS2Comment"># . . restore eax</span>
<span id="L4130" class="LineNr">4130 </span> 58/pop-to-eax
<span id="L4131" class="LineNr">4131 </span> <span class="subxS1Comment"># . print-int32-buffered(Stderr, eax)</span>
<span id="L4131" class="LineNr">4131 </span> <span class="subxS1Comment"># . write-int32-hex-buffered(Stderr, eax)</span>
<span id="L4132" class="LineNr">4132 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4133" class="LineNr">4133 </span> 50/push-eax
<span id="L4134" class="LineNr">4134 </span> 68/push <span class="SpecialChar"><a href='../065write-buffered.subx.html#L209'>Stderr</a></span>/imm32
<span id="L4135" class="LineNr">4135 </span> <span class="subxS2Comment"># . . call</span>
<span id="L4136" class="LineNr">4136 </span> e8/call <a href='../066print-int.subx.html#L266'>print-int32-buffered</a>/disp32
<span id="L4136" class="LineNr">4136 </span> e8/call <a href='../066write-int-hex.subx.html#L266'>write-int32-hex-buffered</a>/disp32
<span id="L4137" class="LineNr">4137 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4138" class="LineNr">4138 </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="L4139" class="LineNr">4139 </span> <span class="subxS1Comment"># . flush(Stderr)</span>

View File

@ -66,11 +66,11 @@ if ('onhashchange' in window) {
<span id="L12" class="LineNr">12 </span>
<span id="L13" class="LineNr">13 </span><span class="subxComment"># number of labels we can translate to addresses</span>
<span id="L14" class="LineNr">14 </span><span class="SpecialChar">Max-labels</span>:
<span id="L15" class="LineNr">15 </span> 0x30000/imm32/8K-labels/192KB
<span id="L15" class="LineNr">15 </span> 0x30000/imm32/24K-labels/192KB
<span id="L16" class="LineNr">16 </span>
<span id="L17" class="LineNr">17 </span><span class="subxComment"># capacity of trace-stream</span>
<span id="L18" class="LineNr">18 </span><span class="SpecialChar">Trace-size</span>:
<span id="L19" class="LineNr">19 </span> 0x100000/imm32/1MB
<span id="L19" class="LineNr">19 </span> 0x200000/imm32/2MB
</pre>
</body>
</html>

View File

@ -407,7 +407,7 @@ if ('onhashchange' in window) {
<span id="L369" class="LineNr"> 369 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'code' has size 0x00000005.&quot;, msg)</span>
<span id="L370" class="LineNr"> 370 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L371" class="LineNr"> 371 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L222'>test-subx-survey-computes-addresses</a>/2&quot;</span>/imm32
<span id="L372" class="LineNr"> 372 </span> 68/push <span class="Constant">&quot;segment 'code' has size 0x00000005.&quot;</span>/imm32
<span id="L372" class="LineNr"> 372 </span> 68/push <span class="Constant">&quot;segment 'code' has <a href='../106size.subx.html#L5'>size</a> 0x00000005.&quot;</span>/imm32
<span id="L373" class="LineNr"> 373 </span> <span class="subxS2Comment"># . . call</span>
<span id="L374" class="LineNr"> 374 </span> e8/call <a href='../056trace.subx.html#L253'>check-trace-contains</a>/disp32
<span id="L375" class="LineNr"> 375 </span> <span class="subxS2Comment"># . . discard args</span>
@ -1001,7 +1001,7 @@ if ('onhashchange' in window) {
<span id="L1060" class="LineNr">1060 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'code' has size 0x00000005&quot;, msg)</span>
<span id="L1061" class="LineNr">1061 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1062" class="LineNr">1062 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L927'>test-compute-offsets</a>/1&quot;</span>/imm32
<span id="L1063" class="LineNr">1063 </span> 68/push <span class="Constant">&quot;segment 'code' has size 0x00000005.&quot;</span>/imm32
<span id="L1063" class="LineNr">1063 </span> 68/push <span class="Constant">&quot;segment 'code' has <a href='../106size.subx.html#L5'>size</a> 0x00000005.&quot;</span>/imm32
<span id="L1064" class="LineNr">1064 </span> <span class="subxS2Comment"># . . call</span>
<span id="L1065" class="LineNr">1065 </span> e8/call <a href='../056trace.subx.html#L253'>check-trace-contains</a>/disp32
<span id="L1066" class="LineNr">1066 </span> <span class="subxS2Comment"># . . discard args</span>
@ -1017,7 +1017,7 @@ if ('onhashchange' in window) {
<span id="L1076" class="LineNr">1076 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'data' has size 0x00000002.&quot;, msg)</span>
<span id="L1077" class="LineNr">1077 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1078" class="LineNr">1078 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L927'>test-compute-offsets</a>/3&quot;</span>/imm32
<span id="L1079" class="LineNr">1079 </span> 68/push <span class="Constant">&quot;segment 'data' has size 0x00000002.&quot;</span>/imm32
<span id="L1079" class="LineNr">1079 </span> 68/push <span class="Constant">&quot;segment 'data' has <a href='../106size.subx.html#L5'>size</a> 0x00000002.&quot;</span>/imm32
<span id="L1080" class="LineNr">1080 </span> <span class="subxS2Comment"># . . call</span>
<span id="L1081" class="LineNr">1081 </span> e8/call <a href='../056trace.subx.html#L253'>check-trace-contains</a>/disp32
<span id="L1082" class="LineNr">1082 </span> <span class="subxS2Comment"># . . discard args</span>
@ -3134,12 +3134,12 @@ if ('onhashchange' in window) {
<span id="L3628" class="LineNr">3628 </span> e8/call <a href='../057write.subx.html#L24'>write</a>/disp32
<span id="L3629" class="LineNr">3629 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3630" class="LineNr">3630 </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="L3631" class="LineNr">3631 </span> <span class="subxComment"># print-int32(*Trace-stream, n4)</span>
<span id="L3631" class="LineNr">3631 </span> <span class="subxComment"># write-int32-hex(*Trace-stream, n4)</span>
<span id="L3632" class="LineNr">3632 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3633" class="LineNr">3633 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+20)</span>
<span id="L3634" class="LineNr">3634 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='../056trace.subx.html#L21'>Trace-stream</a></span>/disp32 <span class="subxComment"># push *Trace-stream</span>
<span id="L3635" class="LineNr">3635 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3636" class="LineNr">3636 </span> e8/call <a href='../066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L3636" class="LineNr">3636 </span> e8/call <a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L3637" class="LineNr">3637 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3638" class="LineNr">3638 </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="L3639" class="LineNr">3639 </span> <span class="subxComment"># trace(s5) # implicitly adds a newline and finalizes the trace line</span>
@ -3200,12 +3200,12 @@ if ('onhashchange' in window) {
<span id="L3719" class="LineNr">3719 </span> e8/call <a href='../057write.subx.html#L24'>write</a>/disp32
<span id="L3720" class="LineNr">3720 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3721" class="LineNr">3721 </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="L3722" class="LineNr">3722 </span> <span class="subxComment"># print-int32(*Trace-stream, n2)</span>
<span id="L3722" class="LineNr">3722 </span> <span class="subxComment"># write-int32-hex(*Trace-stream, n2)</span>
<span id="L3723" class="LineNr">3723 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3724" class="LineNr">3724 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L3725" class="LineNr">3725 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='../056trace.subx.html#L21'>Trace-stream</a></span>/disp32 <span class="subxComment"># push *Trace-stream</span>
<span id="L3726" class="LineNr">3726 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3727" class="LineNr">3727 </span> e8/call <a href='../066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L3727" class="LineNr">3727 </span> e8/call <a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L3728" class="LineNr">3728 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3729" class="LineNr">3729 </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="L3730" class="LineNr">3730 </span> <span class="subxComment"># write(*Trace-stream, s3)</span>
@ -3216,12 +3216,12 @@ if ('onhashchange' in window) {
<span id="L3735" class="LineNr">3735 </span> e8/call <a href='../057write.subx.html#L24'>write</a>/disp32
<span id="L3736" class="LineNr">3736 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3737" class="LineNr">3737 </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="L3738" class="LineNr">3738 </span> <span class="subxComment"># print-int32(*Trace-stream, n4)</span>
<span id="L3738" class="LineNr">3738 </span> <span class="subxComment"># write-int32-hex(*Trace-stream, n4)</span>
<span id="L3739" class="LineNr">3739 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3740" class="LineNr">3740 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+20)</span>
<span id="L3741" class="LineNr">3741 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='../056trace.subx.html#L21'>Trace-stream</a></span>/disp32 <span class="subxComment"># push *Trace-stream</span>
<span id="L3742" class="LineNr">3742 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3743" class="LineNr">3743 </span> e8/call <a href='../066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L3743" class="LineNr">3743 </span> e8/call <a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L3744" class="LineNr">3744 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3745" class="LineNr">3745 </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="L3746" class="LineNr">3746 </span> <span class="subxComment"># trace(s5) # implicitly adds a newline and finalizes the trace line</span>
@ -3398,12 +3398,12 @@ if ('onhashchange' in window) {
<span id="L3967" class="LineNr">3967 </span> e8/call <a href='../057write.subx.html#L24'>write</a>/disp32
<span id="L3968" class="LineNr">3968 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3969" class="LineNr">3969 </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="L3970" class="LineNr">3970 </span> <span class="subxComment"># print-int32(*Trace-stream, n4)</span>
<span id="L3970" class="LineNr">3970 </span> <span class="subxComment"># write-int32-hex(*Trace-stream, n4)</span>
<span id="L3971" class="LineNr">3971 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3972" class="LineNr">3972 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+20)</span>
<span id="L3973" class="LineNr">3973 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="SpecialChar"><a href='../056trace.subx.html#L21'>Trace-stream</a></span>/disp32 <span class="subxComment"># push *Trace-stream</span>
<span id="L3974" class="LineNr">3974 </span> <span class="subxS2Comment"># . . call</span>
<span id="L3975" class="LineNr">3975 </span> e8/call <a href='../066print-int.subx.html#L178'>print-int32</a>/disp32
<span id="L3975" class="LineNr">3975 </span> e8/call <a href='../066write-int-hex.subx.html#L178'>write-int32-hex</a>/disp32
<span id="L3976" class="LineNr">3976 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3977" class="LineNr">3977 </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="L3978" class="LineNr">3978 </span> <span class="subxComment"># trace(s5) # implicitly adds a newline and finalizes the trace line</span>

30
html/apps/tui.mu.html generated
View File

@ -67,26 +67,26 @@ if ('onhashchange' in window) {
<span id="L9" class="LineNr"> 9 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L10" class="LineNr">10 </span> nrows, ncols <span class="SpecialChar">&lt;-</span> <a href='../103screen.subx.html#L37'>screen-size</a>
<span id="L11" class="LineNr">11 </span> <a href='../103screen.subx.html#L6'>enable-screen-grid-mode</a>
<span id="L12" class="LineNr">12 </span> <a href='../103screen.subx.html#L91'>move-cursor</a> <span class="Constant">5</span>, <span class="Constant">35</span>
<span id="L13" class="LineNr">13 </span> <a href='../103screen.subx.html#L185'>start-color</a> <span class="Constant">1</span>, <span class="Constant">0x7a</span>
<span id="L14" class="LineNr">14 </span> <a href='../103screen.subx.html#L260'>start-blinking</a>
<span id="L15" class="LineNr">15 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;Hello world!&quot;</span>
<span id="L16" class="LineNr">16 </span> <a href='../103screen.subx.html#L170'>reset-formatting</a>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L91'>move-cursor</a> <span class="Constant">6</span>, <span class="Constant">35</span>
<span id="L18" class="LineNr">18 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;tty dimensions: &quot;</span>
<span id="L19" class="LineNr">19 </span> <a href='../103screen.subx.html#L157'>print-int32-to-screen</a> nrows
<span id="L20" class="LineNr">20 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot; rows, &quot;</span>
<span id="L21" class="LineNr">21 </span> <a href='../103screen.subx.html#L157'>print-int32-to-screen</a> ncols
<span id="L22" class="LineNr">22 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot; rows\n&quot;</span>
<span id="L12" class="LineNr">12 </span> <a href='../103screen.subx.html#L91'>move-cursor-on-screen</a> <span class="Constant">5</span>, <span class="Constant">35</span>
<span id="L13" class="LineNr">13 </span> <a href='../103screen.subx.html#L185'>start-color-on-screen</a> <span class="Constant">1</span>, <span class="Constant">0x7a</span>
<span id="L14" class="LineNr">14 </span> <a href='../103screen.subx.html#L260'>start-blinking-on-screen</a>
<span id="L15" class="LineNr">15 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;Hello world!&quot;</span>
<span id="L16" class="LineNr">16 </span> <a href='../103screen.subx.html#L170'>reset-formatting-on-screen</a>
<span id="L17" class="LineNr">17 </span> <a href='../103screen.subx.html#L91'>move-cursor-on-screen</a> <span class="Constant">6</span>, <span class="Constant">35</span>
<span id="L18" class="LineNr">18 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;tty dimensions: &quot;</span>
<span id="L19" class="LineNr">19 </span> print-int32-to-screen nrows
<span id="L20" class="LineNr">20 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot; rows, &quot;</span>
<span id="L21" class="LineNr">21 </span> print-int32-to-screen ncols
<span id="L22" class="LineNr">22 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot; rows\n&quot;</span>
<span id="L23" class="LineNr">23 </span>
<span id="L24" class="LineNr">24 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;press a key to see its code: &quot;</span>
<span id="L24" class="LineNr">24 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;press a key to see its code: &quot;</span>
<span id="L25" class="LineNr">25 </span> <a href='../104keyboard.subx.html#L6'>enable-keyboard-immediate-mode</a>
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> <a href='../104keyboard.subx.html#L122'>read-key</a>
<span id="L27" class="LineNr">27 </span> <a href='../104keyboard.subx.html#L72'>enable-keyboard-type-mode</a>
<span id="L28" class="LineNr">28 </span> <a href='../103screen.subx.html#L24'>enable-screen-type-mode</a>
<span id="L29" class="LineNr">29 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;You pressed &quot;</span>
<span id="L30" class="LineNr">30 </span> <a href='../103screen.subx.html#L157'>print-int32-to-screen</a> x
<span id="L31" class="LineNr">31 </span> <a href='../103screen.subx.html#L122'>print-string</a> <span class="Constant">&quot;\n&quot;</span>
<span id="L29" class="LineNr">29 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;You pressed &quot;</span>
<span id="L30" class="LineNr">30 </span> print-int32-to-screen x
<span id="L31" class="LineNr">31 </span> <a href='../103screen.subx.html#L122'>print-string-to-screen</a> <span class="Constant">&quot;\n&quot;</span>
<span id="L32" class="LineNr">32 </span> exit-status <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L33" class="LineNr">33 </span><span class="Delimiter">}</span>
</pre>