This commit is contained in:
Kartik Agaram 2020-11-29 13:36:32 -08:00
parent 55dfa5b985
commit 775f77c334
43 changed files with 40204 additions and 37925 deletions

View File

@ -458,7 +458,7 @@ if ('onhashchange' in window) {
<span id="L397" class="LineNr">397 </span> e8/call <a href='115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L398" class="LineNr">398 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L399" class="LineNr">399 </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="L400" class="Folded">400 </span><span class="Folded">+-- 18 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L400" class="Folded">400 </span><span class="Folded">+-- 18 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L418" class="LineNr">418 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;0x008899aa&quot;, msg)</span>
<span id="L419" class="LineNr">419 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L420" class="LineNr">420 </span> 68/push <span class="Constant">&quot;F - test-write-int32-hex-buffered&quot;</span>/imm32

View File

@ -1228,7 +1228,7 @@ if ('onhashchange' in window) {
<span id="L1167" class="LineNr">1167 </span> 8b/copy 1/mod/*+disp8 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebx+4) to eax</span>
<span id="L1168" class="LineNr">1168 </span> <span class="subxComment"># skip payload-&gt;allocid</span>
<span id="L1169" class="LineNr">1169 </span> 05/add-to-eax 4/imm32
<span id="L1170" class="Folded">1170 </span><span class="Folded">+-- 26 lines: #? # dump eax ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1170" class="Folded">1170 </span><span class="Folded">+-- 26 lines: #? # dump eax ---------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1196" class="LineNr">1196 </span> <span class="subxComment"># eax = string-equal?(eax, &quot;Abc&quot;)</span>
<span id="L1197" class="LineNr">1197 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1198" class="LineNr">1198 </span> 68/push <span class="Constant">&quot;Abc&quot;</span>/imm32

View File

@ -298,7 +298,7 @@ if ('onhashchange' in window) {
<span id="L235" class="LineNr">235 </span> e8/call <a href='126write-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="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-write-int32-decimal-negative&quot;</span>/imm32

View File

@ -493,7 +493,7 @@ if ('onhashchange' in window) {
<span id="L432" class="LineNr">432 </span> e8/call <a href='115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L433" class="LineNr">433 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L434" class="LineNr">434 </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="L435" class="Folded">435 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L435" class="Folded">435 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L461" class="LineNr">461 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;abcd/xyz&quot;)</span>
<span id="L462" class="LineNr">462 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L463" class="LineNr">463 </span> 68/push <span class="Constant">&quot;F - test-emit-non-number-with-all-hex-digits&quot;</span>/imm32

View File

@ -150,7 +150,7 @@ if ('onhashchange' in window) {
<span id="L90" class="LineNr"> 90 </span> e8/call <a href='115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L91" class="LineNr"> 91 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L92" class="LineNr"> 92 </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="L93" class="Folded"> 93 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L93" class="Folded"> 93 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L126" class="LineNr">126 </span> <span class="subxComment"># check-next-stream-line-equal(_test-output-stream, &quot;01 02 03 &quot;, msg)</span>
<span id="L127" class="LineNr">127 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L128" class="LineNr">128 </span> 68/push <span class="Constant">&quot;F - test-emit-hex-array&quot;</span>/imm32

View File

@ -95,7 +95,7 @@ if ('onhashchange' in window) {
<span id="L38" class="LineNr">38 </span> (<a href='120allocate.subx.html#L256'>lookup</a> *eax *(eax+4)) <span class="subxComment"># =&gt; eax</span>
<span id="L39" class="LineNr">39 </span> 89/&lt;- %edi 0/r32/eax
<span id="L40" class="LineNr">40 </span> <span class="subxComment">#</span>
<span id="L41" class="LineNr">41 </span> (<a href='310copy-bytes.subx.html#L5'>copy-bytes</a> %esi %edi %ecx)
<span id="L41" class="LineNr">41 </span> (<a href='310copy-bytes.subx.html#L6'>copy-bytes</a> %esi %edi %ecx)
<span id="L42" class="LineNr">42 </span> <span class="subxComment"># var offset/ecx: int = lseek(src-&gt;fd, 0, SEEK_CUR)</span>
<span id="L43" class="LineNr">43 </span> 8b/-&gt; *esi 3/r32/ebx
<span id="L44" class="LineNr">44 </span> b9/copy-to-ecx 0/imm32/offset

77
html/314divide.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 - 314divide.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; }
.LineNr { }
.subxS1Comment { color: #0000af; }
.subxFunction { color: #af5f00; text-decoration: underline; }
.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/314divide.subx'>https://github.com/akkartik/mu/blob/master/314divide.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span>== code
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span><span class="subxFunction">integer-divide</span>: <span class="subxComment"># a: int, b: int -&gt; quotient/eax: int, remainder/edx: int</span>
<span id="L4" class="LineNr"> 4 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L5" class="LineNr"> 5 </span> 55/push-ebp
<span id="L6" class="LineNr"> 6 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L7" class="LineNr"> 7 </span> <span class="subxComment"># eax = a</span>
<span id="L8" class="LineNr"> 8 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L9" class="LineNr"> 9 </span> <span class="subxComment"># edx = all 0s or all 1s</span>
<span id="L10" class="LineNr">10 </span> 99/sign-extend-eax-into-edx
<span id="L11" class="LineNr">11 </span> <span class="subxComment"># quotient, remainder = divide eax by b</span>
<span id="L12" class="LineNr">12 </span> f7 7/subop/divide-eax-edx-by *(ebp+0xc)
<span id="L13" class="LineNr">13 </span><span class="Constant">$integer-divide: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 : -->

6
html/400.mu.html generated
View File

@ -232,14 +232,16 @@ if ('onhashchange' in window) {
<span id="L177" class="LineNr">177 </span>
<span id="L178" class="LineNr">178 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L6'>stream-empty?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: boolean
<span id="L179" class="LineNr">179 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L30'>stream-full?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: boolean
<span id="L180" class="LineNr">180 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L181" class="LineNr">181 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L119'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L180" class="LineNr">180 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L181" class="LineNr">181 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L120'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L182" class="LineNr">182 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L160'>stream-first</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: byte
<span id="L183" class="LineNr">183 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L187'>stream-final</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: byte
<span id="L184" class="LineNr">184 </span>
<span id="L185" class="LineNr">185 </span><span class="muComment">#sig copy-bytes src: (addr byte), dest: (addr byte), n: int</span>
<span id="L186" class="LineNr">186 </span><span class="PreProc">sig</span> <a href='312copy.subx.html#L3'>copy-array-object</a> src: (addr array _), dest-ah: (addr handle array _)
<span id="L187" class="LineNr">187 </span><span class="PreProc">sig</span> <a href='312copy.subx.html#L17'>copy-file</a> src: (addr buffered-file), dest-ah: (addr handle buffered-file), filename: (addr array byte)
<span id="L188" class="LineNr">188 </span>
<span id="L189" class="LineNr">189 </span><span class="PreProc">sig</span> <a href='314divide.subx.html#L3'>integer-divide</a> a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int, _/<span class="Constant">edx</span>: int
</pre>
</body>
</html>

1833
html/405screen.mu.html generated

File diff suppressed because it is too large Load Diff

101
html/406int32.mu.html generated Normal file
View File

@ -0,0 +1,101 @@
<!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 - 406int32.mu</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; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Constant { color: #008787; }
.muFunction { color: #af5f00; text-decoration: underline; }
.Delimiter { color: #c000c0; }
.PreProc { color: #c000c0; }
-->
</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/406int32.mu'>https://github.com/akkartik/mu/blob/master/406int32.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># Some slow but convenient helpers</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># slow, iterative shift-left instruction</span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># preconditions: _nr &gt;= 0, _dr &gt; 0</span>
<span id="L5" class="LineNr"> 5 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406int32.mu.html#L5'>repeated-shift-left</a></span> nr: int, dr: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L6" class="LineNr"> 6 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy nr
<span id="L7" class="LineNr"> 7 </span> <span class="Delimiter">{</span>
<span id="L8" class="LineNr"> 8 </span> compare dr, <span class="Constant">0</span>
<span id="L9" class="LineNr"> 9 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L10" class="LineNr">10 </span> result <span class="SpecialChar">&lt;-</span> shift-left <span class="Constant">1</span>
<span id="L11" class="LineNr">11 </span> decrement dr
<span id="L12" class="LineNr">12 </span> <span class="PreProc">loop</span>
<span id="L13" class="LineNr">13 </span> <span class="Delimiter">}</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">return</span> result
<span id="L15" class="LineNr">15 </span><span class="Delimiter">}</span>
<span id="L16" class="LineNr">16 </span>
<span id="L17" class="LineNr">17 </span><span class="muComment"># slow, iterative shift-right instruction</span>
<span id="L18" class="LineNr">18 </span><span class="muComment"># preconditions: _nr &gt;= 0, _dr &gt; 0</span>
<span id="L19" class="LineNr">19 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406int32.mu.html#L19'>repeated-shift-right</a></span> nr: int, dr: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L20" class="LineNr">20 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy nr
<span id="L21" class="LineNr">21 </span> <span class="Delimiter">{</span>
<span id="L22" class="LineNr">22 </span> compare dr, <span class="Constant">0</span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L24" class="LineNr">24 </span> result <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">1</span>
<span id="L25" class="LineNr">25 </span> decrement dr
<span id="L26" class="LineNr">26 </span> <span class="PreProc">loop</span>
<span id="L27" class="LineNr">27 </span> <span class="Delimiter">}</span>
<span id="L28" class="LineNr">28 </span> <span class="PreProc">return</span> result
<span id="L29" class="LineNr">29 </span><span class="Delimiter">}</span>
<span id="L30" class="LineNr">30 </span>
<span id="L31" class="LineNr">31 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406int32.mu.html#L31'>abs</a></span> n: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L32" class="LineNr">32 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L33" class="LineNr">33 </span> <span class="Delimiter">{</span>
<span id="L34" class="LineNr">34 </span> compare n, <span class="Constant">0</span>
<span id="L35" class="LineNr">35 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L36" class="LineNr">36 </span> result <span class="SpecialChar">&lt;-</span> negate
<span id="L37" class="LineNr">37 </span> <span class="Delimiter">}</span>
<span id="L38" class="LineNr">38 </span> <span class="PreProc">return</span> result
<span id="L39" class="LineNr">39 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -1,174 +0,0 @@
<!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 - 406try-divide.mu</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; }
.CommentedCode { color: #8a8a8a; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Constant { color: #008787; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muTest { color: #5f8700; }
.Delimiter { color: #c000c0; }
.PreProc { color: #c000c0; }
-->
</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/406try-divide.mu'>https://github.com/akkartik/mu/blob/master/406try-divide.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># slow, iterative divide instruction</span>
<span id="L2" class="LineNr"> 2 </span><span class="muComment"># preconditions: _nr &gt;= 0, _dr &gt; 0</span>
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406try-divide.mu.html#L3'>try-divide</a></span> _nr: int, _dr: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L4" class="LineNr"> 4 </span> <span class="muComment"># x = next power-of-2 multiple of _dr after _nr</span>
<span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L6" class="LineNr"> 6 </span> <span class="Delimiter">{</span>
<span id="L7" class="LineNr"> 7 </span><span class="CommentedCode">#? print-int32-hex 0, x</span>
<span id="L8" class="LineNr"> 8 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L9" class="LineNr"> 9 </span> <span class="PreProc">var</span> tmp/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy _dr
<span id="L10" class="LineNr"> 10 </span> tmp <span class="SpecialChar">&lt;-</span> multiply x
<span id="L11" class="LineNr"> 11 </span> compare tmp, _nr
<span id="L12" class="LineNr"> 12 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L13" class="LineNr"> 13 </span> x <span class="SpecialChar">&lt;-</span> shift-left <span class="Constant">1</span>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">loop</span>
<span id="L15" class="LineNr"> 15 </span> <span class="Delimiter">}</span>
<span id="L16" class="LineNr"> 16 </span><span class="CommentedCode">#? print-string 0, &quot;--\n&quot;</span>
<span id="L17" class="LineNr"> 17 </span> <span class="muComment"># min, max = x/2, x</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> max/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy x
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> min/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy max
<span id="L20" class="LineNr"> 20 </span> min <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">1</span>
<span id="L21" class="LineNr"> 21 </span> <span class="muComment"># narrow down result between min and max</span>
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy min
<span id="L23" class="LineNr"> 23 </span> <span class="Delimiter">{</span>
<span id="L24" class="LineNr"> 24 </span><span class="CommentedCode">#? print-int32-hex 0, i</span>
<span id="L25" class="LineNr"> 25 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> foo/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy _dr
<span id="L27" class="LineNr"> 27 </span> foo <span class="SpecialChar">&lt;-</span> multiply i
<span id="L28" class="LineNr"> 28 </span> compare foo, _nr
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L30" class="LineNr"> 30 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">loop</span>
<span id="L32" class="LineNr"> 32 </span> <span class="Delimiter">}</span>
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy i
<span id="L34" class="LineNr"> 34 </span> result <span class="SpecialChar">&lt;-</span> decrement
<span id="L35" class="LineNr"> 35 </span><span class="CommentedCode">#? print-string 0, &quot;=&gt; &quot;</span>
<span id="L36" class="LineNr"> 36 </span><span class="CommentedCode">#? print-int32-hex 0, result</span>
<span id="L37" class="LineNr"> 37 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">return</span> result
<span id="L39" class="LineNr"> 39 </span><span class="Delimiter">}</span>
<span id="L40" class="LineNr"> 40 </span>
<span id="L41" class="LineNr"> 41 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L41'>test-try-divide-1</a></span> <span class="Delimiter">{</span>
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">0</span>, <span class="Constant">2</span>
<span id="L43" class="LineNr"> 43 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">0</span>, <span class="Constant">&quot;F - try-divide-1&quot;</span>
<span id="L44" class="LineNr"> 44 </span><span class="Delimiter">}</span>
<span id="L45" class="LineNr"> 45 </span>
<span id="L46" class="LineNr"> 46 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L46'>test-try-divide-2</a></span> <span class="Delimiter">{</span>
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">1</span>, <span class="Constant">2</span>
<span id="L48" class="LineNr"> 48 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">0</span>, <span class="Constant">&quot;F - try-divide-2&quot;</span>
<span id="L49" class="LineNr"> 49 </span><span class="Delimiter">}</span>
<span id="L50" class="LineNr"> 50 </span>
<span id="L51" class="LineNr"> 51 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L51'>test-try-divide-3</a></span> <span class="Delimiter">{</span>
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">2</span>, <span class="Constant">2</span>
<span id="L53" class="LineNr"> 53 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">1</span>, <span class="Constant">&quot;F - try-divide-3&quot;</span>
<span id="L54" class="LineNr"> 54 </span><span class="Delimiter">}</span>
<span id="L55" class="LineNr"> 55 </span>
<span id="L56" class="LineNr"> 56 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L56'>test-try-divide-4</a></span> <span class="Delimiter">{</span>
<span id="L57" class="LineNr"> 57 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">4</span>, <span class="Constant">2</span>
<span id="L58" class="LineNr"> 58 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">2</span>, <span class="Constant">&quot;F - try-divide-4&quot;</span>
<span id="L59" class="LineNr"> 59 </span><span class="Delimiter">}</span>
<span id="L60" class="LineNr"> 60 </span>
<span id="L61" class="LineNr"> 61 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L61'>test-try-divide-5</a></span> <span class="Delimiter">{</span>
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">6</span>, <span class="Constant">2</span>
<span id="L63" class="LineNr"> 63 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">3</span>, <span class="Constant">&quot;F - try-divide-5&quot;</span>
<span id="L64" class="LineNr"> 64 </span><span class="Delimiter">}</span>
<span id="L65" class="LineNr"> 65 </span>
<span id="L66" class="LineNr"> 66 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L66'>test-try-divide-6</a></span> <span class="Delimiter">{</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">9</span>, <span class="Constant">3</span>
<span id="L68" class="LineNr"> 68 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">3</span>, <span class="Constant">&quot;F - try-divide-6&quot;</span>
<span id="L69" class="LineNr"> 69 </span><span class="Delimiter">}</span>
<span id="L70" class="LineNr"> 70 </span>
<span id="L71" class="LineNr"> 71 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L71'>test-try-divide-7</a></span> <span class="Delimiter">{</span>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">0xc</span>, <span class="Constant">4</span>
<span id="L73" class="LineNr"> 73 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">3</span>, <span class="Constant">&quot;F - try-divide-7&quot;</span>
<span id="L74" class="LineNr"> 74 </span><span class="Delimiter">}</span>
<span id="L75" class="LineNr"> 75 </span>
<span id="L76" class="LineNr"> 76 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L76'>test-try-divide-8</a></span> <span class="Delimiter">{</span>
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">0x1b</span>, <span class="Constant">3</span> <span class="muComment"># 27/3</span>
<span id="L78" class="LineNr"> 78 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">9</span>, <span class="Constant">&quot;F - try-divide-8&quot;</span>
<span id="L79" class="LineNr"> 79 </span><span class="Delimiter">}</span>
<span id="L80" class="LineNr"> 80 </span>
<span id="L81" class="LineNr"> 81 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L81'>test-try-divide-9</a></span> <span class="Delimiter">{</span>
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> <span class="Constant">0x1c</span>, <span class="Constant">3</span> <span class="muComment"># 28/3</span>
<span id="L83" class="LineNr"> 83 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">9</span>, <span class="Constant">&quot;F - try-divide-9&quot;</span>
<span id="L84" class="LineNr"> 84 </span><span class="Delimiter">}</span>
<span id="L85" class="LineNr"> 85 </span>
<span id="L86" class="LineNr"> 86 </span><span class="muComment"># only positive dr for now</span>
<span id="L87" class="LineNr"> 87 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406try-divide.mu.html#L87'>try-modulo</a></span> nr: int, dr: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> _positive-nr/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L102'>abs</a> nr
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> positive-nr/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _positive-nr
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L3'>try-divide</a> positive-nr, dr
<span id="L91" class="LineNr"> 91 </span> result <span class="SpecialChar">&lt;-</span> multiply dr
<span id="L92" class="LineNr"> 92 </span> result <span class="SpecialChar">&lt;-</span> subtract positive-nr
<span id="L93" class="LineNr"> 93 </span> result <span class="SpecialChar">&lt;-</span> negate
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">return</span> result
<span id="L95" class="LineNr"> 95 </span><span class="Delimiter">}</span>
<span id="L96" class="LineNr"> 96 </span>
<span id="L97" class="LineNr"> 97 </span><span class="PreProc">fn</span> <span class="muTest"><a href='406try-divide.mu.html#L97'>test-try-modulo-negative-nr</a></span> <span class="Delimiter">{</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L87'>try-modulo</a> <span class="Constant">-0xa</span>, <span class="Constant">7</span>
<span id="L99" class="LineNr"> 99 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">3</span>, <span class="Constant">&quot;F - test-try-modulo-negative-nr&quot;</span>
<span id="L100" class="LineNr">100 </span><span class="Delimiter">}</span>
<span id="L101" class="LineNr">101 </span>
<span id="L102" class="LineNr">102 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='406try-divide.mu.html#L102'>abs</a></span> n: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L104" class="LineNr">104 </span> <span class="Delimiter">{</span>
<span id="L105" class="LineNr">105 </span> compare n, <span class="Constant">0</span>
<span id="L106" class="LineNr">106 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L107" class="LineNr">107 </span> result <span class="SpecialChar">&lt;-</span> negate
<span id="L108" class="LineNr">108 </span> <span class="Delimiter">}</span>
<span id="L109" class="LineNr">109 </span> <span class="PreProc">return</span> result
<span id="L110" class="LineNr">110 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 409float.mu</title>
<title>Mu - 408float.mu</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
@ -54,11 +54,11 @@ if ('onhashchange' in window) {
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/409float.mu'>https://github.com/akkartik/mu/blob/master/409float.mu</a>
<a href='https://github.com/akkartik/mu/blob/master/408float.mu'>https://github.com/akkartik/mu/blob/master/408float.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># Some quick-n-dirty ways to create floats.</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='409float.mu.html#L3'>fill-in-rational</a></span> _out: (addr float), nr: int, dr: int <span class="Delimiter">{</span>
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='408float.mu.html#L3'>fill-in-rational</a></span> _out: (addr float), nr: int, dr: int <span class="Delimiter">{</span>
<span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> out/<span class="Constant">edi</span>: (addr float) <span class="SpecialChar">&lt;-</span> copy _out
<span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert nr
<span id="L6" class="LineNr"> 6 </span> <span class="PreProc">var</span> divisor/<span class="Constant">xmm1</span>: float <span class="SpecialChar">&lt;-</span> convert dr
@ -66,12 +66,19 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span> copy-to *out, result
<span id="L9" class="LineNr"> 9 </span><span class="Delimiter">}</span>
<span id="L10" class="LineNr">10 </span>
<span id="L11" class="LineNr">11 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='409float.mu.html#L11'>fill-in-sqrt</a></span> _out: (addr float), n: int <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='408float.mu.html#L11'>fill-in-sqrt</a></span> _out: (addr float), n: int <span class="Delimiter">{</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> out/<span class="Constant">edi</span>: (addr float) <span class="SpecialChar">&lt;-</span> copy _out
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert n
<span id="L14" class="LineNr">14 </span> result <span class="SpecialChar">&lt;-</span> square-root result
<span id="L15" class="LineNr">15 </span> copy-to *out, result
<span id="L16" class="LineNr">16 </span><span class="Delimiter">}</span>
<span id="L17" class="LineNr">17 </span>
<span id="L18" class="LineNr">18 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='408float.mu.html#L18'>rational</a></span> nr: int, dr: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">xmm0</span>: float <span class="Delimiter">{</span>
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert nr
<span id="L20" class="LineNr">20 </span> <span class="PreProc">var</span> divisor/<span class="Constant">xmm1</span>: float <span class="SpecialChar">&lt;-</span> convert dr
<span id="L21" class="LineNr">21 </span> result <span class="SpecialChar">&lt;-</span> divide divisor
<span id="L22" class="LineNr">22 </span> <span class="PreProc">return</span> result
<span id="L23" class="LineNr">23 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

View File

@ -1,235 +0,0 @@
<!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 - 408print-float.mu</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; }
.CommentedCode { color: #8a8a8a; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muTest { color: #5f8700; }
.Constant { color: #008787; }
.PreProc { color: #c000c0; }
-->
</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/408print-float.mu'>https://github.com/akkartik/mu/blob/master/408print-float.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># quick-n-dirty way to print out floats in hex</span>
<span id="L2" class="LineNr"> 2 </span>
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># examples:</span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># 0.5 = 0x3f000000 = 0011| 1111 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># = 0 | 01111110 | 00000000000000000000000</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># + exponent mantissa</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># = 0 | 00000000000000000000000 | 01111110</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># mantissa exponent</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># = 0 | 000000000000000000000000 | 01111110</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># zero-pad mantissa exponent</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># = +1.000000 P -01</span>
<span id="L12" class="LineNr"> 12 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L12'>test-print-float-normal</a></span> <span class="Delimiter">{</span>
<span id="L13" class="LineNr"> 13 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L15" class="LineNr"> 15 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L16" class="LineNr"> 16 </span> <span class="muComment"># print 0.5</span>
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">var</span> one/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> half/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert one
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> two/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">2</span>
<span id="L20" class="LineNr"> 20 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm1</span>: float <span class="SpecialChar">&lt;-</span> convert two
<span id="L21" class="LineNr"> 21 </span> half <span class="SpecialChar">&lt;-</span> divide two-f
<span id="L22" class="LineNr"> 22 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, half
<span id="L23" class="LineNr"> 23 </span> <span class="muComment">#</span>
<span id="L24" class="LineNr"> 24 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.000000P-01 &quot;</span>, <span class="Constant">&quot;F - test-print-float-normal&quot;</span>
<span id="L25" class="LineNr"> 25 </span><span class="Delimiter">}</span>
<span id="L26" class="LineNr"> 26 </span>
<span id="L27" class="LineNr"> 27 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L27'>test-print-float-zero</a></span> <span class="Delimiter">{</span>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L30" class="LineNr"> 30 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L31" class="LineNr"> 31 </span> <span class="muComment"># print 0</span>
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">var</span> zero: float
<span id="L33" class="LineNr"> 33 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, zero
<span id="L34" class="LineNr"> 34 </span> <span class="muComment">#</span>
<span id="L35" class="LineNr"> 35 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-zero&quot;</span>
<span id="L36" class="LineNr"> 36 </span><span class="Delimiter">}</span>
<span id="L37" class="LineNr"> 37 </span>
<span id="L38" class="LineNr"> 38 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L38'>test-print-float-negative-zero</a></span> <span class="Delimiter">{</span>
<span id="L39" class="LineNr"> 39 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L41" class="LineNr"> 41 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L42" class="LineNr"> 42 </span> <span class="muComment"># print 0</span>
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">var</span> n: int
<span id="L44" class="LineNr"> 44 </span> copy-to n, <span class="Constant">0x80000000</span>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> negative-zero/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L46" class="LineNr"> 46 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, negative-zero
<span id="L47" class="LineNr"> 47 </span> <span class="muComment">#</span>
<span id="L48" class="LineNr"> 48 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-negative-zero&quot;</span>
<span id="L49" class="LineNr"> 49 </span><span class="Delimiter">}</span>
<span id="L50" class="LineNr"> 50 </span>
<span id="L51" class="LineNr"> 51 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L51'>test-print-float-infinity</a></span> <span class="Delimiter">{</span>
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L54" class="LineNr"> 54 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L55" class="LineNr"> 55 </span> <span class="muComment"># print</span>
<span id="L56" class="LineNr"> 56 </span> <span class="PreProc">var</span> n: int
<span id="L57" class="LineNr"> 57 </span> <span class="muComment"># 0|11111111|00000000000000000000000</span>
<span id="L58" class="LineNr"> 58 </span> <span class="muComment"># 0111|1111|1000|0000|0000|0000|0000|0000</span>
<span id="L59" class="LineNr"> 59 </span> copy-to n, <span class="Constant">0x7f800000</span>
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">var</span> infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L61" class="LineNr"> 61 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, infinity
<span id="L62" class="LineNr"> 62 </span> <span class="muComment">#</span>
<span id="L63" class="LineNr"> 63 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-infinity&quot;</span>
<span id="L64" class="LineNr"> 64 </span><span class="Delimiter">}</span>
<span id="L65" class="LineNr"> 65 </span>
<span id="L66" class="LineNr"> 66 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L66'>test-print-float-negative-infinity</a></span> <span class="Delimiter">{</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L69" class="LineNr"> 69 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L70" class="LineNr"> 70 </span> <span class="muComment"># print</span>
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">var</span> n: int
<span id="L72" class="LineNr"> 72 </span> copy-to n, <span class="Constant">0xff800000</span>
<span id="L73" class="LineNr"> 73 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L74" class="LineNr"> 74 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity
<span id="L75" class="LineNr"> 75 </span> <span class="muComment">#</span>
<span id="L76" class="LineNr"> 76 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-negative-infinity&quot;</span>
<span id="L77" class="LineNr"> 77 </span><span class="Delimiter">}</span>
<span id="L78" class="LineNr"> 78 </span>
<span id="L79" class="LineNr"> 79 </span><span class="PreProc">fn</span> <span class="muTest"><a href='408print-float.mu.html#L79'>test-print-float-not-a-number</a></span> <span class="Delimiter">{</span>
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L82" class="LineNr"> 82 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L83" class="LineNr"> 83 </span> <span class="muComment"># print</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> n: int
<span id="L85" class="LineNr"> 85 </span> copy-to n, <span class="Constant">0xffffffff</span> <span class="muComment"># exponent must be all 1's, and mantissa must be non-zero</span>
<span id="L86" class="LineNr"> 86 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L87" class="LineNr"> 87 </span> <a href='408print-float.mu.html#L92'>print-float</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity
<span id="L88" class="LineNr"> 88 </span> <span class="muComment">#</span>
<span id="L89" class="LineNr"> 89 </span> <a href='405screen.mu.html#L612'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;Nan &quot;</span>, <span class="Constant">&quot;F - test-print-float-not-a-number&quot;</span>
<span id="L90" class="LineNr"> 90 </span><span class="Delimiter">}</span>
<span id="L91" class="LineNr"> 91 </span>
<span id="L92" class="LineNr"> 92 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='408print-float.mu.html#L92'>print-float</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), n: float <span class="Delimiter">{</span>
<span id="L93" class="LineNr"> 93 </span>$print-float:body: <span class="Delimiter">{</span>
<span id="L94" class="LineNr"> 94 </span> <span class="muComment"># - special names</span>
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">var</span> bits/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L96" class="LineNr"> 96 </span> compare bits, <span class="Constant">0</span>
<span id="L97" class="LineNr"> 97 </span> <span class="Delimiter">{</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">break-if-!=</span>
<span id="L99" class="LineNr"> 99 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0&quot;</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">break</span> $print-float:body
<span id="L101" class="LineNr">101 </span> <span class="Delimiter">}</span>
<span id="L102" class="LineNr">102 </span> compare bits, <span class="Constant">0x80000000</span>
<span id="L103" class="LineNr">103 </span> <span class="Delimiter">{</span>
<span id="L104" class="LineNr">104 </span> <span class="PreProc">break-if-!=</span>
<span id="L105" class="LineNr">105 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-0&quot;</span>
<span id="L106" class="LineNr">106 </span> <span class="PreProc">break</span> $print-float:body
<span id="L107" class="LineNr">107 </span> <span class="Delimiter">}</span>
<span id="L108" class="LineNr">108 </span> compare bits, <span class="Constant">0x7f800000</span>
<span id="L109" class="LineNr">109 </span> <span class="Delimiter">{</span>
<span id="L110" class="LineNr">110 </span> <span class="PreProc">break-if-!=</span>
<span id="L111" class="LineNr">111 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;Inf&quot;</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">break</span> $print-float:body
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span>
<span id="L114" class="LineNr">114 </span> compare bits, <span class="Constant">0xff800000</span>
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">{</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">break-if-!=</span>
<span id="L117" class="LineNr">117 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-Inf&quot;</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">break</span> $print-float:body
<span id="L119" class="LineNr">119 </span> <span class="Delimiter">}</span>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> exponent/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L121" class="LineNr">121 </span> exponent <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x17</span> <span class="muComment"># 23 bits of mantissa</span>
<span id="L122" class="LineNr">122 </span> exponent <span class="SpecialChar">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L123" class="LineNr">123 </span> compare exponent, <span class="Constant">0xff</span>
<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> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;Nan&quot;</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">break</span> $print-float:body
<span id="L128" class="LineNr">128 </span> <span class="Delimiter">}</span>
<span id="L129" class="LineNr">129 </span> <span class="muComment"># - regular numbers</span>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> sign/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L131" class="LineNr">131 </span> sign <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x1f</span>
<span id="L132" class="LineNr">132 </span> <span class="Delimiter">{</span>
<span id="L133" class="LineNr">133 </span> compare sign, <span class="Constant">1</span>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">break-if-!=</span>
<span id="L135" class="LineNr">135 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-&quot;</span>
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span>
<span id="L137" class="LineNr">137 </span> $print-float:leading-digit: <span class="Delimiter">{</span>
<span id="L138" class="LineNr">138 </span> <span class="muComment"># check for subnormal numbers</span>
<span id="L139" class="LineNr">139 </span> compare exponent, <span class="Constant">0</span>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">{</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">break-if-!=</span>
<span id="L142" class="LineNr">142 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0.&quot;</span>
<span id="L143" class="LineNr">143 </span> exponent <span class="SpecialChar">&lt;-</span> increment
<span id="L144" class="LineNr">144 </span> <span class="PreProc">break</span> $print-float:leading-digit
<span id="L145" class="LineNr">145 </span> <span class="Delimiter">}</span>
<span id="L146" class="LineNr">146 </span> <span class="muComment"># normal numbers</span>
<span id="L147" class="LineNr">147 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;1.&quot;</span>
<span id="L148" class="LineNr">148 </span> <span class="Delimiter">}</span>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> mantissa/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L150" class="LineNr">150 </span> mantissa <span class="SpecialChar">&lt;-</span> and <span class="Constant">0x7fffff</span>
<span id="L151" class="LineNr">151 </span> <a href='405screen.mu.html#L458'>print-int32-hex-bits</a> <a href='405screen.mu.html#L9'>screen</a>, mantissa, <span class="Constant">0x18</span>
<span id="L152" class="LineNr">152 </span> <span class="muComment"># print exponent</span>
<span id="L153" class="LineNr">153 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;P&quot;</span>
<span id="L154" class="LineNr">154 </span> exponent <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x7f</span>
<span id="L155" class="LineNr">155 </span> compare exponent, <span class="Constant">0</span>
<span id="L156" class="LineNr">156 </span> <span class="Delimiter">{</span>
<span id="L157" class="LineNr">157 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L158" class="LineNr">158 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-&quot;</span>
<span id="L159" class="LineNr">159 </span> <span class="Delimiter">}</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> exp-magnitude/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406try-divide.mu.html#L102'>abs</a> exponent
<span id="L161" class="LineNr">161 </span> <a href='405screen.mu.html#L458'>print-int32-hex-bits</a> <a href='405screen.mu.html#L9'>screen</a>, exp-magnitude, <span class="Constant">8</span>
<span id="L162" class="LineNr">162 </span><span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span><span class="Delimiter">}</span>
<span id="L164" class="LineNr">164 </span>
<span id="L165" class="LineNr">165 </span><span class="CommentedCode">#? fn main -&gt; _/ebx: int {</span>
<span id="L166" class="LineNr">166 </span><span class="CommentedCode">#? run-tests</span>
<span id="L167" class="LineNr">167 </span><span class="CommentedCode">#? #? test-print-float-negative-zero</span>
<span id="L168" class="LineNr">168 </span><span class="CommentedCode">#? #? print-int32-hex 0, 0</span>
<span id="L169" class="LineNr">169 </span><span class="CommentedCode">#? #? test-print-float-normal</span>
<span id="L170" class="LineNr">170 </span><span class="CommentedCode">#? return 0</span>
<span id="L171" class="LineNr">171 </span><span class="CommentedCode">#? }</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

260
html/409print-float-hex.mu.html generated Normal file
View File

@ -0,0 +1,260 @@
<!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 - 409print-float-hex.mu</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; }
.CommentedCode { color: #8a8a8a; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muTest { color: #5f8700; }
.Constant { color: #008787; }
.PreProc { color: #c000c0; }
-->
</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/409print-float-hex.mu'>https://github.com/akkartik/mu/blob/master/409print-float-hex.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># quick-n-dirty way to print out floats in hex</span>
<span id="L2" class="LineNr"> 2 </span><span class="muComment"># <a href="https://www.exploringbinary.com/hexadecimal-floating-point-constants">https://www.exploringbinary.com/hexadecimal-floating-point-constants</a></span>
<span id="L3" class="LineNr"> 3 </span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># example:</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># 0.5 = 0x3f000000 = 0011| 1111 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># = 0 | 01111110 | 00000000000000000000000</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># + exponent mantissa</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># = 0 | 00000000000000000000000 | 01111110</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># mantissa exponent</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># = 0 | 000000000000000000000000 | 01111110</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># zero-pad mantissa exponent</span>
<span id="L12" class="LineNr"> 12 </span><span class="muComment"># = +1.000000 P -01</span>
<span id="L13" class="LineNr"> 13 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L13'>test-print-float-hex-normal</a></span> <span class="Delimiter">{</span>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L15" class="LineNr"> 15 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L16" class="LineNr"> 16 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L17" class="LineNr"> 17 </span> <span class="muComment"># 0.5</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> half/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">2</span>
<span id="L19" class="LineNr"> 19 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, half
<span id="L20" class="LineNr"> 20 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.000000P-01 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L13'>test-print-float-hex-normal</a> 0.5&quot;</span>
<span id="L21" class="LineNr"> 21 </span> <span class="muComment"># 0.25</span>
<span id="L22" class="LineNr"> 22 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> quarter/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">4</span>
<span id="L24" class="LineNr"> 24 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, quarter
<span id="L25" class="LineNr"> 25 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.000000P-02 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L13'>test-print-float-hex-normal</a> 0.25&quot;</span>
<span id="L26" class="LineNr"> 26 </span> <span class="muComment"># 0.75</span>
<span id="L27" class="LineNr"> 27 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> three-quarters/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">3</span>, <span class="Constant">4</span>
<span id="L29" class="LineNr"> 29 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, three-quarters
<span id="L30" class="LineNr"> 30 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.800000P-01 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L13'>test-print-float-hex-normal</a> 0.75&quot;</span>
<span id="L31" class="LineNr"> 31 </span> <span class="muComment"># 0.1</span>
<span id="L32" class="LineNr"> 32 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">var</span> tenth/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">0xa</span>
<span id="L34" class="LineNr"> 34 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, tenth
<span id="L35" class="LineNr"> 35 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.99999aP-04 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L13'>test-print-float-hex-normal</a> 0.1&quot;</span>
<span id="L36" class="LineNr"> 36 </span><span class="Delimiter">}</span>
<span id="L37" class="LineNr"> 37 </span>
<span id="L38" class="LineNr"> 38 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L38'>test-print-float-hex-integer</a></span> <span class="Delimiter">{</span>
<span id="L39" class="LineNr"> 39 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L41" class="LineNr"> 41 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L42" class="LineNr"> 42 </span> <span class="muComment"># 1</span>
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">var</span> one-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">1</span>
<span id="L44" class="LineNr"> 44 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, one-f
<span id="L45" class="LineNr"> 45 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.000000P00 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L38'>test-print-float-hex-integer</a> 1&quot;</span>
<span id="L46" class="LineNr"> 46 </span> <span class="muComment"># 2</span>
<span id="L47" class="LineNr"> 47 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L48" class="LineNr"> 48 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">2</span>, <span class="Constant">1</span>
<span id="L49" class="LineNr"> 49 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, two-f
<span id="L50" class="LineNr"> 50 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.000000P01 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L38'>test-print-float-hex-integer</a> 2&quot;</span>
<span id="L51" class="LineNr"> 51 </span> <span class="muComment"># 10</span>
<span id="L52" class="LineNr"> 52 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">var</span> ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">0xa</span>, <span class="Constant">1</span>
<span id="L54" class="LineNr"> 54 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, ten-f
<span id="L55" class="LineNr"> 55 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.400000P03 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L38'>test-print-float-hex-integer</a> 10&quot;</span>
<span id="L56" class="LineNr"> 56 </span> <span class="muComment"># -10</span>
<span id="L57" class="LineNr"> 57 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L58" class="LineNr"> 58 </span> <span class="PreProc">var</span> minus-ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">-0xa</span>, <span class="Constant">1</span>
<span id="L59" class="LineNr"> 59 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, minus-ten-f
<span id="L60" class="LineNr"> 60 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-1.400000P03 &quot;</span>, <span class="Constant">&quot;F - <a href='409print-float-hex.mu.html#L38'>test-print-float-hex-integer</a> -10&quot;</span>
<span id="L61" class="LineNr"> 61 </span><span class="Delimiter">}</span>
<span id="L62" class="LineNr"> 62 </span>
<span id="L63" class="LineNr"> 63 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L63'>test-print-float-hex-zero</a></span> <span class="Delimiter">{</span>
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L66" class="LineNr"> 66 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> zero: float
<span id="L68" class="LineNr"> 68 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, zero
<span id="L69" class="LineNr"> 69 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-hex-zero&quot;</span>
<span id="L70" class="LineNr"> 70 </span><span class="Delimiter">}</span>
<span id="L71" class="LineNr"> 71 </span>
<span id="L72" class="LineNr"> 72 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L72'>test-print-float-hex-negative-zero</a></span> <span class="Delimiter">{</span>
<span id="L73" class="LineNr"> 73 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L75" class="LineNr"> 75 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">var</span> n: int
<span id="L77" class="LineNr"> 77 </span> copy-to n, <span class="Constant">0x80000000</span>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> negative-zero/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L79" class="LineNr"> 79 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, negative-zero
<span id="L80" class="LineNr"> 80 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-hex-negative-zero&quot;</span>
<span id="L81" class="LineNr"> 81 </span><span class="Delimiter">}</span>
<span id="L82" class="LineNr"> 82 </span>
<span id="L83" class="LineNr"> 83 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L83'>test-print-float-hex-infinity</a></span> <span class="Delimiter">{</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L86" class="LineNr"> 86 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> n: int
<span id="L88" class="LineNr"> 88 </span> <span class="muComment"># 0|11111111|00000000000000000000000</span>
<span id="L89" class="LineNr"> 89 </span> <span class="muComment"># 0111|1111|1000|0000|0000|0000|0000|0000</span>
<span id="L90" class="LineNr"> 90 </span> copy-to n, <span class="Constant">0x7f800000</span>
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L92" class="LineNr"> 92 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, infinity
<span id="L93" class="LineNr"> 93 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-hex-infinity&quot;</span>
<span id="L94" class="LineNr"> 94 </span><span class="Delimiter">}</span>
<span id="L95" class="LineNr"> 95 </span>
<span id="L96" class="LineNr"> 96 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L96'>test-print-float-hex-negative-infinity</a></span> <span class="Delimiter">{</span>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L99" class="LineNr"> 99 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> n: int
<span id="L101" class="LineNr">101 </span> copy-to n, <span class="Constant">0xff800000</span>
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L103" class="LineNr">103 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity
<span id="L104" class="LineNr">104 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-hex-negative-infinity&quot;</span>
<span id="L105" class="LineNr">105 </span><span class="Delimiter">}</span>
<span id="L106" class="LineNr">106 </span>
<span id="L107" class="LineNr">107 </span><span class="PreProc">fn</span> <span class="muTest"><a href='409print-float-hex.mu.html#L107'>test-print-float-hex-not-a-number</a></span> <span class="Delimiter">{</span>
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L110" class="LineNr">110 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L111" class="LineNr">111 </span> <span class="PreProc">var</span> n: int
<span id="L112" class="LineNr">112 </span> copy-to n, <span class="Constant">0xffffffff</span> <span class="muComment"># exponent must be all 1's, and mantissa must be non-zero</span>
<span id="L113" class="LineNr">113 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L114" class="LineNr">114 </span> <a href='409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity
<span id="L115" class="LineNr">115 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;NaN &quot;</span>, <span class="Constant">&quot;F - test-print-float-hex-not-a-number&quot;</span>
<span id="L116" class="LineNr">116 </span><span class="Delimiter">}</span>
<span id="L117" class="LineNr">117 </span>
<span id="L118" class="LineNr">118 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='409print-float-hex.mu.html#L118'>print-float-hex</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), n: float <span class="Delimiter">{</span>
<span id="L119" class="LineNr">119 </span> <span class="muComment"># - special names</span>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> bits/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L121" class="LineNr">121 </span> compare bits, <span class="Constant">0</span>
<span id="L122" class="LineNr">122 </span> <span class="Delimiter">{</span>
<span id="L123" class="LineNr">123 </span> <span class="PreProc">break-if-!=</span>
<span id="L124" class="LineNr">124 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0&quot;</span>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">return</span>
<span id="L126" class="LineNr">126 </span> <span class="Delimiter">}</span>
<span id="L127" class="LineNr">127 </span> compare bits, <span class="Constant">0x80000000</span>
<span id="L128" class="LineNr">128 </span> <span class="Delimiter">{</span>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">break-if-!=</span>
<span id="L130" class="LineNr">130 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-0&quot;</span>
<span id="L131" class="LineNr">131 </span> <span class="PreProc">return</span>
<span id="L132" class="LineNr">132 </span> <span class="Delimiter">}</span>
<span id="L133" class="LineNr">133 </span> compare bits, <span class="Constant">0x7f800000</span>
<span id="L134" class="LineNr">134 </span> <span class="Delimiter">{</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">break-if-!=</span>
<span id="L136" class="LineNr">136 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;Inf&quot;</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">return</span>
<span id="L138" class="LineNr">138 </span> <span class="Delimiter">}</span>
<span id="L139" class="LineNr">139 </span> compare bits, <span class="Constant">0xff800000</span>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">{</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">break-if-!=</span>
<span id="L142" class="LineNr">142 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-Inf&quot;</span>
<span id="L143" class="LineNr">143 </span> <span class="PreProc">return</span>
<span id="L144" class="LineNr">144 </span> <span class="Delimiter">}</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> exponent/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L146" class="LineNr">146 </span> exponent <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x17</span> <span class="muComment"># 23 bits of mantissa</span>
<span id="L147" class="LineNr">147 </span> exponent <span class="SpecialChar">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L148" class="LineNr">148 </span> exponent <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x7f</span>
<span id="L149" class="LineNr">149 </span> compare exponent, <span class="Constant">0x80</span>
<span id="L150" class="LineNr">150 </span> <span class="Delimiter">{</span>
<span id="L151" class="LineNr">151 </span> <span class="PreProc">break-if-!=</span>
<span id="L152" class="LineNr">152 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;NaN&quot;</span>
<span id="L153" class="LineNr">153 </span> <span class="PreProc">return</span>
<span id="L154" class="LineNr">154 </span> <span class="Delimiter">}</span>
<span id="L155" class="LineNr">155 </span> <span class="muComment"># - regular numbers</span>
<span id="L156" class="LineNr">156 </span> <span class="PreProc">var</span> sign/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L157" class="LineNr">157 </span> sign <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x1f</span>
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">{</span>
<span id="L159" class="LineNr">159 </span> compare sign, <span class="Constant">1</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">break-if-!=</span>
<span id="L161" class="LineNr">161 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-&quot;</span>
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span> $print-float-hex:leading-digit: <span class="Delimiter">{</span>
<span id="L164" class="LineNr">164 </span> <span class="muComment"># check for subnormal numbers</span>
<span id="L165" class="LineNr">165 </span> compare exponent, <span class="Constant">-0x7f</span>
<span id="L166" class="LineNr">166 </span> <span class="Delimiter">{</span>
<span id="L167" class="LineNr">167 </span> <span class="PreProc">break-if-!=</span>
<span id="L168" class="LineNr">168 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0.&quot;</span>
<span id="L169" class="LineNr">169 </span> exponent <span class="SpecialChar">&lt;-</span> increment
<span id="L170" class="LineNr">170 </span> <span class="PreProc">break</span> $print-float-hex:leading-digit
<span id="L171" class="LineNr">171 </span> <span class="Delimiter">}</span>
<span id="L172" class="LineNr">172 </span> <span class="muComment"># normal numbers</span>
<span id="L173" class="LineNr">173 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;1.&quot;</span>
<span id="L174" class="LineNr">174 </span> <span class="Delimiter">}</span>
<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> mantissa/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L176" class="LineNr">176 </span> mantissa <span class="SpecialChar">&lt;-</span> and <span class="Constant">0x7fffff</span>
<span id="L177" class="LineNr">177 </span> mantissa <span class="SpecialChar">&lt;-</span> shift-left <span class="Constant">1</span> <span class="muComment"># pad to whole nibbles</span>
<span id="L178" class="LineNr">178 </span> <a href='405screen.mu.html#L458'>print-int32-hex-bits</a> <a href='405screen.mu.html#L9'>screen</a>, mantissa, <span class="Constant">0x18</span>
<span id="L179" class="LineNr">179 </span> <span class="muComment"># print exponent</span>
<span id="L180" class="LineNr">180 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;P&quot;</span>
<span id="L181" class="LineNr">181 </span> compare exponent, <span class="Constant">0</span>
<span id="L182" class="LineNr">182 </span> <span class="Delimiter">{</span>
<span id="L183" class="LineNr">183 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L184" class="LineNr">184 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-&quot;</span>
<span id="L185" class="LineNr">185 </span> <span class="Delimiter">}</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">var</span> exp-magnitude/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='406int32.mu.html#L31'>abs</a> exponent
<span id="L187" class="LineNr">187 </span> <a href='405screen.mu.html#L458'>print-int32-hex-bits</a> <a href='405screen.mu.html#L9'>screen</a>, exp-magnitude, <span class="Constant">8</span>
<span id="L188" class="LineNr">188 </span><span class="Delimiter">}</span>
<span id="L189" class="LineNr">189 </span>
<span id="L190" class="LineNr">190 </span><span class="CommentedCode">#? fn main -&gt; _/ebx: int {</span>
<span id="L191" class="LineNr">191 </span><span class="CommentedCode">#? run-tests</span>
<span id="L192" class="LineNr">192 </span><span class="CommentedCode">#? #? test-print-float-hex-negative-zero</span>
<span id="L193" class="LineNr">193 </span><span class="CommentedCode">#? #? print-int32-hex 0, 0</span>
<span id="L194" class="LineNr">194 </span><span class="CommentedCode">#? #? test-print-float-hex-normal</span>
<span id="L195" class="LineNr">195 </span><span class="CommentedCode">#? return 0</span>
<span id="L196" class="LineNr">196 </span><span class="CommentedCode">#? }</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

4
html/410file.mu.html generated
View File

@ -71,11 +71,11 @@ if ('onhashchange' in window) {
<span id="L12" class="LineNr">12 </span><span class="CommentedCode">#? print-string 0, &quot;AAA\n&quot;</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> h: (handle array byte)
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> address h
<span id="L15" class="LineNr">15 </span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> line-a, ah
<span id="L15" class="LineNr">15 </span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> line-a, ah
<span id="L16" class="LineNr">16 </span> <a href='309stream.subx.html#L54'>write-to-stream</a> stream-a, ah
<span id="L17" class="LineNr">17 </span> <span class="PreProc">loop</span>
<span id="L18" class="LineNr">18 </span> <span class="Delimiter">}</span>
<span id="L19" class="LineNr">19 </span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> stream-a, out
<span id="L19" class="LineNr">19 </span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> stream-a, out
<span id="L20" class="LineNr">20 </span><span class="Delimiter">}</span>
</pre>
</body>

View File

@ -94,7 +94,7 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">loop</span>
<span id="L35" class="LineNr"> 35 </span> <span class="Delimiter">}</span>
<span id="L36" class="LineNr"> 36 </span> <span class="Delimiter">}</span>
<span id="L37" class="LineNr"> 37 </span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> out-stream-addr, out-ah
<span id="L37" class="LineNr"> 37 </span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> out-stream-addr, out-ah
<span id="L38" class="LineNr"> 38 </span><span class="Delimiter">}</span>
<span id="L39" class="LineNr"> 39 </span>
<span id="L40" class="LineNr"> 40 </span><span class="PreProc">fn</span> <span class="muTest"><a href='411string.mu.html#L40'>test-substring</a></span> <span class="Delimiter">{</span>
@ -165,7 +165,7 @@ if ('onhashchange' in window) {
<span id="L105" class="LineNr">105 </span> <span class="muComment"># token complete; flush</span>
<span id="L106" class="LineNr">106 </span> <span class="PreProc">var</span> token: (handle array byte)
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> token-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> address token
<span id="L108" class="LineNr">108 </span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> curr-stream-addr, token-ah
<span id="L108" class="LineNr">108 </span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> curr-stream-addr, token-ah
<span id="L109" class="LineNr">109 </span> <a href='309stream.subx.html#L54'>write-to-stream</a> tokens-stream-addr, token-ah
<span id="L110" class="LineNr">110 </span> <a href='106stream.subx.html#L17'>clear-stream</a> curr-stream-addr
<span id="L111" class="LineNr">111 </span> <span class="PreProc">loop</span> $split-string:core
@ -173,7 +173,7 @@ if ('onhashchange' in window) {
<span id="L113" class="LineNr">113 </span> <a href='403unicode.mu.html#L379'>write-grapheme</a> curr-stream-addr, g
<span id="L114" class="LineNr">114 </span> <span class="PreProc">loop</span>
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span>
<span id="L116" class="LineNr">116 </span> <a href='310copy-bytes.subx.html#L59'>stream-to-array</a> tokens-stream-addr, out
<span id="L116" class="LineNr">116 </span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> tokens-stream-addr, out
<span id="L117" class="LineNr">117 </span><span class="Delimiter">}</span>
<span id="L118" class="LineNr">118 </span>
<span id="L119" class="LineNr">119 </span><span class="PreProc">fn</span> <span class="muTest"><a href='411string.mu.html#L119'>test-split-string</a></span> <span class="Delimiter">{</span>

722
html/412print-float-decimal.mu.html generated Normal file
View File

@ -0,0 +1,722 @@
<!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 - 412print-float-decimal.mu</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; }
.CommentedCode { color: #8a8a8a; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muTest { color: #5f8700; }
.Constant { color: #008787; }
.PreProc { color: #c000c0; }
-->
</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/412print-float-decimal.mu'>https://github.com/akkartik/mu/blob/master/412print-float-decimal.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># print out floats in decimal</span>
<span id="L2" class="LineNr"> 2 </span><span class="muComment"># <a href="https://research.swtch.com/ftoa">https://research.swtch.com/ftoa</a></span>
<span id="L3" class="LineNr"> 3 </span><span class="muComment">#</span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># Basic idea:</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># Ignoring sign, floating point numbers are represented as 1.mantissa * 2^exponent</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># Therefore, to print a float in decimal, we need to:</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># - compute its value without decimal point</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># - convert to an array of decimal digits</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># - print out the array while inserting the decimal point appropriately</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment">#</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># Basic complication: the computation generates numbers larger than an int can</span>
<span id="L12" class="LineNr"> 12 </span><span class="muComment"># hold. We need a way to represent big ints.</span>
<span id="L13" class="LineNr"> 13 </span><span class="muComment">#</span>
<span id="L14" class="LineNr"> 14 </span><span class="muComment"># Key insight: use a representation for big ints that's close to what we need</span>
<span id="L15" class="LineNr"> 15 </span><span class="muComment"># anyway, an array of decimal digits.</span>
<span id="L16" class="LineNr"> 16 </span><span class="muComment">#</span>
<span id="L17" class="LineNr"> 17 </span><span class="muComment"># Style note: we aren't creating a big int library here. The only operations</span>
<span id="L18" class="LineNr"> 18 </span><span class="muComment"># we need are halving and doubling. Following the link above, it seems more</span>
<span id="L19" class="LineNr"> 19 </span><span class="muComment"># comprehensible to keep these operations inlined so that we can track the</span>
<span id="L20" class="LineNr"> 20 </span><span class="muComment"># position of the decimal point with dispatch.</span>
<span id="L21" class="LineNr"> 21 </span><span class="muComment">#</span>
<span id="L22" class="LineNr"> 22 </span><span class="muComment"># This approach turns out to be fast enough for most purposes.</span>
<span id="L23" class="LineNr"> 23 </span><span class="muComment"># Optimizations, however, get wildly more complex.</span>
<span id="L24" class="LineNr"> 24 </span>
<span id="L25" class="LineNr"> 25 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a></span> <span class="Delimiter">{</span>
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L28" class="LineNr"> 28 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L29" class="LineNr"> 29 </span> <span class="muComment"># 0.5</span>
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> half/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">2</span>
<span id="L31" class="LineNr"> 31 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, half, <span class="Constant">3</span>
<span id="L32" class="LineNr"> 32 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0.5 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> 0.5&quot;</span>
<span id="L33" class="LineNr"> 33 </span> <span class="muComment"># 0.25</span>
<span id="L34" class="LineNr"> 34 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> quarter/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">4</span>
<span id="L36" class="LineNr"> 36 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, quarter, <span class="Constant">3</span>
<span id="L37" class="LineNr"> 37 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0.25 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> 0.25&quot;</span>
<span id="L38" class="LineNr"> 38 </span> <span class="muComment"># 0.75</span>
<span id="L39" class="LineNr"> 39 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> three-quarters/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">3</span>, <span class="Constant">4</span>
<span id="L41" class="LineNr"> 41 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, three-quarters, <span class="Constant">3</span>
<span id="L42" class="LineNr"> 42 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0.75 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> 0.75&quot;</span>
<span id="L43" class="LineNr"> 43 </span> <span class="muComment"># 0.125</span>
<span id="L44" class="LineNr"> 44 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> eighth/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">8</span>
<span id="L46" class="LineNr"> 46 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, eighth, <span class="Constant">3</span>
<span id="L47" class="LineNr"> 47 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0.125 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> 0.125&quot;</span>
<span id="L48" class="LineNr"> 48 </span> <span class="muComment"># 0.0625; start using scientific notation</span>
<span id="L49" class="LineNr"> 49 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L50" class="LineNr"> 50 </span> <span class="PreProc">var</span> sixteenth/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">0x10</span>
<span id="L51" class="LineNr"> 51 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, sixteenth, <span class="Constant">3</span>
<span id="L52" class="LineNr"> 52 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;6.25e-2 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> 0.0625&quot;</span>
<span id="L53" class="LineNr"> 53 </span> <span class="muComment"># sqrt(2); truncate floats with lots of digits after the decimal but not too many before</span>
<span id="L54" class="LineNr"> 54 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L55" class="LineNr"> 55 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">2</span>, <span class="Constant">1</span>
<span id="L56" class="LineNr"> 56 </span> <span class="PreProc">var</span> sqrt-2/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> square-root two-f
<span id="L57" class="LineNr"> 57 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, sqrt-2, <span class="Constant">3</span>
<span id="L58" class="LineNr"> 58 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.414 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L25'>test-print-float-decimal-approximate-normal</a> √2&quot;</span>
<span id="L59" class="LineNr"> 59 </span><span class="Delimiter">}</span>
<span id="L60" class="LineNr"> 60 </span>
<span id="L61" class="LineNr"> 61 </span><span class="muComment"># print whole integers without decimals</span>
<span id="L62" class="LineNr"> 62 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a></span> <span class="Delimiter">{</span>
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L65" class="LineNr"> 65 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L66" class="LineNr"> 66 </span> <span class="muComment"># 1</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> one-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">1</span>, <span class="Constant">1</span>
<span id="L68" class="LineNr"> 68 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, one-f, <span class="Constant">3</span>
<span id="L69" class="LineNr"> 69 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 1&quot;</span>
<span id="L70" class="LineNr"> 70 </span> <span class="muComment"># 2</span>
<span id="L71" class="LineNr"> 71 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">2</span>, <span class="Constant">1</span>
<span id="L73" class="LineNr"> 73 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, two-f, <span class="Constant">3</span>
<span id="L74" class="LineNr"> 74 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;2 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 2&quot;</span>
<span id="L75" class="LineNr"> 75 </span> <span class="muComment"># 10</span>
<span id="L76" class="LineNr"> 76 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">0xa</span>, <span class="Constant">1</span>
<span id="L78" class="LineNr"> 78 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, ten-f, <span class="Constant">3</span>
<span id="L79" class="LineNr"> 79 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;10 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 10&quot;</span>
<span id="L80" class="LineNr"> 80 </span> <span class="muComment"># -10</span>
<span id="L81" class="LineNr"> 81 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">var</span> minus-ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">-0xa</span>, <span class="Constant">1</span>
<span id="L83" class="LineNr"> 83 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, minus-ten-f, <span class="Constant">3</span>
<span id="L84" class="LineNr"> 84 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-10 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> -10&quot;</span>
<span id="L85" class="LineNr"> 85 </span> <span class="muComment"># 999</span>
<span id="L86" class="LineNr"> 86 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> minus-ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">0x3e7</span>, <span class="Constant">1</span>
<span id="L88" class="LineNr"> 88 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, minus-ten-f, <span class="Constant">3</span>
<span id="L89" class="LineNr"> 89 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;999 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 1000&quot;</span>
<span id="L90" class="LineNr"> 90 </span> <span class="muComment"># 1000 - start using scientific notation</span>
<span id="L91" class="LineNr"> 91 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L92" class="LineNr"> 92 </span> <span class="PreProc">var</span> minus-ten-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='408float.mu.html#L18'>rational</a> <span class="Constant">0x3e8</span>, <span class="Constant">1</span>
<span id="L93" class="LineNr"> 93 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, minus-ten-f, <span class="Constant">3</span>
<span id="L94" class="LineNr"> 94 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.00e3 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 1000&quot;</span>
<span id="L95" class="LineNr"> 95 </span> <span class="muComment"># 100,000</span>
<span id="L96" class="LineNr"> 96 </span> <a href='405screen.mu.html#L78'>clear-screen</a> <a href='405screen.mu.html#L9'>screen</a>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> hundred-thousand/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x186a0</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">var</span> hundred-thousand-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert hundred-thousand
<span id="L99" class="LineNr"> 99 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, hundred-thousand-f, <span class="Constant">3</span>
<span id="L100" class="LineNr">100 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;1.00e5 &quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L62'>test-print-float-decimal-approximate-integer</a> 100,000&quot;</span>
<span id="L101" class="LineNr">101 </span><span class="Delimiter">}</span>
<span id="L102" class="LineNr">102 </span>
<span id="L103" class="LineNr">103 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L103'>test-print-float-decimal-approximate-zero</a></span> <span class="Delimiter">{</span>
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L106" class="LineNr">106 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> zero: float
<span id="L108" class="LineNr">108 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, zero, <span class="Constant">3</span>
<span id="L109" class="LineNr">109 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-decimal-approximate-zero&quot;</span>
<span id="L110" class="LineNr">110 </span><span class="Delimiter">}</span>
<span id="L111" class="LineNr">111 </span>
<span id="L112" class="LineNr">112 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L112'>test-print-float-decimal-approximate-negative-zero</a></span> <span class="Delimiter">{</span>
<span id="L113" class="LineNr">113 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L115" class="LineNr">115 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> n: int
<span id="L117" class="LineNr">117 </span> copy-to n, <span class="Constant">0x80000000</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> negative-zero/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L119" class="LineNr">119 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, negative-zero, <span class="Constant">3</span>
<span id="L120" class="LineNr">120 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-0 &quot;</span>, <span class="Constant">&quot;F - test-print-float-decimal-approximate-negative-zero&quot;</span>
<span id="L121" class="LineNr">121 </span><span class="Delimiter">}</span>
<span id="L122" class="LineNr">122 </span>
<span id="L123" class="LineNr">123 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L123'>test-print-float-decimal-approximate-infinity</a></span> <span class="Delimiter">{</span>
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L126" class="LineNr">126 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> n: int
<span id="L128" class="LineNr">128 </span> <span class="muComment"># 0|11111111|00000000000000000000000</span>
<span id="L129" class="LineNr">129 </span> <span class="muComment"># 0111|1111|1000|0000|0000|0000|0000|0000</span>
<span id="L130" class="LineNr">130 </span> copy-to n, <span class="Constant">0x7f800000</span>
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L132" class="LineNr">132 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, infinity, <span class="Constant">3</span>
<span id="L133" class="LineNr">133 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-decimal-approximate-infinity&quot;</span>
<span id="L134" class="LineNr">134 </span><span class="Delimiter">}</span>
<span id="L135" class="LineNr">135 </span>
<span id="L136" class="LineNr">136 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L136'>test-print-float-decimal-approximate-negative-infinity</a></span> <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L138" class="LineNr">138 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L139" class="LineNr">139 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L140" class="LineNr">140 </span> <span class="PreProc">var</span> n: int
<span id="L141" class="LineNr">141 </span> copy-to n, <span class="Constant">0xff800000</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L143" class="LineNr">143 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity, <span class="Constant">3</span>
<span id="L144" class="LineNr">144 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;-Inf &quot;</span>, <span class="Constant">&quot;F - test-print-float-decimal-approximate-negative-infinity&quot;</span>
<span id="L145" class="LineNr">145 </span><span class="Delimiter">}</span>
<span id="L146" class="LineNr">146 </span>
<span id="L147" class="LineNr">147 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L147'>test-print-float-decimal-approximate-not-a-number</a></span> <span class="Delimiter">{</span>
<span id="L148" class="LineNr">148 </span> <span class="PreProc">var</span> screen-on-stack: <a href='405screen.mu.html#L9'>screen</a>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> <a href='405screen.mu.html#L9'>screen</a>/<span class="Constant">esi</span>: (addr <a href='405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> address screen-on-stack
<span id="L150" class="LineNr">150 </span> <a href='405screen.mu.html#L30'>initialize-screen</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">5</span>, <span class="Constant">0x20</span> <span class="muComment"># 32 columns should be more than enough</span>
<span id="L151" class="LineNr">151 </span> <span class="PreProc">var</span> n: int
<span id="L152" class="LineNr">152 </span> copy-to n, <span class="Constant">0xffffffff</span> <span class="muComment"># exponent must be all 1's, and mantissa must be non-zero</span>
<span id="L153" class="LineNr">153 </span> <span class="PreProc">var</span> negative-infinity/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> reinterpret n
<span id="L154" class="LineNr">154 </span> <a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='405screen.mu.html#L9'>screen</a>, negative-infinity, <span class="Constant">3</span>
<span id="L155" class="LineNr">155 </span> <a href='405screen.mu.html#L623'>check-screen-row</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot;NaN &quot;</span>, <span class="Constant">&quot;F - test-print-float-decimal-approximate-not-a-number&quot;</span>
<span id="L156" class="LineNr">156 </span><span class="Delimiter">}</span>
<span id="L157" class="LineNr">157 </span>
<span id="L158" class="LineNr">158 </span><span class="muComment"># 'precision' controls the maximum width past which we resort to scientific notation</span>
<span id="L159" class="LineNr">159 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), in: float, precision: int <span class="Delimiter">{</span>
<span id="L160" class="LineNr">160 </span> <span class="muComment"># - special names</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> bits/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> reinterpret in
<span id="L162" class="LineNr">162 </span> compare bits, <span class="Constant">0</span>
<span id="L163" class="LineNr">163 </span> <span class="Delimiter">{</span>
<span id="L164" class="LineNr">164 </span> <span class="PreProc">break-if-!=</span>
<span id="L165" class="LineNr">165 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0&quot;</span>
<span id="L166" class="LineNr">166 </span> <span class="PreProc">return</span>
<span id="L167" class="LineNr">167 </span> <span class="Delimiter">}</span>
<span id="L168" class="LineNr">168 </span> compare bits, <span class="Constant">0x80000000</span>
<span id="L169" class="LineNr">169 </span> <span class="Delimiter">{</span>
<span id="L170" class="LineNr">170 </span> <span class="PreProc">break-if-!=</span>
<span id="L171" class="LineNr">171 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-0&quot;</span>
<span id="L172" class="LineNr">172 </span> <span class="PreProc">return</span>
<span id="L173" class="LineNr">173 </span> <span class="Delimiter">}</span>
<span id="L174" class="LineNr">174 </span> compare bits, <span class="Constant">0x7f800000</span>
<span id="L175" class="LineNr">175 </span> <span class="Delimiter">{</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">break-if-!=</span>
<span id="L177" class="LineNr">177 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;Inf&quot;</span>
<span id="L178" class="LineNr">178 </span> <span class="PreProc">return</span>
<span id="L179" class="LineNr">179 </span> <span class="Delimiter">}</span>
<span id="L180" class="LineNr">180 </span> compare bits, <span class="Constant">0xff800000</span>
<span id="L181" class="LineNr">181 </span> <span class="Delimiter">{</span>
<span id="L182" class="LineNr">182 </span> <span class="PreProc">break-if-!=</span>
<span id="L183" class="LineNr">183 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-Inf&quot;</span>
<span id="L184" class="LineNr">184 </span> <span class="PreProc">return</span>
<span id="L185" class="LineNr">185 </span> <span class="Delimiter">}</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">var</span> exponent/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L187" class="LineNr">187 </span> exponent <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x17</span> <span class="muComment"># 23 bits of mantissa</span>
<span id="L188" class="LineNr">188 </span> exponent <span class="SpecialChar">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L189" class="LineNr">189 </span> exponent <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x7f</span>
<span id="L190" class="LineNr">190 </span> compare exponent, <span class="Constant">0x80</span>
<span id="L191" class="LineNr">191 </span> <span class="Delimiter">{</span>
<span id="L192" class="LineNr">192 </span> <span class="PreProc">break-if-!=</span>
<span id="L193" class="LineNr">193 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;NaN&quot;</span>
<span id="L194" class="LineNr">194 </span> <span class="PreProc">return</span>
<span id="L195" class="LineNr">195 </span> <span class="Delimiter">}</span>
<span id="L196" class="LineNr">196 </span> <span class="muComment"># - regular numbers</span>
<span id="L197" class="LineNr">197 </span> <span class="PreProc">var</span> sign/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L198" class="LineNr">198 </span> sign <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x1f</span>
<span id="L199" class="LineNr">199 </span> <span class="Delimiter">{</span>
<span id="L200" class="LineNr">200 </span> compare sign, <span class="Constant">1</span>
<span id="L201" class="LineNr">201 </span> <span class="PreProc">break-if-!=</span>
<span id="L202" class="LineNr">202 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;-&quot;</span>
<span id="L203" class="LineNr">203 </span> <span class="Delimiter">}</span>
<span id="L204" class="LineNr">204 </span>
<span id="L205" class="LineNr">205 </span> <span class="muComment"># v = 1.mantissa (in base 2) &lt;&lt; 0x17</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> v/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L207" class="LineNr">207 </span> v <span class="SpecialChar">&lt;-</span> and <span class="Constant">0x7fffff</span>
<span id="L208" class="LineNr">208 </span> v <span class="SpecialChar">&lt;-</span> or <span class="Constant">0x00800000</span> <span class="muComment"># insert implicit 1</span>
<span id="L209" class="LineNr">209 </span> <span class="muComment"># e = exponent - 0x17</span>
<span id="L210" class="LineNr">210 </span> <span class="PreProc">var</span> e/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy exponent
<span id="L211" class="LineNr">211 </span> e <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x17</span> <span class="muComment"># move decimal place from before mantissa to after</span>
<span id="L212" class="LineNr">212 </span>
<span id="L213" class="LineNr">213 </span> <span class="muComment"># initialize buffer with decimal representation of v</span>
<span id="L214" class="LineNr">214 </span> <span class="muComment"># unlike <a href="https://research.swtch.com/ftoa">https://research.swtch.com/ftoa</a>, no ascii here</span>
<span id="L215" class="LineNr">215 </span> <span class="PreProc">var</span> buf-storage: (array byte <span class="Constant">0x7f</span>)
<span id="L216" class="LineNr">216 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> address buf-storage
<span id="L217" class="LineNr">217 </span><span class="CommentedCode">#? print-int32-decimal 0, v</span>
<span id="L218" class="LineNr">218 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L219" class="LineNr">219 </span> <span class="PreProc">var</span> n/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L255'>decimal-digits</a> v, buf
<span id="L220" class="LineNr">220 </span><span class="CommentedCode">#? dump-digits buf, n, &quot;init&quot;</span>
<span id="L221" class="LineNr">221 </span> <span class="muComment"># I suspect we can do without reversing, but we'll follow <a href="https://research.swtch.com/ftoa">https://research.swtch.com/ftoa</a></span>
<span id="L222" class="LineNr">222 </span> <span class="muComment"># closely for now.</span>
<span id="L223" class="LineNr">223 </span> <a href='412print-float-decimal.mu.html#L272'>reverse-digits</a> buf, n
<span id="L224" class="LineNr">224 </span><span class="CommentedCode">#? dump-digits buf, n, &quot;reverse&quot;</span>
<span id="L225" class="LineNr">225 </span>
<span id="L226" class="LineNr">226 </span> <span class="muComment"># loop if e &gt; 0</span>
<span id="L227" class="LineNr">227 </span> <span class="Delimiter">{</span>
<span id="L228" class="LineNr">228 </span> compare e, <span class="Constant">0</span>
<span id="L229" class="LineNr">229 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L230" class="LineNr">230 </span> n <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L315'>double-array-of-decimal-digits</a> buf, n
<span id="L231" class="LineNr">231 </span><span class="CommentedCode">#? dump-digits buf, n, &quot;double&quot;</span>
<span id="L232" class="LineNr">232 </span> e <span class="SpecialChar">&lt;-</span> decrement
<span id="L233" class="LineNr">233 </span> <span class="PreProc">loop</span>
<span id="L234" class="LineNr">234 </span> <span class="Delimiter">}</span>
<span id="L235" class="LineNr">235 </span>
<span id="L236" class="LineNr">236 </span> <span class="PreProc">var</span> dp/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L237" class="LineNr">237 </span>
<span id="L238" class="LineNr">238 </span> <span class="muComment"># loop if e &lt; 0</span>
<span id="L239" class="LineNr">239 </span> <span class="Delimiter">{</span>
<span id="L240" class="LineNr">240 </span> compare e, <span class="Constant">0</span>
<span id="L241" class="LineNr">241 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L242" class="LineNr">242 </span> n, dp <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L366'>halve-array-of-decimal-digits</a> buf, n, dp
<span id="L243" class="LineNr">243 </span><span class="CommentedCode">#? print-int32-decimal 0, dp</span>
<span id="L244" class="LineNr">244 </span><span class="CommentedCode">#? print-string 0, &quot;, &quot;</span>
<span id="L245" class="LineNr">245 </span><span class="CommentedCode">#? dump-digits buf, n, &quot;halve&quot;</span>
<span id="L246" class="LineNr">246 </span> e <span class="SpecialChar">&lt;-</span> increment
<span id="L247" class="LineNr">247 </span> <span class="PreProc">loop</span>
<span id="L248" class="LineNr">248 </span> <span class="Delimiter">}</span>
<span id="L249" class="LineNr">249 </span>
<span id="L250" class="LineNr">250 </span> <a href='412print-float-decimal.mu.html#L440'>print-float-buffer</a> <a href='405screen.mu.html#L9'>screen</a>, buf, n, dp, precision
<span id="L251" class="LineNr">251 </span><span class="Delimiter">}</span>
<span id="L252" class="LineNr">252 </span>
<span id="L253" class="LineNr">253 </span><span class="muComment"># store the decimal digits of 'n' into 'buf', units first</span>
<span id="L254" class="LineNr">254 </span><span class="muComment"># n must be positive</span>
<span id="L255" class="LineNr">255 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L255'>decimal-digits</a></span> n: int, _buf: (addr array byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L257" class="LineNr">257 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L258" class="LineNr">258 </span> <span class="PreProc">var</span> curr/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L259" class="LineNr">259 </span> <span class="PreProc">var</span> curr-byte/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L260" class="LineNr">260 </span> <span class="Delimiter">{</span>
<span id="L261" class="LineNr">261 </span> compare curr, <span class="Constant">0</span>
<span id="L262" class="LineNr">262 </span> <span class="PreProc">break-if-=</span>
<span id="L263" class="LineNr">263 </span> curr, curr-byte <span class="SpecialChar">&lt;-</span> <a href='314divide.subx.html#L3'>integer-divide</a> curr, <span class="Constant">0xa</span>
<span id="L264" class="LineNr">264 </span> <span class="PreProc">var</span> dest/<span class="Constant">ebx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L265" class="LineNr">265 </span> copy-byte-to *dest, curr-byte
<span id="L266" class="LineNr">266 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L267" class="LineNr">267 </span> <span class="PreProc">loop</span>
<span id="L268" class="LineNr">268 </span> <span class="Delimiter">}</span>
<span id="L269" class="LineNr">269 </span> <span class="PreProc">return</span> i
<span id="L270" class="LineNr">270 </span><span class="Delimiter">}</span>
<span id="L271" class="LineNr">271 </span>
<span id="L272" class="LineNr">272 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L272'>reverse-digits</a></span> _buf: (addr array byte), n: int <span class="Delimiter">{</span>
<span id="L273" class="LineNr">273 </span> <span class="PreProc">var</span> buf/<span class="Constant">esi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L274" class="LineNr">274 </span> <span class="PreProc">var</span> left/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L275" class="LineNr">275 </span> <span class="PreProc">var</span> right/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L276" class="LineNr">276 </span> right <span class="SpecialChar">&lt;-</span> decrement
<span id="L277" class="LineNr">277 </span> <span class="Delimiter">{</span>
<span id="L278" class="LineNr">278 </span> compare left, right
<span id="L279" class="LineNr">279 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L280" class="LineNr">280 </span> <span class="Delimiter">{</span>
<span id="L281" class="LineNr">281 </span> <span class="PreProc">var</span> l-a/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, left
<span id="L282" class="LineNr">282 </span> <span class="PreProc">var</span> r-a/<span class="Constant">edx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, right
<span id="L283" class="LineNr">283 </span> <span class="PreProc">var</span> l/<span class="Constant">ebx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *l-a
<span id="L284" class="LineNr">284 </span> <span class="PreProc">var</span> r/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *r-a
<span id="L285" class="LineNr">285 </span> copy-byte-to *l-a, r
<span id="L286" class="LineNr">286 </span> copy-byte-to *r-a, l
<span id="L287" class="LineNr">287 </span> <span class="Delimiter">}</span>
<span id="L288" class="LineNr">288 </span> left <span class="SpecialChar">&lt;-</span> increment
<span id="L289" class="LineNr">289 </span> right <span class="SpecialChar">&lt;-</span> decrement
<span id="L290" class="LineNr">290 </span> <span class="PreProc">loop</span>
<span id="L291" class="LineNr">291 </span> <span class="Delimiter">}</span>
<span id="L292" class="LineNr">292 </span><span class="Delimiter">}</span>
<span id="L293" class="LineNr">293 </span>
<span id="L294" class="LineNr">294 </span><span class="muComment"># debug helper</span>
<span id="L295" class="LineNr">295 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L295'>dump-digits</a></span> _buf: (addr array byte), count: int, msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L296" class="LineNr">296 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L297" class="LineNr">297 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L298" class="LineNr">298 </span> <a href='405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, msg
<span id="L299" class="LineNr">299 </span> <a href='405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;: &quot;</span>
<span id="L300" class="LineNr">300 </span> <span class="Delimiter">{</span>
<span id="L301" class="LineNr">301 </span> compare i, count
<span id="L302" class="LineNr">302 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L303" class="LineNr">303 </span> <span class="PreProc">var</span> curr/<span class="Constant">edx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L304" class="LineNr">304 </span> <span class="PreProc">var</span> curr-byte/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *curr
<span id="L305" class="LineNr">305 </span> <span class="PreProc">var</span> curr-int/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy curr-byte
<span id="L306" class="LineNr">306 </span> <a href='405screen.mu.html#L480'>print-int32-decimal</a> <span class="Constant">0</span>, curr-int
<span id="L307" class="LineNr">307 </span> <a href='405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot; &quot;</span>
<span id="L308" class="LineNr">308 </span> <span class="PreProc">break-if-=</span>
<span id="L309" class="LineNr">309 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L310" class="LineNr">310 </span> <span class="PreProc">loop</span>
<span id="L311" class="LineNr">311 </span> <span class="Delimiter">}</span>
<span id="L312" class="LineNr">312 </span> <a href='405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;\n&quot;</span>
<span id="L313" class="LineNr">313 </span><span class="Delimiter">}</span>
<span id="L314" class="LineNr">314 </span>
<span id="L315" class="LineNr">315 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L315'>double-array-of-decimal-digits</a></span> _buf: (addr array byte), _n: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L316" class="LineNr">316 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L317" class="LineNr">317 </span> <span class="muComment"># initialize delta</span>
<span id="L318" class="LineNr">318 </span> <span class="PreProc">var</span> delta/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L319" class="LineNr">319 </span> <span class="Delimiter">{</span>
<span id="L320" class="LineNr">320 </span> <span class="PreProc">var</span> curr/<span class="Constant">ebx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, <span class="Constant">0</span>
<span id="L321" class="LineNr">321 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *curr
<span id="L322" class="LineNr">322 </span> compare tmp, <span class="Constant">5</span>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L324" class="LineNr">324 </span> delta <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L325" class="LineNr">325 </span> <span class="Delimiter">}</span>
<span id="L326" class="LineNr">326 </span> <span class="muComment"># loop</span>
<span id="L327" class="LineNr">327 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L328" class="LineNr">328 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _n
<span id="L329" class="LineNr">329 </span> i <span class="SpecialChar">&lt;-</span> decrement
<span id="L330" class="LineNr">330 </span> <span class="Delimiter">{</span>
<span id="L331" class="LineNr">331 </span> compare i, <span class="Constant">0</span>
<span id="L332" class="LineNr">332 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L333" class="LineNr">333 </span> <span class="muComment"># x += 2*buf[i]</span>
<span id="L334" class="LineNr">334 </span> <span class="Delimiter">{</span>
<span id="L335" class="LineNr">335 </span> <span class="PreProc">var</span> tmp/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L336" class="LineNr">336 </span> <span class="PreProc">var</span> tmp2/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *tmp
<span id="L337" class="LineNr">337 </span> x <span class="SpecialChar">&lt;-</span> add tmp2
<span id="L338" class="LineNr">338 </span> x <span class="SpecialChar">&lt;-</span> add tmp2
<span id="L339" class="LineNr">339 </span> <span class="Delimiter">}</span>
<span id="L340" class="LineNr">340 </span> <span class="muComment"># x, buf[i+delta] = x/10, x%10</span>
<span id="L341" class="LineNr">341 </span> <span class="Delimiter">{</span>
<span id="L342" class="LineNr">342 </span> <span class="PreProc">var</span> dest-index/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy i
<span id="L343" class="LineNr">343 </span> dest-index <span class="SpecialChar">&lt;-</span> add delta
<span id="L344" class="LineNr">344 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, dest-index
<span id="L345" class="LineNr">345 </span> <span class="PreProc">var</span> next-digit/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L346" class="LineNr">346 </span> x, next-digit <span class="SpecialChar">&lt;-</span> <a href='314divide.subx.html#L3'>integer-divide</a> x, <span class="Constant">0xa</span>
<span id="L347" class="LineNr">347 </span> copy-byte-to *dest, next-digit
<span id="L348" class="LineNr">348 </span> <span class="Delimiter">}</span>
<span id="L349" class="LineNr">349 </span> <span class="muComment">#</span>
<span id="L350" class="LineNr">350 </span> i <span class="SpecialChar">&lt;-</span> decrement
<span id="L351" class="LineNr">351 </span> <span class="PreProc">loop</span>
<span id="L352" class="LineNr">352 </span> <span class="Delimiter">}</span>
<span id="L353" class="LineNr">353 </span> <span class="muComment"># final patch-up</span>
<span id="L354" class="LineNr">354 </span> <span class="PreProc">var</span> n/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _n
<span id="L355" class="LineNr">355 </span> compare delta, <span class="Constant">1</span>
<span id="L356" class="LineNr">356 </span> <span class="Delimiter">{</span>
<span id="L357" class="LineNr">357 </span> <span class="PreProc">break-if-!=</span>
<span id="L358" class="LineNr">358 </span> <span class="PreProc">var</span> curr/<span class="Constant">ebx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, <span class="Constant">0</span>
<span id="L359" class="LineNr">359 </span> <span class="PreProc">var</span> one/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L360" class="LineNr">360 </span> copy-byte-to *curr, one
<span id="L361" class="LineNr">361 </span> n <span class="SpecialChar">&lt;-</span> increment
<span id="L362" class="LineNr">362 </span> <span class="Delimiter">}</span>
<span id="L363" class="LineNr">363 </span> <span class="PreProc">return</span> n
<span id="L364" class="LineNr">364 </span><span class="Delimiter">}</span>
<span id="L365" class="LineNr">365 </span>
<span id="L366" class="LineNr">366 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L366'>halve-array-of-decimal-digits</a></span> _buf: (addr array byte), _n: int, _dp: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int, _/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L367" class="LineNr">367 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> n/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _n
<span id="L369" class="LineNr">369 </span> <span class="PreProc">var</span> dp/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy _dp
<span id="L370" class="LineNr">370 </span> <span class="muComment"># initialize one side</span>
<span id="L371" class="LineNr">371 </span> <span class="Delimiter">{</span>
<span id="L372" class="LineNr">372 </span> <span class="muComment"># if buf[n-1]%2 == 0, break</span>
<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> right-index/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L374" class="LineNr">374 </span> right-index <span class="SpecialChar">&lt;-</span> decrement
<span id="L375" class="LineNr">375 </span> <span class="PreProc">var</span> right-a/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, right-index
<span id="L376" class="LineNr">376 </span> <span class="PreProc">var</span> right/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *right-a
<span id="L377" class="LineNr">377 </span> <span class="PreProc">var</span> right-int/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy right
<span id="L378" class="LineNr">378 </span> <span class="PreProc">var</span> remainder/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L379" class="LineNr">379 </span> <span class="Delimiter">{</span>
<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> dummy/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L381" class="LineNr">381 </span> dummy, remainder <span class="SpecialChar">&lt;-</span> <a href='314divide.subx.html#L3'>integer-divide</a> right-int, <span class="Constant">2</span>
<span id="L382" class="LineNr">382 </span> <span class="Delimiter">}</span>
<span id="L383" class="LineNr">383 </span> compare remainder, <span class="Constant">0</span>
<span id="L384" class="LineNr">384 </span> <span class="PreProc">break-if-=</span>
<span id="L385" class="LineNr">385 </span> <span class="muComment"># buf[n] = 0</span>
<span id="L386" class="LineNr">386 </span> <span class="PreProc">var</span> next-a/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, n
<span id="L387" class="LineNr">387 </span> <span class="PreProc">var</span> zero/<span class="Constant">edx</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L388" class="LineNr">388 </span> copy-byte-to *next-a, zero
<span id="L389" class="LineNr">389 </span> <span class="muComment"># n++</span>
<span id="L390" class="LineNr">390 </span> n <span class="SpecialChar">&lt;-</span> increment
<span id="L391" class="LineNr">391 </span> <span class="Delimiter">}</span>
<span id="L392" class="LineNr">392 </span> <span class="muComment"># initialize the other</span>
<span id="L393" class="LineNr">393 </span> <span class="PreProc">var</span> delta/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L394" class="LineNr">394 </span> <span class="PreProc">var</span> x/<span class="Constant">esi</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L395" class="LineNr">395 </span> <span class="Delimiter">{</span>
<span id="L396" class="LineNr">396 </span> <span class="muComment"># if buf[0] &gt;= 2, break</span>
<span id="L397" class="LineNr">397 </span> <span class="PreProc">var</span> left/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, <span class="Constant">0</span>
<span id="L398" class="LineNr">398 </span> <span class="PreProc">var</span> src/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *left
<span id="L399" class="LineNr">399 </span> compare src, <span class="Constant">2</span>
<span id="L400" class="LineNr">400 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L401" class="LineNr">401 </span> <span class="muComment"># delta, x = 1, buf[0]</span>
<span id="L402" class="LineNr">402 </span> delta <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L403" class="LineNr">403 </span> x <span class="SpecialChar">&lt;-</span> copy src
<span id="L404" class="LineNr">404 </span> <span class="muComment"># n--</span>
<span id="L405" class="LineNr">405 </span> n <span class="SpecialChar">&lt;-</span> decrement
<span id="L406" class="LineNr">406 </span> <span class="muComment"># dp--</span>
<span id="L407" class="LineNr">407 </span> dp <span class="SpecialChar">&lt;-</span> decrement
<span id="L408" class="LineNr">408 </span> <span class="Delimiter">}</span>
<span id="L409" class="LineNr">409 </span> <span class="muComment"># loop</span>
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> i/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L411" class="LineNr">411 </span> <span class="Delimiter">{</span>
<span id="L412" class="LineNr">412 </span> compare i, n
<span id="L413" class="LineNr">413 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L414" class="LineNr">414 </span> <span class="muComment"># x = x*10 + buf[i+delta]</span>
<span id="L415" class="LineNr">415 </span> <span class="Delimiter">{</span>
<span id="L416" class="LineNr">416 </span> <span class="PreProc">var</span> ten/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0xa</span>
<span id="L417" class="LineNr">417 </span> x <span class="SpecialChar">&lt;-</span> multiply ten
<span id="L418" class="LineNr">418 </span> <span class="PreProc">var</span> src-index/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy i
<span id="L419" class="LineNr">419 </span> src-index <span class="SpecialChar">&lt;-</span> add delta
<span id="L420" class="LineNr">420 </span> <span class="PreProc">var</span> src-a/<span class="Constant">edx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, src-index
<span id="L421" class="LineNr">421 </span> <span class="PreProc">var</span> src/<span class="Constant">edx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *src-a
<span id="L422" class="LineNr">422 </span> x <span class="SpecialChar">&lt;-</span> add src
<span id="L423" class="LineNr">423 </span> <span class="Delimiter">}</span>
<span id="L424" class="LineNr">424 </span> <span class="muComment"># buf[i], x = x/2, x%2</span>
<span id="L425" class="LineNr">425 </span> <span class="Delimiter">{</span>
<span id="L426" class="LineNr">426 </span> <span class="PreProc">var</span> quotient/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L427" class="LineNr">427 </span> <span class="PreProc">var</span> remainder/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L428" class="LineNr">428 </span> quotient, remainder <span class="SpecialChar">&lt;-</span> <a href='314divide.subx.html#L3'>integer-divide</a> x, <span class="Constant">2</span>
<span id="L429" class="LineNr">429 </span> x <span class="SpecialChar">&lt;-</span> copy remainder
<span id="L430" class="LineNr">430 </span> <span class="PreProc">var</span> dest/<span class="Constant">edx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L431" class="LineNr">431 </span> copy-byte-to *dest, quotient
<span id="L432" class="LineNr">432 </span> <span class="Delimiter">}</span>
<span id="L433" class="LineNr">433 </span> <span class="muComment">#</span>
<span id="L434" class="LineNr">434 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L435" class="LineNr">435 </span> <span class="PreProc">loop</span>
<span id="L436" class="LineNr">436 </span> <span class="Delimiter">}</span>
<span id="L437" class="LineNr">437 </span> <span class="PreProc">return</span> n, dp
<span id="L438" class="LineNr">438 </span><span class="Delimiter">}</span>
<span id="L439" class="LineNr">439 </span>
<span id="L440" class="LineNr">440 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L440'>print-float-buffer</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), _buf: (addr array byte), n: int, dp: int, precision: int <span class="Delimiter">{</span>
<span id="L441" class="LineNr">441 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L442" class="LineNr">442 </span><span class="CommentedCode">#? print-int32-hex 0, dp</span>
<span id="L443" class="LineNr">443 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L444" class="LineNr">444 </span> <span class="Delimiter">{</span>
<span id="L445" class="LineNr">445 </span> compare dp, <span class="Constant">0</span>
<span id="L446" class="LineNr">446 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L447" class="LineNr">447 </span> <a href='412print-float-decimal.mu.html#L490'>print-float-buffer-in-scientific-notation</a> <a href='405screen.mu.html#L9'>screen</a>, buf, n, dp, precision
<span id="L448" class="LineNr">448 </span> <span class="PreProc">return</span>
<span id="L449" class="LineNr">449 </span> <span class="Delimiter">}</span>
<span id="L450" class="LineNr">450 </span> <span class="Delimiter">{</span>
<span id="L451" class="LineNr">451 </span> <span class="PreProc">var</span> dp2/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy dp
<span id="L452" class="LineNr">452 </span> compare dp2, precision
<span id="L453" class="LineNr">453 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L454" class="LineNr">454 </span> <a href='412print-float-decimal.mu.html#L490'>print-float-buffer-in-scientific-notation</a> <a href='405screen.mu.html#L9'>screen</a>, buf, n, dp, precision
<span id="L455" class="LineNr">455 </span> <span class="PreProc">return</span>
<span id="L456" class="LineNr">456 </span> <span class="Delimiter">}</span>
<span id="L457" class="LineNr">457 </span> <span class="Delimiter">{</span>
<span id="L458" class="LineNr">458 </span> compare dp, <span class="Constant">0</span>
<span id="L459" class="LineNr">459 </span> <span class="PreProc">break-if-!=</span>
<span id="L460" class="LineNr">460 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;0&quot;</span>
<span id="L461" class="LineNr">461 </span> <span class="Delimiter">}</span>
<span id="L462" class="LineNr">462 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L463" class="LineNr">463 </span> <span class="muComment"># bounds = min(n, dp+3)</span>
<span id="L464" class="LineNr">464 </span> <span class="PreProc">var</span> limit/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy dp
<span id="L465" class="LineNr">465 </span> limit <span class="SpecialChar">&lt;-</span> add <span class="Constant">3</span>
<span id="L466" class="LineNr">466 </span> <span class="Delimiter">{</span>
<span id="L467" class="LineNr">467 </span> compare limit, n
<span id="L468" class="LineNr">468 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L469" class="LineNr">469 </span> limit <span class="SpecialChar">&lt;-</span> copy n
<span id="L470" class="LineNr">470 </span> <span class="Delimiter">}</span>
<span id="L471" class="LineNr">471 </span> <span class="Delimiter">{</span>
<span id="L472" class="LineNr">472 </span> compare i, limit
<span id="L473" class="LineNr">473 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L474" class="LineNr">474 </span> <span class="muComment"># print '.' if necessary</span>
<span id="L475" class="LineNr">475 </span> compare i, dp
<span id="L476" class="LineNr">476 </span> <span class="Delimiter">{</span>
<span id="L477" class="LineNr">477 </span> <span class="PreProc">break-if-!=</span>
<span id="L478" class="LineNr">478 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;.&quot;</span>
<span id="L479" class="LineNr">479 </span> <span class="Delimiter">}</span>
<span id="L480" class="LineNr">480 </span> <span class="PreProc">var</span> curr-a/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L481" class="LineNr">481 </span> <span class="PreProc">var</span> curr/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *curr-a
<span id="L482" class="LineNr">482 </span> curr <span class="SpecialChar">&lt;-</span> add <span class="Constant">0x30</span> <span class="muComment"># '0'</span>
<span id="L483" class="LineNr">483 </span> <span class="PreProc">var</span> curr-grapheme/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy curr
<span id="L484" class="LineNr">484 </span> <a href='405screen.mu.html#L210'>print-grapheme</a> <a href='405screen.mu.html#L9'>screen</a>, curr-grapheme
<span id="L485" class="LineNr">485 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L486" class="LineNr">486 </span> <span class="PreProc">loop</span>
<span id="L487" class="LineNr">487 </span> <span class="Delimiter">}</span>
<span id="L488" class="LineNr">488 </span><span class="Delimiter">}</span>
<span id="L489" class="LineNr">489 </span>
<span id="L490" class="LineNr">490 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L490'>print-float-buffer-in-scientific-notation</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), _buf: (addr array byte), n: int, dp: int, precision: int <span class="Delimiter">{</span>
<span id="L491" class="LineNr">491 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L492" class="LineNr">492 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L493" class="LineNr">493 </span> <span class="Delimiter">{</span>
<span id="L494" class="LineNr">494 </span> compare i, n
<span id="L495" class="LineNr">495 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L496" class="LineNr">496 </span> compare i, precision
<span id="L497" class="LineNr">497 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L498" class="LineNr">498 </span> compare i, <span class="Constant">1</span>
<span id="L499" class="LineNr">499 </span> <span class="Delimiter">{</span>
<span id="L500" class="LineNr">500 </span> <span class="PreProc">break-if-!=</span>
<span id="L501" class="LineNr">501 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;.&quot;</span>
<span id="L502" class="LineNr">502 </span> <span class="Delimiter">}</span>
<span id="L503" class="LineNr">503 </span> <span class="PreProc">var</span> curr-a/<span class="Constant">ecx</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, i
<span id="L504" class="LineNr">504 </span> <span class="PreProc">var</span> curr/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *curr-a
<span id="L505" class="LineNr">505 </span> curr <span class="SpecialChar">&lt;-</span> add <span class="Constant">0x30</span> <span class="muComment"># '0'</span>
<span id="L506" class="LineNr">506 </span> <span class="PreProc">var</span> curr-grapheme/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy curr
<span id="L507" class="LineNr">507 </span> <a href='405screen.mu.html#L210'>print-grapheme</a> <a href='405screen.mu.html#L9'>screen</a>, curr-grapheme
<span id="L508" class="LineNr">508 </span> <span class="muComment">#</span>
<span id="L509" class="LineNr">509 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L510" class="LineNr">510 </span> <span class="PreProc">loop</span>
<span id="L511" class="LineNr">511 </span> <span class="Delimiter">}</span>
<span id="L512" class="LineNr">512 </span> <a href='405screen.mu.html#L169'>print-string</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;e&quot;</span>
<span id="L513" class="LineNr">513 </span> decrement dp
<span id="L514" class="LineNr">514 </span> <a href='405screen.mu.html#L480'>print-int32-decimal</a> <a href='405screen.mu.html#L9'>screen</a>, dp
<span id="L515" class="LineNr">515 </span><span class="Delimiter">}</span>
<span id="L516" class="LineNr">516 </span>
<span id="L517" class="LineNr">517 </span><span class="muComment"># follows the structure of print-float-decimal-approximate</span>
<span id="L518" class="LineNr">518 </span><span class="muComment"># 'precision' controls the maximum width past which we resort to scientific notation</span>
<span id="L519" class="LineNr">519 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L519'>float-size</a></span> in: float, precision: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L520" class="LineNr">520 </span> <span class="muComment"># - special names</span>
<span id="L521" class="LineNr">521 </span> <span class="PreProc">var</span> bits/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> reinterpret in
<span id="L522" class="LineNr">522 </span> compare bits, <span class="Constant">0</span>
<span id="L523" class="LineNr">523 </span> <span class="Delimiter">{</span>
<span id="L524" class="LineNr">524 </span> <span class="PreProc">break-if-!=</span>
<span id="L525" class="LineNr">525 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># &quot;0&quot;</span>
<span id="L526" class="LineNr">526 </span> <span class="Delimiter">}</span>
<span id="L527" class="LineNr">527 </span> compare bits, <span class="Constant">0x80000000</span>
<span id="L528" class="LineNr">528 </span> <span class="Delimiter">{</span>
<span id="L529" class="LineNr">529 </span> <span class="PreProc">break-if-!=</span>
<span id="L530" class="LineNr">530 </span> <span class="PreProc">return</span> <span class="Constant">2</span> <span class="muComment"># &quot;-0&quot;</span>
<span id="L531" class="LineNr">531 </span> <span class="Delimiter">}</span>
<span id="L532" class="LineNr">532 </span> compare bits, <span class="Constant">0x7f800000</span>
<span id="L533" class="LineNr">533 </span> <span class="Delimiter">{</span>
<span id="L534" class="LineNr">534 </span> <span class="PreProc">break-if-!=</span>
<span id="L535" class="LineNr">535 </span> <span class="PreProc">return</span> <span class="Constant">3</span> <span class="muComment"># &quot;Inf&quot;</span>
<span id="L536" class="LineNr">536 </span> <span class="Delimiter">}</span>
<span id="L537" class="LineNr">537 </span> compare bits, <span class="Constant">0xff800000</span>
<span id="L538" class="LineNr">538 </span> <span class="Delimiter">{</span>
<span id="L539" class="LineNr">539 </span> <span class="PreProc">break-if-!=</span>
<span id="L540" class="LineNr">540 </span> <span class="PreProc">return</span> <span class="Constant">4</span> <span class="muComment"># &quot;-Inf&quot;</span>
<span id="L541" class="LineNr">541 </span> <span class="Delimiter">}</span>
<span id="L542" class="LineNr">542 </span> <span class="PreProc">var</span> exponent/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L543" class="LineNr">543 </span> exponent <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x17</span> <span class="muComment"># 23 bits of mantissa</span>
<span id="L544" class="LineNr">544 </span> exponent <span class="SpecialChar">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L545" class="LineNr">545 </span> exponent <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x7f</span>
<span id="L546" class="LineNr">546 </span> compare exponent, <span class="Constant">0x80</span>
<span id="L547" class="LineNr">547 </span> <span class="Delimiter">{</span>
<span id="L548" class="LineNr">548 </span> <span class="PreProc">break-if-!=</span>
<span id="L549" class="LineNr">549 </span> <span class="PreProc">return</span> <span class="Constant">3</span> <span class="muComment"># &quot;NaN&quot;</span>
<span id="L550" class="LineNr">550 </span> <span class="Delimiter">}</span>
<span id="L551" class="LineNr">551 </span> <span class="muComment"># - regular numbers</span>
<span id="L552" class="LineNr">552 </span> <span class="muComment"># v = 1.mantissa (in base 2) &lt;&lt; 0x17</span>
<span id="L553" class="LineNr">553 </span> <span class="PreProc">var</span> v/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy bits
<span id="L554" class="LineNr">554 </span> v <span class="SpecialChar">&lt;-</span> and <span class="Constant">0x7fffff</span>
<span id="L555" class="LineNr">555 </span> v <span class="SpecialChar">&lt;-</span> or <span class="Constant">0x00800000</span> <span class="muComment"># insert implicit 1</span>
<span id="L556" class="LineNr">556 </span> <span class="muComment"># e = exponent - 0x17</span>
<span id="L557" class="LineNr">557 </span> <span class="PreProc">var</span> e/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy exponent
<span id="L558" class="LineNr">558 </span> e <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">0x17</span> <span class="muComment"># move decimal place from before mantissa to after</span>
<span id="L559" class="LineNr">559 </span>
<span id="L560" class="LineNr">560 </span> <span class="muComment"># initialize buffer with decimal representation of v</span>
<span id="L561" class="LineNr">561 </span> <span class="PreProc">var</span> buf-storage: (array byte <span class="Constant">0x7f</span>)
<span id="L562" class="LineNr">562 </span> <span class="PreProc">var</span> buf/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> address buf-storage
<span id="L563" class="LineNr">563 </span> <span class="PreProc">var</span> n/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L255'>decimal-digits</a> v, buf
<span id="L564" class="LineNr">564 </span> <a href='412print-float-decimal.mu.html#L272'>reverse-digits</a> buf, n
<span id="L565" class="LineNr">565 </span>
<span id="L566" class="LineNr">566 </span> <span class="muComment"># loop if e &gt; 0</span>
<span id="L567" class="LineNr">567 </span> <span class="Delimiter">{</span>
<span id="L568" class="LineNr">568 </span> compare e, <span class="Constant">0</span>
<span id="L569" class="LineNr">569 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L570" class="LineNr">570 </span> n <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L315'>double-array-of-decimal-digits</a> buf, n
<span id="L571" class="LineNr">571 </span> e <span class="SpecialChar">&lt;-</span> decrement
<span id="L572" class="LineNr">572 </span> <span class="PreProc">loop</span>
<span id="L573" class="LineNr">573 </span> <span class="Delimiter">}</span>
<span id="L574" class="LineNr">574 </span>
<span id="L575" class="LineNr">575 </span> <span class="PreProc">var</span> dp/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy n
<span id="L576" class="LineNr">576 </span>
<span id="L577" class="LineNr">577 </span> <span class="muComment"># loop if e &lt; 0</span>
<span id="L578" class="LineNr">578 </span> <span class="Delimiter">{</span>
<span id="L579" class="LineNr">579 </span> compare e, <span class="Constant">0</span>
<span id="L580" class="LineNr">580 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L581" class="LineNr">581 </span> n, dp <span class="SpecialChar">&lt;-</span> <a href='412print-float-decimal.mu.html#L366'>halve-array-of-decimal-digits</a> buf, n, dp
<span id="L582" class="LineNr">582 </span> e <span class="SpecialChar">&lt;-</span> increment
<span id="L583" class="LineNr">583 </span> <span class="PreProc">loop</span>
<span id="L584" class="LineNr">584 </span> <span class="Delimiter">}</span>
<span id="L585" class="LineNr">585 </span>
<span id="L586" class="LineNr">586 </span> compare dp, <span class="Constant">0</span>
<span id="L587" class="LineNr">587 </span> <span class="Delimiter">{</span>
<span id="L588" class="LineNr">588 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L589" class="LineNr">589 </span> <span class="PreProc">return</span> <span class="Constant">8</span> <span class="muComment"># hacky for scientific notation</span>
<span id="L590" class="LineNr">590 </span> <span class="Delimiter">}</span>
<span id="L591" class="LineNr">591 </span> <span class="Delimiter">{</span>
<span id="L592" class="LineNr">592 </span> <span class="PreProc">var</span> dp2/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy dp
<span id="L593" class="LineNr">593 </span> compare dp2, precision
<span id="L594" class="LineNr">594 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L595" class="LineNr">595 </span> <span class="PreProc">return</span> <span class="Constant">8</span> <span class="muComment"># hacky for scientific notation</span>
<span id="L596" class="LineNr">596 </span> <span class="Delimiter">}</span>
<span id="L597" class="LineNr">597 </span>
<span id="L598" class="LineNr">598 </span> <span class="muComment"># result = min(n, dp+3)</span>
<span id="L599" class="LineNr">599 </span> <span class="PreProc">var</span> result/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy dp
<span id="L600" class="LineNr">600 </span> result <span class="SpecialChar">&lt;-</span> add <span class="Constant">3</span>
<span id="L601" class="LineNr">601 </span> <span class="Delimiter">{</span>
<span id="L602" class="LineNr">602 </span> compare result, n
<span id="L603" class="LineNr">603 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L604" class="LineNr">604 </span> result <span class="SpecialChar">&lt;-</span> copy n
<span id="L605" class="LineNr">605 </span> <span class="Delimiter">}</span>
<span id="L606" class="LineNr">606 </span>
<span id="L607" class="LineNr">607 </span> <span class="muComment"># account for decimal point</span>
<span id="L608" class="LineNr">608 </span> compare dp, n
<span id="L609" class="LineNr">609 </span> <span class="Delimiter">{</span>
<span id="L610" class="LineNr">610 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L611" class="LineNr">611 </span> result <span class="SpecialChar">&lt;-</span> increment
<span id="L612" class="LineNr">612 </span> <span class="Delimiter">}</span>
<span id="L613" class="LineNr">613 </span>
<span id="L614" class="LineNr">614 </span> <span class="muComment"># account for sign</span>
<span id="L615" class="LineNr">615 </span> <span class="PreProc">var</span> sign/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> reinterpret in
<span id="L616" class="LineNr">616 </span> sign <span class="SpecialChar">&lt;-</span> shift-right <span class="Constant">0x1f</span>
<span id="L617" class="LineNr">617 </span> <span class="Delimiter">{</span>
<span id="L618" class="LineNr">618 </span> compare sign, <span class="Constant">1</span>
<span id="L619" class="LineNr">619 </span> <span class="PreProc">break-if-!=</span>
<span id="L620" class="LineNr">620 </span> result <span class="SpecialChar">&lt;-</span> increment
<span id="L621" class="LineNr">621 </span> <span class="Delimiter">}</span>
<span id="L622" class="LineNr">622 </span> <span class="PreProc">return</span> result
<span id="L623" class="LineNr">623 </span><span class="Delimiter">}</span>
<span id="L624" class="LineNr">624 </span>
<span id="L625" class="LineNr">625 </span><span class="muComment">## helper</span>
<span id="L626" class="LineNr">626 </span>
<span id="L627" class="LineNr">627 </span><span class="muComment"># like check-strings-equal, except array sizes don't have to match</span>
<span id="L628" class="LineNr">628 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='412print-float-decimal.mu.html#L628'>check-buffer-contains</a></span> _buf: (addr array byte), _contents: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L629" class="LineNr">629 </span> <span class="PreProc">var</span> buf/<span class="Constant">esi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _buf
<span id="L630" class="LineNr">630 </span> <span class="PreProc">var</span> contents/<span class="Constant">edi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _contents
<span id="L631" class="LineNr">631 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='105string-equal.subx.html#L57'>string-starts-with?</a> buf, contents
<span id="L632" class="LineNr">632 </span> <a href='401test.mu.html#L3'>check-true</a> a, msg
<span id="L633" class="LineNr">633 </span> <span class="PreProc">var</span> len/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length contents
<span id="L634" class="LineNr">634 </span> <span class="PreProc">var</span> len2/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> length buf
<span id="L635" class="LineNr">635 </span> compare len, len2
<span id="L636" class="LineNr">636 </span> <span class="PreProc">break-if-=</span>
<span id="L637" class="LineNr">637 </span> <span class="PreProc">var</span> c/<span class="Constant">eax</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index buf, len
<span id="L638" class="LineNr">638 </span> <span class="PreProc">var</span> d/<span class="Constant">eax</span>: byte <span class="SpecialChar">&lt;-</span> copy-byte *c
<span id="L639" class="LineNr">639 </span> <span class="PreProc">var</span> e/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy d
<span id="L640" class="LineNr">640 </span> <a href='102test.subx.html#L23'>check-ints-equal</a> e, <span class="Constant">0</span>, msg
<span id="L641" class="LineNr">641 </span><span class="Delimiter">}</span>
<span id="L642" class="LineNr">642 </span>
<span id="L643" class="LineNr">643 </span><span class="PreProc">fn</span> <span class="muTest"><a href='412print-float-decimal.mu.html#L643'>test-check-buffer-contains</a></span> <span class="Delimiter">{</span>
<span id="L644" class="LineNr">644 </span> <span class="PreProc">var</span> arr: (array byte <span class="Constant">4</span>)
<span id="L645" class="LineNr">645 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> address arr
<span id="L646" class="LineNr">646 </span> <span class="PreProc">var</span> b/<span class="Constant">eax</span>: (addr byte) <span class="SpecialChar">&lt;-</span> index a, <span class="Constant">0</span>
<span id="L647" class="LineNr">647 </span> <span class="PreProc">var</span> c/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x61</span> <span class="muComment"># 'a'</span>
<span id="L648" class="LineNr">648 </span> copy-byte-to *b, c
<span id="L649" class="LineNr">649 </span> <a href='412print-float-decimal.mu.html#L628'>check-buffer-contains</a> a, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-check-buffer-contains&quot;</span>
<span id="L650" class="LineNr">650 </span> <a href='412print-float-decimal.mu.html#L628'>check-buffer-contains</a> <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - <a href='412print-float-decimal.mu.html#L643'>test-check-buffer-contains</a>/null&quot;</span> <span class="muComment"># no null check when arrays have same length</span>
<span id="L651" class="LineNr">651 </span><span class="Delimiter">}</span>
<span id="L652" class="LineNr">652 </span>
<span id="L653" class="LineNr">653 </span><span class="CommentedCode">#? fn main -&gt; _/ebx: int {</span>
<span id="L654" class="LineNr">654 </span><span class="CommentedCode">#? run-tests</span>
<span id="L655" class="LineNr">655 </span><span class="CommentedCode">#? #? test-print-float-decimal-approximate-integer</span>
<span id="L656" class="LineNr">656 </span><span class="CommentedCode">#? #? test-print-float-decimal-approximate-normal</span>
<span id="L657" class="LineNr">657 </span><span class="CommentedCode">#? return 0</span>
<span id="L658" class="LineNr">658 </span><span class="CommentedCode">#? }</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -137,7 +137,7 @@ if ('onhashchange' in window) {
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">break-if-=</span> $expression:<span class="PreProc">loop</span>
<span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">}</span>
<span id="L80" class="LineNr"> 80 </span> <span class="muComment"># read operator</span>
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L82" class="LineNr"> 82 </span> op, look <span class="SpecialChar">&lt;-</span> operator look
<span id="L83" class="LineNr"> 83 </span> <span class="muComment"># read next arg</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> second/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
@ -183,7 +183,7 @@ if ('onhashchange' in window) {
<span id="L124" class="LineNr">124 </span> <span class="PreProc">break-if-=</span> $term:<span class="PreProc">loop</span>
<span id="L125" class="LineNr">125 </span> <span class="Delimiter">}</span>
<span id="L126" class="LineNr">126 </span> <span class="muComment"># read operator</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L128" class="LineNr">128 </span> op, look <span class="SpecialChar">&lt;-</span> operator look
<span id="L129" class="LineNr">129 </span> <span class="muComment"># read next arg</span>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> second/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
@ -261,8 +261,8 @@ if ('onhashchange' in window) {
<span id="L202" class="LineNr">202 </span> <span class="PreProc">return</span> <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L203" class="LineNr">203 </span><span class="Delimiter">}</span>
<span id="L204" class="LineNr">204 </span>
<span id="L205" class="LineNr">205 </span><span class="PreProc">fn</span> <span class="muFunction">operator</span> _look: grapheme<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: byte, _/<span class="Constant">esi</span>: grapheme <span class="Delimiter">{</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: byte <span class="SpecialChar">&lt;-</span> copy _look
<span id="L205" class="LineNr">205 </span><span class="PreProc">fn</span> <span class="muFunction">operator</span> _look: grapheme<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: grapheme, _/<span class="Constant">esi</span>: grapheme <span class="Delimiter">{</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> op/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy _look
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> look/<span class="Constant">esi</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='arith.mu.html#L248'>get-char</a>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">return</span> op, look
<span id="L209" class="LineNr">209 </span><span class="Delimiter">}</span>

View File

@ -172,7 +172,7 @@ if ('onhashchange' in window) {
<span id="L110" class="LineNr"> 110 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L111" class="LineNr"> 111 </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="L112" class="LineNr"> 112 </span><span class="Constant">$subx-assort:<a href='../111read.subx.html#L48'>read</a></span>:
<span id="L113" class="Folded"> 113 </span><span class="Folded">+-- 9 lines: #? # print(&quot;read\n&quot;) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L113" class="Folded"> 113 </span><span class="Folded">+-- 9 lines: #? # print(&quot;read\n&quot;) --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L122" class="LineNr"> 122 </span> <span class="subxComment"># read-segments(in, table)</span>
<span id="L123" class="LineNr"> 123 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L124" class="LineNr"> 124 </span> 51/push-ecx
@ -182,7 +182,7 @@ if ('onhashchange' in window) {
<span id="L128" class="LineNr"> 128 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L129" class="LineNr"> 129 </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="L130" class="LineNr"> 130 </span><span class="Constant">$subx-assort:<a href='../108write.subx.html#L24'>write</a></span>:
<span id="L131" class="Folded"> 131 </span><span class="Folded">+-- 9 lines: #? # print(&quot;write\n&quot;) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L131" class="Folded"> 131 </span><span class="Folded">+-- 9 lines: #? # print(&quot;write\n&quot;) -------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L140" class="LineNr"> 140 </span> <span class="subxComment"># write-segments(out, table)</span>
<span id="L141" class="LineNr"> 141 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L142" class="LineNr"> 142 </span> 51/push-ecx
@ -385,7 +385,7 @@ if ('onhashchange' in window) {
<span id="L339" class="LineNr"> 339 </span> <span class="subxComment"># 10 11</span>
<span id="L340" class="LineNr"> 340 </span> <span class="subxComment"># == data 0x0a000000</span>
<span id="L341" class="LineNr"> 341 </span> <span class="subxComment"># 4 5/imm32</span>
<span id="L342" class="Folded"> 342 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L342" class="Folded"> 342 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L375" class="LineNr"> 375 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;== code 0x09000000&quot;, msg)</span>
<span id="L376" class="LineNr"> 376 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L377" class="LineNr"> 377 </span> 68/push <span class="Constant">&quot;F - <a href='assort.subx.html#L158'>test-subx-assort</a>/0&quot;</span>/imm32
@ -537,7 +537,7 @@ if ('onhashchange' in window) {
<span id="L523" class="LineNr"> 523 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L524" class="LineNr"> 524 </span> 81 7/subop/compare 0/mod/indirect 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="L525" class="LineNr"> 525 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">break</span>/disp32
<span id="L526" class="Folded"> 526 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L526" class="Folded"> 526 </span><span class="Folded">+-- 33 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L559" class="LineNr"> 559 </span> <span class="subxComment"># next-word-or-string(line, word-slice)</span>
<span id="L560" class="LineNr"> 560 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L561" class="LineNr"> 561 </span> 52/push-edx
@ -547,7 +547,7 @@ if ('onhashchange' in window) {
<span id="L565" class="LineNr"> 565 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L566" class="LineNr"> 566 </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="L567" class="LineNr"> 567 </span><span class="Constant">$read-segments:check1</span>:
<span id="L568" class="Folded"> 568 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check1\n&quot;) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L568" class="Folded"> 568 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check1\n&quot;) ------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L577" class="LineNr"> 577 </span> <span class="subxComment"># if (slice-empty?(word-slice)) continue</span>
<span id="L578" class="LineNr"> 578 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
<span id="L579" class="LineNr"> 579 </span> <span class="subxS2Comment"># . . push args</span>
@ -560,7 +560,7 @@ if ('onhashchange' in window) {
<span id="L586" class="LineNr"> 586 </span> 3d/compare-eax-and 0/imm32/false
<span id="L587" class="LineNr"> 587 </span> 0f 85/jump-if-!= $read-segments:<span class="Constant">loop</span>/disp32
<span id="L588" class="LineNr"> 588 </span><span class="Constant">$read-segments:check-for-comment</span>:
<span id="L589" class="Folded"> 589 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for comment\n&quot;) ----------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L589" class="Folded"> 589 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for comment\n&quot;) -------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L598" class="LineNr"> 598 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, &quot;#&quot;)) continue</span>
<span id="L599" class="LineNr"> 599 </span> <span class="subxS1Comment"># . var start/esi: (addr byte) = word-slice-&gt;start</span>
<span id="L600" class="LineNr"> 600 </span> 8b/copy 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to esi</span>
@ -571,8 +571,8 @@ if ('onhashchange' in window) {
<span id="L605" class="LineNr"> 605 </span> 3d/compare-eax-and 0x23/imm32/hash
<span id="L606" class="LineNr"> 606 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">loop</span>/disp32
<span id="L607" class="LineNr"> 607 </span><span class="Constant">$read-segments:check-for-segment-header</span>:
<span id="L608" class="Folded"> 608 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for segment header\n&quot;) ---------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L617" class="Folded"> 617 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L608" class="Folded"> 608 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for segment header\n&quot;) ------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L617" class="Folded"> 617 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L657" class="LineNr"> 657 </span> <span class="subxComment"># if !slice-equal?(word-slice, &quot;==&quot;) goto next check</span>
<span id="L658" class="LineNr"> 658 </span> <span class="subxS1Comment"># . eax = slice-equal?(word-slice, &quot;==&quot;)</span>
<span id="L659" class="LineNr"> 659 </span> <span class="subxS2Comment"># . . push args</span>
@ -593,7 +593,7 @@ if ('onhashchange' in window) {
<span id="L674" class="LineNr"> 674 </span> e8/call <a href='../135next-word-or-string.subx.html#L8'>next-word-or-string</a>/disp32
<span id="L675" class="LineNr"> 675 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L676" class="LineNr"> 676 </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="L677" class="Folded"> 677 </span><span class="Folded">+-- 40 lines: #? # dump segment name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L677" class="Folded"> 677 </span><span class="Folded">+-- 40 lines: #? # dump segment name ------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L717" class="LineNr"> 717 </span> <span class="subxComment"># var segment-slot/edi: (addr handle stream byte) = get-or-insert-slice(table, segment-name, row-size=16, Heap)</span>
<span id="L718" class="LineNr"> 718 </span> <span class="subxS1Comment"># . eax = get-or-insert-slice(table, segment-name, row-size=16, Heap)</span>
<span id="L719" class="LineNr"> 719 </span> <span class="subxS2Comment"># . . push args</span>
@ -607,7 +607,7 @@ if ('onhashchange' in window) {
<span id="L727" class="LineNr"> 727 </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> 0x10/imm32 <span class="subxComment"># add to esp</span>
<span id="L728" class="LineNr"> 728 </span> <span class="subxS1Comment"># . edi = eax</span>
<span id="L729" class="LineNr"> 729 </span> 89/copy 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to edi</span>
<span id="L730" class="Folded"> 730 </span><span class="Folded">+-- 33 lines: #? # print(&quot;slot: &quot; segment-slot &quot;\n&quot;) -----------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L730" class="Folded"> 730 </span><span class="Folded">+-- 33 lines: #? # print(&quot;slot: &quot; segment-slot &quot;\n&quot;) --------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L763" class="LineNr"> 763 </span> <span class="subxComment"># if (*segment-slot != 0) update curr-segment and continue</span>
<span id="L764" class="LineNr"> 764 </span> 81 7/subop/compare 0/mod/indirect 7/rm32/edi <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 edi</span>
<span id="L765" class="LineNr"> 765 </span> 0f 84/jump-if-= $read-segments:create-segment/disp32
@ -648,11 +648,11 @@ if ('onhashchange' in window) {
<span id="L800" class="LineNr"> 800 </span> 89/copy 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to ebx</span>
<span id="L801" class="LineNr"> 801 </span> <span class="subxComment"># fall through</span>
<span id="L802" class="LineNr"> 802 </span><span class="Constant">$read-segments:regular-line</span>:
<span id="L803" class="Folded"> 803 </span><span class="Folded">+-- 9 lines: #? # print(&quot;regular line\n&quot;) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L812" class="Folded"> 812 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L845" class="Folded"> 845 </span><span class="Folded">+-- 33 lines: #? # print(&quot;addr: &quot; curr-segment-&gt;write &quot;\n&quot;) ----------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L878" class="Folded"> 878 </span><span class="Folded">+-- 33 lines: #? # print(&quot;write: &quot; curr-segment-&gt;write &quot;\n&quot;) ---------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L911" class="Folded"> 911 </span><span class="Folded">+-- 33 lines: #? # print(&quot;size: &quot; curr-segment-&gt;size &quot;\n&quot;) -----------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L803" class="Folded"> 803 </span><span class="Folded">+-- 9 lines: #? # print(&quot;regular line\n&quot;) ------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L812" class="Folded"> 812 </span><span class="Folded">+-- 33 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L845" class="Folded"> 845 </span><span class="Folded">+-- 33 lines: #? # print(&quot;addr: &quot; curr-segment-&gt;write &quot;\n&quot;) -------------------------------------------------------------------------------------------------------------------------</span>
<span id="L878" class="Folded"> 878 </span><span class="Folded">+-- 33 lines: #? # print(&quot;write: &quot; curr-segment-&gt;write &quot;\n&quot;) ------------------------------------------------------------------------------------------------------------------------</span>
<span id="L911" class="Folded"> 911 </span><span class="Folded">+-- 33 lines: #? # print(&quot;size: &quot; curr-segment-&gt;size &quot;\n&quot;) --------------------------------------------------------------------------------------------------------------------------</span>
<span id="L944" class="LineNr"> 944 </span> <span class="subxComment"># rewind-stream(line)</span>
<span id="L945" class="LineNr"> 945 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L946" class="LineNr"> 946 </span> 51/push-ecx
@ -660,7 +660,7 @@ if ('onhashchange' in window) {
<span id="L948" class="LineNr"> 948 </span> e8/call <a href='../106stream.subx.html#L56'>rewind-stream</a>/disp32
<span id="L949" class="LineNr"> 949 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L950" class="LineNr"> 950 </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="L951" class="Folded"> 951 </span><span class="Folded">+-- 9 lines: #? # print(&quot;write stream\n&quot;) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L951" class="Folded"> 951 </span><span class="Folded">+-- 9 lines: #? # print(&quot;write stream\n&quot;) ------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L960" class="LineNr"> 960 </span> <span class="subxComment"># write-stream(curr-segment, line)</span>
<span id="L961" class="LineNr"> 961 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L962" class="LineNr"> 962 </span> 51/push-ecx
@ -670,7 +670,7 @@ if ('onhashchange' in window) {
<span id="L966" class="LineNr"> 966 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L967" class="LineNr"> 967 </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="L968" class="LineNr"> 968 </span> <span class="subxComment"># loop</span>
<span id="L969" class="Folded"> 969 </span><span class="Folded">+-- 9 lines: #? # print(&quot;loop\n&quot;) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L969" class="Folded"> 969 </span><span class="Folded">+-- 9 lines: #? # print(&quot;loop\n&quot;) --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L978" class="LineNr"> 978 </span> e9/jump $read-segments:<span class="Constant">loop</span>/disp32
<span id="L979" class="LineNr"> 979 </span><span class="Constant">$read-segments:break</span>:
<span id="L980" class="LineNr"> 980 </span><span class="Constant">$read-segments:end</span>:

View File

@ -328,7 +328,7 @@ if ('onhashchange' in window) {
<span id="L269" class="LineNr">269 </span> (<a href='braces.subx.html#L77'>subx-braces</a> <a href='../112read-byte.subx.html#L405'>_test-input-buffered-file</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L270" class="LineNr">270 </span> <span class="subxComment"># check that the line just passed through</span>
<span id="L271" class="LineNr">271 </span> (<a href='../115write-byte.subx.html#L81'>flush</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L272" class="Folded">272 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L272" class="Folded">272 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L277" class="LineNr">277 </span> (<a href='../109stream-equal.subx.html#L194'>check-stream-equal</a> <a href='../115write-byte.subx.html#L285'>_test-output-stream</a> <span class="Constant">&quot;== abcd 0x1 \n&quot;</span> <span class="Constant">&quot;F - test-subx-braces-passes-most-words-through&quot;</span>)
<span id="L278" class="LineNr">278 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L279" class="LineNr">279 </span> 89/&lt;- %esp 5/r32/ebp
@ -361,7 +361,7 @@ if ('onhashchange' in window) {
<span id="L306" class="LineNr">306 </span> (<a href='braces.subx.html#L77'>subx-braces</a> <a href='../112read-byte.subx.html#L405'>_test-input-buffered-file</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L307" class="LineNr">307 </span> <span class="subxComment"># check that the line just passed through</span>
<span id="L308" class="LineNr">308 </span> (<a href='../115write-byte.subx.html#L81'>flush</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L309" class="Folded">309 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L309" class="Folded">309 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L314" class="LineNr">314 </span> (<a href='../109stream-equal.subx.html#L194'>check-stream-equal</a> <a href='../115write-byte.subx.html#L285'>_test-output-stream</a> <span class="Constant">&quot;_loop0x00000001:\nab _break0x00000001/imm32 \ncd _loop0x00000001/imm32 \n_break0x00000001:\n&quot;</span> <span class="Constant">&quot;F - test-subx-braces-1&quot;</span>)
<span id="L315" class="LineNr">315 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L316" class="LineNr">316 </span> 89/&lt;- %esp 5/r32/ebp
@ -398,7 +398,7 @@ if ('onhashchange' in window) {
<span id="L347" class="LineNr">347 </span> (<a href='braces.subx.html#L77'>subx-braces</a> <a href='../112read-byte.subx.html#L405'>_test-input-buffered-file</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L348" class="LineNr">348 </span> <span class="subxComment"># check that the line just passed through</span>
<span id="L349" class="LineNr">349 </span> (<a href='../115write-byte.subx.html#L81'>flush</a> <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>)
<span id="L350" class="Folded">350 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L350" class="Folded">350 </span><span class="Folded">+-- 5 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L355" class="LineNr">355 </span> (<a href='../109stream-equal.subx.html#L194'>check-stream-equal</a> <a href='../115write-byte.subx.html#L285'>_test-output-stream</a> <span class="Constant">&quot;_loop0x00000001:\n_loop0x00000002:\nab _break0x00000002/imm32 \n_break0x00000002:\ncd _loop0x00000001/imm32 \n_break0x00000001:\n&quot;</span> <span class="Constant">&quot;F - test-subx-braces-2&quot;</span>)
<span id="L356" class="LineNr">356 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L357" class="LineNr">357 </span> 89/&lt;- %esp 5/r32/ebp

View File

@ -135,9 +135,9 @@ if ('onhashchange' in window) {
<span id="L76" class="LineNr"> 76 </span> <a href='main.mu.html#L60'>render</a> pg-addr, in
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L79" class="LineNr"> 79 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row1&quot;</span>
<span id="L80" class="LineNr"> 80 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; ab ef&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row2&quot;</span>
<span id="L81" class="LineNr"> 81 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">3</span>, <span class="Constant">&quot; cd gh&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row3&quot;</span>
<span id="L79" class="LineNr"> 79 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row1&quot;</span>
<span id="L80" class="LineNr"> 80 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; ab ef&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row2&quot;</span>
<span id="L81" class="LineNr"> 81 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">3</span>, <span class="Constant">&quot; cd gh&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L65'>test-render-multicolumn-text</a>/row3&quot;</span>
<span id="L82" class="LineNr"> 82 </span><span class="Delimiter">}</span>
<span id="L83" class="LineNr"> 83 </span>
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muTest"><a href='main.mu.html#L84'>test-render-heading-text</a></span> <span class="Delimiter">{</span>
@ -154,10 +154,10 @@ if ('onhashchange' in window) {
<span id="L95" class="LineNr"> 95 </span> <a href='main.mu.html#L60'>render</a> pg-addr, in
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L98" class="LineNr"> 98 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row1&quot;</span>
<span id="L99" class="LineNr"> 99 </span> <a href='../../405screen.mu.html#L666'>check-screen-row-in-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xa0</span>, <span class="Constant">2</span>, <span class="Constant">&quot; abc &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/heading&quot;</span>
<span id="L100" class="LineNr">100 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">3</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row3&quot;</span>
<span id="L101" class="LineNr">101 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">4</span>, <span class="Constant">&quot; def &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row4&quot;</span>
<span id="L98" class="LineNr"> 98 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row1&quot;</span>
<span id="L99" class="LineNr"> 99 </span> <a href='../../405screen.mu.html#L677'>check-screen-row-in-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xa0</span>, <span class="Constant">2</span>, <span class="Constant">&quot; abc &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/heading&quot;</span>
<span id="L100" class="LineNr">100 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">3</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row3&quot;</span>
<span id="L101" class="LineNr">101 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">4</span>, <span class="Constant">&quot; def &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L84'>test-render-heading-text</a>/row4&quot;</span>
<span id="L102" class="LineNr">102 </span><span class="Delimiter">}</span>
<span id="L103" class="LineNr">103 </span>
<span id="L104" class="LineNr">104 </span><span class="PreProc">fn</span> <span class="muTest"><a href='main.mu.html#L104'>test-render-bold-text</a></span> <span class="Delimiter">{</span>
@ -174,8 +174,8 @@ if ('onhashchange' in window) {
<span id="L115" class="LineNr">115 </span> <a href='main.mu.html#L60'>render</a> pg-addr, in
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L118" class="LineNr">118 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a b c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/text&quot;</span>
<span id="L119" class="LineNr">119 </span> <a href='../../405screen.mu.html#L838'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; b &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/bold&quot;</span>
<span id="L118" class="LineNr">118 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a b c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/text&quot;</span>
<span id="L119" class="LineNr">119 </span> <a href='../../405screen.mu.html#L849'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; b &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/bold&quot;</span>
<span id="L120" class="LineNr">120 </span><span class="Delimiter">}</span>
<span id="L121" class="LineNr">121 </span>
<span id="L122" class="LineNr">122 </span><span class="muComment"># terminals don't always support italics, so we'll just always render italics</span>
@ -194,8 +194,8 @@ if ('onhashchange' in window) {
<span id="L135" class="LineNr">135 </span> <a href='main.mu.html#L60'>render</a> pg-addr, in
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L138" class="LineNr">138 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a b c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L124'>test-render-pseudoitalic-text</a>/text&quot;</span>
<span id="L139" class="LineNr">139 </span> <a href='../../405screen.mu.html#L838'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; b &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L124'>test-render-pseudoitalic-text</a>/bold&quot;</span>
<span id="L138" class="LineNr">138 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a b c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L124'>test-render-pseudoitalic-text</a>/text&quot;</span>
<span id="L139" class="LineNr">139 </span> <a href='../../405screen.mu.html#L849'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; b &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L124'>test-render-pseudoitalic-text</a>/bold&quot;</span>
<span id="L140" class="LineNr">140 </span><span class="Delimiter">}</span>
<span id="L141" class="LineNr">141 </span>
<span id="L142" class="LineNr">142 </span><span class="PreProc">fn</span> <span class="muTest"><a href='main.mu.html#L142'>test-render-asterisk-in-text</a></span> <span class="Delimiter">{</span>
@ -212,8 +212,8 @@ if ('onhashchange' in window) {
<span id="L153" class="LineNr">153 </span> <a href='main.mu.html#L60'>render</a> pg-addr, in
<span id="L154" class="LineNr">154 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L156" class="LineNr">156 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a*b*c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/text&quot;</span>
<span id="L157" class="LineNr">157 </span> <a href='../../405screen.mu.html#L838'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/bold&quot;</span>
<span id="L156" class="LineNr">156 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; a*b*c&quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/text&quot;</span>
<span id="L157" class="LineNr">157 </span> <a href='../../405screen.mu.html#L849'>check-screen-row-in-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">2</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='main.mu.html#L104'>test-render-bold-text</a>/bold&quot;</span>
<span id="L158" class="LineNr">158 </span><span class="Delimiter">}</span>
<span id="L159" class="LineNr">159 </span>
<span id="L160" class="LineNr">160 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='main.mu.html#L160'>render-normal</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>), fs: (addr buffered-file) <span class="Delimiter">{</span>

View File

@ -261,7 +261,7 @@ if ('onhashchange' in window) {
<span id="L200" class="LineNr">200 </span> <span class="Delimiter">}</span>
<span id="L201" class="LineNr">201 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L202" class="LineNr">202 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L203" class="LineNr">203 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-print-grapheme-on-paginated-screen&quot;</span>
<span id="L203" class="LineNr">203 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-print-grapheme-on-paginated-screen&quot;</span>
<span id="L204" class="LineNr">204 </span><span class="Delimiter">}</span>
<span id="L205" class="LineNr">205 </span>
<span id="L206" class="LineNr">206 </span><span class="PreProc">fn</span> <span class="muTest"><a href='paginated-screen.mu.html#L206'>test-print-single-page</a></span> <span class="Delimiter">{</span>
@ -300,8 +300,8 @@ if ('onhashchange' in window) {
<span id="L239" class="LineNr">239 </span> <span class="Delimiter">}</span>
<span id="L240" class="LineNr">240 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L242" class="LineNr">242 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ab &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L206'>test-print-single-page</a>/row1&quot;</span>
<span id="L243" class="LineNr">243 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;cd &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L206'>test-print-single-page</a>/row2&quot;</span>
<span id="L242" class="LineNr">242 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ab &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L206'>test-print-single-page</a>/row1&quot;</span>
<span id="L243" class="LineNr">243 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;cd &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L206'>test-print-single-page</a>/row2&quot;</span>
<span id="L244" class="LineNr">244 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L245" class="LineNr">245 </span><span class="Delimiter">}</span>
<span id="L246" class="LineNr">246 </span>
@ -347,8 +347,8 @@ if ('onhashchange' in window) {
<span id="L286" class="LineNr">286 </span> <span class="Delimiter">}</span>
<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L289" class="LineNr">289 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L247'>test-print-single-page-narrower-than-page-width</a>/row1&quot;</span>
<span id="L290" class="LineNr">290 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;e &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L247'>test-print-single-page-narrower-than-page-width</a>/row2&quot;</span>
<span id="L289" class="LineNr">289 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L247'>test-print-single-page-narrower-than-page-width</a>/row1&quot;</span>
<span id="L290" class="LineNr">290 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;e &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L247'>test-print-single-page-narrower-than-page-width</a>/row2&quot;</span>
<span id="L291" class="LineNr">291 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L292" class="LineNr">292 </span><span class="Delimiter">}</span>
<span id="L293" class="LineNr">293 </span>
@ -394,8 +394,8 @@ if ('onhashchange' in window) {
<span id="L333" class="LineNr">333 </span> <span class="Delimiter">}</span>
<span id="L334" class="LineNr">334 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L335" class="LineNr">335 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L336" class="LineNr">336 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; abc&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L294'>test-print-single-page-narrower-than-page-width-with-margin</a>/row1&quot;</span>
<span id="L337" class="LineNr">337 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; de &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L294'>test-print-single-page-narrower-than-page-width-with-margin</a>/row2&quot;</span>
<span id="L336" class="LineNr">336 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; abc&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L294'>test-print-single-page-narrower-than-page-width-with-margin</a>/row1&quot;</span>
<span id="L337" class="LineNr">337 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; de &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L294'>test-print-single-page-narrower-than-page-width-with-margin</a>/row2&quot;</span>
<span id="L338" class="LineNr">338 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L339" class="LineNr">339 </span><span class="Delimiter">}</span>
<span id="L340" class="LineNr">340 </span>
@ -434,8 +434,8 @@ if ('onhashchange' in window) {
<span id="L373" class="LineNr">373 </span> <span class="Delimiter">}</span>
<span id="L374" class="LineNr">374 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L375" class="LineNr">375 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L376" class="LineNr">376 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ac&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L341'>test-print-multiple-pages</a>/row1&quot;</span>
<span id="L377" class="LineNr">377 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;bd&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L341'>test-print-multiple-pages</a>/row2&quot;</span>
<span id="L376" class="LineNr">376 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ac&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L341'>test-print-multiple-pages</a>/row1&quot;</span>
<span id="L377" class="LineNr">377 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;bd&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L341'>test-print-multiple-pages</a>/row2&quot;</span>
<span id="L378" class="LineNr">378 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L379" class="LineNr">379 </span><span class="Delimiter">}</span>
<span id="L380" class="LineNr">380 </span>
@ -502,8 +502,8 @@ if ('onhashchange' in window) {
<span id="L441" class="LineNr">441 </span> <span class="Delimiter">}</span>
<span id="L442" class="LineNr">442 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L443" class="LineNr">443 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L444" class="LineNr">444 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abef&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L381'>test-print-multiple-pages-2</a>/row1&quot;</span>
<span id="L445" class="LineNr">445 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;cdgh&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L381'>test-print-multiple-pages-2</a>/row2&quot;</span>
<span id="L444" class="LineNr">444 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abef&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L381'>test-print-multiple-pages-2</a>/row1&quot;</span>
<span id="L445" class="LineNr">445 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;cdgh&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L381'>test-print-multiple-pages-2</a>/row2&quot;</span>
<span id="L446" class="LineNr">446 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L447" class="LineNr">447 </span><span class="Delimiter">}</span>
<span id="L448" class="LineNr">448 </span>
@ -570,9 +570,9 @@ if ('onhashchange' in window) {
<span id="L509" class="LineNr">509 </span> <span class="Delimiter">}</span>
<span id="L510" class="LineNr">510 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> pg, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L511" class="LineNr">511 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L512" class="LineNr">512 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row1&quot;</span>
<span id="L513" class="LineNr">513 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; ab ef&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row2&quot;</span>
<span id="L514" class="LineNr">514 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot; cd gh&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row3&quot;</span>
<span id="L512" class="LineNr">512 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row1&quot;</span>
<span id="L513" class="LineNr">513 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; ab ef&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row2&quot;</span>
<span id="L514" class="LineNr">514 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot; cd gh&quot;</span>, <span class="Constant">&quot;F - <a href='paginated-screen.mu.html#L449'>test-print-multiple-pages-with-margins</a>/row3&quot;</span>
<span id="L515" class="LineNr">515 </span> <span class="muComment"># currently it's hard-coded that we avoid printing to the bottom-most row of the screen</span>
<span id="L516" class="LineNr">516 </span><span class="Delimiter">}</span>
<span id="L517" class="LineNr">517 </span>
@ -612,42 +612,42 @@ if ('onhashchange' in window) {
<span id="L551" class="LineNr">551 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L552" class="LineNr">552 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L553" class="LineNr">553 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L554" class="LineNr">554 </span> <a href='../../405screen.mu.html#L508'>start-color</a> screen-addr, fg, bg
<span id="L554" class="LineNr">554 </span> <a href='../../405screen.mu.html#L519'>start-color</a> screen-addr, fg, bg
<span id="L555" class="LineNr">555 </span><span class="Delimiter">}</span>
<span id="L556" class="LineNr">556 </span>
<span id="L557" class="LineNr">557 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='paginated-screen.mu.html#L557'>start-bold-on-paginated-screen</a></span> _self: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="Delimiter">{</span>
<span id="L558" class="LineNr">558 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L559" class="LineNr">559 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L560" class="LineNr">560 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L561" class="LineNr">561 </span> <a href='../../405screen.mu.html#L526'>start-bold</a> screen-addr
<span id="L561" class="LineNr">561 </span> <a href='../../405screen.mu.html#L537'>start-bold</a> screen-addr
<span id="L562" class="LineNr">562 </span><span class="Delimiter">}</span>
<span id="L563" class="LineNr">563 </span>
<span id="L564" class="LineNr">564 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='paginated-screen.mu.html#L564'>start-underline-on-paginated-screen</a></span> _self: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="Delimiter">{</span>
<span id="L565" class="LineNr">565 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L566" class="LineNr">566 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L567" class="LineNr">567 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L568" class="LineNr">568 </span> <a href='../../405screen.mu.html#L540'>start-underline</a> screen-addr
<span id="L568" class="LineNr">568 </span> <a href='../../405screen.mu.html#L551'>start-underline</a> screen-addr
<span id="L569" class="LineNr">569 </span><span class="Delimiter">}</span>
<span id="L570" class="LineNr">570 </span>
<span id="L571" class="LineNr">571 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='paginated-screen.mu.html#L571'>start-reverse-video-on-paginated-screen</a></span> _self: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="Delimiter">{</span>
<span id="L572" class="LineNr">572 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L573" class="LineNr">573 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L574" class="LineNr">574 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L575" class="LineNr">575 </span> <a href='../../405screen.mu.html#L554'>start-reverse-video</a> screen-addr
<span id="L575" class="LineNr">575 </span> <a href='../../405screen.mu.html#L565'>start-reverse-video</a> screen-addr
<span id="L576" class="LineNr">576 </span><span class="Delimiter">}</span>
<span id="L577" class="LineNr">577 </span>
<span id="L578" class="LineNr">578 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='paginated-screen.mu.html#L578'>start-blinking-on-paginated-screen</a></span> _self: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="Delimiter">{</span>
<span id="L579" class="LineNr">579 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L580" class="LineNr">580 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L581" class="LineNr">581 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L582" class="LineNr">582 </span> <a href='../../405screen.mu.html#L568'>start-blinking</a> screen-addr
<span id="L582" class="LineNr">582 </span> <a href='../../405screen.mu.html#L579'>start-blinking</a> screen-addr
<span id="L583" class="LineNr">583 </span><span class="Delimiter">}</span>
<span id="L584" class="LineNr">584 </span>
<span id="L585" class="LineNr">585 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='paginated-screen.mu.html#L585'>reset-formatting-on-paginated-screen</a></span> _self: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="Delimiter">{</span>
<span id="L586" class="LineNr">586 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='paginated-screen.mu.html#L12'>paginated-screen</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L587" class="LineNr">587 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L588" class="LineNr">588 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L589" class="LineNr">589 </span> <a href='../../405screen.mu.html#L491'>reset-formatting</a> screen-addr
<span id="L589" class="LineNr">589 </span> <a href='../../405screen.mu.html#L502'>reset-formatting</a> screen-addr
<span id="L590" class="LineNr">590 </span><span class="Delimiter">}</span>
<span id="L591" class="LineNr">591 </span>
<span id="L592" class="LineNr">592 </span><span class="muComment">## helpers</span>

View File

@ -332,7 +332,7 @@ if ('onhashchange' in window) {
<span id="L271" class="LineNr"> 271 </span> <span class="subxS1Comment"># . if (eax != false) break</span>
<span id="L272" class="LineNr"> 272 </span> 3d/compare-eax-and 0/imm32/false
<span id="L273" class="LineNr"> 273 </span> 0f 85/jump-if-!= $parse-line:end/disp32
<span id="L274" class="Folded"> 274 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L274" class="Folded"> 274 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L314" class="LineNr"> 314 </span><span class="Constant">$parse-line:write-word</span>:
<span id="L315" class="LineNr"> 315 </span> <span class="subxComment"># write-int(words, word-slice-&gt;start)</span>
<span id="L316" class="LineNr"> 316 </span> <span class="subxS2Comment"># . . push args</span>
@ -745,7 +745,7 @@ if ('onhashchange' in window) {
<span id="L723" class="LineNr"> 723 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L724" class="LineNr"> 724 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L725" class="LineNr"> 725 </span> 81 0/subop/add %esp 4/imm32
<span id="L726" class="Folded"> 726 </span><span class="Folded">+-- 33 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L726" class="Folded"> 726 </span><span class="Folded">+-- 33 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L759" class="LineNr"> 759 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;# . (foo %eax)&quot;, msg)</span>
<span id="L760" class="LineNr"> 760 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L761" class="LineNr"> 761 </span> 68/push <span class="Constant">&quot;F - <a href='calls.subx.html#L669'>test-subx-calls-processes-calls</a>: comment&quot;</span>/imm32

View File

@ -610,7 +610,7 @@ if ('onhashchange' in window) {
<span id="L547" class="LineNr"> 547 </span> <span class="subxComment"># == data 0x2</span>
<span id="L548" class="LineNr"> 548 </span> <span class="subxComment"># 4 5/imm32</span>
<span id="L549" class="LineNr"> 549 </span> <span class="subxComment"># We don't care right now what exactly happens to comments. Trailing spaces are also minor details.</span>
<span id="L550" class="Folded"> 550 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L550" class="Folded"> 550 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L576" class="LineNr"> 576 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;&quot;, msg)</span>
<span id="L577" class="LineNr"> 577 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L578" class="LineNr"> 578 </span> 68/push <span class="Constant">&quot;F - <a href='dquotes.subx.html#L409'>test-subx-dquotes-is-idempotent-by-default</a>/0&quot;</span>/imm32
@ -787,7 +787,7 @@ if ('onhashchange' in window) {
<span id="L749" class="LineNr"> 749 </span> <span class="subxComment"># called. We just want to make sure instructions using string literals</span>
<span id="L750" class="LineNr"> 750 </span> <span class="subxComment"># switch to a string variable with the right value.</span>
<span id="L751" class="LineNr"> 751 </span> <span class="subxComment"># (Modifying string literals completely off the radar for now.)</span>
<span id="L752" class="Folded"> 752 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L752" class="Folded"> 752 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L785" class="LineNr"> 785 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;== code 0x1 &quot;, msg)</span>
<span id="L786" class="LineNr"> 786 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L787" class="LineNr"> 787 </span> 68/push <span class="Constant">&quot;F - <a href='dquotes.subx.html#L662'>test-subx-dquotes-processes-string-literals</a>/0&quot;</span>/imm32
@ -1101,7 +1101,7 @@ if ('onhashchange' in window) {
<span id="L1095" class="LineNr">1095 </span> e8/call <a href='dquotes.subx.html#L863'>emit-string-literal-data</a>/disp32
<span id="L1096" class="LineNr">1096 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1097" class="LineNr">1097 </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="L1098" class="Folded">1098 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1098" class="Folded">1098 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1124" class="LineNr">1124 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;3/imm32 61/a 62/b 63/c &quot;, msg)</span>
<span id="L1125" class="LineNr">1125 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1126" class="LineNr">1126 </span> 68/push <span class="Constant">&quot;F - test-emit-string-literal-data&quot;</span>/imm32
@ -1140,7 +1140,7 @@ if ('onhashchange' in window) {
<span id="L1159" class="LineNr">1159 </span> e8/call <a href='dquotes.subx.html#L863'>emit-string-literal-data</a>/disp32
<span id="L1160" class="LineNr">1160 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1161" class="LineNr">1161 </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="L1162" class="Folded">1162 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1162" class="Folded">1162 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1188" class="LineNr">1188 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;0/imm32 &quot;, msg)</span>
<span id="L1189" class="LineNr">1189 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1190" class="LineNr">1190 </span> 68/push <span class="Constant">&quot;F - test-emit-string-literal-data-empty&quot;</span>/imm32
@ -1180,7 +1180,7 @@ if ('onhashchange' in window) {
<span id="L1224" class="LineNr">1224 </span> e8/call <a href='dquotes.subx.html#L863'>emit-string-literal-data</a>/disp32
<span id="L1225" class="LineNr">1225 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1226" class="LineNr">1226 </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="L1227" class="Folded">1227 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1227" class="Folded">1227 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1253" class="LineNr">1253 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;3/imm32 61/a 20 62/b &quot;, msg) # ideally we'd like to say '20/space' but that requires managing names for codepoints</span>
<span id="L1254" class="LineNr">1254 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1255" class="LineNr">1255 </span> 68/push <span class="Constant">&quot;F - test-emit-string-literal-data-no-metadata-for-non-alphanumerics&quot;</span>/imm32
@ -1219,7 +1219,7 @@ if ('onhashchange' in window) {
<span id="L1288" class="LineNr">1288 </span> e8/call <a href='dquotes.subx.html#L863'>emit-string-literal-data</a>/disp32
<span id="L1289" class="LineNr">1289 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1290" class="LineNr">1290 </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="L1291" class="Folded">1291 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1291" class="Folded">1291 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1317" class="LineNr">1317 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;3/imm32 61/a 22 62/b &quot;, msg)</span>
<span id="L1318" class="LineNr">1318 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1319" class="LineNr">1319 </span> 68/push <span class="Constant">&quot;F - test-emit-string-literal-data-handles-escape-sequences&quot;</span>/imm32
@ -1258,7 +1258,7 @@ if ('onhashchange' in window) {
<span id="L1352" class="LineNr">1352 </span> e8/call <a href='dquotes.subx.html#L863'>emit-string-literal-data</a>/disp32
<span id="L1353" class="LineNr">1353 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1354" class="LineNr">1354 </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="L1355" class="Folded">1355 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1355" class="Folded">1355 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1381" class="LineNr">1381 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;3/imm32 61/a 0a 62/b &quot;, msg)</span>
<span id="L1382" class="LineNr">1382 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1383" class="LineNr">1383 </span> 68/push <span class="Constant">&quot;F - test-emit-string-literal-data-handles-newline-escape&quot;</span>/imm32
@ -1633,7 +1633,7 @@ if ('onhashchange' in window) {
<span id="L1752" class="LineNr">1752 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1753" class="LineNr">1753 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1754" class="LineNr">1754 </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="L1755" class="Folded">1755 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1755" class="Folded">1755 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1781" class="LineNr">1781 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;/ghi&quot;, msg) # important that there's no leading space</span>
<span id="L1782" class="LineNr">1782 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1783" class="LineNr">1783 </span> 68/push <span class="Constant">&quot;F - test-emit-metadata-in-string-literal&quot;</span>/imm32

67992
html/apps/mu.subx.html generated

File diff suppressed because it is too large Load Diff

View File

@ -213,7 +213,7 @@ if ('onhashchange' in window) {
<span id="L151" class="LineNr"> 151 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L152" class="LineNr"> 152 </span> 81 7/subop/compare 0/mod/indirect 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="L153" class="LineNr"> 153 </span> 0f 84/jump-if-= $subx-pack:<span class="Constant">break</span>/disp32
<span id="L154" class="Folded"> 154 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L154" class="Folded"> 154 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L180" class="LineNr"> 180 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L181" class="LineNr"> 181 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L182" class="LineNr"> 182 </span> 52/push-edx
@ -235,7 +235,7 @@ if ('onhashchange' in window) {
<span id="L198" class="LineNr"> 198 </span> 3d/compare-eax-and 0/imm32/false
<span id="L199" class="LineNr"> 199 </span> 0f 85/jump-if-!= $subx-pack:pass-through/disp32
<span id="L200" class="LineNr"> 200 </span><span class="Constant">$subx-pack:check2</span>:
<span id="L201" class="Folded"> 201 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L201" class="Folded"> 201 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L241" class="LineNr"> 241 </span> <span class="subxComment"># if (!slice-equal?(word-slice, &quot;==&quot;)) goto next check</span>
<span id="L242" class="LineNr"> 242 </span> <span class="subxS1Comment"># . eax = slice-equal?(word-slice, &quot;==&quot;)</span>
<span id="L243" class="LineNr"> 243 </span> <span class="subxS2Comment"># . . push args</span>
@ -256,7 +256,7 @@ if ('onhashchange' in window) {
<span id="L258" class="LineNr"> 258 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L259" class="LineNr"> 259 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L260" class="LineNr"> 260 </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="L261" class="Folded"> 261 </span><span class="Folded">+-- 40 lines: #? # dump segment name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L261" class="Folded"> 261 </span><span class="Folded">+-- 40 lines: #? # dump segment name ------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L301" class="LineNr"> 301 </span> <span class="subxComment"># in-code? = slice-equal?(word-slice, &quot;code&quot;)</span>
<span id="L302" class="LineNr"> 302 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L303" class="LineNr"> 303 </span> 68/push <span class="Constant">&quot;code&quot;</span>/imm32
@ -617,7 +617,7 @@ if ('onhashchange' in window) {
<span id="L658" class="LineNr"> 658 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L659" class="LineNr"> 659 </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="L660" class="LineNr"> 660 </span> <span class="subxComment"># check output</span>
<span id="L661" class="Folded"> 661 </span><span class="Folded">+-- 26 lines: #? # debug print ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L661" class="Folded"> 661 </span><span class="Folded">+-- 26 lines: #? # debug print ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L687" class="LineNr"> 687 </span> <span class="subxS1Comment"># . flush(_test-output-buffered-file)</span>
<span id="L688" class="LineNr"> 688 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L689" class="LineNr"> 689 </span> 68/push <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>/imm32
@ -751,7 +751,7 @@ if ('onhashchange' in window) {
<span id="L817" class="LineNr"> 817 </span> <span class="subxComment"># 68 20 # 68/push 0x20/imm8</span>
<span id="L818" class="LineNr"> 818 </span> <span class="subxComment"># == data 0x2</span>
<span id="L819" class="LineNr"> 819 </span> <span class="subxComment"># 03 04 00 00 00</span>
<span id="L820" class="Folded"> 820 </span><span class="Folded">+-- 26 lines: #? # debug print ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L820" class="Folded"> 820 </span><span class="Folded">+-- 26 lines: #? # debug print ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L846" class="LineNr"> 846 </span> <span class="subxS1Comment"># . flush(_test-output-buffered-file)</span>
<span id="L847" class="LineNr"> 847 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L848" class="LineNr"> 848 </span> 68/push <a href='../115write-byte.subx.html#L423'>_test-output-buffered-file</a>/imm32
@ -840,7 +840,7 @@ if ('onhashchange' in window) {
<span id="L931" class="LineNr"> 931 </span> 68/push 0/imm32/end
<span id="L932" class="LineNr"> 932 </span> 68/push 0/imm32/start
<span id="L933" class="LineNr"> 933 </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="L934" class="Folded"> 934 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L934" class="Folded"> 934 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L960" class="LineNr"> 960 </span><span class="Constant">$convert-data:loop</span>:
<span id="L961" class="LineNr"> 961 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L962" class="LineNr"> 962 </span> <span class="subxS2Comment"># . . push args</span>
@ -850,7 +850,7 @@ if ('onhashchange' in window) {
<span id="L966" class="LineNr"> 966 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L967" class="LineNr"> 967 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L968" class="LineNr"> 968 </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="L969" class="Folded"> 969 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L969" class="Folded"> 969 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1009" class="LineNr">1009 </span><span class="Constant">$convert-data:check0</span>:
<span id="L1010" class="LineNr">1010 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L1011" class="LineNr">1011 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -1013,7 +1013,7 @@ if ('onhashchange' in window) {
<span id="L1168" class="LineNr">1168 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1169" class="LineNr">1169 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1170" class="LineNr">1170 </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="L1171" class="Folded">1171 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1171" class="Folded">1171 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1197" class="LineNr">1197 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;# abcd&quot;, msg)</span>
<span id="L1198" class="LineNr">1198 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1199" class="LineNr">1199 </span> 68/push <span class="Constant">&quot;F - test-convert-data-passes-comments-through&quot;</span>/imm32
@ -1478,7 +1478,7 @@ if ('onhashchange' in window) {
<span id="L1658" class="LineNr">1658 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1659" class="LineNr">1659 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1660" class="LineNr">1660 </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="L1661" class="Folded">1661 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1661" class="Folded">1661 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1687" class="LineNr">1687 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;30 abcd/o 42 e1 00 00 \n&quot;, msg)</span>
<span id="L1688" class="LineNr">1688 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1689" class="LineNr">1689 </span> 68/push <span class="Constant">&quot;F - test-convert-data-multiple-words&quot;</span>/imm32
@ -1545,7 +1545,7 @@ if ('onhashchange' in window) {
<span id="L1750" class="LineNr">1750 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1751" class="LineNr">1751 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1752" class="LineNr">1752 </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="L1753" class="Folded">1753 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1753" class="Folded">1753 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1779" class="LineNr">1779 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;30 00 00 00 # comment&quot;, msg)</span>
<span id="L1780" class="LineNr">1780 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1781" class="LineNr">1781 </span> 68/push <span class="Constant">&quot;F - test-convert-data-trailing-comment&quot;</span>/imm32
@ -2065,7 +2065,7 @@ if ('onhashchange' in window) {
<span id="L2295" class="LineNr">2295 </span> e8/call <a href='../106stream.subx.html#L56'>rewind-stream</a>/disp32
<span id="L2296" class="LineNr">2296 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2297" class="LineNr">2297 </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="L2298" class="Folded">2298 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2298" class="Folded">2298 </span><span class="Folded">+-- 33 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2331" class="LineNr">2331 </span><span class="Constant">$emit-modrm:loop</span>:
<span id="L2332" class="LineNr">2332 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L2333" class="LineNr">2333 </span> <span class="subxS2Comment"># . . push args</span>
@ -2075,7 +2075,7 @@ if ('onhashchange' in window) {
<span id="L2337" class="LineNr">2337 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L2338" class="LineNr">2338 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2339" class="LineNr">2339 </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="L2340" class="Folded">2340 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2340" class="Folded">2340 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2380" class="LineNr">2380 </span><span class="Constant">$emit-modrm:check0</span>:
<span id="L2381" class="LineNr">2381 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L2382" class="LineNr">2382 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -2367,7 +2367,7 @@ if ('onhashchange' in window) {
<span id="L2668" class="LineNr">2668 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2669" class="LineNr">2669 </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="L2670" class="LineNr">2670 </span><span class="Constant">$emit-sib:loop</span>:
<span id="L2671" class="Folded">2671 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2671" class="Folded">2671 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2697" class="LineNr">2697 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L2698" class="LineNr">2698 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2699" class="LineNr">2699 </span> 51/push-ecx
@ -2376,7 +2376,7 @@ if ('onhashchange' in window) {
<span id="L2702" class="LineNr">2702 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L2703" class="LineNr">2703 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2704" class="LineNr">2704 </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="L2705" class="Folded">2705 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2705" class="Folded">2705 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2745" class="LineNr">2745 </span><span class="Constant">$emit-sib:check0</span>:
<span id="L2746" class="LineNr">2746 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L2747" class="LineNr">2747 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -2565,7 +2565,7 @@ if ('onhashchange' in window) {
<span id="L2930" class="LineNr">2930 </span> e8/call <a href='../106stream.subx.html#L56'>rewind-stream</a>/disp32
<span id="L2931" class="LineNr">2931 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2932" class="LineNr">2932 </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="L2933" class="Folded">2933 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2933" class="Folded">2933 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2959" class="LineNr">2959 </span><span class="Constant">$emit-disp:loop</span>:
<span id="L2960" class="LineNr">2960 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L2961" class="LineNr">2961 </span> <span class="subxS2Comment"># . . push args</span>
@ -2575,7 +2575,7 @@ if ('onhashchange' in window) {
<span id="L2965" class="LineNr">2965 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L2966" class="LineNr">2966 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2967" class="LineNr">2967 </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="L2968" class="Folded">2968 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2968" class="Folded">2968 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3008" class="LineNr">3008 </span><span class="Constant">$emit-disp:check0</span>:
<span id="L3009" class="LineNr">3009 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L3010" class="LineNr">3010 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -2720,7 +2720,7 @@ if ('onhashchange' in window) {
<span id="L3149" class="LineNr">3149 </span> e8/call <a href='../106stream.subx.html#L56'>rewind-stream</a>/disp32
<span id="L3150" class="LineNr">3150 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3151" class="LineNr">3151 </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="L3152" class="Folded">3152 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3152" class="Folded">3152 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3178" class="LineNr">3178 </span><span class="Constant">$emit-imm:loop</span>:
<span id="L3179" class="LineNr">3179 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L3180" class="LineNr">3180 </span> <span class="subxS2Comment"># . . push args</span>
@ -2730,7 +2730,7 @@ if ('onhashchange' in window) {
<span id="L3184" class="LineNr">3184 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L3185" class="LineNr">3185 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3186" class="LineNr">3186 </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="L3187" class="Folded">3187 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3187" class="Folded">3187 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3227" class="LineNr">3227 </span><span class="Constant">$emit-imm:check0</span>:
<span id="L3228" class="LineNr">3228 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L3229" class="LineNr">3229 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -3049,7 +3049,7 @@ if ('onhashchange' in window) {
<span id="L3542" class="LineNr">3542 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3543" class="LineNr">3543 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3544" class="LineNr">3544 </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="L3545" class="Folded">3545 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3545" class="Folded">3545 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3571" class="LineNr">3571 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab # ab/cd # comment&quot;, msg)</span>
<span id="L3572" class="LineNr">3572 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3573" class="LineNr">3573 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-single-opcode&quot;</span>/imm32
@ -3116,7 +3116,7 @@ if ('onhashchange' in window) {
<span id="L3634" class="LineNr">3634 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3635" class="LineNr">3635 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3636" class="LineNr">3636 </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="L3637" class="Folded">3637 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3637" class="Folded">3637 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3663" class="LineNr">3663 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;0f ab # 0f/m1 ab/m2 # comment&quot;, msg)</span>
<span id="L3664" class="LineNr">3664 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3665" class="LineNr">3665 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-0f-opcode&quot;</span>/imm32
@ -3183,7 +3183,7 @@ if ('onhashchange' in window) {
<span id="L3726" class="LineNr">3726 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3727" class="LineNr">3727 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3728" class="LineNr">3728 </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="L3729" class="Folded">3729 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3729" class="Folded">3729 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3755" class="LineNr">3755 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f2 ab # f2/m1 ab/m2 # comment&quot;, msg)</span>
<span id="L3756" class="LineNr">3756 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3757" class="LineNr">3757 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-f2-opcode&quot;</span>/imm32
@ -3250,7 +3250,7 @@ if ('onhashchange' in window) {
<span id="L3818" class="LineNr">3818 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3819" class="LineNr">3819 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3820" class="LineNr">3820 </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="L3821" class="Folded">3821 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3821" class="Folded">3821 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3847" class="LineNr">3847 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f3 ab # f3/m1 ab/m2 # comment&quot;, msg)</span>
<span id="L3848" class="LineNr">3848 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3849" class="LineNr">3849 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-f3-opcode&quot;</span>/imm32
@ -3317,7 +3317,7 @@ if ('onhashchange' in window) {
<span id="L3910" class="LineNr">3910 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3911" class="LineNr">3911 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3912" class="LineNr">3912 </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="L3913" class="Folded">3913 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3913" class="Folded">3913 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3939" class="LineNr">3939 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f2 0f ab # f2/m1 0f/m2 ab/m3 # comment&quot;, msg)</span>
<span id="L3940" class="LineNr">3940 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3941" class="LineNr">3941 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-f2-0f-opcode&quot;</span>/imm32
@ -3384,7 +3384,7 @@ if ('onhashchange' in window) {
<span id="L4002" class="LineNr">4002 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4003" class="LineNr">4003 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4004" class="LineNr">4004 </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="L4005" class="Folded">4005 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4005" class="Folded">4005 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4031" class="LineNr">4031 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f3 0f ab # f3/m1 0f/m2 ab/m3 # comment&quot;, msg)</span>
<span id="L4032" class="LineNr">4032 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4033" class="LineNr">4033 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-f3-0f-opcode&quot;</span>/imm32
@ -3451,7 +3451,7 @@ if ('onhashchange' in window) {
<span id="L4094" class="LineNr">4094 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4095" class="LineNr">4095 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4096" class="LineNr">4096 </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="L4097" class="Folded">4097 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4097" class="Folded">4097 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4123" class="LineNr">4123 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab # f3/m1 0f/m2 ab/m3 # comment&quot;, msg)</span>
<span id="L4124" class="LineNr">4124 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4125" class="LineNr">4125 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-unused-opcodes&quot;</span>/imm32
@ -3518,7 +3518,7 @@ if ('onhashchange' in window) {
<span id="L4186" class="LineNr">4186 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4187" class="LineNr">4187 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4188" class="LineNr">4188 </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="L4189" class="Folded">4189 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4189" class="Folded">4189 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4215" class="LineNr">4215 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f2 ab # f2/m1 ab/m2 cd/m3 # comment&quot;, msg)</span>
<span id="L4216" class="LineNr">4216 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4217" class="LineNr">4217 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-unused-second-opcodes&quot;</span>/imm32
@ -3585,7 +3585,7 @@ if ('onhashchange' in window) {
<span id="L4278" class="LineNr">4278 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4279" class="LineNr">4279 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4280" class="LineNr">4280 </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="L4281" class="Folded">4281 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4281" class="Folded">4281 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4307" class="LineNr">4307 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;f3 ab # f3/m1 ab/m2 cd/m3 # comment&quot;, msg)</span>
<span id="L4308" class="LineNr">4308 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4309" class="LineNr">4309 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-unused-second-opcodes&quot;</span>/imm32
@ -3652,7 +3652,7 @@ if ('onhashchange' in window) {
<span id="L4370" class="LineNr">4370 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4371" class="LineNr">4371 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4372" class="LineNr">4372 </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="L4373" class="Folded">4373 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4373" class="Folded">4373 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4399" class="LineNr">4399 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 08 # 8b/copy 0/mod 0/rm32 1/r32&quot;, msg)</span>
<span id="L4400" class="LineNr">4400 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4401" class="LineNr">4401 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-modrm-byte&quot;</span>/imm32
@ -3717,7 +3717,7 @@ if ('onhashchange' in window) {
<span id="L4460" class="LineNr">4460 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4461" class="LineNr">4461 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4462" class="LineNr">4462 </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="L4463" class="Folded">4463 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4463" class="Folded">4463 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4489" class="LineNr">4489 </span> <span class="subxComment"># check output</span>
<span id="L4490" class="LineNr">4490 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;# abcd&quot;, msg)</span>
<span id="L4491" class="LineNr">4491 </span> <span class="subxS2Comment"># . . push args</span>
@ -3785,7 +3785,7 @@ if ('onhashchange' in window) {
<span id="L4553" class="LineNr">4553 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4554" class="LineNr">4554 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4555" class="LineNr">4555 </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="L4556" class="Folded">4556 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4556" class="Folded">4556 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4582" class="LineNr">4582 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ff 30 # ff 6/subop/push 0/mod 0/rm32&quot;, msg)</span>
<span id="L4583" class="LineNr">4583 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4584" class="LineNr">4584 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-modrm-byte-from-subop&quot;</span>/imm32
@ -3852,7 +3852,7 @@ if ('onhashchange' in window) {
<span id="L4645" class="LineNr">4645 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4646" class="LineNr">4646 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4647" class="LineNr">4647 </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="L4648" class="Folded">4648 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4648" class="Folded">4648 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4674" class="LineNr">4674 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 08 # 8b/copy 0/rm32 1/r32&quot;, msg)</span>
<span id="L4675" class="LineNr">4675 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4676" class="LineNr">4676 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-modrm-byte-with-missing-mod&quot;</span>/imm32
@ -3919,7 +3919,7 @@ if ('onhashchange' in window) {
<span id="L4737" class="LineNr">4737 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4738" class="LineNr">4738 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4739" class="LineNr">4739 </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="L4740" class="Folded">4740 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4740" class="Folded">4740 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4766" class="LineNr">4766 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 08 # 8b/copy 0/mod 1/r32&quot;, msg)</span>
<span id="L4767" class="LineNr">4767 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4768" class="LineNr">4768 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-modrm-byte-with-missing-rm32&quot;</span>/imm32
@ -3986,7 +3986,7 @@ if ('onhashchange' in window) {
<span id="L4829" class="LineNr">4829 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4830" class="LineNr">4830 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4831" class="LineNr">4831 </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="L4832" class="Folded">4832 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4832" class="Folded">4832 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4858" class="LineNr">4858 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 00 # 8b/copy 0/mod 0/rm32&quot;, msg)</span>
<span id="L4859" class="LineNr">4859 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4860" class="LineNr">4860 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-modrm-byte-with-missing-r32&quot;</span>/imm32
@ -4053,7 +4053,7 @@ if ('onhashchange' in window) {
<span id="L4921" class="LineNr">4921 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L4922" class="LineNr">4922 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4923" class="LineNr">4923 </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="L4924" class="Folded">4924 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4924" class="Folded">4924 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4950" class="LineNr">4950 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 08 # 8b/copy 0/mod 4/rm32 1/r32 0/base 1/index 0/scale&quot;, msg)</span>
<span id="L4951" class="LineNr">4951 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4952" class="LineNr">4952 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-sib-byte&quot;</span>/imm32
@ -4120,7 +4120,7 @@ if ('onhashchange' in window) {
<span id="L5013" class="LineNr">5013 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5014" class="LineNr">5014 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5015" class="LineNr">5015 </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="L5016" class="Folded">5016 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5016" class="Folded">5016 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5042" class="LineNr">5042 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 04 40 # 8b/copy 0/mod 4/rm32 1/scale&quot;, msg)</span>
<span id="L5043" class="LineNr">5043 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5044" class="LineNr">5044 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-scale&quot;</span>/imm32
@ -4187,7 +4187,7 @@ if ('onhashchange' in window) {
<span id="L5105" class="LineNr">5105 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5106" class="LineNr">5106 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5107" class="LineNr">5107 </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="L5108" class="Folded">5108 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5108" class="Folded">5108 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5134" class="LineNr">5134 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 0c 08 # 8b/copy 0/mod 4/rm32 1/r32 1/index 0/scale&quot;, msg)</span>
<span id="L5135" class="LineNr">5135 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5136" class="LineNr">5136 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-sib-byte-with-missing-base&quot;</span>/imm32
@ -4254,7 +4254,7 @@ if ('onhashchange' in window) {
<span id="L5197" class="LineNr">5197 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5198" class="LineNr">5198 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5199" class="LineNr">5199 </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="L5200" class="Folded">5200 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5200" class="Folded">5200 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5226" class="LineNr">5226 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 0c 08 # 8b/copy 0/mod 4/rm32 1/r32 0/base 0/scale&quot;, msg)</span>
<span id="L5227" class="LineNr">5227 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5228" class="LineNr">5228 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-sib-byte-with-missing-index&quot;</span>/imm32
@ -4321,7 +4321,7 @@ if ('onhashchange' in window) {
<span id="L5289" class="LineNr">5289 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5290" class="LineNr">5290 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5291" class="LineNr">5291 </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="L5292" class="Folded">5292 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5292" class="Folded">5292 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5318" class="LineNr">5318 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;8b 0c 08 # 8b/copy 0/mod 4/rm32 1/r32 0/base 1/index&quot;, msg)</span>
<span id="L5319" class="LineNr">5319 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5320" class="LineNr">5320 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-emits-sib-byte-with-missing-scale&quot;</span>/imm32
@ -4388,7 +4388,7 @@ if ('onhashchange' in window) {
<span id="L5381" class="LineNr">5381 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5382" class="LineNr">5382 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5383" class="LineNr">5383 </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="L5384" class="Folded">5384 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5384" class="Folded">5384 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5410" class="LineNr">5410 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;e8 20 00 00 00 # e8/call 20/disp32&quot;, msg)</span>
<span id="L5411" class="LineNr">5411 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5412" class="LineNr">5412 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-disp32-operand&quot;</span>/imm32
@ -4455,7 +4455,7 @@ if ('onhashchange' in window) {
<span id="L5473" class="LineNr">5473 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5474" class="LineNr">5474 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5475" class="LineNr">5475 </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="L5476" class="Folded">5476 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5476" class="Folded">5476 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5502" class="LineNr">5502 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;e8 20 00 # e8/call 20/disp16&quot;, msg)</span>
<span id="L5503" class="LineNr">5503 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5504" class="LineNr">5504 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-disp16-operand&quot;</span>/imm32
@ -4522,7 +4522,7 @@ if ('onhashchange' in window) {
<span id="L5565" class="LineNr">5565 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5566" class="LineNr">5566 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5567" class="LineNr">5567 </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="L5568" class="Folded">5568 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5568" class="Folded">5568 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5594" class="LineNr">5594 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;eb 20 # eb/jump 20/disp8&quot;, msg)</span>
<span id="L5595" class="LineNr">5595 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5596" class="LineNr">5596 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-disp8-operand&quot;</span>/imm32
@ -4589,7 +4589,7 @@ if ('onhashchange' in window) {
<span id="L5657" class="LineNr">5657 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5658" class="LineNr">5658 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5659" class="LineNr">5659 </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="L5660" class="Folded">5660 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5660" class="Folded">5660 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5686" class="LineNr">5686 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;eb xyz/disp8 # eb/jump xyz/disp8&quot;, msg)</span>
<span id="L5687" class="LineNr">5687 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5688" class="LineNr">5688 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-disp8-name&quot;</span>/imm32
@ -4656,7 +4656,7 @@ if ('onhashchange' in window) {
<span id="L5749" class="LineNr">5749 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5750" class="LineNr">5750 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5751" class="LineNr">5751 </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="L5752" class="Folded">5752 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5752" class="Folded">5752 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5778" class="LineNr">5778 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;68 20 00 00 00 # 68/push 0x20/imm32&quot;, msg)</span>
<span id="L5779" class="LineNr">5779 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5780" class="LineNr">5780 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-imm32-operand&quot;</span>/imm32
@ -4724,7 +4724,7 @@ if ('onhashchange' in window) {
<span id="L5842" class="LineNr">5842 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5843" class="LineNr">5843 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5844" class="LineNr">5844 </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="L5845" class="Folded">5845 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5845" class="Folded">5845 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5871" class="LineNr">5871 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;68 20 00 # 68/push 0x20/imm16&quot;, msg)</span>
<span id="L5872" class="LineNr">5872 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5873" class="LineNr">5873 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-imm16-operand&quot;</span>/imm32
@ -4792,7 +4792,7 @@ if ('onhashchange' in window) {
<span id="L5935" class="LineNr">5935 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L5936" class="LineNr">5936 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L5937" class="LineNr">5937 </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="L5938" class="Folded">5938 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5938" class="Folded">5938 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L5964" class="LineNr">5964 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;68 20 # 68/push 0x20/imm8&quot;, msg)</span>
<span id="L5965" class="LineNr">5965 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L5966" class="LineNr">5966 </span> 68/push <span class="Constant">&quot;F - test-convert-instruction-handles-imm8-operand&quot;</span>/imm32

View File

@ -90,7 +90,7 @@ if ('onhashchange' in window) {
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm2</span>: float <span class="SpecialChar">&lt;-</span> convert two
<span id="L30" class="LineNr"> 30 </span> t <span class="SpecialChar">&lt;-</span> divide two-f
<span id="L31" class="LineNr"> 31 </span><span class="CommentedCode">#? print-string 0, &quot;t: &quot;</span>
<span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">#? print-float 0, t</span>
<span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">#? print-float-hex 0, t</span>
<span id="L33" class="LineNr"> 33 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L34" class="LineNr"> 34 </span> <span class="muComment"># whitening = (1.0 - t) * white</span>
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> whitening-storage: rgb
@ -104,9 +104,9 @@ if ('onhashchange' in window) {
<span id="L43" class="LineNr"> 43 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L44" class="LineNr"> 44 </span> <span class="muComment"># out = t * (0.5, 0.7, 1.0)</span>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> dest/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> out, r
<span id="L46" class="LineNr"> 46 </span> <a href='../../409float.mu.html#L3'>fill-in-rational</a> dest, <span class="Constant">5</span>, <span class="Constant">0xa</span>
<span id="L46" class="LineNr"> 46 </span> <a href='../../408float.mu.html#L3'>fill-in-rational</a> dest, <span class="Constant">5</span>, <span class="Constant">0xa</span>
<span id="L47" class="LineNr"> 47 </span> dest <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> out, g
<span id="L48" class="LineNr"> 48 </span> <a href='../../409float.mu.html#L3'>fill-in-rational</a> dest, <span class="Constant">7</span>, <span class="Constant">0xa</span>
<span id="L48" class="LineNr"> 48 </span> <a href='../../408float.mu.html#L3'>fill-in-rational</a> dest, <span class="Constant">7</span>, <span class="Constant">0xa</span>
<span id="L49" class="LineNr"> 49 </span> dest <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> out, b
<span id="L50" class="LineNr"> 50 </span> copy-to *dest, one-f
<span id="L51" class="LineNr"> 51 </span> <a href='3.mu.html#L337'>rgb-scale-up</a> out, t
@ -127,9 +127,9 @@ if ('onhashchange' in window) {
<span id="L66" class="LineNr"> 66 </span> <span class="muComment"># height = 400 * 9/16 = 225</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> aspect: float
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> aspect-addr/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> address aspect
<span id="L69" class="LineNr"> 69 </span> <a href='../../409float.mu.html#L3'>fill-in-rational</a> aspect-addr, <span class="Constant">0x10</span>, <span class="Constant">9</span> <span class="muComment"># 16/9</span>
<span id="L69" class="LineNr"> 69 </span> <a href='../../408float.mu.html#L3'>fill-in-rational</a> aspect-addr, <span class="Constant">0x10</span>, <span class="Constant">9</span> <span class="muComment"># 16/9</span>
<span id="L70" class="LineNr"> 70 </span><span class="CommentedCode">#? print-string 0, &quot;aspect ratio: &quot;</span>
<span id="L71" class="LineNr"> 71 </span><span class="CommentedCode">#? print-float 0, aspect</span>
<span id="L71" class="LineNr"> 71 </span><span class="CommentedCode">#? print-float-hex 0, aspect</span>
<span id="L72" class="LineNr"> 72 </span><span class="CommentedCode">#? print-string 0, &quot; &quot;</span>
<span id="L73" class="LineNr"> 73 </span><span class="CommentedCode">#? {</span>
<span id="L74" class="LineNr"> 74 </span><span class="CommentedCode">#? var foo2/ebx: int &lt;- reinterpret aspect</span>
@ -144,7 +144,7 @@ if ('onhashchange' in window) {
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm4</span>: float <span class="SpecialChar">&lt;-</span> convert tmp
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> viewport-height/<span class="Constant">xmm7</span>: float <span class="SpecialChar">&lt;-</span> copy two-f
<span id="L85" class="LineNr"> 85 </span><span class="CommentedCode">#? print-string 0, &quot;viewport height: &quot;</span>
<span id="L86" class="LineNr"> 86 </span><span class="CommentedCode">#? print-float 0, viewport-height</span>
<span id="L86" class="LineNr"> 86 </span><span class="CommentedCode">#? print-float-hex 0, viewport-height</span>
<span id="L87" class="LineNr"> 87 </span><span class="CommentedCode">#? print-string 0, &quot; &quot;</span>
<span id="L88" class="LineNr"> 88 </span><span class="CommentedCode">#? {</span>
<span id="L89" class="LineNr"> 89 </span><span class="CommentedCode">#? var foo: float</span>
@ -157,7 +157,7 @@ if ('onhashchange' in window) {
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> viewport-width/<span class="Constant">xmm6</span>: float <span class="SpecialChar">&lt;-</span> convert tmp
<span id="L97" class="LineNr"> 97 </span> viewport-width <span class="SpecialChar">&lt;-</span> multiply aspect
<span id="L98" class="LineNr"> 98 </span><span class="CommentedCode">#? print-string 0, &quot;viewport width: &quot;</span>
<span id="L99" class="LineNr"> 99 </span><span class="CommentedCode">#? print-float 0, viewport-width</span>
<span id="L99" class="LineNr"> 99 </span><span class="CommentedCode">#? print-float-hex 0, viewport-width</span>
<span id="L100" class="LineNr">100 </span><span class="CommentedCode">#? print-string 0, &quot; &quot;</span>
<span id="L101" class="LineNr">101 </span><span class="CommentedCode">#? {</span>
<span id="L102" class="LineNr">102 </span><span class="CommentedCode">#? var foo: float</span>
@ -231,7 +231,7 @@ if ('onhashchange' in window) {
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> u/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert i
<span id="L171" class="LineNr">171 </span> u <span class="SpecialChar">&lt;-</span> divide image-width-1
<span id="L172" class="LineNr">172 </span><span class="CommentedCode">#? print-string 0, &quot;u: &quot;</span>
<span id="L173" class="LineNr">173 </span><span class="CommentedCode">#? print-float 0, u</span>
<span id="L173" class="LineNr">173 </span><span class="CommentedCode">#? print-float-hex 0, u</span>
<span id="L174" class="LineNr">174 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L175" class="LineNr">175 </span> <span class="muComment"># v = j / (image-height - 1)</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> v/<span class="Constant">xmm1</span>: float <span class="SpecialChar">&lt;-</span> convert j
@ -322,7 +322,7 @@ if ('onhashchange' in window) {
<span id="L261" class="LineNr">261 </span> <span class="PreProc">var</span> c/<span class="Constant">esi</span>: (addr rgb) <span class="SpecialChar">&lt;-</span> copy _c
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> xn: float
<span id="L263" class="LineNr">263 </span> <span class="PreProc">var</span> xn-addr/<span class="Constant">ecx</span>: (addr float) <span class="SpecialChar">&lt;-</span> address xn
<span id="L264" class="LineNr">264 </span> <a href='../../409float.mu.html#L3'>fill-in-rational</a> xn-addr, <span class="Constant">0x3e7ff</span>, <span class="Constant">0x3e8</span> <span class="muComment"># 255999 / 1000</span>
<span id="L264" class="LineNr">264 </span> <a href='../../408float.mu.html#L3'>fill-in-rational</a> xn-addr, <span class="Constant">0x3e7ff</span>, <span class="Constant">0x3e8</span> <span class="muComment"># 255999 / 1000</span>
<span id="L265" class="LineNr">265 </span> <span class="muComment"># print 255.999 * c-&gt;r</span>
<span id="L266" class="LineNr">266 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> copy xn
<span id="L267" class="LineNr">267 </span> <span class="PreProc">var</span> src-addr/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> c, r
@ -350,13 +350,13 @@ if ('onhashchange' in window) {
<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr rgb) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L290" class="LineNr">290 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;(&quot;</span>
<span id="L291" class="LineNr">291 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, r
<span id="L292" class="LineNr">292 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L292" class="LineNr">292 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L293" class="LineNr">293 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L294" class="LineNr">294 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, g
<span id="L295" class="LineNr">295 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L295" class="LineNr">295 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L296" class="LineNr">296 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L297" class="LineNr">297 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, b
<span id="L298" class="LineNr">298 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L298" class="LineNr">298 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L299" class="LineNr">299 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;)&quot;</span>
<span id="L300" class="LineNr">300 </span><span class="Delimiter">}</span>
<span id="L301" class="LineNr">301 </span>
@ -424,13 +424,13 @@ if ('onhashchange' in window) {
<span id="L363" class="LineNr">363 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr vec3) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L364" class="LineNr">364 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;(&quot;</span>
<span id="L365" class="LineNr">365 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, x
<span id="L366" class="LineNr">366 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L366" class="LineNr">366 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L367" class="LineNr">367 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L368" class="LineNr">368 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, y
<span id="L369" class="LineNr">369 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L369" class="LineNr">369 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L370" class="LineNr">370 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L371" class="LineNr">371 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, z
<span id="L372" class="LineNr">372 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L372" class="LineNr">372 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L373" class="LineNr">373 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;)&quot;</span>
<span id="L374" class="LineNr">374 </span><span class="Delimiter">}</span>
<span id="L375" class="LineNr">375 </span>
@ -512,7 +512,7 @@ if ('onhashchange' in window) {
<span id="L451" class="LineNr">451 </span><span class="PreProc">fn</span> <span class="muFunction">vec3-unit</span> in: (addr vec3), out: (addr vec3) <span class="Delimiter">{</span>
<span id="L452" class="LineNr">452 </span> <span class="PreProc">var</span> len/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> vec3-length in
<span id="L453" class="LineNr">453 </span><span class="CommentedCode">#? print-string 0, &quot;len: &quot;</span>
<span id="L454" class="LineNr">454 </span><span class="CommentedCode">#? print-float 0, len</span>
<span id="L454" class="LineNr">454 </span><span class="CommentedCode">#? print-float-hex 0, len</span>
<span id="L455" class="LineNr">455 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L456" class="LineNr">456 </span> copy-object in, out
<span id="L457" class="LineNr">457 </span> vec3-scale-down out, len

View File

@ -68,7 +68,7 @@ if ('onhashchange' in window) {
<span id="L10" class="LineNr">10 </span> <span class="PreProc">var</span> c/<span class="Constant">esi</span>: (addr rgb) <span class="SpecialChar">&lt;-</span> copy _c
<span id="L11" class="LineNr">11 </span> <span class="PreProc">var</span> xn: float
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> xn-addr/<span class="Constant">ecx</span>: (addr float) <span class="SpecialChar">&lt;-</span> address xn
<span id="L13" class="LineNr">13 </span> <a href='../../409float.mu.html#L3'>fill-in-rational</a> xn-addr, <span class="Constant">0x3e7ff</span>, <span class="Constant">0x3e8</span> <span class="muComment"># 255999 / 1000</span>
<span id="L13" class="LineNr">13 </span> <a href='../../408float.mu.html#L3'>fill-in-rational</a> xn-addr, <span class="Constant">0x3e7ff</span>, <span class="Constant">0x3e8</span> <span class="muComment"># 255999 / 1000</span>
<span id="L14" class="LineNr">14 </span> <span class="muComment"># print 255.999 * c-&gt;r</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> copy xn
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> src-addr/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> c, r

View File

@ -67,13 +67,13 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr vec3) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L9" class="LineNr"> 9 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;(&quot;</span>
<span id="L10" class="LineNr"> 10 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, x
<span id="L11" class="LineNr"> 11 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L11" class="LineNr"> 11 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L12" class="LineNr"> 12 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L13" class="LineNr"> 13 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, y
<span id="L14" class="LineNr"> 14 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L14" class="LineNr"> 14 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L15" class="LineNr"> 15 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;, &quot;</span>
<span id="L16" class="LineNr"> 16 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, z
<span id="L17" class="LineNr"> 17 </span> <a href='../../408print-float.mu.html#L92'>print-float</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L17" class="LineNr"> 17 </span> <a href='../../409print-float-hex.mu.html#L118'>print-float-hex</a> <a href='../../405screen.mu.html#L9'>screen</a>, *tmp
<span id="L18" class="LineNr"> 18 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot;)&quot;</span>
<span id="L19" class="LineNr"> 19 </span><span class="Delimiter">}</span>
<span id="L20" class="LineNr"> 20 </span>
@ -155,7 +155,7 @@ if ('onhashchange' in window) {
<span id="L96" class="LineNr"> 96 </span><span class="PreProc">fn</span> <span class="muFunction">vec3-unit</span> in: (addr vec3), out: (addr vec3) <span class="Delimiter">{</span>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> len/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> vec3-length in
<span id="L98" class="LineNr"> 98 </span><span class="CommentedCode">#? print-string 0, &quot;len: &quot;</span>
<span id="L99" class="LineNr"> 99 </span><span class="CommentedCode">#? print-float 0, len</span>
<span id="L99" class="LineNr"> 99 </span><span class="CommentedCode">#? print-float-hex 0, len</span>
<span id="L100" class="LineNr">100 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L101" class="LineNr">101 </span> copy-object in, out
<span id="L102" class="LineNr">102 </span> vec3-scale-down out, len

View File

@ -270,7 +270,7 @@ if ('onhashchange' in window) {
<span id="L208" class="LineNr"> 208 </span> 3d/compare-eax-and 0x25/imm32/percent
<span id="L209" class="LineNr"> 209 </span> 75/jump-if-!= $subx-sigils:check-for-indirect-mode/disp8
<span id="L210" class="LineNr"> 210 </span><span class="Constant">$subx-sigils:direct-mode</span>:
<span id="L211" class="Folded"> 211 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L211" class="Folded"> 211 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L251" class="LineNr"> 251 </span> <span class="subxComment"># emit-direct-mode(out, word-slice)</span>
<span id="L252" class="LineNr"> 252 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L253" class="LineNr"> 253 </span> 52/push-edx
@ -511,7 +511,7 @@ if ('onhashchange' in window) {
<span id="L488" class="LineNr"> 488 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L489" class="LineNr"> 489 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L490" class="LineNr"> 490 </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="L491" class="Folded"> 491 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L491" class="Folded"> 491 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L517" class="LineNr"> 517 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;== abcd 0x1 \n&quot;, msg)</span>
<span id="L518" class="LineNr"> 518 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L519" class="LineNr"> 519 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-passes-most-words-through&quot;</span>/imm32
@ -584,7 +584,7 @@ if ('onhashchange' in window) {
<span id="L586" class="LineNr"> 586 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L587" class="LineNr"> 587 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L588" class="LineNr"> 588 </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="L589" class="Folded"> 589 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L589" class="Folded"> 589 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L615" class="LineNr"> 615 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 3/mod/direct 0x00000001/rm32 \n&quot;, msg)</span>
<span id="L616" class="LineNr"> 616 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L617" class="LineNr"> 617 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-direct-mode&quot;</span>/imm32
@ -729,7 +729,7 @@ if ('onhashchange' in window) {
<span id="L756" class="LineNr"> 756 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L757" class="LineNr"> 757 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L758" class="LineNr"> 758 </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="L759" class="Folded"> 759 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L759" class="Folded"> 759 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L785" class="LineNr"> 785 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 0/mod/indirect 0x00000001/rm32 \n&quot;, msg)</span>
<span id="L786" class="LineNr"> 786 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L787" class="LineNr"> 787 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-register-indirect-mode&quot;</span>/imm32
@ -874,7 +874,7 @@ if ('onhashchange' in window) {
<span id="L926" class="LineNr"> 926 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L927" class="LineNr"> 927 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L928" class="LineNr"> 928 </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="L929" class="Folded"> 929 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L929" class="Folded"> 929 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L955" class="LineNr"> 955 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 0/mod/indirect 1/rm32 \n&quot;, msg)</span>
<span id="L956" class="LineNr"> 956 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L957" class="LineNr"> 957 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-register-indirect-mode-without-displacement&quot;</span>/imm32
@ -947,7 +947,7 @@ if ('onhashchange' in window) {
<span id="L1024" class="LineNr">1024 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1025" class="LineNr">1025 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1026" class="LineNr">1026 </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="L1027" class="Folded">1027 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1027" class="Folded">1027 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1053" class="LineNr">1053 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 2/mod/*+disp32 1/rm32 4/disp32 \n&quot;, msg)</span>
<span id="L1054" class="LineNr">1054 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1055" class="LineNr">1055 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-register-indirect-mode-with-displacement&quot;</span>/imm32
@ -1021,7 +1021,7 @@ if ('onhashchange' in window) {
<span id="L1123" class="LineNr">1123 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1124" class="LineNr">1124 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1125" class="LineNr">1125 </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="L1126" class="Folded">1126 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1126" class="Folded">1126 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1152" class="LineNr">1152 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 2/mod/*+disp32 4/rm32/sib 1/base 2/index 3/scale 4/disp32 \n&quot;, msg)</span>
<span id="L1153" class="LineNr">1153 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1154" class="LineNr">1154 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-register-indirect-mode-with-sib-byte&quot;</span>/imm32
@ -1094,7 +1094,7 @@ if ('onhashchange' in window) {
<span id="L1221" class="LineNr">1221 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1222" class="LineNr">1222 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1223" class="LineNr">1223 </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="L1224" class="Folded">1224 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1224" class="Folded">1224 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1250" class="LineNr">1250 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 2/mod/*+disp32 4/rm32/sib 1/base 2/index 3/scale -4/disp32 \n&quot;, msg)</span>
<span id="L1251" class="LineNr">1251 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1252" class="LineNr">1252 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement&quot;</span>/imm32
@ -1167,7 +1167,7 @@ if ('onhashchange' in window) {
<span id="L1319" class="LineNr">1319 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1320" class="LineNr">1320 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1321" class="LineNr">1321 </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="L1322" class="Folded">1322 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1322" class="Folded">1322 </span><span class="Folded">+-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1348" class="LineNr">1348 </span> <span class="subxS1Comment"># . check-stream-equal(_test-output-stream, &quot;ab 0/mod/indirect 5/rm32/.disp32 Foo/disp32 \n&quot;, msg)</span>
<span id="L1349" class="LineNr">1349 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1350" class="LineNr">1350 </span> 68/push <span class="Constant">&quot;F - test-subx-sigils-indirect-mode-without-register&quot;</span>/imm32
@ -1196,7 +1196,7 @@ if ('onhashchange' in window) {
<span id="L1373" class="LineNr">1373 </span> <span class="subxComment"># ++local-slice-&gt;start to skip '%'</span>
<span id="L1374" class="LineNr">1374 </span> <span class="subxS1Comment"># . ++(*eax)</span>
<span id="L1375" class="LineNr">1375 </span> ff 0/subop/increment 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"># increment *eax</span>
<span id="L1376" class="Folded">1376 </span><span class="Folded">+-- 24 lines: #? # write-slice-buffered(Stderr, word-slice) ----------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1376" class="Folded">1376 </span><span class="Folded">+-- 24 lines: #? # write-slice-buffered(Stderr, word-slice) -------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1400" class="LineNr">1400 </span> <span class="subxComment"># local-slice = next-token-from-slice(local-slice-&gt;start, local-slice-&gt;end, &quot;/&quot;)</span>
<span id="L1401" class="LineNr">1401 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1402" class="LineNr">1402 </span> 50/push-eax
@ -1294,7 +1294,7 @@ if ('onhashchange' in window) {
<span id="L1494" class="LineNr">1494 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1495" class="LineNr">1495 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1496" class="LineNr">1496 </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="L1497" class="Folded">1497 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1497" class="Folded">1497 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1523" class="LineNr">1523 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;3/mod/direct 0/rm32&quot;, msg)</span>
<span id="L1524" class="LineNr">1524 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1525" class="LineNr">1525 </span> 68/push <span class="Constant">&quot;F - <a href='sigils.subx.html#L1454'>test-emit-direct-mode</a>/0&quot;</span>/imm32
@ -1352,7 +1352,7 @@ if ('onhashchange' in window) {
<span id="L1577" class="LineNr">1577 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L1578" class="LineNr">1578 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1579" class="LineNr">1579 </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="L1580" class="Folded">1580 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1580" class="Folded">1580 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1606" class="LineNr">1606 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;3/mod/direct 7/rm32&quot;, msg)</span>
<span id="L1607" class="LineNr">1607 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1608" class="LineNr">1608 </span> 68/push <span class="Constant">&quot;F - <a href='sigils.subx.html#L1454'>test-emit-direct-mode</a>/1&quot;</span>/imm32
@ -3124,7 +3124,7 @@ if ('onhashchange' in window) {
<span id="L3374" class="LineNr">3374 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3375" class="LineNr">3375 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3376" class="LineNr">3376 </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="L3377" class="Folded">3377 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3377" class="Folded">3377 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3403" class="LineNr">3403 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;0/mod/indirect 0/rm32&quot;, msg)</span>
<span id="L3404" class="LineNr">3404 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3405" class="LineNr">3405 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode&quot;</span>/imm32
@ -3176,7 +3176,7 @@ if ('onhashchange' in window) {
<span id="L3451" class="LineNr">3451 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3452" class="LineNr">3452 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3453" class="LineNr">3453 </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="L3454" class="Folded">3454 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3454" class="Folded">3454 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3480" class="LineNr">3480 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;0/mod/indirect 7/rm32&quot;, msg)</span>
<span id="L3481" class="LineNr">3481 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3482" class="LineNr">3482 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-2&quot;</span>/imm32
@ -3228,7 +3228,7 @@ if ('onhashchange' in window) {
<span id="L3528" class="LineNr">3528 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3529" class="LineNr">3529 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3530" class="LineNr">3530 </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="L3531" class="Folded">3531 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3531" class="Folded">3531 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3557" class="LineNr">3557 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;2/mod/*+disp32 6/rm32 4/disp32&quot;, msg)</span>
<span id="L3558" class="LineNr">3558 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3559" class="LineNr">3559 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-with-disp&quot;</span>/imm32
@ -3280,7 +3280,7 @@ if ('onhashchange' in window) {
<span id="L3605" class="LineNr">3605 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3606" class="LineNr">3606 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3607" class="LineNr">3607 </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="L3608" class="Folded">3608 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3608" class="Folded">3608 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3634" class="LineNr">3634 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;2/mod/*+disp32 6/rm32 -4/disp32&quot;, msg)</span>
<span id="L3635" class="LineNr">3635 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3636" class="LineNr">3636 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-with-disp&quot;</span>/imm32
@ -3332,7 +3332,7 @@ if ('onhashchange' in window) {
<span id="L3682" class="LineNr">3682 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3683" class="LineNr">3683 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3684" class="LineNr">3684 </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="L3685" class="Folded">3685 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3685" class="Folded">3685 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3711" class="LineNr">3711 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;2/mod/indirect 4/rm32/sib 6/base 1/index 2/scale 4/disp&quot;, msg)</span>
<span id="L3712" class="LineNr">3712 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3713" class="LineNr">3713 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-with-sib&quot;</span>/imm32
@ -3384,7 +3384,7 @@ if ('onhashchange' in window) {
<span id="L3759" class="LineNr">3759 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3760" class="LineNr">3760 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3761" class="LineNr">3761 </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="L3762" class="Folded">3762 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3762" class="Folded">3762 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3788" class="LineNr">3788 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;2/mod/*+disp32 4/rm32/sib 5/base/ebp 0/index 0/scale 0/disp32&quot;, msg)</span>
<span id="L3789" class="LineNr">3789 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3790" class="LineNr">3790 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-ebp&quot;</span>/imm32
@ -3436,7 +3436,7 @@ if ('onhashchange' in window) {
<span id="L3836" class="LineNr">3836 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L3837" class="LineNr">3837 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3838" class="LineNr">3838 </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="L3839" class="Folded">3839 </span><span class="Folded">+-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3839" class="Folded">3839 </span><span class="Folded">+-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3865" class="LineNr">3865 </span> <span class="subxComment"># check-stream-equal(_test-output-stream, &quot;2/mod/*+disp32 4/rm32/sib 4/base/ebp 0/index 0/scale 0/disp32&quot;, msg)</span>
<span id="L3866" class="LineNr">3866 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3867" class="LineNr">3867 </span> 68/push <span class="Constant">&quot;F - test-emit-indirect-mode-esp&quot;</span>/imm32

View File

@ -387,7 +387,7 @@ if ('onhashchange' in window) {
<span id="L324" class="LineNr"> 324 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L325" class="LineNr"> 325 </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="L326" class="LineNr"> 326 </span> <span class="subxComment"># check trace</span>
<span id="L327" class="Folded"> 327 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L327" class="Folded"> 327 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L353" class="LineNr"> 353 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;label 'x' is at address 0x00001079.&quot;, msg)</span>
<span id="L354" class="LineNr"> 354 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L355" class="LineNr"> 355 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L222'>test-subx-survey-computes-addresses</a>/0&quot;</span>/imm32
@ -546,7 +546,7 @@ if ('onhashchange' in window) {
<span id="L508" class="LineNr"> 508 </span> 8b/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to eax</span>
<span id="L509" class="LineNr"> 509 </span> 3d/compare-eax-and 0/imm32
<span id="L510" class="LineNr"> 510 </span> 0f 84/jump-if-= $compute-offsets:break-line-loop/disp32
<span id="L511" class="Folded"> 511 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L511" class="Folded"> 511 </span><span class="Folded">+-- 33 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L544" class="LineNr"> 544 </span><span class="Constant">$compute-offsets:word-loop</span>:
<span id="L545" class="LineNr"> 545 </span> <span class="subxComment"># next-word(line, word-slice)</span>
<span id="L546" class="LineNr"> 546 </span> 52/push-edx
@ -812,7 +812,7 @@ if ('onhashchange' in window) {
<span id="L806" class="LineNr"> 806 </span> 01/add 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <a href='survey.subx.html#L407'>compute-offsets</a>:segment-offset/disp32 <span class="subxComment"># add eax to *segment-offset</span>
<span id="L807" class="LineNr"> 807 </span> <span class="subxComment"># file-offset += width</span>
<span id="L808" class="LineNr"> 808 </span> 01/add 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <a href='survey.subx.html#L407'>compute-offsets</a>:file-offset/disp32 <span class="subxComment"># add eax to *file-offset</span>
<span id="L809" class="Folded"> 809 </span><span class="Folded">+-- 41 lines: #? # dump segment-offset -------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L809" class="Folded"> 809 </span><span class="Folded">+-- 41 lines: #? # dump segment-offset ----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L850" class="LineNr"> 850 </span> e9/jump $compute-offsets:word-loop/disp32
<span id="L851" class="LineNr"> 851 </span><span class="Constant">$compute-offsets:break-line-loop</span>:
<span id="L852" class="LineNr"> 852 </span> <span class="subxComment"># sinfo/edi = get-or-insert-handle(segments, curr-segment-name, row-size=16)</span>
@ -988,7 +988,7 @@ if ('onhashchange' in window) {
<span id="L1022" class="LineNr">1022 </span> e8/call <a href='survey.subx.html#L407'>compute-offsets</a>/disp32
<span id="L1023" class="LineNr">1023 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1024" class="LineNr">1024 </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="L1025" class="Folded">1025 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1025" class="Folded">1025 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1051" class="LineNr">1051 </span> <span class="subxComment"># check trace</span>
<span id="L1052" class="LineNr">1052 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'code' is at file offset 0x00000000.&quot;, msg)</span>
<span id="L1053" class="LineNr">1053 </span> <span class="subxS2Comment"># . . push args</span>
@ -1152,7 +1152,7 @@ if ('onhashchange' in window) {
<span id="L1211" class="LineNr">1211 </span> 81 0/subop/add 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x14/imm32 <span class="subxComment"># add to esi</span>
<span id="L1212" class="LineNr">1212 </span> eb/jump $compute-addresses:segment-loop/disp8
<span id="L1213" class="LineNr">1213 </span><span class="Constant">$compute-addresses:segment-break</span>:
<span id="L1214" class="Folded">1214 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1214" class="Folded">1214 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1240" class="LineNr">1240 </span> <span class="subxComment"># esi = labels</span>
<span id="L1241" class="LineNr">1241 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span>
<span id="L1242" class="LineNr">1242 </span> <span class="subxComment"># var max/ecx: (addr byte) = &amp;labels-&gt;data[labels-&gt;write]</span>
@ -1164,7 +1164,7 @@ if ('onhashchange' in window) {
<span id="L1248" class="LineNr">1248 </span> <span class="subxComment"># if (lrow &gt;= max) break</span>
<span id="L1249" class="LineNr">1249 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with ecx</span>
<span id="L1250" class="LineNr">1250 </span> 0f 83/jump-if-addr&gt;= $compute-addresses:end/disp32
<span id="L1251" class="Folded">1251 </span><span class="Folded">+-- 26 lines: #? # dump lrow-&gt;key ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1251" class="Folded">1251 </span><span class="Folded">+-- 26 lines: #? # dump lrow-&gt;key ---------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1277" class="LineNr">1277 </span> <span class="subxComment"># var seg-name/edx: (addr array byte) = lookup(lrow-&gt;segment-name)</span>
<span id="L1278" class="LineNr">1278 </span> <span class="subxS1Comment"># . eax = lookup(lrow-&gt;segment-name)</span>
<span id="L1279" class="LineNr">1279 </span> <span class="subxS2Comment"># . . push args</span>
@ -1176,7 +1176,7 @@ if ('onhashchange' in window) {
<span id="L1285" class="LineNr">1285 </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="L1286" class="LineNr">1286 </span> <span class="subxS1Comment"># . edx = eax</span>
<span id="L1287" class="LineNr">1287 </span> 89/copy 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to edx</span>
<span id="L1288" class="Folded">1288 </span><span class="Folded">+-- 26 lines: #? # dump seg-name -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1288" class="Folded">1288 </span><span class="Folded">+-- 26 lines: #? # dump seg-name ----------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1314" class="LineNr">1314 </span> <span class="subxComment"># var label-seg/edx: (addr segment-info) = get(segments, seg-name, row-size=20, &quot;segment table&quot;)</span>
<span id="L1315" class="LineNr">1315 </span> <span class="subxS1Comment"># . eax = get(segments, seg-name, row-size=20)</span>
<span id="L1316" class="LineNr">1316 </span> <span class="subxS2Comment"># . . push args</span>
@ -1393,7 +1393,7 @@ if ('onhashchange' in window) {
<span id="L1527" class="LineNr">1527 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1528" class="LineNr">1528 </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="L1529" class="LineNr">1529 </span> <span class="subxComment"># checks</span>
<span id="L1530" class="Folded">1530 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1530" class="Folded">1530 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1556" class="LineNr">1556 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'a' starts at address 0x00001094.&quot;, msg)</span>
<span id="L1557" class="LineNr">1557 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1558" class="LineNr">1558 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L1369'>test-compute-addresses</a>/0&quot;</span>/imm32
@ -1556,7 +1556,7 @@ if ('onhashchange' in window) {
<span id="L1715" class="LineNr">1715 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1716" class="LineNr">1716 </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="L1717" class="LineNr">1717 </span> <span class="subxComment"># checks</span>
<span id="L1718" class="Folded">1718 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1718" class="Folded">1718 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1744" class="LineNr">1744 </span> <span class="subxS1Comment"># . check-trace-contains(&quot;segment 'a' starts at address 0x00001074.&quot;, msg)</span>
<span id="L1745" class="LineNr">1745 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1746" class="LineNr">1746 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L1610'>test-compute-addresses-large-segments</a>/0&quot;</span>/imm32
@ -1594,7 +1594,7 @@ if ('onhashchange' in window) {
<span id="L1778" class="LineNr">1778 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L1779" class="LineNr">1779 </span> 55/push-ebp
<span id="L1780" class="LineNr">1780 </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="L1781" class="Folded">1781 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-headers\n&quot;) -----------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1781" class="Folded">1781 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-headers\n&quot;) --------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1790" class="LineNr">1790 </span> <span class="subxComment"># emit-headers(out, segments, labels)</span>
<span id="L1791" class="LineNr">1791 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1792" class="LineNr">1792 </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>
@ -1604,7 +1604,7 @@ if ('onhashchange' in window) {
<span id="L1796" class="LineNr">1796 </span> e8/call <a href='survey.subx.html#L3043'>emit-headers</a>/disp32
<span id="L1797" class="LineNr">1797 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1798" class="LineNr">1798 </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="L1799" class="Folded">1799 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-segments\n&quot;) ----------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1799" class="Folded">1799 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-segments\n&quot;) -------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1808" class="LineNr">1808 </span> <span class="subxComment"># emit-segments(in, out, labels)</span>
<span id="L1809" class="LineNr">1809 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L1810" class="LineNr">1810 </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>
@ -1718,7 +1718,7 @@ if ('onhashchange' in window) {
<span id="L1918" class="LineNr">1918 </span> e8/call <a href='../122read-line.subx.html#L218'>read-line</a>/disp32
<span id="L1919" class="LineNr">1919 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1920" class="LineNr">1920 </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="L1921" class="Folded">1921 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1921" class="Folded">1921 </span><span class="Folded">+-- 33 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1954" class="LineNr">1954 </span><span class="Constant">$emit-segments:check-for-end-of-input</span>:
<span id="L1955" class="LineNr">1955 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L1956" class="LineNr">1956 </span> 81 7/subop/compare 0/mod/indirect 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>
@ -1742,7 +1742,7 @@ if ('onhashchange' in window) {
<span id="L1974" class="LineNr">1974 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L1975" class="LineNr">1975 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L1976" class="LineNr">1976 </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="L1977" class="Folded">1977 </span><span class="Folded">+-- 33 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L1977" class="Folded">1977 </span><span class="Folded">+-- 33 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2010" class="LineNr">2010 </span><span class="Constant">$emit-segments:check-for-end-of-line</span>:
<span id="L2011" class="LineNr">2011 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L2012" class="LineNr">2012 </span> <span class="subxS1Comment"># . eax = slice-empty?(word-slice)</span>
@ -1828,7 +1828,7 @@ if ('onhashchange' in window) {
<span id="L2092" class="LineNr">2092 </span> e8/call <a href='../124next-token.subx.html#L163'>next-token-from-slice</a>/disp32
<span id="L2093" class="LineNr">2093 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2094" class="LineNr">2094 </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> 0x10/imm32 <span class="subxComment"># add to esp</span>
<span id="L2095" class="Folded">2095 </span><span class="Folded">+-- 33 lines: #? # dump datum ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2095" class="Folded">2095 </span><span class="Folded">+-- 33 lines: #? # dump datum -------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2128" class="LineNr">2128 </span> <span class="subxComment"># info/esi = get-slice(labels, datum, row-size=24, &quot;label table&quot;)</span>
<span id="L2129" class="LineNr">2129 </span> <span class="subxS1Comment"># . eax = get-slice(labels, datum, row-size=24, &quot;label table&quot;)</span>
<span id="L2130" class="LineNr">2130 </span> <span class="subxS2Comment"># . . push args</span>
@ -1927,7 +1927,7 @@ if ('onhashchange' in window) {
<span id="L2223" class="LineNr">2223 </span> <span class="subxS1Comment"># . if (eax == false) goto next check</span>
<span id="L2224" class="LineNr">2224 </span> 3d/compare-eax-and 0/imm32/false
<span id="L2225" class="LineNr">2225 </span> 74/jump-if-= $emit-segments:check-code-label-for-disp8/disp8
<span id="L2226" class="Folded">2226 </span><span class="Folded">+-- 33 lines: #? # dump info-&gt;address --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2226" class="Folded">2226 </span><span class="Folded">+-- 33 lines: #? # dump info-&gt;address -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2259" class="LineNr">2259 </span><span class="Constant">$emit-segments:emit-code-label-imm32</span>:
<span id="L2260" class="LineNr">2260 </span> <span class="subxComment"># emit-hex(out, info-&gt;address, 4)</span>
<span id="L2261" class="LineNr">2261 </span> <span class="subxS2Comment"># . . push args</span>
@ -2234,7 +2234,7 @@ if ('onhashchange' in window) {
<span id="L2562" class="LineNr">2562 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L2563" class="LineNr">2563 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2564" class="LineNr">2564 </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="L2565" class="Folded">2565 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2565" class="Folded">2565 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2598" class="LineNr">2598 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;ab cd ef gh &quot;, msg)</span>
<span id="L2599" class="LineNr">2599 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2600" class="LineNr">2600 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L2409'>test-emit-segments-global-variable</a>/0&quot;</span>/imm32
@ -2413,7 +2413,7 @@ if ('onhashchange' in window) {
<span id="L2773" class="LineNr">2773 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L2774" class="LineNr">2774 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2775" class="LineNr">2775 </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="L2776" class="Folded">2776 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2776" class="Folded">2776 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2809" class="LineNr">2809 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;ab cd &quot;, msg)</span>
<span id="L2810" class="LineNr">2810 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L2811" class="LineNr">2811 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L2639'>test-emit-segments-code-label</a>/0&quot;</span>/imm32
@ -2583,7 +2583,7 @@ if ('onhashchange' in window) {
<span id="L2975" class="LineNr">2975 </span> e8/call <a href='../115write-byte.subx.html#L81'>flush</a>/disp32
<span id="L2976" class="LineNr">2976 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L2977" class="LineNr">2977 </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="L2978" class="Folded">2978 </span><span class="Folded">+-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L2978" class="Folded">2978 </span><span class="Folded">+-- 33 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3011" class="LineNr">3011 </span> <span class="subxS1Comment"># . check-next-stream-line-equal(_test-output-stream, &quot;ab cd &quot;, msg)</span>
<span id="L3012" class="LineNr">3012 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3013" class="LineNr">3013 </span> 68/push <span class="Constant">&quot;F - <a href='survey.subx.html#L2841'>test-emit-segments-code-label-absolute</a>/0&quot;</span>/imm32
@ -2653,8 +2653,8 @@ if ('onhashchange' in window) {
<span id="L3077" class="LineNr">3077 </span> <span class="subxComment"># if (curr-segment &gt;= max) break</span>
<span id="L3078" class="LineNr">3078 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L3079" class="LineNr">3079 </span> 0f 83/jump-if-addr&gt;= $emit-headers:end/disp32
<span id="L3080" class="Folded">3080 </span><span class="Folded">+-- 63 lines: #? # dump curr-segment-&gt;name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3143" class="Folded">3143 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-segment-header\n&quot;) ----------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3080" class="Folded">3080 </span><span class="Folded">+-- 63 lines: #? # dump curr-segment-&gt;name ------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3143" class="Folded">3143 </span><span class="Folded">+-- 9 lines: #? # write(2/stderr, &quot;emit-segment-header\n&quot;) -------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3152" class="LineNr">3152 </span> <span class="subxComment"># emit-elf-program-header-entry(out, curr-segment)</span>
<span id="L3153" class="LineNr">3153 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3154" class="LineNr">3154 </span> 50/push-eax
@ -3174,7 +3174,7 @@ if ('onhashchange' in window) {
<span id="L3668" class="LineNr">3668 </span> e8/call <a href='survey.subx.html#L3603'>trace-sssns</a>/disp32
<span id="L3669" class="LineNr">3669 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3670" class="LineNr">3670 </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> 0x14/imm32 <span class="subxComment"># add to esp</span>
<span id="L3671" class="Folded">3671 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3671" class="Folded">3671 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3697" class="LineNr">3697 </span> <span class="subxComment"># check-trace-contains(&quot;Abc 0x00000003 e&quot;)</span>
<span id="L3698" class="LineNr">3698 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3699" class="LineNr">3699 </span> 68/push <span class="Constant">&quot;F - test-trace-sssns&quot;</span>/imm32
@ -3256,7 +3256,7 @@ if ('onhashchange' in window) {
<span id="L3775" class="LineNr">3775 </span> e8/call <a href='survey.subx.html#L3710'>trace-snsns</a>/disp32
<span id="L3776" class="LineNr">3776 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3777" class="LineNr">3777 </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> 0x14/imm32 <span class="subxComment"># add to esp</span>
<span id="L3778" class="Folded">3778 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3778" class="Folded">3778 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3804" class="LineNr">3804 </span> <span class="subxComment"># check-trace-contains(&quot;Abc 0x00000003 e&quot;)</span>
<span id="L3805" class="LineNr">3805 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3806" class="LineNr">3806 </span> 68/push <span class="Constant">&quot;F - test-trace-snsns&quot;</span>/imm32
@ -3356,7 +3356,7 @@ if ('onhashchange' in window) {
<span id="L3900" class="LineNr">3900 </span> e8/call <a href='survey.subx.html#L3817'>trace-slsls</a>/disp32
<span id="L3901" class="LineNr">3901 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L3902" class="LineNr">3902 </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> 0x14/imm32 <span class="subxComment"># add to esp</span>
<span id="L3903" class="Folded">3903 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3903" class="Folded">3903 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L3929" class="LineNr">3929 </span> <span class="subxComment"># check-trace-contains(&quot;Abcde&quot;)</span>
<span id="L3930" class="LineNr">3930 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L3931" class="LineNr">3931 </span> 68/push <span class="Constant">&quot;F - test-trace-slsls&quot;</span>/imm32
@ -3447,7 +3447,7 @@ if ('onhashchange' in window) {
<span id="L4016" class="LineNr">4016 </span> e8/call <a href='survey.subx.html#L3942'>trace-slsns</a>/disp32
<span id="L4017" class="LineNr">4017 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4018" class="LineNr">4018 </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> 0x14/imm32 <span class="subxComment"># add to esp</span>
<span id="L4019" class="Folded">4019 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4019" class="Folded">4019 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4045" class="LineNr">4045 </span> <span class="subxComment"># check-trace-contains(&quot;Abc 0x00000003 e&quot;)</span>
<span id="L4046" class="LineNr">4046 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4047" class="LineNr">4047 </span> 68/push <span class="Constant">&quot;F - test-trace-slsls&quot;</span>/imm32
@ -3538,7 +3538,7 @@ if ('onhashchange' in window) {
<span id="L4132" class="LineNr">4132 </span> e8/call <a href='survey.subx.html#L4058'>trace-slsss</a>/disp32
<span id="L4133" class="LineNr">4133 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4134" class="LineNr">4134 </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> 0x14/imm32 <span class="subxComment"># add to esp</span>
<span id="L4135" class="Folded">4135 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4135" class="Folded">4135 </span><span class="Folded">+-- 26 lines: #? # dump *Trace-stream -----------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4161" class="LineNr">4161 </span> <span class="subxComment"># check-trace-contains(&quot;Abcde&quot;)</span>
<span id="L4162" class="LineNr">4162 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4163" class="LineNr">4163 </span> 68/push <span class="Constant">&quot;F - test-trace-slsss&quot;</span>/imm32
@ -3581,7 +3581,7 @@ if ('onhashchange' in window) {
<span id="L4200" class="LineNr">4200 </span> 68/push 0/imm32/end
<span id="L4201" class="LineNr">4201 </span> 68/push 0/imm32/start
<span id="L4202" class="LineNr">4202 </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="L4203" class="Folded">4203 </span><span class="Folded">+-- 26 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4203" class="Folded">4203 </span><span class="Folded">+-- 26 lines: #? # dump line --------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4229" class="LineNr">4229 </span> <span class="subxS1Comment"># . rewind-stream(line)</span>
<span id="L4230" class="LineNr">4230 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L4231" class="LineNr">4231 </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>
@ -3598,7 +3598,7 @@ if ('onhashchange' in window) {
<span id="L4242" class="LineNr">4242 </span> e8/call <a href='../127next-word.subx.html#L10'>next-word</a>/disp32
<span id="L4243" class="LineNr">4243 </span> <span class="subxS2Comment"># . . discard args</span>
<span id="L4244" class="LineNr">4244 </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="L4245" class="Folded">4245 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4245" class="Folded">4245 </span><span class="Folded">+-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="L4285" class="LineNr">4285 </span><span class="Constant">$num-bytes:check0</span>:
<span id="L4286" class="LineNr">4286 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L4287" class="LineNr">4287 </span> <span class="subxS1Comment"># . save result</span>

View File

@ -95,7 +95,7 @@ if ('onhashchange' in window) {
<span id="L36" class="LineNr"> 36 </span><span class="muComment"># todo: turn this into a sum type</span>
<span id="L37" class="LineNr"> 37 </span><span class="PreProc">type</span> <a href='data.mu.html#L37'>value</a> <span class="Delimiter">{</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">type</span>: int
<span id="L39" class="LineNr"> 39 </span> int-data: int <span class="muComment"># if type = 0</span>
<span id="L39" class="LineNr"> 39 </span> number-data: float <span class="muComment"># if type = 0</span>
<span id="L40" class="LineNr"> 40 </span> text-data: (handle array byte) <span class="muComment"># if type = 1</span>
<span id="L41" class="LineNr"> 41 </span> array-data: (handle array <a href='data.mu.html#L37'>value</a>) <span class="muComment"># if type = 2</span>
<span id="L42" class="LineNr"> 42 </span> file-data: (handle buffered-file) <span class="muComment"># if type = 3</span>

File diff suppressed because it is too large Load Diff

126
html/apps/tile/float-stack.mu.html generated Normal file
View File

@ -0,0 +1,126 @@
<!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 - apps/tile/float-stack.mu</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; }
.muComment { color: #005faf; }
.LineNr { }
.SpecialChar { color: #d70000; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.Constant { color: #008787; }
.PreProc { color: #c000c0; }
-->
</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/apps/tile/float-stack.mu'>https://github.com/akkartik/mu/blob/master/apps/tile/float-stack.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="PreProc">type</span> <a href='float-stack.mu.html#L1'>float-stack</a> <span class="Delimiter">{</span>
<span id="L2" class="LineNr"> 2 </span> data: (handle array float)
<span id="L3" class="LineNr"> 3 </span> <a href='../../203stack.subx.html#L338'>top</a>: int
<span id="L4" class="LineNr"> 4 </span><span class="Delimiter">}</span>
<span id="L5" class="LineNr"> 5 </span>
<span id="L6" class="LineNr"> 6 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='float-stack.mu.html#L6'>initialize-float-stack</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>), n: int <span class="Delimiter">{</span>
<span id="L7" class="LineNr"> 7 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L8" class="LineNr"> 8 </span> <span class="PreProc">var</span> d/<span class="Constant">edi</span>: (addr handle array float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L9" class="LineNr"> 9 </span> populate d, n
<span id="L10" class="LineNr">10 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L11" class="LineNr">11 </span> copy-to *top, <span class="Constant">0</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='float-stack.mu.html#L14'>clear-float-stack</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L17" class="LineNr">17 </span> copy-to *top, <span class="Constant">0</span>
<span id="L18" class="LineNr">18 </span><span class="Delimiter">}</span>
<span id="L19" class="LineNr">19 </span>
<span id="L20" class="LineNr">20 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='float-stack.mu.html#L20'>push-float-stack</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>), _val: float <span class="Delimiter">{</span>
<span id="L21" class="LineNr">21 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L22" class="LineNr">22 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edx</span>: (addr handle array float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L24" class="LineNr">24 </span> <span class="PreProc">var</span> data/<span class="Constant">eax</span>: (addr array float) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L25" class="LineNr">25 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy *top-addr
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> dest-addr/<span class="Constant">edx</span>: (addr float) <span class="SpecialChar">&lt;-</span> index data, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L27" class="LineNr">27 </span> <span class="PreProc">var</span> val/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> copy _val
<span id="L28" class="LineNr">28 </span> copy-to *dest-addr, val
<span id="L29" class="LineNr">29 </span> add-to *top-addr, <span class="Constant">1</span>
<span id="L30" class="LineNr">30 </span><span class="Delimiter">}</span>
<span id="L31" class="LineNr">31 </span>
<span id="L32" class="LineNr">32 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='float-stack.mu.html#L32'>pop-float-stack</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">xmm0</span>: float <span class="Delimiter">{</span>
<span id="L33" class="LineNr">33 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L34" class="LineNr">34 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L35" class="LineNr">35 </span> <span class="Delimiter">{</span>
<span id="L36" class="LineNr">36 </span> compare *top-addr, <span class="Constant">0</span>
<span id="L37" class="LineNr">37 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L38" class="LineNr">38 </span> <span class="PreProc">var</span> zero: float
<span id="L39" class="LineNr">39 </span> <span class="PreProc">return</span> zero
<span id="L40" class="LineNr">40 </span> <span class="Delimiter">}</span>
<span id="L41" class="LineNr">41 </span> subtract-from *top-addr, <span class="Constant">1</span>
<span id="L42" class="LineNr">42 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edx</span>: (addr handle array float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L43" class="LineNr">43 </span> <span class="PreProc">var</span> data/<span class="Constant">eax</span>: (addr array float) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L44" class="LineNr">44 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy *top-addr
<span id="L45" class="LineNr">45 </span> <span class="PreProc">var</span> result-addr/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> index data, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L46" class="LineNr">46 </span> <span class="PreProc">return</span> *result-addr
<span id="L47" class="LineNr">47 </span><span class="Delimiter">}</span>
<span id="L48" class="LineNr">48 </span>
<span id="L49" class="LineNr">49 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='float-stack.mu.html#L49'>float-stack-empty?</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: boolean <span class="Delimiter">{</span>
<span id="L50" class="LineNr">50 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L51" class="LineNr">51 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L52" class="LineNr">52 </span> compare *top-addr, <span class="Constant">0</span>
<span id="L53" class="LineNr">53 </span> <span class="Delimiter">{</span>
<span id="L54" class="LineNr">54 </span> <span class="PreProc">break-if-!=</span>
<span id="L55" class="LineNr">55 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L56" class="LineNr">56 </span> <span class="Delimiter">}</span>
<span id="L57" class="LineNr">57 </span> <span class="PreProc">return</span> <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L58" class="LineNr">58 </span><span class="Delimiter">}</span>
<span id="L59" class="LineNr">59 </span>
<span id="L60" class="LineNr">60 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='float-stack.mu.html#L60'>float-stack-length</a></span> _self: (addr <a href='float-stack.mu.html#L1'>float-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L61" class="LineNr">61 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='float-stack.mu.html#L1'>float-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L62" class="LineNr">62 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L63" class="LineNr">63 </span> <span class="PreProc">return</span> *top-addr
<span id="L64" class="LineNr">64 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -90,7 +90,7 @@ if ('onhashchange' in window) {
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> s-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">var</span> s/<span class="Constant">ecx</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s-storage
<span id="L33" class="LineNr"> 33 </span> <a href='gap-buffer.mu.html#L37'>emit-gap-buffer</a> self, s
<span id="L34" class="LineNr"> 34 </span> <a href='../../310copy-bytes.subx.html#L59'>stream-to-array</a> s, out
<span id="L34" class="LineNr"> 34 </span> <a href='../../310copy-bytes.subx.html#L60'>stream-to-array</a> s, out
<span id="L35" class="LineNr"> 35 </span><span class="Delimiter">}</span>
<span id="L36" class="LineNr"> 36 </span>
<span id="L37" class="LineNr"> 37 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='gap-buffer.mu.html#L37'>emit-gap-buffer</a></span> _self: (addr <a href='gap-buffer.mu.html#L1'>gap-buffer</a>), out: (addr stream byte) <span class="Delimiter">{</span>

View File

@ -117,7 +117,7 @@ if ('onhashchange' in window) {
<span id="L58" class="LineNr"> 58 </span> compare key, <span class="Constant">0x11</span> <span class="muComment"># 'ctrl-q'</span>
<span id="L59" class="LineNr"> 59 </span> <span class="PreProc">break-if-=</span>
<span id="L60" class="LineNr"> 60 </span> <a href='environment.mu.html#L62'>process</a> env, key
<span id="L61" class="LineNr"> 61 </span> <a href='environment.mu.html#L965'>render</a> env
<span id="L61" class="LineNr"> 61 </span> <a href='environment.mu.html#L959'>render</a> env
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">loop</span>
<span id="L63" class="LineNr"> 63 </span> <span class="Delimiter">}</span>
<span id="L64" class="LineNr"> 64 </span> <a href='../../305keyboard.subx.html#L72'>enable-keyboard-type-mode</a>
@ -138,7 +138,7 @@ if ('onhashchange' in window) {
<span id="L79" class="LineNr"> 79 </span><span class="CommentedCode">#? process env, 5 # ctrl-e: end of line</span>
<span id="L80" class="LineNr"> 80 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;==\n&quot;</span>
<span id="L81" class="LineNr"> 81 </span> <a href='environment.mu.html#L62'>process</a> env, <span class="Constant">0xa</span> <span class="muComment"># newline: expand</span>
<span id="L82" class="LineNr"> 82 </span> <a href='environment.mu.html#L965'>render</a> env
<span id="L82" class="LineNr"> 82 </span> <a href='environment.mu.html#L959'>render</a> env
<span id="L83" class="LineNr"> 83 </span><span class="Delimiter">}</span>
<span id="L84" class="LineNr"> 84 </span>
<span id="L85" class="LineNr"> 85 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='main.mu.html#L85'>process-all</a></span> env: (addr <a href='environment.mu.html#L1'>environment</a>), cmds: (addr array byte) <span class="Delimiter">{</span>
@ -183,20 +183,24 @@ if ('onhashchange' in window) {
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> stack-storage: <a href='value-stack.mu.html#L3'>value-stack</a>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> stack/<span class="Constant">edi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> address stack-storage
<span id="L126" class="LineNr">126 </span> <a href='value-stack.mu.html#L8'>initialize-value-stack</a> stack, <span class="Constant">0x10</span>
<span id="L127" class="LineNr">127 </span> <a href='environment.mu.html#L952'>evaluate-environment</a> env, stack
<span id="L127" class="LineNr">127 </span> <a href='environment.mu.html#L946'>evaluate-environment</a> env, stack
<span id="L128" class="LineNr">128 </span> <span class="muComment"># print</span>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> empty?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='value-stack.mu.html#L106'>value-stack-empty?</a> stack
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> empty?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='value-stack.mu.html#L108'>value-stack-empty?</a> stack
<span id="L130" class="LineNr">130 </span> <span class="Delimiter">{</span>
<span id="L131" class="LineNr">131 </span> compare empty?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L132" class="LineNr">132 </span> <span class="PreProc">break-if-!=</span>
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value-stack.mu.html#L88'>pop-int-from-value-stack</a> stack
<span id="L134" class="LineNr">134 </span> <a href='../../304screen.subx.html#L252'>print-int32-decimal-to-real-screen</a> <a href='data.mu.html#L70'>result</a>
<span id="L135" class="LineNr">135 </span> <a href='../../304screen.subx.html#L122'>print-string-to-real-screen</a> <span class="Constant">&quot;\n&quot;</span>
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span>
<span id="L137" class="LineNr">137 </span> <span class="muComment">#</span>
<span id="L138" class="LineNr">138 </span> <span class="PreProc">loop</span>
<span id="L139" class="LineNr">139 </span> <span class="Delimiter">}</span>
<span id="L140" class="LineNr">140 </span><span class="Delimiter">}</span>
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> <a href='value-stack.mu.html#L88'>pop-number-from-value-stack</a> stack
<span id="L134" class="LineNr">134 </span> <a href='../../412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <span class="Constant">0</span>, <a href='data.mu.html#L70'>result</a>, <span class="Constant">3</span>
<span id="L135" class="LineNr">135 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;\n&quot;</span>
<span id="L136" class="LineNr">136 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;width: &quot;</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> width/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../../412print-float-decimal.mu.html#L519'>float-size</a> <a href='data.mu.html#L70'>result</a>, <span class="Constant">3</span>
<span id="L138" class="LineNr">138 </span> <a href='../../405screen.mu.html#L480'>print-int32-decimal</a> <span class="Constant">0</span>, width
<span id="L139" class="LineNr">139 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;\n&quot;</span>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">}</span>
<span id="L141" class="LineNr">141 </span> <span class="muComment">#</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">loop</span>
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">}</span>
<span id="L144" class="LineNr">144 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -81,10 +81,10 @@ if ('onhashchange' in window) {
<span id="L21" class="LineNr"> 21 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L21'>initialize-surface-with</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), in: (addr array byte) <span class="Delimiter">{</span>
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L23" class="LineNr"> 23 </span> <span class="muComment"># fill in nrows, ncols</span>
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L260'>num-lines</a> in
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L258'>num-lines</a> in
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> dest/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, nrows
<span id="L26" class="LineNr"> 26 </span> copy-to *dest, nrows
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> ncols/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L278'>first-line-length</a> in <span class="muComment"># assume all lines are the same length</span>
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> ncols/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L276'>first-line-length</a> in <span class="muComment"># assume all lines are the same length</span>
<span id="L28" class="LineNr"> 28 </span> dest <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, ncols
<span id="L29" class="LineNr"> 29 </span> copy-to *dest, ncols
<span id="L30" class="LineNr"> 30 </span> <span class="muComment"># fill in data</span>
@ -94,7 +94,7 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">var</span> data/<span class="Constant">eax</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> out, data
<span id="L35" class="LineNr"> 35 </span> populate data, len
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">var</span> data-addr/<span class="Constant">eax</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data
<span id="L37" class="LineNr"> 37 </span> <a href='surface.mu.html#L296'>fill-in</a> data-addr, in
<span id="L37" class="LineNr"> 37 </span> <a href='surface.mu.html#L294'>fill-in</a> data-addr, in
<span id="L38" class="LineNr"> 38 </span> <span class="muComment"># fill in screen-nrows, screen-ncols</span>
<span id="L39" class="LineNr"> 39 </span> <span class="Delimiter">{</span>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
@ -160,318 +160,316 @@ if ('onhashchange' in window) {
<span id="L100" class="LineNr">100 </span><span class="Delimiter">}</span>
<span id="L101" class="LineNr">101 </span>
<span id="L102" class="LineNr">102 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L102'>print-surface-cell-at</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), screen-row: int, screen-col: int <span class="Delimiter">{</span>
<span id="L103" class="LineNr">103 </span>$print-surface-cell-at:body: <span class="Delimiter">{</span>
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> row/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L199'>screen-row-to-surface</a> self, screen-row
<span id="L106" class="LineNr">106 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L229'>screen-col-to-surface</a> self, screen-col
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edi</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> _data-addr/<span class="Constant">eax</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> data-addr/<span class="Constant">edi</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _data-addr
<span id="L110" class="LineNr">110 </span> <span class="PreProc">var</span> idx/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L169'>surface-screen-cell-index</a> self, row, col
<span id="L111" class="LineNr">111 </span> <span class="muComment"># if out of bounds, print ' '</span>
<span id="L112" class="LineNr">112 </span> compare idx, <span class="Constant">0</span>
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">{</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> space/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">edi</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L118" class="LineNr">118 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, space
<span id="L119" class="LineNr">119 </span> <span class="PreProc">break</span> $print-surface-cell-at:body
<span id="L120" class="LineNr">120 </span> <span class="Delimiter">}</span>
<span id="L121" class="LineNr">121 </span> <span class="muComment"># otherwise print the appropriate screen-cell</span>
<span id="L122" class="LineNr">122 </span> <span class="PreProc">var</span> offset/<span class="Constant">ecx</span>: (offset <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> compute-offset data-addr, idx
<span id="L123" class="LineNr">123 </span> <span class="PreProc">var</span> src/<span class="Constant">ecx</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> index data-addr, offset
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">edi</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L126" class="LineNr">126 </span> <a href='surface.mu.html#L131'>print-screen-cell</a> <a href='../../405screen.mu.html#L9'>screen</a>, src
<span id="L127" class="LineNr">127 </span><span class="Delimiter">}</span>
<span id="L128" class="LineNr">128 </span><span class="Delimiter">}</span>
<span id="L129" class="LineNr">129 </span>
<span id="L130" class="LineNr">130 </span><span class="muComment"># print a cell with all its formatting at the cursor location</span>
<span id="L131" class="LineNr">131 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L131'>print-screen-cell</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _cell: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="Delimiter">{</span>
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> cell/<span class="Constant">esi</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _cell
<span id="L133" class="LineNr">133 </span> <a href='../../405screen.mu.html#L491'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> fg/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, color
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> bg/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, background-color
<span id="L136" class="LineNr">136 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, *fg, *bg
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr boolean) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, bold?
<span id="L138" class="LineNr">138 </span> <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> compare *tmp, <span class="Constant">0</span>
<span id="L140" class="LineNr">140 </span> <span class="PreProc">break-if-=</span>
<span id="L141" class="LineNr">141 </span> <a href='../../405screen.mu.html#L526'>start-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L142" class="LineNr">142 </span> <span class="Delimiter">}</span>
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">{</span>
<span id="L144" class="LineNr">144 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, underline?
<span id="L145" class="LineNr">145 </span> compare *tmp, <span class="Constant">0</span>
<span id="L146" class="LineNr">146 </span> <span class="PreProc">break-if-=</span>
<span id="L147" class="LineNr">147 </span> <a href='../../405screen.mu.html#L540'>start-underline</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L148" class="LineNr">148 </span> <span class="Delimiter">}</span>
<span id="L149" class="LineNr">149 </span> <span class="Delimiter">{</span>
<span id="L150" class="LineNr">150 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, reverse?
<span id="L151" class="LineNr">151 </span> compare *tmp, <span class="Constant">0</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-=</span>
<span id="L153" class="LineNr">153 </span> <a href='../../405screen.mu.html#L554'>start-reverse-video</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L154" class="LineNr">154 </span> <span class="Delimiter">}</span>
<span id="L155" class="LineNr">155 </span> <span class="Delimiter">{</span>
<span id="L156" class="LineNr">156 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, blink?
<span id="L157" class="LineNr">157 </span> compare *tmp, <span class="Constant">0</span>
<span id="L158" class="LineNr">158 </span> <span class="PreProc">break-if-=</span>
<span id="L159" class="LineNr">159 </span> <a href='../../405screen.mu.html#L568'>start-blinking</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L160" class="LineNr">160 </span> <span class="Delimiter">}</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: (addr grapheme) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, data
<span id="L162" class="LineNr">162 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, *g
<span id="L163" class="LineNr">163 </span><span class="CommentedCode">#? var g2/eax: grapheme &lt;- copy *g</span>
<span id="L164" class="LineNr">164 </span><span class="CommentedCode">#? var g3/eax: int &lt;- copy g2</span>
<span id="L165" class="LineNr">165 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen g3</span>
<span id="L166" class="LineNr">166 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;\n&quot;</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='surface.mu.html#L169'>surface-screen-cell-index</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), row: int, col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L171" class="LineNr">171 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen row</span>
<span id="L172" class="LineNr">172 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;, &quot;</span>
<span id="L173" class="LineNr">173 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen col</span>
<span id="L174" class="LineNr">174 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;\n&quot;</span>
<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">-1</span>
<span id="L176" class="LineNr">176 </span> <span class="Delimiter">{</span>
<span id="L177" class="LineNr">177 </span> compare row, <span class="Constant">1</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> row/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L197'>screen-row-to-surface</a> self, screen-row
<span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L227'>screen-col-to-surface</a> self, screen-col
<span id="L106" class="LineNr">106 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edi</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> _data-addr/<span class="Constant">eax</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> data-addr/<span class="Constant">edi</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _data-addr
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> idx/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='surface.mu.html#L167'>surface-screen-cell-index</a> self, row, col
<span id="L110" class="LineNr">110 </span> <span class="muComment"># if out of bounds, print ' '</span>
<span id="L111" class="LineNr">111 </span> compare idx, <span class="Constant">0</span>
<span id="L112" class="LineNr">112 </span> <span class="Delimiter">{</span>
<span id="L113" class="LineNr">113 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">var</span> space/<span class="Constant">ecx</span>: grapheme <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">edi</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L117" class="LineNr">117 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, space
<span id="L118" class="LineNr">118 </span> <span class="PreProc">return</span>
<span id="L119" class="LineNr">119 </span> <span class="Delimiter">}</span>
<span id="L120" class="LineNr">120 </span> <span class="muComment"># otherwise print the appropriate screen-cell</span>
<span id="L121" class="LineNr">121 </span> <span class="PreProc">var</span> offset/<span class="Constant">ecx</span>: (offset <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> compute-offset data-addr, idx
<span id="L122" class="LineNr">122 </span> <span class="PreProc">var</span> src/<span class="Constant">ecx</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> index data-addr, offset
<span id="L123" class="LineNr">123 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">edi</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L125" class="LineNr">125 </span> <a href='surface.mu.html#L129'>print-screen-cell</a> <a href='../../405screen.mu.html#L9'>screen</a>, src
<span id="L126" class="LineNr">126 </span><span class="Delimiter">}</span>
<span id="L127" class="LineNr">127 </span>
<span id="L128" class="LineNr">128 </span><span class="muComment"># print a cell with all its formatting at the cursor location</span>
<span id="L129" class="LineNr">129 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L129'>print-screen-cell</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _cell: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="Delimiter">{</span>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> cell/<span class="Constant">esi</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _cell
<span id="L131" class="LineNr">131 </span> <a href='../../405screen.mu.html#L502'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> fg/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, color
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> bg/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, background-color
<span id="L134" class="LineNr">134 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, *fg, *bg
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr boolean) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, bold?
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> compare *tmp, <span class="Constant">0</span>
<span id="L138" class="LineNr">138 </span> <span class="PreProc">break-if-=</span>
<span id="L139" class="LineNr">139 </span> <a href='../../405screen.mu.html#L537'>start-bold</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">}</span>
<span id="L141" class="LineNr">141 </span> <span class="Delimiter">{</span>
<span id="L142" class="LineNr">142 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, underline?
<span id="L143" class="LineNr">143 </span> compare *tmp, <span class="Constant">0</span>
<span id="L144" class="LineNr">144 </span> <span class="PreProc">break-if-=</span>
<span id="L145" class="LineNr">145 </span> <a href='../../405screen.mu.html#L551'>start-underline</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L146" class="LineNr">146 </span> <span class="Delimiter">}</span>
<span id="L147" class="LineNr">147 </span> <span class="Delimiter">{</span>
<span id="L148" class="LineNr">148 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, reverse?
<span id="L149" class="LineNr">149 </span> compare *tmp, <span class="Constant">0</span>
<span id="L150" class="LineNr">150 </span> <span class="PreProc">break-if-=</span>
<span id="L151" class="LineNr">151 </span> <a href='../../405screen.mu.html#L565'>start-reverse-video</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L152" class="LineNr">152 </span> <span class="Delimiter">}</span>
<span id="L153" class="LineNr">153 </span> <span class="Delimiter">{</span>
<span id="L154" class="LineNr">154 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, blink?
<span id="L155" class="LineNr">155 </span> compare *tmp, <span class="Constant">0</span>
<span id="L156" class="LineNr">156 </span> <span class="PreProc">break-if-=</span>
<span id="L157" class="LineNr">157 </span> <a href='../../405screen.mu.html#L579'>start-blinking</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">}</span>
<span id="L159" class="LineNr">159 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: (addr grapheme) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> cell, data
<span id="L160" class="LineNr">160 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, *g
<span id="L161" class="LineNr">161 </span><span class="CommentedCode">#? var g2/eax: grapheme &lt;- copy *g</span>
<span id="L162" class="LineNr">162 </span><span class="CommentedCode">#? var g3/eax: int &lt;- copy g2</span>
<span id="L163" class="LineNr">163 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen g3</span>
<span id="L164" class="LineNr">164 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;\n&quot;</span>
<span id="L165" class="LineNr">165 </span><span class="Delimiter">}</span>
<span id="L166" class="LineNr">166 </span>
<span id="L167" class="LineNr">167 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L167'>surface-screen-cell-index</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), row: int, col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L169" class="LineNr">169 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen row</span>
<span id="L170" class="LineNr">170 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;, &quot;</span>
<span id="L171" class="LineNr">171 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen col</span>
<span id="L172" class="LineNr">172 </span><span class="CommentedCode">#? print-string-to-real-screen &quot;\n&quot;</span>
<span id="L173" class="LineNr">173 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">-1</span>
<span id="L174" class="LineNr">174 </span> <span class="Delimiter">{</span>
<span id="L175" class="LineNr">175 </span> compare row, <span class="Constant">1</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L177" class="LineNr">177 </span> compare col, <span class="Constant">1</span>
<span id="L178" class="LineNr">178 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L179" class="LineNr">179 </span> compare col, <span class="Constant">1</span>
<span id="L180" class="LineNr">180 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">var</span> nrows-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, nrows
<span id="L182" class="LineNr">182 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy *nrows-addr
<span id="L183" class="LineNr">183 </span> compare row, nrows
<span id="L184" class="LineNr">184 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">var</span> ncols-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, ncols
<span id="L186" class="LineNr">186 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy *ncols-addr
<span id="L187" class="LineNr">187 </span> compare col, ncols
<span id="L188" class="LineNr">188 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L189" class="LineNr">189 </span> <span class="CommentedCode">#? print-string-to-real-screen &quot;!\n&quot;</span>
<span id="L190" class="LineNr">190 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> copy row
<span id="L191" class="LineNr">191 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">1</span>
<span id="L192" class="LineNr">192 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> multiply ncols
<span id="L193" class="LineNr">193 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add col
<span id="L194" class="LineNr">194 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">1</span>
<span id="L195" class="LineNr">195 </span> <span class="Delimiter">}</span>
<span id="L196" class="LineNr">196 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L197" class="LineNr">197 </span><span class="Delimiter">}</span>
<span id="L198" class="LineNr">198 </span>
<span id="L199" class="LineNr">199 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L199'>screen-row-to-surface</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), screen-row: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L200" class="LineNr">200 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L201" class="LineNr">201 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy screen-row
<span id="L202" class="LineNr">202 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-row
<span id="L203" class="LineNr">203 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L204" class="LineNr">204 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-row
<span id="L205" class="LineNr">205 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L206" class="LineNr">206 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L207" class="LineNr">207 </span><span class="Delimiter">}</span>
<span id="L208" class="LineNr">208 </span>
<span id="L209" class="LineNr">209 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L209'>max</a></span> _a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L210" class="LineNr">210 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _a
<span id="L211" class="LineNr">211 </span> compare a, b
<span id="L212" class="LineNr">212 </span> <span class="Delimiter">{</span>
<span id="L213" class="LineNr">213 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">return</span> b
<span id="L215" class="LineNr">215 </span> <span class="Delimiter">}</span>
<span id="L216" class="LineNr">216 </span> <span class="PreProc">return</span> a
<span id="L217" class="LineNr">217 </span><span class="Delimiter">}</span>
<span id="L218" class="LineNr">218 </span>
<span id="L219" class="LineNr">219 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L219'>min</a></span> _a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _a
<span id="L221" class="LineNr">221 </span> compare a, b
<span id="L222" class="LineNr">222 </span> <span class="Delimiter">{</span>
<span id="L223" class="LineNr">223 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L224" class="LineNr">224 </span> <span class="PreProc">return</span> a
<span id="L225" class="LineNr">225 </span> <span class="Delimiter">}</span>
<span id="L226" class="LineNr">226 </span> <span class="PreProc">return</span> b
<span id="L227" class="LineNr">227 </span><span class="Delimiter">}</span>
<span id="L228" class="LineNr">228 </span>
<span id="L229" class="LineNr">229 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L229'>screen-col-to-surface</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), screen-col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L231" class="LineNr">231 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy screen-col
<span id="L232" class="LineNr">232 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-col
<span id="L233" class="LineNr">233 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L234" class="LineNr">234 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-col
<span id="L235" class="LineNr">235 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L236" class="LineNr">236 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L237" class="LineNr">237 </span><span class="Delimiter">}</span>
<span id="L238" class="LineNr">238 </span>
<span id="L239" class="LineNr">239 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L239'>surface-row-to-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), row: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L240" class="LineNr">240 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy row
<span id="L242" class="LineNr">242 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-row
<span id="L243" class="LineNr">243 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L244" class="LineNr">244 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-row
<span id="L245" class="LineNr">245 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L246" class="LineNr">246 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L247" class="LineNr">247 </span><span class="Delimiter">}</span>
<span id="L248" class="LineNr">248 </span>
<span id="L249" class="LineNr">249 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L249'>surface-col-to-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L250" class="LineNr">250 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L251" class="LineNr">251 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy col
<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-col
<span id="L253" class="LineNr">253 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L254" class="LineNr">254 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-col
<span id="L255" class="LineNr">255 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L256" class="LineNr">256 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L257" class="LineNr">257 </span><span class="Delimiter">}</span>
<span id="L258" class="LineNr">258 </span>
<span id="L259" class="LineNr">259 </span><span class="muComment"># assumes last line doesn't end in '\n'</span>
<span id="L260" class="LineNr">260 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L260'>num-lines</a></span> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L261" class="LineNr">261 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L263" class="LineNr">263 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L264" class="LineNr">264 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L265" class="LineNr">265 </span> <span class="Delimiter">{</span>
<span id="L266" class="LineNr">266 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L267" class="LineNr">267 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L268" class="LineNr">268 </span> <span class="PreProc">break-if-!=</span>
<span id="L269" class="LineNr">269 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L270" class="LineNr">270 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L271" class="LineNr">271 </span> <span class="PreProc">loop-if-!=</span>
<span id="L272" class="LineNr">272 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment
<span id="L273" class="LineNr">273 </span> <span class="PreProc">loop</span>
<span id="L274" class="LineNr">274 </span> <span class="Delimiter">}</span>
<span id="L275" class="LineNr">275 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L276" class="LineNr">276 </span><span class="Delimiter">}</span>
<span id="L277" class="LineNr">277 </span>
<span id="L278" class="LineNr">278 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L278'>first-line-length</a></span> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L279" class="LineNr">279 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L280" class="LineNr">280 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L281" class="LineNr">281 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L282" class="LineNr">282 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L283" class="LineNr">283 </span> <span class="Delimiter">{</span>
<span id="L284" class="LineNr">284 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L285" class="LineNr">285 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L286" class="LineNr">286 </span> <span class="PreProc">break-if-!=</span>
<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L288" class="LineNr">288 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L289" class="LineNr">289 </span> <span class="PreProc">break-if-=</span>
<span id="L290" class="LineNr">290 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment
<span id="L291" class="LineNr">291 </span> <span class="PreProc">loop</span>
<span id="L292" class="LineNr">292 </span> <span class="Delimiter">}</span>
<span id="L293" class="LineNr">293 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L294" class="LineNr">294 </span><span class="Delimiter">}</span>
<span id="L295" class="LineNr">295 </span>
<span id="L296" class="LineNr">296 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L296'>fill-in</a></span> _out: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>), in: (addr array byte) <span class="Delimiter">{</span>
<span id="L297" class="LineNr">297 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L298" class="LineNr">298 </span> <span class="PreProc">var</span> out/<span class="Constant">edi</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _out
<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L300" class="LineNr">300 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> idx/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L302" class="LineNr">302 </span> <span class="Delimiter">{</span>
<span id="L303" class="LineNr">303 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L304" class="LineNr">304 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L305" class="LineNr">305 </span> <span class="PreProc">break-if-!=</span>
<span id="L306" class="LineNr">306 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L307" class="LineNr">307 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L308" class="LineNr">308 </span> <span class="PreProc">loop-if-=</span>
<span id="L309" class="LineNr">309 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> compute-offset out, idx
<span id="L310" class="LineNr">310 </span> <span class="PreProc">var</span> dest/<span class="Constant">edx</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> index out, offset
<span id="L311" class="LineNr">311 </span> <span class="PreProc">var</span> dest2/<span class="Constant">edx</span>: (addr grapheme) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, data
<span id="L312" class="LineNr">312 </span> copy-to *dest2, g
<span id="L313" class="LineNr">313 </span> idx <span class="SpecialChar">&lt;-</span> increment
<span id="L314" class="LineNr">314 </span> <span class="PreProc">loop</span>
<span id="L315" class="LineNr">315 </span> <span class="Delimiter">}</span>
<span id="L316" class="LineNr">316 </span><span class="Delimiter">}</span>
<span id="L317" class="LineNr">317 </span>
<span id="L318" class="LineNr">318 </span><span class="muComment"># pin (1, 1) to (1, 1) on screen</span>
<span id="L319" class="LineNr">319 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L319'>test-surface-pin-at-origin</a></span> <span class="Delimiter">{</span>
<span id="L320" class="LineNr">320 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L321" class="LineNr">321 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L322" class="LineNr">322 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L323" class="LineNr">323 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L324" class="LineNr">324 </span> <a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L325" class="LineNr">325 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L326" class="LineNr">326 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L327" class="LineNr">327 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L328" class="LineNr">328 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L329" class="LineNr">329 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L330" class="LineNr">330 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L331" class="LineNr">331 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L332" class="LineNr">332 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;mnop&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L333" class="LineNr">333 </span><span class="Delimiter">}</span>
<span id="L334" class="LineNr">334 </span>
<span id="L335" class="LineNr">335 </span><span class="muComment"># pin (1, 1) to (2, 1) on screen; screen goes past edge of the universe</span>
<span id="L336" class="LineNr">336 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L336'>test-surface-pin-2</a></span> <span class="Delimiter">{</span>
<span id="L337" class="LineNr">337 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L339" class="LineNr">339 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L340" class="LineNr">340 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L341" class="LineNr">341 </span> <a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L342" class="LineNr">342 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L343" class="LineNr">343 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">2</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L344" class="LineNr">344 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L345" class="LineNr">345 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L346" class="LineNr">346 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L347" class="LineNr">347 </span> <span class="muComment"># surface edge reached (should seldom happen in the app)</span>
<span id="L348" class="LineNr">348 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L349" class="LineNr">349 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L350" class="LineNr">350 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L351" class="LineNr">351 </span><span class="Delimiter">}</span>
<span id="L352" class="LineNr">352 </span>
<span id="L353" class="LineNr">353 </span><span class="muComment"># pin (2, 1) to (1, 1) on screen</span>
<span id="L354" class="LineNr">354 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L354'>test-surface-pin-3</a></span> <span class="Delimiter">{</span>
<span id="L355" class="LineNr">355 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L356" class="LineNr">356 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L357" class="LineNr">357 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L358" class="LineNr">358 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L359" class="LineNr">359 </span> <a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L360" class="LineNr">360 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">2</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L361" class="LineNr">361 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L362" class="LineNr">362 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L363" class="LineNr">363 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L364" class="LineNr">364 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L365" class="LineNr">365 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L366" class="LineNr">366 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;mnop&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L367" class="LineNr">367 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;stuv&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L368" class="LineNr">368 </span><span class="Delimiter">}</span>
<span id="L369" class="LineNr">369 </span>
<span id="L370" class="LineNr">370 </span><span class="muComment"># pin (1, 1) to (1, 2) on screen; screen goes past edge of the universe</span>
<span id="L371" class="LineNr">371 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L371'>test-surface-pin-4</a></span> <span class="Delimiter">{</span>
<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L374" class="LineNr">374 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L375" class="LineNr">375 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L376" class="LineNr">376 </span> <a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L377" class="LineNr">377 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L378" class="LineNr">378 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">2</span> <span class="muComment"># screen row and column</span>
<span id="L379" class="LineNr">379 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L382" class="LineNr">382 </span> <span class="muComment"># surface edge reached (should seldom happen in the app)</span>
<span id="L383" class="LineNr">383 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; abc&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L384" class="LineNr">384 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; ghi&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L385" class="LineNr">385 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot; mno&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L386" class="LineNr">386 </span><span class="Delimiter">}</span>
<span id="L387" class="LineNr">387 </span>
<span id="L388" class="LineNr">388 </span><span class="muComment"># pin (1, 2) to (1, 1) on screen</span>
<span id="L389" class="LineNr">389 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L389'>test-surface-pin-5</a></span> <span class="Delimiter">{</span>
<span id="L390" class="LineNr">390 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L391" class="LineNr">391 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L392" class="LineNr">392 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L393" class="LineNr">393 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L394" class="LineNr">394 </span> <a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L395" class="LineNr">395 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">2</span> <span class="muComment"># surface row and column</span>
<span id="L396" class="LineNr">396 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L397" class="LineNr">397 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L398" class="LineNr">398 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L399" class="LineNr">399 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L400" class="LineNr">400 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;bcde&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L401" class="LineNr">401 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;hijk&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L402" class="LineNr">402 </span> <a href='../../405screen.mu.html#L612'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;nopq&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L403" class="LineNr">403 </span><span class="Delimiter">}</span>
<span id="L404" class="LineNr">404 </span>
<span id="L405" class="LineNr">405 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L405'>initialize-surface-with-fake-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), nrows: int, ncols: int, in: (addr array byte) <span class="Delimiter">{</span>
<span id="L406" class="LineNr">406 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L407" class="LineNr">407 </span> <span class="muComment"># fill in screen</span>
<span id="L408" class="LineNr">408 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L409" class="LineNr">409 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> screen-ah
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L411" class="LineNr">411 </span> <a href='../../405screen.mu.html#L30'>initialize-screen</a> screen-addr, nrows, ncols
<span id="L412" class="LineNr">412 </span> <span class="muComment"># fill in everything else</span>
<span id="L413" class="LineNr">413 </span> <a href='surface.mu.html#L21'>initialize-surface-with</a> self, in
<span id="L414" class="LineNr">414 </span><span class="Delimiter">}</span>
<span id="L179" class="LineNr">179 </span> <span class="PreProc">var</span> nrows-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, nrows
<span id="L180" class="LineNr">180 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy *nrows-addr
<span id="L181" class="LineNr">181 </span> compare row, nrows
<span id="L182" class="LineNr">182 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L183" class="LineNr">183 </span> <span class="PreProc">var</span> ncols-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, ncols
<span id="L184" class="LineNr">184 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy *ncols-addr
<span id="L185" class="LineNr">185 </span> compare col, ncols
<span id="L186" class="LineNr">186 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L187" class="LineNr">187 </span> <span class="CommentedCode">#? print-string-to-real-screen &quot;!\n&quot;</span>
<span id="L188" class="LineNr">188 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> copy row
<span id="L189" class="LineNr">189 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">1</span>
<span id="L190" class="LineNr">190 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> multiply ncols
<span id="L191" class="LineNr">191 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add col
<span id="L192" class="LineNr">192 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract <span class="Constant">1</span>
<span id="L193" class="LineNr">193 </span> <span class="Delimiter">}</span>
<span id="L194" class="LineNr">194 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L195" class="LineNr">195 </span><span class="Delimiter">}</span>
<span id="L196" class="LineNr">196 </span>
<span id="L197" class="LineNr">197 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L197'>screen-row-to-surface</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), screen-row: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L198" class="LineNr">198 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L199" class="LineNr">199 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy screen-row
<span id="L200" class="LineNr">200 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-row
<span id="L201" class="LineNr">201 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L202" class="LineNr">202 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-row
<span id="L203" class="LineNr">203 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L204" class="LineNr">204 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L205" class="LineNr">205 </span><span class="Delimiter">}</span>
<span id="L206" class="LineNr">206 </span>
<span id="L207" class="LineNr">207 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L207'>max</a></span> _a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _a
<span id="L209" class="LineNr">209 </span> compare a, b
<span id="L210" class="LineNr">210 </span> <span class="Delimiter">{</span>
<span id="L211" class="LineNr">211 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L212" class="LineNr">212 </span> <span class="PreProc">return</span> b
<span id="L213" class="LineNr">213 </span> <span class="Delimiter">}</span>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">return</span> a
<span id="L215" class="LineNr">215 </span><span class="Delimiter">}</span>
<span id="L216" class="LineNr">216 </span>
<span id="L217" class="LineNr">217 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L217'>min</a></span> _a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy _a
<span id="L219" class="LineNr">219 </span> compare a, b
<span id="L220" class="LineNr">220 </span> <span class="Delimiter">{</span>
<span id="L221" class="LineNr">221 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L222" class="LineNr">222 </span> <span class="PreProc">return</span> a
<span id="L223" class="LineNr">223 </span> <span class="Delimiter">}</span>
<span id="L224" class="LineNr">224 </span> <span class="PreProc">return</span> b
<span id="L225" class="LineNr">225 </span><span class="Delimiter">}</span>
<span id="L226" class="LineNr">226 </span>
<span id="L227" class="LineNr">227 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L227'>screen-col-to-surface</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), screen-col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L228" class="LineNr">228 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy screen-col
<span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-col
<span id="L231" class="LineNr">231 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L232" class="LineNr">232 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-col
<span id="L233" class="LineNr">233 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L234" class="LineNr">234 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L235" class="LineNr">235 </span><span class="Delimiter">}</span>
<span id="L236" class="LineNr">236 </span>
<span id="L237" class="LineNr">237 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L237'>surface-row-to-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), row: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L238" class="LineNr">238 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L239" class="LineNr">239 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy row
<span id="L240" class="LineNr">240 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-row
<span id="L241" class="LineNr">241 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L242" class="LineNr">242 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-row
<span id="L243" class="LineNr">243 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L244" class="LineNr">244 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L245" class="LineNr">245 </span><span class="Delimiter">}</span>
<span id="L246" class="LineNr">246 </span>
<span id="L247" class="LineNr">247 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L247'>surface-col-to-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), col: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L249" class="LineNr">249 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy col
<span id="L250" class="LineNr">250 </span> <span class="PreProc">var</span> tmp/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-screen-col
<span id="L251" class="LineNr">251 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add *tmp
<span id="L252" class="LineNr">252 </span> tmp <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, pin-col
<span id="L253" class="LineNr">253 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> subtract *tmp
<span id="L254" class="LineNr">254 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L255" class="LineNr">255 </span><span class="Delimiter">}</span>
<span id="L256" class="LineNr">256 </span>
<span id="L257" class="LineNr">257 </span><span class="muComment"># assumes last line doesn't end in '\n'</span>
<span id="L258" class="LineNr">258 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L258'>num-lines</a></span> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">ecx</span>: int <span class="Delimiter">{</span>
<span id="L259" class="LineNr">259 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L260" class="LineNr">260 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L261" class="LineNr">261 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L263" class="LineNr">263 </span> <span class="Delimiter">{</span>
<span id="L264" class="LineNr">264 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L265" class="LineNr">265 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L266" class="LineNr">266 </span> <span class="PreProc">break-if-!=</span>
<span id="L267" class="LineNr">267 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L268" class="LineNr">268 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L269" class="LineNr">269 </span> <span class="PreProc">loop-if-!=</span>
<span id="L270" class="LineNr">270 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment
<span id="L271" class="LineNr">271 </span> <span class="PreProc">loop</span>
<span id="L272" class="LineNr">272 </span> <span class="Delimiter">}</span>
<span id="L273" class="LineNr">273 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L274" class="LineNr">274 </span><span class="Delimiter">}</span>
<span id="L275" class="LineNr">275 </span>
<span id="L276" class="LineNr">276 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L276'>first-line-length</a></span> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/<span class="Constant">edx</span>: int <span class="Delimiter">{</span>
<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L278" class="LineNr">278 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L279" class="LineNr">279 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L280" class="LineNr">280 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L281" class="LineNr">281 </span> <span class="Delimiter">{</span>
<span id="L282" class="LineNr">282 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L283" class="LineNr">283 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L284" class="LineNr">284 </span> <span class="PreProc">break-if-!=</span>
<span id="L285" class="LineNr">285 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L286" class="LineNr">286 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L287" class="LineNr">287 </span> <span class="PreProc">break-if-=</span>
<span id="L288" class="LineNr">288 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment
<span id="L289" class="LineNr">289 </span> <span class="PreProc">loop</span>
<span id="L290" class="LineNr">290 </span> <span class="Delimiter">}</span>
<span id="L291" class="LineNr">291 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L292" class="LineNr">292 </span><span class="Delimiter">}</span>
<span id="L293" class="LineNr">293 </span>
<span id="L294" class="LineNr">294 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L294'>fill-in</a></span> _out: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>), in: (addr array byte) <span class="Delimiter">{</span>
<span id="L295" class="LineNr">295 </span> <span class="PreProc">var</span> s: (stream byte <span class="Constant">0x100</span>)
<span id="L296" class="LineNr">296 </span> <span class="PreProc">var</span> out/<span class="Constant">edi</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> copy _out
<span id="L297" class="LineNr">297 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr stream byte) <span class="SpecialChar">&lt;-</span> address s
<span id="L298" class="LineNr">298 </span> <a href='../../108write.subx.html#L24'>write</a> s-addr, in
<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> idx/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L300" class="LineNr">300 </span> <span class="Delimiter">{</span>
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='../../309stream.subx.html#L6'>stream-empty?</a> s-addr
<span id="L302" class="LineNr">302 </span> compare done?, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L303" class="LineNr">303 </span> <span class="PreProc">break-if-!=</span>
<span id="L304" class="LineNr">304 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../403unicode.mu.html#L158'>read-grapheme</a> s-addr
<span id="L305" class="LineNr">305 </span> compare g, <span class="Constant">0xa</span> <span class="muComment"># newline</span>
<span id="L306" class="LineNr">306 </span> <span class="PreProc">loop-if-=</span>
<span id="L307" class="LineNr">307 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> compute-offset out, idx
<span id="L308" class="LineNr">308 </span> <span class="PreProc">var</span> dest/<span class="Constant">edx</span>: (addr <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> index out, offset
<span id="L309" class="LineNr">309 </span> <span class="PreProc">var</span> dest2/<span class="Constant">edx</span>: (addr grapheme) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, data
<span id="L310" class="LineNr">310 </span> copy-to *dest2, g
<span id="L311" class="LineNr">311 </span> idx <span class="SpecialChar">&lt;-</span> increment
<span id="L312" class="LineNr">312 </span> <span class="PreProc">loop</span>
<span id="L313" class="LineNr">313 </span> <span class="Delimiter">}</span>
<span id="L314" class="LineNr">314 </span><span class="Delimiter">}</span>
<span id="L315" class="LineNr">315 </span>
<span id="L316" class="LineNr">316 </span><span class="muComment"># pin (1, 1) to (1, 1) on screen</span>
<span id="L317" class="LineNr">317 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L317'>test-surface-pin-at-origin</a></span> <span class="Delimiter">{</span>
<span id="L318" class="LineNr">318 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L319" class="LineNr">319 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L320" class="LineNr">320 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L321" class="LineNr">321 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L322" class="LineNr">322 </span> <a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L323" class="LineNr">323 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L324" class="LineNr">324 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L325" class="LineNr">325 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L326" class="LineNr">326 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L327" class="LineNr">327 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L328" class="LineNr">328 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L329" class="LineNr">329 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L330" class="LineNr">330 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;mnop&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-at-origin&quot;</span>
<span id="L331" class="LineNr">331 </span><span class="Delimiter">}</span>
<span id="L332" class="LineNr">332 </span>
<span id="L333" class="LineNr">333 </span><span class="muComment"># pin (1, 1) to (2, 1) on screen; screen goes past edge of the universe</span>
<span id="L334" class="LineNr">334 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L334'>test-surface-pin-2</a></span> <span class="Delimiter">{</span>
<span id="L335" class="LineNr">335 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L336" class="LineNr">336 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L337" class="LineNr">337 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L338" class="LineNr">338 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L339" class="LineNr">339 </span> <a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L340" class="LineNr">340 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L341" class="LineNr">341 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">2</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L342" class="LineNr">342 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L343" class="LineNr">343 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L344" class="LineNr">344 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L345" class="LineNr">345 </span> <span class="muComment"># surface edge reached (should seldom happen in the app)</span>
<span id="L346" class="LineNr">346 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L347" class="LineNr">347 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;abcd&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L348" class="LineNr">348 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-2&quot;</span>
<span id="L349" class="LineNr">349 </span><span class="Delimiter">}</span>
<span id="L350" class="LineNr">350 </span>
<span id="L351" class="LineNr">351 </span><span class="muComment"># pin (2, 1) to (1, 1) on screen</span>
<span id="L352" class="LineNr">352 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L352'>test-surface-pin-3</a></span> <span class="Delimiter">{</span>
<span id="L353" class="LineNr">353 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L354" class="LineNr">354 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L355" class="LineNr">355 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L356" class="LineNr">356 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L357" class="LineNr">357 </span> <a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L358" class="LineNr">358 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">2</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L359" class="LineNr">359 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L360" class="LineNr">360 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L361" class="LineNr">361 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L362" class="LineNr">362 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L363" class="LineNr">363 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;ghij&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L364" class="LineNr">364 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;mnop&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L365" class="LineNr">365 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;stuv&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-3&quot;</span>
<span id="L366" class="LineNr">366 </span><span class="Delimiter">}</span>
<span id="L367" class="LineNr">367 </span>
<span id="L368" class="LineNr">368 </span><span class="muComment"># pin (1, 1) to (1, 2) on screen; screen goes past edge of the universe</span>
<span id="L369" class="LineNr">369 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L369'>test-surface-pin-4</a></span> <span class="Delimiter">{</span>
<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L371" class="LineNr">371 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L372" class="LineNr">372 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L373" class="LineNr">373 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L374" class="LineNr">374 </span> <a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L375" class="LineNr">375 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># surface row and column</span>
<span id="L376" class="LineNr">376 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">2</span> <span class="muComment"># screen row and column</span>
<span id="L377" class="LineNr">377 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L378" class="LineNr">378 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L379" class="LineNr">379 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L380" class="LineNr">380 </span> <span class="muComment"># surface edge reached (should seldom happen in the app)</span>
<span id="L381" class="LineNr">381 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot; abc&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L382" class="LineNr">382 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot; ghi&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L383" class="LineNr">383 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot; mno&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-4&quot;</span>
<span id="L384" class="LineNr">384 </span><span class="Delimiter">}</span>
<span id="L385" class="LineNr">385 </span>
<span id="L386" class="LineNr">386 </span><span class="muComment"># pin (1, 2) to (1, 1) on screen</span>
<span id="L387" class="LineNr">387 </span><span class="PreProc">fn</span> <span class="muTest"><a href='surface.mu.html#L387'>test-surface-pin-5</a></span> <span class="Delimiter">{</span>
<span id="L388" class="LineNr">388 </span> <span class="PreProc">var</span> s: <a href='surface.mu.html#L7'>surface</a>
<span id="L389" class="LineNr">389 </span> <span class="PreProc">var</span> s-addr/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> address s
<span id="L390" class="LineNr">390 </span> <span class="muComment"># surface contents are a fixed grid with 8 rows and 6 columns</span>
<span id="L391" class="LineNr">391 </span> <span class="muComment"># (strip vowels second time around to break vertical alignment of letters)</span>
<span id="L392" class="LineNr">392 </span> <a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a> s-addr, <span class="Constant">3</span>, <span class="Constant">4</span>, <span class="Constant">&quot;abcdef\nghijkl\nmnopqr\nstuvwx\nyzabcd\nfghjkl\nmnpqrs\ntvwxyz&quot;</span>
<span id="L393" class="LineNr">393 </span> <a href='surface.mu.html#L53'>pin-surface-at</a> s-addr, <span class="Constant">1</span>, <span class="Constant">2</span> <span class="muComment"># surface row and column</span>
<span id="L394" class="LineNr">394 </span> <a href='surface.mu.html#L63'>pin-surface-to</a> s-addr, <span class="Constant">1</span>, <span class="Constant">1</span> <span class="muComment"># screen row and column</span>
<span id="L395" class="LineNr">395 </span> <a href='surface.mu.html#L73'>render-surface</a> s-addr
<span id="L396" class="LineNr">396 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> s-addr, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L397" class="LineNr">397 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L398" class="LineNr">398 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">1</span>, <span class="Constant">&quot;bcde&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L399" class="LineNr">399 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">2</span>, <span class="Constant">&quot;hijk&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L400" class="LineNr">400 </span> <a href='../../405screen.mu.html#L623'>check-screen-row</a> screen-addr, <span class="Constant">3</span>, <span class="Constant">&quot;nopq&quot;</span>, <span class="Constant">&quot;F - test-surface-pin-5&quot;</span>
<span id="L401" class="LineNr">401 </span><span class="Delimiter">}</span>
<span id="L402" class="LineNr">402 </span>
<span id="L403" class="LineNr">403 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='surface.mu.html#L403'>initialize-surface-with-fake-screen</a></span> _self: (addr <a href='surface.mu.html#L7'>surface</a>), nrows: int, ncols: int, in: (addr array byte) <span class="Delimiter">{</span>
<span id="L404" class="LineNr">404 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='surface.mu.html#L7'>surface</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L405" class="LineNr">405 </span> <span class="muComment"># fill in screen</span>
<span id="L406" class="LineNr">406 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L407" class="LineNr">407 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> screen-ah
<span id="L408" class="LineNr">408 </span> <span class="PreProc">var</span> screen-addr/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L409" class="LineNr">409 </span> <a href='../../405screen.mu.html#L30'>initialize-screen</a> screen-addr, nrows, ncols
<span id="L410" class="LineNr">410 </span> <span class="muComment"># fill in everything else</span>
<span id="L411" class="LineNr">411 </span> <a href='surface.mu.html#L21'>initialize-surface-with</a> self, in
<span id="L412" class="LineNr">412 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

View File

@ -99,7 +99,7 @@ if ('onhashchange' in window) {
<span id="L40" class="LineNr"> 40 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> dest-val-ah
<span id="L41" class="LineNr"> 41 </span> <span class="PreProc">var</span> dest-val/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-val-ah
<span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? print-string 0, &quot;deep copy value {\n&quot;</span>
<span id="L43" class="LineNr"> 43 </span> <a href='value.mu.html#L336'>deep-copy-value</a> src-val, dest-val
<span id="L43" class="LineNr"> 43 </span> <a href='value.mu.html#L338'>deep-copy-value</a> src-val, dest-val
<span id="L44" class="LineNr"> 44 </span><span class="CommentedCode">#? print-string 0, &quot;}\n&quot;</span>
<span id="L45" class="LineNr"> 45 </span> <span class="Delimiter">}</span>
<span id="L46" class="LineNr"> 46 </span> i <span class="SpecialChar">&lt;-</span> increment
@ -142,15 +142,15 @@ if ('onhashchange' in window) {
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L84" class="LineNr"> 84 </span><span class="Delimiter">}</span>
<span id="L85" class="LineNr"> 85 </span>
<span id="L86" class="LineNr"> 86 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='table.mu.html#L86'>make-int-binding</a></span> _self: (addr <a href='data.mu.html#L52'>bind</a>), key: (addr handle array byte), _val: int <span class="Delimiter">{</span>
<span id="L86" class="LineNr"> 86 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='table.mu.html#L86'>make-number-binding</a></span> _self: (addr <a href='data.mu.html#L52'>bind</a>), key: (addr handle array byte), _val: float <span class="Delimiter">{</span>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L52'>bind</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> dest/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, key
<span id="L89" class="LineNr"> 89 </span> copy-object key, dest
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> dest2/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='data.mu.html#L37'>value</a>
<span id="L91" class="LineNr"> 91 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> dest2
<span id="L92" class="LineNr"> 92 </span> <span class="PreProc">var</span> dest3/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest2
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">var</span> dest4/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest3, int-data
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> val/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _val
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">var</span> dest4/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest3, number-data
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> val/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> copy _val
<span id="L95" class="LineNr"> 95 </span> copy-to *dest4, val
<span id="L96" class="LineNr"> 96 </span><span class="Delimiter">}</span>
<span id="L97" class="LineNr"> 97 </span>

View File

@ -78,7 +78,7 @@ if ('onhashchange' in window) {
<span id="L19" class="LineNr"> 19 </span> copy-to *top, <span class="Constant">0</span>
<span id="L20" class="LineNr"> 20 </span><span class="Delimiter">}</span>
<span id="L21" class="LineNr"> 21 </span>
<span id="L22" class="LineNr"> 22 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L22'>push-int-to-value-stack</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>), _val: int <span class="Delimiter">{</span>
<span id="L22" class="LineNr"> 22 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L22'>push-number-to-value-stack</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>), _val: float <span class="Delimiter">{</span>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
@ -86,13 +86,13 @@ if ('onhashchange' in window) {
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy *top-addr
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> dest-offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset data, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">var</span> dest-addr/<span class="Constant">edx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index data, dest-offset
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> dest-addr2/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-addr, int-data
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> val/<span class="Constant">esi</span>: int <span class="SpecialChar">&lt;-</span> copy _val
<span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">#? print-int32-hex-to-real-screen val</span>
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> dest-addr2/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-addr, number-data
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> val/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> copy _val
<span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">#? print-float-decimal-approximate 0, val, 3</span>
<span id="L33" class="LineNr"> 33 </span> copy-to *dest-addr2, val
<span id="L34" class="LineNr"> 34 </span> increment *top-addr
<span id="L35" class="LineNr"> 35 </span> dest-addr2 <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-addr, <span class="PreProc">type</span>
<span id="L36" class="LineNr"> 36 </span> copy-to *dest-addr2, <span class="Constant">0</span> <span class="muComment"># int</span>
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> type-addr/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-addr, <span class="PreProc">type</span>
<span id="L36" class="LineNr"> 36 </span> copy-to *type-addr, <span class="Constant">0</span> <span class="muComment"># number</span>
<span id="L37" class="LineNr"> 37 </span><span class="Delimiter">}</span>
<span id="L38" class="LineNr"> 38 </span>
<span id="L39" class="LineNr"> 39 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L39'>push-string-to-value-stack</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>), val: (handle array byte) <span class="Delimiter">{</span>
@ -144,92 +144,94 @@ if ('onhashchange' in window) {
<span id="L85" class="LineNr"> 85 </span> increment *top-addr
<span id="L86" class="LineNr"> 86 </span><span class="Delimiter">}</span>
<span id="L87" class="LineNr"> 87 </span>
<span id="L88" class="LineNr"> 88 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L88'>pop-int-from-value-stack</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L88" class="LineNr"> 88 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L88'>pop-number-from-value-stack</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">xmm0</span>: float <span class="Delimiter">{</span>
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">{</span>
<span id="L92" class="LineNr"> 92 </span> compare *top-addr, <span class="Constant">0</span>
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">return</span> <span class="Constant">-1</span>
<span id="L95" class="LineNr"> 95 </span> <span class="Delimiter">}</span>
<span id="L96" class="LineNr"> 96 </span> decrement *top-addr
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">var</span> data/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy *top-addr
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> dest-offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset data, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> result-addr/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index data, dest-offset
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> result-addr2/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> result-addr, int-data
<span id="L103" class="LineNr">103 </span> <span class="PreProc">return</span> *result-addr2
<span id="L104" class="LineNr">104 </span><span class="Delimiter">}</span>
<span id="L105" class="LineNr">105 </span>
<span id="L106" class="LineNr">106 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L106'>value-stack-empty?</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: boolean <span class="Delimiter">{</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L109" class="LineNr">109 </span> compare *top, <span class="Constant">0</span>
<span id="L110" class="LineNr">110 </span> <span class="Delimiter">{</span>
<span id="L111" class="LineNr">111 </span> <span class="PreProc">break-if-!=</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">return</span> <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L115" class="LineNr">115 </span><span class="Delimiter">}</span>
<span id="L116" class="LineNr">116 </span>
<span id="L117" class="LineNr">117 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L117'>value-stack-length</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L119" class="LineNr">119 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">return</span> *top-addr
<span id="L121" class="LineNr">121 </span><span class="Delimiter">}</span>
<span id="L122" class="LineNr">122 </span>
<span id="L123" class="LineNr">123 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L123'>value-stack-max-width</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edi</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> _data/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> data/<span class="Constant">edi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _data
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> i/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>: int
<span id="L131" class="LineNr">131 </span> <span class="Delimiter">{</span>
<span id="L132" class="LineNr">132 </span> compare i, *top-addr
<span id="L133" class="LineNr">133 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> o/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset data, i
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> v/<span class="Constant">edx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index data, o
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L216'>value-width</a> v, <span class="Constant">1</span> <span class="muComment"># top-level=true</span>
<span id="L137" class="LineNr">137 </span> <span class="muComment"># if (w &gt; result) w = result</span>
<span id="L138" class="LineNr">138 </span> <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> compare w, <a href='data.mu.html#L70'>result</a>
<span id="L140" class="LineNr">140 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L141" class="LineNr">141 </span> copy-to <a href='data.mu.html#L70'>result</a>, w
<span id="L142" class="LineNr">142 </span> <span class="Delimiter">}</span>
<span id="L143" class="LineNr">143 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L144" class="LineNr">144 </span> <span class="PreProc">loop</span>
<span id="L145" class="LineNr">145 </span> <span class="Delimiter">}</span>
<span id="L146" class="LineNr">146 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L147" class="LineNr">147 </span><span class="Delimiter">}</span>
<span id="L148" class="LineNr">148 </span>
<span id="L149" class="LineNr">149 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L149'>save-lines</a></span> in-h: (handle array (handle array byte)), _out-ah: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span>
<span id="L150" class="LineNr">150 </span> <span class="PreProc">var</span> _in/<span class="Constant">eax</span>: (addr array (handle array byte)) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> in-h
<span id="L151" class="LineNr">151 </span> <span class="PreProc">var</span> in/<span class="Constant">esi</span>: (addr array (handle array byte)) <span class="SpecialChar">&lt;-</span> copy _in
<span id="L152" class="LineNr">152 </span> <span class="PreProc">var</span> len/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length in
<span id="L153" class="LineNr">153 </span> <span class="PreProc">var</span> out-ah/<span class="Constant">edi</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _out-ah
<span id="L154" class="LineNr">154 </span> populate out-ah, len
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> out/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *out-ah
<span id="L156" class="LineNr">156 </span> <span class="muComment"># copy in into out</span>
<span id="L157" class="LineNr">157 </span> <span class="PreProc">var</span> i/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">{</span>
<span id="L159" class="LineNr">159 </span> compare i, len
<span id="L160" class="LineNr">160 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L161" class="LineNr">161 </span><span class="CommentedCode">#? print-int32-hex 0, i</span>
<span id="L162" class="LineNr">162 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L163" class="LineNr">163 </span> <span class="PreProc">var</span> src/<span class="Constant">ecx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> index in, i
<span id="L164" class="LineNr">164 </span> <span class="PreProc">var</span> dest-offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset out, i
<span id="L165" class="LineNr">165 </span> <span class="PreProc">var</span> dest-val/<span class="Constant">edx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index out, dest-offset
<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> dest/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-val, text-data
<span id="L167" class="LineNr">167 </span> copy-object src, dest
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">edx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-val, <span class="PreProc">type</span>
<span id="L169" class="LineNr">169 </span> copy-to *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L170" class="LineNr">170 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L171" class="LineNr">171 </span> <span class="PreProc">loop</span>
<span id="L172" class="LineNr">172 </span> <span class="Delimiter">}</span>
<span id="L173" class="LineNr">173 </span><span class="Delimiter">}</span>
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> minus-one/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">-1</span>
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">var</span> minus-one-f/<span class="Constant">xmm0</span>: float <span class="SpecialChar">&lt;-</span> convert minus-one
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">return</span> minus-one-f
<span id="L97" class="LineNr"> 97 </span> <span class="Delimiter">}</span>
<span id="L98" class="LineNr"> 98 </span> decrement *top-addr
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> data/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy *top-addr
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> dest-offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset data, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> result-addr/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index data, dest-offset
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> result-addr2/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> result-addr, number-data
<span id="L105" class="LineNr">105 </span> <span class="PreProc">return</span> *result-addr2
<span id="L106" class="LineNr">106 </span><span class="Delimiter">}</span>
<span id="L107" class="LineNr">107 </span>
<span id="L108" class="LineNr">108 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L108'>value-stack-empty?</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: boolean <span class="Delimiter">{</span>
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L110" class="LineNr">110 </span> <span class="PreProc">var</span> <a href='../../203stack.subx.html#L338'>top</a>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L111" class="LineNr">111 </span> compare *top, <span class="Constant">0</span>
<span id="L112" class="LineNr">112 </span> <span class="Delimiter">{</span>
<span id="L113" class="LineNr">113 </span> <span class="PreProc">break-if-!=</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">return</span> <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L117" class="LineNr">117 </span><span class="Delimiter">}</span>
<span id="L118" class="LineNr">118 </span>
<span id="L119" class="LineNr">119 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L119'>value-stack-length</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L121" class="LineNr">121 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L122" class="LineNr">122 </span> <span class="PreProc">return</span> *top-addr
<span id="L123" class="LineNr">123 </span><span class="Delimiter">}</span>
<span id="L124" class="LineNr">124 </span>
<span id="L125" class="LineNr">125 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L125'>value-stack-max-width</a></span> _self: (addr <a href='value-stack.mu.html#L3'>value-stack</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> self/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _self
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> data-ah/<span class="Constant">edi</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, data
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> _data/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *data-ah
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> data/<span class="Constant">edi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _data
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> top-addr/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> self, <a href='../../203stack.subx.html#L338'>top</a>
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> i/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>: int
<span id="L133" class="LineNr">133 </span> <span class="Delimiter">{</span>
<span id="L134" class="LineNr">134 </span> compare i, *top-addr
<span id="L135" class="LineNr">135 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> o/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset data, i
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> v/<span class="Constant">edx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index data, o
<span id="L138" class="LineNr">138 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L218'>value-width</a> v, <span class="Constant">1</span> <span class="muComment"># top-level=true</span>
<span id="L139" class="LineNr">139 </span> <span class="muComment"># if (w &gt; result) w = result</span>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">{</span>
<span id="L141" class="LineNr">141 </span> compare w, <a href='data.mu.html#L70'>result</a>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L143" class="LineNr">143 </span> copy-to <a href='data.mu.html#L70'>result</a>, w
<span id="L144" class="LineNr">144 </span> <span class="Delimiter">}</span>
<span id="L145" class="LineNr">145 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L146" class="LineNr">146 </span> <span class="PreProc">loop</span>
<span id="L147" class="LineNr">147 </span> <span class="Delimiter">}</span>
<span id="L148" class="LineNr">148 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L149" class="LineNr">149 </span><span class="Delimiter">}</span>
<span id="L150" class="LineNr">150 </span>
<span id="L151" class="LineNr">151 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value-stack.mu.html#L151'>save-lines</a></span> in-h: (handle array (handle array byte)), _out-ah: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">var</span> _in/<span class="Constant">eax</span>: (addr array (handle array byte)) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> in-h
<span id="L153" class="LineNr">153 </span> <span class="PreProc">var</span> in/<span class="Constant">esi</span>: (addr array (handle array byte)) <span class="SpecialChar">&lt;-</span> copy _in
<span id="L154" class="LineNr">154 </span> <span class="PreProc">var</span> len/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length in
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> out-ah/<span class="Constant">edi</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _out-ah
<span id="L156" class="LineNr">156 </span> populate out-ah, len
<span id="L157" class="LineNr">157 </span> <span class="PreProc">var</span> out/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *out-ah
<span id="L158" class="LineNr">158 </span> <span class="muComment"># copy in into out</span>
<span id="L159" class="LineNr">159 </span> <span class="PreProc">var</span> i/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L160" class="LineNr">160 </span> <span class="Delimiter">{</span>
<span id="L161" class="LineNr">161 </span> compare i, len
<span id="L162" class="LineNr">162 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L163" class="LineNr">163 </span><span class="CommentedCode">#? print-int32-hex 0, i</span>
<span id="L164" class="LineNr">164 </span><span class="CommentedCode">#? print-string 0, &quot;\n&quot;</span>
<span id="L165" class="LineNr">165 </span> <span class="PreProc">var</span> src/<span class="Constant">ecx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> index in, i
<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> dest-offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset out, i
<span id="L167" class="LineNr">167 </span> <span class="PreProc">var</span> dest-val/<span class="Constant">edx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index out, dest-offset
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> dest/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-val, text-data
<span id="L169" class="LineNr">169 </span> copy-object src, dest
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">edx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-val, <span class="PreProc">type</span>
<span id="L171" class="LineNr">171 </span> copy-to *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L172" class="LineNr">172 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L173" class="LineNr">173 </span> <span class="PreProc">loop</span>
<span id="L174" class="LineNr">174 </span> <span class="Delimiter">}</span>
<span id="L175" class="LineNr">175 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

View File

@ -75,7 +75,7 @@ if ('onhashchange' in window) {
<span id="L16" class="LineNr"> 16 </span> <a href='../../411string.mu.html#L2'>substring</a> val-string, <span class="Constant">0</span>, <span class="Constant">0xc</span>, truncated-ah
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">var</span> truncated-string/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *truncated-ah
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> len/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> length truncated-string
<span id="L19" class="LineNr"> 19 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xf2</span>, <span class="Constant">7</span>
<span id="L19" class="LineNr"> 19 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xf2</span>, <span class="Constant">7</span>
<span id="L20" class="LineNr"> 20 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x275d</span> <span class="muComment"># open-quote</span>
<span id="L21" class="LineNr"> 21 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, truncated-string
<span id="L22" class="LineNr"> 22 </span> compare len, orig-len
@ -84,7 +84,7 @@ if ('onhashchange' in window) {
<span id="L25" class="LineNr"> 25 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2026</span> <span class="muComment"># ellipses</span>
<span id="L26" class="LineNr"> 26 </span> <span class="Delimiter">}</span>
<span id="L27" class="LineNr"> 27 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x275e</span> <span class="muComment"># close-quote</span>
<span id="L28" class="LineNr"> 28 </span> <a href='../../405screen.mu.html#L491'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L28" class="LineNr"> 28 </span> <a href='../../405screen.mu.html#L502'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">return</span>
<span id="L30" class="LineNr"> 30 </span> <span class="Delimiter">}</span>
<span id="L31" class="LineNr"> 31 </span> compare *val-type, <span class="Constant">2</span> <span class="muComment"># array</span>
@ -100,7 +100,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr"> 41 </span> <span class="PreProc">break-if-!=</span>
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">var</span> val-ah/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> val, file-data
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">var</span> val-file/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *val-ah
<span id="L44" class="LineNr"> 44 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">7</span>
<span id="L44" class="LineNr"> 44 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">7</span>
<span id="L45" class="LineNr"> 45 </span> <span class="muComment"># TODO</span>
<span id="L46" class="LineNr"> 46 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">&quot; FILE &quot;</span>
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">return</span>
@ -116,54 +116,54 @@ if ('onhashchange' in window) {
<span id="L57" class="LineNr"> 57 </span> <span class="PreProc">return</span>
<span id="L58" class="LineNr"> 58 </span> <span class="Delimiter">}</span>
<span id="L59" class="LineNr"> 59 </span> <span class="muComment"># render ints by default for now</span>
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">var</span> val-int/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> val, int-data
<span id="L61" class="LineNr"> 61 </span> <a href='value.mu.html#L65'>render-integer</a> <a href='../../405screen.mu.html#L9'>screen</a>, *val-int, max-width
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">var</span> val-num/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> val, number-data
<span id="L61" class="LineNr"> 61 </span> <a href='value.mu.html#L66'>render-number</a> <a href='../../405screen.mu.html#L9'>screen</a>, *val-num, max-width
<span id="L62" class="LineNr"> 62 </span><span class="Delimiter">}</span>
<span id="L63" class="LineNr"> 63 </span>
<span id="L64" class="LineNr"> 64 </span><span class="muComment"># synaesthesia</span>
<span id="L65" class="LineNr"> 65 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L65'>render-integer</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), val: int, max-width: int <span class="Delimiter">{</span>
<span id="L66" class="LineNr"> 66 </span>$render-integer:body: <span class="Delimiter">{</span>
<span id="L65" class="LineNr"> 65 </span><span class="muComment"># TODO: right-justify</span>
<span id="L66" class="LineNr"> 66 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L66'>render-number</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), val: float, max-width: int <span class="Delimiter">{</span>
<span id="L67" class="LineNr"> 67 </span> <span class="muComment"># if max-width is 0, we're inside an array. No coloring.</span>
<span id="L68" class="LineNr"> 68 </span> compare max-width, <span class="Constant">0</span>
<span id="L69" class="LineNr"> 69 </span> <span class="Delimiter">{</span>
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">break-if-!=</span>
<span id="L71" class="LineNr"> 71 </span> <a href='../../405screen.mu.html#L480'>print-int32-decimal</a> <a href='../../405screen.mu.html#L9'>screen</a>, val
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">break</span> $render-integer:body
<span id="L71" class="LineNr"> 71 </span> <a href='../../412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='../../405screen.mu.html#L9'>screen</a>, val, <span class="Constant">3</span>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">return</span>
<span id="L73" class="LineNr"> 73 </span> <span class="Delimiter">}</span>
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">var</span> bg/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L159'>hash-color</a> val
<span id="L75" class="LineNr"> 75 </span> <span class="PreProc">var</span> fg/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">7</span>
<span id="L76" class="LineNr"> 76 </span> <span class="Delimiter">{</span>
<span id="L77" class="LineNr"> 77 </span> compare bg, <span class="Constant">2</span>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">break-if-!=</span>
<span id="L79" class="LineNr"> 79 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L80" class="LineNr"> 80 </span> <span class="Delimiter">}</span>
<span id="L81" class="LineNr"> 81 </span> <span class="Delimiter">{</span>
<span id="L82" class="LineNr"> 82 </span> compare bg, <span class="Constant">3</span>
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">break-if-!=</span>
<span id="L84" class="LineNr"> 84 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L85" class="LineNr"> 85 </span> <span class="Delimiter">}</span>
<span id="L86" class="LineNr"> 86 </span> <span class="Delimiter">{</span>
<span id="L87" class="LineNr"> 87 </span> compare bg, <span class="Constant">6</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">break-if-!=</span>
<span id="L89" class="LineNr"> 89 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L90" class="LineNr"> 90 </span> <span class="Delimiter">}</span>
<span id="L91" class="LineNr"> 91 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, fg, bg
<span id="L92" class="LineNr"> 92 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L93" class="LineNr"> 93 </span> <a href='../../407print-int32-decimal-right-justified.mu.html#L2'>print-int32-decimal-right-justified</a> <a href='../../405screen.mu.html#L9'>screen</a>, val, max-width
<span id="L94" class="LineNr"> 94 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L95" class="LineNr"> 95 </span><span class="Delimiter">}</span>
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">var</span> val-int/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> convert val
<span id="L75" class="LineNr"> 75 </span> <span class="PreProc">var</span> bg/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L159'>hash-color</a> val-int
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">var</span> fg/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">7</span>
<span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">{</span>
<span id="L78" class="LineNr"> 78 </span> compare bg, <span class="Constant">2</span>
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">break-if-!=</span>
<span id="L80" class="LineNr"> 80 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L81" class="LineNr"> 81 </span> <span class="Delimiter">}</span>
<span id="L82" class="LineNr"> 82 </span> <span class="Delimiter">{</span>
<span id="L83" class="LineNr"> 83 </span> compare bg, <span class="Constant">3</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">break-if-!=</span>
<span id="L85" class="LineNr"> 85 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L86" class="LineNr"> 86 </span> <span class="Delimiter">}</span>
<span id="L87" class="LineNr"> 87 </span> <span class="Delimiter">{</span>
<span id="L88" class="LineNr"> 88 </span> compare bg, <span class="Constant">6</span>
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">break-if-!=</span>
<span id="L90" class="LineNr"> 90 </span> fg <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">}</span>
<span id="L92" class="LineNr"> 92 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, fg, bg
<span id="L93" class="LineNr"> 93 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L94" class="LineNr"> 94 </span> <a href='../../412print-float-decimal.mu.html#L159'>print-float-decimal-approximate</a> <a href='../../405screen.mu.html#L9'>screen</a>, val, <span class="Constant">3</span>
<span id="L95" class="LineNr"> 95 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L96" class="LineNr"> 96 </span><span class="Delimiter">}</span>
<span id="L97" class="LineNr"> 97 </span>
<span id="L98" class="LineNr"> 98 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L98'>render-array-at</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _a: (addr array <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span>
<span id="L99" class="LineNr"> 99 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xf2</span>, <span class="Constant">7</span>
<span id="L99" class="LineNr"> 99 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xf2</span>, <span class="Constant">7</span>
<span id="L100" class="LineNr">100 </span> <span class="muComment"># don't surround in spaces</span>
<span id="L101" class="LineNr">101 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x5b</span> <span class="muComment"># '['</span>
<span id="L102" class="LineNr">102 </span> increment col
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _a
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L209'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length a
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L207'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length a
<span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">{</span>
<span id="L107" class="LineNr">107 </span> compare i, <a href='surface.mu.html#L209'>max</a>
<span id="L107" class="LineNr">107 </span> compare i, <a href='surface.mu.html#L207'>max</a>
<span id="L108" class="LineNr">108 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L109" class="LineNr">109 </span> <span class="Delimiter">{</span>
<span id="L110" class="LineNr">110 </span> compare i, <span class="Constant">0</span>
@ -174,7 +174,7 @@ if ('onhashchange' in window) {
<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index a, off
<span id="L116" class="LineNr">116 </span> <a href='value.mu.html#L1'>render-value-at</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col, x, <span class="Constant">0</span>
<span id="L117" class="LineNr">117 </span> <span class="Delimiter">{</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L216'>value-width</a> x, <span class="Constant">0</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L218'>value-width</a> x, <span class="Constant">0</span>
<span id="L119" class="LineNr">119 </span> add-to col, w
<span id="L120" class="LineNr">120 </span> increment col
<span id="L121" class="LineNr">121 </span> <span class="Delimiter">}</span>
@ -185,11 +185,11 @@ if ('onhashchange' in window) {
<span id="L126" class="LineNr">126 </span><span class="Delimiter">}</span>
<span id="L127" class="LineNr">127 </span>
<span id="L128" class="LineNr">128 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L128'>render-screen</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _target-screen: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="Delimiter">{</span>
<span id="L129" class="LineNr">129 </span> <a href='../../405screen.mu.html#L491'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L129" class="LineNr">129 </span> <a href='../../405screen.mu.html#L502'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L130" class="LineNr">130 </span> <a href='../../405screen.mu.html#L109'>move-cursor</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> target-screen/<span class="Constant">esi</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> copy _target-screen
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> ncols-a/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target-screen, num-cols
<span id="L133" class="LineNr">133 </span> <a href='value.mu.html#L190'>print-upper-border</a> <a href='../../405screen.mu.html#L9'>screen</a>, *ncols-a
<span id="L133" class="LineNr">133 </span> <a href='value.mu.html#L192'>print-upper-border</a> <a href='../../405screen.mu.html#L9'>screen</a>, *ncols-a
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> r/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">1</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> nrows-a/<span class="Constant">ebx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target-screen, num-rows
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">{</span>
@ -202,7 +202,7 @@ if ('onhashchange' in window) {
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">{</span>
<span id="L144" class="LineNr">144 </span> compare c, *ncols-a
<span id="L145" class="LineNr">145 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L146" class="LineNr">146 </span> <a href='value.mu.html#L164'>print-screen-cell-of-fake-screen</a> <a href='../../405screen.mu.html#L9'>screen</a>, target-screen, r, c
<span id="L146" class="LineNr">146 </span> <a href='value.mu.html#L166'>print-screen-cell-of-fake-screen</a> <a href='../../405screen.mu.html#L9'>screen</a>, target-screen, r, c
<span id="L147" class="LineNr">147 </span> c <span class="SpecialChar">&lt;-</span> increment
<span id="L148" class="LineNr">148 </span> <span class="PreProc">loop</span>
<span id="L149" class="LineNr">149 </span> <span class="Delimiter">}</span>
@ -212,273 +212,275 @@ if ('onhashchange' in window) {
<span id="L153" class="LineNr">153 </span> <span class="Delimiter">}</span>
<span id="L154" class="LineNr">154 </span> increment row <span class="muComment"># mutate arg</span>
<span id="L155" class="LineNr">155 </span> <a href='../../405screen.mu.html#L109'>move-cursor</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col
<span id="L156" class="LineNr">156 </span> <a href='value.mu.html#L203'>print-lower-border</a> <a href='../../405screen.mu.html#L9'>screen</a>, *ncols-a
<span id="L156" class="LineNr">156 </span> <a href='value.mu.html#L205'>print-lower-border</a> <a href='../../405screen.mu.html#L9'>screen</a>, *ncols-a
<span id="L157" class="LineNr">157 </span><span class="Delimiter">}</span>
<span id="L158" class="LineNr">158 </span>
<span id="L159" class="LineNr">159 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L159'>hash-color</a></span> val: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../../406try-divide.mu.html#L87'>try-modulo</a> val, <span class="Constant">7</span> <span class="muComment"># assumes that 7 is always the background color</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L162" class="LineNr">162 </span><span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span>
<span id="L164" class="LineNr">164 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L164'>print-screen-cell-of-fake-screen</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _target: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _row: int, _col: int <span class="Delimiter">{</span>
<span id="L165" class="LineNr">165 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">0xf6</span>
<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> target/<span class="Constant">esi</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> copy _target
<span id="L167" class="LineNr">167 </span> <span class="PreProc">var</span> row/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _row
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy _col
<span id="L169" class="LineNr">169 </span> <span class="muComment"># if cursor is at screen-cell, add some fancy</span>
<span id="L170" class="LineNr">170 </span> <span class="Delimiter">{</span>
<span id="L171" class="LineNr">171 </span> <span class="PreProc">var</span> cursor-row/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target, cursor-row
<span id="L172" class="LineNr">172 </span> compare *cursor-row, row
<span id="L173" class="LineNr">173 </span> <span class="PreProc">break-if-!=</span>
<span id="L174" class="LineNr">174 </span> <span class="PreProc">var</span> cursor-col/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target, cursor-col
<span id="L175" class="LineNr">175 </span> compare *cursor-col, col
<span id="L176" class="LineNr">176 </span> <span class="PreProc">break-if-!=</span>
<span id="L177" class="LineNr">177 </span> <a href='../../405screen.mu.html#L568'>start-blinking</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L178" class="LineNr">178 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">1</span>
<span id="L179" class="LineNr">179 </span> <span class="Delimiter">}</span>
<span id="L180" class="LineNr">180 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../405screen.mu.html#L304'>screen-grapheme-at</a> target, row, col
<span id="L181" class="LineNr">181 </span> <span class="Delimiter">{</span>
<span id="L182" class="LineNr">182 </span> compare g, <span class="Constant">0</span>
<span id="L183" class="LineNr">183 </span> <span class="PreProc">break-if-!=</span>
<span id="L184" class="LineNr">184 </span> g <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L185" class="LineNr">185 </span> <span class="Delimiter">}</span>
<span id="L186" class="LineNr">186 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, g
<span id="L187" class="LineNr">187 </span> <a href='../../405screen.mu.html#L491'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L188" class="LineNr">188 </span><span class="Delimiter">}</span>
<span id="L189" class="LineNr">189 </span>
<span id="L190" class="LineNr">190 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L190'>print-upper-border</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), width: int <span class="Delimiter">{</span>
<span id="L191" class="LineNr">191 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x250c</span> <span class="muComment"># top-left corner</span>
<span id="L192" class="LineNr">192 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L193" class="LineNr">193 </span> <span class="Delimiter">{</span>
<span id="L194" class="LineNr">194 </span> compare i, width
<span id="L195" class="LineNr">195 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L196" class="LineNr">196 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2500</span> <span class="muComment"># horizontal line</span>
<span id="L197" class="LineNr">197 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L198" class="LineNr">198 </span> <span class="PreProc">loop</span>
<span id="L199" class="LineNr">199 </span> <span class="Delimiter">}</span>
<span id="L200" class="LineNr">200 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2510</span> <span class="muComment"># top-right corner</span>
<span id="L201" class="LineNr">201 </span><span class="Delimiter">}</span>
<span id="L202" class="LineNr">202 </span>
<span id="L203" class="LineNr">203 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L203'>print-lower-border</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), width: int <span class="Delimiter">{</span>
<span id="L204" class="LineNr">204 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2514</span> <span class="muComment"># bottom-left corner</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L206" class="LineNr">206 </span> <span class="Delimiter">{</span>
<span id="L207" class="LineNr">207 </span> compare i, width
<span id="L208" class="LineNr">208 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L209" class="LineNr">209 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2500</span> <span class="muComment"># horizontal line</span>
<span id="L210" class="LineNr">210 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L211" class="LineNr">211 </span> <span class="PreProc">loop</span>
<span id="L212" class="LineNr">212 </span> <span class="Delimiter">}</span>
<span id="L213" class="LineNr">213 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2518</span> <span class="muComment"># bottom-right corner</span>
<span id="L214" class="LineNr">214 </span><span class="Delimiter">}</span>
<span id="L215" class="LineNr">215 </span>
<span id="L216" class="LineNr">216 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L216'>value-width</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>), top-level: boolean<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span>
<span id="L219" class="LineNr">219 </span> <span class="Delimiter">{</span>
<span id="L220" class="LineNr">220 </span> compare *<span class="PreProc">type</span>, <span class="Constant">0</span> <span class="muComment"># int</span>
<span id="L221" class="LineNr">221 </span> <span class="PreProc">break-if-!=</span>
<span id="L222" class="LineNr">222 </span> <span class="PreProc">var</span> v-int/<span class="Constant">edx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, int-data
<span id="L223" class="LineNr">223 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../../311decimal-int.subx.html#L300'>decimal-size</a> *v-int
<span id="L224" class="LineNr">224 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L225" class="LineNr">225 </span> <span class="Delimiter">}</span>
<span id="L226" class="LineNr">226 </span> <span class="Delimiter">{</span>
<span id="L227" class="LineNr">227 </span> compare *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L228" class="LineNr">228 </span> <span class="PreProc">break-if-!=</span>
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> s-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, text-data
<span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> s/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *s-ah
<span id="L231" class="LineNr">231 </span> compare s, <span class="Constant">0</span>
<span id="L232" class="LineNr">232 </span> <span class="PreProc">break-if-=</span>
<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> length s
<span id="L234" class="LineNr">234 </span> compare <a href='data.mu.html#L70'>result</a>, <span class="Constant">0xd</span> <span class="muComment"># max string size</span>
<span id="L235" class="LineNr">235 </span> <span class="Delimiter">{</span>
<span id="L236" class="LineNr">236 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L237" class="LineNr">237 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0xd</span>
<span id="L238" class="LineNr">238 </span> <span class="Delimiter">}</span>
<span id="L239" class="LineNr">239 </span> <span class="muComment"># if it's a nested string, include space for quotes</span>
<span id="L240" class="LineNr">240 </span> <span class="muComment"># we don't do this for the top-level, where the quotes will overflow</span>
<span id="L241" class="LineNr">241 </span> <span class="muComment"># into surrounding padding.</span>
<span id="L242" class="LineNr">242 </span> compare top-level, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L243" class="LineNr">243 </span> <span class="Delimiter">{</span>
<span id="L244" class="LineNr">244 </span> <span class="PreProc">break-if-!=</span>
<span id="L245" class="LineNr">245 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span>
<span id="L246" class="LineNr">246 </span> <span class="Delimiter">}</span>
<span id="L247" class="LineNr">247 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L248" class="LineNr">248 </span> <span class="Delimiter">}</span>
<span id="L249" class="LineNr">249 </span> <span class="Delimiter">{</span>
<span id="L250" class="LineNr">250 </span> compare *<span class="PreProc">type</span>, <span class="Constant">2</span> <span class="muComment"># array</span>
<span id="L251" class="LineNr">251 </span> <span class="PreProc">break-if-!=</span>
<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> a-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, array-data
<span id="L253" class="LineNr">253 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *a-ah
<span id="L254" class="LineNr">254 </span> compare a, <span class="Constant">0</span>
<span id="L255" class="LineNr">255 </span> <span class="PreProc">break-if-=</span>
<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L285'>array-width</a> a
<span id="L257" class="LineNr">257 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L258" class="LineNr">258 </span> <span class="Delimiter">}</span>
<span id="L259" class="LineNr">259 </span> <span class="Delimiter">{</span>
<span id="L260" class="LineNr">260 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span>
<span id="L261" class="LineNr">261 </span> <span class="PreProc">break-if-!=</span>
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> f-ah/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, file-data
<span id="L263" class="LineNr">263 </span> <span class="PreProc">var</span> f/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *f-ah
<span id="L264" class="LineNr">264 </span> compare f, <span class="Constant">0</span>
<span id="L265" class="LineNr">265 </span> <span class="PreProc">break-if-=</span>
<span id="L266" class="LineNr">266 </span> <span class="muComment"># TODO: visualizing file handles</span>
<span id="L267" class="LineNr">267 </span> <span class="PreProc">return</span> <span class="Constant">4</span>
<span id="L268" class="LineNr">268 </span> <span class="Delimiter">}</span>
<span id="L269" class="LineNr">269 </span> <span class="Delimiter">{</span>
<span id="L270" class="LineNr">270 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L271" class="LineNr">271 </span> <span class="PreProc">break-if-!=</span>
<span id="L272" class="LineNr">272 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, screen-data
<span id="L273" class="LineNr">273 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L274" class="LineNr">274 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>
<span id="L275" class="LineNr">275 </span> <span class="PreProc">break-if-=</span>
<span id="L276" class="LineNr">276 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-cols
<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy *ncols
<span id="L278" class="LineNr">278 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span> <span class="muComment"># left/right margins</span>
<span id="L279" class="LineNr">279 </span> <span class="PreProc">return</span> *ncols
<span id="L280" class="LineNr">280 </span> <span class="Delimiter">}</span>
<span id="L281" class="LineNr">281 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L282" class="LineNr">282 </span><span class="Delimiter">}</span>
<span id="L283" class="LineNr">283 </span>
<span id="L284" class="LineNr">284 </span><span class="muComment"># keep sync'd with render-array-at</span>
<span id="L285" class="LineNr">285 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L285'>array-width</a></span> _a: (addr array <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _a
<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L209'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length a
<span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edi</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L290" class="LineNr">290 </span> <span class="Delimiter">{</span>
<span id="L291" class="LineNr">291 </span> compare i, <a href='surface.mu.html#L209'>max</a>
<span id="L292" class="LineNr">292 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L293" class="LineNr">293 </span> <span class="Delimiter">{</span>
<span id="L294" class="LineNr">294 </span> compare i, <span class="Constant">0</span>
<span id="L295" class="LineNr">295 </span> <span class="PreProc">break-if-=</span>
<span id="L296" class="LineNr">296 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment <span class="muComment"># for space</span>
<span id="L297" class="LineNr">297 </span> <span class="Delimiter">}</span>
<span id="L298" class="LineNr">298 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset a, i
<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index a, off
<span id="L300" class="LineNr">300 </span> <span class="Delimiter">{</span>
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L216'>value-width</a> x, <span class="Constant">0</span>
<span id="L302" class="LineNr">302 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add w
<span id="L303" class="LineNr">303 </span> <span class="Delimiter">}</span>
<span id="L304" class="LineNr">304 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L305" class="LineNr">305 </span> <span class="PreProc">loop</span>
<span id="L306" class="LineNr">306 </span> <span class="Delimiter">}</span>
<span id="L307" class="LineNr">307 </span> <span class="muComment"># we won't add 2 for surrounding brackets since we don't surround arrays in</span>
<span id="L308" class="LineNr">308 </span> <span class="muComment"># spaces like other value types</span>
<span id="L309" class="LineNr">309 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L310" class="LineNr">310 </span><span class="Delimiter">}</span>
<span id="L311" class="LineNr">311 </span>
<span id="L312" class="LineNr">312 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L312'>value-height</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L313" class="LineNr">313 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L314" class="LineNr">314 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span>
<span id="L315" class="LineNr">315 </span> <span class="Delimiter">{</span>
<span id="L316" class="LineNr">316 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span>
<span id="L317" class="LineNr">317 </span> <span class="PreProc">break-if-!=</span>
<span id="L318" class="LineNr">318 </span> <span class="muComment"># TODO: visualizing file handles</span>
<span id="L319" class="LineNr">319 </span> <span class="PreProc">return</span> <span class="Constant">1</span>
<span id="L320" class="LineNr">320 </span> <span class="Delimiter">}</span>
<span id="L321" class="LineNr">321 </span> <span class="Delimiter">{</span>
<span id="L322" class="LineNr">322 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">break-if-!=</span>
<span id="L324" class="LineNr">324 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, screen-data
<span id="L325" class="LineNr">325 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L326" class="LineNr">326 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>
<span id="L327" class="LineNr">327 </span> <span class="PreProc">break-if-=</span>
<span id="L328" class="LineNr">328 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-rows
<span id="L329" class="LineNr">329 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy *nrows
<span id="L330" class="LineNr">330 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span> <span class="muComment"># top and bottom border</span>
<span id="L331" class="LineNr">331 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L332" class="LineNr">332 </span> <span class="Delimiter">}</span>
<span id="L333" class="LineNr">333 </span> <span class="PreProc">return</span> <span class="Constant">1</span>
<span id="L334" class="LineNr">334 </span><span class="Delimiter">}</span>
<span id="L335" class="LineNr">335 </span>
<span id="L336" class="LineNr">336 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L336'>deep-copy-value</a></span> _src: (addr <a href='data.mu.html#L37'>value</a>), _dest: (addr <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span>
<span id="L337" class="LineNr">337 </span><span class="CommentedCode">#? print-string 0, &quot;deep-copy-value\n&quot;</span>
<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _src
<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _dest
<span id="L340" class="LineNr">340 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">ebx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, <span class="PreProc">type</span>
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> y/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, <span class="PreProc">type</span>
<span id="L342" class="LineNr">342 </span> copy-object <span class="PreProc">type</span>, y
<span id="L343" class="LineNr">343 </span> compare *<span class="PreProc">type</span>, <span class="Constant">0</span> <span class="muComment"># int</span>
<span id="L344" class="LineNr">344 </span> <span class="Delimiter">{</span>
<span id="L345" class="LineNr">345 </span> <span class="PreProc">break-if-!=</span>
<span id="L346" class="LineNr">346 </span><span class="CommentedCode">#? print-string 0, &quot;int value\n&quot;</span>
<span id="L347" class="LineNr">347 </span> <span class="PreProc">var</span> x/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, int-data
<span id="L348" class="LineNr">348 </span> y <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, int-data
<span id="L349" class="LineNr">349 </span> copy-object x, y
<span id="L350" class="LineNr">350 </span> <span class="PreProc">return</span>
<span id="L351" class="LineNr">351 </span> <span class="Delimiter">}</span>
<span id="L352" class="LineNr">352 </span> compare *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L353" class="LineNr">353 </span> <span class="Delimiter">{</span>
<span id="L354" class="LineNr">354 </span> <span class="PreProc">break-if-!=</span>
<span id="L355" class="LineNr">355 </span><span class="CommentedCode">#? print-string 0, &quot;string value\n&quot;</span>
<span id="L356" class="LineNr">356 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, text-data
<span id="L357" class="LineNr">357 </span> <span class="PreProc">var</span> src/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah
<span id="L358" class="LineNr">358 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, text-data
<span id="L359" class="LineNr">359 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src, dest-ah
<span id="L360" class="LineNr">360 </span> <span class="PreProc">return</span>
<span id="L361" class="LineNr">361 </span> <span class="Delimiter">}</span>
<span id="L362" class="LineNr">362 </span> compare *<span class="PreProc">type</span>, <span class="Constant">2</span> <span class="muComment"># array</span>
<span id="L363" class="LineNr">363 </span> <span class="Delimiter">{</span>
<span id="L364" class="LineNr">364 </span> <span class="PreProc">break-if-!=</span>
<span id="L365" class="LineNr">365 </span><span class="CommentedCode">#? print-string 0, &quot;array value\n&quot;</span>
<span id="L366" class="LineNr">366 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, array-data
<span id="L367" class="LineNr">367 </span> <span class="PreProc">var</span> _src/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah
<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _src
<span id="L369" class="LineNr">369 </span> <span class="PreProc">var</span> n/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length src
<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, array-data
<span id="L371" class="LineNr">371 </span> populate dest-ah, n
<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> _dest/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-ah
<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _dest
<span id="L374" class="LineNr">374 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L375" class="LineNr">375 </span> <span class="Delimiter">{</span>
<span id="L376" class="LineNr">376 </span> compare i, n
<span id="L377" class="LineNr">377 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L378" class="LineNr">378 </span> <span class="Delimiter">{</span>
<span id="L379" class="LineNr">379 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset src, i
<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> src-element/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index src, offset
<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> dest-element/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index dest, offset
<span id="L382" class="LineNr">382 </span> <a href='value.mu.html#L336'>deep-copy-value</a> src-element, dest-element
<span id="L383" class="LineNr">383 </span> <span class="Delimiter">}</span>
<span id="L384" class="LineNr">384 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L385" class="LineNr">385 </span> <span class="PreProc">loop</span>
<span id="L386" class="LineNr">386 </span> <span class="Delimiter">}</span>
<span id="L387" class="LineNr">387 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src, dest-ah
<span id="L388" class="LineNr">388 </span> <span class="PreProc">return</span>
<span id="L389" class="LineNr">389 </span> <span class="Delimiter">}</span>
<span id="L390" class="LineNr">390 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file</span>
<span id="L391" class="LineNr">391 </span> <span class="Delimiter">{</span>
<span id="L392" class="LineNr">392 </span> <span class="PreProc">break-if-!=</span>
<span id="L393" class="LineNr">393 </span><span class="CommentedCode">#? print-string 0, &quot;file value\n&quot;</span>
<span id="L394" class="LineNr">394 </span> <span class="PreProc">var</span> src-filename-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, filename
<span id="L395" class="LineNr">395 </span> <span class="PreProc">var</span> _src-filename/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-filename-ah
<span id="L396" class="LineNr">396 </span> <span class="PreProc">var</span> src-filename/<span class="Constant">ecx</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _src-filename
<span id="L397" class="LineNr">397 </span> <span class="PreProc">var</span> dest-filename-ah/<span class="Constant">ebx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, filename
<span id="L398" class="LineNr">398 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src-filename, dest-filename-ah
<span id="L399" class="LineNr">399 </span> <span class="PreProc">var</span> src-file-ah/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, file-data
<span id="L400" class="LineNr">400 </span> <span class="PreProc">var</span> src-file/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-file-ah
<span id="L401" class="LineNr">401 </span> <span class="PreProc">var</span> dest-file-ah/<span class="Constant">edx</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, file-data
<span id="L402" class="LineNr">402 </span> <a href='../../312copy.subx.html#L17'>copy-file</a> src-file, dest-file-ah, src-filename
<span id="L403" class="LineNr">403 </span> <span class="PreProc">return</span>
<span id="L404" class="LineNr">404 </span> <span class="Delimiter">}</span>
<span id="L405" class="LineNr">405 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L406" class="LineNr">406 </span> <span class="Delimiter">{</span>
<span id="L407" class="LineNr">407 </span> <span class="PreProc">break-if-!=</span>
<span id="L408" class="LineNr">408 </span><span class="CommentedCode">#? print-string 0, &quot;screen value\n&quot;</span>
<span id="L409" class="LineNr">409 </span> <span class="PreProc">var</span> src-screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, screen-data
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> _src-screen/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-screen-ah
<span id="L411" class="LineNr">411 </span> <span class="PreProc">var</span> src-screen/<span class="Constant">ecx</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> copy _src-screen
<span id="L412" class="LineNr">412 </span> <span class="PreProc">var</span> dest-screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, screen-data
<span id="L413" class="LineNr">413 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> dest-screen-ah
<span id="L414" class="LineNr">414 </span> <span class="PreProc">var</span> dest-screen/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-screen-ah
<span id="L415" class="LineNr">415 </span> copy-object src-screen, dest-screen
<span id="L416" class="LineNr">416 </span> <span class="PreProc">var</span> dest-screen-data-ah/<span class="Constant">ebx</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-screen, data
<span id="L417" class="LineNr">417 </span> <span class="PreProc">var</span> src-screen-data-ah/<span class="Constant">eax</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src-screen, data
<span id="L418" class="LineNr">418 </span> <span class="PreProc">var</span> src-screen-data/<span class="Constant">eax</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-screen-data-ah
<span id="L419" class="LineNr">419 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src-screen-data, dest-screen-data-ah
<span id="L420" class="LineNr">420 </span> <span class="PreProc">return</span>
<span id="L421" class="LineNr">421 </span> <span class="Delimiter">}</span>
<span id="L422" class="LineNr">422 </span><span class="Delimiter">}</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> quotient/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> remainder/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L162" class="LineNr">162 </span> quotient, remainder <span class="SpecialChar">&lt;-</span> <a href='../../314divide.subx.html#L3'>integer-divide</a> val, <span class="Constant">7</span> <span class="muComment"># assumes that 7 is always the background color</span>
<span id="L163" class="LineNr">163 </span> <span class="PreProc">return</span> remainder
<span id="L164" class="LineNr">164 </span><span class="Delimiter">}</span>
<span id="L165" class="LineNr">165 </span>
<span id="L166" class="LineNr">166 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L166'>print-screen-cell-of-fake-screen</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _target: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _row: int, _col: int <span class="Delimiter">{</span>
<span id="L167" class="LineNr">167 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">0xf6</span>
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> target/<span class="Constant">esi</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> copy _target
<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> row/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _row
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> col/<span class="Constant">edx</span>: int <span class="SpecialChar">&lt;-</span> copy _col
<span id="L171" class="LineNr">171 </span> <span class="muComment"># if cursor is at screen-cell, add some fancy</span>
<span id="L172" class="LineNr">172 </span> <span class="Delimiter">{</span>
<span id="L173" class="LineNr">173 </span> <span class="PreProc">var</span> cursor-row/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target, cursor-row
<span id="L174" class="LineNr">174 </span> compare *cursor-row, row
<span id="L175" class="LineNr">175 </span> <span class="PreProc">break-if-!=</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> cursor-col/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> target, cursor-col
<span id="L177" class="LineNr">177 </span> compare *cursor-col, col
<span id="L178" class="LineNr">178 </span> <span class="PreProc">break-if-!=</span>
<span id="L179" class="LineNr">179 </span> <a href='../../405screen.mu.html#L579'>start-blinking</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L180" class="LineNr">180 </span> <a href='../../405screen.mu.html#L519'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>, <span class="Constant">1</span>
<span id="L181" class="LineNr">181 </span> <span class="Delimiter">}</span>
<span id="L182" class="LineNr">182 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="SpecialChar">&lt;-</span> <a href='../../405screen.mu.html#L304'>screen-grapheme-at</a> target, row, col
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">{</span>
<span id="L184" class="LineNr">184 </span> compare g, <span class="Constant">0</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">break-if-!=</span>
<span id="L186" class="LineNr">186 </span> g <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0x20</span> <span class="muComment"># space</span>
<span id="L187" class="LineNr">187 </span> <span class="Delimiter">}</span>
<span id="L188" class="LineNr">188 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, g
<span id="L189" class="LineNr">189 </span> <a href='../../405screen.mu.html#L502'>reset-formatting</a> <a href='../../405screen.mu.html#L9'>screen</a>
<span id="L190" class="LineNr">190 </span><span class="Delimiter">}</span>
<span id="L191" class="LineNr">191 </span>
<span id="L192" class="LineNr">192 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L192'>print-upper-border</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), width: int <span class="Delimiter">{</span>
<span id="L193" class="LineNr">193 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x250c</span> <span class="muComment"># top-left corner</span>
<span id="L194" class="LineNr">194 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L195" class="LineNr">195 </span> <span class="Delimiter">{</span>
<span id="L196" class="LineNr">196 </span> compare i, width
<span id="L197" class="LineNr">197 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L198" class="LineNr">198 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2500</span> <span class="muComment"># horizontal line</span>
<span id="L199" class="LineNr">199 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L200" class="LineNr">200 </span> <span class="PreProc">loop</span>
<span id="L201" class="LineNr">201 </span> <span class="Delimiter">}</span>
<span id="L202" class="LineNr">202 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2510</span> <span class="muComment"># top-right corner</span>
<span id="L203" class="LineNr">203 </span><span class="Delimiter">}</span>
<span id="L204" class="LineNr">204 </span>
<span id="L205" class="LineNr">205 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L205'>print-lower-border</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), width: int <span class="Delimiter">{</span>
<span id="L206" class="LineNr">206 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2514</span> <span class="muComment"># bottom-left corner</span>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L208" class="LineNr">208 </span> <span class="Delimiter">{</span>
<span id="L209" class="LineNr">209 </span> compare i, width
<span id="L210" class="LineNr">210 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L211" class="LineNr">211 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2500</span> <span class="muComment"># horizontal line</span>
<span id="L212" class="LineNr">212 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L213" class="LineNr">213 </span> <span class="PreProc">loop</span>
<span id="L214" class="LineNr">214 </span> <span class="Delimiter">}</span>
<span id="L215" class="LineNr">215 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2518</span> <span class="muComment"># bottom-right corner</span>
<span id="L216" class="LineNr">216 </span><span class="Delimiter">}</span>
<span id="L217" class="LineNr">217 </span>
<span id="L218" class="LineNr">218 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L218'>value-width</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>), top-level: boolean<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L219" class="LineNr">219 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span>
<span id="L221" class="LineNr">221 </span> <span class="Delimiter">{</span>
<span id="L222" class="LineNr">222 </span> compare *<span class="PreProc">type</span>, <span class="Constant">0</span> <span class="muComment"># int</span>
<span id="L223" class="LineNr">223 </span> <span class="PreProc">break-if-!=</span>
<span id="L224" class="LineNr">224 </span> <span class="PreProc">var</span> v-num/<span class="Constant">edx</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, number-data
<span id="L225" class="LineNr">225 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='../../412print-float-decimal.mu.html#L519'>float-size</a> *v-num, <span class="Constant">3</span>
<span id="L226" class="LineNr">226 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L227" class="LineNr">227 </span> <span class="Delimiter">}</span>
<span id="L228" class="LineNr">228 </span> <span class="Delimiter">{</span>
<span id="L229" class="LineNr">229 </span> compare *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L230" class="LineNr">230 </span> <span class="PreProc">break-if-!=</span>
<span id="L231" class="LineNr">231 </span> <span class="PreProc">var</span> s-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, text-data
<span id="L232" class="LineNr">232 </span> <span class="PreProc">var</span> s/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *s-ah
<span id="L233" class="LineNr">233 </span> compare s, <span class="Constant">0</span>
<span id="L234" class="LineNr">234 </span> <span class="PreProc">break-if-=</span>
<span id="L235" class="LineNr">235 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> length s
<span id="L236" class="LineNr">236 </span> compare <a href='data.mu.html#L70'>result</a>, <span class="Constant">0xd</span> <span class="muComment"># max string size</span>
<span id="L237" class="LineNr">237 </span> <span class="Delimiter">{</span>
<span id="L238" class="LineNr">238 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L239" class="LineNr">239 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0xd</span>
<span id="L240" class="LineNr">240 </span> <span class="Delimiter">}</span>
<span id="L241" class="LineNr">241 </span> <span class="muComment"># if it's a nested string, include space for quotes</span>
<span id="L242" class="LineNr">242 </span> <span class="muComment"># we don't do this for the top-level, where the quotes will overflow</span>
<span id="L243" class="LineNr">243 </span> <span class="muComment"># into surrounding padding.</span>
<span id="L244" class="LineNr">244 </span> compare top-level, <span class="Constant">0</span> <span class="muComment"># false</span>
<span id="L245" class="LineNr">245 </span> <span class="Delimiter">{</span>
<span id="L246" class="LineNr">246 </span> <span class="PreProc">break-if-!=</span>
<span id="L247" class="LineNr">247 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span>
<span id="L248" class="LineNr">248 </span> <span class="Delimiter">}</span>
<span id="L249" class="LineNr">249 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L250" class="LineNr">250 </span> <span class="Delimiter">}</span>
<span id="L251" class="LineNr">251 </span> <span class="Delimiter">{</span>
<span id="L252" class="LineNr">252 </span> compare *<span class="PreProc">type</span>, <span class="Constant">2</span> <span class="muComment"># array</span>
<span id="L253" class="LineNr">253 </span> <span class="PreProc">break-if-!=</span>
<span id="L254" class="LineNr">254 </span> <span class="PreProc">var</span> a-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, array-data
<span id="L255" class="LineNr">255 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *a-ah
<span id="L256" class="LineNr">256 </span> compare a, <span class="Constant">0</span>
<span id="L257" class="LineNr">257 </span> <span class="PreProc">break-if-=</span>
<span id="L258" class="LineNr">258 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L287'>array-width</a> a
<span id="L259" class="LineNr">259 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L260" class="LineNr">260 </span> <span class="Delimiter">}</span>
<span id="L261" class="LineNr">261 </span> <span class="Delimiter">{</span>
<span id="L262" class="LineNr">262 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span>
<span id="L263" class="LineNr">263 </span> <span class="PreProc">break-if-!=</span>
<span id="L264" class="LineNr">264 </span> <span class="PreProc">var</span> f-ah/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, file-data
<span id="L265" class="LineNr">265 </span> <span class="PreProc">var</span> f/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *f-ah
<span id="L266" class="LineNr">266 </span> compare f, <span class="Constant">0</span>
<span id="L267" class="LineNr">267 </span> <span class="PreProc">break-if-=</span>
<span id="L268" class="LineNr">268 </span> <span class="muComment"># TODO: visualizing file handles</span>
<span id="L269" class="LineNr">269 </span> <span class="PreProc">return</span> <span class="Constant">4</span>
<span id="L270" class="LineNr">270 </span> <span class="Delimiter">}</span>
<span id="L271" class="LineNr">271 </span> <span class="Delimiter">{</span>
<span id="L272" class="LineNr">272 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L273" class="LineNr">273 </span> <span class="PreProc">break-if-!=</span>
<span id="L274" class="LineNr">274 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, screen-data
<span id="L275" class="LineNr">275 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L276" class="LineNr">276 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>
<span id="L277" class="LineNr">277 </span> <span class="PreProc">break-if-=</span>
<span id="L278" class="LineNr">278 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-cols
<span id="L279" class="LineNr">279 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy *ncols
<span id="L280" class="LineNr">280 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span> <span class="muComment"># left/right margins</span>
<span id="L281" class="LineNr">281 </span> <span class="PreProc">return</span> *ncols
<span id="L282" class="LineNr">282 </span> <span class="Delimiter">}</span>
<span id="L283" class="LineNr">283 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L284" class="LineNr">284 </span><span class="Delimiter">}</span>
<span id="L285" class="LineNr">285 </span>
<span id="L286" class="LineNr">286 </span><span class="muComment"># keep sync'd with render-array-at</span>
<span id="L287" class="LineNr">287 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L287'>array-width</a></span> _a: (addr array <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _a
<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L207'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length a
<span id="L290" class="LineNr">290 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L291" class="LineNr">291 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edi</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L292" class="LineNr">292 </span> <span class="Delimiter">{</span>
<span id="L293" class="LineNr">293 </span> compare i, <a href='surface.mu.html#L207'>max</a>
<span id="L294" class="LineNr">294 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L295" class="LineNr">295 </span> <span class="Delimiter">{</span>
<span id="L296" class="LineNr">296 </span> compare i, <span class="Constant">0</span>
<span id="L297" class="LineNr">297 </span> <span class="PreProc">break-if-=</span>
<span id="L298" class="LineNr">298 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> increment <span class="muComment"># for space</span>
<span id="L299" class="LineNr">299 </span> <span class="Delimiter">}</span>
<span id="L300" class="LineNr">300 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset a, i
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index a, off
<span id="L302" class="LineNr">302 </span> <span class="Delimiter">{</span>
<span id="L303" class="LineNr">303 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='value.mu.html#L218'>value-width</a> x, <span class="Constant">0</span>
<span id="L304" class="LineNr">304 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add w
<span id="L305" class="LineNr">305 </span> <span class="Delimiter">}</span>
<span id="L306" class="LineNr">306 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L307" class="LineNr">307 </span> <span class="PreProc">loop</span>
<span id="L308" class="LineNr">308 </span> <span class="Delimiter">}</span>
<span id="L309" class="LineNr">309 </span> <span class="muComment"># we won't add 2 for surrounding brackets since we don't surround arrays in</span>
<span id="L310" class="LineNr">310 </span> <span class="muComment"># spaces like other value types</span>
<span id="L311" class="LineNr">311 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L312" class="LineNr">312 </span><span class="Delimiter">}</span>
<span id="L313" class="LineNr">313 </span>
<span id="L314" class="LineNr">314 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L314'>value-height</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L315" class="LineNr">315 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _v
<span id="L316" class="LineNr">316 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span>
<span id="L317" class="LineNr">317 </span> <span class="Delimiter">{</span>
<span id="L318" class="LineNr">318 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span>
<span id="L319" class="LineNr">319 </span> <span class="PreProc">break-if-!=</span>
<span id="L320" class="LineNr">320 </span> <span class="muComment"># TODO: visualizing file handles</span>
<span id="L321" class="LineNr">321 </span> <span class="PreProc">return</span> <span class="Constant">1</span>
<span id="L322" class="LineNr">322 </span> <span class="Delimiter">}</span>
<span id="L323" class="LineNr">323 </span> <span class="Delimiter">{</span>
<span id="L324" class="LineNr">324 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L325" class="LineNr">325 </span> <span class="PreProc">break-if-!=</span>
<span id="L326" class="LineNr">326 </span> <span class="PreProc">var</span> screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> v, screen-data
<span id="L327" class="LineNr">327 </span> <span class="PreProc">var</span> <a href='../../405screen.mu.html#L9'>screen</a>/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *screen-ah
<span id="L328" class="LineNr">328 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span>
<span id="L329" class="LineNr">329 </span> <span class="PreProc">break-if-=</span>
<span id="L330" class="LineNr">330 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-rows
<span id="L331" class="LineNr">331 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy *nrows
<span id="L332" class="LineNr">332 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar">&lt;-</span> add <span class="Constant">2</span> <span class="muComment"># top and bottom border</span>
<span id="L333" class="LineNr">333 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a>
<span id="L334" class="LineNr">334 </span> <span class="Delimiter">}</span>
<span id="L335" class="LineNr">335 </span> <span class="PreProc">return</span> <span class="Constant">1</span>
<span id="L336" class="LineNr">336 </span><span class="Delimiter">}</span>
<span id="L337" class="LineNr">337 </span>
<span id="L338" class="LineNr">338 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L338'>deep-copy-value</a></span> _src: (addr <a href='data.mu.html#L37'>value</a>), _dest: (addr <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span>
<span id="L339" class="LineNr">339 </span><span class="CommentedCode">#? print-string 0, &quot;deep-copy-value\n&quot;</span>
<span id="L340" class="LineNr">340 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _src
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _dest
<span id="L342" class="LineNr">342 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">ebx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, <span class="PreProc">type</span>
<span id="L343" class="LineNr">343 </span> <span class="PreProc">var</span> y/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, <span class="PreProc">type</span>
<span id="L344" class="LineNr">344 </span> copy-object <span class="PreProc">type</span>, y
<span id="L345" class="LineNr">345 </span> compare *<span class="PreProc">type</span>, <span class="Constant">0</span> <span class="muComment"># int</span>
<span id="L346" class="LineNr">346 </span> <span class="Delimiter">{</span>
<span id="L347" class="LineNr">347 </span> <span class="PreProc">break-if-!=</span>
<span id="L348" class="LineNr">348 </span><span class="CommentedCode">#? print-string 0, &quot;int value\n&quot;</span>
<span id="L349" class="LineNr">349 </span> <span class="PreProc">var</span> src-n/<span class="Constant">eax</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, number-data
<span id="L350" class="LineNr">350 </span> <span class="PreProc">var</span> dest-n/<span class="Constant">ecx</span>: (addr float) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, number-data
<span id="L351" class="LineNr">351 </span> copy-object src-n, dest-n
<span id="L352" class="LineNr">352 </span> <span class="PreProc">return</span>
<span id="L353" class="LineNr">353 </span> <span class="Delimiter">}</span>
<span id="L354" class="LineNr">354 </span> compare *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span>
<span id="L355" class="LineNr">355 </span> <span class="Delimiter">{</span>
<span id="L356" class="LineNr">356 </span> <span class="PreProc">break-if-!=</span>
<span id="L357" class="LineNr">357 </span><span class="CommentedCode">#? print-string 0, &quot;string value\n&quot;</span>
<span id="L358" class="LineNr">358 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, text-data
<span id="L359" class="LineNr">359 </span> <span class="PreProc">var</span> src/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah
<span id="L360" class="LineNr">360 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, text-data
<span id="L361" class="LineNr">361 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src, dest-ah
<span id="L362" class="LineNr">362 </span> <span class="PreProc">return</span>
<span id="L363" class="LineNr">363 </span> <span class="Delimiter">}</span>
<span id="L364" class="LineNr">364 </span> compare *<span class="PreProc">type</span>, <span class="Constant">2</span> <span class="muComment"># array</span>
<span id="L365" class="LineNr">365 </span> <span class="Delimiter">{</span>
<span id="L366" class="LineNr">366 </span> <span class="PreProc">break-if-!=</span>
<span id="L367" class="LineNr">367 </span><span class="CommentedCode">#? print-string 0, &quot;array value\n&quot;</span>
<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, array-data
<span id="L369" class="LineNr">369 </span> <span class="PreProc">var</span> _src/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah
<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _src
<span id="L371" class="LineNr">371 </span> <span class="PreProc">var</span> n/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> length src
<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, array-data
<span id="L373" class="LineNr">373 </span> populate dest-ah, n
<span id="L374" class="LineNr">374 </span> <span class="PreProc">var</span> _dest/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-ah
<span id="L375" class="LineNr">375 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> copy _dest
<span id="L376" class="LineNr">376 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
<span id="L377" class="LineNr">377 </span> <span class="Delimiter">{</span>
<span id="L378" class="LineNr">378 </span> compare i, n
<span id="L379" class="LineNr">379 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L380" class="LineNr">380 </span> <span class="Delimiter">{</span>
<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> compute-offset src, i
<span id="L382" class="LineNr">382 </span> <span class="PreProc">var</span> src-element/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index src, offset
<span id="L383" class="LineNr">383 </span> <span class="PreProc">var</span> dest-element/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar">&lt;-</span> index dest, offset
<span id="L384" class="LineNr">384 </span> <a href='value.mu.html#L338'>deep-copy-value</a> src-element, dest-element
<span id="L385" class="LineNr">385 </span> <span class="Delimiter">}</span>
<span id="L386" class="LineNr">386 </span> i <span class="SpecialChar">&lt;-</span> increment
<span id="L387" class="LineNr">387 </span> <span class="PreProc">loop</span>
<span id="L388" class="LineNr">388 </span> <span class="Delimiter">}</span>
<span id="L389" class="LineNr">389 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src, dest-ah
<span id="L390" class="LineNr">390 </span> <span class="PreProc">return</span>
<span id="L391" class="LineNr">391 </span> <span class="Delimiter">}</span>
<span id="L392" class="LineNr">392 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file</span>
<span id="L393" class="LineNr">393 </span> <span class="Delimiter">{</span>
<span id="L394" class="LineNr">394 </span> <span class="PreProc">break-if-!=</span>
<span id="L395" class="LineNr">395 </span><span class="CommentedCode">#? print-string 0, &quot;file value\n&quot;</span>
<span id="L396" class="LineNr">396 </span> <span class="PreProc">var</span> src-filename-ah/<span class="Constant">eax</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, filename
<span id="L397" class="LineNr">397 </span> <span class="PreProc">var</span> _src-filename/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-filename-ah
<span id="L398" class="LineNr">398 </span> <span class="PreProc">var</span> src-filename/<span class="Constant">ecx</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> copy _src-filename
<span id="L399" class="LineNr">399 </span> <span class="PreProc">var</span> dest-filename-ah/<span class="Constant">ebx</span>: (addr handle array byte) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, filename
<span id="L400" class="LineNr">400 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src-filename, dest-filename-ah
<span id="L401" class="LineNr">401 </span> <span class="PreProc">var</span> src-file-ah/<span class="Constant">eax</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, file-data
<span id="L402" class="LineNr">402 </span> <span class="PreProc">var</span> src-file/<span class="Constant">eax</span>: (addr buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-file-ah
<span id="L403" class="LineNr">403 </span> <span class="PreProc">var</span> dest-file-ah/<span class="Constant">edx</span>: (addr handle buffered-file) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, file-data
<span id="L404" class="LineNr">404 </span> <a href='../../312copy.subx.html#L17'>copy-file</a> src-file, dest-file-ah, src-filename
<span id="L405" class="LineNr">405 </span> <span class="PreProc">return</span>
<span id="L406" class="LineNr">406 </span> <span class="Delimiter">}</span>
<span id="L407" class="LineNr">407 </span> compare *<span class="PreProc">type</span>, <span class="Constant">4</span> <span class="muComment"># screen</span>
<span id="L408" class="LineNr">408 </span> <span class="Delimiter">{</span>
<span id="L409" class="LineNr">409 </span> <span class="PreProc">break-if-!=</span>
<span id="L410" class="LineNr">410 </span><span class="CommentedCode">#? print-string 0, &quot;screen value\n&quot;</span>
<span id="L411" class="LineNr">411 </span> <span class="PreProc">var</span> src-screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src, screen-data
<span id="L412" class="LineNr">412 </span> <span class="PreProc">var</span> _src-screen/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-screen-ah
<span id="L413" class="LineNr">413 </span> <span class="PreProc">var</span> src-screen/<span class="Constant">ecx</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> copy _src-screen
<span id="L414" class="LineNr">414 </span> <span class="PreProc">var</span> dest-screen-ah/<span class="Constant">eax</span>: (addr handle <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest, screen-data
<span id="L415" class="LineNr">415 </span> <a href='../../120allocate.subx.html#L66'>allocate</a> dest-screen-ah
<span id="L416" class="LineNr">416 </span> <span class="PreProc">var</span> dest-screen/<span class="Constant">eax</span>: (addr <a href='../../405screen.mu.html#L9'>screen</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-screen-ah
<span id="L417" class="LineNr">417 </span> copy-object src-screen, dest-screen
<span id="L418" class="LineNr">418 </span> <span class="PreProc">var</span> dest-screen-data-ah/<span class="Constant">ebx</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> dest-screen, data
<span id="L419" class="LineNr">419 </span> <span class="PreProc">var</span> src-screen-data-ah/<span class="Constant">eax</span>: (addr handle array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> src-screen, data
<span id="L420" class="LineNr">420 </span> <span class="PreProc">var</span> src-screen-data/<span class="Constant">eax</span>: (addr array <a href='../../405screen.mu.html#L20'>screen-cell</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-screen-data-ah
<span id="L421" class="LineNr">421 </span> <a href='../../312copy.subx.html#L3'>copy-array-object</a> src-screen-data, dest-screen-data-ah
<span id="L422" class="LineNr">422 </span> <span class="PreProc">return</span>
<span id="L423" class="LineNr">423 </span> <span class="Delimiter">}</span>
<span id="L424" class="LineNr">424 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

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

@ -68,10 +68,10 @@ if ('onhashchange' in window) {
<span id="L10" class="LineNr">10 </span> nrows, ncols <span class="SpecialChar">&lt;-</span> <a href='../405screen.mu.html#L60'>screen-size</a> <span class="Constant">0</span>
<span id="L11" class="LineNr">11 </span> <a href='../304screen.subx.html#L6'>enable-screen-grid-mode</a>
<span id="L12" class="LineNr">12 </span> <a href='../405screen.mu.html#L109'>move-cursor</a> <span class="Constant">0</span>, <span class="Constant">5</span>, <span class="Constant">0x22</span>
<span id="L13" class="LineNr">13 </span> <a href='../405screen.mu.html#L508'>start-color</a> <span class="Constant">0</span>, <span class="Constant">1</span>, <span class="Constant">0x7a</span>
<span id="L14" class="LineNr">14 </span> <a href='../405screen.mu.html#L568'>start-blinking</a> <span class="Constant">0</span>
<span id="L13" class="LineNr">13 </span> <a href='../405screen.mu.html#L519'>start-color</a> <span class="Constant">0</span>, <span class="Constant">1</span>, <span class="Constant">0x7a</span>
<span id="L14" class="LineNr">14 </span> <a href='../405screen.mu.html#L579'>start-blinking</a> <span class="Constant">0</span>
<span id="L15" class="LineNr">15 </span> <a href='../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;Hello world!&quot;</span>
<span id="L16" class="LineNr">16 </span> <a href='../405screen.mu.html#L491'>reset-formatting</a> <span class="Constant">0</span>
<span id="L16" class="LineNr">16 </span> <a href='../405screen.mu.html#L502'>reset-formatting</a> <span class="Constant">0</span>
<span id="L17" class="LineNr">17 </span> <a href='../405screen.mu.html#L109'>move-cursor</a> <span class="Constant">0</span>, <span class="Constant">6</span>, <span class="Constant">0x22</span>
<span id="L18" class="LineNr">18 </span> <a href='../405screen.mu.html#L169'>print-string</a> <span class="Constant">0</span>, <span class="Constant">&quot;tty dimensions: &quot;</span>
<span id="L19" class="LineNr">19 </span> <a href='../405screen.mu.html#L436'>print-int32-hex</a> <span class="Constant">0</span>, nrows

View File

@ -139,7 +139,9 @@ copy-to var, n =&gt; <span class="Constant">&quot;c7 0/subop/
copy-to *var/reg, n =&gt; <span class="Constant">&quot;c7 0/subop/copy *&quot;</span> reg <span class="Constant">&quot; &quot;</span> n <span class="Constant">&quot;/imm32&quot;</span>
var/reg <span class="SpecialChar">&lt;-</span> copy-byte var2/reg2 =&gt; <span class="Constant">&quot;8a/byte-&gt; %&quot;</span> reg2 <span class="Constant">&quot; &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
<span class="Constant">&quot;81 4/subop/and %&quot;</span> reg <span class="Constant">&quot; 0xff/imm32&quot;</span>
var/reg <span class="SpecialChar">&lt;-</span> copy-byte *var2/reg2 =&gt; <span class="Constant">&quot;8a/byte-&gt; *&quot;</span> reg2 <span class="Constant">&quot; &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
<span class="Constant">&quot;81 4/subop/and %&quot;</span> reg <span class="Constant">&quot; 0xff/imm32&quot;</span>
copy-byte-to *var1/reg1, var2/reg2 =&gt; <span class="Constant">&quot;88/byte&lt;- *&quot;</span> reg1 <span class="Constant">&quot; &quot;</span> reg2 <span class="Constant">&quot;/r32&quot;</span>
compare var1, var2/reg2 =&gt; <span class="Constant">&quot;39/compare *(ebp+&quot;</span> var1.stack-offset <span class="Constant">&quot;) &quot;</span> reg2 <span class="Constant">&quot;/r32&quot;</span>
@ -152,6 +154,7 @@ compare var, n =&gt; <span class="Constant">&quot;81 7/subop/
compare *var/reg, n =&gt; <span class="Constant">&quot;81 7/subop/compare *&quot;</span> reg <span class="Constant">&quot; &quot;</span> n <span class="Constant">&quot;/imm32&quot;</span>
var/reg <span class="SpecialChar">&lt;-</span> multiply var2 =&gt; <span class="Constant">&quot;0f af/multiply *(ebp+&quot;</span> var2.stack-offset <span class="Constant">&quot;) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
var/reg <span class="SpecialChar">&lt;-</span> multiply var2/reg2 =&gt; <span class="Constant">&quot;0f af/multiply %&quot;</span> reg2 <span class="Constant">&quot; &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
var/reg <span class="SpecialChar">&lt;-</span> multiply *var2/reg2 =&gt; <span class="Constant">&quot;0f af/multiply *&quot;</span> reg2 <span class="Constant">&quot; &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
<span class="muComment">## Floating-point operations</span>