This commit is contained in:
Kartik Agaram 2021-08-30 09:21:52 -07:00
parent a479f0d083
commit 61ec86b719
61 changed files with 16398 additions and 6943 deletions

View File

@ -67,7 +67,7 @@ if ('onhashchange' in window) {
<span id="L10" class="LineNr">10 </span> 55/push-ebp
<span id="L11" class="LineNr">11 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L12" class="LineNr">12 </span> <span class="subxComment">#</span>
<span id="L13" class="LineNr">13 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *<span class="SpecialChar"><a href='boot.subx.html#L651'>Video-memory-addr</a></span> *(ebp+8) *(ebp+0xc) *(ebp+0x10) 0x400 0x300)
<span id="L13" class="LineNr">13 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *<span class="SpecialChar"><a href='boot.subx.html#L675'>Video-memory-addr</a></span> *(ebp+8) *(ebp+0xc) *(ebp+0x10) 0x400 0x300)
<span id="L14" class="LineNr">14 </span><span class="Constant">$pixel-on-real-screen:end</span>:
<span id="L15" class="LineNr">15 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L16" class="LineNr">16 </span> 89/&lt;- %esp 5/r32/ebp

426
html/103glyph.subx.html generated Normal file
View File

@ -0,0 +1,426 @@
<!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 - 103glyph.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: #ffffd7; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #ffffd7; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.SpecialChar { color: #d70000; }
.subxComment { color: #005faf; }
.subxS1Comment { color: #0000af; }
.LineNr { }
.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/main/103glyph.subx'>https://github.com/akkartik/mu/blob/main/103glyph.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Use the built-in font to draw glyphs to screen.</span>
<span id="L2" class="LineNr"> 2 </span><span class="subxComment"># <a href="https://en.wikipedia.org/wiki/Glyph#Typography">https://en.wikipedia.org/wiki/Glyph#Typography</a></span>
<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># The Mu computer can currently only render glyphs corresponding to single</span>
<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># code points. No combining characters.</span>
<span id="L5" class="LineNr"> 5 </span><span class="subxComment"># <a href="https://en.wikipedia.org/wiki/Code_point">https://en.wikipedia.org/wiki/Code_point</a></span>
<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># <a href="https://en.wikipedia.org/wiki/Combining_character">https://en.wikipedia.org/wiki/Combining_character</a></span>
<span id="L7" class="LineNr"> 7 </span><span class="subxComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="subxComment"># We need to do this in machine code because Mu doesn't have global variables</span>
<span id="L9" class="LineNr"> 9 </span><span class="subxComment"># yet (for the start of the font).</span>
<span id="L10" class="LineNr"> 10 </span>
<span id="L11" class="LineNr"> 11 </span>== code
<span id="L12" class="LineNr"> 12 </span>
<span id="L13" class="LineNr"> 13 </span><span class="subxComment"># The Mu computer's screen is 1024px wide and 768px tall.</span>
<span id="L14" class="LineNr"> 14 </span><span class="subxComment"># The Mu computer's font is 8px wide and 16px tall.</span>
<span id="L15" class="LineNr"> 15 </span><span class="subxComment"># Therefore 'x' here is in [0, 128), and 'y' is in [0, 48)</span>
<span id="L16" class="LineNr"> 16 </span><span class="subxComment"># Doesn't update the cursor; where the cursor should go after printing the</span>
<span id="L17" class="LineNr"> 17 </span><span class="subxComment"># current code-point is a higher-level concern.</span>
<span id="L18" class="LineNr"> 18 </span><span class="subxFunction">draw-code-point-on-real-screen</span>: <span class="subxComment"># c: code-point, x: int, y: int, color: int, background-color: int -&gt; _/eax</span>
<span id="L19" class="LineNr"> 19 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L20" class="LineNr"> 20 </span> 55/push-ebp
<span id="L21" class="LineNr"> 21 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L22" class="LineNr"> 22 </span> <span class="subxComment">#</span>
<span id="L23" class="LineNr"> 23 </span> (<a href='103glyph.subx.html#L74'>draw-code-point-on-screen-buffer</a> *<span class="SpecialChar"><a href='boot.subx.html#L675'>Video-memory-addr</a></span> *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) 0x80 0x30) <span class="subxComment"># =&gt; eax</span>
<span id="L24" class="LineNr"> 24 </span><span class="Constant">$draw-code-point-on-real-screen:end</span>:
<span id="L25" class="LineNr"> 25 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L26" class="LineNr"> 26 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L27" class="LineNr"> 27 </span> 5d/pop-to-ebp
<span id="L28" class="LineNr"> 28 </span> c3/return
<span id="L29" class="LineNr"> 29 </span>
<span id="L30" class="LineNr"> 30 </span><span class="subxFunction">draw-code-point-on-screen-array</span>: <span class="subxComment"># screen-data: (addr array byte), c: code-point, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int -&gt; _/eax: int</span>
<span id="L31" class="LineNr"> 31 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L32" class="LineNr"> 32 </span> 55/push-ebp
<span id="L33" class="LineNr"> 33 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L34" class="LineNr"> 34 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L35" class="LineNr"> 35 </span> 51/push-ecx
<span id="L36" class="LineNr"> 36 </span> 52/push-edx
<span id="L37" class="LineNr"> 37 </span> <span class="subxComment"># if screen-width*screen-height &gt; len(screen-data) abort</span>
<span id="L38" class="LineNr"> 38 </span> {
<span id="L39" class="LineNr"> 39 </span> <span class="subxComment"># ecx = len(screen-data)</span>
<span id="L40" class="LineNr"> 40 </span> 8b/-&gt; *(ebp+8) 1/r32/ecx
<span id="L41" class="LineNr"> 41 </span> 8b/-&gt; *ecx 1/r32/ecx
<span id="L42" class="LineNr"> 42 </span> <span class="subxComment"># eax = screen-width*screen-height</span>
<span id="L43" class="LineNr"> 43 </span> ba/copy-to-edx 0/imm32
<span id="L44" class="LineNr"> 44 </span> 8b/-&gt; *(ebp+0x20) 0/r32/eax
<span id="L45" class="LineNr"> 45 </span> f7 4/subop/multiply-into-eax *(ebp+0x24)
<span id="L46" class="LineNr"> 46 </span> 81 7/subop/compare %edx 0/imm32
<span id="L47" class="LineNr"> 47 </span> 0f 85/jump-if-!= $draw-code-point-on-screen-array:overflow/disp32
<span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># if (eax &gt; ecx) abort</span>
<span id="L49" class="LineNr"> 49 </span> 39/compare %eax 1/r32/ecx
<span id="L50" class="LineNr"> 50 </span> 0f 8f/jump-if-&gt; $draw-code-point-on-screen-array:<a href='317abort.subx.html#L5'>abort</a>/disp32
<span id="L51" class="LineNr"> 51 </span> }
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># eax = screen-data+4 (skip length)</span>
<span id="L53" class="LineNr"> 53 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L54" class="LineNr"> 54 </span> 05/add-to-eax 4/imm32
<span id="L55" class="LineNr"> 55 </span> <span class="subxComment">#</span>
<span id="L56" class="LineNr"> 56 </span> (<a href='103glyph.subx.html#L74'>draw-code-point-on-screen-buffer</a> %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24)) <span class="subxComment"># =&gt; eax</span>
<span id="L57" class="LineNr"> 57 </span><span class="Constant">$draw-code-point-on-screen-array:end</span>:
<span id="L58" class="LineNr"> 58 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L59" class="LineNr"> 59 </span> 5a/pop-to-edx
<span id="L60" class="LineNr"> 60 </span> 59/pop-to-ecx
<span id="L61" class="LineNr"> 61 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L62" class="LineNr"> 62 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L63" class="LineNr"> 63 </span> 5d/pop-to-ebp
<span id="L64" class="LineNr"> 64 </span> c3/return
<span id="L65" class="LineNr"> 65 </span>
<span id="L66" class="LineNr"> 66 </span><span class="Constant">$draw-code-point-on-screen-array:overflow</span>:
<span id="L67" class="LineNr"> 67 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;draw-code-point-on-screen-array: <a href='500fake-screen.mu.html#L14'>screen</a> dimensions too large&quot;</span>)
<span id="L68" class="LineNr"> 68 </span>
<span id="L69" class="LineNr"> 69 </span><span class="Constant">$draw-code-point-on-screen-array:<a href='317abort.subx.html#L5'>abort</a></span>:
<span id="L70" class="LineNr"> 70 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;draw-code-point-on-screen-array: coordinates are off the screen. Are the <a href='500fake-screen.mu.html#L14'>screen</a> dimensions correct?&quot;</span>)
<span id="L71" class="LineNr"> 71 </span>
<span id="L72" class="LineNr"> 72 </span><span class="subxComment"># 'buffer' here is not a valid Mu type: a naked address without a length.</span>
<span id="L73" class="LineNr"> 73 </span><span class="subxComment"># returns number of 8x16 units printed to screen (1 or 2).</span>
<span id="L74" class="LineNr"> 74 </span><span class="subxFunction">draw-code-point-on-screen-buffer</span>: <span class="subxComment"># buffer: (addr byte), c: code-point, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int -&gt; _/eax: int</span>
<span id="L75" class="LineNr"> 75 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L76" class="LineNr"> 76 </span> 55/push-ebp
<span id="L77" class="LineNr"> 77 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L78" class="LineNr"> 78 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L79" class="LineNr"> 79 </span> 56/push-esi
<span id="L80" class="LineNr"> 80 </span> <span class="subxComment"># switch screen-width and screen-height from code-point to pixel units</span>
<span id="L81" class="LineNr"> 81 </span> c1 4/subop/shift-left *(ebp+20) 3/imm8/log2-font-width
<span id="L82" class="LineNr"> 82 </span> c1 4/subop/shift-left *(ebp+24) 4/imm8/log2-font-height
<span id="L83" class="LineNr"> 83 </span> <span class="subxComment"># esi = c</span>
<span id="L84" class="LineNr"> 84 </span> 8b/-&gt; *(ebp+0xc) 6/r32/esi
<span id="L85" class="LineNr"> 85 </span> <span class="subxComment"># if (c &gt;= 4352) return # unicode planes supported: latin, greek, cyrillic, armenian, hebrew, arabic, syriac, thaana, n'ko, indian (iscii), sinhala, thai, lao, tibetan, myanmar, georgian</span>
<span id="L86" class="LineNr"> 86 </span> <span class="subxComment"># next few to support: CJK, ethiopic, cherokee, ...</span>
<span id="L87" class="LineNr"> 87 </span> 81 7/subop/compare %esi 0x1100/imm32=4352
<span id="L88" class="LineNr"> 88 </span> 0f 8d/jump-if-&gt;= $draw-code-point-on-screen-buffer:end/disp32
<span id="L89" class="LineNr"> 89 </span> <span class="subxComment"># var letter-bitmap/esi = font[c]</span>
<span id="L90" class="LineNr"> 90 </span> 69/multiply %esi 0x21/imm32/glyph-size 6/r32/esi
<span id="L91" class="LineNr"> 91 </span> 81 0/subop/add %esi 0x0010000c/imm32/Font <span class="subxComment"># see boot.subx</span>
<span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># dispatch based on letter-bitmap-&gt;size</span>
<span id="L93" class="LineNr"> 93 </span> b8/copy-to-eax 0/imm32
<span id="L94" class="LineNr"> 94 </span> 8a/byte-&gt; *esi 0/r32/AL
<span id="L95" class="LineNr"> 95 </span> 46/increment-esi <span class="subxComment"># skip size</span>
<span id="L96" class="LineNr"> 96 </span> 3d/compare-eax-and 8/imm32
<span id="L97" class="LineNr"> 97 </span> {
<span id="L98" class="LineNr"> 98 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L99" class="LineNr"> 99 </span> (<a href='103glyph.subx.html#L138'>draw-narrow-code-point-on-screen-buffer</a> *(ebp+8) %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L100" class="LineNr">100 </span> b8/copy-to-eax 1/imm32
<span id="L101" class="LineNr">101 </span> eb/jump $draw-code-point-on-screen-buffer:end/disp8
<span id="L102" class="LineNr">102 </span> }
<span id="L103" class="LineNr">103 </span> (<a href='103glyph.subx.html#L184'>draw-wide-code-point-on-screen-buffer</a> *(ebp+8) %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L104" class="LineNr">104 </span> b8/copy-to-eax 2/imm32
<span id="L105" class="LineNr">105 </span><span class="Constant">$draw-code-point-on-screen-buffer:end</span>:
<span id="L106" class="LineNr">106 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L107" class="LineNr">107 </span> 5e/pop-to-esi
<span id="L108" class="LineNr">108 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L109" class="LineNr">109 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L110" class="LineNr">110 </span> 5d/pop-to-ebp
<span id="L111" class="LineNr">111 </span> c3/return
<span id="L112" class="LineNr">112 </span>
<span id="L113" class="LineNr">113 </span><span class="subxFunction">wide-code-point?</span>: <span class="subxComment"># c: code-point -&gt; _/eax: boolean</span>
<span id="L114" class="LineNr">114 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L115" class="LineNr">115 </span> 55/push-ebp
<span id="L116" class="LineNr">116 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L117" class="LineNr">117 </span> <span class="subxComment"># eax = c</span>
<span id="L118" class="LineNr">118 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L119" class="LineNr">119 </span> <span class="subxComment"># if (c &gt;= 128) return # characters beyond ASCII currently not supported</span>
<span id="L120" class="LineNr">120 </span> 3d/compare-eax-and 0x80/imm32
<span id="L121" class="LineNr">121 </span> 0f 8d/jump-if-&gt;= $wide-code-point?:end/disp32
<span id="L122" class="LineNr">122 </span> <span class="subxComment"># var letter-bitmap/eax = font[c]</span>
<span id="L123" class="LineNr">123 </span> 69/multiply %eax 0x21/imm32/glyph-size 0/r32/eax
<span id="L124" class="LineNr">124 </span> 05/add-to-eax 0x0010000c/imm32/Font <span class="subxComment"># see boot.subx</span>
<span id="L125" class="LineNr">125 </span> <span class="subxComment"># dispatch based on letter-bitmap-&gt;size</span>
<span id="L126" class="LineNr">126 </span> 8a/byte-&gt; *eax 0/r32/AL
<span id="L127" class="LineNr">127 </span> 25/and-eax-with 0xff/imm32
<span id="L128" class="LineNr">128 </span> 3d/compare-eax-and 8/imm32
<span id="L129" class="LineNr">129 </span> 0f 95/set-if-!= %eax
<span id="L130" class="LineNr">130 </span><span class="Constant">$wide-code-point?:end</span>:
<span id="L131" class="LineNr">131 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L132" class="LineNr">132 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L133" class="LineNr">133 </span> 5d/pop-to-ebp
<span id="L134" class="LineNr">134 </span> c3/return
<span id="L135" class="LineNr">135 </span>
<span id="L136" class="LineNr">136 </span><span class="subxComment"># buffer: naked address to raw screen RAM without a length</span>
<span id="L137" class="LineNr">137 </span><span class="subxComment"># letter-bitmap: naked address to 8-pixel wide font glyph</span>
<span id="L138" class="LineNr">138 </span><span class="subxFunction">draw-narrow-code-point-on-screen-buffer</span>: <span class="subxComment"># buffer: (addr byte), letter-bitmap: (addr byte), x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int</span>
<span id="L139" class="LineNr">139 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L140" class="LineNr">140 </span> 55/push-ebp
<span id="L141" class="LineNr">141 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L142" class="LineNr">142 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L143" class="LineNr">143 </span> 52/push-edx
<span id="L144" class="LineNr">144 </span> 53/push-ebx
<span id="L145" class="LineNr">145 </span> 56/push-esi
<span id="L146" class="LineNr">146 </span> 57/push-edi
<span id="L147" class="LineNr">147 </span> <span class="subxComment"># esi = letter-bitmap</span>
<span id="L148" class="LineNr">148 </span> 8b/-&gt; *(ebp+0xc) 6/r32/esi
<span id="L149" class="LineNr">149 </span> <span class="subxComment"># var ycurr/edx: int = y*16</span>
<span id="L150" class="LineNr">150 </span> 8b/-&gt; *(ebp+0x14) 2/r32/edx
<span id="L151" class="LineNr">151 </span> c1 4/subop/shift-left %edx 4/imm8
<span id="L152" class="LineNr">152 </span> <span class="subxComment"># var ymax/edi: int = ycurr + 16</span>
<span id="L153" class="LineNr">153 </span> 8b/-&gt; *(ebp+0x14) 7/r32/edi
<span id="L154" class="LineNr">154 </span> c1 4/subop/shift-left %edi 4/imm8
<span id="L155" class="LineNr">155 </span> 81 0/subop/add %edi 0x10/imm32
<span id="L156" class="LineNr">156 </span> {
<span id="L157" class="LineNr">157 </span> <span class="subxComment"># if (ycurr &gt;= ymax) break</span>
<span id="L158" class="LineNr">158 </span> 39/compare %edx 7/r32/edi
<span id="L159" class="LineNr">159 </span> 0f 8d/jump-if-&gt;= <span class="Constant">break</span>/disp32
<span id="L160" class="LineNr">160 </span> <span class="subxComment"># var row-bitmap/ebx: byte = *letter-bitmap</span>
<span id="L161" class="LineNr">161 </span> bb/copy-to-ebx 0/imm32
<span id="L162" class="LineNr">162 </span> 8a/byte-&gt; *esi 3/r32/BL
<span id="L163" class="LineNr">163 </span> (<a href='103glyph.subx.html#L241'>draw-run-of-pixels-from-glyph</a> *(ebp+8) %ebx *(ebp+0x10) %edx *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L164" class="LineNr">164 </span> <span class="subxComment"># ++y</span>
<span id="L165" class="LineNr">165 </span> 42/increment-edx
<span id="L166" class="LineNr">166 </span> <span class="subxComment"># next bitmap row</span>
<span id="L167" class="LineNr">167 </span> 46/increment-esi
<span id="L168" class="LineNr">168 </span> <span class="subxComment">#</span>
<span id="L169" class="LineNr">169 </span> e9/jump <span class="Constant">loop</span>/disp32
<span id="L170" class="LineNr">170 </span> }
<span id="L171" class="LineNr">171 </span><span class="Constant">$draw-narrow-code-point-on-screen-buffer:end</span>:
<span id="L172" class="LineNr">172 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L173" class="LineNr">173 </span> 5f/pop-to-edi
<span id="L174" class="LineNr">174 </span> 5e/pop-to-esi
<span id="L175" class="LineNr">175 </span> 5b/pop-to-ebx
<span id="L176" class="LineNr">176 </span> 5a/pop-to-edx
<span id="L177" class="LineNr">177 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L178" class="LineNr">178 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L179" class="LineNr">179 </span> 5d/pop-to-ebp
<span id="L180" class="LineNr">180 </span> c3/return
<span id="L181" class="LineNr">181 </span>
<span id="L182" class="LineNr">182 </span><span class="subxComment"># buffer: naked address to raw screen RAM without a length</span>
<span id="L183" class="LineNr">183 </span><span class="subxComment"># letter-bitmap: naked address to 16-pixel wide font glyph</span>
<span id="L184" class="LineNr">184 </span><span class="subxFunction">draw-wide-code-point-on-screen-buffer</span>: <span class="subxComment"># buffer: (addr byte), letter-bitmap: (addr byte), x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int</span>
<span id="L185" class="LineNr">185 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L186" class="LineNr">186 </span> 55/push-ebp
<span id="L187" class="LineNr">187 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L188" class="LineNr">188 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L189" class="LineNr">189 </span> 50/push-eax
<span id="L190" class="LineNr">190 </span> 51/push-ecx
<span id="L191" class="LineNr">191 </span> 52/push-edx
<span id="L192" class="LineNr">192 </span> 53/push-ebx
<span id="L193" class="LineNr">193 </span> 56/push-esi
<span id="L194" class="LineNr">194 </span> 57/push-edi
<span id="L195" class="LineNr">195 </span> <span class="subxComment"># esi = letter-bitmap</span>
<span id="L196" class="LineNr">196 </span> 8b/-&gt; *(ebp+0xc) 6/r32/esi
<span id="L197" class="LineNr">197 </span> <span class="subxComment">#</span>
<span id="L198" class="LineNr">198 </span> bb/copy-to-ebx 0/imm32
<span id="L199" class="LineNr">199 </span> <span class="subxComment"># var ycurr/edx: int = y*16</span>
<span id="L200" class="LineNr">200 </span> 8b/-&gt; *(ebp+0x14) 2/r32/edx
<span id="L201" class="LineNr">201 </span> c1 4/subop/shift-left %edx 4/imm8
<span id="L202" class="LineNr">202 </span> <span class="subxComment"># var ymax/edi: int = ycurr + 16</span>
<span id="L203" class="LineNr">203 </span> 8b/-&gt; *(ebp+0x14) 7/r32/edi
<span id="L204" class="LineNr">204 </span> c1 4/subop/shift-left %edi 4/imm8
<span id="L205" class="LineNr">205 </span> 81 0/subop/add %edi 0x10/imm32
<span id="L206" class="LineNr">206 </span> {
<span id="L207" class="LineNr">207 </span> <span class="subxComment"># if (ycurr &gt;= ymax) break</span>
<span id="L208" class="LineNr">208 </span> 39/compare %edx 7/r32/edi
<span id="L209" class="LineNr">209 </span> 0f 8d/jump-if-&gt;= <span class="Constant">break</span>/disp32
<span id="L210" class="LineNr">210 </span> <span class="subxComment"># var row-bitmap/ebx: byte = *letter-bitmap</span>
<span id="L211" class="LineNr">211 </span> 8a/byte-&gt; *esi 3/r32/BL
<span id="L212" class="LineNr">212 </span> <span class="subxComment"># ecx = x</span>
<span id="L213" class="LineNr">213 </span> 8b/-&gt; *(ebp+0x10) 1/r32/ecx
<span id="L214" class="LineNr">214 </span> <span class="subxComment"># first half-row</span>
<span id="L215" class="LineNr">215 </span> (<a href='103glyph.subx.html#L241'>draw-run-of-pixels-from-glyph</a> *(ebp+8) %ebx %ecx %edx *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L216" class="LineNr">216 </span> <span class="subxComment"># second half-row</span>
<span id="L217" class="LineNr">217 </span> 8a/byte-&gt; *(esi+1) 3/r32/BL
<span id="L218" class="LineNr">218 </span> 41/increment-ecx
<span id="L219" class="LineNr">219 </span> (<a href='103glyph.subx.html#L241'>draw-run-of-pixels-from-glyph</a> *(ebp+8) %ebx %ecx %edx *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L220" class="LineNr">220 </span> <span class="subxComment"># ++y</span>
<span id="L221" class="LineNr">221 </span> 42/increment-edx
<span id="L222" class="LineNr">222 </span> <span class="subxComment"># next bitmap row</span>
<span id="L223" class="LineNr">223 </span> 81 0/subop/add %esi 2/imm32
<span id="L224" class="LineNr">224 </span> <span class="subxComment">#</span>
<span id="L225" class="LineNr">225 </span> e9/jump <span class="Constant">loop</span>/disp32
<span id="L226" class="LineNr">226 </span> }
<span id="L227" class="LineNr">227 </span><span class="Constant">$draw-wide-code-point-on-screen-buffer:end</span>:
<span id="L228" class="LineNr">228 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L229" class="LineNr">229 </span> 5f/pop-to-edi
<span id="L230" class="LineNr">230 </span> 5e/pop-to-esi
<span id="L231" class="LineNr">231 </span> 5b/pop-to-ebx
<span id="L232" class="LineNr">232 </span> 5a/pop-to-edx
<span id="L233" class="LineNr">233 </span> 59/pop-to-ecx
<span id="L234" class="LineNr">234 </span> 58/pop-to-eax
<span id="L235" class="LineNr">235 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L236" class="LineNr">236 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L237" class="LineNr">237 </span> 5d/pop-to-ebp
<span id="L238" class="LineNr">238 </span> c3/return
<span id="L239" class="LineNr">239 </span>
<span id="L240" class="LineNr">240 </span><span class="subxComment"># draw 8 pixels from a single glyph byte in a font bitmap</span>
<span id="L241" class="LineNr">241 </span><span class="subxFunction">draw-run-of-pixels-from-glyph</span>: <span class="subxComment"># buffer: (addr byte), glyph-byte: byte, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int</span>
<span id="L242" class="LineNr">242 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L243" class="LineNr">243 </span> 55/push-ebp
<span id="L244" class="LineNr">244 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L245" class="LineNr">245 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L246" class="LineNr">246 </span> 50/push-eax
<span id="L247" class="LineNr">247 </span> 51/push-ecx
<span id="L248" class="LineNr">248 </span> 56/push-esi
<span id="L249" class="LineNr">249 </span> <span class="subxComment"># esi = glyph-byte</span>
<span id="L250" class="LineNr">250 </span> 8b/-&gt; *(ebp+0xc) 6/r32/esi
<span id="L251" class="LineNr">251 </span> <span class="subxComment"># var xcurr/eax: int = x*8 + 7</span>
<span id="L252" class="LineNr">252 </span> 8b/-&gt; *(ebp+0x10) 0/r32/eax
<span id="L253" class="LineNr">253 </span> c1 4/subop/shift-left %eax 3/imm8
<span id="L254" class="LineNr">254 </span> 05/add-to-eax 7/imm32
<span id="L255" class="LineNr">255 </span> <span class="subxComment"># var xmin/ecx: int = x*8</span>
<span id="L256" class="LineNr">256 </span> 8b/-&gt; *(ebp+0x10) 1/r32/ecx
<span id="L257" class="LineNr">257 </span> c1 4/subop/shift-left %ecx 3/imm8
<span id="L258" class="LineNr">258 </span> {
<span id="L259" class="LineNr">259 </span> <span class="subxComment"># if (xcurr &lt; xmin) break</span>
<span id="L260" class="LineNr">260 </span> 39/compare %eax 1/r32/ecx
<span id="L261" class="LineNr">261 </span> 7c/jump-if-&lt; <span class="Constant">break</span>/disp8
<span id="L262" class="LineNr">262 </span> <span class="subxComment"># shift LSB from row-bitmap into carry flag (CF)</span>
<span id="L263" class="LineNr">263 </span> c1 5/subop/shift-right-logical %esi 1/imm8
<span id="L264" class="LineNr">264 </span> <span class="subxComment"># if LSB, draw a pixel in the given color</span>
<span id="L265" class="LineNr">265 </span> {
<span id="L266" class="LineNr">266 </span> 73/jump-if-not-CF <span class="Constant">break</span>/disp8
<span id="L267" class="LineNr">267 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *(ebp+8) %eax *(ebp+0x14) *(ebp+0x18) *(ebp+0x20) *(ebp+0x24))
<span id="L268" class="LineNr">268 </span> eb/jump $draw-code-point-on-screen-buffer:continue/disp8
<span id="L269" class="LineNr">269 </span> }
<span id="L270" class="LineNr">270 </span> <span class="subxComment"># otherwise use the background color</span>
<span id="L271" class="LineNr">271 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *(ebp+8) %eax *(ebp+0x14) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L272" class="LineNr">272 </span><span class="Constant">$draw-code-point-on-screen-buffer:continue</span>:
<span id="L273" class="LineNr">273 </span> <span class="subxComment"># --x</span>
<span id="L274" class="LineNr">274 </span> 48/decrement-eax
<span id="L275" class="LineNr">275 </span> <span class="subxComment">#</span>
<span id="L276" class="LineNr">276 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L277" class="LineNr">277 </span> }
<span id="L278" class="LineNr">278 </span><span class="Constant">$draw-run-of-pixels-from-glyph:end</span>:
<span id="L279" class="LineNr">279 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L280" class="LineNr">280 </span> 5e/pop-to-esi
<span id="L281" class="LineNr">281 </span> 59/pop-to-ecx
<span id="L282" class="LineNr">282 </span> 58/pop-to-eax
<span id="L283" class="LineNr">283 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L284" class="LineNr">284 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L285" class="LineNr">285 </span> 5d/pop-to-ebp
<span id="L286" class="LineNr">286 </span> c3/return
<span id="L287" class="LineNr">287 </span>
<span id="L288" class="LineNr">288 </span><span class="subxFunction">cursor-position-on-real-screen</span>: <span class="subxComment"># -&gt; _/eax: int, _/ecx: int</span>
<span id="L289" class="LineNr">289 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L290" class="LineNr">290 </span> 55/push-ebp
<span id="L291" class="LineNr">291 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L292" class="LineNr">292 </span> <span class="subxComment"># TODO: support fake screen; we currently assume 'screen' is always 0 (real)</span>
<span id="L293" class="LineNr">293 </span> 8b/-&gt; *<span class="SpecialChar"><a href='103glyph.subx.html#L362'>Real-screen-cursor-x</a></span> 0/r32/eax
<span id="L294" class="LineNr">294 </span> 8b/-&gt; *<span class="SpecialChar"><a href='103glyph.subx.html#L364'>Real-screen-cursor-y</a></span> 1/r32/ecx
<span id="L295" class="LineNr">295 </span><span class="Constant">$cursor-position-on-real-screen:end</span>:
<span id="L296" class="LineNr">296 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L297" class="LineNr">297 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L298" class="LineNr">298 </span> 5d/pop-to-ebp
<span id="L299" class="LineNr">299 </span> c3/return
<span id="L300" class="LineNr">300 </span>
<span id="L301" class="LineNr">301 </span><span class="subxFunction">set-cursor-position-on-real-screen</span>: <span class="subxComment"># x: int, y: int</span>
<span id="L302" class="LineNr">302 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L303" class="LineNr">303 </span> 55/push-ebp
<span id="L304" class="LineNr">304 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L305" class="LineNr">305 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L306" class="LineNr">306 </span> 50/push-eax
<span id="L307" class="LineNr">307 </span> <span class="subxComment">#</span>
<span id="L308" class="LineNr">308 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L309" class="LineNr">309 </span> 89/&lt;- *<span class="SpecialChar"><a href='103glyph.subx.html#L362'>Real-screen-cursor-x</a></span> 0/r32/eax
<span id="L310" class="LineNr">310 </span> 8b/-&gt; *(ebp+0xc) 0/r32/eax
<span id="L311" class="LineNr">311 </span> 89/&lt;- *<span class="SpecialChar"><a href='103glyph.subx.html#L364'>Real-screen-cursor-y</a></span> 0/r32/eax
<span id="L312" class="LineNr">312 </span><span class="Constant">$set-cursor-position-on-real-screen:end</span>:
<span id="L313" class="LineNr">313 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L314" class="LineNr">314 </span> 58/pop-to-eax
<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
<span id="L317" class="LineNr">317 </span> 5d/pop-to-ebp
<span id="L318" class="LineNr">318 </span> c3/return
<span id="L319" class="LineNr">319 </span>
<span id="L320" class="LineNr">320 </span><span class="subxComment"># Not a real `show-cursor` primitive:</span>
<span id="L321" class="LineNr">321 </span><span class="subxComment"># - does not clear previous location cursor was shown at.</span>
<span id="L322" class="LineNr">322 </span><span class="subxComment"># - does not preserve what was at the cursor. Caller is responsible for</span>
<span id="L323" class="LineNr">323 </span><span class="subxComment"># tracking what was on the screen at this position before and passing it</span>
<span id="L324" class="LineNr">324 </span><span class="subxComment"># in again.</span>
<span id="L325" class="LineNr">325 </span><span class="subxComment"># - does not stop showing the cursor at this location when the cursor moves</span>
<span id="L326" class="LineNr">326 </span><span class="subxFunction">draw-cursor-on-real-screen</span>: <span class="subxComment"># c: code-point</span>
<span id="L327" class="LineNr">327 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L328" class="LineNr">328 </span> 55/push-ebp
<span id="L329" class="LineNr">329 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L330" class="LineNr">330 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L331" class="LineNr">331 </span> 50/push-eax
<span id="L332" class="LineNr">332 </span> 51/push-ecx
<span id="L333" class="LineNr">333 </span> <span class="subxComment">#</span>
<span id="L334" class="LineNr">334 </span> (<a href='103glyph.subx.html#L288'>cursor-position-on-real-screen</a>) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L335" class="LineNr">335 </span> (<a href='103glyph.subx.html#L18'>draw-code-point-on-real-screen</a> *(ebp+8) %eax %ecx 0 7) <span class="subxComment"># =&gt; eax</span>
<span id="L336" class="LineNr">336 </span><span class="Constant">$draw-cursor-on-real-screen:end</span>:
<span id="L337" class="LineNr">337 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L338" class="LineNr">338 </span> 59/pop-to-ecx
<span id="L339" class="LineNr">339 </span> 58/pop-to-eax
<span id="L340" class="LineNr">340 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L341" class="LineNr">341 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L342" class="LineNr">342 </span> 5d/pop-to-ebp
<span id="L343" class="LineNr">343 </span> c3/return
<span id="L344" class="LineNr">344 </span>
<span id="L345" class="LineNr">345 </span>== data
<span id="L346" class="LineNr">346 </span>
<span id="L347" class="LineNr">347 </span><span class="subxComment"># The cursor is where certain Mu functions (usually of the form</span>
<span id="L348" class="LineNr">348 </span><span class="subxComment"># 'draw*cursor*') print to by default.</span>
<span id="L349" class="LineNr">349 </span><span class="subxComment">#</span>
<span id="L350" class="LineNr">350 </span><span class="subxComment"># We don't bother displaying the cursor when drawing. It only becomes visible</span>
<span id="L351" class="LineNr">351 </span><span class="subxComment"># on draw-cursor, which is quite rickety (see above)</span>
<span id="L352" class="LineNr">352 </span><span class="subxComment">#</span>
<span id="L353" class="LineNr">353 </span><span class="subxComment"># It's up to applications to manage cursor display:</span>
<span id="L354" class="LineNr">354 </span><span class="subxComment"># - clean up where it used to be</span>
<span id="L355" class="LineNr">355 </span><span class="subxComment"># - display the cursor before waiting for a key</span>
<span id="L356" class="LineNr">356 </span><span class="subxComment"># - ensure its location appropriately suggests the effect keystrokes will have</span>
<span id="L357" class="LineNr">357 </span><span class="subxComment"># - ensure its contents (and colors) appropriately reflect the state of the</span>
<span id="L358" class="LineNr">358 </span><span class="subxComment"># screen</span>
<span id="L359" class="LineNr">359 </span><span class="subxComment">#</span>
<span id="L360" class="LineNr">360 </span><span class="subxComment"># There's no blinking, etc. We aren't using any hardware-supported text mode</span>
<span id="L361" class="LineNr">361 </span><span class="subxComment"># here.</span>
<span id="L362" class="LineNr">362 </span><span class="SpecialChar">Real-screen-cursor-x</span>:
<span id="L363" class="LineNr">363 </span> 0/imm32
<span id="L364" class="LineNr">364 </span><span class="SpecialChar">Real-screen-cursor-y</span>:
<span id="L365" class="LineNr">365 </span> 0/imm32
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -1,295 +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 - 103grapheme.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: #ffffd7; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #ffffd7; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.SpecialChar { color: #d70000; }
.subxComment { color: #005faf; }
.subxS1Comment { color: #0000af; }
.LineNr { }
.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/main/103grapheme.subx'>https://github.com/akkartik/mu/blob/main/103grapheme.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Use the built-in font to draw a grapheme to real screen.</span>
<span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span>
<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># We need to do this in machine code because Mu doesn't have global variables</span>
<span id="L4" class="LineNr"> 4 </span><span class="subxComment"># yet (for the start of the font).</span>
<span id="L5" class="LineNr"> 5 </span><span class="subxComment">#</span>
<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># There are uncomfortable assumptions baked in here about english/latin</span>
<span id="L7" class="LineNr"> 7 </span><span class="subxComment"># script. We convert the grid of pixels into a fixed-width grid of graphemes,</span>
<span id="L8" class="LineNr"> 8 </span><span class="subxComment"># which may not work well with other language families.</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr"> 10 </span>== code
<span id="L11" class="LineNr"> 11 </span>
<span id="L12" class="LineNr"> 12 </span><span class="subxComment"># The Mu computer's screen is 1024px wide and 768px tall.</span>
<span id="L13" class="LineNr"> 13 </span><span class="subxComment"># The Mu computer's font is 8px wide and 16px tall.</span>
<span id="L14" class="LineNr"> 14 </span><span class="subxComment"># Therefore 'x' here is in [0, 128), and 'y' is in [0, 48)</span>
<span id="L15" class="LineNr"> 15 </span><span class="subxComment"># Doesn't update the cursor; where the cursor should go after printing the</span>
<span id="L16" class="LineNr"> 16 </span><span class="subxComment"># current grapheme is a higher-level concern.</span>
<span id="L17" class="LineNr"> 17 </span><span class="subxFunction">draw-grapheme-on-real-screen</span>: <span class="subxComment"># g: grapheme, x: int, y: int, color: int, background-color: int</span>
<span id="L18" class="LineNr"> 18 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L19" class="LineNr"> 19 </span> 55/push-ebp
<span id="L20" class="LineNr"> 20 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L21" class="LineNr"> 21 </span> <span class="subxComment">#</span>
<span id="L22" class="LineNr"> 22 </span> (<a href='103grapheme.subx.html#L74'>draw-grapheme-on-screen-buffer</a> *<span class="SpecialChar"><a href='boot.subx.html#L651'>Video-memory-addr</a></span> *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) 0x80 0x30)
<span id="L23" class="LineNr"> 23 </span><span class="Constant">$draw-grapheme-on-real-screen:end</span>:
<span id="L24" class="LineNr"> 24 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L25" class="LineNr"> 25 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L26" class="LineNr"> 26 </span> 5d/pop-to-ebp
<span id="L27" class="LineNr"> 27 </span> c3/return
<span id="L28" class="LineNr"> 28 </span>
<span id="L29" class="LineNr"> 29 </span><span class="subxFunction">draw-grapheme-on-screen-array</span>: <span class="subxComment"># screen-data: (addr array byte), g: grapheme, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int</span>
<span id="L30" class="LineNr"> 30 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L31" class="LineNr"> 31 </span> 55/push-ebp
<span id="L32" class="LineNr"> 32 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L33" class="LineNr"> 33 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L34" class="LineNr"> 34 </span> 50/push-eax
<span id="L35" class="LineNr"> 35 </span> 51/push-ecx
<span id="L36" class="LineNr"> 36 </span> 52/push-edx
<span id="L37" class="LineNr"> 37 </span> <span class="subxComment"># if screen-width*screen-height &gt; len(screen-data) abort</span>
<span id="L38" class="LineNr"> 38 </span> {
<span id="L39" class="LineNr"> 39 </span> <span class="subxComment"># ecx = len(screen-data)</span>
<span id="L40" class="LineNr"> 40 </span> 8b/-&gt; *(ebp+8) 1/r32/ecx
<span id="L41" class="LineNr"> 41 </span> 8b/-&gt; *ecx 1/r32/ecx
<span id="L42" class="LineNr"> 42 </span> <span class="subxComment"># eax = screen-width*screen-height</span>
<span id="L43" class="LineNr"> 43 </span> ba/copy-to-edx 0/imm32
<span id="L44" class="LineNr"> 44 </span> 8b/-&gt; *(ebp+0x20) 0/r32/eax
<span id="L45" class="LineNr"> 45 </span> f7 4/subop/multiply-into-eax *(ebp+0x24)
<span id="L46" class="LineNr"> 46 </span> 81 7/subop/compare %edx 0/imm32
<span id="L47" class="LineNr"> 47 </span> 0f 85/jump-if-!= $draw-grapheme-on-screen-array:overflow/disp32
<span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># if (eax &gt; ecx) abort</span>
<span id="L49" class="LineNr"> 49 </span> 39/compare %eax 1/r32/ecx
<span id="L50" class="LineNr"> 50 </span> 0f 8f/jump-if-&gt; $draw-grapheme-on-screen-array:<a href='317abort.subx.html#L5'>abort</a>/disp32
<span id="L51" class="LineNr"> 51 </span> }
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># eax = screen-data+4 (skip length)</span>
<span id="L53" class="LineNr"> 53 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L54" class="LineNr"> 54 </span> 05/add-to-eax 4/imm32
<span id="L55" class="LineNr"> 55 </span> <span class="subxComment">#</span>
<span id="L56" class="LineNr"> 56 </span> (<a href='103grapheme.subx.html#L74'>draw-grapheme-on-screen-buffer</a> %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L57" class="LineNr"> 57 </span><span class="Constant">$draw-grapheme-on-screen-array:end</span>:
<span id="L58" class="LineNr"> 58 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L59" class="LineNr"> 59 </span> 5a/pop-to-edx
<span id="L60" class="LineNr"> 60 </span> 59/pop-to-ecx
<span id="L61" class="LineNr"> 61 </span> 58/pop-to-eax
<span id="L62" class="LineNr"> 62 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L63" class="LineNr"> 63 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L64" class="LineNr"> 64 </span> 5d/pop-to-ebp
<span id="L65" class="LineNr"> 65 </span> c3/return
<span id="L66" class="LineNr"> 66 </span>
<span id="L67" class="LineNr"> 67 </span><span class="Constant">$draw-grapheme-on-screen-array:overflow</span>:
<span id="L68" class="LineNr"> 68 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;draw-grapheme-on-screen-array: <a href='500fake-screen.mu.html#L14'>screen</a> dimensions too large&quot;</span>)
<span id="L69" class="LineNr"> 69 </span>
<span id="L70" class="LineNr"> 70 </span><span class="Constant">$draw-grapheme-on-screen-array:<a href='317abort.subx.html#L5'>abort</a></span>:
<span id="L71" class="LineNr"> 71 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;draw-grapheme-on-screen-array: coordinates are off the screen. Are the <a href='500fake-screen.mu.html#L14'>screen</a> dimensions correct?&quot;</span>)
<span id="L72" class="LineNr"> 72 </span>
<span id="L73" class="LineNr"> 73 </span><span class="subxComment"># 'buffer' here is not a valid Mu type: a naked address without a length.</span>
<span id="L74" class="LineNr"> 74 </span><span class="subxFunction">draw-grapheme-on-screen-buffer</span>: <span class="subxComment"># buffer: (addr byte), g: grapheme, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int</span>
<span id="L75" class="LineNr"> 75 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L76" class="LineNr"> 76 </span> 55/push-ebp
<span id="L77" class="LineNr"> 77 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L78" class="LineNr"> 78 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L79" class="LineNr"> 79 </span> 50/push-eax
<span id="L80" class="LineNr"> 80 </span> 51/push-ecx
<span id="L81" class="LineNr"> 81 </span> 52/push-edx
<span id="L82" class="LineNr"> 82 </span> 53/push-ebx
<span id="L83" class="LineNr"> 83 </span> 56/push-esi
<span id="L84" class="LineNr"> 84 </span> <span class="subxComment"># switch screen-width and screen-height from grapheme to pixel units</span>
<span id="L85" class="LineNr"> 85 </span> c1 4/subop/shift-left *(ebp+20) 3/imm8/log2-font-width
<span id="L86" class="LineNr"> 86 </span> c1 4/subop/shift-left *(ebp+24) 4/imm8/log2-font-height
<span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># esi = g</span>
<span id="L88" class="LineNr"> 88 </span> 8b/-&gt; *(ebp+0xc) 6/r32/esi
<span id="L89" class="LineNr"> 89 </span> <span class="subxComment"># if (g &gt;= 128) return # characters beyond ASCII currently not supported</span>
<span id="L90" class="LineNr"> 90 </span> 81 7/subop/compare %esi 0x80/imm32
<span id="L91" class="LineNr"> 91 </span> 0f 8d/jump-if-&gt;= $draw-grapheme-on-screen-buffer:end/disp32
<span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># var letter-bitmap/esi = font[g]</span>
<span id="L93" class="LineNr"> 93 </span> c1 4/subop/shift-left %esi 4/imm8
<span id="L94" class="LineNr"> 94 </span> 81 0/subop/add %esi <span class="SpecialChar"><a href='boot.subx.html#L672'>Font</a></span>/imm32
<span id="L95" class="LineNr"> 95 </span> <span class="subxComment"># var ycurr/edx: int = y*16</span>
<span id="L96" class="LineNr"> 96 </span> 8b/-&gt; *(ebp+0x14) 2/r32/edx
<span id="L97" class="LineNr"> 97 </span> c1 4/subop/shift-left %edx 4/imm8
<span id="L98" class="LineNr"> 98 </span> <span class="subxComment"># var ymax/ebx: int = ycurr + 16</span>
<span id="L99" class="LineNr"> 99 </span> 8b/-&gt; *(ebp+0x14) 3/r32/ebx
<span id="L100" class="LineNr">100 </span> c1 4/subop/shift-left %ebx 4/imm8
<span id="L101" class="LineNr">101 </span> 81 0/subop/add %ebx 0x10/imm32
<span id="L102" class="LineNr">102 </span> {
<span id="L103" class="LineNr">103 </span> <span class="subxComment"># if (ycurr &gt;= ymax) break</span>
<span id="L104" class="LineNr">104 </span> 39/compare %edx 3/r32/ebx
<span id="L105" class="LineNr">105 </span> 0f 8d/jump-if-&gt;= <span class="Constant">break</span>/disp32
<span id="L106" class="LineNr">106 </span> <span class="subxComment"># var xcurr/eax: int = x*8 + 7</span>
<span id="L107" class="LineNr">107 </span> 8b/-&gt; *(ebp+0x10) 0/r32/eax <span class="subxComment"># font-width - 1</span>
<span id="L108" class="LineNr">108 </span> c1 4/subop/shift-left %eax 3/imm8
<span id="L109" class="LineNr">109 </span> 05/add-to-eax 7/imm32
<span id="L110" class="LineNr">110 </span> <span class="subxComment"># var xmin/ecx: int = x*8</span>
<span id="L111" class="LineNr">111 </span> 8b/-&gt; *(ebp+0x10) 1/r32/ecx
<span id="L112" class="LineNr">112 </span> c1 4/subop/shift-left %ecx 3/imm8
<span id="L113" class="LineNr">113 </span> <span class="subxComment"># var row-bitmap/ebx: int = *letter-bitmap</span>
<span id="L114" class="LineNr">114 </span> 53/push-ebx
<span id="L115" class="LineNr">115 </span> 8b/-&gt; *esi 3/r32/ebx
<span id="L116" class="LineNr">116 </span> {
<span id="L117" class="LineNr">117 </span> <span class="subxComment"># if (xcurr &lt; xmin) break</span>
<span id="L118" class="LineNr">118 </span> 39/compare %eax 1/r32/ecx
<span id="L119" class="LineNr">119 </span> 7c/jump-if-&lt; <span class="Constant">break</span>/disp8
<span id="L120" class="LineNr">120 </span> <span class="subxComment"># shift LSB from row-bitmap into carry flag (CF)</span>
<span id="L121" class="LineNr">121 </span> c1 5/subop/shift-right-logical %ebx 1/imm8
<span id="L122" class="LineNr">122 </span> <span class="subxComment"># if LSB, draw a pixel in the given color</span>
<span id="L123" class="LineNr">123 </span> {
<span id="L124" class="LineNr">124 </span> 73/jump-if-not-CF <span class="Constant">break</span>/disp8
<span id="L125" class="LineNr">125 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *(ebp+8) %eax %edx *(ebp+0x18) *(ebp+0x20) *(ebp+0x24))
<span id="L126" class="LineNr">126 </span> eb/jump $draw-grapheme-on-screen-buffer:continue/disp8
<span id="L127" class="LineNr">127 </span> }
<span id="L128" class="LineNr">128 </span> <span class="subxComment"># otherwise use the background color</span>
<span id="L129" class="LineNr">129 </span> (<a href='101screen.subx.html#L21'>pixel-on-screen-buffer</a> *(ebp+8) %eax %edx *(ebp+0x1c) *(ebp+0x20) *(ebp+0x24))
<span id="L130" class="LineNr">130 </span><span class="Constant">$draw-grapheme-on-screen-buffer:continue</span>:
<span id="L131" class="LineNr">131 </span> <span class="subxComment"># --x</span>
<span id="L132" class="LineNr">132 </span> 48/decrement-eax
<span id="L133" class="LineNr">133 </span> <span class="subxComment">#</span>
<span id="L134" class="LineNr">134 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L135" class="LineNr">135 </span> }
<span id="L136" class="LineNr">136 </span> <span class="subxComment"># reclaim row-bitmap</span>
<span id="L137" class="LineNr">137 </span> 5b/pop-to-ebx
<span id="L138" class="LineNr">138 </span> <span class="subxComment"># ++y</span>
<span id="L139" class="LineNr">139 </span> 42/increment-edx
<span id="L140" class="LineNr">140 </span> <span class="subxComment"># next bitmap row</span>
<span id="L141" class="LineNr">141 </span> 46/increment-esi
<span id="L142" class="LineNr">142 </span> <span class="subxComment">#</span>
<span id="L143" class="LineNr">143 </span> e9/jump <span class="Constant">loop</span>/disp32
<span id="L144" class="LineNr">144 </span> }
<span id="L145" class="LineNr">145 </span><span class="Constant">$draw-grapheme-on-screen-buffer:end</span>:
<span id="L146" class="LineNr">146 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L147" class="LineNr">147 </span> 5e/pop-to-esi
<span id="L148" class="LineNr">148 </span> 5b/pop-to-ebx
<span id="L149" class="LineNr">149 </span> 5a/pop-to-edx
<span id="L150" class="LineNr">150 </span> 59/pop-to-ecx
<span id="L151" class="LineNr">151 </span> 58/pop-to-eax
<span id="L152" class="LineNr">152 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L153" class="LineNr">153 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L154" class="LineNr">154 </span> 5d/pop-to-ebp
<span id="L155" class="LineNr">155 </span> c3/return
<span id="L156" class="LineNr">156 </span>
<span id="L157" class="LineNr">157 </span><span class="subxFunction">cursor-position-on-real-screen</span>: <span class="subxComment"># -&gt; _/eax: int, _/ecx: int</span>
<span id="L158" class="LineNr">158 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L159" class="LineNr">159 </span> 55/push-ebp
<span id="L160" class="LineNr">160 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L161" class="LineNr">161 </span> <span class="subxComment"># TODO: support fake screen; we currently assume 'screen' is always 0 (real)</span>
<span id="L162" class="LineNr">162 </span> 8b/-&gt; *<span class="SpecialChar"><a href='103grapheme.subx.html#L231'>Real-screen-cursor-x</a></span> 0/r32/eax
<span id="L163" class="LineNr">163 </span> 8b/-&gt; *<span class="SpecialChar"><a href='103grapheme.subx.html#L233'>Real-screen-cursor-y</a></span> 1/r32/ecx
<span id="L164" class="LineNr">164 </span><span class="Constant">$cursor-position-on-real-screen:end</span>:
<span id="L165" class="LineNr">165 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L166" class="LineNr">166 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L167" class="LineNr">167 </span> 5d/pop-to-ebp
<span id="L168" class="LineNr">168 </span> c3/return
<span id="L169" class="LineNr">169 </span>
<span id="L170" class="LineNr">170 </span><span class="subxFunction">set-cursor-position-on-real-screen</span>: <span class="subxComment"># x: int, y: int</span>
<span id="L171" class="LineNr">171 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L172" class="LineNr">172 </span> 55/push-ebp
<span id="L173" class="LineNr">173 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L174" class="LineNr">174 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L175" class="LineNr">175 </span> 50/push-eax
<span id="L176" class="LineNr">176 </span> <span class="subxComment">#</span>
<span id="L177" class="LineNr">177 </span> 8b/-&gt; *(ebp+8) 0/r32/eax
<span id="L178" class="LineNr">178 </span> 89/&lt;- *<span class="SpecialChar"><a href='103grapheme.subx.html#L231'>Real-screen-cursor-x</a></span> 0/r32/eax
<span id="L179" class="LineNr">179 </span> 8b/-&gt; *(ebp+0xc) 0/r32/eax
<span id="L180" class="LineNr">180 </span> 89/&lt;- *<span class="SpecialChar"><a href='103grapheme.subx.html#L233'>Real-screen-cursor-y</a></span> 0/r32/eax
<span id="L181" class="LineNr">181 </span><span class="Constant">$set-cursor-position-on-real-screen:end</span>:
<span id="L182" class="LineNr">182 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L183" class="LineNr">183 </span> 58/pop-to-eax
<span id="L184" class="LineNr">184 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L185" class="LineNr">185 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L186" class="LineNr">186 </span> 5d/pop-to-ebp
<span id="L187" class="LineNr">187 </span> c3/return
<span id="L188" class="LineNr">188 </span>
<span id="L189" class="LineNr">189 </span><span class="subxComment"># Not a real `show-cursor` primitive:</span>
<span id="L190" class="LineNr">190 </span><span class="subxComment"># - does not clear previous location cursor was shown at.</span>
<span id="L191" class="LineNr">191 </span><span class="subxComment"># - does not preserve what was at the cursor. Caller is responsible for</span>
<span id="L192" class="LineNr">192 </span><span class="subxComment"># tracking what was on the screen at this position before and passing it</span>
<span id="L193" class="LineNr">193 </span><span class="subxComment"># in again.</span>
<span id="L194" class="LineNr">194 </span><span class="subxComment"># - does not stop showing the cursor at this location when the cursor moves</span>
<span id="L195" class="LineNr">195 </span><span class="subxFunction">draw-cursor-on-real-screen</span>: <span class="subxComment"># g: grapheme</span>
<span id="L196" class="LineNr">196 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L197" class="LineNr">197 </span> 55/push-ebp
<span id="L198" class="LineNr">198 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L199" class="LineNr">199 </span> <span class="subxS1Comment"># . save registers</span>
<span id="L200" class="LineNr">200 </span> 50/push-eax
<span id="L201" class="LineNr">201 </span> 51/push-ecx
<span id="L202" class="LineNr">202 </span> <span class="subxComment">#</span>
<span id="L203" class="LineNr">203 </span> (<a href='103grapheme.subx.html#L157'>cursor-position-on-real-screen</a>) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L204" class="LineNr">204 </span> (<a href='103grapheme.subx.html#L17'>draw-grapheme-on-real-screen</a> *(ebp+8) %eax %ecx 0 7)
<span id="L205" class="LineNr">205 </span><span class="Constant">$draw-cursor-on-real-screen:end</span>:
<span id="L206" class="LineNr">206 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L207" class="LineNr">207 </span> 59/pop-to-ecx
<span id="L208" class="LineNr">208 </span> 58/pop-to-eax
<span id="L209" class="LineNr">209 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L210" class="LineNr">210 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L211" class="LineNr">211 </span> 5d/pop-to-ebp
<span id="L212" class="LineNr">212 </span> c3/return
<span id="L213" class="LineNr">213 </span>
<span id="L214" class="LineNr">214 </span>== data
<span id="L215" class="LineNr">215 </span>
<span id="L216" class="LineNr">216 </span><span class="subxComment"># The cursor is where certain Mu functions (usually of the form</span>
<span id="L217" class="LineNr">217 </span><span class="subxComment"># 'draw*cursor*') print to by default.</span>
<span id="L218" class="LineNr">218 </span><span class="subxComment">#</span>
<span id="L219" class="LineNr">219 </span><span class="subxComment"># We don't bother displaying the cursor when drawing. It only becomes visible</span>
<span id="L220" class="LineNr">220 </span><span class="subxComment"># on draw-cursor, which is quite rickety (see above)</span>
<span id="L221" class="LineNr">221 </span><span class="subxComment">#</span>
<span id="L222" class="LineNr">222 </span><span class="subxComment"># It's up to applications to manage cursor display:</span>
<span id="L223" class="LineNr">223 </span><span class="subxComment"># - clean up where it used to be</span>
<span id="L224" class="LineNr">224 </span><span class="subxComment"># - display the cursor before waiting for a key</span>
<span id="L225" class="LineNr">225 </span><span class="subxComment"># - ensure its location appropriately suggests the effect keystrokes will have</span>
<span id="L226" class="LineNr">226 </span><span class="subxComment"># - ensure its contents (and colors) appropriately reflect the state of the</span>
<span id="L227" class="LineNr">227 </span><span class="subxComment"># screen</span>
<span id="L228" class="LineNr">228 </span><span class="subxComment">#</span>
<span id="L229" class="LineNr">229 </span><span class="subxComment"># There's no blinking, etc. We aren't using any hardware-supported text mode</span>
<span id="L230" class="LineNr">230 </span><span class="subxComment"># here.</span>
<span id="L231" class="LineNr">231 </span><span class="SpecialChar">Real-screen-cursor-x</span>:
<span id="L232" class="LineNr">232 </span> 0/imm32
<span id="L233" class="LineNr">233 </span><span class="SpecialChar">Real-screen-cursor-y</span>:
<span id="L234" class="LineNr">234 </span> 0/imm32
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

View File

@ -364,8 +364,8 @@ if ('onhashchange' in window) {
<span id="L304" class="LineNr">304 </span> c3/return
<span id="L305" class="LineNr">305 </span>
<span id="L306" class="LineNr">306 </span><span class="Constant">$_append-4:<a href='317abort.subx.html#L5'>abort</a></span>:
<span id="L307" class="LineNr">307 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;_append-4: stream full at &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L308" class="LineNr">308 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %eax 3 0)
<span id="L307" class="LineNr">307 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;_append-4: stream full at &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L308" class="LineNr">308 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %eax 3 0)
<span id="L309" class="LineNr">309 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;&quot;</span>)
<span id="L310" class="LineNr">310 </span> <span class="subxComment"># never gets here</span>
<span id="L311" class="LineNr">311 </span>

View File

@ -322,36 +322,36 @@ if ('onhashchange' in window) {
<span id="L261" class="LineNr">261 </span> c3/return
<span id="L262" class="LineNr">262 </span>
<span id="L263" class="LineNr">263 </span><span class="Constant">$lookup:<a href='317abort.subx.html#L5'>abort</a></span>:
<span id="L264" class="LineNr">264 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;lookup failed: (&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L265" class="LineNr">265 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) 3 0)
<span id="L266" class="LineNr">266 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;, &quot;</span> 3 0)
<span id="L267" class="LineNr">267 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0xc) 3 0)
<span id="L268" class="LineNr">268 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;) -&gt; &quot;</span> 3 0)
<span id="L269" class="LineNr">269 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L270" class="LineNr">270 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;. Contents of a few words starting from address 0: &quot;</span> 3 0)
<span id="L264" class="LineNr">264 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;lookup failed: (&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L265" class="LineNr">265 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) 3 0)
<span id="L266" class="LineNr">266 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;, &quot;</span> 3 0)
<span id="L267" class="LineNr">267 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0xc) 3 0)
<span id="L268" class="LineNr">268 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;) -&gt; &quot;</span> 3 0)
<span id="L269" class="LineNr">269 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L270" class="LineNr">270 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;. Contents of a few words starting from address 0: &quot;</span> 3 0)
<span id="L271" class="LineNr">271 </span> b8/copy-to-eax 0/imm32
<span id="L272" class="LineNr">272 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 2 0)
<span id="L273" class="LineNr">273 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L272" class="LineNr">272 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 2 0)
<span id="L273" class="LineNr">273 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L274" class="LineNr">274 </span> 40/increment-eax
<span id="L275" class="LineNr">275 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L276" class="LineNr">276 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L275" class="LineNr">275 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L276" class="LineNr">276 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L277" class="LineNr">277 </span> 40/increment-eax
<span id="L278" class="LineNr">278 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L279" class="LineNr">279 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L278" class="LineNr">278 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L279" class="LineNr">279 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L280" class="LineNr">280 </span> 40/increment-eax
<span id="L281" class="LineNr">281 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L282" class="LineNr">282 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L281" class="LineNr">281 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L282" class="LineNr">282 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L283" class="LineNr">283 </span> 40/increment-eax
<span id="L284" class="LineNr">284 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L285" class="LineNr">285 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L284" class="LineNr">284 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L285" class="LineNr">285 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L286" class="LineNr">286 </span> 40/increment-eax
<span id="L287" class="LineNr">287 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L288" class="LineNr">288 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L287" class="LineNr">287 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L288" class="LineNr">288 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L289" class="LineNr">289 </span> 40/increment-eax
<span id="L290" class="LineNr">290 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L291" class="LineNr">291 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L290" class="LineNr">290 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L291" class="LineNr">291 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 2 0)
<span id="L292" class="LineNr">292 </span> 40/increment-eax
<span id="L293" class="LineNr">293 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L293" class="LineNr">293 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *eax 3 0)
<span id="L294" class="LineNr">294 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;\n&quot;</span>)
<span id="L295" class="LineNr">295 </span> <span class="subxComment"># never gets here</span>
<span id="L296" class="LineNr">296 </span>

View File

@ -82,13 +82,13 @@ if ('onhashchange' in window) {
<span id="L26" class="LineNr">26 </span> 39/compare %eax 1/r32/ecx
<span id="L27" class="LineNr">27 </span> 0f 82/jump-if-unsigned&lt; $__check-mu-array-bounds:end/disp32 <span class="subxComment"># negative index should always abort</span>
<span id="L28" class="LineNr">28 </span> <span class="subxComment"># abort if necessary</span>
<span id="L29" class="LineNr">29 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;fn &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L30" class="LineNr">30 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x14) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L31" class="LineNr">31 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;: offset &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L32" class="LineNr">32 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %eax 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L33" class="LineNr">33 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; is too large for array '&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L34" class="LineNr">34 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x18) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L35" class="LineNr">35 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;'&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L29" class="LineNr">29 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;fn &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L30" class="LineNr">30 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x14) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L31" class="LineNr">31 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;: offset &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L32" class="LineNr">32 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %eax 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L33" class="LineNr">33 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; is too large for array '&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L34" class="LineNr">34 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x18) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L35" class="LineNr">35 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;'&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L36" class="LineNr">36 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;&quot;</span>)
<span id="L37" class="LineNr">37 </span> <span class="subxComment"># never gets here</span>
<span id="L38" class="LineNr">38 </span><span class="Constant">$__check-mu-array-bounds:end</span>:
@ -102,11 +102,11 @@ if ('onhashchange' in window) {
<span id="L46" class="LineNr">46 </span> c3/return
<span id="L47" class="LineNr">47 </span>
<span id="L48" class="LineNr">48 </span><span class="subxMinorFunction">__check-mu-array-bounds:overflow</span>:
<span id="L49" class="LineNr">49 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;fn &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L50" class="LineNr">50 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x14) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L51" class="LineNr">51 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;: offset to array '&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L52" class="LineNr">52 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x18) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L53" class="LineNr">53 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;' overflowed 32 bits&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L49" class="LineNr">49 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;fn &quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L50" class="LineNr">50 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x14) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L51" class="LineNr">51 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;: offset to array '&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L52" class="LineNr">52 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0x18) 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L53" class="LineNr">53 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;' overflowed 32 bits&quot;</span> 3 0) <span class="subxComment"># 3=cyan</span>
<span id="L54" class="LineNr">54 </span> (<a href='317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;&quot;</span>)
<span id="L55" class="LineNr">55 </span> <span class="subxComment"># never gets here</span>
<span id="L56" class="LineNr">56 </span>

View File

@ -92,12 +92,12 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr"> 34 </span> <span class="subxComment">#</span>
<span id="L35" class="LineNr"> 35 </span> 89/&lt;- %edx 4/r32/esp
<span id="L36" class="LineNr"> 36 </span> <span class="subxComment"># save old cursor position</span>
<span id="L37" class="LineNr"> 37 </span> (<a href='500fake-screen.mu.html#L174'>cursor-position</a> 0) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L37" class="LineNr"> 37 </span> (<a href='500fake-screen.mu.html#L230'>cursor-position</a> 0) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L38" class="LineNr"> 38 </span> <span class="subxComment"># print at top-right</span>
<span id="L39" class="LineNr"> 39 </span> (<a href='500fake-screen.mu.html#L190'>set-cursor-position</a> 0 0x70 0)
<span id="L40" class="LineNr"> 40 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %edx 0xf 0xc)
<span id="L39" class="LineNr"> 39 </span> (<a href='500fake-screen.mu.html#L246'>set-cursor-position</a> 0 0x70 0)
<span id="L40" class="LineNr"> 40 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %edx 0xf 0xc)
<span id="L41" class="LineNr"> 41 </span> <span class="subxComment"># restore cursor position</span>
<span id="L42" class="LineNr"> 42 </span> (<a href='500fake-screen.mu.html#L190'>set-cursor-position</a> %eax %ecx)
<span id="L42" class="LineNr"> 42 </span> (<a href='500fake-screen.mu.html#L246'>set-cursor-position</a> %eax %ecx)
<span id="L43" class="LineNr"> 43 </span><span class="Constant">$show-stack-state:end</span>:
<span id="L44" class="LineNr"> 44 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L45" class="LineNr"> 45 </span> 5a/pop-to-edx
@ -122,13 +122,13 @@ if ('onhashchange' in window) {
<span id="L64" class="LineNr"> 64 </span> {
<span id="L65" class="LineNr"> 65 </span> 81 7/subop/compare *<span class="SpecialChar"><a href='315stack-debug.subx.html#L121'>Really-debug-print</a></span> 0/imm32/false
<span id="L66" class="LineNr"> 66 </span> 74/jump-if-= <span class="Constant">break</span>/disp8
<span id="L67" class="LineNr"> 67 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) *(ebp+0xc) *(ebp+0x10))
<span id="L67" class="LineNr"> 67 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) *(ebp+0xc) *(ebp+0x10))
<span id="L68" class="LineNr"> 68 </span> <span class="subxComment"># clear the screen and continue if we got too close to the bottom</span>
<span id="L69" class="LineNr"> 69 </span> (<a href='500fake-screen.mu.html#L174'>cursor-position</a> 0) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L69" class="LineNr"> 69 </span> (<a href='500fake-screen.mu.html#L230'>cursor-position</a> 0) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L70" class="LineNr"> 70 </span> 81 7/subop/compare %ecx 0x28/imm32
<span id="L71" class="LineNr"> 71 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L72" class="LineNr"> 72 </span> (<a href='500fake-screen.mu.html#L251'>clear-screen</a> 0)
<span id="L73" class="LineNr"> 73 </span> (<a href='500fake-screen.mu.html#L190'>set-cursor-position</a> 0 0 0)
<span id="L72" class="LineNr"> 72 </span> (<a href='500fake-screen.mu.html#L307'>clear-screen</a> 0)
<span id="L73" class="LineNr"> 73 </span> (<a href='500fake-screen.mu.html#L246'>set-cursor-position</a> 0 0 0)
<span id="L74" class="LineNr"> 74 </span> }
<span id="L75" class="LineNr"> 75 </span><span class="Constant">$debug-print:end</span>:
<span id="L76" class="LineNr"> 76 </span> <span class="subxS1Comment"># . restore registers</span>

View File

@ -65,8 +65,8 @@ if ('onhashchange' in window) {
<span id="L7" class="LineNr"> 7 </span> 55/push-ebp
<span id="L8" class="LineNr"> 8 </span> 89/&lt;- %ebp 4/r32/esp
<span id="L9" class="LineNr"> 9 </span> <span class="subxComment">#</span>
<span id="L10" class="LineNr"> 10 </span> (<a href='103grapheme.subx.html#L170'>set-cursor-position-on-real-screen</a> 0 0)
<span id="L11" class="LineNr"> 11 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) 0xf 0xc) <span class="subxComment"># 0/real-screen, 0xf/fg=white, 0xc/bg=red</span>
<span id="L10" class="LineNr"> 10 </span> (<a href='103glyph.subx.html#L301'>set-cursor-position-on-real-screen</a> 0 0)
<span id="L11" class="LineNr"> 11 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+8) 0xf 0xc) <span class="subxComment"># 0/real-screen, 0xf/fg=white, 0xc/bg=red</span>
<span id="L12" class="LineNr"> 12 </span> (<a href='317abort.subx.html#L21'>dump-call-stack</a>)
<span id="L13" class="LineNr"> 13 </span> <span class="subxComment"># crash</span>
<span id="L14" class="LineNr"> 14 </span> {
@ -101,9 +101,9 @@ if ('onhashchange' in window) {
<span id="L43" class="LineNr"> 43 </span> 81 7/subop/compare %ebx 0/imm32
<span id="L44" class="LineNr"> 44 </span> 0f 84/jump-if-= <span class="Constant">break</span>/disp32
<span id="L45" class="LineNr"> 45 </span> <span class="subxComment"># loop body</span>
<span id="L46" class="LineNr"> 46 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;\n&quot;</span> 0 0xc)
<span id="L47" class="LineNr"> 47 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebx+4) 0xf 0xc)
<span id="L48" class="LineNr"> 48 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 0 0xc)
<span id="L46" class="LineNr"> 46 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;\n&quot;</span> 0 0xc)
<span id="L47" class="LineNr"> 47 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebx+4) 0xf 0xc)
<span id="L48" class="LineNr"> 48 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot; &quot;</span> 0 0xc)
<span id="L49" class="LineNr"> 49 </span> (<a href='317abort.subx.html#L233'>containing-function</a> %edx *(ebx+4)) <span class="subxComment"># =&gt; eax, ecx</span>
<span id="L50" class="LineNr"> 50 </span> (<a href='317abort.subx.html#L294'>draw-slice-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 %eax %ecx 0 0xc)
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># loop update</span>
@ -140,7 +140,7 @@ if ('onhashchange' in window) {
<span id="L82" class="LineNr"> 82 </span> c7 0/subop/copy *(ecx+4) 0/imm32 <span class="subxComment"># read index</span>
<span id="L83" class="LineNr"> 83 </span> c7 0/subop/copy *(ecx+8) 0x01000000/imm32 <span class="subxComment"># stream capacity = 16MB</span>
<span id="L84" class="LineNr"> 84 </span> <span class="subxComment"># load sectors starting from sector 10080 = 0x2760</span>
<span id="L85" class="LineNr"> 85 </span> (<a href='510disk.mu.html#L1'>load-sectors</a> <span class="SpecialChar"><a href='boot.subx.html#L923'>Primary-bus-primary-drive</a></span> 0x2760 0x800 %ecx) <span class="subxComment"># 0x800 sectors = 1MB</span>
<span id="L85" class="LineNr"> 85 </span> (<a href='510disk.mu.html#L1'>load-sectors</a> <span class="SpecialChar"><a href='boot.subx.html#L709'>Primary-bus-primary-drive</a></span> 0x2760 0x800 %ecx) <span class="subxComment"># 0x800 sectors = 1MB</span>
<span id="L86" class="LineNr"> 86 </span> <span class="subxH1Comment"># - parse pointers to portions of this stream into labels</span>
<span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># var curr/ecx: (addr byte) = s-&gt;data</span>
<span id="L88" class="LineNr"> 88 </span> 81 0/subop/add %ecx 0xc/imm32
@ -190,7 +190,7 @@ if ('onhashchange' in window) {
<span id="L132" class="LineNr">132 </span> 3d/compare-eax-and 0/imm32
<span id="L133" class="LineNr">133 </span> {
<span id="L134" class="LineNr">134 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L135" class="LineNr">135 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;done loading&quot;</span> 7 0)
<span id="L135" class="LineNr">135 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;done loading&quot;</span> 7 0)
<span id="L136" class="LineNr">136 </span> {
<span id="L137" class="LineNr">137 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L138" class="LineNr">138 </span> }
@ -198,7 +198,7 @@ if ('onhashchange' in window) {
<span id="L140" class="LineNr">140 </span> 3d/compare-eax-and 0xa/imm32/newline
<span id="L141" class="LineNr">141 </span> {
<span id="L142" class="LineNr">142 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L143" class="LineNr">143 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;unexpected newline&quot;</span> 7 0)
<span id="L143" class="LineNr">143 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;unexpected newline&quot;</span> 7 0)
<span id="L144" class="LineNr">144 </span> {
<span id="L145" class="LineNr">145 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L146" class="LineNr">146 </span> }
@ -231,7 +231,7 @@ if ('onhashchange' in window) {
<span id="L173" class="LineNr">173 </span> 3d/compare-eax-and 0/imm32
<span id="L174" class="LineNr">174 </span> {
<span id="L175" class="LineNr">175 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L176" class="LineNr">176 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;done loading&quot;</span> 7 0)
<span id="L176" class="LineNr">176 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;done loading&quot;</span> 7 0)
<span id="L177" class="LineNr">177 </span> {
<span id="L178" class="LineNr">178 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L179" class="LineNr">179 </span> }
@ -239,7 +239,7 @@ if ('onhashchange' in window) {
<span id="L181" class="LineNr">181 </span> 3d/compare-eax-and 0x20/imm32/space
<span id="L182" class="LineNr">182 </span> {
<span id="L183" class="LineNr">183 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L184" class="LineNr">184 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;unexpected space&quot;</span> 7 0)
<span id="L184" class="LineNr">184 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;unexpected space&quot;</span> 7 0)
<span id="L185" class="LineNr">185 </span> {
<span id="L186" class="LineNr">186 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L187" class="LineNr">187 </span> }
@ -310,8 +310,8 @@ if ('onhashchange' in window) {
<span id="L252" class="LineNr">252 </span> 39/compare %ecx 2/r32/edx
<span id="L253" class="LineNr">253 </span> {
<span id="L254" class="LineNr">254 </span> 0f 82/jump-if-addr&lt; <span class="Constant">break</span>/disp32
<span id="L255" class="LineNr">255 </span> (<a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;failed to find function for address &quot;</span> 7 0)
<span id="L256" class="LineNr">256 </span> (<a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0xc) 7 0)
<span id="L255" class="LineNr">255 </span> (<a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 <span class="Constant">&quot;failed to find function for address &quot;</span> 7 0)
<span id="L256" class="LineNr">256 </span> (<a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> 0 *(ebp+0xc) 7 0)
<span id="L257" class="LineNr">257 </span> {
<span id="L258" class="LineNr">258 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L259" class="LineNr">259 </span> }
@ -369,22 +369,21 @@ if ('onhashchange' in window) {
<span id="L311" class="LineNr">311 </span> 73/jump-if-addr&gt;= <span class="Constant">break</span>/disp8
<span id="L312" class="LineNr">312 </span> <span class="subxComment"># print *curr</span>
<span id="L313" class="LineNr">313 </span> 8a/byte-&gt; *ecx 0/r32/eax
<span id="L314" class="LineNr">314 </span> (<a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> *(ebp+8) %eax *(ebp+0x14) *(ebp+0x18))
<span id="L315" class="LineNr">315 </span> (<a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> *(ebp+8))
<span id="L316" class="LineNr">316 </span> <span class="subxComment">#</span>
<span id="L317" class="LineNr">317 </span> 41/increment-ecx
<span id="L318" class="LineNr">318 </span> <span class="subxComment">#</span>
<span id="L319" class="LineNr">319 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L320" class="LineNr">320 </span> }
<span id="L321" class="LineNr">321 </span><span class="Constant">$draw-slice-wrapping-right-then-down-from-cursor-over-full-screen:end</span>:
<span id="L322" class="LineNr">322 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L323" class="LineNr">323 </span> 5a/pop-to-edx
<span id="L324" class="LineNr">324 </span> 59/pop-to-ecx
<span id="L325" class="LineNr">325 </span> 58/pop-to-eax
<span id="L326" class="LineNr">326 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L327" class="LineNr">327 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L328" class="LineNr">328 </span> 5d/pop-to-ebp
<span id="L329" class="LineNr">329 </span> c3/return
<span id="L314" class="LineNr">314 </span> (<a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> *(ebp+8) %eax *(ebp+0x14) *(ebp+0x18))
<span id="L315" class="LineNr">315 </span> <span class="subxComment">#</span>
<span id="L316" class="LineNr">316 </span> 41/increment-ecx
<span id="L317" class="LineNr">317 </span> <span class="subxComment">#</span>
<span id="L318" class="LineNr">318 </span> eb/jump <span class="Constant">loop</span>/disp8
<span id="L319" class="LineNr">319 </span> }
<span id="L320" class="LineNr">320 </span><span class="Constant">$draw-slice-wrapping-right-then-down-from-cursor-over-full-screen:end</span>:
<span id="L321" class="LineNr">321 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L322" class="LineNr">322 </span> 5a/pop-to-edx
<span id="L323" class="LineNr">323 </span> 59/pop-to-ecx
<span id="L324" class="LineNr">324 </span> 58/pop-to-eax
<span id="L325" class="LineNr">325 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L326" class="LineNr">326 </span> 89/&lt;- %esp 5/r32/ebp
<span id="L327" class="LineNr">327 </span> 5d/pop-to-ebp
<span id="L328" class="LineNr">328 </span> c3/return
</pre>
</body>
</html>

View File

@ -62,7 +62,7 @@ if ('onhashchange' in window) {
<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">#</span>
<span id="L8" class="LineNr"> 8 </span> 8b/-&gt; *<span class="SpecialChar"><a href='boot.subx.html#L378'>Timer-counter</a></span> 0/r32/eax
<span id="L8" class="LineNr"> 8 </span> 8b/-&gt; *<span class="SpecialChar"><a href='boot.subx.html#L402'>Timer-counter</a></span> 0/r32/eax
<span id="L9" class="LineNr"> 9 </span><span class="Constant">$timer-counter:end</span>:
<span id="L10" class="LineNr">10 </span> <span class="subxS1Comment"># . epilogue</span>
<span id="L11" class="LineNr">11 </span> 89/&lt;- %esp 5/r32/ebp

239
html/400.mu.html generated
View File

@ -57,125 +57,126 @@ if ('onhashchange' in window) {
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># screen</span>
<span id="L2" class="LineNr"> 2 </span><span class="PreProc">sig</span> <a href='101screen.subx.html#L8'>pixel-on-real-screen</a> x: int, y: int, color: int
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">sig</span> <a href='103grapheme.subx.html#L17'>draw-grapheme-on-real-screen</a> g: grapheme, x: int, y: int, color: int, background-color: int
<span id="L4" class="LineNr"> 4 </span><span class="PreProc">sig</span> <a href='103grapheme.subx.html#L29'>draw-grapheme-on-screen-array</a> screen-data: (addr array byte), g: grapheme, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int
<span id="L5" class="LineNr"> 5 </span><span class="PreProc">sig</span> <a href='103grapheme.subx.html#L157'>cursor-position-on-real-screen</a><span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int
<span id="L6" class="LineNr"> 6 </span><span class="PreProc">sig</span> <a href='103grapheme.subx.html#L170'>set-cursor-position-on-real-screen</a> x: int, y: int
<span id="L7" class="LineNr"> 7 </span><span class="PreProc">sig</span> <a href='103grapheme.subx.html#L195'>draw-cursor-on-real-screen</a> g: grapheme
<span id="L8" class="LineNr"> 8 </span><span class="PreProc">sig</span> <a href='316colors.subx.html#L7'>color-rgb</a> color: int<span class="PreProc"> -&gt; </span>_/<span class="muRegEcx">ecx</span>: int, _/<span class="muRegEdx">edx</span>: int, _/<span class="muRegEbx">ebx</span>: int
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># timer</span>
<span id="L11" class="LineNr"> 11 </span><span class="PreProc">sig</span> <a href='319timer.subx.html#L3'>timer-counter</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L12" class="LineNr"> 12 </span>
<span id="L13" class="LineNr"> 13 </span><span class="muComment"># keyboard</span>
<span id="L14" class="LineNr"> 14 </span><span class="PreProc">sig</span> <a href='102keyboard.subx.html#L21'>read-key</a> kbd: (addr keyboard)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L15" class="LineNr"> 15 </span>
<span id="L16" class="LineNr"> 16 </span><span class="muComment"># disk</span>
<span id="L17" class="LineNr"> 17 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L976'>read-ata-disk</a> disk: (addr disk), lba: int, n: int, out: (addr stream byte)
<span id="L18" class="LineNr"> 18 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L1045'>write-ata-disk</a> disk: (addr disk), lba: int, n: int, out: (addr stream byte)
<span id="L19" class="LineNr"> 19 </span>
<span id="L20" class="LineNr"> 20 </span><span class="muComment"># mouse</span>
<span id="L21" class="LineNr"> 21 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L1451'>read-mouse-event</a><span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int
<span id="L22" class="LineNr"> 22 </span>
<span id="L23" class="LineNr"> 23 </span><span class="muComment"># tests</span>
<span id="L24" class="LineNr"> 24 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L25" class="LineNr"> 25 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L17'>num-test-failures</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L26" class="LineNr"> 26 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L29'>running-tests?</a><span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L27" class="LineNr"> 27 </span>
<span id="L28" class="LineNr"> 28 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L8'>string-equal?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L29" class="LineNr"> 29 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L50'>string-starts-with?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L30" class="LineNr"> 30 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L213'>check-strings-equal</a> s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
<span id="L31" class="LineNr"> 31 </span>
<span id="L32" class="LineNr"> 32 </span><span class="muComment"># debugging</span>
<span id="L33" class="LineNr"> 33 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L5'>check-stack</a>
<span id="L34" class="LineNr"> 34 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L26'>show-stack-state</a>
<span id="L35" class="LineNr"> 35 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L56'>debug-print</a> x: (addr array byte), fg: int, bg: int
<span id="L36" class="LineNr"> 36 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L84'>debug-print?</a><span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L37" class="LineNr"> 37 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L96'>turn-on-debug-print</a>
<span id="L38" class="LineNr"> 38 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L108'>turn-off-debug-print</a>
<span id="L39" class="LineNr"> 39 </span><span class="PreProc">sig</span> <a href='317abort.subx.html#L5'>abort</a> e: (addr array byte)
<span id="L40" class="LineNr"> 40 </span><span class="PreProc">sig</span> <a href='317abort.subx.html#L21'>dump-call-stack</a>
<span id="L41" class="LineNr"> 41 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L78'>heap-bound</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L42" class="LineNr"> 42 </span>
<span id="L43" class="LineNr"> 43 </span><span class="PreProc">sig</span> <a href='318debug-counter.subx.html#L5'>count-event</a>
<span id="L44" class="LineNr"> 44 </span><span class="PreProc">sig</span> <a href='318debug-counter.subx.html#L17'>count-of-events</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L45" class="LineNr"> 45 </span>
<span id="L46" class="LineNr"> 46 </span><span class="muComment"># streams</span>
<span id="L47" class="LineNr"> 47 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L20'>clear-stream</a> f: (addr stream _)
<span id="L48" class="LineNr"> 48 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L59'>rewind-stream</a> f: (addr stream _)
<span id="L49" class="LineNr"> 49 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L9'>stream-data-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L50" class="LineNr"> 50 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L211'>streams-data-equal?</a> a: (addr stream byte), b: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L51" class="LineNr"> 51 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L194'>check-stream-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
<span id="L52" class="LineNr"> 52 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L300'>check-streams-data-equal</a> s: (addr stream _), expected: (addr stream _), msg: (addr array byte)
<span id="L53" class="LineNr"> 53 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L230'>next-stream-line-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L54" class="LineNr"> 54 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L565'>check-next-stream-line-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
<span id="L55" class="LineNr"> 55 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L11'>write</a> f: (addr stream byte), s: (addr array byte)
<span id="L56" class="LineNr"> 56 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L138'>try-write</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L57" class="LineNr"> 57 </span><span class="muComment"># probably a bad idea; I definitely want to discourage its use for streams of non-bytes</span>
<span id="L58" class="LineNr"> 58 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L194'>stream-size</a> f: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L59" class="LineNr"> 59 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L176'>space-remaining-in-stream</a> f: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L60" class="LineNr"> 60 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L8'>write-stream</a> f: (addr stream byte), s: (addr stream byte)
<span id="L61" class="LineNr"> 61 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L163'>write-stream-immutable</a> f: (addr stream byte), s: (addr stream byte)
<span id="L62" class="LineNr"> 62 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L13'>read-byte</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L63" class="LineNr"> 63 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L47'>peek-byte</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L64" class="LineNr"> 64 </span><span class="PreProc">sig</span> <a href='115write-byte.subx.html#L12'>append-byte</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
<span id="L65" class="LineNr"> 65 </span><span class="muComment">#sig to-hex-char in/eax: int -&gt; out/eax: int</span>
<span id="L66" class="LineNr"> 66 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L21'>append-byte-hex</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
<span id="L67" class="LineNr"> 67 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> f: (addr stream byte), n: int
<span id="L68" class="LineNr"> 68 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L123'>write-int32-hex-bits</a> f: (addr stream byte), n: int, bits: int
<span id="L69" class="LineNr"> 69 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L9'>hex-int?</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L70" class="LineNr"> 70 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L354'>parse-hex-int</a> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L71" class="LineNr"> 71 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L387'>parse-hex-int-from-slice</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L72" class="LineNr"> 72 </span><span class="muComment">#sig parse-hex-int-helper start: (addr byte), end: (addr byte) -&gt; _/eax: int</span>
<span id="L73" class="LineNr"> 73 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L701'>hex-digit?</a> c: byte<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L74" class="LineNr"> 74 </span><span class="muComment">#sig from-hex-char in/eax: byte -&gt; out/eax: nibble</span>
<span id="L75" class="LineNr"> 75 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L23'>parse-decimal-int</a> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L76" class="LineNr"> 76 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L77" class="LineNr"> 77 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L48'>parse-decimal-int-from-stream</a> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L78" class="LineNr"> 78 </span><span class="muComment">#sig parse-decimal-int-helper start: (addr byte), end: (addr byte) -&gt; _/eax: int</span>
<span id="L79" class="LineNr"> 79 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n: int<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L80" class="LineNr"> 80 </span><span class="muComment">#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L81" class="LineNr"> 81 </span><span class="muComment">#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L82" class="LineNr"> 82 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L235'>lookup</a> h: (handle _T)<span class="PreProc"> -&gt; </span>_/eax: (addr _T)
<span id="L83" class="LineNr"> 83 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L460'>handle-equal?</a> a: (handle _T), b: (handle _T)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L491'>copy-handle</a> src: (handle _T), dest: (addr handle _T)
<span id="L85" class="LineNr"> 85 </span><span class="muComment">#sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor)</span>
<span id="L86" class="LineNr"> 86 </span><span class="muComment">#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L87" class="LineNr"> 87 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L702'>copy-array</a> ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
<span id="L88" class="LineNr"> 88 </span><span class="muComment">#sig zero-out start: (addr byte), size: int</span>
<span id="L89" class="LineNr"> 89 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L9'>slice-empty?</a> s: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L90" class="LineNr"> 90 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L120'>slice-equal?</a> s: (addr slice), p: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L91" class="LineNr"> 91 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L487'>slice-starts-with?</a> s: (addr slice), head: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L92" class="LineNr"> 92 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L793'>write-slice</a> out: (addr stream byte), s: (addr slice)
<span id="L93" class="LineNr"> 93 </span><span class="muComment"># bad name alert</span>
<span id="L94" class="LineNr"> 94 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L898'>slice-to-string</a> ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
<span id="L95" class="LineNr"> 95 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> out: (addr stream byte), n: int
<span id="L96" class="LineNr"> 96 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L327'>decimal-digit?</a> c: grapheme<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L97" class="LineNr"> 97 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L426'>to-decimal-digit</a> in: grapheme<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L98" class="LineNr"> 98 </span><span class="muComment"># bad name alert</span>
<span id="L99" class="LineNr"> 99 </span><span class="muComment"># next-word really tokenizes</span>
<span id="L100" class="LineNr">100 </span><span class="muComment"># next-raw-word really reads whitespace-separated words</span>
<span id="L101" class="LineNr">101 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L11'>next-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># merges '#' comments into a single word</span>
<span id="L102" class="LineNr">102 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L321'>next-raw-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># does not merge '#' comments</span>
<span id="L103" class="LineNr">103 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L188'>skip-chars-matching</a> in: (addr stream byte), delimiter: byte
<span id="L104" class="LineNr">104 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L311'>skip-chars-matching-whitespace</a> in: (addr stream byte)
<span id="L105" class="LineNr">105 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L401'>skip-chars-not-matching</a> in: (addr stream byte), delimiter: byte
<span id="L106" class="LineNr">106 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L563'>skip-chars-not-matching-whitespace</a> in: (addr stream byte)
<span id="L107" class="LineNr">107 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L6'>stream-empty?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L108" class="LineNr">108 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L30'>stream-full?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L109" class="LineNr">109 </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="L110" class="LineNr">110 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L124'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L111" class="LineNr">111 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L154'>stream-first</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L112" class="LineNr">112 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L181'>stream-final</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L113" class="LineNr">113 </span>
<span id="L114" class="LineNr">114 </span><span class="muComment">#sig copy-bytes src: (addr byte), dest: (addr byte), n: int</span>
<span id="L115" class="LineNr">115 </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="L116" class="LineNr">116 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L5'>array-equal?</a> a: (addr array int), b: (addr array int)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L117" class="LineNr">117 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L368'>parse-array-of-ints</a> s: (addr array byte), out: (addr handle array int)
<span id="L118" class="LineNr">118 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L623'>parse-array-of-decimal-ints</a> s: (addr array byte), out: (addr handle array int)
<span id="L119" class="LineNr">119 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L382'>check-array-equal</a> a: (addr array int), expected: (addr array byte), msg: (addr array byte)
<span id="L120" class="LineNr">120 </span>
<span id="L121" class="LineNr">121 </span><span class="PreProc">sig</span> <a href='314divide.subx.html#L3'>integer-divide</a> a: int, b: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEdx">edx</span>: int
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L18'>draw-code-point-on-real-screen</a> c: code-point, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L4" class="LineNr"> 4 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L30'>draw-code-point-on-screen-array</a> screen-data: (addr array byte), c: code-point, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L5" class="LineNr"> 5 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L113'>wide-code-point?</a> c: code-point<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L6" class="LineNr"> 6 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L288'>cursor-position-on-real-screen</a><span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int
<span id="L7" class="LineNr"> 7 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L301'>set-cursor-position-on-real-screen</a> x: int, y: int
<span id="L8" class="LineNr"> 8 </span><span class="PreProc">sig</span> <a href='103glyph.subx.html#L326'>draw-cursor-on-real-screen</a> c: code-point
<span id="L9" class="LineNr"> 9 </span><span class="PreProc">sig</span> <a href='316colors.subx.html#L7'>color-rgb</a> color: int<span class="PreProc"> -&gt; </span>_/<span class="muRegEcx">ecx</span>: int, _/<span class="muRegEdx">edx</span>: int, _/<span class="muRegEbx">ebx</span>: int
<span id="L10" class="LineNr"> 10 </span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># timer</span>
<span id="L12" class="LineNr"> 12 </span><span class="PreProc">sig</span> <a href='319timer.subx.html#L3'>timer-counter</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L13" class="LineNr"> 13 </span>
<span id="L14" class="LineNr"> 14 </span><span class="muComment"># keyboard</span>
<span id="L15" class="LineNr"> 15 </span><span class="PreProc">sig</span> <a href='102keyboard.subx.html#L21'>read-key</a> kbd: (addr keyboard)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L16" class="LineNr"> 16 </span>
<span id="L17" class="LineNr"> 17 </span><span class="muComment"># disk</span>
<span id="L18" class="LineNr"> 18 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L762'>read-ata-disk</a> disk: (addr disk), lba: int, n: int, out: (addr stream byte)
<span id="L19" class="LineNr"> 19 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L831'>write-ata-disk</a> disk: (addr disk), lba: int, n: int, out: (addr stream byte)
<span id="L20" class="LineNr"> 20 </span>
<span id="L21" class="LineNr"> 21 </span><span class="muComment"># mouse</span>
<span id="L22" class="LineNr"> 22 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L1237'>read-mouse-event</a><span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int
<span id="L23" class="LineNr"> 23 </span>
<span id="L24" class="LineNr"> 24 </span><span class="muComment"># tests</span>
<span id="L25" class="LineNr"> 25 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L26" class="LineNr"> 26 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L17'>num-test-failures</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L27" class="LineNr"> 27 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L29'>running-tests?</a><span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L28" class="LineNr"> 28 </span>
<span id="L29" class="LineNr"> 29 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L8'>string-equal?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L30" class="LineNr"> 30 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L50'>string-starts-with?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L31" class="LineNr"> 31 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L213'>check-strings-equal</a> s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
<span id="L32" class="LineNr"> 32 </span>
<span id="L33" class="LineNr"> 33 </span><span class="muComment"># debugging</span>
<span id="L34" class="LineNr"> 34 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L5'>check-stack</a>
<span id="L35" class="LineNr"> 35 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L26'>show-stack-state</a>
<span id="L36" class="LineNr"> 36 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L56'>debug-print</a> x: (addr array byte), fg: int, bg: int
<span id="L37" class="LineNr"> 37 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L84'>debug-print?</a><span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L38" class="LineNr"> 38 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L96'>turn-on-debug-print</a>
<span id="L39" class="LineNr"> 39 </span><span class="PreProc">sig</span> <a href='315stack-debug.subx.html#L108'>turn-off-debug-print</a>
<span id="L40" class="LineNr"> 40 </span><span class="PreProc">sig</span> <a href='317abort.subx.html#L5'>abort</a> e: (addr array byte)
<span id="L41" class="LineNr"> 41 </span><span class="PreProc">sig</span> <a href='317abort.subx.html#L21'>dump-call-stack</a>
<span id="L42" class="LineNr"> 42 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L78'>heap-bound</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L43" class="LineNr"> 43 </span>
<span id="L44" class="LineNr"> 44 </span><span class="PreProc">sig</span> <a href='318debug-counter.subx.html#L5'>count-event</a>
<span id="L45" class="LineNr"> 45 </span><span class="PreProc">sig</span> <a href='318debug-counter.subx.html#L17'>count-of-events</a><span class="PreProc"> -&gt; </span>_/eax: int
<span id="L46" class="LineNr"> 46 </span>
<span id="L47" class="LineNr"> 47 </span><span class="muComment"># streams</span>
<span id="L48" class="LineNr"> 48 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L20'>clear-stream</a> f: (addr stream _)
<span id="L49" class="LineNr"> 49 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L59'>rewind-stream</a> f: (addr stream _)
<span id="L50" class="LineNr"> 50 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L9'>stream-data-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L51" class="LineNr"> 51 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L211'>streams-data-equal?</a> a: (addr stream byte), b: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L52" class="LineNr"> 52 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L194'>check-stream-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
<span id="L53" class="LineNr"> 53 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L300'>check-streams-data-equal</a> s: (addr stream _), expected: (addr stream _), msg: (addr array byte)
<span id="L54" class="LineNr"> 54 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L230'>next-stream-line-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L55" class="LineNr"> 55 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L565'>check-next-stream-line-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
<span id="L56" class="LineNr"> 56 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L11'>write</a> f: (addr stream byte), s: (addr array byte)
<span id="L57" class="LineNr"> 57 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L138'>try-write</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L58" class="LineNr"> 58 </span><span class="muComment"># probably a bad idea; I definitely want to discourage its use for streams of non-bytes</span>
<span id="L59" class="LineNr"> 59 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L194'>stream-size</a> f: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L60" class="LineNr"> 60 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L176'>space-remaining-in-stream</a> f: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L61" class="LineNr"> 61 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L8'>write-stream</a> f: (addr stream byte), s: (addr stream byte)
<span id="L62" class="LineNr"> 62 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L163'>write-stream-immutable</a> f: (addr stream byte), s: (addr stream byte)
<span id="L63" class="LineNr"> 63 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L13'>read-byte</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L64" class="LineNr"> 64 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L47'>peek-byte</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L65" class="LineNr"> 65 </span><span class="PreProc">sig</span> <a href='115write-byte.subx.html#L12'>append-byte</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
<span id="L66" class="LineNr"> 66 </span><span class="muComment">#sig to-hex-char in/eax: int -&gt; out/eax: int</span>
<span id="L67" class="LineNr"> 67 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L21'>append-byte-hex</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
<span id="L68" class="LineNr"> 68 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> f: (addr stream byte), n: int
<span id="L69" class="LineNr"> 69 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L123'>write-int32-hex-bits</a> f: (addr stream byte), n: int, bits: int
<span id="L70" class="LineNr"> 70 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L9'>hex-int?</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L71" class="LineNr"> 71 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L354'>parse-hex-int</a> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L72" class="LineNr"> 72 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L387'>parse-hex-int-from-slice</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L73" class="LineNr"> 73 </span><span class="muComment">#sig parse-hex-int-helper start: (addr byte), end: (addr byte) -&gt; _/eax: int</span>
<span id="L74" class="LineNr"> 74 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L701'>hex-digit?</a> c: byte<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L75" class="LineNr"> 75 </span><span class="muComment">#sig from-hex-char in/eax: byte -&gt; out/eax: nibble</span>
<span id="L76" class="LineNr"> 76 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L23'>parse-decimal-int</a> in: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L77" class="LineNr"> 77 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> in: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L78" class="LineNr"> 78 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L48'>parse-decimal-int-from-stream</a> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L79" class="LineNr"> 79 </span><span class="muComment">#sig parse-decimal-int-helper start: (addr byte), end: (addr byte) -&gt; _/eax: int</span>
<span id="L80" class="LineNr"> 80 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n: int<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L81" class="LineNr"> 81 </span><span class="muComment">#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L82" class="LineNr"> 82 </span><span class="muComment">#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L83" class="LineNr"> 83 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L235'>lookup</a> h: (handle _T)<span class="PreProc"> -&gt; </span>_/eax: (addr _T)
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L460'>handle-equal?</a> a: (handle _T), b: (handle _T)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L85" class="LineNr"> 85 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L491'>copy-handle</a> src: (handle _T), dest: (addr handle _T)
<span id="L86" class="LineNr"> 86 </span><span class="muComment">#sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor)</span>
<span id="L87" class="LineNr"> 87 </span><span class="muComment">#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
<span id="L88" class="LineNr"> 88 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L702'>copy-array</a> ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
<span id="L89" class="LineNr"> 89 </span><span class="muComment">#sig zero-out start: (addr byte), size: int</span>
<span id="L90" class="LineNr"> 90 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L9'>slice-empty?</a> s: (addr slice)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L91" class="LineNr"> 91 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L120'>slice-equal?</a> s: (addr slice), p: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L92" class="LineNr"> 92 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L487'>slice-starts-with?</a> s: (addr slice), head: (addr array byte)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L93" class="LineNr"> 93 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L793'>write-slice</a> out: (addr stream byte), s: (addr slice)
<span id="L94" class="LineNr"> 94 </span><span class="muComment"># bad name alert</span>
<span id="L95" class="LineNr"> 95 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L898'>slice-to-string</a> ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
<span id="L96" class="LineNr"> 96 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> out: (addr stream byte), n: int
<span id="L97" class="LineNr"> 97 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L327'>decimal-digit?</a> c: grapheme<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L98" class="LineNr"> 98 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L426'>to-decimal-digit</a> in: grapheme<span class="PreProc"> -&gt; </span>_/eax: int
<span id="L99" class="LineNr"> 99 </span><span class="muComment"># bad name alert</span>
<span id="L100" class="LineNr">100 </span><span class="muComment"># next-word really tokenizes</span>
<span id="L101" class="LineNr">101 </span><span class="muComment"># next-raw-word really reads whitespace-separated words</span>
<span id="L102" class="LineNr">102 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L11'>next-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># merges '#' comments into a single word</span>
<span id="L103" class="LineNr">103 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L321'>next-raw-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># does not merge '#' comments</span>
<span id="L104" class="LineNr">104 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L188'>skip-chars-matching</a> in: (addr stream byte), delimiter: byte
<span id="L105" class="LineNr">105 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L311'>skip-chars-matching-whitespace</a> in: (addr stream byte)
<span id="L106" class="LineNr">106 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L401'>skip-chars-not-matching</a> in: (addr stream byte), delimiter: byte
<span id="L107" class="LineNr">107 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L563'>skip-chars-not-matching-whitespace</a> in: (addr stream byte)
<span id="L108" class="LineNr">108 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L6'>stream-empty?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L109" class="LineNr">109 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L30'>stream-full?</a> s: (addr stream _)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L110" class="LineNr">110 </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="L111" class="LineNr">111 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L124'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
<span id="L112" class="LineNr">112 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L154'>stream-first</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L113" class="LineNr">113 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L181'>stream-final</a> s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: byte
<span id="L114" class="LineNr">114 </span>
<span id="L115" class="LineNr">115 </span><span class="muComment">#sig copy-bytes src: (addr byte), dest: (addr byte), n: int</span>
<span id="L116" class="LineNr">116 </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="L117" class="LineNr">117 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L5'>array-equal?</a> a: (addr array int), b: (addr array int)<span class="PreProc"> -&gt; </span>_/eax: boolean
<span id="L118" class="LineNr">118 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L368'>parse-array-of-ints</a> s: (addr array byte), out: (addr handle array int)
<span id="L119" class="LineNr">119 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L623'>parse-array-of-decimal-ints</a> s: (addr array byte), out: (addr handle array int)
<span id="L120" class="LineNr">120 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L382'>check-array-equal</a> a: (addr array int), expected: (addr array byte), msg: (addr array byte)
<span id="L121" class="LineNr">121 </span>
<span id="L122" class="LineNr">122 </span><span class="PreProc">sig</span> <a href='314divide.subx.html#L3'>integer-divide</a> a: int, b: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEdx">edx</span>: int
</pre>
</body>
</html>

519
html/403unicode.mu.html generated
View File

@ -16,14 +16,16 @@ a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.PreProc { color: #c000c0; }
.muRegEdx { color: #af5f00; }
.Special { color: #ff6060; }
.LineNr { }
.muRegEsi { color: #005faf; }
.Constant { color: #008787; }
.muRegEdi { color: #00af00; }
.muRegEsi { color: #005faf; }
.muRegEbx { color: #5f00ff; }
.Constant { color: #008787; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muRegEcx { color: #870000; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.Special { color: #ff6060; }
.muTest { color: #5f8700; }
.muComment { color: #005faf; }
-->
</style>
@ -69,190 +71,353 @@ if ('onhashchange' in window) {
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Graphemes may consist of multiple code points.</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment">#</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># Mu graphemes are always represented in utf-8, and they are required to fit</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># in 4 bytes.</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment">#</span>
<span id="L12" class="LineNr"> 12 </span><span class="muComment"># Mu doesn't currently support combining code points, or graphemes made of</span>
<span id="L13" class="LineNr"> 13 </span><span class="muComment"># multiple code points. One day we will.</span>
<span id="L14" class="LineNr"> 14 </span><span class="muComment"># We also don't currently support code points that translate into multiple</span>
<span id="L15" class="LineNr"> 15 </span><span class="muComment"># or wide graphemes. (In particular, Tab will never be supported.)</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># in 4 bytes. (This can be confusing if you focus just on ASCII, where Mu's</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># graphemes and code-points are identical.)</span>
<span id="L12" class="LineNr"> 12 </span><span class="muComment">#</span>
<span id="L13" class="LineNr"> 13 </span><span class="muComment"># Mu doesn't currently support combining code points, or graphemes made of</span>
<span id="L14" class="LineNr"> 14 </span><span class="muComment"># multiple code points. One day we will.</span>
<span id="L15" class="LineNr"> 15 </span><span class="muComment"># <a href="https://en.wikipedia.org/wiki/Combining_character">https://en.wikipedia.org/wiki/Combining_character</a></span>
<span id="L16" class="LineNr"> 16 </span>
<span id="L17" class="LineNr"> 17 </span><span class="muComment"># transliterated from tb_utf8_unicode_to_char in <a href="https://github.com/nsf/termbox">https://github.com/nsf/termbox</a></span>
<span id="L18" class="LineNr"> 18 </span><span class="muComment"># <a href="https://wiki.tcl-lang.org/page/UTF%2D8+bit+by+bit">https://wiki.tcl-lang.org/page/UTF%2D8+bit+by+bit</a> explains the algorithm</span>
<span id="L19" class="LineNr"> 19 </span><span class="muComment">#</span>
<span id="L20" class="LineNr"> 20 </span><span class="muComment"># The day we want to support combining characters, this function will need to</span>
<span id="L21" class="LineNr"> 21 </span><span class="muComment"># take multiple code points. Or something.</span>
<span id="L22" class="LineNr"> 22 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L22'>to-grapheme</a></span> in: code-point<span class="PreProc"> -&gt; </span>_/eax: grapheme <span class="Delimiter">{</span>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> c/eax: int <span class="Special">&lt;-</span> copy in
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> num-trailers/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> first/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L26" class="LineNr"> 26 </span> $to-grapheme:compute-length: <span class="Delimiter">{</span>
<span id="L27" class="LineNr"> 27 </span> <span class="muComment"># single byte: just return it</span>
<span id="L28" class="LineNr"> 28 </span> compare c, <span class="Constant">0x7f</span>
<span id="L17" class="LineNr"> 17 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L17'>test-unicode-serialization-and-deserialization</a></span> <span class="Delimiter">{</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> init?/<span class="muRegEsi">esi</span>: boolean <span class="Special">&lt;-</span> copy <span class="Constant">1</span>/true
<span id="L20" class="LineNr"> 20 </span> <span class="Delimiter">{</span>
<span id="L21" class="LineNr"> 21 </span> compare i, <span class="Constant">0x10000</span> <span class="muComment"># 32 bits of utf-8 are sufficient for <a href="https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane">https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane</a></span>
<span id="L22" class="LineNr"> 22 </span> <span class="muComment"># but not emoji</span>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> copy i
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> _g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> c
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> g/<span class="muRegEcx">ecx</span>: grapheme <span class="Special">&lt;-</span> copy _g
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> c2/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L28" class="LineNr"> 28 </span> compare i, c2
<span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">{</span>
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">return</span> g
<span id="L33" class="LineNr"> 33 </span> <span class="Delimiter">}</span>
<span id="L34" class="LineNr"> 34 </span> <span class="muComment"># 2 bytes</span>
<span id="L35" class="LineNr"> 35 </span> compare c, <span class="Constant">0x7ff</span>
<span id="L36" class="LineNr"> 36 </span> <span class="Delimiter">{</span>
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L38" class="LineNr"> 38 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L39" class="LineNr"> 39 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xc0</span>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L41" class="LineNr"> 41 </span> <span class="Delimiter">}</span>
<span id="L42" class="LineNr"> 42 </span> <span class="muComment"># 3 bytes</span>
<span id="L43" class="LineNr"> 43 </span> compare c, <span class="Constant">0xffff</span>
<span id="L44" class="LineNr"> 44 </span> <span class="Delimiter">{</span>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L46" class="LineNr"> 46 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L47" class="LineNr"> 47 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xe0</span>
<span id="L48" class="LineNr"> 48 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">break-if-=</span>
<span id="L31" class="LineNr"> 31 </span> <span class="Delimiter">{</span>
<span id="L32" class="LineNr"> 32 </span> compare init?, <span class="Constant">0</span>/false
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">break-if-=</span>
<span id="L34" class="LineNr"> 34 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L17'>test-unicode-serialization-and-deserialization</a>: &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L35" class="LineNr"> 35 </span> <span class="Delimiter">}</span>
<span id="L36" class="LineNr"> 36 </span> init? <span class="Special">&lt;-</span> copy <span class="Constant">0</span>/false
<span id="L37" class="LineNr"> 37 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, i, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L38" class="LineNr"> 38 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;/&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L39" class="LineNr"> 39 </span> <span class="Delimiter">{</span>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy g
<span id="L41" class="LineNr"> 41 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L42" class="LineNr"> 42 </span> <span class="Delimiter">}</span>
<span id="L43" class="LineNr"> 43 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;/&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L44" class="LineNr"> 44 </span> <span class="Delimiter">{</span>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy c2
<span id="L46" class="LineNr"> 46 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x2, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L47" class="LineNr"> 47 </span> <span class="Delimiter">}</span>
<span id="L48" class="LineNr"> 48 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L49" class="LineNr"> 49 </span> <span class="Delimiter">}</span>
<span id="L50" class="LineNr"> 50 </span> <span class="muComment"># 4 bytes</span>
<span id="L51" class="LineNr"> 51 </span> compare c, <span class="Constant">0x1fffff</span>
<span id="L52" class="LineNr"> 52 </span> <span class="Delimiter">{</span>
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L54" class="LineNr"> 54 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">3</span>
<span id="L55" class="LineNr"> 55 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xf0</span>
<span id="L56" class="LineNr"> 56 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L57" class="LineNr"> 57 </span> <span class="Delimiter">}</span>
<span id="L58" class="LineNr"> 58 </span> <span class="muComment"># more than 4 bytes: unsupported</span>
<span id="L59" class="LineNr"> 59 </span> <span class="muComment"># TODO: print error message to stderr</span>
<span id="L60" class="LineNr"> 60 </span> compare c, <span class="Constant">0x1fffff</span>
<span id="L61" class="LineNr"> 61 </span> <span class="Delimiter">{</span>
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L64" class="LineNr"> 64 </span> <span class="Delimiter">}</span>
<span id="L65" class="LineNr"> 65 </span> <span class="Delimiter">}</span>
<span id="L66" class="LineNr"> 66 </span> <span class="muComment"># emit trailer bytes, 6 bits from 'in', first two bits '10'</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L68" class="LineNr"> 68 </span> <span class="Delimiter">{</span>
<span id="L69" class="LineNr"> 69 </span> compare num-trailers, <span class="Constant">0</span>
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">var</span> tmp/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy c
<span id="L72" class="LineNr"> 72 </span> tmp <span class="Special">&lt;-</span> and <span class="Constant">0x3f</span>
<span id="L73" class="LineNr"> 73 </span> tmp <span class="Special">&lt;-</span> or <span class="Constant">0x80</span>
<span id="L74" class="LineNr"> 74 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L75" class="LineNr"> 75 </span> result <span class="Special">&lt;-</span> or tmp
<span id="L76" class="LineNr"> 76 </span> <span class="muComment"># update loop state</span>
<span id="L77" class="LineNr"> 77 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L78" class="LineNr"> 78 </span> num-trailers <span class="Special">&lt;-</span> decrement
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">loop</span>
<span id="L80" class="LineNr"> 80 </span> <span class="Delimiter">}</span>
<span id="L81" class="LineNr"> 81 </span> <span class="muComment"># emit engine</span>
<span id="L82" class="LineNr"> 82 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L83" class="LineNr"> 83 </span> result <span class="Special">&lt;-</span> or c
<span id="L84" class="LineNr"> 84 </span> result <span class="Special">&lt;-</span> or first
<span id="L85" class="LineNr"> 85 </span> <span class="muComment">#</span>
<span id="L86" class="LineNr"> 86 </span> <span class="PreProc">return</span> result
<span id="L87" class="LineNr"> 87 </span><span class="Delimiter">}</span>
<span id="L88" class="LineNr"> 88 </span>
<span id="L89" class="LineNr"> 89 </span><span class="muComment"># TODO: bring in tests once we have check-ints-equal</span>
<span id="L90" class="LineNr"> 90 </span>
<span id="L91" class="LineNr"> 91 </span><span class="muComment"># read the next grapheme from a stream of bytes</span>
<span id="L92" class="LineNr"> 92 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L92'>read-grapheme</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: grapheme <span class="Delimiter">{</span>
<span id="L93" class="LineNr"> 93 </span> <span class="muComment"># if at eof, return EOF</span>
<span id="L94" class="LineNr"> 94 </span> <span class="Delimiter">{</span>
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">var</span> eof?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> in
<span id="L96" class="LineNr"> 96 </span> compare eof?, <span class="Constant">0</span>/false
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">break-if-=</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">return</span> <span class="Constant">0xffffffff</span>
<span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">}</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> c/eax: byte <span class="Special">&lt;-</span> <a href='112read-byte.subx.html#L13'>read-byte</a> in
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> num-trailers/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L102" class="LineNr">102 </span> $read-grapheme:compute-length: <span class="Delimiter">{</span>
<span id="L103" class="LineNr">103 </span> <span class="muComment"># single byte: just return it</span>
<span id="L104" class="LineNr">104 </span> compare c, <span class="Constant">0xc0</span>
<span id="L105" class="LineNr">105 </span> <span class="Delimiter">{</span>
<span id="L106" class="LineNr">106 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L108" class="LineNr">108 </span> <span class="PreProc">return</span> g
<span id="L109" class="LineNr">109 </span> <span class="Delimiter">}</span>
<span id="L110" class="LineNr">110 </span> compare c, <span class="Constant">0xfe</span>
<span id="L50" class="LineNr"> 50 </span> i <span class="Special">&lt;-</span> add <span class="Constant">0xf</span> <span class="muComment"># to speed things up; ensure increment is not a power of 2</span>
<span id="L51" class="LineNr"> 51 </span> <span class="PreProc">loop</span>
<span id="L52" class="LineNr"> 52 </span> <span class="Delimiter">}</span>
<span id="L53" class="LineNr"> 53 </span><span class="Delimiter">}</span>
<span id="L54" class="LineNr"> 54 </span>
<span id="L55" class="LineNr"> 55 </span><span class="muComment"># transliterated from tb_utf8_char_to_unicode in <a href="https://github.com/nsf/termbox">https://github.com/nsf/termbox</a></span>
<span id="L56" class="LineNr"> 56 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L56'>to-code-point</a></span> in: grapheme<span class="PreProc"> -&gt; </span>_/eax: code-point <span class="Delimiter">{</span>
<span id="L57" class="LineNr"> 57 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy in
<span id="L58" class="LineNr"> 58 </span> <span class="muComment"># if single byte, just return it</span>
<span id="L59" class="LineNr"> 59 </span> <span class="Delimiter">{</span>
<span id="L60" class="LineNr"> 60 </span> compare g, <span class="Constant">0xff</span>
<span id="L61" class="LineNr"> 61 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">var</span> result/eax: code-point <span class="Special">&lt;-</span> copy g
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">return</span> result
<span id="L64" class="LineNr"> 64 </span> <span class="Delimiter">}</span>
<span id="L65" class="LineNr"> 65 </span> <span class="muComment">#</span>
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> len/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L302'>grapheme-length</a> in
<span id="L67" class="LineNr"> 67 </span> <span class="muComment"># extract bits from first byte</span>
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> b/eax: byte <span class="Special">&lt;-</span> copy-byte g
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: code-point <span class="Special">&lt;-</span> copy b
<span id="L70" class="LineNr"> 70 </span> <span class="Delimiter">{</span>
<span id="L71" class="LineNr"> 71 </span> compare len, <span class="Constant">2</span>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">break-if-!=</span>
<span id="L73" class="LineNr"> 73 </span> result <span class="Special">&lt;-</span> and <span class="Constant">0x1f</span>
<span id="L74" class="LineNr"> 74 </span> <span class="Delimiter">}</span>
<span id="L75" class="LineNr"> 75 </span> <span class="Delimiter">{</span>
<span id="L76" class="LineNr"> 76 </span> compare len, <span class="Constant">3</span>
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">break-if-!=</span>
<span id="L78" class="LineNr"> 78 </span> result <span class="Special">&lt;-</span> and <span class="Constant">0x0f</span>
<span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">}</span>
<span id="L80" class="LineNr"> 80 </span> <span class="Delimiter">{</span>
<span id="L81" class="LineNr"> 81 </span> compare len, <span class="Constant">4</span>
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">break-if-!=</span>
<span id="L83" class="LineNr"> 83 </span> result <span class="Special">&lt;-</span> and <span class="Constant">0x07</span>
<span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span>
<span id="L85" class="LineNr"> 85 </span> <span class="muComment"># extract bits from remaining bytes</span>
<span id="L86" class="LineNr"> 86 </span> g <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L88" class="LineNr"> 88 </span> <span class="Delimiter">{</span>
<span id="L89" class="LineNr"> 89 </span> compare i, len
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> b/eax: byte <span class="Special">&lt;-</span> copy-byte g
<span id="L92" class="LineNr"> 92 </span> b <span class="Special">&lt;-</span> and <span class="Constant">0x3f</span>
<span id="L93" class="LineNr"> 93 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">6</span>
<span id="L94" class="LineNr"> 94 </span> result <span class="Special">&lt;-</span> or b
<span id="L95" class="LineNr"> 95 </span> g <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L96" class="LineNr"> 96 </span> i <span class="Special">&lt;-</span> increment
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">loop</span>
<span id="L98" class="LineNr"> 98 </span> <span class="Delimiter">}</span>
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">return</span> result
<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="muComment"># transliterated from tb_utf8_unicode_to_char in <a href="https://github.com/nsf/termbox">https://github.com/nsf/termbox</a></span>
<span id="L103" class="LineNr">103 </span><span class="muComment"># <a href="https://wiki.tcl-lang.org/page/UTF%2D8+bit+by+bit">https://wiki.tcl-lang.org/page/UTF%2D8+bit+by+bit</a> explains the algorithm</span>
<span id="L104" class="LineNr">104 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L104'>to-grapheme</a></span> in: code-point<span class="PreProc"> -&gt; </span>_/eax: grapheme <span class="Delimiter">{</span>
<span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> c/eax: int <span class="Special">&lt;-</span> copy in
<span id="L106" class="LineNr">106 </span> <span class="PreProc">var</span> num-trailers/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> first/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L108" class="LineNr">108 </span> $to-grapheme:compute-length: <span class="Delimiter">{</span>
<span id="L109" class="LineNr">109 </span> <span class="muComment"># single byte: just return it</span>
<span id="L110" class="LineNr">110 </span> compare c, <span class="Constant">0x7f</span>
<span id="L111" class="LineNr">111 </span> <span class="Delimiter">{</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L113" class="LineNr">113 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L114" class="LineNr">114 </span> <span class="PreProc">return</span> g
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span>
<span id="L116" class="LineNr">116 </span> <span class="muComment"># 2 bytes</span>
<span id="L117" class="LineNr">117 </span> compare c, <span class="Constant">0xe0</span>
<span id="L117" class="LineNr">117 </span> compare c, <span class="Constant">0x7ff</span>
<span id="L118" class="LineNr">118 </span> <span class="Delimiter">{</span>
<span id="L119" class="LineNr">119 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L119" class="LineNr">119 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L120" class="LineNr">120 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L121" class="LineNr">121 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L122" class="LineNr">122 </span> <span class="Delimiter">}</span>
<span id="L123" class="LineNr">123 </span> <span class="muComment"># 3 bytes</span>
<span id="L124" class="LineNr">124 </span> compare c, <span class="Constant">0xf0</span>
<span id="L125" class="LineNr">125 </span> <span class="Delimiter">{</span>
<span id="L126" class="LineNr">126 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L127" class="LineNr">127 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L128" class="LineNr">128 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L129" class="LineNr">129 </span> <span class="Delimiter">}</span>
<span id="L130" class="LineNr">130 </span> <span class="muComment"># 4 bytes</span>
<span id="L131" class="LineNr">131 </span> compare c, <span class="Constant">0xf8</span>
<span id="L132" class="LineNr">132 </span> <span class="Delimiter">{</span>
<span id="L133" class="LineNr">133 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L134" class="LineNr">134 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">3</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span>
<span id="L137" class="LineNr">137 </span> <span class="muComment"># TODO: print error message</span>
<span id="L138" class="LineNr">138 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L139" class="LineNr">139 </span> <span class="Delimiter">}</span>
<span id="L140" class="LineNr">140 </span> <span class="muComment"># prepend trailer bytes</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy c
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> num-byte-shifts/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">{</span>
<span id="L144" class="LineNr">144 </span> compare num-trailers, <span class="Constant">0</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L146" class="LineNr">146 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='112read-byte.subx.html#L13'>read-byte</a> in
<span id="L147" class="LineNr">147 </span> <span class="PreProc">var</span> tmp2/eax: int <span class="Special">&lt;-</span> copy tmp
<span id="L148" class="LineNr">148 </span> tmp2 <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L159'>shift-left-bytes</a> tmp2, num-byte-shifts
<span id="L149" class="LineNr">149 </span> result <span class="Special">&lt;-</span> or tmp2
<span id="L150" class="LineNr">150 </span> <span class="muComment"># update loop state</span>
<span id="L151" class="LineNr">151 </span> num-byte-shifts <span class="Special">&lt;-</span> increment
<span id="L152" class="LineNr">152 </span> num-trailers <span class="Special">&lt;-</span> decrement
<span id="L153" class="LineNr">153 </span> <span class="PreProc">loop</span>
<span id="L154" class="LineNr">154 </span> <span class="Delimiter">}</span>
<span id="L155" class="LineNr">155 </span> <span class="PreProc">return</span> result
<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"># needed because available primitives only shift by a literal/constant number of bits</span>
<span id="L159" class="LineNr">159 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L159'>shift-left-bytes</a></span> n: int, k: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> copy n
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">{</span>
<span id="L163" class="LineNr">163 </span> compare i, k
<span id="L164" class="LineNr">164 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L165" class="LineNr">165 </span> compare i, <span class="Constant">4</span> <span class="muComment"># only 4 bytes in 32 bits</span>
<span id="L166" class="LineNr">166 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L167" class="LineNr">167 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L168" class="LineNr">168 </span> i <span class="Special">&lt;-</span> increment
<span id="L169" class="LineNr">169 </span> <span class="PreProc">loop</span>
<span id="L170" class="LineNr">170 </span> <span class="Delimiter">}</span>
<span id="L171" class="LineNr">171 </span> <span class="PreProc">return</span> result
<span id="L172" class="LineNr">172 </span><span class="Delimiter">}</span>
<span id="L173" class="LineNr">173 </span>
<span id="L174" class="LineNr">174 </span><span class="muComment"># write a grapheme to a stream of bytes</span>
<span id="L175" class="LineNr">175 </span><span class="muComment"># this is like write-to-stream, except we skip leading 0 bytes</span>
<span id="L176" class="LineNr">176 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L176'>write-grapheme</a></span> out: (addr stream byte), g: grapheme <span class="Delimiter">{</span>
<span id="L177" class="LineNr">177 </span>$write-grapheme:body: <span class="Delimiter">{</span>
<span id="L178" class="LineNr">178 </span> <span class="PreProc">var</span> c/eax: int <span class="Special">&lt;-</span> copy g
<span id="L179" class="LineNr">179 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c <span class="muComment"># first byte is always written</span>
<span id="L180" class="LineNr">180 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L181" class="LineNr">181 </span> compare c, <span class="Constant">0</span>
<span id="L182" class="LineNr">182 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L183" class="LineNr">183 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L184" class="LineNr">184 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L185" class="LineNr">185 </span> compare c, <span class="Constant">0</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L187" class="LineNr">187 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L188" class="LineNr">188 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L189" class="LineNr">189 </span> compare c, <span class="Constant">0</span>
<span id="L190" class="LineNr">190 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L191" class="LineNr">191 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L192" class="LineNr">192 </span><span class="Delimiter">}</span>
<span id="L121" class="LineNr">121 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xc0</span>
<span id="L122" class="LineNr">122 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L123" class="LineNr">123 </span> <span class="Delimiter">}</span>
<span id="L124" class="LineNr">124 </span> <span class="muComment"># 3 bytes</span>
<span id="L125" class="LineNr">125 </span> compare c, <span class="Constant">0xffff</span>
<span id="L126" class="LineNr">126 </span> <span class="Delimiter">{</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L128" class="LineNr">128 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L129" class="LineNr">129 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xe0</span>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L131" class="LineNr">131 </span> <span class="Delimiter">}</span>
<span id="L132" class="LineNr">132 </span> <span class="muComment"># 4 bytes</span>
<span id="L133" class="LineNr">133 </span> compare c, <span class="Constant">0x1fffff</span>
<span id="L134" class="LineNr">134 </span> <span class="Delimiter">{</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L136" class="LineNr">136 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">3</span>
<span id="L137" class="LineNr">137 </span> first <span class="Special">&lt;-</span> copy <span class="Constant">0xf0</span>
<span id="L138" class="LineNr">138 </span> <span class="PreProc">break</span> $to-grapheme:compute-length
<span id="L139" class="LineNr">139 </span> <span class="Delimiter">}</span>
<span id="L140" class="LineNr">140 </span> <span class="muComment"># more than 4 bytes: unsupported</span>
<span id="L141" class="LineNr">141 </span> <span class="muComment"># TODO: print error message to stderr</span>
<span id="L142" class="LineNr">142 </span> compare c, <span class="Constant">0x1fffff</span>
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">{</span>
<span id="L144" class="LineNr">144 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<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> <span class="muComment"># emit trailer bytes, 6 bits from 'in', first two bits '10'</span>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L150" class="LineNr">150 </span> <span class="Delimiter">{</span>
<span id="L151" class="LineNr">151 </span> compare num-trailers, <span class="Constant">0</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L153" class="LineNr">153 </span> <span class="PreProc">var</span> tmp/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy c
<span id="L154" class="LineNr">154 </span> tmp <span class="Special">&lt;-</span> and <span class="Constant">0x3f</span>
<span id="L155" class="LineNr">155 </span> tmp <span class="Special">&lt;-</span> or <span class="Constant">0x80</span>
<span id="L156" class="LineNr">156 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L157" class="LineNr">157 </span> result <span class="Special">&lt;-</span> or tmp
<span id="L158" class="LineNr">158 </span> <span class="muComment"># update loop state</span>
<span id="L159" class="LineNr">159 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L160" class="LineNr">160 </span> num-trailers <span class="Special">&lt;-</span> decrement
<span id="L161" class="LineNr">161 </span> <span class="PreProc">loop</span>
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span> <span class="muComment"># emit engine</span>
<span id="L164" class="LineNr">164 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L165" class="LineNr">165 </span> result <span class="Special">&lt;-</span> or c
<span id="L166" class="LineNr">166 </span> result <span class="Special">&lt;-</span> or first
<span id="L167" class="LineNr">167 </span> <span class="muComment">#</span>
<span id="L168" class="LineNr">168 </span> <span class="PreProc">return</span> result
<span id="L169" class="LineNr">169 </span><span class="Delimiter">}</span>
<span id="L170" class="LineNr">170 </span>
<span id="L171" class="LineNr">171 </span><span class="muComment"># single-byte code point have identical graphemes</span>
<span id="L172" class="LineNr">172 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L172'>test-to-grapheme-single-byte</a></span> <span class="Delimiter">{</span>
<span id="L173" class="LineNr">173 </span> <span class="PreProc">var</span> in-int/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L174" class="LineNr">174 </span> <span class="Delimiter">{</span>
<span id="L175" class="LineNr">175 </span> compare in-int, <span class="Constant">0x7f</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy in-int
<span id="L178" class="LineNr">178 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L179" class="LineNr">179 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L180" class="LineNr">180 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, in-int, <span class="Constant">&quot;F - test-to-grapheme-single-byte&quot;</span>
<span id="L181" class="LineNr">181 </span> in-int <span class="Special">&lt;-</span> increment
<span id="L182" class="LineNr">182 </span> <span class="PreProc">loop</span>
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">}</span>
<span id="L184" class="LineNr">184 </span><span class="Delimiter">}</span>
<span id="L185" class="LineNr">185 </span>
<span id="L186" class="LineNr">186 </span> <span class="muComment"># byte | byte | byte | byte</span>
<span id="L187" class="LineNr">187 </span><span class="muComment"># smallest 2-byte utf-8</span>
<span id="L188" class="LineNr">188 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L188'>test-to-grapheme-two-bytes-min</a></span> <span class="Delimiter">{</span>
<span id="L189" class="LineNr">189 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x80</span> <span class="muComment"># 10 00-0000</span>
<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L191" class="LineNr">191 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L192" class="LineNr">192 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0x80c2</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/2a&quot;</span> <span class="muComment"># 110 0-0010 10 00-0000</span>
<span id="L193" class="LineNr">193 </span><span class="Delimiter">}</span>
<span id="L194" class="LineNr">194 </span>
<span id="L195" class="LineNr">195 </span><span class="muComment"># largest 2-byte utf-8</span>
<span id="L196" class="LineNr">196 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L196'>test-to-grapheme-two-bytes-max</a></span> <span class="Delimiter">{</span>
<span id="L197" class="LineNr">197 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x7ff</span> <span class="muComment"># 1-1111 11-1111</span>
<span id="L198" class="LineNr">198 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L199" class="LineNr">199 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L200" class="LineNr">200 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0xbfdf</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/2b&quot;</span> <span class="muComment"># 110 1-1111 10 11-1111</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="muComment"># smallest 3-byte utf-8</span>
<span id="L204" class="LineNr">204 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L204'>test-to-grapheme-three-bytes-min</a></span> <span class="Delimiter">{</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x800</span> <span class="muComment"># 10-0000 00-0000</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L208" class="LineNr">208 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0x80a0e0</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/3a&quot;</span> <span class="muComment"># 1110 0000 10 10-0000 10 00-0000</span>
<span id="L209" class="LineNr">209 </span><span class="Delimiter">}</span>
<span id="L210" class="LineNr">210 </span>
<span id="L211" class="LineNr">211 </span><span class="muComment"># largest 3-byte utf-8</span>
<span id="L212" class="LineNr">212 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L212'>test-to-grapheme-three-bytes-max</a></span> <span class="Delimiter">{</span>
<span id="L213" class="LineNr">213 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0xffff</span> <span class="muComment"># 1111 11-1111 11-1111</span>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L215" class="LineNr">215 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L216" class="LineNr">216 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0xbfbfef</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/3b&quot;</span> <span class="muComment"># 1110 1111 10 11-1111 10 11-1111</span>
<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="muComment"># smallest 4-byte utf-8</span>
<span id="L220" class="LineNr">220 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L220'>test-to-grapheme-four-bytes-min</a></span> <span class="Delimiter">{</span>
<span id="L221" class="LineNr">221 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x10000</span> <span class="muComment"># 1-0000 00-0000 00-0000</span>
<span id="L222" class="LineNr">222 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L223" class="LineNr">223 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L224" class="LineNr">224 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0x808090f0</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/4a&quot;</span> <span class="muComment"># 1111-0 000 10 01-0000 10 00-0000 10 00-0000</span>
<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="muComment"># largest 4-byte utf-8</span>
<span id="L228" class="LineNr">228 </span><span class="PreProc">fn</span> <span class="muTest"><a href='403unicode.mu.html#L228'>test-to-grapheme-four-bytes-max</a></span> <span class="Delimiter">{</span>
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> in/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x1fffff</span> <span class="muComment"># 111 11-1111 11-1111 11-1111</span>
<span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> out/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L104'>to-grapheme</a> in
<span id="L231" class="LineNr">231 </span> <span class="PreProc">var</span> out-int/eax: int <span class="Special">&lt;-</span> copy out
<span id="L232" class="LineNr">232 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> out-int, <span class="Constant">0xbfbfbff7</span>, <span class="Constant">&quot;F - <a href='403unicode.mu.html#L104'>to-grapheme</a>/4b&quot;</span> <span class="muComment"># 1111-0 111 10 11-1111 10 11-1111 10 11-1111</span>
<span id="L233" class="LineNr">233 </span><span class="Delimiter">}</span>
<span id="L234" class="LineNr">234 </span>
<span id="L235" class="LineNr">235 </span><span class="muComment"># read the next grapheme from a stream of bytes</span>
<span id="L236" class="LineNr">236 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L236'>read-grapheme</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: grapheme <span class="Delimiter">{</span>
<span id="L237" class="LineNr">237 </span> <span class="muComment"># if at eof, return EOF</span>
<span id="L238" class="LineNr">238 </span> <span class="Delimiter">{</span>
<span id="L239" class="LineNr">239 </span> <span class="PreProc">var</span> eof?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> in
<span id="L240" class="LineNr">240 </span> compare eof?, <span class="Constant">0</span>/false
<span id="L241" class="LineNr">241 </span> <span class="PreProc">break-if-=</span>
<span id="L242" class="LineNr">242 </span> <span class="PreProc">return</span> <span class="Constant">0xffffffff</span>
<span id="L243" class="LineNr">243 </span> <span class="Delimiter">}</span>
<span id="L244" class="LineNr">244 </span> <span class="PreProc">var</span> c/eax: byte <span class="Special">&lt;-</span> <a href='112read-byte.subx.html#L13'>read-byte</a> in
<span id="L245" class="LineNr">245 </span> <span class="PreProc">var</span> num-trailers/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L246" class="LineNr">246 </span> $read-grapheme:compute-length: <span class="Delimiter">{</span>
<span id="L247" class="LineNr">247 </span> <span class="muComment"># single byte: just return it</span>
<span id="L248" class="LineNr">248 </span> compare c, <span class="Constant">0xc0</span>
<span id="L249" class="LineNr">249 </span> <span class="Delimiter">{</span>
<span id="L250" class="LineNr">250 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L251" class="LineNr">251 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L252" class="LineNr">252 </span> <span class="PreProc">return</span> g
<span id="L253" class="LineNr">253 </span> <span class="Delimiter">}</span>
<span id="L254" class="LineNr">254 </span> compare c, <span class="Constant">0xfe</span>
<span id="L255" class="LineNr">255 </span> <span class="Delimiter">{</span>
<span id="L256" class="LineNr">256 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L257" class="LineNr">257 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L258" class="LineNr">258 </span> <span class="PreProc">return</span> g
<span id="L259" class="LineNr">259 </span> <span class="Delimiter">}</span>
<span id="L260" class="LineNr">260 </span> <span class="muComment"># 2 bytes</span>
<span id="L261" class="LineNr">261 </span> compare c, <span class="Constant">0xe0</span>
<span id="L262" class="LineNr">262 </span> <span class="Delimiter">{</span>
<span id="L263" class="LineNr">263 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L264" class="LineNr">264 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L265" class="LineNr">265 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L266" class="LineNr">266 </span> <span class="Delimiter">}</span>
<span id="L267" class="LineNr">267 </span> <span class="muComment"># 3 bytes</span>
<span id="L268" class="LineNr">268 </span> compare c, <span class="Constant">0xf0</span>
<span id="L269" class="LineNr">269 </span> <span class="Delimiter">{</span>
<span id="L270" class="LineNr">270 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L271" class="LineNr">271 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L272" class="LineNr">272 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L273" class="LineNr">273 </span> <span class="Delimiter">}</span>
<span id="L274" class="LineNr">274 </span> <span class="muComment"># 4 bytes</span>
<span id="L275" class="LineNr">275 </span> compare c, <span class="Constant">0xf8</span>
<span id="L276" class="LineNr">276 </span> <span class="Delimiter">{</span>
<span id="L277" class="LineNr">277 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L278" class="LineNr">278 </span> num-trailers <span class="Special">&lt;-</span> copy <span class="Constant">3</span>
<span id="L279" class="LineNr">279 </span> <span class="PreProc">break</span> $read-grapheme:compute-length
<span id="L280" class="LineNr">280 </span> <span class="Delimiter">}</span>
<span id="L281" class="LineNr">281 </span> <span class="muComment"># TODO: print error message</span>
<span id="L282" class="LineNr">282 </span> <span class="PreProc">return</span> <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="muComment"># prepend trailer bytes</span>
<span id="L285" class="LineNr">285 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy c
<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> num-byte-shifts/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L287" class="LineNr">287 </span> <span class="Delimiter">{</span>
<span id="L288" class="LineNr">288 </span> compare num-trailers, <span class="Constant">0</span>
<span id="L289" class="LineNr">289 </span> <span class="PreProc">break-if-&lt;=</span>
<span id="L290" class="LineNr">290 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='112read-byte.subx.html#L13'>read-byte</a> in
<span id="L291" class="LineNr">291 </span> <span class="PreProc">var</span> tmp2/eax: int <span class="Special">&lt;-</span> copy tmp
<span id="L292" class="LineNr">292 </span> tmp2 <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L322'>shift-left-bytes</a> tmp2, num-byte-shifts
<span id="L293" class="LineNr">293 </span> result <span class="Special">&lt;-</span> or tmp2
<span id="L294" class="LineNr">294 </span> <span class="muComment"># update loop state</span>
<span id="L295" class="LineNr">295 </span> num-byte-shifts <span class="Special">&lt;-</span> increment
<span id="L296" class="LineNr">296 </span> num-trailers <span class="Special">&lt;-</span> decrement
<span id="L297" class="LineNr">297 </span> <span class="PreProc">loop</span>
<span id="L298" class="LineNr">298 </span> <span class="Delimiter">}</span>
<span id="L299" class="LineNr">299 </span> <span class="PreProc">return</span> result
<span id="L300" class="LineNr">300 </span><span class="Delimiter">}</span>
<span id="L301" class="LineNr">301 </span>
<span id="L302" class="LineNr">302 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L302'>grapheme-length</a></span> g: grapheme<span class="PreProc"> -&gt; </span>_/<span class="muRegEdx">edx</span>: int <span class="Delimiter">{</span>
<span id="L303" class="LineNr">303 </span> <span class="Delimiter">{</span>
<span id="L304" class="LineNr">304 </span> compare g, <span class="Constant">0xff</span>
<span id="L305" class="LineNr">305 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L306" class="LineNr">306 </span> <span class="PreProc">return</span> <span class="Constant">1</span>
<span id="L307" class="LineNr">307 </span> <span class="Delimiter">}</span>
<span id="L308" class="LineNr">308 </span> <span class="Delimiter">{</span>
<span id="L309" class="LineNr">309 </span> compare g, <span class="Constant">0xffff</span>
<span id="L310" class="LineNr">310 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L311" class="LineNr">311 </span> <span class="PreProc">return</span> <span class="Constant">2</span>
<span id="L312" class="LineNr">312 </span> <span class="Delimiter">}</span>
<span id="L313" class="LineNr">313 </span> <span class="Delimiter">{</span>
<span id="L314" class="LineNr">314 </span> compare g, <span class="Constant">0xffffff</span>
<span id="L315" class="LineNr">315 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L316" class="LineNr">316 </span> <span class="PreProc">return</span> <span class="Constant">3</span>
<span id="L317" class="LineNr">317 </span> <span class="Delimiter">}</span>
<span id="L318" class="LineNr">318 </span> <span class="PreProc">return</span> <span class="Constant">4</span>
<span id="L319" class="LineNr">319 </span><span class="Delimiter">}</span>
<span id="L320" class="LineNr">320 </span>
<span id="L321" class="LineNr">321 </span><span class="muComment"># needed because available primitives only shift by a literal/constant number of bits</span>
<span id="L322" class="LineNr">322 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L322'>shift-left-bytes</a></span> n: int, k: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L324" class="LineNr">324 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> copy n
<span id="L325" class="LineNr">325 </span> <span class="Delimiter">{</span>
<span id="L326" class="LineNr">326 </span> compare i, k
<span id="L327" class="LineNr">327 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L328" class="LineNr">328 </span> compare i, <span class="Constant">4</span> <span class="muComment"># only 4 bytes in 32 bits</span>
<span id="L329" class="LineNr">329 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L330" class="LineNr">330 </span> result <span class="Special">&lt;-</span> shift-left <span class="Constant">8</span>
<span id="L331" class="LineNr">331 </span> i <span class="Special">&lt;-</span> increment
<span id="L332" class="LineNr">332 </span> <span class="PreProc">loop</span>
<span id="L333" class="LineNr">333 </span> <span class="Delimiter">}</span>
<span id="L334" class="LineNr">334 </span> <span class="PreProc">return</span> result
<span id="L335" class="LineNr">335 </span><span class="Delimiter">}</span>
<span id="L336" class="LineNr">336 </span>
<span id="L337" class="LineNr">337 </span><span class="muComment"># write a grapheme to a stream of bytes</span>
<span id="L338" class="LineNr">338 </span><span class="muComment"># this is like write-to-stream, except we skip leading 0 bytes</span>
<span id="L339" class="LineNr">339 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='403unicode.mu.html#L339'>write-grapheme</a></span> out: (addr stream byte), g: grapheme <span class="Delimiter">{</span>
<span id="L340" class="LineNr">340 </span>$write-grapheme:body: <span class="Delimiter">{</span>
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> c/eax: int <span class="Special">&lt;-</span> copy g
<span id="L342" class="LineNr">342 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c <span class="muComment"># first byte is always written</span>
<span id="L343" class="LineNr">343 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L344" class="LineNr">344 </span> compare c, <span class="Constant">0</span>
<span id="L345" class="LineNr">345 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L346" class="LineNr">346 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L347" class="LineNr">347 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L348" class="LineNr">348 </span> compare c, <span class="Constant">0</span>
<span id="L349" class="LineNr">349 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L350" class="LineNr">350 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L351" class="LineNr">351 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">8</span>
<span id="L352" class="LineNr">352 </span> compare c, <span class="Constant">0</span>
<span id="L353" class="LineNr">353 </span> <span class="PreProc">break-if-=</span> $write-grapheme:body
<span id="L354" class="LineNr">354 </span> <a href='115write-byte.subx.html#L12'>append-byte</a> out, c
<span id="L355" class="LineNr">355 </span><span class="Delimiter">}</span>
<span id="L356" class="LineNr">356 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

10
html/411string.mu.html generated
View File

@ -75,7 +75,7 @@ if ('onhashchange' in window) {
<span id="L12" class="LineNr"> 12 </span> compare i, start
<span id="L13" class="LineNr"> 13 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L14" class="LineNr"> 14 </span> <span class="Delimiter">{</span>
<span id="L15" class="LineNr"> 15 </span> <span class="PreProc">var</span> dummy/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> in-stream-addr
<span id="L15" class="LineNr"> 15 </span> <span class="PreProc">var</span> dummy/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> in-stream-addr
<span id="L16" class="LineNr"> 16 </span> compare dummy, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">break-if-=</span> $substring:core
<span id="L18" class="LineNr"> 18 </span> <span class="Delimiter">}</span>
@ -88,10 +88,10 @@ if ('onhashchange' in window) {
<span id="L25" class="LineNr"> 25 </span> compare i, len
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L27" class="LineNr"> 27 </span> <span class="Delimiter">{</span>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> in-stream-addr
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> in-stream-addr
<span id="L29" class="LineNr"> 29 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">break-if-=</span> $substring:core
<span id="L31" class="LineNr"> 31 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> out-stream-addr, g
<span id="L31" class="LineNr"> 31 </span> <a href='403unicode.mu.html#L339'>write-grapheme</a> out-stream-addr, g
<span id="L32" class="LineNr"> 32 </span> <span class="Delimiter">}</span>
<span id="L33" class="LineNr"> 33 </span> i <span class="Special">&lt;-</span> increment
<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">loop</span>
@ -157,7 +157,7 @@ if ('onhashchange' in window) {
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> curr-stream: (stream byte <span class="Constant">0x100</span>)
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">var</span> curr-stream-addr/<span class="muRegEcx">ecx</span>: (addr stream byte) <span class="Special">&lt;-</span> address curr-stream
<span id="L96" class="LineNr"> 96 </span> $split-string:core: <span class="Delimiter">{</span>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> in-stream-addr
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> in-stream-addr
<span id="L98" class="LineNr"> 98 </span> compare g, <span class="Constant">0xffffffff</span>
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">break-if-=</span>
<span id="L100" class="LineNr">100 </span><span class="CommentedCode">#? print-grapheme-to-real-screen g</span>
@ -173,7 +173,7 @@ if ('onhashchange' in window) {
<span id="L110" class="LineNr">110 </span> <a href='106stream.subx.html#L20'>clear-stream</a> curr-stream-addr
<span id="L111" class="LineNr">111 </span> <span class="PreProc">loop</span> $split-string:core
<span id="L112" class="LineNr">112 </span> <span class="Delimiter">}</span>
<span id="L113" class="LineNr">113 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> curr-stream-addr, g
<span id="L113" class="LineNr">113 </span> <a href='403unicode.mu.html#L339'>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#L60'>stream-to-array</a> tokens-stream-addr, out

View File

@ -218,8 +218,8 @@ if ('onhashchange' in window) {
<span id="L154" class="LineNr">154 </span> <a href='412render-float-decimal.mu.html#L163'>write-float-decimal-approximate</a> s, in, precision
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L156" class="LineNr">156 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L157" class="LineNr">157 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L158" class="LineNr">158 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L111'>draw-stream-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, s, x, width, y, color, background-color
<span id="L157" class="LineNr">157 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L158" class="LineNr">158 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L117'>draw-stream-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, s, x, width, y, color, background-color
<span id="L159" class="LineNr">159 </span> <span class="PreProc">return</span> result
<span id="L160" class="LineNr">160 </span><span class="Delimiter">}</span>
<span id="L161" class="LineNr">161 </span>

File diff suppressed because it is too large Load Diff

View File

@ -66,74 +66,74 @@ if ('onhashchange' in window) {
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L3'>move-cursor-left</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L6" class="LineNr"> 6 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L6" class="LineNr"> 6 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L7" class="LineNr"> 7 </span> compare cursor-x, <span class="Constant">0</span>
<span id="L8" class="LineNr"> 8 </span> <span class="Delimiter">{</span>
<span id="L9" class="LineNr"> 9 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L10" class="LineNr"> 10 </span> <span class="PreProc">return</span>
<span id="L11" class="LineNr"> 11 </span> <span class="Delimiter">}</span>
<span id="L12" class="LineNr"> 12 </span> cursor-x <span class="Special">&lt;-</span> decrement
<span id="L13" class="LineNr"> 13 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L13" class="LineNr"> 13 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L14" class="LineNr"> 14 </span><span class="Delimiter">}</span>
<span id="L15" class="LineNr"> 15 </span>
<span id="L16" class="LineNr"> 16 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L16'>move-cursor-right</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L19" class="LineNr"> 19 </span> _width, dummy <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L19" class="LineNr"> 19 </span> _width, dummy <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L20" class="LineNr"> 20 </span> <span class="PreProc">var</span> limit/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L21" class="LineNr"> 21 </span> limit <span class="Special">&lt;-</span> decrement
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L24" class="LineNr"> 24 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L24" class="LineNr"> 24 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L25" class="LineNr"> 25 </span> compare cursor-x, limit
<span id="L26" class="LineNr"> 26 </span> <span class="Delimiter">{</span>
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">return</span>
<span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">}</span>
<span id="L30" class="LineNr"> 30 </span> cursor-x <span class="Special">&lt;-</span> increment
<span id="L31" class="LineNr"> 31 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L31" class="LineNr"> 31 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L32" class="LineNr"> 32 </span><span class="Delimiter">}</span>
<span id="L33" class="LineNr"> 33 </span>
<span id="L34" class="LineNr"> 34 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L34'>move-cursor-up</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L37" class="LineNr"> 37 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L37" class="LineNr"> 37 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L38" class="LineNr"> 38 </span> compare cursor-y, <span class="Constant">0</span>
<span id="L39" class="LineNr"> 39 </span> <span class="Delimiter">{</span>
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L41" class="LineNr"> 41 </span> <span class="PreProc">return</span>
<span id="L42" class="LineNr"> 42 </span> <span class="Delimiter">}</span>
<span id="L43" class="LineNr"> 43 </span> cursor-y <span class="Special">&lt;-</span> decrement
<span id="L44" class="LineNr"> 44 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L44" class="LineNr"> 44 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L45" class="LineNr"> 45 </span><span class="Delimiter">}</span>
<span id="L46" class="LineNr"> 46 </span>
<span id="L47" class="LineNr"> 47 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L47'>move-cursor-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L48" class="LineNr"> 48 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L49" class="LineNr"> 49 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L50" class="LineNr"> 50 </span> dummy, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L50" class="LineNr"> 50 </span> dummy, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L51" class="LineNr"> 51 </span> <span class="PreProc">var</span> limit/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L52" class="LineNr"> 52 </span> limit <span class="Special">&lt;-</span> decrement
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L54" class="LineNr"> 54 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L55" class="LineNr"> 55 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L55" class="LineNr"> 55 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L56" class="LineNr"> 56 </span> compare cursor-y, limit
<span id="L57" class="LineNr"> 57 </span> <span class="Delimiter">{</span>
<span id="L58" class="LineNr"> 58 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L59" class="LineNr"> 59 </span> <span class="PreProc">return</span>
<span id="L60" class="LineNr"> 60 </span> <span class="Delimiter">}</span>
<span id="L61" class="LineNr"> 61 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L62" class="LineNr"> 62 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L62" class="LineNr"> 62 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L63" class="LineNr"> 63 </span><span class="Delimiter">}</span>
<span id="L64" class="LineNr"> 64 </span>
<span id="L65" class="LineNr"> 65 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L68" class="LineNr"> 68 </span> dummy, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L68" class="LineNr"> 68 </span> dummy, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> limit/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L70" class="LineNr"> 70 </span> limit <span class="Special">&lt;-</span> decrement
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L73" class="LineNr"> 73 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L73" class="LineNr"> 73 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L74" class="LineNr"> 74 </span> compare cursor-y, limit
<span id="L75" class="LineNr"> 75 </span> <span class="Delimiter">{</span>
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">break-if-&lt;</span>
@ -141,421 +141,435 @@ if ('onhashchange' in window) {
<span id="L78" class="LineNr"> 78 </span> <span class="Delimiter">}</span>
<span id="L79" class="LineNr"> 79 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L80" class="LineNr"> 80 </span> cursor-x <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L81" class="LineNr"> 81 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L81" class="LineNr"> 81 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<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="muFunction"><a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), g: grapheme, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), c: code-point, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L86" class="LineNr"> 86 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L87" class="LineNr"> 87 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L88" class="LineNr"> 88 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, cursor-x, cursor-y, color, background-color
<span id="L89" class="LineNr"> 89 </span><span class="Delimiter">}</span>
<span id="L90" class="LineNr"> 90 </span>
<span id="L91" class="LineNr"> 91 </span><span class="muComment"># we can't really render non-ASCII yet, but when we do we'll be ready</span>
<span id="L92" class="LineNr"> 92 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L92'>draw-code-point-at-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), c: code-point, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy c
<span id="L94" class="LineNr"> 94 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, color, background-color
<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="muComment"># draw a single line of text from x, y to xmax</span>
<span id="L98" class="LineNr"> 98 </span><span class="muComment"># return the next 'x' coordinate</span>
<span id="L99" class="LineNr"> 99 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L100" class="LineNr">100 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L100'>draw-text-rightward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, xmax: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x400</span>/print-buffer-size)
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L103" class="LineNr">103 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> xcurr/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L111'>draw-stream-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, x, xmax, y, color, background-color
<span id="L105" class="LineNr">105 </span> <span class="PreProc">return</span> xcurr
<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="muComment"># draw a single-line stream from x, y to xmax</span>
<span id="L109" class="LineNr">109 </span><span class="muComment"># return the next 'x' coordinate</span>
<span id="L110" class="LineNr">110 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L111" class="LineNr">111 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L111'>draw-stream-rightward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), x: int, xmax: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">{</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L115" class="LineNr">115 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L116" class="LineNr">116 </span> <span class="PreProc">break-if-=</span>
<span id="L117" class="LineNr">117 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, xcurr, y, color, background-color
<span id="L118" class="LineNr">118 </span> xcurr <span class="Special">&lt;-</span> increment
<span id="L119" class="LineNr">119 </span> <span class="PreProc">loop</span>
<span id="L120" class="LineNr">120 </span> <span class="Delimiter">}</span>
<span id="L121" class="LineNr">121 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, y
<span id="L122" class="LineNr">122 </span> <span class="PreProc">return</span> xcurr
<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='501draw-text.mu.html#L125'>draw-text-rightward-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L128" class="LineNr">128 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, x, width, y, color, background-color
<span id="L130" class="LineNr">130 </span> <span class="PreProc">return</span> result
<span id="L131" class="LineNr">131 </span><span class="Delimiter">}</span>
<span id="L132" class="LineNr">132 </span>
<span id="L133" class="LineNr">133 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L136" class="LineNr">136 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L137" class="LineNr">137 </span> cursor-x <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, cursor-x, xmax, cursor-y, color, background-color
<span id="L138" class="LineNr">138 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L139" class="LineNr">139 </span><span class="Delimiter">}</span>
<span id="L140" class="LineNr">140 </span>
<span id="L141" class="LineNr">141 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L141'>draw-text-rightward-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L143" class="LineNr">143 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L144" class="LineNr">144 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L145" class="LineNr">145 </span> <a href='501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, width, color, background-color
<span id="L87" class="LineNr"> 87 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> _offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, cursor-x, cursor-y, color, background-color
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> offset/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _offset
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L92" class="LineNr"> 92 </span> width, dummy <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L93" class="LineNr"> 93 </span> <a href='501draw-text.mu.html#L247'>move-cursor-rightward-and-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span> width
<span id="L94" class="LineNr"> 94 </span> offset <span class="Special">&lt;-</span> decrement
<span id="L95" class="LineNr"> 95 </span> compare offset, <span class="Constant">0</span>
<span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">{</span>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">break-if-=</span>
<span id="L98" class="LineNr"> 98 </span> <span class="muComment"># should never move downward here</span>
<span id="L99" class="LineNr"> 99 </span> <a href='501draw-text.mu.html#L247'>move-cursor-rightward-and-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span> width
<span id="L100" class="LineNr">100 </span> <span class="Delimiter">}</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="muComment"># draw a single line of text from x, y to xmax</span>
<span id="L104" class="LineNr">104 </span><span class="muComment"># return the next 'x' coordinate</span>
<span id="L105" class="LineNr">105 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L106" class="LineNr">106 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L106'>draw-text-rightward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, xmax: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x400</span>/print-buffer-size)
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L109" class="LineNr">109 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L110" class="LineNr">110 </span> <span class="PreProc">var</span> xcurr/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L117'>draw-stream-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, x, xmax, y, color, background-color
<span id="L111" class="LineNr">111 </span> <span class="PreProc">return</span> xcurr
<span id="L112" class="LineNr">112 </span><span class="Delimiter">}</span>
<span id="L113" class="LineNr">113 </span>
<span id="L114" class="LineNr">114 </span><span class="muComment"># draw a single-line stream from x, y to xmax</span>
<span id="L115" class="LineNr">115 </span><span class="muComment"># return the next 'x' coordinate</span>
<span id="L116" class="LineNr">116 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L117" class="LineNr">117 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L117'>draw-stream-rightward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), x: int, xmax: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L119" class="LineNr">119 </span> <span class="Delimiter">{</span>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L121" class="LineNr">121 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L122" class="LineNr">122 </span> <span class="PreProc">break-if-=</span>
<span id="L123" class="LineNr">123 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xcurr, y, color, background-color
<span id="L125" class="LineNr">125 </span> xcurr <span class="Special">&lt;-</span> add offset
<span id="L126" class="LineNr">126 </span> <span class="PreProc">loop</span>
<span id="L127" class="LineNr">127 </span> <span class="Delimiter">}</span>
<span id="L128" class="LineNr">128 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, y
<span id="L129" class="LineNr">129 </span> <span class="PreProc">return</span> xcurr
<span id="L130" class="LineNr">130 </span><span class="Delimiter">}</span>
<span id="L131" class="LineNr">131 </span>
<span id="L132" class="LineNr">132 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L132'>draw-text-rightward-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L135" class="LineNr">135 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, x, width, y, color, background-color
<span id="L137" class="LineNr">137 </span> <span class="PreProc">return</span> result
<span id="L138" class="LineNr">138 </span><span class="Delimiter">}</span>
<span id="L139" class="LineNr">139 </span>
<span id="L140" class="LineNr">140 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L143" class="LineNr">143 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L144" class="LineNr">144 </span> cursor-x <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, cursor-x, xmax, cursor-y, color, background-color
<span id="L145" class="LineNr">145 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L146" class="LineNr">146 </span><span class="Delimiter">}</span>
<span id="L147" class="LineNr">147 </span>
<span id="L148" class="LineNr">148 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L148'>render-grapheme</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), g: grapheme, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L149" class="LineNr">149 </span> compare g, <span class="Constant">0xa</span>/newline
<span id="L150" class="LineNr">150 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy x
<span id="L151" class="LineNr">151 </span> <span class="Delimiter">{</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-!=</span>
<span id="L153" class="LineNr">153 </span> <span class="muComment"># minimum effort to clear cursor</span>
<span id="L154" class="LineNr">154 </span> <a href='500fake-screen.mu.html#L130'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x20</span>/space, x, y, color, background-color
<span id="L155" class="LineNr">155 </span> x <span class="Special">&lt;-</span> copy xmin
<span id="L156" class="LineNr">156 </span> increment y
<span id="L157" class="LineNr">157 </span> <span class="PreProc">return</span> x, y
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">}</span>
<span id="L159" class="LineNr">159 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, x, y, color, background-color
<span id="L160" class="LineNr">160 </span> x <span class="Special">&lt;-</span> increment
<span id="L161" class="LineNr">161 </span> compare x, xmax
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">{</span>
<span id="L163" class="LineNr">163 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L164" class="LineNr">164 </span> x <span class="Special">&lt;-</span> copy xmin
<span id="L165" class="LineNr">165 </span> increment y
<span id="L166" class="LineNr">166 </span> <span class="Delimiter">}</span>
<span id="L167" class="LineNr">167 </span> <span class="PreProc">return</span> x, y
<span id="L168" class="LineNr">168 </span><span class="Delimiter">}</span>
<span id="L169" class="LineNr">169 </span>
<span id="L170" class="LineNr">170 </span><span class="muComment"># draw text in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L171" class="LineNr">171 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L172" class="LineNr">172 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L173" class="LineNr">173 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L174" class="LineNr">174 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), _text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x200</span>/print-buffer-size)
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> stream/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> text/<span class="muRegEsi">esi</span>: (addr array byte) <span class="Special">&lt;-</span> copy _text
<span id="L178" class="LineNr">178 </span> <span class="PreProc">var</span> len/eax: int <span class="Special">&lt;-</span> length text
<span id="L179" class="LineNr">179 </span> compare len, <span class="Constant">0x200</span>/print-buffer-size
<span id="L180" class="LineNr">180 </span> <span class="Delimiter">{</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L182" class="LineNr">182 </span> <a href='108write.subx.html#L11'>write</a> stream, <span class="Constant">&quot;ERROR: stream too small in draw-text-wrapping-right-then-down&quot;</span>
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">}</span>
<span id="L184" class="LineNr">184 </span> compare len, <span class="Constant">0x200</span>/print-buffer-size
<span id="L185" class="LineNr">185 </span> <span class="Delimiter">{</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L187" class="LineNr">187 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L188" class="LineNr">188 </span> <span class="Delimiter">}</span>
<span id="L189" class="LineNr">189 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L191" class="LineNr">191 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L199'>draw-stream-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, x, y, color, background-color
<span id="L192" class="LineNr">192 </span> <span class="PreProc">return</span> x, y
<span id="L193" class="LineNr">193 </span><span class="Delimiter">}</span>
<span id="L194" class="LineNr">194 </span>
<span id="L195" class="LineNr">195 </span><span class="muComment"># draw a stream in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L196" class="LineNr">196 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L197" class="LineNr">197 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L198" class="LineNr">198 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L199" class="LineNr">199 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L199'>draw-stream-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L200" class="LineNr">200 </span> <span class="PreProc">var</span> xcurr/eax: int <span class="Special">&lt;-</span> copy x
<span id="L201" class="LineNr">201 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L202" class="LineNr">202 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L203" class="LineNr">203 </span> <span class="Delimiter">{</span>
<span id="L204" class="LineNr">204 </span> <span class="Delimiter">{</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> _g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L206" class="LineNr">206 </span> g <span class="Special">&lt;-</span> copy _g
<span id="L207" class="LineNr">207 </span> <span class="Delimiter">}</span>
<span id="L208" class="LineNr">208 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L209" class="LineNr">209 </span> <span class="PreProc">break-if-=</span>
<span id="L210" class="LineNr">210 </span> xcurr, ycurr <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L148'>render-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, xmin, ymin, xmax, ymax, xcurr, ycurr, color, background-color
<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='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L214" class="LineNr">214 </span> <span class="PreProc">return</span> xcurr, ycurr
<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='501draw-text.mu.html#L217'>draw-stream-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L219" class="LineNr">219 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L220" class="LineNr">220 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L221" class="LineNr">221 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L222" class="LineNr">222 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L223" class="LineNr">223 </span> compare end-x, xmax
<span id="L224" class="LineNr">224 </span> <span class="Delimiter">{</span>
<span id="L225" class="LineNr">225 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L226" class="LineNr">226 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L227" class="LineNr">227 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L228" class="LineNr">228 </span> <span class="Delimiter">}</span>
<span id="L229" class="LineNr">229 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L199'>draw-stream-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L230" class="LineNr">230 </span><span class="Delimiter">}</span>
<span id="L231" class="LineNr">231 </span>
<span id="L232" class="LineNr">232 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L232'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L234" class="LineNr">234 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L235" class="LineNr">235 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L236" class="LineNr">236 </span> <a href='501draw-text.mu.html#L217'>draw-stream-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<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='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), xmin: int, xmax: int <span class="Delimiter">{</span>
<span id="L240" class="LineNr">240 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L242" class="LineNr">242 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L243" class="LineNr">243 </span> cursor-x <span class="Special">&lt;-</span> increment
<span id="L244" class="LineNr">244 </span> compare cursor-x, xmax
<span id="L245" class="LineNr">245 </span> <span class="Delimiter">{</span>
<span id="L246" class="LineNr">246 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L247" class="LineNr">247 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L248" class="LineNr">248 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L249" class="LineNr">249 </span> <span class="Delimiter">}</span>
<span id="L250" class="LineNr">250 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<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="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L253'>draw-text-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L254" class="LineNr">254 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L255" class="LineNr">255 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L256" class="LineNr">256 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L257" class="LineNr">257 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L258" class="LineNr">258 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L148" class="LineNr">148 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L148'>draw-text-rightward-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L150" class="LineNr">150 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L151" class="LineNr">151 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L152" class="LineNr">152 </span> <a href='501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, width, color, background-color
<span id="L153" class="LineNr">153 </span><span class="Delimiter">}</span>
<span id="L154" class="LineNr">154 </span>
<span id="L155" class="LineNr">155 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L155'>render-code-point</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), c: code-point, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L156" class="LineNr">156 </span> compare c, <span class="Constant">0xa</span>/newline
<span id="L157" class="LineNr">157 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">{</span>
<span id="L159" class="LineNr">159 </span> <span class="PreProc">break-if-!=</span>
<span id="L160" class="LineNr">160 </span> <span class="muComment"># minimum effort to clear cursor</span>
<span id="L161" class="LineNr">161 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x20</span>/space, x, y, color, background-color
<span id="L162" class="LineNr">162 </span> x <span class="Special">&lt;-</span> copy xmin
<span id="L163" class="LineNr">163 </span> increment y
<span id="L164" class="LineNr">164 </span> <span class="PreProc">return</span> x, y
<span id="L165" class="LineNr">165 </span> <span class="Delimiter">}</span>
<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, x, y, color, background-color
<span id="L167" class="LineNr">167 </span> x <span class="Special">&lt;-</span> add offset
<span id="L168" class="LineNr">168 </span> compare x, xmax
<span id="L169" class="LineNr">169 </span> <span class="Delimiter">{</span>
<span id="L170" class="LineNr">170 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L171" class="LineNr">171 </span> x <span class="Special">&lt;-</span> copy xmin
<span id="L172" class="LineNr">172 </span> increment y
<span id="L173" class="LineNr">173 </span> <span class="Delimiter">}</span>
<span id="L174" class="LineNr">174 </span> <span class="PreProc">return</span> x, y
<span id="L175" class="LineNr">175 </span><span class="Delimiter">}</span>
<span id="L176" class="LineNr">176 </span>
<span id="L177" class="LineNr">177 </span><span class="muComment"># draw text in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L178" class="LineNr">178 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L179" class="LineNr">179 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L180" class="LineNr">180 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L181" class="LineNr">181 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), _text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L182" class="LineNr">182 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x200</span>/print-buffer-size)
<span id="L183" class="LineNr">183 </span> <span class="PreProc">var</span> stream/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L184" class="LineNr">184 </span> <span class="PreProc">var</span> text/<span class="muRegEsi">esi</span>: (addr array byte) <span class="Special">&lt;-</span> copy _text
<span id="L185" class="LineNr">185 </span> <span class="PreProc">var</span> len/eax: int <span class="Special">&lt;-</span> length text
<span id="L186" class="LineNr">186 </span> compare len, <span class="Constant">0x200</span>/print-buffer-size
<span id="L187" class="LineNr">187 </span> <span class="Delimiter">{</span>
<span id="L188" class="LineNr">188 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L189" class="LineNr">189 </span> <a href='108write.subx.html#L11'>write</a> stream, <span class="Constant">&quot;ERROR: stream too small in draw-text-wrapping-right-then-down&quot;</span>
<span id="L190" class="LineNr">190 </span> <span class="Delimiter">}</span>
<span id="L191" class="LineNr">191 </span> compare len, <span class="Constant">0x200</span>/print-buffer-size
<span id="L192" class="LineNr">192 </span> <span class="Delimiter">{</span>
<span id="L193" class="LineNr">193 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L194" class="LineNr">194 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L195" class="LineNr">195 </span> <span class="Delimiter">}</span>
<span id="L196" class="LineNr">196 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L197" class="LineNr">197 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L198" class="LineNr">198 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L206'>draw-stream-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, x, y, color, background-color
<span id="L199" class="LineNr">199 </span> <span class="PreProc">return</span> x, y
<span id="L200" class="LineNr">200 </span><span class="Delimiter">}</span>
<span id="L201" class="LineNr">201 </span>
<span id="L202" class="LineNr">202 </span><span class="muComment"># draw a stream in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L203" class="LineNr">203 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L204" class="LineNr">204 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L205" class="LineNr">205 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L206" class="LineNr">206 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L206'>draw-stream-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> xcurr/eax: int <span class="Special">&lt;-</span> copy x
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L209" class="LineNr">209 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L210" class="LineNr">210 </span> <span class="Delimiter">{</span>
<span id="L211" class="LineNr">211 </span> <span class="Delimiter">{</span>
<span id="L212" class="LineNr">212 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L213" class="LineNr">213 </span> <span class="PreProc">var</span> _c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L214" class="LineNr">214 </span> c <span class="Special">&lt;-</span> copy _c
<span id="L215" class="LineNr">215 </span> <span class="Delimiter">}</span>
<span id="L216" class="LineNr">216 </span> compare c, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L217" class="LineNr">217 </span> <span class="PreProc">break-if-=</span>
<span id="L218" class="LineNr">218 </span> xcurr, ycurr <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L155'>render-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xmin, ymin, xmax, ymax, xcurr, ycurr, color, background-color
<span id="L219" class="LineNr">219 </span> <span class="PreProc">loop</span>
<span id="L220" class="LineNr">220 </span> <span class="Delimiter">}</span>
<span id="L221" class="LineNr">221 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L222" class="LineNr">222 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L223" class="LineNr">223 </span><span class="Delimiter">}</span>
<span id="L224" class="LineNr">224 </span>
<span id="L225" class="LineNr">225 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L225'>draw-stream-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L226" class="LineNr">226 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L227" class="LineNr">227 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L228" class="LineNr">228 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L230" class="LineNr">230 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L231" class="LineNr">231 </span> compare end-x, xmax
<span id="L232" class="LineNr">232 </span> <span class="Delimiter">{</span>
<span id="L233" class="LineNr">233 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L234" class="LineNr">234 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L235" class="LineNr">235 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L236" class="LineNr">236 </span> <span class="Delimiter">}</span>
<span id="L237" class="LineNr">237 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L206'>draw-stream-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L238" class="LineNr">238 </span><span class="Delimiter">}</span>
<span id="L239" class="LineNr">239 </span>
<span id="L240" class="LineNr">240 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L240'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L242" class="LineNr">242 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L243" class="LineNr">243 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L244" class="LineNr">244 </span> <a href='501draw-text.mu.html#L225'>draw-stream-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<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='501draw-text.mu.html#L247'>move-cursor-rightward-and-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), xmin: int, xmax: int <span class="Delimiter">{</span>
<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L249" class="LineNr">249 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L250" class="LineNr">250 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L251" class="LineNr">251 </span> cursor-x <span class="Special">&lt;-</span> increment
<span id="L252" class="LineNr">252 </span> compare cursor-x, xmax
<span id="L253" class="LineNr">253 </span> <span class="Delimiter">{</span>
<span id="L254" class="LineNr">254 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L255" class="LineNr">255 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L256" class="LineNr">256 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L257" class="LineNr">257 </span> <span class="Delimiter">}</span>
<span id="L258" class="LineNr">258 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, cursor-x, cursor-y
<span id="L259" class="LineNr">259 </span><span class="Delimiter">}</span>
<span id="L260" class="LineNr">260 </span>
<span id="L261" class="LineNr">261 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L263" class="LineNr">263 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L264" class="LineNr">264 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L265" class="LineNr">265 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L266" class="LineNr">266 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L267" class="LineNr">267 </span> compare end-x, xmax
<span id="L268" class="LineNr">268 </span> <span class="Delimiter">{</span>
<span id="L269" class="LineNr">269 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L270" class="LineNr">270 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L271" class="LineNr">271 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L272" class="LineNr">272 </span> <span class="Delimiter">}</span>
<span id="L273" class="LineNr">273 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<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='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L278" class="LineNr">278 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L279" class="LineNr">279 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L280" class="LineNr">280 </span> <a href='501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L281" class="LineNr">281 </span><span class="Delimiter">}</span>
<span id="L282" class="LineNr">282 </span>
<span id="L283" class="LineNr">283 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L283'>draw-int32-hex-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L284" class="LineNr">284 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L285" class="LineNr">285 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L286" class="LineNr">286 </span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> stream, n
<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L289" class="LineNr">289 </span> <span class="Delimiter">{</span>
<span id="L290" class="LineNr">290 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L291" class="LineNr">291 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L292" class="LineNr">292 </span> <span class="PreProc">break-if-=</span>
<span id="L293" class="LineNr">293 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, xcurr, ycurr, color, background-color
<span id="L294" class="LineNr">294 </span> xcurr <span class="Special">&lt;-</span> increment
<span id="L295" class="LineNr">295 </span> compare xcurr, xmax
<span id="L296" class="LineNr">296 </span> <span class="Delimiter">{</span>
<span id="L297" class="LineNr">297 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L298" class="LineNr">298 </span> xcurr <span class="Special">&lt;-</span> copy xmin
<span id="L299" class="LineNr">299 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L300" class="LineNr">300 </span> <span class="Delimiter">}</span>
<span id="L301" class="LineNr">301 </span> <span class="PreProc">loop</span>
<span id="L302" class="LineNr">302 </span> <span class="Delimiter">}</span>
<span id="L303" class="LineNr">303 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L304" class="LineNr">304 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L305" class="LineNr">305 </span><span class="Delimiter">}</span>
<span id="L306" class="LineNr">306 </span>
<span id="L307" class="LineNr">307 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L307'>draw-int32-hex-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L308" class="LineNr">308 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L309" class="LineNr">309 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L310" class="LineNr">310 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L311" class="LineNr">311 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L283'>draw-int32-hex-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L312" class="LineNr">312 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</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='501draw-text.mu.html#L315'>draw-int32-hex-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L316" class="LineNr">316 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L317" class="LineNr">317 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L318" class="LineNr">318 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L319" class="LineNr">319 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L320" class="LineNr">320 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L321" class="LineNr">321 </span> compare end-x, xmax
<span id="L322" class="LineNr">322 </span> <span class="Delimiter">{</span>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L324" class="LineNr">324 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L325" class="LineNr">325 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L326" class="LineNr">326 </span> <span class="Delimiter">}</span>
<span id="L327" class="LineNr">327 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L283'>draw-int32-hex-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L328" class="LineNr">328 </span><span class="Delimiter">}</span>
<span id="L329" class="LineNr">329 </span>
<span id="L330" class="LineNr">330 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L331" class="LineNr">331 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L332" class="LineNr">332 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L333" class="LineNr">333 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L334" class="LineNr">334 </span> <a href='501draw-text.mu.html#L315'>draw-int32-hex-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L335" class="LineNr">335 </span><span class="Delimiter">}</span>
<span id="L336" class="LineNr">336 </span>
<span id="L337" class="LineNr">337 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L337'>draw-int32-decimal-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L340" class="LineNr">340 </span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> stream, n
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L342" class="LineNr">342 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L343" class="LineNr">343 </span> <span class="Delimiter">{</span>
<span id="L344" class="LineNr">344 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L345" class="LineNr">345 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L346" class="LineNr">346 </span> <span class="PreProc">break-if-=</span>
<span id="L347" class="LineNr">347 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, xcurr, ycurr, color, background-color
<span id="L348" class="LineNr">348 </span> xcurr <span class="Special">&lt;-</span> increment
<span id="L349" class="LineNr">349 </span> compare xcurr, xmax
<span id="L350" class="LineNr">350 </span> <span class="Delimiter">{</span>
<span id="L351" class="LineNr">351 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L352" class="LineNr">352 </span> xcurr <span class="Special">&lt;-</span> copy xmin
<span id="L353" class="LineNr">353 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L354" class="LineNr">354 </span> <span class="Delimiter">}</span>
<span id="L355" class="LineNr">355 </span> <span class="PreProc">loop</span>
<span id="L356" class="LineNr">356 </span> <span class="Delimiter">}</span>
<span id="L357" class="LineNr">357 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L358" class="LineNr">358 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L359" class="LineNr">359 </span><span class="Delimiter">}</span>
<span id="L360" class="LineNr">360 </span>
<span id="L361" class="LineNr">361 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L361'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L362" class="LineNr">362 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L363" class="LineNr">363 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L364" class="LineNr">364 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L365" class="LineNr">365 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L337'>draw-int32-decimal-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L366" class="LineNr">366 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L367" class="LineNr">367 </span><span class="Delimiter">}</span>
<span id="L368" class="LineNr">368 </span>
<span id="L369" class="LineNr">369 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L369'>draw-int32-decimal-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L371" class="LineNr">371 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L372" class="LineNr">372 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L374" class="LineNr">374 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L375" class="LineNr">375 </span> compare end-x, xmax
<span id="L376" class="LineNr">376 </span> <span class="Delimiter">{</span>
<span id="L377" class="LineNr">377 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L378" class="LineNr">378 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L379" class="LineNr">379 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L380" class="LineNr">380 </span> <span class="Delimiter">}</span>
<span id="L381" class="LineNr">381 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L337'>draw-int32-decimal-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L382" class="LineNr">382 </span><span class="Delimiter">}</span>
<span id="L383" class="LineNr">383 </span>
<span id="L384" class="LineNr">384 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L385" class="LineNr">385 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L386" class="LineNr">386 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L387" class="LineNr">387 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L388" class="LineNr">388 </span> <a href='501draw-text.mu.html#L369'>draw-int32-decimal-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L389" class="LineNr">389 </span><span class="Delimiter">}</span>
<span id="L390" class="LineNr">390 </span>
<span id="L391" class="LineNr">391 </span><span class="muComment">## Text direction: down then right</span>
<span id="L392" class="LineNr">392 </span>
<span id="L393" class="LineNr">393 </span><span class="muComment"># draw a single line of text vertically from x, y to ymax</span>
<span id="L394" class="LineNr">394 </span><span class="muComment"># return the next 'y' coordinate</span>
<span id="L395" class="LineNr">395 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L396" class="LineNr">396 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L396'>draw-text-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, ymax: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L397" class="LineNr">397 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L398" class="LineNr">398 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L399" class="LineNr">399 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L400" class="LineNr">400 </span> <span class="PreProc">var</span> ycurr/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L407'>draw-stream-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, x, y, ymax, color, background-color
<span id="L401" class="LineNr">401 </span> <span class="PreProc">return</span> ycurr
<span id="L402" class="LineNr">402 </span><span class="Delimiter">}</span>
<span id="L403" class="LineNr">403 </span>
<span id="L404" class="LineNr">404 </span><span class="muComment"># draw a single-line stream vertically from x, y to ymax</span>
<span id="L405" class="LineNr">405 </span><span class="muComment"># return the next 'y' coordinate</span>
<span id="L406" class="LineNr">406 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L407" class="LineNr">407 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L407'>draw-stream-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), x: int, y: int, ymax: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L408" class="LineNr">408 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L409" class="LineNr">409 </span> <span class="Delimiter">{</span>
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L411" class="LineNr">411 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L412" class="LineNr">412 </span> <span class="PreProc">break-if-=</span>
<span id="L413" class="LineNr">413 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, x, ycurr, color, background-color
<span id="L414" class="LineNr">414 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L415" class="LineNr">415 </span> <span class="PreProc">loop</span>
<span id="L416" class="LineNr">416 </span> <span class="Delimiter">}</span>
<span id="L417" class="LineNr">417 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, ycurr
<span id="L418" class="LineNr">418 </span> <span class="PreProc">return</span> ycurr
<span id="L419" class="LineNr">419 </span><span class="Delimiter">}</span>
<span id="L420" class="LineNr">420 </span>
<span id="L421" class="LineNr">421 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L421'>draw-text-downward-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L422" class="LineNr">422 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L423" class="LineNr">423 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L424" class="LineNr">424 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L425" class="LineNr">425 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L396'>draw-text-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, cursor-x, cursor-y, ymax, color, background-color
<span id="L426" class="LineNr">426 </span><span class="Delimiter">}</span>
<span id="L427" class="LineNr">427 </span>
<span id="L428" class="LineNr">428 </span><span class="muComment"># draw text down and right in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L429" class="LineNr">429 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L430" class="LineNr">430 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L431" class="LineNr">431 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L432" class="LineNr">432 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L432'>draw-text-wrapping-down-then-right</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L433" class="LineNr">433 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L434" class="LineNr">434 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L435" class="LineNr">435 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L436" class="LineNr">436 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L437" class="LineNr">437 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L438" class="LineNr">438 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L446'>draw-stream-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, x, y, color, background-color
<span id="L439" class="LineNr">439 </span> <span class="PreProc">return</span> x, y
<span id="L440" class="LineNr">440 </span><span class="Delimiter">}</span>
<span id="L441" class="LineNr">441 </span>
<span id="L442" class="LineNr">442 </span><span class="muComment"># draw a stream down and right in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L443" class="LineNr">443 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L444" class="LineNr">444 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L445" class="LineNr">445 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L446" class="LineNr">446 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L446'>draw-stream-wrapping-down-then-right</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L447" class="LineNr">447 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L448" class="LineNr">448 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L449" class="LineNr">449 </span> <span class="Delimiter">{</span>
<span id="L450" class="LineNr">450 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> stream
<span id="L451" class="LineNr">451 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L452" class="LineNr">452 </span> <span class="PreProc">break-if-=</span>
<span id="L453" class="LineNr">453 </span> <a href='500fake-screen.mu.html#L104'>draw-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, g, xcurr, ycurr, color, background-color
<span id="L454" class="LineNr">454 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L455" class="LineNr">455 </span> compare ycurr, ymax
<span id="L456" class="LineNr">456 </span> <span class="Delimiter">{</span>
<span id="L457" class="LineNr">457 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L458" class="LineNr">458 </span> xcurr <span class="Special">&lt;-</span> increment
<span id="L459" class="LineNr">459 </span> ycurr <span class="Special">&lt;-</span> copy ymin
<span id="L460" class="LineNr">460 </span> <span class="Delimiter">}</span>
<span id="L461" class="LineNr">461 </span> <span class="PreProc">loop</span>
<span id="L462" class="LineNr">462 </span> <span class="Delimiter">}</span>
<span id="L463" class="LineNr">463 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L464" class="LineNr">464 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L465" class="LineNr">465 </span><span class="Delimiter">}</span>
<span id="L466" class="LineNr">466 </span>
<span id="L467" class="LineNr">467 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L467'>draw-text-wrapping-down-then-right-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L468" class="LineNr">468 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L469" class="LineNr">469 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L470" class="LineNr">470 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L471" class="LineNr">471 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L432'>draw-text-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L472" class="LineNr">472 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L473" class="LineNr">473 </span><span class="Delimiter">}</span>
<span id="L474" class="LineNr">474 </span>
<span id="L475" class="LineNr">475 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L475'>draw-text-wrapping-down-then-right-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L476" class="LineNr">476 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L477" class="LineNr">477 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L478" class="LineNr">478 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L174'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L479" class="LineNr">479 </span> <span class="PreProc">var</span> end-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-y
<span id="L480" class="LineNr">480 </span> end-y <span class="Special">&lt;-</span> increment
<span id="L481" class="LineNr">481 </span> compare end-y, ymax
<span id="L482" class="LineNr">482 </span> <span class="Delimiter">{</span>
<span id="L483" class="LineNr">483 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L484" class="LineNr">484 </span> cursor-x <span class="Special">&lt;-</span> increment
<span id="L485" class="LineNr">485 </span> cursor-y <span class="Special">&lt;-</span> copy ymin
<span id="L486" class="LineNr">486 </span> <span class="Delimiter">}</span>
<span id="L487" class="LineNr">487 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L432'>draw-text-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<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='501draw-text.mu.html#L490'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L491" class="LineNr">491 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L492" class="LineNr">492 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L493" class="LineNr">493 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L494" class="LineNr">494 </span> <a href='501draw-text.mu.html#L475'>draw-text-wrapping-down-then-right-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L495" class="LineNr">495 </span><span class="Delimiter">}</span>
<span id="L261" class="LineNr">261 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L263" class="LineNr">263 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L264" class="LineNr">264 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L265" class="LineNr">265 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L266" class="LineNr">266 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L267" class="LineNr">267 </span><span class="Delimiter">}</span>
<span id="L268" class="LineNr">268 </span>
<span id="L269" class="LineNr">269 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L270" class="LineNr">270 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L271" class="LineNr">271 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L272" class="LineNr">272 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L273" class="LineNr">273 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L274" class="LineNr">274 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L275" class="LineNr">275 </span> compare end-x, xmax
<span id="L276" class="LineNr">276 </span> <span class="Delimiter">{</span>
<span id="L277" class="LineNr">277 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L278" class="LineNr">278 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L279" class="LineNr">279 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L280" class="LineNr">280 </span> <span class="Delimiter">}</span>
<span id="L281" class="LineNr">281 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<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="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L285" class="LineNr">285 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L287" class="LineNr">287 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L288" class="LineNr">288 </span> <a href='501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L289" class="LineNr">289 </span><span class="Delimiter">}</span>
<span id="L290" class="LineNr">290 </span>
<span id="L291" class="LineNr">291 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L291'>draw-int32-hex-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L292" class="LineNr">292 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L293" class="LineNr">293 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L294" class="LineNr">294 </span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> stream, n
<span id="L295" class="LineNr">295 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L296" class="LineNr">296 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L297" class="LineNr">297 </span> <span class="Delimiter">{</span>
<span id="L298" class="LineNr">298 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L299" class="LineNr">299 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L300" class="LineNr">300 </span> <span class="PreProc">break-if-=</span>
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L302" class="LineNr">302 </span> <span class="PreProc">var</span> offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xcurr, ycurr, color, background-color
<span id="L303" class="LineNr">303 </span> xcurr <span class="Special">&lt;-</span> add offset
<span id="L304" class="LineNr">304 </span> compare xcurr, xmax
<span id="L305" class="LineNr">305 </span> <span class="Delimiter">{</span>
<span id="L306" class="LineNr">306 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L307" class="LineNr">307 </span> xcurr <span class="Special">&lt;-</span> copy xmin
<span id="L308" class="LineNr">308 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L309" class="LineNr">309 </span> <span class="Delimiter">}</span>
<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='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L313" class="LineNr">313 </span> <span class="PreProc">return</span> xcurr, ycurr
<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="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L316'>draw-int32-hex-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L317" class="LineNr">317 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L318" class="LineNr">318 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L319" class="LineNr">319 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L320" class="LineNr">320 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L291'>draw-int32-hex-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L321" class="LineNr">321 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L322" class="LineNr">322 </span><span class="Delimiter">}</span>
<span id="L323" class="LineNr">323 </span>
<span id="L324" class="LineNr">324 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L324'>draw-int32-hex-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L325" class="LineNr">325 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L326" class="LineNr">326 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L327" class="LineNr">327 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L328" class="LineNr">328 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L329" class="LineNr">329 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L330" class="LineNr">330 </span> compare end-x, xmax
<span id="L331" class="LineNr">331 </span> <span class="Delimiter">{</span>
<span id="L332" class="LineNr">332 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L333" class="LineNr">333 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L334" class="LineNr">334 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L335" class="LineNr">335 </span> <span class="Delimiter">}</span>
<span id="L336" class="LineNr">336 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L291'>draw-int32-hex-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L337" class="LineNr">337 </span><span class="Delimiter">}</span>
<span id="L338" class="LineNr">338 </span>
<span id="L339" class="LineNr">339 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L340" class="LineNr">340 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L342" class="LineNr">342 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L343" class="LineNr">343 </span> <a href='501draw-text.mu.html#L324'>draw-int32-hex-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L344" class="LineNr">344 </span><span class="Delimiter">}</span>
<span id="L345" class="LineNr">345 </span>
<span id="L346" class="LineNr">346 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L346'>draw-int32-decimal-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L347" class="LineNr">347 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L348" class="LineNr">348 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L349" class="LineNr">349 </span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> stream, n
<span id="L350" class="LineNr">350 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L351" class="LineNr">351 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L352" class="LineNr">352 </span> <span class="Delimiter">{</span>
<span id="L353" class="LineNr">353 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L354" class="LineNr">354 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L355" class="LineNr">355 </span> <span class="PreProc">break-if-=</span>
<span id="L356" class="LineNr">356 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L357" class="LineNr">357 </span> <span class="PreProc">var</span> offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xcurr, ycurr, color, background-color
<span id="L358" class="LineNr">358 </span> xcurr <span class="Special">&lt;-</span> add offset
<span id="L359" class="LineNr">359 </span> compare xcurr, xmax
<span id="L360" class="LineNr">360 </span> <span class="Delimiter">{</span>
<span id="L361" class="LineNr">361 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L362" class="LineNr">362 </span> xcurr <span class="Special">&lt;-</span> copy xmin
<span id="L363" class="LineNr">363 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L364" class="LineNr">364 </span> <span class="Delimiter">}</span>
<span id="L365" class="LineNr">365 </span> <span class="PreProc">loop</span>
<span id="L366" class="LineNr">366 </span> <span class="Delimiter">}</span>
<span id="L367" class="LineNr">367 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L368" class="LineNr">368 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L369" class="LineNr">369 </span><span class="Delimiter">}</span>
<span id="L370" class="LineNr">370 </span>
<span id="L371" class="LineNr">371 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L371'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L374" class="LineNr">374 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L375" class="LineNr">375 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L346'>draw-int32-decimal-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L376" class="LineNr">376 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L377" class="LineNr">377 </span><span class="Delimiter">}</span>
<span id="L378" class="LineNr">378 </span>
<span id="L379" class="LineNr">379 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L379'>draw-int32-decimal-wrapping-right-then-down-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L382" class="LineNr">382 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L383" class="LineNr">383 </span> <span class="PreProc">var</span> end-x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-x
<span id="L384" class="LineNr">384 </span> end-x <span class="Special">&lt;-</span> increment
<span id="L385" class="LineNr">385 </span> compare end-x, xmax
<span id="L386" class="LineNr">386 </span> <span class="Delimiter">{</span>
<span id="L387" class="LineNr">387 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L388" class="LineNr">388 </span> cursor-x <span class="Special">&lt;-</span> copy xmin
<span id="L389" class="LineNr">389 </span> cursor-y <span class="Special">&lt;-</span> increment
<span id="L390" class="LineNr">390 </span> <span class="Delimiter">}</span>
<span id="L391" class="LineNr">391 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L346'>draw-int32-decimal-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L392" class="LineNr">392 </span><span class="Delimiter">}</span>
<span id="L393" class="LineNr">393 </span>
<span id="L394" class="LineNr">394 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), n: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L395" class="LineNr">395 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L396" class="LineNr">396 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L397" class="LineNr">397 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L398" class="LineNr">398 </span> <a href='501draw-text.mu.html#L379'>draw-int32-decimal-wrapping-right-then-down-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L399" class="LineNr">399 </span><span class="Delimiter">}</span>
<span id="L400" class="LineNr">400 </span>
<span id="L401" class="LineNr">401 </span><span class="muComment">## Text direction: down then right</span>
<span id="L402" class="LineNr">402 </span>
<span id="L403" class="LineNr">403 </span><span class="muComment"># draw a single line of text vertically from x, y to ymax</span>
<span id="L404" class="LineNr">404 </span><span class="muComment"># return the next 'y' coordinate</span>
<span id="L405" class="LineNr">405 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L406" class="LineNr">406 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L406'>draw-text-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, ymax: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L407" class="LineNr">407 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L408" class="LineNr">408 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L409" class="LineNr">409 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> ycurr/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L418'>draw-stream-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, x, y, ymax, color, background-color
<span id="L411" class="LineNr">411 </span> <span class="PreProc">return</span> ycurr
<span id="L412" class="LineNr">412 </span><span class="Delimiter">}</span>
<span id="L413" class="LineNr">413 </span>
<span id="L414" class="LineNr">414 </span><span class="muComment"># draw a single-line stream vertically from x, y to ymax</span>
<span id="L415" class="LineNr">415 </span><span class="muComment"># return the next 'y' coordinate</span>
<span id="L416" class="LineNr">416 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L417" class="LineNr">417 </span><span class="muComment"># TODO: should we track horizontal width?</span>
<span id="L418" class="LineNr">418 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L418'>draw-stream-downward</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), x: int, y: int, ymax: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L419" class="LineNr">419 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L420" class="LineNr">420 </span> <span class="Delimiter">{</span>
<span id="L421" class="LineNr">421 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L422" class="LineNr">422 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L423" class="LineNr">423 </span> <span class="PreProc">break-if-=</span>
<span id="L424" class="LineNr">424 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L425" class="LineNr">425 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, x, ycurr, color, background-color
<span id="L426" class="LineNr">426 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L427" class="LineNr">427 </span> <span class="PreProc">loop</span>
<span id="L428" class="LineNr">428 </span> <span class="Delimiter">}</span>
<span id="L429" class="LineNr">429 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, ycurr
<span id="L430" class="LineNr">430 </span> <span class="PreProc">return</span> ycurr
<span id="L431" class="LineNr">431 </span><span class="Delimiter">}</span>
<span id="L432" class="LineNr">432 </span>
<span id="L433" class="LineNr">433 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L433'>draw-text-downward-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L434" class="LineNr">434 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L435" class="LineNr">435 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L436" class="LineNr">436 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L437" class="LineNr">437 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L406'>draw-text-downward</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, cursor-x, cursor-y, ymax, color, background-color
<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="muComment"># draw text down and right in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L441" class="LineNr">441 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L442" class="LineNr">442 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L443" class="LineNr">443 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L444" class="LineNr">444 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L444'>draw-text-wrapping-down-then-right</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L445" class="LineNr">445 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L446" class="LineNr">446 </span> <span class="PreProc">var</span> stream/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L447" class="LineNr">447 </span> <a href='108write.subx.html#L11'>write</a> stream, text
<span id="L448" class="LineNr">448 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L449" class="LineNr">449 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L450" class="LineNr">450 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L459'>draw-stream-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, stream, xmin, ymin, xmax, ymax, x, y, color, background-color
<span id="L451" class="LineNr">451 </span> <span class="PreProc">return</span> x, y
<span id="L452" class="LineNr">452 </span><span class="Delimiter">}</span>
<span id="L453" class="LineNr">453 </span>
<span id="L454" class="LineNr">454 </span><span class="muComment"># draw a stream down and right in the rectangle from (xmin, ymin) to (xmax, ymax), starting from (x, y), wrapping as necessary</span>
<span id="L455" class="LineNr">455 </span><span class="muComment"># return the next (x, y) coordinate in raster order where drawing stopped</span>
<span id="L456" class="LineNr">456 </span><span class="muComment"># that way the caller can draw more if given the same min and max bounding-box.</span>
<span id="L457" class="LineNr">457 </span><span class="muComment"># if there isn't enough space, truncate</span>
<span id="L458" class="LineNr">458 </span><span class="muComment"># TODO: should we track horizontal width? just always offset by 2 for now</span>
<span id="L459" class="LineNr">459 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L459'>draw-stream-wrapping-down-then-right</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), stream: (addr stream byte), xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L460" class="LineNr">460 </span> <span class="PreProc">var</span> xcurr/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L461" class="LineNr">461 </span> <span class="PreProc">var</span> ycurr/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L462" class="LineNr">462 </span> <span class="Delimiter">{</span>
<span id="L463" class="LineNr">463 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> stream
<span id="L464" class="LineNr">464 </span> compare g, <span class="Constant">0xffffffff</span>/end-of-file
<span id="L465" class="LineNr">465 </span> <span class="PreProc">break-if-=</span>
<span id="L466" class="LineNr">466 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> g
<span id="L467" class="LineNr">467 </span> <span class="PreProc">var</span> offset/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xcurr, ycurr, color, background-color
<span id="L468" class="LineNr">468 </span> ycurr <span class="Special">&lt;-</span> increment
<span id="L469" class="LineNr">469 </span> compare ycurr, ymax
<span id="L470" class="LineNr">470 </span> <span class="Delimiter">{</span>
<span id="L471" class="LineNr">471 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L472" class="LineNr">472 </span> xcurr <span class="Special">&lt;-</span> add <span class="Constant">2</span>
<span id="L473" class="LineNr">473 </span> ycurr <span class="Special">&lt;-</span> copy ymin
<span id="L474" class="LineNr">474 </span> <span class="Delimiter">}</span>
<span id="L475" class="LineNr">475 </span> <span class="PreProc">loop</span>
<span id="L476" class="LineNr">476 </span> <span class="Delimiter">}</span>
<span id="L477" class="LineNr">477 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>, xcurr, ycurr
<span id="L478" class="LineNr">478 </span> <span class="PreProc">return</span> xcurr, ycurr
<span id="L479" class="LineNr">479 </span><span class="Delimiter">}</span>
<span id="L480" class="LineNr">480 </span>
<span id="L481" class="LineNr">481 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L481'>draw-text-wrapping-down-then-right-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), x: int, y: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L482" class="LineNr">482 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L483" class="LineNr">483 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L484" class="LineNr">484 </span> x2, y2 <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a> <span class="muComment"># width, height</span>
<span id="L485" class="LineNr">485 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L444'>draw-text-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, x2, y2, x, y, color, background-color
<span id="L486" class="LineNr">486 </span> <span class="PreProc">return</span> x2, y2 <span class="muComment"># cursor-x, cursor-y</span>
<span id="L487" class="LineNr">487 </span><span class="Delimiter">}</span>
<span id="L488" class="LineNr">488 </span>
<span id="L489" class="LineNr">489 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L489'>draw-text-wrapping-down-then-right-from-cursor</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, color: int, background-color: int <span class="Delimiter">{</span>
<span id="L490" class="LineNr">490 </span> <span class="PreProc">var</span> cursor-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L491" class="LineNr">491 </span> <span class="PreProc">var</span> cursor-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L492" class="LineNr">492 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L230'>cursor-position</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L493" class="LineNr">493 </span> <span class="PreProc">var</span> end-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy cursor-y
<span id="L494" class="LineNr">494 </span> end-y <span class="Special">&lt;-</span> increment
<span id="L495" class="LineNr">495 </span> compare end-y, ymax
<span id="L496" class="LineNr">496 </span> <span class="Delimiter">{</span>
<span id="L497" class="LineNr">497 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L498" class="LineNr">498 </span> cursor-x <span class="Special">&lt;-</span> increment
<span id="L499" class="LineNr">499 </span> cursor-y <span class="Special">&lt;-</span> copy ymin
<span id="L500" class="LineNr">500 </span> <span class="Delimiter">}</span>
<span id="L501" class="LineNr">501 </span> cursor-x, cursor-y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L444'>draw-text-wrapping-down-then-right</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, xmin, ymin, xmax, ymax, cursor-x, cursor-y, color, background-color
<span id="L502" class="LineNr">502 </span><span class="Delimiter">}</span>
<span id="L503" class="LineNr">503 </span>
<span id="L504" class="LineNr">504 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='501draw-text.mu.html#L504'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), text: (addr array byte), color: int, background-color: int <span class="Delimiter">{</span>
<span id="L505" class="LineNr">505 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L506" class="LineNr">506 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L507" class="LineNr">507 </span> width, height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L508" class="LineNr">508 </span> <a href='501draw-text.mu.html#L489'>draw-text-wrapping-down-then-right-from-cursor</a> <a href='500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, width, height, color, background-color
<span id="L509" class="LineNr">509 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

12
html/502test.mu.html generated
View File

@ -63,10 +63,10 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span> compare a, b
<span id="L5" class="LineNr"> 5 </span> <span class="Delimiter">{</span>
<span id="L6" class="LineNr"> 6 </span> <span class="PreProc">break-if-!=</span>
<span id="L7" class="LineNr"> 7 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L7" class="LineNr"> 7 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L8" class="LineNr"> 8 </span> <span class="PreProc">return</span>
<span id="L9" class="LineNr"> 9 </span> <span class="Delimiter">}</span>
<span id="L10" class="LineNr">10 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L10" class="LineNr">10 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L11" class="LineNr">11 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L12" class="LineNr">12 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L13" class="LineNr">13 </span><span class="Delimiter">}</span>
@ -80,10 +80,10 @@ if ('onhashchange' in window) {
<span id="L21" class="LineNr">21 </span> compare a, <span class="Constant">0</span>/false
<span id="L22" class="LineNr">22 </span> <span class="Delimiter">{</span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">break-if-=</span>
<span id="L24" class="LineNr">24 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L24" class="LineNr">24 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L25" class="LineNr">25 </span> <span class="PreProc">return</span>
<span id="L26" class="LineNr">26 </span> <span class="Delimiter">}</span>
<span id="L27" class="LineNr">27 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L27" class="LineNr">27 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L28" class="LineNr">28 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L29" class="LineNr">29 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L30" class="LineNr">30 </span><span class="Delimiter">}</span>
@ -93,10 +93,10 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr">34 </span> compare a, <span class="Constant">0</span>/false
<span id="L35" class="LineNr">35 </span> <span class="Delimiter">{</span>
<span id="L36" class="LineNr">36 </span> <span class="PreProc">break-if-!=</span>
<span id="L37" class="LineNr">37 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L37" class="LineNr">37 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L38" class="LineNr">38 </span> <span class="PreProc">return</span>
<span id="L39" class="LineNr">39 </span> <span class="Delimiter">}</span>
<span id="L40" class="LineNr">40 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L40" class="LineNr">40 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L41" class="LineNr">41 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L42" class="LineNr">42 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L43" class="LineNr">43 </span><span class="Delimiter">}</span>

View File

@ -72,11 +72,11 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span> <a href='504test-screen.mu.html#L11'>check-screen-row-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y, expected, msg
<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='504test-screen.mu.html#L11'>check-screen-row-from</a></span> screen-on-stack: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), x: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L12" class="LineNr"> 12 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy screen-on-stack
<span id="L11" class="LineNr"> 11 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L11'>check-screen-row-from</a></span> _screen: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), x: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L12" class="LineNr"> 12 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy _screen
<span id="L13" class="LineNr"> 13 </span> <span class="PreProc">var</span> failure-count/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">var</span> idx/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L136'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L15" class="LineNr"> 15 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'idx', grapheme by grapheme</span>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">var</span> index/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L221'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L15" class="LineNr"> 15 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'index', grapheme by grapheme</span>
<span id="L16" class="LineNr"> 16 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L18" class="LineNr"> 18 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected
@ -84,327 +84,342 @@ if ('onhashchange' in window) {
<span id="L20" class="LineNr"> 20 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L21" class="LineNr"> 21 </span> compare done?, <span class="Constant">0</span>
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">break-if-!=</span>
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> _g/eax: grapheme <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L434'>screen-grapheme-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: grapheme <span class="Special">&lt;-</span> copy _g
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> e-addr
<span id="L26" class="LineNr"> 26 </span> <span class="muComment"># compare graphemes</span>
<span id="L27" class="LineNr"> 27 </span> $check-screen-row-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L28" class="LineNr"> 28 </span> <span class="muComment"># if expected-grapheme is space, null grapheme is also ok</span>
<span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">{</span>
<span id="L30" class="LineNr"> 30 </span> compare expected-grapheme, <span class="Constant">0x20</span>
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">break-if-!=</span>
<span id="L32" class="LineNr"> 32 </span> compare g, <span class="Constant">0</span>
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">break-if-=</span> $check-screen-row-from:compare-graphemes
<span id="L34" class="LineNr"> 34 </span> <span class="Delimiter">}</span>
<span id="L35" class="LineNr"> 35 </span> <span class="muComment"># if (g == expected-grapheme) print &quot;.&quot;</span>
<span id="L36" class="LineNr"> 36 </span> compare g, expected-grapheme
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">break-if-=</span>
<span id="L38" class="LineNr"> 38 </span> <span class="muComment"># otherwise print an error</span>
<span id="L39" class="LineNr"> 39 </span> failure-count <span class="Special">&lt;-</span> increment
<span id="L40" class="LineNr"> 40 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L41" class="LineNr"> 41 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L42" class="LineNr"> 42 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, expected-grapheme, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L43" class="LineNr"> 43 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L44" class="LineNr"> 44 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L45" class="LineNr"> 45 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L46" class="LineNr"> 46 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L47" class="LineNr"> 47 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L48" class="LineNr"> 48 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L49" class="LineNr"> 49 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, g, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L50" class="LineNr"> 50 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L51" class="LineNr"> 51 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L52" class="LineNr"> 52 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L53" class="LineNr"> 53 </span> <span class="Delimiter">}</span>
<span id="L54" class="LineNr"> 54 </span> idx <span class="Special">&lt;-</span> increment
<span id="L55" class="LineNr"> 55 </span> increment x
<span id="L56" class="LineNr"> 56 </span> <span class="PreProc">loop</span>
<span id="L57" class="LineNr"> 57 </span> <span class="Delimiter">}</span>
<span id="L58" class="LineNr"> 58 </span> <span class="muComment"># if any assertions failed, count the test as failed</span>
<span id="L59" class="LineNr"> 59 </span> compare failure-count, <span class="Constant">0</span>
<span id="L60" class="LineNr"> 60 </span> <span class="Delimiter">{</span>
<span id="L61" class="LineNr"> 61 </span> <span class="PreProc">break-if-=</span>
<span id="L62" class="LineNr"> 62 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">return</span>
<span id="L64" class="LineNr"> 64 </span> <span class="Delimiter">}</span>
<span id="L65" class="LineNr"> 65 </span> <span class="muComment"># otherwise print a &quot;.&quot;</span>
<span id="L66" class="LineNr"> 66 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L67" class="LineNr"> 67 </span><span class="Delimiter">}</span>
<span id="L68" class="LineNr"> 68 </span>
<span id="L69" class="LineNr"> 69 </span><span class="muComment"># various variants by screen-cell attribute; spaces in the 'expected' data should not match the attribute</span>
<span id="L70" class="LineNr"> 70 </span>
<span id="L71" class="LineNr"> 71 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), fg: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L72" class="LineNr"> 72 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, fg, y, <span class="Constant">0</span>/x, expected, msg
<span id="L73" class="LineNr"> 73 </span><span class="Delimiter">}</span>
<span id="L23" class="LineNr"> 23 </span> <span class="Delimiter">{</span>
<span id="L24" class="LineNr"> 24 </span> <span class="PreProc">var</span> unused?/eax: boolean <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L490'>screen-cell-unused-at-index?</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L25" class="LineNr"> 25 </span> compare unused?, <span class="Constant">0</span>/false
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">break-if-!=</span>
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> _c/eax: code-point <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L508'>screen-code-point-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: code-point <span class="Special">&lt;-</span> copy _c
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">var</span> expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> e-addr
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> expected-code-point/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> expected-grapheme
<span id="L31" class="LineNr"> 31 </span> <span class="muComment"># compare graphemes</span>
<span id="L32" class="LineNr"> 32 </span> $check-screen-row-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L33" class="LineNr"> 33 </span> <span class="muComment"># if expected-code-point is space, null grapheme is also ok</span>
<span id="L34" class="LineNr"> 34 </span> <span class="Delimiter">{</span>
<span id="L35" class="LineNr"> 35 </span> compare expected-code-point, <span class="Constant">0x20</span>
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">break-if-!=</span>
<span id="L37" class="LineNr"> 37 </span> compare c, <span class="Constant">0</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">break-if-=</span> $check-screen-row-from:compare-graphemes
<span id="L39" class="LineNr"> 39 </span> <span class="Delimiter">}</span>
<span id="L40" class="LineNr"> 40 </span> <span class="muComment"># if (c == expected-code-point) print &quot;.&quot;</span>
<span id="L41" class="LineNr"> 41 </span> compare c, expected-code-point
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">break-if-=</span>
<span id="L43" class="LineNr"> 43 </span> <span class="muComment"># otherwise print an error</span>
<span id="L44" class="LineNr"> 44 </span> failure-count <span class="Special">&lt;-</span> increment
<span id="L45" class="LineNr"> 45 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L46" class="LineNr"> 46 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L47" class="LineNr"> 47 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, expected-code-point, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L48" class="LineNr"> 48 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L49" class="LineNr"> 49 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L50" class="LineNr"> 50 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L51" class="LineNr"> 51 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L52" class="LineNr"> 52 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L53" class="LineNr"> 53 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, c, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L54" class="LineNr"> 54 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L55" class="LineNr"> 55 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L56" class="LineNr"> 56 </span> <span class="Delimiter">}</span>
<span id="L57" class="LineNr"> 57 </span> <span class="Delimiter">}</span>
<span id="L58" class="LineNr"> 58 </span> index <span class="Special">&lt;-</span> increment
<span id="L59" class="LineNr"> 59 </span> increment x
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">loop</span>
<span id="L61" class="LineNr"> 61 </span> <span class="Delimiter">}</span>
<span id="L62" class="LineNr"> 62 </span> <span class="muComment"># if any assertions failed, count the test as failed</span>
<span id="L63" class="LineNr"> 63 </span> compare failure-count, <span class="Constant">0</span>
<span id="L64" class="LineNr"> 64 </span> <span class="Delimiter">{</span>
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">break-if-=</span>
<span id="L66" class="LineNr"> 66 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">return</span>
<span id="L68" class="LineNr"> 68 </span> <span class="Delimiter">}</span>
<span id="L69" class="LineNr"> 69 </span> <span class="muComment"># otherwise print a &quot;.&quot;</span>
<span id="L70" class="LineNr"> 70 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L71" class="LineNr"> 71 </span><span class="Delimiter">}</span>
<span id="L72" class="LineNr"> 72 </span>
<span id="L73" class="LineNr"> 73 </span><span class="muComment"># various variants by screen-cell attribute; spaces in the 'expected' data should not match the attribute</span>
<span id="L74" class="LineNr"> 74 </span>
<span id="L75" class="LineNr"> 75 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L75'>check-screen-row-in-color-from</a></span> screen-on-stack: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), fg: int, y: int, x: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy screen-on-stack
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> idx/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L136'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L78" class="LineNr"> 78 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'idx', grapheme by grapheme</span>
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L81" class="LineNr"> 81 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected
<span id="L82" class="LineNr"> 82 </span> <span class="Delimiter">{</span>
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L84" class="LineNr"> 84 </span> compare done?, <span class="Constant">0</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">break-if-!=</span>
<span id="L86" class="LineNr"> 86 </span> <span class="PreProc">var</span> _g/eax: grapheme <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L434'>screen-grapheme-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: grapheme <span class="Special">&lt;-</span> copy _g
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> _expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> e-addr
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> expected-grapheme/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy _expected-grapheme
<span id="L90" class="LineNr"> 90 </span> $check-screen-row-in-color-from:compare-cells: <span class="Delimiter">{</span>
<span id="L91" class="LineNr"> 91 </span> <span class="muComment"># if expected-grapheme is space, null grapheme is also ok</span>
<span id="L92" class="LineNr"> 92 </span> <span class="Delimiter">{</span>
<span id="L93" class="LineNr"> 93 </span> compare expected-grapheme, <span class="Constant">0x20</span>
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">break-if-!=</span>
<span id="L95" class="LineNr"> 95 </span> compare g, <span class="Constant">0</span>
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">break-if-=</span> $check-screen-row-in-color-from:compare-cells
<span id="L97" class="LineNr"> 97 </span> <span class="Delimiter">}</span>
<span id="L98" class="LineNr"> 98 </span> <span class="muComment"># if expected-grapheme is space, a different color is ok</span>
<span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">{</span>
<span id="L100" class="LineNr">100 </span> compare expected-grapheme, <span class="Constant">0x20</span>
<span id="L101" class="LineNr">101 </span> <span class="PreProc">break-if-!=</span>
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L452'>screen-color-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L103" class="LineNr">103 </span> compare color, fg
<span id="L104" class="LineNr">104 </span> <span class="PreProc">break-if-!=</span> $check-screen-row-in-color-from:compare-cells
<span id="L105" class="LineNr">105 </span> <span class="Delimiter">}</span>
<span id="L106" class="LineNr">106 </span> <span class="muComment"># compare graphemes</span>
<span id="L107" class="LineNr">107 </span> $check-screen-row-in-color-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L108" class="LineNr">108 </span> <span class="muComment"># if (g == expected-grapheme) print &quot;.&quot;</span>
<span id="L109" class="LineNr">109 </span> compare g, expected-grapheme
<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> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L113" class="LineNr">113 </span> <span class="PreProc">break</span> $check-screen-row-in-color-from:compare-graphemes
<span id="L75" class="LineNr"> 75 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), fg: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L76" class="LineNr"> 76 </span> <a href='504test-screen.mu.html#L79'>check-screen-row-in-color-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, fg, y, <span class="Constant">0</span>/x, expected, msg
<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="muFunction"><a href='504test-screen.mu.html#L79'>check-screen-row-in-color-from</a></span> _screen: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), fg: int, y: int, x: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy _screen
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> index/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L221'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L82" class="LineNr"> 82 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'index', grapheme by grapheme</span>
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L85" class="LineNr"> 85 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected
<span id="L86" class="LineNr"> 86 </span> <span class="Delimiter">{</span>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L88" class="LineNr"> 88 </span> compare done?, <span class="Constant">0</span>
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">break-if-!=</span>
<span id="L90" class="LineNr"> 90 </span> <span class="Delimiter">{</span>
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> unused?/eax: boolean <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L490'>screen-cell-unused-at-index?</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L92" class="LineNr"> 92 </span> compare unused?, <span class="Constant">0</span>/false
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">break-if-!=</span>
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> _c/eax: code-point <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L508'>screen-code-point-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: code-point <span class="Special">&lt;-</span> copy _c
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> e-addr
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> _expected-code-point/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> expected-grapheme
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">var</span> expected-code-point/<span class="muRegEdi">edi</span>: code-point <span class="Special">&lt;-</span> copy _expected-code-point
<span id="L99" class="LineNr"> 99 </span> $check-screen-row-in-color-from:compare-cells: <span class="Delimiter">{</span>
<span id="L100" class="LineNr">100 </span> <span class="muComment"># if expected-code-point is space, null grapheme is also ok</span>
<span id="L101" class="LineNr">101 </span> <span class="Delimiter">{</span>
<span id="L102" class="LineNr">102 </span> compare expected-code-point, <span class="Constant">0x20</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">break-if-!=</span>
<span id="L104" class="LineNr">104 </span> compare c, <span class="Constant">0</span>
<span id="L105" class="LineNr">105 </span> <span class="PreProc">break-if-=</span> $check-screen-row-in-color-from:compare-cells
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">}</span>
<span id="L107" class="LineNr">107 </span> <span class="muComment"># if expected-code-point is space, a different color is ok</span>
<span id="L108" class="LineNr">108 </span> <span class="Delimiter">{</span>
<span id="L109" class="LineNr">109 </span> compare expected-code-point, <span class="Constant">0x20</span>
<span id="L110" class="LineNr">110 </span> <span class="PreProc">break-if-!=</span>
<span id="L111" class="LineNr">111 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L526'>screen-color-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L112" class="LineNr">112 </span> compare color, fg
<span id="L113" class="LineNr">113 </span> <span class="PreProc">break-if-!=</span> $check-screen-row-in-color-from:compare-cells
<span id="L114" class="LineNr">114 </span> <span class="Delimiter">}</span>
<span id="L115" class="LineNr">115 </span> <span class="muComment"># otherwise print an error</span>
<span id="L116" class="LineNr">116 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L117" class="LineNr">117 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L118" class="LineNr">118 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L119" class="LineNr">119 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, expected-grapheme, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L120" class="LineNr">120 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L121" class="LineNr">121 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L122" class="LineNr">122 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L123" class="LineNr">123 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L124" class="LineNr">124 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L125" class="LineNr">125 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L126" class="LineNr">126 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, g, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L127" class="LineNr">127 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L128" class="LineNr">128 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L129" class="LineNr">129 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L130" class="LineNr">130 </span> <span class="Delimiter">}</span>
<span id="L131" class="LineNr">131 </span> $check-screen-row-in-color-from:compare-colors: <span class="Delimiter">{</span>
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L452'>screen-color-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L133" class="LineNr">133 </span> compare fg, color
<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='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L137" class="LineNr">137 </span> <span class="PreProc">break</span> $check-screen-row-in-color-from:compare-colors
<span id="L138" class="LineNr">138 </span> <span class="Delimiter">}</span>
<span id="L139" class="LineNr">139 </span> <span class="muComment"># otherwise print an error</span>
<span id="L140" class="LineNr">140 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L141" class="LineNr">141 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L142" class="LineNr">142 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L143" class="LineNr">143 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, expected-grapheme, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L144" class="LineNr">144 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L145" class="LineNr">145 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L146" class="LineNr">146 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L147" class="LineNr">147 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L148" class="LineNr">148 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L149" class="LineNr">149 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L150" class="LineNr">150 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, fg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L151" class="LineNr">151 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L152" class="LineNr">152 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L153" class="LineNr">153 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<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> idx <span class="Special">&lt;-</span> increment
<span id="L157" class="LineNr">157 </span> increment x
<span id="L158" class="LineNr">158 </span> <span class="PreProc">loop</span>
<span id="L159" class="LineNr">159 </span> <span class="Delimiter">}</span>
<span id="L160" class="LineNr">160 </span><span class="Delimiter">}</span>
<span id="L161" class="LineNr">161 </span>
<span id="L162" class="LineNr">162 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L162'>check-screen-row-in-background-color</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L163" class="LineNr">163 </span> <a href='504test-screen.mu.html#L166'>check-screen-row-in-background-color-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, bg, y, <span class="Constant">0</span>/x, expected, msg
<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='504test-screen.mu.html#L166'>check-screen-row-in-background-color-from</a></span> screen-on-stack: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, x: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L167" class="LineNr">167 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy screen-on-stack
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> idx/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L136'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L169" class="LineNr">169 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'idx', grapheme by grapheme</span>
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L171" class="LineNr">171 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L172" class="LineNr">172 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected
<span id="L173" class="LineNr">173 </span> <span class="Delimiter">{</span>
<span id="L174" class="LineNr">174 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L175" class="LineNr">175 </span> compare done?, <span class="Constant">0</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">break-if-!=</span>
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> _g/eax: grapheme <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L434'>screen-grapheme-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L178" class="LineNr">178 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: grapheme <span class="Special">&lt;-</span> copy _g
<span id="L179" class="LineNr">179 </span> <span class="PreProc">var</span> _expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> e-addr
<span id="L180" class="LineNr">180 </span> <span class="PreProc">var</span> expected-grapheme/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy _expected-grapheme
<span id="L181" class="LineNr">181 </span> $check-screen-row-in-background-color-from:compare-cells: <span class="Delimiter">{</span>
<span id="L182" class="LineNr">182 </span> <span class="muComment"># if expected-grapheme is space, null grapheme is also ok</span>
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">{</span>
<span id="L184" class="LineNr">184 </span> compare expected-grapheme, <span class="Constant">0x20</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">break-if-!=</span>
<span id="L186" class="LineNr">186 </span> compare g, <span class="Constant">0</span>
<span id="L187" class="LineNr">187 </span> <span class="PreProc">break-if-=</span> $check-screen-row-in-background-color-from:compare-cells
<span id="L188" class="LineNr">188 </span> <span class="Delimiter">}</span>
<span id="L189" class="LineNr">189 </span> <span class="muComment"># if expected-grapheme is space, a different background-color is ok</span>
<span id="L190" class="LineNr">190 </span> <span class="Delimiter">{</span>
<span id="L191" class="LineNr">191 </span> compare expected-grapheme, <span class="Constant">0x20</span>
<span id="L192" class="LineNr">192 </span> <span class="PreProc">break-if-!=</span>
<span id="L193" class="LineNr">193 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L471'>screen-background-color-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L194" class="LineNr">194 </span> compare background-color, bg
<span id="L195" class="LineNr">195 </span> <span class="PreProc">break-if-!=</span> $check-screen-row-in-background-color-from:compare-cells
<span id="L196" class="LineNr">196 </span> <span class="Delimiter">}</span>
<span id="L197" class="LineNr">197 </span> <span class="muComment"># compare graphemes</span>
<span id="L198" class="LineNr">198 </span> $check-screen-row-in-background-color-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L199" class="LineNr">199 </span> <span class="muComment"># if (g == expected-grapheme) print &quot;.&quot;</span>
<span id="L200" class="LineNr">200 </span> compare g, expected-grapheme
<span id="L201" class="LineNr">201 </span> <span class="Delimiter">{</span>
<span id="L202" class="LineNr">202 </span> <span class="PreProc">break-if-!=</span>
<span id="L203" class="LineNr">203 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L204" class="LineNr">204 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-graphemes
<span id="L205" class="LineNr">205 </span> <span class="Delimiter">}</span>
<span id="L206" class="LineNr">206 </span> <span class="muComment"># otherwise print an error</span>
<span id="L207" class="LineNr">207 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L208" class="LineNr">208 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L209" class="LineNr">209 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L210" class="LineNr">210 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, expected-grapheme, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L211" class="LineNr">211 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L212" class="LineNr">212 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L213" class="LineNr">213 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L214" class="LineNr">214 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L215" class="LineNr">215 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L216" class="LineNr">216 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L217" class="LineNr">217 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, g, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L218" class="LineNr">218 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L219" class="LineNr">219 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L220" class="LineNr">220 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L221" class="LineNr">221 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-graphemes
<span id="L222" class="LineNr">222 </span> <span class="Delimiter">}</span>
<span id="L223" class="LineNr">223 </span> $check-screen-row-in-background-color-from:compare-background-colors: <span class="Delimiter">{</span>
<span id="L224" class="LineNr">224 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L471'>screen-background-color-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L225" class="LineNr">225 </span> compare bg, background-color
<span id="L226" class="LineNr">226 </span> <span class="Delimiter">{</span>
<span id="L227" class="LineNr">227 </span> <span class="PreProc">break-if-!=</span>
<span id="L228" class="LineNr">228 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L229" class="LineNr">229 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-background-colors
<span id="L230" class="LineNr">230 </span> <span class="Delimiter">}</span>
<span id="L231" class="LineNr">231 </span> <span class="muComment"># otherwise print an error</span>
<span id="L232" class="LineNr">232 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L233" class="LineNr">233 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L234" class="LineNr">234 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L235" class="LineNr">235 </span> <a href='501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <span class="Constant">0</span>/screen, expected-grapheme, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L236" class="LineNr">236 </span> <a href='501draw-text.mu.html#L239'>move-cursor-rightward-and-downward</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>/xmin, <span class="Constant">0x80</span>/xmax=screen-width
<span id="L237" class="LineNr">237 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L238" class="LineNr">238 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L239" class="LineNr">239 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L240" class="LineNr">240 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L241" class="LineNr">241 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L242" class="LineNr">242 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L243" class="LineNr">243 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L244" class="LineNr">244 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, background-color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L245" class="LineNr">245 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L246" class="LineNr">246 </span> <span class="Delimiter">}</span>
<span id="L247" class="LineNr">247 </span> <span class="Delimiter">}</span>
<span id="L248" class="LineNr">248 </span> idx <span class="Special">&lt;-</span> increment
<span id="L249" class="LineNr">249 </span> increment x
<span id="L250" class="LineNr">250 </span> <span class="PreProc">loop</span>
<span id="L251" class="LineNr">251 </span> <span class="Delimiter">}</span>
<span id="L252" class="LineNr">252 </span><span class="Delimiter">}</span>
<span id="L253" class="LineNr">253 </span>
<span id="L254" class="LineNr">254 </span><span class="muComment"># helpers for checking just background color, not screen contents</span>
<span id="L255" class="LineNr">255 </span><span class="muComment"># these can validate bg for spaces</span>
<span id="L256" class="LineNr">256 </span>
<span id="L257" class="LineNr">257 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, expected-bitmap: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L258" class="LineNr">258 </span> <a href='504test-screen.mu.html#L261'>check-background-color-in-screen-row-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, bg, y, <span class="Constant">0</span>/x, expected-bitmap, msg
<span id="L259" class="LineNr">259 </span><span class="Delimiter">}</span>
<span id="L260" class="LineNr">260 </span>
<span id="L261" class="LineNr">261 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L261'>check-background-color-in-screen-row-from</a></span> screen-on-stack: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, x: int, expected-bitmap: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L262" class="LineNr">262 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy screen-on-stack
<span id="L263" class="LineNr">263 </span> <span class="PreProc">var</span> failure-count: int
<span id="L264" class="LineNr">264 </span> <span class="PreProc">var</span> idx/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L136'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L265" class="LineNr">265 </span> <span class="muComment"># compare background color where 'expected-bitmap' is a non-space</span>
<span id="L266" class="LineNr">266 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L267" class="LineNr">267 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L268" class="LineNr">268 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected-bitmap
<span id="L269" class="LineNr">269 </span> <span class="Delimiter">{</span>
<span id="L270" class="LineNr">270 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L271" class="LineNr">271 </span> compare done?, <span class="Constant">0</span>
<span id="L272" class="LineNr">272 </span> <span class="PreProc">break-if-!=</span>
<span id="L273" class="LineNr">273 </span> <span class="PreProc">var</span> _expected-bit/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> e-addr
<span id="L274" class="LineNr">274 </span> <span class="PreProc">var</span> expected-bit/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy _expected-bit
<span id="L275" class="LineNr">275 </span> $check-background-color-in-screen-row-from:compare-cells: <span class="Delimiter">{</span>
<span id="L276" class="LineNr">276 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L471'>screen-background-color-at-idx</a> <a href='500fake-screen.mu.html#L14'>screen</a>, idx
<span id="L277" class="LineNr">277 </span> <span class="muComment"># if expected-bit is space, assert that background is NOT bg</span>
<span id="L278" class="LineNr">278 </span> compare expected-bit, <span class="Constant">0x20</span>
<span id="L279" class="LineNr">279 </span> <span class="Delimiter">{</span>
<span id="L280" class="LineNr">280 </span> <span class="PreProc">break-if-!=</span>
<span id="L281" class="LineNr">281 </span> compare background-color, bg
<span id="L282" class="LineNr">282 </span> <span class="PreProc">break-if-!=</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L283" class="LineNr">283 </span> increment failure-count
<span id="L284" class="LineNr">284 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L285" class="LineNr">285 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L286" class="LineNr">286 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L287" class="LineNr">287 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L288" class="LineNr">288 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L289" class="LineNr">289 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) to not be in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L290" class="LineNr">290 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L291" class="LineNr">291 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L292" class="LineNr">292 </span> <span class="PreProc">break</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L293" class="LineNr">293 </span> <span class="Delimiter">}</span>
<span id="L294" class="LineNr">294 </span> <span class="muComment"># otherwise assert that background IS bg</span>
<span id="L295" class="LineNr">295 </span> compare background-color, bg
<span id="L296" class="LineNr">296 </span> <span class="PreProc">break-if-=</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L297" class="LineNr">297 </span> increment failure-count
<span id="L298" class="LineNr">298 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L299" class="LineNr">299 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L300" class="LineNr">300 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L301" class="LineNr">301 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L302" class="LineNr">302 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L303" class="LineNr">303 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L304" class="LineNr">304 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L305" class="LineNr">305 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L306" class="LineNr">306 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, background-color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L307" class="LineNr">307 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L308" class="LineNr">308 </span> <span class="Delimiter">}</span>
<span id="L309" class="LineNr">309 </span> idx <span class="Special">&lt;-</span> increment
<span id="L310" class="LineNr">310 </span> increment x
<span id="L311" class="LineNr">311 </span> <span class="PreProc">loop</span>
<span id="L312" class="LineNr">312 </span> <span class="Delimiter">}</span>
<span id="L313" class="LineNr">313 </span> <span class="muComment"># if any assertions failed, count the test as failed</span>
<span id="L314" class="LineNr">314 </span> compare failure-count, <span class="Constant">0</span>
<span id="L315" class="LineNr">315 </span> <span class="Delimiter">{</span>
<span id="L316" class="LineNr">316 </span> <span class="PreProc">break-if-=</span>
<span id="L317" class="LineNr">317 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L318" class="LineNr">318 </span> <span class="PreProc">return</span>
<span id="L319" class="LineNr">319 </span> <span class="Delimiter">}</span>
<span id="L320" class="LineNr">320 </span> <span class="muComment"># otherwise print a &quot;.&quot;</span>
<span id="L321" class="LineNr">321 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L322" class="LineNr">322 </span><span class="Delimiter">}</span>
<span id="L323" class="LineNr">323 </span>
<span id="L324" class="LineNr">324 </span><span class="PreProc">fn</span> <span class="muTest"><a href='504test-screen.mu.html#L324'>test-draw-single-grapheme</a></span> <span class="Delimiter">{</span>
<span id="L325" class="LineNr">325 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L326" class="LineNr">326 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L327" class="LineNr">327 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L328" class="LineNr">328 </span> <a href='500fake-screen.mu.html#L130'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x61</span>/a, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/fg, <span class="Constant">2</span>/bg
<span id="L329" class="LineNr">329 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme&quot;</span> <span class="muComment"># top-left corner of the screen</span>
<span id="L330" class="LineNr">330 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/fg, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-fg&quot;</span>
<span id="L331" class="LineNr">331 </span> <a href='504test-screen.mu.html#L162'>check-screen-row-in-background-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-bg&quot;</span>
<span id="L332" class="LineNr">332 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;x &quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-bg2&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="PreProc">fn</span> <span class="muTest"><a href='504test-screen.mu.html#L335'>test-draw-multiple-graphemes</a></span> <span class="Delimiter">{</span>
<span id="L336" class="LineNr">336 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L337" class="LineNr">337 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L338" class="LineNr">338 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/rows, <span class="Constant">4</span>/cols, <span class="Constant">0</span>/no-pixel-graphics
<span id="L339" class="LineNr">339 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">1</span>/fg, <span class="Constant">2</span>/bg
<span id="L340" class="LineNr">340 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes&quot;</span>
<span id="L341" class="LineNr">341 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/fg, <span class="Constant">0</span>/y, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes-fg&quot;</span>
<span id="L342" class="LineNr">342 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;xxxxxxxxx &quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes-bg2&quot;</span>
<span id="L343" class="LineNr">343 </span><span class="Delimiter">}</span>
<span id="L115" class="LineNr">115 </span> <span class="muComment"># compare graphemes</span>
<span id="L116" class="LineNr">116 </span> $check-screen-row-in-color-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L117" class="LineNr">117 </span> <span class="muComment"># if (c == expected-code-point) print &quot;.&quot;</span>
<span id="L118" class="LineNr">118 </span> compare c, expected-code-point
<span id="L119" class="LineNr">119 </span> <span class="Delimiter">{</span>
<span id="L120" class="LineNr">120 </span> <span class="PreProc">break-if-!=</span>
<span id="L121" class="LineNr">121 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L122" class="LineNr">122 </span> <span class="PreProc">break</span> $check-screen-row-in-color-from:compare-graphemes
<span id="L123" class="LineNr">123 </span> <span class="Delimiter">}</span>
<span id="L124" class="LineNr">124 </span> <span class="muComment"># otherwise print an error</span>
<span id="L125" class="LineNr">125 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L126" class="LineNr">126 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L127" class="LineNr">127 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L128" class="LineNr">128 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, expected-code-point, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L129" class="LineNr">129 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L130" class="LineNr">130 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L131" class="LineNr">131 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L132" class="LineNr">132 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L133" class="LineNr">133 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L134" class="LineNr">134 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, c, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L135" class="LineNr">135 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L136" class="LineNr">136 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L137" class="LineNr">137 </span> <span class="Delimiter">}</span>
<span id="L138" class="LineNr">138 </span> $check-screen-row-in-color-from:compare-colors: <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L526'>screen-color-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L140" class="LineNr">140 </span> compare fg, color
<span id="L141" class="LineNr">141 </span> <span class="Delimiter">{</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">break-if-!=</span>
<span id="L143" class="LineNr">143 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L144" class="LineNr">144 </span> <span class="PreProc">break</span> $check-screen-row-in-color-from:compare-colors
<span id="L145" class="LineNr">145 </span> <span class="Delimiter">}</span>
<span id="L146" class="LineNr">146 </span> <span class="muComment"># otherwise print an error</span>
<span id="L147" class="LineNr">147 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L148" class="LineNr">148 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L149" class="LineNr">149 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L150" class="LineNr">150 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, expected-code-point, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L151" class="LineNr">151 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L152" class="LineNr">152 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L153" class="LineNr">153 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L154" class="LineNr">154 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L155" class="LineNr">155 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L156" class="LineNr">156 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, fg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L157" class="LineNr">157 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L158" class="LineNr">158 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L159" class="LineNr">159 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L160" class="LineNr">160 </span> <span class="Delimiter">}</span>
<span id="L161" class="LineNr">161 </span> <span class="Delimiter">}</span>
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span> index <span class="Special">&lt;-</span> increment
<span id="L164" class="LineNr">164 </span> increment x
<span id="L165" class="LineNr">165 </span> <span class="PreProc">loop</span>
<span id="L166" class="LineNr">166 </span> <span class="Delimiter">}</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='504test-screen.mu.html#L169'>check-screen-row-in-background-color</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L170" class="LineNr">170 </span> <a href='504test-screen.mu.html#L173'>check-screen-row-in-background-color-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, bg, y, <span class="Constant">0</span>/x, expected, msg
<span id="L171" class="LineNr">171 </span><span class="Delimiter">}</span>
<span id="L172" class="LineNr">172 </span>
<span id="L173" class="LineNr">173 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L173'>check-screen-row-in-background-color-from</a></span> _screen: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, x: int, expected: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L174" class="LineNr">174 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy _screen
<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> index/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L221'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L176" class="LineNr">176 </span> <span class="muComment"># compare 'expected' with the screen contents starting at 'index', grapheme by grapheme</span>
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L178" class="LineNr">178 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L179" class="LineNr">179 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected
<span id="L180" class="LineNr">180 </span> <span class="Delimiter">{</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L182" class="LineNr">182 </span> compare done?, <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> <span class="Delimiter">{</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">var</span> unused?/eax: boolean <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L490'>screen-cell-unused-at-index?</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L186" class="LineNr">186 </span> compare unused?, <span class="Constant">0</span>/false
<span id="L187" class="LineNr">187 </span> <span class="PreProc">break-if-!=</span>
<span id="L188" class="LineNr">188 </span> <span class="PreProc">var</span> _g/eax: code-point <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L508'>screen-code-point-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L189" class="LineNr">189 </span> <span class="PreProc">var</span> g/<span class="muRegEbx">ebx</span>: code-point <span class="Special">&lt;-</span> copy _g
<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> expected-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> e-addr
<span id="L191" class="LineNr">191 </span> <span class="PreProc">var</span> _expected-code-point/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> expected-grapheme
<span id="L192" class="LineNr">192 </span> <span class="PreProc">var</span> expected-code-point/<span class="muRegEdi">edi</span>: code-point <span class="Special">&lt;-</span> copy _expected-code-point
<span id="L193" class="LineNr">193 </span> $check-screen-row-in-background-color-from:compare-cells: <span class="Delimiter">{</span>
<span id="L194" class="LineNr">194 </span> <span class="muComment"># if expected-code-point is space, null grapheme is also ok</span>
<span id="L195" class="LineNr">195 </span> <span class="Delimiter">{</span>
<span id="L196" class="LineNr">196 </span> compare expected-code-point, <span class="Constant">0x20</span>
<span id="L197" class="LineNr">197 </span> <span class="PreProc">break-if-!=</span>
<span id="L198" class="LineNr">198 </span> compare g, <span class="Constant">0</span>
<span id="L199" class="LineNr">199 </span> <span class="PreProc">break-if-=</span> $check-screen-row-in-background-color-from:compare-cells
<span id="L200" class="LineNr">200 </span> <span class="Delimiter">}</span>
<span id="L201" class="LineNr">201 </span> <span class="muComment"># if expected-code-point is space, a different background-color is ok</span>
<span id="L202" class="LineNr">202 </span> <span class="Delimiter">{</span>
<span id="L203" class="LineNr">203 </span> compare expected-code-point, <span class="Constant">0x20</span>
<span id="L204" class="LineNr">204 </span> <span class="PreProc">break-if-!=</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L545'>screen-background-color-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L206" class="LineNr">206 </span> compare background-color, bg
<span id="L207" class="LineNr">207 </span> <span class="PreProc">break-if-!=</span> $check-screen-row-in-background-color-from:compare-cells
<span id="L208" class="LineNr">208 </span> <span class="Delimiter">}</span>
<span id="L209" class="LineNr">209 </span> <span class="muComment"># compare graphemes</span>
<span id="L210" class="LineNr">210 </span> $check-screen-row-in-background-color-from:compare-graphemes: <span class="Delimiter">{</span>
<span id="L211" class="LineNr">211 </span> <span class="muComment"># if (g == expected-code-point) print &quot;.&quot;</span>
<span id="L212" class="LineNr">212 </span> compare g, expected-code-point
<span id="L213" class="LineNr">213 </span> <span class="Delimiter">{</span>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">break-if-!=</span>
<span id="L215" class="LineNr">215 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L216" class="LineNr">216 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-graphemes
<span id="L217" class="LineNr">217 </span> <span class="Delimiter">}</span>
<span id="L218" class="LineNr">218 </span> <span class="muComment"># otherwise print an error</span>
<span id="L219" class="LineNr">219 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L220" class="LineNr">220 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L221" class="LineNr">221 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L222" class="LineNr">222 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, expected-code-point, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L223" class="LineNr">223 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L224" class="LineNr">224 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L225" class="LineNr">225 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L226" class="LineNr">226 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L227" class="LineNr">227 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) but observed '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L228" class="LineNr">228 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, g, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L229" class="LineNr">229 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;'&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L230" class="LineNr">230 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L231" class="LineNr">231 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-graphemes
<span id="L232" class="LineNr">232 </span> <span class="Delimiter">}</span>
<span id="L233" class="LineNr">233 </span> $check-screen-row-in-background-color-from:compare-background-colors: <span class="Delimiter">{</span>
<span id="L234" class="LineNr">234 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L545'>screen-background-color-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L235" class="LineNr">235 </span> compare bg, background-color
<span id="L236" class="LineNr">236 </span> <span class="Delimiter">{</span>
<span id="L237" class="LineNr">237 </span> <span class="PreProc">break-if-!=</span>
<span id="L238" class="LineNr">238 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L239" class="LineNr">239 </span> <span class="PreProc">break</span> $check-screen-row-in-background-color-from:compare-background-colors
<span id="L240" class="LineNr">240 </span> <span class="Delimiter">}</span>
<span id="L241" class="LineNr">241 </span> <span class="muComment"># otherwise print an error</span>
<span id="L242" class="LineNr">242 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L243" class="LineNr">243 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L244" class="LineNr">244 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected '&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L245" class="LineNr">245 </span> <a href='501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, expected-code-point, <span class="Constant">3</span>/cyan, <span class="Constant">0</span>/bg
<span id="L246" class="LineNr">246 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;' at (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L247" class="LineNr">247 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L248" class="LineNr">248 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L249" class="LineNr">249 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L250" class="LineNr">250 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L251" class="LineNr">251 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L252" class="LineNr">252 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L253" class="LineNr">253 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, background-color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L254" class="LineNr">254 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L255" class="LineNr">255 </span> <span class="Delimiter">}</span>
<span id="L256" class="LineNr">256 </span> <span class="Delimiter">}</span>
<span id="L257" class="LineNr">257 </span> <span class="Delimiter">}</span>
<span id="L258" class="LineNr">258 </span> index <span class="Special">&lt;-</span> increment
<span id="L259" class="LineNr">259 </span> increment x
<span id="L260" class="LineNr">260 </span> <span class="PreProc">loop</span>
<span id="L261" class="LineNr">261 </span> <span class="Delimiter">}</span>
<span id="L262" class="LineNr">262 </span><span class="Delimiter">}</span>
<span id="L263" class="LineNr">263 </span>
<span id="L264" class="LineNr">264 </span><span class="muComment"># helpers for checking just background color, not screen contents</span>
<span id="L265" class="LineNr">265 </span><span class="muComment"># these can validate bg for spaces</span>
<span id="L266" class="LineNr">266 </span>
<span id="L267" class="LineNr">267 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, expected-bitmap: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L268" class="LineNr">268 </span> <a href='504test-screen.mu.html#L271'>check-background-color-in-screen-row-from</a> <a href='500fake-screen.mu.html#L14'>screen</a>, bg, y, <span class="Constant">0</span>/x, expected-bitmap, msg
<span id="L269" class="LineNr">269 </span><span class="Delimiter">}</span>
<span id="L270" class="LineNr">270 </span>
<span id="L271" class="LineNr">271 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='504test-screen.mu.html#L271'>check-background-color-in-screen-row-from</a></span> _screen: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), bg: int, y: int, x: int, expected-bitmap: (addr array byte), msg: (addr array byte) <span class="Delimiter">{</span>
<span id="L272" class="LineNr">272 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy _screen
<span id="L273" class="LineNr">273 </span> <span class="PreProc">var</span> failure-count: int
<span id="L274" class="LineNr">274 </span> <span class="PreProc">var</span> index/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L221'>screen-cell-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y
<span id="L275" class="LineNr">275 </span> <span class="muComment"># compare background color where 'expected-bitmap' is a non-space</span>
<span id="L276" class="LineNr">276 </span> <span class="PreProc">var</span> e: (stream byte <span class="Constant">0x100</span>)
<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> e-addr/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> address e
<span id="L278" class="LineNr">278 </span> <a href='108write.subx.html#L11'>write</a> e-addr, expected-bitmap
<span id="L279" class="LineNr">279 </span> <span class="Delimiter">{</span>
<span id="L280" class="LineNr">280 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> e-addr
<span id="L281" class="LineNr">281 </span> compare done?, <span class="Constant">0</span>
<span id="L282" class="LineNr">282 </span> <span class="PreProc">break-if-!=</span>
<span id="L283" class="LineNr">283 </span> <span class="Delimiter">{</span>
<span id="L284" class="LineNr">284 </span> <span class="PreProc">var</span> unused?/eax: boolean <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L490'>screen-cell-unused-at-index?</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L285" class="LineNr">285 </span> compare unused?, <span class="Constant">0</span>/false
<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> _expected-bit/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> e-addr
<span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> expected-bit/<span class="muRegEdi">edi</span>: grapheme <span class="Special">&lt;-</span> copy _expected-bit
<span id="L289" class="LineNr">289 </span> $check-background-color-in-screen-row-from:compare-cells: <span class="Delimiter">{</span>
<span id="L290" class="LineNr">290 </span> <span class="PreProc">var</span> background-color/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L545'>screen-background-color-at-index</a> <a href='500fake-screen.mu.html#L14'>screen</a>, index
<span id="L291" class="LineNr">291 </span> <span class="muComment"># if expected-bit is space, assert that background is NOT bg</span>
<span id="L292" class="LineNr">292 </span> compare expected-bit, <span class="Constant">0x20</span>
<span id="L293" class="LineNr">293 </span> <span class="Delimiter">{</span>
<span id="L294" class="LineNr">294 </span> <span class="PreProc">break-if-!=</span>
<span id="L295" class="LineNr">295 </span> compare background-color, bg
<span id="L296" class="LineNr">296 </span> <span class="PreProc">break-if-!=</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L297" class="LineNr">297 </span> increment failure-count
<span id="L298" class="LineNr">298 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L299" class="LineNr">299 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L300" class="LineNr">300 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L301" class="LineNr">301 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L302" class="LineNr">302 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L303" class="LineNr">303 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) to not be in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L304" class="LineNr">304 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L305" class="LineNr">305 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L306" class="LineNr">306 </span> <span class="PreProc">break</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L307" class="LineNr">307 </span> <span class="Delimiter">}</span>
<span id="L308" class="LineNr">308 </span> <span class="muComment"># otherwise assert that background IS bg</span>
<span id="L309" class="LineNr">309 </span> compare background-color, bg
<span id="L310" class="LineNr">310 </span> <span class="PreProc">break-if-=</span> $check-background-color-in-screen-row-from:compare-cells
<span id="L311" class="LineNr">311 </span> increment failure-count
<span id="L312" class="LineNr">312 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, msg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L313" class="LineNr">313 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: expected (&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L314" class="LineNr">314 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, x, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L315" class="LineNr">315 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;, &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L316" class="LineNr">316 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L317" class="LineNr">317 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;) in background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L318" class="LineNr">318 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, bg, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L319" class="LineNr">319 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; but observed background-color &quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L320" class="LineNr">320 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, background-color, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L321" class="LineNr">321 </span> <a href='501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<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> index <span class="Special">&lt;-</span> increment
<span id="L325" class="LineNr">325 </span> increment x
<span id="L326" class="LineNr">326 </span> <span class="PreProc">loop</span>
<span id="L327" class="LineNr">327 </span> <span class="Delimiter">}</span>
<span id="L328" class="LineNr">328 </span> <span class="muComment"># if any assertions failed, count the test as failed</span>
<span id="L329" class="LineNr">329 </span> compare failure-count, <span class="Constant">0</span>
<span id="L330" class="LineNr">330 </span> <span class="Delimiter">{</span>
<span id="L331" class="LineNr">331 </span> <span class="PreProc">break-if-=</span>
<span id="L332" class="LineNr">332 </span> <a href='104test.subx.html#L5'>count-test-failure</a>
<span id="L333" class="LineNr">333 </span> <span class="PreProc">return</span>
<span id="L334" class="LineNr">334 </span> <span class="Delimiter">}</span>
<span id="L335" class="LineNr">335 </span> <span class="muComment"># otherwise print a &quot;.&quot;</span>
<span id="L336" class="LineNr">336 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L337" class="LineNr">337 </span><span class="Delimiter">}</span>
<span id="L338" class="LineNr">338 </span>
<span id="L339" class="LineNr">339 </span><span class="PreProc">fn</span> <span class="muTest"><a href='504test-screen.mu.html#L339'>test-draw-single-grapheme</a></span> <span class="Delimiter">{</span>
<span id="L340" class="LineNr">340 </span> <span class="PreProc">var</span> _screen: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address _screen
<span id="L342" class="LineNr">342 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L343" class="LineNr">343 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L92'>draw-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x61</span>/a, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/fg, <span class="Constant">2</span>/bg
<span id="L344" class="LineNr">344 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme&quot;</span> <span class="muComment"># top-left corner of the screen</span>
<span id="L345" class="LineNr">345 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/fg, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-fg&quot;</span>
<span id="L346" class="LineNr">346 </span> <a href='504test-screen.mu.html#L169'>check-screen-row-in-background-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;a&quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-bg&quot;</span>
<span id="L347" class="LineNr">347 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;x &quot;</span>, <span class="Constant">&quot;F - test-draw-single-grapheme-bg2&quot;</span>
<span id="L348" class="LineNr">348 </span><span class="Delimiter">}</span>
<span id="L349" class="LineNr">349 </span>
<span id="L350" class="LineNr">350 </span><span class="PreProc">fn</span> <span class="muTest"><a href='504test-screen.mu.html#L350'>test-draw-multiple-graphemes</a></span> <span class="Delimiter">{</span>
<span id="L351" class="LineNr">351 </span> <span class="PreProc">var</span> _screen: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L352" class="LineNr">352 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address _screen
<span id="L353" class="LineNr">353 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/rows, <span class="Constant">4</span>/cols, <span class="Constant">0</span>/no-pixel-graphics
<span id="L354" class="LineNr">354 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">1</span>/fg, <span class="Constant">2</span>/bg
<span id="L355" class="LineNr">355 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes&quot;</span>
<span id="L356" class="LineNr">356 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/fg, <span class="Constant">0</span>/y, <span class="Constant">&quot;Hello, 世界&quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes-fg&quot;</span>
<span id="L357" class="LineNr">357 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/bg, <span class="Constant">0</span>/y, <span class="Constant">&quot;xxxxxxxxx &quot;</span>, <span class="Constant">&quot;F - test-draw-multiple-graphemes-bg2&quot;</span>
<span id="L358" class="LineNr">358 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

6
html/507line.mu.html generated
View File

@ -90,7 +90,7 @@ if ('onhashchange' in window) {
<span id="L29" class="LineNr"> 29 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x0
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy y0
<span id="L31" class="LineNr"> 31 </span> $draw-line:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
<span id="L32" class="LineNr"> 32 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L32" class="LineNr"> 32 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L33" class="LineNr"> 33 </span> <span class="muComment"># if (x == x1 &amp;&amp; y == y1) break</span>
<span id="L34" class="LineNr"> 34 </span> <span class="Delimiter">{</span>
<span id="L35" class="LineNr"> 35 </span> compare x, x1
@ -127,7 +127,7 @@ if ('onhashchange' in window) {
<span id="L66" class="LineNr"> 66 </span> <span class="Delimiter">{</span>
<span id="L67" class="LineNr"> 67 </span> compare x, x1
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L69" class="LineNr"> 69 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L69" class="LineNr"> 69 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L70" class="LineNr"> 70 </span> x <span class="Special">&lt;-</span> increment
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">loop</span>
<span id="L72" class="LineNr"> 72 </span> <span class="Delimiter">}</span>
@ -138,7 +138,7 @@ if ('onhashchange' in window) {
<span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">{</span>
<span id="L78" class="LineNr"> 78 </span> compare y, y1
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L80" class="LineNr"> 80 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L80" class="LineNr"> 80 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L81" class="LineNr"> 81 </span> y <span class="Special">&lt;-</span> increment
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">loop</span>
<span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">}</span>

View File

@ -81,25 +81,25 @@ if ('onhashchange' in window) {
<span id="L21" class="LineNr">21 </span> tmpx <span class="Special">&lt;-</span> subtract x
<span id="L22" class="LineNr">22 </span> tmpy <span class="Special">&lt;-</span> copy cy
<span id="L23" class="LineNr">23 </span> tmpy <span class="Special">&lt;-</span> add y
<span id="L24" class="LineNr">24 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L24" class="LineNr">24 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L25" class="LineNr">25 </span> <span class="muComment"># pixel(cx-y, cy-x)</span>
<span id="L26" class="LineNr">26 </span> tmpx <span class="Special">&lt;-</span> copy cx
<span id="L27" class="LineNr">27 </span> tmpx <span class="Special">&lt;-</span> subtract y
<span id="L28" class="LineNr">28 </span> tmpy <span class="Special">&lt;-</span> copy cy
<span id="L29" class="LineNr">29 </span> tmpy <span class="Special">&lt;-</span> subtract x
<span id="L30" class="LineNr">30 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L30" class="LineNr">30 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L31" class="LineNr">31 </span> <span class="muComment"># pixel(cx+x, cy-y)</span>
<span id="L32" class="LineNr">32 </span> tmpx <span class="Special">&lt;-</span> copy cx
<span id="L33" class="LineNr">33 </span> tmpx <span class="Special">&lt;-</span> add x
<span id="L34" class="LineNr">34 </span> tmpy <span class="Special">&lt;-</span> copy cy
<span id="L35" class="LineNr">35 </span> tmpy <span class="Special">&lt;-</span> subtract y
<span id="L36" class="LineNr">36 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L36" class="LineNr">36 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L37" class="LineNr">37 </span> <span class="muComment"># pixel(cx+y, cy+x)</span>
<span id="L38" class="LineNr">38 </span> tmpx <span class="Special">&lt;-</span> copy cx
<span id="L39" class="LineNr">39 </span> tmpx <span class="Special">&lt;-</span> add y
<span id="L40" class="LineNr">40 </span> tmpy <span class="Special">&lt;-</span> copy cy
<span id="L41" class="LineNr">41 </span> tmpy <span class="Special">&lt;-</span> add x
<span id="L42" class="LineNr">42 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L42" class="LineNr">42 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, tmpx, tmpy, color
<span id="L43" class="LineNr">43 </span> <span class="muComment"># r = err</span>
<span id="L44" class="LineNr">44 </span> tmp <span class="Special">&lt;-</span> copy err
<span id="L45" class="LineNr">45 </span> copy-to radius, tmp

View File

@ -296,7 +296,7 @@ if ('onhashchange' in window) {
<span id="L235" class="LineNr">235 </span> err-f <span class="Special">&lt;-</span> add xy-f
<span id="L236" class="LineNr">236 </span> <span class="muComment">#</span>
<span id="L237" class="LineNr">237 </span> $draw-monotonic-bezier:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
<span id="L238" class="LineNr">238 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L238" class="LineNr">238 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L239" class="LineNr">239 </span> <span class="muComment"># if (x == x2 &amp;&amp; y == y2) return</span>
<span id="L240" class="LineNr">240 </span> <span class="Delimiter">{</span>
<span id="L241" class="LineNr">241 </span> compare x, x2

4
html/510disk.mu.html generated
View File

@ -72,7 +72,7 @@ if ('onhashchange' in window) {
<span id="L12" class="LineNr">12 </span> sectors <span class="Special">&lt;-</span> copy <span class="Constant">0x100</span>
<span id="L13" class="LineNr">13 </span> <span class="Delimiter">}</span>
<span id="L14" class="LineNr">14 </span> <span class="muComment">#</span>
<span id="L15" class="LineNr">15 </span> <a href='boot.subx.html#L976'>read-ata-disk</a> disk, curr-lba, sectors, out
<span id="L15" class="LineNr">15 </span> <a href='boot.subx.html#L762'>read-ata-disk</a> disk, curr-lba, sectors, out
<span id="L16" class="LineNr">16 </span> <span class="muComment">#</span>
<span id="L17" class="LineNr">17 </span> remaining <span class="Special">&lt;-</span> subtract sectors
<span id="L18" class="LineNr">18 </span> curr-lba <span class="Special">&lt;-</span> add sectors
@ -94,7 +94,7 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr">34 </span> sectors <span class="Special">&lt;-</span> copy <span class="Constant">0x100</span>
<span id="L35" class="LineNr">35 </span> <span class="Delimiter">}</span>
<span id="L36" class="LineNr">36 </span> <span class="muComment">#</span>
<span id="L37" class="LineNr">37 </span> <a href='boot.subx.html#L1045'>write-ata-disk</a> disk, curr-lba, sectors, in
<span id="L37" class="LineNr">37 </span> <a href='boot.subx.html#L831'>write-ata-disk</a> disk, curr-lba, sectors, in
<span id="L38" class="LineNr">38 </span> <span class="muComment">#</span>
<span id="L39" class="LineNr">39 </span> remaining <span class="Special">&lt;-</span> subtract sectors
<span id="L40" class="LineNr">40 </span> curr-lba <span class="Special">&lt;-</span> add sectors

50
html/511image.mu.html generated
View File

@ -235,10 +235,10 @@ if ('onhashchange' in window) {
<span id="L170" class="LineNr"> 170 </span> compare idx, len
<span id="L171" class="LineNr"> 171 </span> <span class="Delimiter">{</span>
<span id="L172" class="LineNr"> 172 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L173" class="LineNr"> 173 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L174" class="LineNr"> 174 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L175" class="LineNr"> 175 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L176" class="LineNr"> 176 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L173" class="LineNr"> 173 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L174" class="LineNr"> 174 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L175" class="LineNr"> 175 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L176" class="LineNr"> 176 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L177" class="LineNr"> 177 </span> <span class="Delimiter">}</span>
<span id="L178" class="LineNr"> 178 </span> <span class="PreProc">var</span> src-a/eax: (addr byte) <span class="Special">&lt;-</span> index img-data, idx
<span id="L179" class="LineNr"> 179 </span> <span class="PreProc">var</span> src/eax: byte <span class="Special">&lt;-</span> copy-byte *src-a
@ -252,7 +252,7 @@ if ('onhashchange' in window) {
<span id="L187" class="LineNr"> 187 </span> screenx <span class="Special">&lt;-</span> add xmin
<span id="L188" class="LineNr"> 188 </span> <span class="PreProc">var</span> screeny/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> convert y
<span id="L189" class="LineNr"> 189 </span> screeny <span class="Special">&lt;-</span> add ymin
<span id="L190" class="LineNr"> 190 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L190" class="LineNr"> 190 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L191" class="LineNr"> 191 </span> x <span class="Special">&lt;-</span> add one-f
<span id="L192" class="LineNr"> 192 </span> <span class="PreProc">loop</span>
<span id="L193" class="LineNr"> 193 </span> <span class="Delimiter">}</span>
@ -279,7 +279,7 @@ if ('onhashchange' in window) {
<span id="L214" class="LineNr"> 214 </span> tmp <span class="Special">&lt;-</span> <a href='311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> curr-word
<span id="L215" class="LineNr"> 215 </span> compare tmp, <span class="Constant">0xff</span>
<span id="L216" class="LineNr"> 216 </span> <span class="PreProc">break-if-=</span>
<span id="L217" class="LineNr"> 217 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;levels of grey is not 255; continuing and hoping for the best&quot;</span>, <span class="Constant">0x2b</span>/fg <span class="Constant">0</span>/bg
<span id="L217" class="LineNr"> 217 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;levels of grey is not 255; continuing and hoping for the best&quot;</span>, <span class="Constant">0x2b</span>/fg <span class="Constant">0</span>/bg
<span id="L218" class="LineNr"> 218 </span> <span class="Delimiter">}</span>
<span id="L219" class="LineNr"> 219 </span> <span class="PreProc">var</span> dest/<span class="muRegEdi">edi</span>: (addr int) <span class="Special">&lt;-</span> get self, max
<span id="L220" class="LineNr"> 220 </span> copy-to *dest, tmp
@ -357,10 +357,10 @@ if ('onhashchange' in window) {
<span id="L292" class="LineNr"> 292 </span> compare idx, len
<span id="L293" class="LineNr"> 293 </span> <span class="Delimiter">{</span>
<span id="L294" class="LineNr"> 294 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L295" class="LineNr"> 295 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L296" class="LineNr"> 296 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L297" class="LineNr"> 297 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L298" class="LineNr"> 298 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L295" class="LineNr"> 295 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L296" class="LineNr"> 296 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L297" class="LineNr"> 297 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L298" class="LineNr"> 298 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L299" class="LineNr"> 299 </span> <span class="Delimiter">}</span>
<span id="L300" class="LineNr"> 300 </span> <span class="PreProc">var</span> src-a/eax: (addr byte) <span class="Special">&lt;-</span> index img-data, idx
<span id="L301" class="LineNr"> 301 </span> <span class="PreProc">var</span> src/eax: byte <span class="Special">&lt;-</span> copy-byte *src-a
@ -369,7 +369,7 @@ if ('onhashchange' in window) {
<span id="L304" class="LineNr"> 304 </span> screenx <span class="Special">&lt;-</span> add xmin
<span id="L305" class="LineNr"> 305 </span> <span class="PreProc">var</span> screeny/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> convert y
<span id="L306" class="LineNr"> 306 </span> screeny <span class="Special">&lt;-</span> add ymin
<span id="L307" class="LineNr"> 307 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L307" class="LineNr"> 307 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L308" class="LineNr"> 308 </span> x <span class="Special">&lt;-</span> add one-f
<span id="L309" class="LineNr"> 309 </span> <span class="PreProc">loop</span>
<span id="L310" class="LineNr"> 310 </span> <span class="Delimiter">}</span>
@ -718,8 +718,8 @@ if ('onhashchange' in window) {
<span id="L653" class="LineNr"> 653 </span><span class="CommentedCode">#? break-if-&lt;=</span>
<span id="L654" class="LineNr"> 654 </span><span class="CommentedCode">#? return</span>
<span id="L655" class="LineNr"> 655 </span><span class="CommentedCode">#? }</span>
<span id="L656" class="LineNr"> 656 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, s, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L657" class="LineNr"> 657 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, d, fg <span class="Constant">0</span>/bg
<span id="L656" class="LineNr"> 656 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, s, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L657" class="LineNr"> 657 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, d, fg <span class="Constant">0</span>/bg
<span id="L658" class="LineNr"> 658 </span><span class="Delimiter">}</span>
<span id="L659" class="LineNr"> 659 </span>
<span id="L660" class="LineNr"> 660 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='511image.mu.html#L660'>psx</a></span> s: (addr array byte), d: int, fg: int, x: int, y: int <span class="Delimiter">{</span>
@ -743,8 +743,8 @@ if ('onhashchange' in window) {
<span id="L678" class="LineNr"> 678 </span><span class="CommentedCode">#? break-if-&lt;=</span>
<span id="L679" class="LineNr"> 679 </span><span class="CommentedCode">#? return</span>
<span id="L680" class="LineNr"> 680 </span><span class="CommentedCode">#? }</span>
<span id="L681" class="LineNr"> 681 </span> <a href='501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, s, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L682" class="LineNr"> 682 </span> <a href='501draw-text.mu.html#L330'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, d, fg <span class="Constant">0</span>/bg
<span id="L681" class="LineNr"> 681 </span> <a href='501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, s, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L682" class="LineNr"> 682 </span> <a href='501draw-text.mu.html#L339'>draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, d, fg <span class="Constant">0</span>/bg
<span id="L683" class="LineNr"> 683 </span><span class="Delimiter">}</span>
<span id="L684" class="LineNr"> 684 </span>
<span id="L685" class="LineNr"> 685 </span><span class="muComment"># import a color ascii &quot;pixmap&quot; (each pixel consists of 3 shades of r/g/b from 0 to 255)</span>
@ -854,10 +854,10 @@ if ('onhashchange' in window) {
<span id="L789" class="LineNr"> 789 </span> compare idx, len
<span id="L790" class="LineNr"> 790 </span> <span class="Delimiter">{</span>
<span id="L791" class="LineNr"> 791 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L792" class="LineNr"> 792 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L793" class="LineNr"> 793 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L794" class="LineNr"> 794 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L795" class="LineNr"> 795 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L792" class="LineNr"> 792 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L793" class="LineNr"> 793 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L794" class="LineNr"> 794 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L795" class="LineNr"> 795 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L796" class="LineNr"> 796 </span> <span class="Delimiter">}</span>
<span id="L797" class="LineNr"> 797 </span> <span class="muComment"># r channel</span>
<span id="L798" class="LineNr"> 798 </span> <span class="PreProc">var</span> r: int
@ -889,7 +889,7 @@ if ('onhashchange' in window) {
<span id="L824" class="LineNr"> 824 </span> screenx <span class="Special">&lt;-</span> add xmin
<span id="L825" class="LineNr"> 825 </span> <span class="PreProc">var</span> screeny/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> convert y
<span id="L826" class="LineNr"> 826 </span> screeny <span class="Special">&lt;-</span> add ymin
<span id="L827" class="LineNr"> 827 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color
<span id="L827" class="LineNr"> 827 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color
<span id="L828" class="LineNr"> 828 </span> x <span class="Special">&lt;-</span> add one-f
<span id="L829" class="LineNr"> 829 </span> <span class="PreProc">loop</span>
<span id="L830" class="LineNr"> 830 </span> <span class="Delimiter">}</span>
@ -1143,10 +1143,10 @@ if ('onhashchange' in window) {
<span id="L1078" class="LineNr">1078 </span> compare idx, len
<span id="L1079" class="LineNr">1079 </span> <span class="Delimiter">{</span>
<span id="L1080" class="LineNr">1080 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L1081" class="LineNr">1081 </span> <a href='500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L1082" class="LineNr">1082 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L1083" class="LineNr">1083 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L1084" class="LineNr">1084 </span> <a href='501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L1081" class="LineNr">1081 </span> <a href='500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0x20</span>/y
<span id="L1082" class="LineNr">1082 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L1083" class="LineNr">1083 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, imgy, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L1084" class="LineNr">1084 </span> <a href='501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, idx, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L1085" class="LineNr">1085 </span> <span class="Delimiter">}</span>
<span id="L1086" class="LineNr">1086 </span> <span class="PreProc">var</span> color-a/eax: (addr byte) <span class="Special">&lt;-</span> index img-data, idx
<span id="L1087" class="LineNr">1087 </span> <span class="PreProc">var</span> color/eax: byte <span class="Special">&lt;-</span> copy-byte *color-a
@ -1155,7 +1155,7 @@ if ('onhashchange' in window) {
<span id="L1090" class="LineNr">1090 </span> screenx <span class="Special">&lt;-</span> add xmin
<span id="L1091" class="LineNr">1091 </span> <span class="PreProc">var</span> screeny/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> convert y
<span id="L1092" class="LineNr">1092 </span> screeny <span class="Special">&lt;-</span> add ymin
<span id="L1093" class="LineNr">1093 </span> <a href='500fake-screen.mu.html#L483'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L1093" class="LineNr">1093 </span> <a href='500fake-screen.mu.html#L557'>pixel</a> <a href='500fake-screen.mu.html#L14'>screen</a>, screenx, screeny, color-int
<span id="L1094" class="LineNr">1094 </span> x <span class="Special">&lt;-</span> add one-f
<span id="L1095" class="LineNr">1095 </span> <span class="PreProc">loop</span>
<span id="L1096" class="LineNr">1096 </span> <span class="Delimiter">}</span>

View File

@ -150,7 +150,7 @@ if ('onhashchange' in window) {
<span id="L86" class="LineNr"> 86 </span><span class="muComment"># matching paren</span>
<span id="L87" class="LineNr"> 87 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L87'>render-stack-from-bottom-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>: boolean, open-paren-depth: int, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> matching-open-paren-index/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L434'>get-matching-open-paren-index</a> self, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>, open-paren-depth
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> matching-open-paren-index/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L449'>get-matching-open-paren-index</a> self, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>, open-paren-depth
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdi">edi</span>: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L92" class="LineNr"> 92 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
@ -162,462 +162,477 @@ if ('onhashchange' in window) {
<span id="L98" class="LineNr"> 98 </span> compare i, *top-addr
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L100" class="LineNr">100 </span> <span class="Delimiter">{</span>
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> fg: int
<span id="L103" class="LineNr">103 </span> <span class="Delimiter">{</span>
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> tmp/eax: int <span class="Special">&lt;-</span> copy color
<span id="L105" class="LineNr">105 </span> copy-to fg, tmp
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> c: code-point
<span id="L102" class="LineNr">102 </span> <span class="Delimiter">{</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> g/eax: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> tmp/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> *g
<span id="L105" class="LineNr">105 </span> copy-to c, tmp
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">}</span>
<span id="L107" class="LineNr">107 </span> <span class="Delimiter">{</span>
<span id="L108" class="LineNr">108 </span> compare i, matching-open-paren-index
<span id="L109" class="LineNr">109 </span> <span class="PreProc">break-if-!=</span>
<span id="L110" class="LineNr">110 </span> copy-to fg, <span class="Constant">0xf</span>/highlight
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> fg: int
<span id="L108" class="LineNr">108 </span> <span class="Delimiter">{</span>
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> tmp/eax: int <span class="Special">&lt;-</span> copy color
<span id="L110" class="LineNr">110 </span> copy-to fg, tmp
<span id="L111" class="LineNr">111 </span> <span class="Delimiter">}</span>
<span id="L112" class="LineNr">112 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L148'>render-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, *g, xmin, ymin, xmax, ymax, x, y, fg, background-color
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span>
<span id="L114" class="LineNr">114 </span> i <span class="Special">&lt;-</span> increment
<span id="L115" class="LineNr">115 </span> <span class="PreProc">loop</span>
<span id="L116" class="LineNr">116 </span> <span class="Delimiter">}</span>
<span id="L117" class="LineNr">117 </span> <span class="PreProc">return</span> x, y
<span id="L118" class="LineNr">118 </span><span class="Delimiter">}</span>
<span id="L119" class="LineNr">119 </span>
<span id="L120" class="LineNr">120 </span><span class="muComment"># helper for small words</span>
<span id="L121" class="LineNr">121 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), x: int, y: int, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>: boolean, open-paren-depth: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L122" class="LineNr">122 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L123" class="LineNr">123 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L124" class="LineNr">124 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L129" class="LineNr">129 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L87'>render-stack-from-bottom-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, self, x, y, width, height, x, y, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>, open-paren-depth, <span class="Constant">3</span>/fg=cyan, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L130" class="LineNr">130 </span> <span class="PreProc">return</span> x2 <span class="muComment"># y2? yolo</span>
<span id="L131" class="LineNr">131 </span><span class="Delimiter">}</span>
<span id="L132" class="LineNr">132 </span>
<span id="L133" class="LineNr">133 </span><span class="muComment"># dump stack to screen from top to bottom</span>
<span id="L134" class="LineNr">134 </span><span class="muComment"># optionally render a 'cursor' with the top grapheme</span>
<span id="L135" class="LineNr">135 </span><span class="muComment"># hard-coded colors:</span>
<span id="L136" class="LineNr">136 </span><span class="muComment"># matching paren</span>
<span id="L137" class="LineNr">137 </span><span class="muComment"># cursor</span>
<span id="L138" class="LineNr">138 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L138'>render-stack-from-top-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, render-cursor?: boolean, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L140" class="LineNr">140 </span> <span class="PreProc">var</span> matching-close-paren-index/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L378'>get-matching-close-paren-index</a> self, render-cursor?
<span id="L141" class="LineNr">141 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L143" class="LineNr">143 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L144" class="LineNr">144 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L146" class="LineNr">146 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L147" class="LineNr">147 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L148" class="LineNr">148 </span> i <span class="Special">&lt;-</span> decrement
<span id="L149" class="LineNr">149 </span> <span class="muComment"># if render-cursor?, peel off first iteration</span>
<span id="L150" class="LineNr">150 </span> <span class="Delimiter">{</span>
<span id="L151" class="LineNr">151 </span> compare render-cursor?, <span class="Constant">0</span>/false
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-=</span>
<span id="L153" class="LineNr">153 </span> compare i, <span class="Constant">0</span>
<span id="L154" class="LineNr">154 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L156" class="LineNr">156 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L148'>render-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, *g, xmin, ymin, xmax, ymax, x, y, background-color, color
<span id="L157" class="LineNr">157 </span> i <span class="Special">&lt;-</span> decrement
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">}</span>
<span id="L159" class="LineNr">159 </span> <span class="muComment"># remaining iterations</span>
<span id="L160" class="LineNr">160 </span> <span class="Delimiter">{</span>
<span id="L161" class="LineNr">161 </span> compare i, <span class="Constant">0</span>
<span id="L162" class="LineNr">162 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L163" class="LineNr">163 </span> <span class="muComment"># highlight matching paren if needed</span>
<span id="L164" class="LineNr">164 </span> <span class="PreProc">var</span> fg: int
<span id="L165" class="LineNr">165 </span> <span class="Delimiter">{</span>
<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> tmp/eax: int <span class="Special">&lt;-</span> copy color
<span id="L167" class="LineNr">167 </span> copy-to fg, tmp
<span id="L168" class="LineNr">168 </span> <span class="Delimiter">}</span>
<span id="L169" class="LineNr">169 </span> compare i, matching-close-paren-index
<span id="L170" class="LineNr">170 </span> <span class="Delimiter">{</span>
<span id="L171" class="LineNr">171 </span> <span class="PreProc">break-if-!=</span>
<span id="L172" class="LineNr">172 </span> copy-to fg, <span class="Constant">0xf</span>/highlight
<span id="L173" class="LineNr">173 </span> <span class="Delimiter">}</span>
<span id="L174" class="LineNr">174 </span> <span class="muComment">#</span>
<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L176" class="LineNr">176 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L148'>render-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, *g, xmin, ymin, xmax, ymax, x, y, fg, background-color
<span id="L177" class="LineNr">177 </span> i <span class="Special">&lt;-</span> decrement
<span id="L178" class="LineNr">178 </span> <span class="PreProc">loop</span>
<span id="L179" class="LineNr">179 </span> <span class="Delimiter">}</span>
<span id="L180" class="LineNr">180 </span> <span class="PreProc">return</span> x, y
<span id="L181" class="LineNr">181 </span><span class="Delimiter">}</span>
<span id="L182" class="LineNr">182 </span>
<span id="L183" class="LineNr">183 </span><span class="muComment"># helper for small words</span>
<span id="L184" class="LineNr">184 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L184'>render-stack-from-top</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), x: int, y: int, render-cursor?: boolean<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L187" class="LineNr">187 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L188" class="LineNr">188 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L189" class="LineNr">189 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L190" class="LineNr">190 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L191" class="LineNr">191 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L192" class="LineNr">192 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L138'>render-stack-from-top-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, self, x, y, width, height, x, y, render-cursor?, <span class="Constant">3</span>/fg=cyan, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L193" class="LineNr">193 </span> <span class="PreProc">return</span> x2 <span class="muComment"># y2? yolo</span>
<span id="L194" class="LineNr">194 </span><span class="Delimiter">}</span>
<span id="L195" class="LineNr">195 </span>
<span id="L196" class="LineNr">196 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a></span> <span class="Delimiter">{</span>
<span id="L197" class="LineNr">197 </span> <span class="muComment"># setup: gs = &quot;abc&quot;</span>
<span id="L198" class="LineNr">198 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L199" class="LineNr">199 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L200" class="LineNr">200 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L201" class="LineNr">201 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L202" class="LineNr">202 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L203" class="LineNr">203 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L204" class="LineNr">204 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L205" class="LineNr">205 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x63</span>/c
<span id="L206" class="LineNr">206 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L207" class="LineNr">207 </span> <span class="muComment"># setup: screen</span>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L209" class="LineNr">209 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L210" class="LineNr">210 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L211" class="LineNr">211 </span> <span class="muComment">#</span>
<span id="L212" class="LineNr">212 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">0</span>/no-highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L213" class="LineNr">213 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from bottom&quot;</span>
<span id="L214" class="LineNr">214 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from bottom: result&quot;</span>
<span id="L215" class="LineNr">215 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from bottom: bg&quot;</span>
<span id="L216" class="LineNr">216 </span> <span class="muComment">#</span>
<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L184'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">1</span>/y, <span class="Constant">0</span>/cursor=false
<span id="L218" class="LineNr">218 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/y, <span class="Constant">&quot;cba &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top without cursor&quot;</span>
<span id="L219" class="LineNr">219 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top without cursor: result&quot;</span>
<span id="L220" class="LineNr">220 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top without cursor: bg&quot;</span>
<span id="L221" class="LineNr">221 </span> <span class="muComment">#</span>
<span id="L222" class="LineNr">222 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L184'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L223" class="LineNr">223 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;cba &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top with cursor&quot;</span>
<span id="L224" class="LineNr">224 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top with cursor: result&quot;</span>
<span id="L225" class="LineNr">225 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L196'>test-render-grapheme-stack</a> from top with cursor: bg&quot;</span>
<span id="L226" class="LineNr">226 </span><span class="Delimiter">}</span>
<span id="L227" class="LineNr">227 </span>
<span id="L228" class="LineNr">228 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L228'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a></span> <span class="Delimiter">{</span>
<span id="L229" class="LineNr">229 </span> <span class="muComment"># setup: gs = &quot;(b)&quot;</span>
<span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L231" class="LineNr">231 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L232" class="LineNr">232 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L234" class="LineNr">234 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L235" class="LineNr">235 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L236" class="LineNr">236 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L237" class="LineNr">237 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L238" class="LineNr">238 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L239" class="LineNr">239 </span> <span class="muComment"># setup: screen</span>
<span id="L240" class="LineNr">240 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L242" class="LineNr">242 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L243" class="LineNr">243 </span> <span class="muComment">#</span>
<span id="L244" class="LineNr">244 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L184'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L245" class="LineNr">245 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-close-paren&quot;</span>
<span id="L246" class="LineNr">246 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L228'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a>: cursor&quot;</span>
<span id="L247" class="LineNr">247 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L228'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a>: matching paren&quot;</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><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L250'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a></span> <span class="Delimiter">{</span>
<span id="L251" class="LineNr">251 </span> <span class="muComment"># setup: gs = &quot;(a (b)) c&quot;</span>
<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L253" class="LineNr">253 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L254" class="LineNr">254 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L255" class="LineNr">255 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x63</span>/c
<span id="L256" class="LineNr">256 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L257" class="LineNr">257 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>/space
<span id="L258" class="LineNr">258 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L259" class="LineNr">259 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L260" class="LineNr">260 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L261" class="LineNr">261 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L262" class="LineNr">262 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L263" class="LineNr">263 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L264" class="LineNr">264 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L265" class="LineNr">265 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L266" class="LineNr">266 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L267" class="LineNr">267 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>/space
<span id="L268" class="LineNr">268 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L269" class="LineNr">269 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L270" class="LineNr">270 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L271" class="LineNr">271 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L272" class="LineNr">272 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L273" class="LineNr">273 </span> <span class="muComment"># setup: screen</span>
<span id="L274" class="LineNr">274 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L275" class="LineNr">275 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L276" class="LineNr">276 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L277" class="LineNr">277 </span> <span class="muComment">#</span>
<span id="L278" class="LineNr">278 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L184'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L279" class="LineNr">279 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(a (b)) c &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-close-paren-2&quot;</span>
<span id="L280" class="LineNr">280 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L250'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a>: cursor&quot;</span>
<span id="L281" class="LineNr">281 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L250'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a>: matching paren&quot;</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="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L284'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end</a></span> <span class="Delimiter">{</span>
<span id="L285" class="LineNr">285 </span> <span class="muComment"># setup: gs = &quot;(b)&quot;</span>
<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L288" class="LineNr">288 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L290" class="LineNr">290 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L291" class="LineNr">291 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L292" class="LineNr">292 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L293" class="LineNr">293 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L294" class="LineNr">294 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L295" class="LineNr">295 </span> <span class="muComment"># setup: screen</span>
<span id="L296" class="LineNr">296 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L297" class="LineNr">297 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L298" class="LineNr">298 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L299" class="LineNr">299 </span> <span class="muComment">#</span>
<span id="L300" class="LineNr">300 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">1</span>/open-paren-depth
<span id="L301" class="LineNr">301 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end&quot;</span>
<span id="L302" class="LineNr">302 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L284'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end</a>: matching paren&quot;</span>
<span id="L303" class="LineNr">303 </span><span class="Delimiter">}</span>
<span id="L304" class="LineNr">304 </span>
<span id="L305" class="LineNr">305 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L305'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2</a></span> <span class="Delimiter">{</span>
<span id="L306" class="LineNr">306 </span> <span class="muComment"># setup: gs = &quot;a((b))&quot;</span>
<span id="L307" class="LineNr">307 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L308" class="LineNr">308 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L309" class="LineNr">309 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L310" class="LineNr">310 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L311" class="LineNr">311 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L312" class="LineNr">312 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L313" class="LineNr">313 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L314" class="LineNr">314 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L315" class="LineNr">315 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L316" class="LineNr">316 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L317" class="LineNr">317 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L318" class="LineNr">318 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L319" class="LineNr">319 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L320" class="LineNr">320 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L321" class="LineNr">321 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L322" class="LineNr">322 </span> <span class="muComment"># setup: screen</span>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L324" class="LineNr">324 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L325" class="LineNr">325 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L326" class="LineNr">326 </span> <span class="muComment">#</span>
<span id="L327" class="LineNr">327 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">1</span>/open-paren-depth
<span id="L328" class="LineNr">328 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;a((b)) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2&quot;</span>
<span id="L329" class="LineNr">329 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L305'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2</a>: matching paren&quot;</span>
<span id="L330" class="LineNr">330 </span><span class="Delimiter">}</span>
<span id="L331" class="LineNr">331 </span>
<span id="L332" class="LineNr">332 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L332'>test-render-grapheme-stack-while-highlighting-matching-open-paren</a></span> <span class="Delimiter">{</span>
<span id="L333" class="LineNr">333 </span> <span class="muComment"># setup: gs = &quot;(b&quot;</span>
<span id="L334" class="LineNr">334 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L335" class="LineNr">335 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L336" class="LineNr">336 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L337" class="LineNr">337 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L338" class="LineNr">338 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L339" class="LineNr">339 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L340" class="LineNr">340 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L341" class="LineNr">341 </span> <span class="muComment"># setup: screen</span>
<span id="L342" class="LineNr">342 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L343" class="LineNr">343 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L344" class="LineNr">344 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L345" class="LineNr">345 </span> <span class="muComment">#</span>
<span id="L346" class="LineNr">346 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L347" class="LineNr">347 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren&quot;</span>
<span id="L348" class="LineNr">348 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L332'>test-render-grapheme-stack-while-highlighting-matching-open-paren</a>: matching paren&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="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L351'>test-render-grapheme-stack-while-highlighting-matching-open-paren-2</a></span> <span class="Delimiter">{</span>
<span id="L352" class="LineNr">352 </span> <span class="muComment"># setup: gs = &quot;a((b)&quot;</span>
<span id="L353" class="LineNr">353 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L354" class="LineNr">354 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L355" class="LineNr">355 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L356" class="LineNr">356 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L357" class="LineNr">357 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L358" class="LineNr">358 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L359" class="LineNr">359 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L360" class="LineNr">360 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L361" class="LineNr">361 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L362" class="LineNr">362 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L363" class="LineNr">363 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L364" class="LineNr">364 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L365" class="LineNr">365 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L366" class="LineNr">366 </span> <span class="muComment"># setup: screen</span>
<span id="L367" class="LineNr">367 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L369" class="LineNr">369 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L370" class="LineNr">370 </span> <span class="muComment">#</span>
<span id="L371" class="LineNr">371 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L121'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L372" class="LineNr">372 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;a((b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-2&quot;</span>
<span id="L373" class="LineNr">373 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L351'>test-render-grapheme-stack-while-highlighting-matching-open-paren-2</a>: matching paren&quot;</span>
<span id="L374" class="LineNr">374 </span><span class="Delimiter">}</span>
<span id="L375" class="LineNr">375 </span>
<span id="L376" class="LineNr">376 </span><span class="muComment"># return the index of the matching close-paren of the grapheme at cursor (top of stack)</span>
<span id="L377" class="LineNr">377 </span><span class="muComment"># or top index if there's no matching close-paren</span>
<span id="L378" class="LineNr">378 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L378'>get-matching-close-paren-index</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), render-cursor?: boolean<span class="PreProc"> -&gt; </span>_/<span class="muRegEdx">edx</span>: int <span class="Delimiter">{</span>
<span id="L379" class="LineNr">379 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L381" class="LineNr">381 </span> <span class="muComment"># if not rendering cursor, return</span>
<span id="L382" class="LineNr">382 </span> compare render-cursor?, <span class="Constant">0</span>/false
<span id="L383" class="LineNr">383 </span> <span class="Delimiter">{</span>
<span id="L384" class="LineNr">384 </span> <span class="PreProc">break-if-!=</span>
<span id="L385" class="LineNr">385 </span> <span class="PreProc">return</span> *top-addr
<span id="L386" class="LineNr">386 </span> <span class="Delimiter">}</span>
<span id="L387" class="LineNr">387 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L388" class="LineNr">388 </span> <span class="PreProc">var</span> data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L389" class="LineNr">389 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L390" class="LineNr">390 </span> <span class="muComment"># if stack is empty, return</span>
<span id="L391" class="LineNr">391 </span> compare i, <span class="Constant">0</span>
<span id="L392" class="LineNr">392 </span> <span class="Delimiter">{</span>
<span id="L393" class="LineNr">393 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L394" class="LineNr">394 </span> <span class="PreProc">return</span> *top-addr
<span id="L395" class="LineNr">395 </span> <span class="Delimiter">}</span>
<span id="L396" class="LineNr">396 </span> <span class="muComment"># if cursor is not '(' return</span>
<span id="L397" class="LineNr">397 </span> i <span class="Special">&lt;-</span> decrement
<span id="L398" class="LineNr">398 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L399" class="LineNr">399 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L400" class="LineNr">400 </span> <span class="Delimiter">{</span>
<span id="L401" class="LineNr">401 </span> <span class="PreProc">break-if-=</span>
<span id="L402" class="LineNr">402 </span> <span class="PreProc">return</span> *top-addr
<span id="L403" class="LineNr">403 </span> <span class="Delimiter">}</span>
<span id="L404" class="LineNr">404 </span> <span class="muComment"># otherwise scan to matching paren</span>
<span id="L405" class="LineNr">405 </span> <span class="PreProc">var</span> paren-count/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L406" class="LineNr">406 </span> i <span class="Special">&lt;-</span> decrement
<span id="L112" class="LineNr">112 </span> <span class="Delimiter">{</span>
<span id="L113" class="LineNr">113 </span> compare i, matching-open-paren-index
<span id="L114" class="LineNr">114 </span> <span class="PreProc">break-if-!=</span>
<span id="L115" class="LineNr">115 </span> copy-to fg, <span class="Constant">0xf</span>/highlight
<span id="L116" class="LineNr">116 </span> <span class="Delimiter">}</span>
<span id="L117" class="LineNr">117 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L155'>render-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xmin, ymin, xmax, ymax, x, y, fg, background-color
<span id="L118" class="LineNr">118 </span> <span class="Delimiter">}</span>
<span id="L119" class="LineNr">119 </span> i <span class="Special">&lt;-</span> increment
<span id="L120" class="LineNr">120 </span> <span class="PreProc">loop</span>
<span id="L121" class="LineNr">121 </span> <span class="Delimiter">}</span>
<span id="L122" class="LineNr">122 </span> <span class="PreProc">return</span> x, y
<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="muComment"># helper for small words</span>
<span id="L126" class="LineNr">126 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), x: int, y: int, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>: boolean, open-paren-depth: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L129" class="LineNr">129 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L132" class="LineNr">132 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L134" class="LineNr">134 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L87'>render-stack-from-bottom-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, self, x, y, width, height, x, y, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>, open-paren-depth, <span class="Constant">3</span>/fg=cyan, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L135" class="LineNr">135 </span> <span class="PreProc">return</span> x2 <span class="muComment"># y2? yolo</span>
<span id="L136" class="LineNr">136 </span><span class="Delimiter">}</span>
<span id="L137" class="LineNr">137 </span>
<span id="L138" class="LineNr">138 </span><span class="muComment"># dump stack to screen from top to bottom</span>
<span id="L139" class="LineNr">139 </span><span class="muComment"># optionally render a 'cursor' with the top grapheme</span>
<span id="L140" class="LineNr">140 </span><span class="muComment"># hard-coded colors:</span>
<span id="L141" class="LineNr">141 </span><span class="muComment"># matching paren</span>
<span id="L142" class="LineNr">142 </span><span class="muComment"># cursor</span>
<span id="L143" class="LineNr">143 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L143'>render-stack-from-top-wrapping-right-then-down</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, render-cursor?: boolean, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int, _/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L144" class="LineNr">144 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> matching-close-paren-index/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L393'>get-matching-close-paren-index</a> self, render-cursor?
<span id="L146" class="LineNr">146 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L147" class="LineNr">147 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L148" class="LineNr">148 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy _x
<span id="L150" class="LineNr">150 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L151" class="LineNr">151 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L152" class="LineNr">152 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L153" class="LineNr">153 </span> i <span class="Special">&lt;-</span> decrement
<span id="L154" class="LineNr">154 </span> <span class="muComment"># if render-cursor?, peel off first iteration</span>
<span id="L155" class="LineNr">155 </span> <span class="Delimiter">{</span>
<span id="L156" class="LineNr">156 </span> compare render-cursor?, <span class="Constant">0</span>/false
<span id="L157" class="LineNr">157 </span> <span class="PreProc">break-if-=</span>
<span id="L158" class="LineNr">158 </span> compare i, <span class="Constant">0</span>
<span id="L159" class="LineNr">159 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> c: code-point
<span id="L161" class="LineNr">161 </span> <span class="Delimiter">{</span>
<span id="L162" class="LineNr">162 </span> <span class="PreProc">var</span> g/eax: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L163" class="LineNr">163 </span> <span class="PreProc">var</span> tmp/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> *g
<span id="L164" class="LineNr">164 </span> copy-to c, tmp
<span id="L165" class="LineNr">165 </span> <span class="Delimiter">}</span>
<span id="L166" class="LineNr">166 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L155'>render-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xmin, ymin, xmax, ymax, x, y, background-color, color
<span id="L167" class="LineNr">167 </span> i <span class="Special">&lt;-</span> decrement
<span id="L168" class="LineNr">168 </span> <span class="Delimiter">}</span>
<span id="L169" class="LineNr">169 </span> <span class="muComment"># remaining iterations</span>
<span id="L170" class="LineNr">170 </span> <span class="Delimiter">{</span>
<span id="L171" class="LineNr">171 </span> compare i, <span class="Constant">0</span>
<span id="L172" class="LineNr">172 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L173" class="LineNr">173 </span> <span class="muComment"># highlight matching paren if needed</span>
<span id="L174" class="LineNr">174 </span> <span class="PreProc">var</span> fg: int
<span id="L175" class="LineNr">175 </span> <span class="Delimiter">{</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> tmp/eax: int <span class="Special">&lt;-</span> copy color
<span id="L177" class="LineNr">177 </span> copy-to fg, tmp
<span id="L178" class="LineNr">178 </span> <span class="Delimiter">}</span>
<span id="L179" class="LineNr">179 </span> compare i, matching-close-paren-index
<span id="L180" class="LineNr">180 </span> <span class="Delimiter">{</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">break-if-!=</span>
<span id="L182" class="LineNr">182 </span> copy-to fg, <span class="Constant">0xf</span>/highlight
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">}</span>
<span id="L184" class="LineNr">184 </span> <span class="muComment">#</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">var</span> c: code-point
<span id="L186" class="LineNr">186 </span> <span class="Delimiter">{</span>
<span id="L187" class="LineNr">187 </span> <span class="PreProc">var</span> g/eax: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L188" class="LineNr">188 </span> <span class="PreProc">var</span> tmp/eax: code-point <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L56'>to-code-point</a> *g
<span id="L189" class="LineNr">189 </span> copy-to c, tmp
<span id="L190" class="LineNr">190 </span> <span class="Delimiter">}</span>
<span id="L191" class="LineNr">191 </span> x, y <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L155'>render-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, c, xmin, ymin, xmax, ymax, x, y, fg, background-color
<span id="L192" class="LineNr">192 </span> i <span class="Special">&lt;-</span> decrement
<span id="L193" class="LineNr">193 </span> <span class="PreProc">loop</span>
<span id="L194" class="LineNr">194 </span> <span class="Delimiter">}</span>
<span id="L195" class="LineNr">195 </span> <span class="PreProc">return</span> x, y
<span id="L196" class="LineNr">196 </span><span class="Delimiter">}</span>
<span id="L197" class="LineNr">197 </span>
<span id="L198" class="LineNr">198 </span><span class="muComment"># helper for small words</span>
<span id="L199" class="LineNr">199 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L199'>render-stack-from-top</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), x: int, y: int, render-cursor?: boolean<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L200" class="LineNr">200 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L201" class="LineNr">201 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L202" class="LineNr">202 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L203" class="LineNr">203 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L204" class="LineNr">204 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L207" class="LineNr">207 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L143'>render-stack-from-top-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, self, x, y, width, height, x, y, render-cursor?, <span class="Constant">3</span>/fg=cyan, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L208" class="LineNr">208 </span> <span class="PreProc">return</span> x2 <span class="muComment"># y2? yolo</span>
<span id="L209" class="LineNr">209 </span><span class="Delimiter">}</span>
<span id="L210" class="LineNr">210 </span>
<span id="L211" class="LineNr">211 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a></span> <span class="Delimiter">{</span>
<span id="L212" class="LineNr">212 </span> <span class="muComment"># setup: gs = &quot;abc&quot;</span>
<span id="L213" class="LineNr">213 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L214" class="LineNr">214 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L215" class="LineNr">215 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L216" class="LineNr">216 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L217" class="LineNr">217 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L218" class="LineNr">218 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L219" class="LineNr">219 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L220" class="LineNr">220 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x63</span>/c
<span id="L221" class="LineNr">221 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L222" class="LineNr">222 </span> <span class="muComment"># setup: screen</span>
<span id="L223" class="LineNr">223 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L224" class="LineNr">224 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L225" class="LineNr">225 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L226" class="LineNr">226 </span> <span class="muComment">#</span>
<span id="L227" class="LineNr">227 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">0</span>/no-highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L228" class="LineNr">228 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from bottom&quot;</span>
<span id="L229" class="LineNr">229 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from bottom: result&quot;</span>
<span id="L230" class="LineNr">230 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from bottom: bg&quot;</span>
<span id="L231" class="LineNr">231 </span> <span class="muComment">#</span>
<span id="L232" class="LineNr">232 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L199'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">1</span>/y, <span class="Constant">0</span>/cursor=false
<span id="L233" class="LineNr">233 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/y, <span class="Constant">&quot;cba &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top without cursor&quot;</span>
<span id="L234" class="LineNr">234 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top without cursor: result&quot;</span>
<span id="L235" class="LineNr">235 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top without cursor: bg&quot;</span>
<span id="L236" class="LineNr">236 </span> <span class="muComment">#</span>
<span id="L237" class="LineNr">237 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L199'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L238" class="LineNr">238 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;cba &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top with cursor&quot;</span>
<span id="L239" class="LineNr">239 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">3</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top with cursor: result&quot;</span>
<span id="L240" class="LineNr">240 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L211'>test-render-grapheme-stack</a> from top with cursor: bg&quot;</span>
<span id="L241" class="LineNr">241 </span><span class="Delimiter">}</span>
<span id="L242" class="LineNr">242 </span>
<span id="L243" class="LineNr">243 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L243'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a></span> <span class="Delimiter">{</span>
<span id="L244" class="LineNr">244 </span> <span class="muComment"># setup: gs = &quot;(b)&quot;</span>
<span id="L245" class="LineNr">245 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L246" class="LineNr">246 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L247" class="LineNr">247 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L249" class="LineNr">249 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L250" class="LineNr">250 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L251" class="LineNr">251 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L252" class="LineNr">252 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L253" class="LineNr">253 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L254" class="LineNr">254 </span> <span class="muComment"># setup: screen</span>
<span id="L255" class="LineNr">255 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L257" class="LineNr">257 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L258" class="LineNr">258 </span> <span class="muComment">#</span>
<span id="L259" class="LineNr">259 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L199'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L260" class="LineNr">260 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-close-paren&quot;</span>
<span id="L261" class="LineNr">261 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L243'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a>: cursor&quot;</span>
<span id="L262" class="LineNr">262 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L243'>test-render-grapheme-stack-while-highlighting-matching-close-paren</a>: matching paren&quot;</span>
<span id="L263" class="LineNr">263 </span><span class="Delimiter">}</span>
<span id="L264" class="LineNr">264 </span>
<span id="L265" class="LineNr">265 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L265'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a></span> <span class="Delimiter">{</span>
<span id="L266" class="LineNr">266 </span> <span class="muComment"># setup: gs = &quot;(a (b)) c&quot;</span>
<span id="L267" class="LineNr">267 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L268" class="LineNr">268 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L269" class="LineNr">269 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L270" class="LineNr">270 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x63</span>/c
<span id="L271" class="LineNr">271 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L272" class="LineNr">272 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>/space
<span id="L273" class="LineNr">273 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L274" class="LineNr">274 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L275" class="LineNr">275 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L276" class="LineNr">276 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L277" class="LineNr">277 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L278" class="LineNr">278 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L279" class="LineNr">279 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L280" class="LineNr">280 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L281" class="LineNr">281 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L282" class="LineNr">282 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>/space
<span id="L283" class="LineNr">283 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L284" class="LineNr">284 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L285" class="LineNr">285 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L286" class="LineNr">286 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L287" class="LineNr">287 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L288" class="LineNr">288 </span> <span class="muComment"># setup: screen</span>
<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L290" class="LineNr">290 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L291" class="LineNr">291 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L292" class="LineNr">292 </span> <span class="muComment">#</span>
<span id="L293" class="LineNr">293 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L199'>render-stack-from-top</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/cursor=true
<span id="L294" class="LineNr">294 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(a (b)) c &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-close-paren-2&quot;</span>
<span id="L295" class="LineNr">295 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">2</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L265'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a>: cursor&quot;</span>
<span id="L296" class="LineNr">296 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L265'>test-render-grapheme-stack-while-highlighting-matching-close-paren-2</a>: matching paren&quot;</span>
<span id="L297" class="LineNr">297 </span><span class="Delimiter">}</span>
<span id="L298" class="LineNr">298 </span>
<span id="L299" class="LineNr">299 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L299'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end</a></span> <span class="Delimiter">{</span>
<span id="L300" class="LineNr">300 </span> <span class="muComment"># setup: gs = &quot;(b)&quot;</span>
<span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L302" class="LineNr">302 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L303" class="LineNr">303 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L304" class="LineNr">304 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L305" class="LineNr">305 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L306" class="LineNr">306 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L307" class="LineNr">307 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L308" class="LineNr">308 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L309" class="LineNr">309 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L310" class="LineNr">310 </span> <span class="muComment"># setup: screen</span>
<span id="L311" class="LineNr">311 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L312" class="LineNr">312 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L313" class="LineNr">313 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L314" class="LineNr">314 </span> <span class="muComment">#</span>
<span id="L315" class="LineNr">315 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">1</span>/open-paren-depth
<span id="L316" class="LineNr">316 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end&quot;</span>
<span id="L317" class="LineNr">317 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L299'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end</a>: matching paren&quot;</span>
<span id="L318" class="LineNr">318 </span><span class="Delimiter">}</span>
<span id="L319" class="LineNr">319 </span>
<span id="L320" class="LineNr">320 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L320'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2</a></span> <span class="Delimiter">{</span>
<span id="L321" class="LineNr">321 </span> <span class="muComment"># setup: gs = &quot;a((b))&quot;</span>
<span id="L322" class="LineNr">322 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L323" class="LineNr">323 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L324" class="LineNr">324 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L325" class="LineNr">325 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L326" class="LineNr">326 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L327" class="LineNr">327 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L328" class="LineNr">328 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L329" class="LineNr">329 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L330" class="LineNr">330 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L331" class="LineNr">331 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L332" class="LineNr">332 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L333" class="LineNr">333 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L334" class="LineNr">334 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L335" class="LineNr">335 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L336" class="LineNr">336 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L337" class="LineNr">337 </span> <span class="muComment"># setup: screen</span>
<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L340" class="LineNr">340 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L341" class="LineNr">341 </span> <span class="muComment">#</span>
<span id="L342" class="LineNr">342 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">1</span>/open-paren-depth
<span id="L343" class="LineNr">343 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;a((b)) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2&quot;</span>
<span id="L344" class="LineNr">344 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L320'>test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2</a>: matching paren&quot;</span>
<span id="L345" class="LineNr">345 </span><span class="Delimiter">}</span>
<span id="L346" class="LineNr">346 </span>
<span id="L347" class="LineNr">347 </span><span class="PreProc">fn</span> <span class="muTest"><a href='513grapheme-stack.mu.html#L347'>test-render-grapheme-stack-while-highlighting-matching-open-paren</a></span> <span class="Delimiter">{</span>
<span id="L348" class="LineNr">348 </span> <span class="muComment"># setup: gs = &quot;(b&quot;</span>
<span id="L349" class="LineNr">349 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L350" class="LineNr">350 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L351" class="LineNr">351 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">5</span>
<span id="L352" class="LineNr">352 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L353" class="LineNr">353 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L354" class="LineNr">354 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L355" class="LineNr">355 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L356" class="LineNr">356 </span> <span class="muComment"># setup: screen</span>
<span id="L357" class="LineNr">357 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L358" class="LineNr">358 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L359" class="LineNr">359 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L360" class="LineNr">360 </span> <span class="muComment">#</span>
<span id="L361" class="LineNr">361 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L362" class="LineNr">362 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;(b &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren&quot;</span>
<span id="L363" class="LineNr">363 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L347'>test-render-grapheme-stack-while-highlighting-matching-open-paren</a>: matching paren&quot;</span>
<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="muTest"><a href='513grapheme-stack.mu.html#L366'>test-render-grapheme-stack-while-highlighting-matching-open-paren-2</a></span> <span class="Delimiter">{</span>
<span id="L367" class="LineNr">367 </span> <span class="muComment"># setup: gs = &quot;a((b)&quot;</span>
<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> gs-storage: <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>
<span id="L369" class="LineNr">369 </span> <span class="PreProc">var</span> gs/<span class="muRegEdi">edi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> address gs-storage
<span id="L370" class="LineNr">370 </span> <a href='513grapheme-stack.mu.html#L8'>initialize-grapheme-stack</a> gs, <span class="Constant">0x10</span>
<span id="L371" class="LineNr">371 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x61</span>/a
<span id="L372" class="LineNr">372 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L373" class="LineNr">373 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L374" class="LineNr">374 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L375" class="LineNr">375 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x28</span>/open-paren
<span id="L376" class="LineNr">376 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L377" class="LineNr">377 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x62</span>/b
<span id="L378" class="LineNr">378 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L379" class="LineNr">379 </span> g <span class="Special">&lt;-</span> copy <span class="Constant">0x29</span>/close-paren
<span id="L380" class="LineNr">380 </span> <a href='513grapheme-stack.mu.html#L39'>push-grapheme-stack</a> gs, g
<span id="L381" class="LineNr">381 </span> <span class="muComment"># setup: screen</span>
<span id="L382" class="LineNr">382 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L383" class="LineNr">383 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEsi">esi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L384" class="LineNr">384 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L385" class="LineNr">385 </span> <span class="muComment">#</span>
<span id="L386" class="LineNr">386 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L126'>render-stack-from-bottom</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gs, <span class="Constant">0</span>/x, <span class="Constant">2</span>/y, <span class="Constant">1</span>/highlight-matching-open-paren, <span class="Constant">0</span>/open-paren-depth
<span id="L387" class="LineNr">387 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">2</span>/y, <span class="Constant">&quot;a((b) &quot;</span>, <span class="Constant">&quot;F - test-render-grapheme-stack-while-highlighting-matching-open-paren-2&quot;</span>
<span id="L388" class="LineNr">388 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=white, <span class="Constant">2</span>/y, <span class="Constant">&quot; ( &quot;</span>, <span class="Constant">&quot;F - <a href='513grapheme-stack.mu.html#L366'>test-render-grapheme-stack-while-highlighting-matching-open-paren-2</a>: matching paren&quot;</span>
<span id="L389" class="LineNr">389 </span><span class="Delimiter">}</span>
<span id="L390" class="LineNr">390 </span>
<span id="L391" class="LineNr">391 </span><span class="muComment"># return the index of the matching close-paren of the grapheme at cursor (top of stack)</span>
<span id="L392" class="LineNr">392 </span><span class="muComment"># or top index if there's no matching close-paren</span>
<span id="L393" class="LineNr">393 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L393'>get-matching-close-paren-index</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), render-cursor?: boolean<span class="PreProc"> -&gt; </span>_/<span class="muRegEdx">edx</span>: int <span class="Delimiter">{</span>
<span id="L394" class="LineNr">394 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L395" class="LineNr">395 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L396" class="LineNr">396 </span> <span class="muComment"># if not rendering cursor, return</span>
<span id="L397" class="LineNr">397 </span> compare render-cursor?, <span class="Constant">0</span>/false
<span id="L398" class="LineNr">398 </span> <span class="Delimiter">{</span>
<span id="L399" class="LineNr">399 </span> <span class="PreProc">break-if-!=</span>
<span id="L400" class="LineNr">400 </span> <span class="PreProc">return</span> *top-addr
<span id="L401" class="LineNr">401 </span> <span class="Delimiter">}</span>
<span id="L402" class="LineNr">402 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L403" class="LineNr">403 </span> <span class="PreProc">var</span> data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L404" class="LineNr">404 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L405" class="LineNr">405 </span> <span class="muComment"># if stack is empty, return</span>
<span id="L406" class="LineNr">406 </span> compare i, <span class="Constant">0</span>
<span id="L407" class="LineNr">407 </span> <span class="Delimiter">{</span>
<span id="L408" class="LineNr">408 </span> compare i, <span class="Constant">0</span>
<span id="L409" class="LineNr">409 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L410" class="LineNr">410 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L411" class="LineNr">411 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L412" class="LineNr">412 </span> <span class="Delimiter">{</span>
<span id="L413" class="LineNr">413 </span> <span class="PreProc">break-if-!=</span>
<span id="L414" class="LineNr">414 </span> paren-count <span class="Special">&lt;-</span> increment
<span id="L415" class="LineNr">415 </span> <span class="Delimiter">}</span>
<span id="L416" class="LineNr">416 </span> compare *g, <span class="Constant">0x29</span>/close-paren
<span id="L417" class="LineNr">417 </span> <span class="Delimiter">{</span>
<span id="L418" class="LineNr">418 </span> <span class="PreProc">break-if-!=</span>
<span id="L419" class="LineNr">419 </span> compare paren-count, <span class="Constant">1</span>
<span id="L420" class="LineNr">420 </span> <span class="Delimiter">{</span>
<span id="L421" class="LineNr">421 </span> <span class="PreProc">break-if-!=</span>
<span id="L422" class="LineNr">422 </span> <span class="PreProc">return</span> i
<span id="L423" class="LineNr">423 </span> <span class="Delimiter">}</span>
<span id="L424" class="LineNr">424 </span> paren-count <span class="Special">&lt;-</span> decrement
<span id="L425" class="LineNr">425 </span> <span class="Delimiter">}</span>
<span id="L426" class="LineNr">426 </span> i <span class="Special">&lt;-</span> decrement
<span id="L427" class="LineNr">427 </span> <span class="PreProc">loop</span>
<span id="L428" class="LineNr">428 </span> <span class="Delimiter">}</span>
<span id="L429" class="LineNr">429 </span> <span class="PreProc">return</span> *top-addr
<span id="L430" class="LineNr">430 </span><span class="Delimiter">}</span>
<span id="L431" class="LineNr">431 </span>
<span id="L432" class="LineNr">432 </span><span class="muComment"># return the index of the first open-paren at the given depth</span>
<span id="L433" class="LineNr">433 </span><span class="muComment"># or top index if there's no matching close-paren</span>
<span id="L434" class="LineNr">434 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L434'>get-matching-open-paren-index</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), control: boolean, depth: int<span class="PreProc"> -&gt; </span>_/<span class="muRegEdx">edx</span>: int <span class="Delimiter">{</span>
<span id="L435" class="LineNr">435 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L436" class="LineNr">436 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L437" class="LineNr">437 </span> <span class="muComment"># if not rendering cursor, return</span>
<span id="L438" class="LineNr">438 </span> compare control, <span class="Constant">0</span>/false
<span id="L439" class="LineNr">439 </span> <span class="Delimiter">{</span>
<span id="L440" class="LineNr">440 </span> <span class="PreProc">break-if-!=</span>
<span id="L441" class="LineNr">441 </span> <span class="PreProc">return</span> *top-addr
<span id="L442" class="LineNr">442 </span> <span class="Delimiter">}</span>
<span id="L443" class="LineNr">443 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L444" class="LineNr">444 </span> <span class="PreProc">var</span> data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L445" class="LineNr">445 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L446" class="LineNr">446 </span> <span class="muComment"># if stack is empty, return</span>
<span id="L447" class="LineNr">447 </span> compare i, <span class="Constant">0</span>
<span id="L448" class="LineNr">448 </span> <span class="Delimiter">{</span>
<span id="L449" class="LineNr">449 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L450" class="LineNr">450 </span> <span class="PreProc">return</span> *top-addr
<span id="L451" class="LineNr">451 </span> <span class="Delimiter">}</span>
<span id="L452" class="LineNr">452 </span> <span class="muComment"># scan to matching open paren</span>
<span id="L453" class="LineNr">453 </span> <span class="PreProc">var</span> paren-count/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L454" class="LineNr">454 </span> i <span class="Special">&lt;-</span> decrement
<span id="L455" class="LineNr">455 </span> <span class="Delimiter">{</span>
<span id="L456" class="LineNr">456 </span> compare i, <span class="Constant">0</span>
<span id="L457" class="LineNr">457 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L458" class="LineNr">458 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L459" class="LineNr">459 </span> compare *g, <span class="Constant">0x29</span>/close-paren
<span id="L460" class="LineNr">460 </span> <span class="Delimiter">{</span>
<span id="L461" class="LineNr">461 </span> <span class="PreProc">break-if-!=</span>
<span id="L462" class="LineNr">462 </span> paren-count <span class="Special">&lt;-</span> increment
<span id="L463" class="LineNr">463 </span> <span class="Delimiter">}</span>
<span id="L464" class="LineNr">464 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L465" class="LineNr">465 </span> <span class="Delimiter">{</span>
<span id="L466" class="LineNr">466 </span> <span class="PreProc">break-if-!=</span>
<span id="L467" class="LineNr">467 </span> compare paren-count, depth
<span id="L468" class="LineNr">468 </span> <span class="Delimiter">{</span>
<span id="L469" class="LineNr">469 </span> <span class="PreProc">break-if-!=</span>
<span id="L470" class="LineNr">470 </span> <span class="PreProc">return</span> i
<span id="L471" class="LineNr">471 </span> <span class="Delimiter">}</span>
<span id="L472" class="LineNr">472 </span> paren-count <span class="Special">&lt;-</span> decrement
<span id="L473" class="LineNr">473 </span> <span class="Delimiter">}</span>
<span id="L474" class="LineNr">474 </span> i <span class="Special">&lt;-</span> decrement
<span id="L475" class="LineNr">475 </span> <span class="PreProc">loop</span>
<span id="L476" class="LineNr">476 </span> <span class="Delimiter">}</span>
<span id="L477" class="LineNr">477 </span> <span class="PreProc">return</span> *top-addr
<span id="L478" class="LineNr">478 </span><span class="Delimiter">}</span>
<span id="L479" class="LineNr">479 </span>
<span id="L480" class="LineNr">480 </span><span class="muComment"># compare from bottom</span>
<span id="L481" class="LineNr">481 </span><span class="muComment"># beware: modifies 'stream', which must be disposed of after a false result</span>
<span id="L482" class="LineNr">482 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L482'>prefix-match?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L483" class="LineNr">483 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L484" class="LineNr">484 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdi">edi</span>: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L485" class="LineNr">485 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L486" class="LineNr">486 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L487" class="LineNr">487 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L488" class="LineNr">488 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L489" class="LineNr">489 </span> <span class="Delimiter">{</span>
<span id="L490" class="LineNr">490 </span> compare i, *top-addr
<span id="L491" class="LineNr">491 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L492" class="LineNr">492 </span> <span class="muComment"># if curr != expected, return false</span>
<span id="L493" class="LineNr">493 </span> <span class="Delimiter">{</span>
<span id="L494" class="LineNr">494 </span> <span class="PreProc">var</span> curr-a/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L495" class="LineNr">495 </span> <span class="PreProc">var</span> expected/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> s
<span id="L496" class="LineNr">496 </span> <span class="Delimiter">{</span>
<span id="L497" class="LineNr">497 </span> compare expected, *curr-a
<span id="L498" class="LineNr">498 </span> <span class="PreProc">break-if-=</span>
<span id="L499" class="LineNr">499 </span> <span class="PreProc">return</span> <span class="Constant">0</span>/false
<span id="L500" class="LineNr">500 </span> <span class="Delimiter">}</span>
<span id="L501" class="LineNr">501 </span> <span class="Delimiter">}</span>
<span id="L502" class="LineNr">502 </span> i <span class="Special">&lt;-</span> increment
<span id="L503" class="LineNr">503 </span> <span class="PreProc">loop</span>
<span id="L504" class="LineNr">504 </span> <span class="Delimiter">}</span>
<span id="L505" class="LineNr">505 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L506" class="LineNr">506 </span><span class="Delimiter">}</span>
<span id="L507" class="LineNr">507 </span>
<span id="L508" class="LineNr">508 </span><span class="muComment"># compare from bottom</span>
<span id="L509" class="LineNr">509 </span><span class="muComment"># beware: modifies 'stream', which must be disposed of after a false result</span>
<span id="L510" class="LineNr">510 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L510'>suffix-match?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L511" class="LineNr">511 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L512" class="LineNr">512 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdi">edi</span>: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L513" class="LineNr">513 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L514" class="LineNr">514 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L515" class="LineNr">515 </span> <span class="PreProc">var</span> top-addr/eax: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L516" class="LineNr">516 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L517" class="LineNr">517 </span> i <span class="Special">&lt;-</span> decrement
<span id="L518" class="LineNr">518 </span> <span class="Delimiter">{</span>
<span id="L519" class="LineNr">519 </span> compare i, <span class="Constant">0</span>
<span id="L520" class="LineNr">520 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L521" class="LineNr">521 </span> <span class="Delimiter">{</span>
<span id="L522" class="LineNr">522 </span> <span class="PreProc">var</span> curr-a/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L523" class="LineNr">523 </span> <span class="PreProc">var</span> expected/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> s
<span id="L524" class="LineNr">524 </span> <span class="muComment"># if curr != expected, return false</span>
<span id="L525" class="LineNr">525 </span> <span class="Delimiter">{</span>
<span id="L526" class="LineNr">526 </span> compare expected, *curr-a
<span id="L527" class="LineNr">527 </span> <span class="PreProc">break-if-=</span>
<span id="L528" class="LineNr">528 </span> <span class="PreProc">return</span> <span class="Constant">0</span>/false
<span id="L529" class="LineNr">529 </span> <span class="Delimiter">}</span>
<span id="L530" class="LineNr">530 </span> <span class="Delimiter">}</span>
<span id="L531" class="LineNr">531 </span> i <span class="Special">&lt;-</span> decrement
<span id="L532" class="LineNr">532 </span> <span class="PreProc">loop</span>
<span id="L533" class="LineNr">533 </span> <span class="Delimiter">}</span>
<span id="L534" class="LineNr">534 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L535" class="LineNr">535 </span><span class="Delimiter">}</span>
<span id="L536" class="LineNr">536 </span>
<span id="L537" class="LineNr">537 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L537'>grapheme-stack-is-decimal-integer?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L538" class="LineNr">538 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L539" class="LineNr">539 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L540" class="LineNr">540 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L541" class="LineNr">541 </span> <span class="PreProc">var</span> data/<span class="muRegEdx">edx</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L542" class="LineNr">542 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L543" class="LineNr">543 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L544" class="LineNr">544 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> copy <span class="Constant">1</span>/true
<span id="L545" class="LineNr">545 </span> $grapheme-stack-is-integer?:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
<span id="L546" class="LineNr">546 </span> compare i, *top-addr
<span id="L547" class="LineNr">547 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L548" class="LineNr">548 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L549" class="LineNr">549 </span> result <span class="Special">&lt;-</span> <a href='126write-int-decimal.subx.html#L327'>decimal-digit?</a> *g
<span id="L550" class="LineNr">550 </span> compare result, <span class="Constant">0</span>/false
<span id="L551" class="LineNr">551 </span> <span class="PreProc">break-if-=</span>
<span id="L552" class="LineNr">552 </span> i <span class="Special">&lt;-</span> increment
<span id="L553" class="LineNr">553 </span> <span class="PreProc">loop</span>
<span id="L554" class="LineNr">554 </span> <span class="Delimiter">}</span>
<span id="L555" class="LineNr">555 </span> <span class="PreProc">return</span> result
<span id="L556" class="LineNr">556 </span><span class="Delimiter">}</span>
<span id="L408" class="LineNr">408 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L409" class="LineNr">409 </span> <span class="PreProc">return</span> *top-addr
<span id="L410" class="LineNr">410 </span> <span class="Delimiter">}</span>
<span id="L411" class="LineNr">411 </span> <span class="muComment"># if cursor is not '(' return</span>
<span id="L412" class="LineNr">412 </span> i <span class="Special">&lt;-</span> decrement
<span id="L413" class="LineNr">413 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L414" class="LineNr">414 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L415" class="LineNr">415 </span> <span class="Delimiter">{</span>
<span id="L416" class="LineNr">416 </span> <span class="PreProc">break-if-=</span>
<span id="L417" class="LineNr">417 </span> <span class="PreProc">return</span> *top-addr
<span id="L418" class="LineNr">418 </span> <span class="Delimiter">}</span>
<span id="L419" class="LineNr">419 </span> <span class="muComment"># otherwise scan to matching paren</span>
<span id="L420" class="LineNr">420 </span> <span class="PreProc">var</span> paren-count/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">1</span>
<span id="L421" class="LineNr">421 </span> i <span class="Special">&lt;-</span> decrement
<span id="L422" class="LineNr">422 </span> <span class="Delimiter">{</span>
<span id="L423" class="LineNr">423 </span> compare i, <span class="Constant">0</span>
<span id="L424" class="LineNr">424 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L425" class="LineNr">425 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L426" class="LineNr">426 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L427" class="LineNr">427 </span> <span class="Delimiter">{</span>
<span id="L428" class="LineNr">428 </span> <span class="PreProc">break-if-!=</span>
<span id="L429" class="LineNr">429 </span> paren-count <span class="Special">&lt;-</span> increment
<span id="L430" class="LineNr">430 </span> <span class="Delimiter">}</span>
<span id="L431" class="LineNr">431 </span> compare *g, <span class="Constant">0x29</span>/close-paren
<span id="L432" class="LineNr">432 </span> <span class="Delimiter">{</span>
<span id="L433" class="LineNr">433 </span> <span class="PreProc">break-if-!=</span>
<span id="L434" class="LineNr">434 </span> compare paren-count, <span class="Constant">1</span>
<span id="L435" class="LineNr">435 </span> <span class="Delimiter">{</span>
<span id="L436" class="LineNr">436 </span> <span class="PreProc">break-if-!=</span>
<span id="L437" class="LineNr">437 </span> <span class="PreProc">return</span> i
<span id="L438" class="LineNr">438 </span> <span class="Delimiter">}</span>
<span id="L439" class="LineNr">439 </span> paren-count <span class="Special">&lt;-</span> decrement
<span id="L440" class="LineNr">440 </span> <span class="Delimiter">}</span>
<span id="L441" class="LineNr">441 </span> i <span class="Special">&lt;-</span> decrement
<span id="L442" class="LineNr">442 </span> <span class="PreProc">loop</span>
<span id="L443" class="LineNr">443 </span> <span class="Delimiter">}</span>
<span id="L444" class="LineNr">444 </span> <span class="PreProc">return</span> *top-addr
<span id="L445" class="LineNr">445 </span><span class="Delimiter">}</span>
<span id="L446" class="LineNr">446 </span>
<span id="L447" class="LineNr">447 </span><span class="muComment"># return the index of the first open-paren at the given depth</span>
<span id="L448" class="LineNr">448 </span><span class="muComment"># or top index if there's no matching close-paren</span>
<span id="L449" class="LineNr">449 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L449'>get-matching-open-paren-index</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), control: boolean, depth: int<span class="PreProc"> -&gt; </span>_/<span class="muRegEdx">edx</span>: int <span class="Delimiter">{</span>
<span id="L450" class="LineNr">450 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L451" class="LineNr">451 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L452" class="LineNr">452 </span> <span class="muComment"># if not rendering cursor, return</span>
<span id="L453" class="LineNr">453 </span> compare control, <span class="Constant">0</span>/false
<span id="L454" class="LineNr">454 </span> <span class="Delimiter">{</span>
<span id="L455" class="LineNr">455 </span> <span class="PreProc">break-if-!=</span>
<span id="L456" class="LineNr">456 </span> <span class="PreProc">return</span> *top-addr
<span id="L457" class="LineNr">457 </span> <span class="Delimiter">}</span>
<span id="L458" class="LineNr">458 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L459" class="LineNr">459 </span> <span class="PreProc">var</span> data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L460" class="LineNr">460 </span> <span class="PreProc">var</span> i/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L461" class="LineNr">461 </span> <span class="muComment"># if stack is empty, return</span>
<span id="L462" class="LineNr">462 </span> compare i, <span class="Constant">0</span>
<span id="L463" class="LineNr">463 </span> <span class="Delimiter">{</span>
<span id="L464" class="LineNr">464 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L465" class="LineNr">465 </span> <span class="PreProc">return</span> *top-addr
<span id="L466" class="LineNr">466 </span> <span class="Delimiter">}</span>
<span id="L467" class="LineNr">467 </span> <span class="muComment"># scan to matching open paren</span>
<span id="L468" class="LineNr">468 </span> <span class="PreProc">var</span> paren-count/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L469" class="LineNr">469 </span> i <span class="Special">&lt;-</span> decrement
<span id="L470" class="LineNr">470 </span> <span class="Delimiter">{</span>
<span id="L471" class="LineNr">471 </span> compare i, <span class="Constant">0</span>
<span id="L472" class="LineNr">472 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L473" class="LineNr">473 </span> <span class="PreProc">var</span> g/<span class="muRegEsi">esi</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L474" class="LineNr">474 </span> compare *g, <span class="Constant">0x29</span>/close-paren
<span id="L475" class="LineNr">475 </span> <span class="Delimiter">{</span>
<span id="L476" class="LineNr">476 </span> <span class="PreProc">break-if-!=</span>
<span id="L477" class="LineNr">477 </span> paren-count <span class="Special">&lt;-</span> increment
<span id="L478" class="LineNr">478 </span> <span class="Delimiter">}</span>
<span id="L479" class="LineNr">479 </span> compare *g, <span class="Constant">0x28</span>/open-paren
<span id="L480" class="LineNr">480 </span> <span class="Delimiter">{</span>
<span id="L481" class="LineNr">481 </span> <span class="PreProc">break-if-!=</span>
<span id="L482" class="LineNr">482 </span> compare paren-count, depth
<span id="L483" class="LineNr">483 </span> <span class="Delimiter">{</span>
<span id="L484" class="LineNr">484 </span> <span class="PreProc">break-if-!=</span>
<span id="L485" class="LineNr">485 </span> <span class="PreProc">return</span> i
<span id="L486" class="LineNr">486 </span> <span class="Delimiter">}</span>
<span id="L487" class="LineNr">487 </span> paren-count <span class="Special">&lt;-</span> decrement
<span id="L488" class="LineNr">488 </span> <span class="Delimiter">}</span>
<span id="L489" class="LineNr">489 </span> i <span class="Special">&lt;-</span> decrement
<span id="L490" class="LineNr">490 </span> <span class="PreProc">loop</span>
<span id="L491" class="LineNr">491 </span> <span class="Delimiter">}</span>
<span id="L492" class="LineNr">492 </span> <span class="PreProc">return</span> *top-addr
<span id="L493" class="LineNr">493 </span><span class="Delimiter">}</span>
<span id="L494" class="LineNr">494 </span>
<span id="L495" class="LineNr">495 </span><span class="muComment"># compare from bottom</span>
<span id="L496" class="LineNr">496 </span><span class="muComment"># beware: modifies 'stream', which must be disposed of after a false result</span>
<span id="L497" class="LineNr">497 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L497'>prefix-match?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L498" class="LineNr">498 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L499" class="LineNr">499 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdi">edi</span>: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L500" class="LineNr">500 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L501" class="LineNr">501 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L502" class="LineNr">502 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L503" class="LineNr">503 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L504" class="LineNr">504 </span> <span class="Delimiter">{</span>
<span id="L505" class="LineNr">505 </span> compare i, *top-addr
<span id="L506" class="LineNr">506 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L507" class="LineNr">507 </span> <span class="muComment"># if curr != expected, return false</span>
<span id="L508" class="LineNr">508 </span> <span class="Delimiter">{</span>
<span id="L509" class="LineNr">509 </span> <span class="PreProc">var</span> curr-a/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L510" class="LineNr">510 </span> <span class="PreProc">var</span> expected/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> s
<span id="L511" class="LineNr">511 </span> <span class="Delimiter">{</span>
<span id="L512" class="LineNr">512 </span> compare expected, *curr-a
<span id="L513" class="LineNr">513 </span> <span class="PreProc">break-if-=</span>
<span id="L514" class="LineNr">514 </span> <span class="PreProc">return</span> <span class="Constant">0</span>/false
<span id="L515" class="LineNr">515 </span> <span class="Delimiter">}</span>
<span id="L516" class="LineNr">516 </span> <span class="Delimiter">}</span>
<span id="L517" class="LineNr">517 </span> i <span class="Special">&lt;-</span> increment
<span id="L518" class="LineNr">518 </span> <span class="PreProc">loop</span>
<span id="L519" class="LineNr">519 </span> <span class="Delimiter">}</span>
<span id="L520" class="LineNr">520 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L521" class="LineNr">521 </span><span class="Delimiter">}</span>
<span id="L522" class="LineNr">522 </span>
<span id="L523" class="LineNr">523 </span><span class="muComment"># compare from bottom</span>
<span id="L524" class="LineNr">524 </span><span class="muComment"># beware: modifies 'stream', which must be disposed of after a false result</span>
<span id="L525" class="LineNr">525 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L525'>suffix-match?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>), s: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L526" class="LineNr">526 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L527" class="LineNr">527 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdi">edi</span>: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L528" class="LineNr">528 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L529" class="LineNr">529 </span> <span class="PreProc">var</span> data/<span class="muRegEdi">edi</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L530" class="LineNr">530 </span> <span class="PreProc">var</span> top-addr/eax: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L531" class="LineNr">531 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L532" class="LineNr">532 </span> i <span class="Special">&lt;-</span> decrement
<span id="L533" class="LineNr">533 </span> <span class="Delimiter">{</span>
<span id="L534" class="LineNr">534 </span> compare i, <span class="Constant">0</span>
<span id="L535" class="LineNr">535 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L536" class="LineNr">536 </span> <span class="Delimiter">{</span>
<span id="L537" class="LineNr">537 </span> <span class="PreProc">var</span> curr-a/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L538" class="LineNr">538 </span> <span class="PreProc">var</span> expected/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> s
<span id="L539" class="LineNr">539 </span> <span class="muComment"># if curr != expected, return false</span>
<span id="L540" class="LineNr">540 </span> <span class="Delimiter">{</span>
<span id="L541" class="LineNr">541 </span> compare expected, *curr-a
<span id="L542" class="LineNr">542 </span> <span class="PreProc">break-if-=</span>
<span id="L543" class="LineNr">543 </span> <span class="PreProc">return</span> <span class="Constant">0</span>/false
<span id="L544" class="LineNr">544 </span> <span class="Delimiter">}</span>
<span id="L545" class="LineNr">545 </span> <span class="Delimiter">}</span>
<span id="L546" class="LineNr">546 </span> i <span class="Special">&lt;-</span> decrement
<span id="L547" class="LineNr">547 </span> <span class="PreProc">loop</span>
<span id="L548" class="LineNr">548 </span> <span class="Delimiter">}</span>
<span id="L549" class="LineNr">549 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span class="muComment"># true</span>
<span id="L550" class="LineNr">550 </span><span class="Delimiter">}</span>
<span id="L551" class="LineNr">551 </span>
<span id="L552" class="LineNr">552 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='513grapheme-stack.mu.html#L552'>grapheme-stack-is-decimal-integer?</a></span> _self: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L553" class="LineNr">553 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L554" class="LineNr">554 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle array grapheme) <span class="Special">&lt;-</span> get self, data
<span id="L555" class="LineNr">555 </span> <span class="PreProc">var</span> _data/eax: (addr array grapheme) <span class="Special">&lt;-</span> <a href='120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L556" class="LineNr">556 </span> <span class="PreProc">var</span> data/<span class="muRegEdx">edx</span>: (addr array grapheme) <span class="Special">&lt;-</span> copy _data
<span id="L557" class="LineNr">557 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L558" class="LineNr">558 </span> <span class="PreProc">var</span> i/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L559" class="LineNr">559 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> copy <span class="Constant">1</span>/true
<span id="L560" class="LineNr">560 </span> $grapheme-stack-is-integer?:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
<span id="L561" class="LineNr">561 </span> compare i, *top-addr
<span id="L562" class="LineNr">562 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L563" class="LineNr">563 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L564" class="LineNr">564 </span> result <span class="Special">&lt;-</span> <a href='126write-int-decimal.subx.html#L327'>decimal-digit?</a> *g
<span id="L565" class="LineNr">565 </span> compare result, <span class="Constant">0</span>/false
<span id="L566" class="LineNr">566 </span> <span class="PreProc">break-if-=</span>
<span id="L567" class="LineNr">567 </span> i <span class="Special">&lt;-</span> increment
<span id="L568" class="LineNr">568 </span> <span class="PreProc">loop</span>
<span id="L569" class="LineNr">569 </span> <span class="Delimiter">}</span>
<span id="L570" class="LineNr">570 </span> <span class="PreProc">return</span> result
<span id="L571" class="LineNr">571 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

View File

@ -123,7 +123,7 @@ if ('onhashchange' in window) {
<span id="L59" class="LineNr"> 59 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> input-stream
<span id="L60" class="LineNr"> 60 </span> compare done?, <span class="Constant">0</span>/false
<span id="L61" class="LineNr"> 61 </span> <span class="PreProc">break-if-!=</span>
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> input-stream
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='403unicode.mu.html#L236'>read-grapheme</a> input-stream
<span id="L63" class="LineNr"> 63 </span> <a href='514gap-buffer.mu.html#L441'>add-grapheme-at-gap</a> self, g
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">loop</span>
<span id="L65" class="LineNr"> 65 </span> <span class="Delimiter">}</span>
@ -169,7 +169,7 @@ if ('onhashchange' in window) {
<span id="L105" class="LineNr"> 105 </span> compare i, *top-addr
<span id="L106" class="LineNr"> 106 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L107" class="LineNr"> 107 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L108" class="LineNr"> 108 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> out, *g
<span id="L108" class="LineNr"> 108 </span> <a href='403unicode.mu.html#L339'>write-grapheme</a> out, *g
<span id="L109" class="LineNr"> 109 </span> i <span class="Special">&lt;-</span> increment
<span id="L110" class="LineNr"> 110 </span> <span class="PreProc">loop</span>
<span id="L111" class="LineNr"> 111 </span> <span class="Delimiter">}</span>
@ -188,7 +188,7 @@ if ('onhashchange' in window) {
<span id="L124" class="LineNr"> 124 </span> compare i, <span class="Constant">0</span>
<span id="L125" class="LineNr"> 125 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L126" class="LineNr"> 126 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L127" class="LineNr"> 127 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> out, *g
<span id="L127" class="LineNr"> 127 </span> <a href='403unicode.mu.html#L339'>write-grapheme</a> out, *g
<span id="L128" class="LineNr"> 128 </span> i <span class="Special">&lt;-</span> decrement
<span id="L129" class="LineNr"> 129 </span> <span class="PreProc">loop</span>
<span id="L130" class="LineNr"> 130 </span> <span class="Delimiter">}</span>
@ -370,7 +370,7 @@ if ('onhashchange' in window) {
<span id="L306" class="LineNr"> 306 </span> compare i, *top-addr
<span id="L307" class="LineNr"> 307 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L308" class="LineNr"> 308 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L309" class="LineNr"> 309 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> out, *g
<span id="L309" class="LineNr"> 309 </span> <a href='403unicode.mu.html#L339'>write-grapheme</a> out, *g
<span id="L310" class="LineNr"> 310 </span> i <span class="Special">&lt;-</span> increment
<span id="L311" class="LineNr"> 311 </span> <span class="PreProc">loop</span>
<span id="L312" class="LineNr"> 312 </span> <span class="Delimiter">}</span>
@ -390,7 +390,7 @@ if ('onhashchange' in window) {
<span id="L326" class="LineNr"> 326 </span> compare i, end
<span id="L327" class="LineNr"> 327 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L328" class="LineNr"> 328 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: (addr grapheme) <span class="Special">&lt;-</span> index data, i
<span id="L329" class="LineNr"> 329 </span> <a href='403unicode.mu.html#L176'>write-grapheme</a> out, *g
<span id="L329" class="LineNr"> 329 </span> <a href='403unicode.mu.html#L339'>write-grapheme</a> out, *g
<span id="L330" class="LineNr"> 330 </span> i <span class="Special">&lt;-</span> decrement
<span id="L331" class="LineNr"> 331 </span> <span class="PreProc">loop</span>
<span id="L332" class="LineNr"> 332 </span> <span class="Delimiter">}</span>
@ -457,7 +457,7 @@ if ('onhashchange' in window) {
<span id="L393" class="LineNr"> 393 </span> <span class="PreProc">var</span> y2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L394" class="LineNr"> 394 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L87'>render-stack-from-bottom-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, left, xmin, ymin, xmax, ymax, xmin, ymin, <a href='514gap-buffer.mu.html#L943'>highlight-matching-open-paren?</a>, matching-open-paren-depth, color, background-color
<span id="L395" class="LineNr"> 395 </span> <span class="PreProc">var</span> right/<span class="muRegEdx">edx</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> get gap, right
<span id="L396" class="LineNr"> 396 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L138'>render-stack-from-top-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, right, xmin, ymin, xmax, ymax, x2, y2, render-cursor?, color, background-color
<span id="L396" class="LineNr"> 396 </span> x2, y2 <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L143'>render-stack-from-top-wrapping-right-then-down</a> <a href='500fake-screen.mu.html#L14'>screen</a>, right, xmin, ymin, xmax, ymax, x2, y2, render-cursor?, color, background-color
<span id="L397" class="LineNr"> 397 </span> <span class="muComment"># decide whether we still need to print a cursor</span>
<span id="L398" class="LineNr"> 398 </span> <span class="PreProc">var</span> fg/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy color
<span id="L399" class="LineNr"> 399 </span> <span class="PreProc">var</span> bg/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy background-color
@ -473,15 +473,15 @@ if ('onhashchange' in window) {
<span id="L409" class="LineNr"> 409 </span> bg <span class="Special">&lt;-</span> copy color
<span id="L410" class="LineNr"> 410 </span> <span class="Delimiter">}</span>
<span id="L411" class="LineNr"> 411 </span> <span class="muComment"># print a grapheme either way so that cursor position doesn't affect printed width</span>
<span id="L412" class="LineNr"> 412 </span> <span class="PreProc">var</span> space/<span class="muRegEdx">edx</span>: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L413" class="LineNr"> 413 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L148'>render-grapheme</a> <a href='500fake-screen.mu.html#L14'>screen</a>, space, xmin, ymin, xmax, ymax, x2, y2, fg, bg
<span id="L412" class="LineNr"> 412 </span> <span class="PreProc">var</span> space/<span class="muRegEdx">edx</span>: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L413" class="LineNr"> 413 </span> x2, y2 <span class="Special">&lt;-</span> <a href='501draw-text.mu.html#L155'>render-code-point</a> <a href='500fake-screen.mu.html#L14'>screen</a>, space, xmin, ymin, xmax, ymax, x2, y2, fg, bg
<span id="L414" class="LineNr"> 414 </span> <span class="PreProc">return</span> x2, y2
<span id="L415" class="LineNr"> 415 </span><span class="Delimiter">}</span>
<span id="L416" class="LineNr"> 416 </span>
<span id="L417" class="LineNr"> 417 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a></span> <a href='500fake-screen.mu.html#L14'>screen</a>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>), gap: (addr <a href='514gap-buffer.mu.html#L3'>gap-buffer</a>), x: int, y: int, render-cursor?: boolean, color: int, background-color: int<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L418" class="LineNr"> 418 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L419" class="LineNr"> 419 </span> <span class="PreProc">var</span> _height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L420" class="LineNr"> 420 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L86'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L420" class="LineNr"> 420 </span> _width, _height <span class="Special">&lt;-</span> <a href='500fake-screen.mu.html#L73'>screen-size</a> <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L421" class="LineNr"> 421 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L422" class="LineNr"> 422 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy _height
<span id="L423" class="LineNr"> 423 </span> <span class="PreProc">var</span> x2/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
@ -650,7 +650,7 @@ if ('onhashchange' in window) {
<span id="L586" class="LineNr"> 586 </span> <a href='108write.subx.html#L11'>write</a> expected-stream, s
<span id="L587" class="LineNr"> 587 </span> <span class="muComment"># compare left</span>
<span id="L588" class="LineNr"> 588 </span> <span class="PreProc">var</span> left/<span class="muRegEdx">edx</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> get self, left
<span id="L589" class="LineNr"> 589 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L482'>prefix-match?</a> left, expected-stream
<span id="L589" class="LineNr"> 589 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L497'>prefix-match?</a> left, expected-stream
<span id="L590" class="LineNr"> 590 </span> compare result, <span class="Constant">0</span>/false
<span id="L591" class="LineNr"> 591 </span> <span class="Delimiter">{</span>
<span id="L592" class="LineNr"> 592 </span> <span class="PreProc">break-if-!=</span>
@ -658,7 +658,7 @@ if ('onhashchange' in window) {
<span id="L594" class="LineNr"> 594 </span> <span class="Delimiter">}</span>
<span id="L595" class="LineNr"> 595 </span> <span class="muComment"># compare right</span>
<span id="L596" class="LineNr"> 596 </span> <span class="PreProc">var</span> right/<span class="muRegEdx">edx</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> get self, right
<span id="L597" class="LineNr"> 597 </span> result <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L510'>suffix-match?</a> right, expected-stream
<span id="L597" class="LineNr"> 597 </span> result <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L525'>suffix-match?</a> right, expected-stream
<span id="L598" class="LineNr"> 598 </span> compare result, <span class="Constant">0</span>/false
<span id="L599" class="LineNr"> 599 </span> <span class="Delimiter">{</span>
<span id="L600" class="LineNr"> 600 </span> <span class="PreProc">break-if-!=</span>
@ -866,12 +866,12 @@ if ('onhashchange' in window) {
<span id="L802" class="LineNr"> 802 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='514gap-buffer.mu.html#L802'>gap-buffer-is-decimal-integer?</a></span> _self: (addr <a href='514gap-buffer.mu.html#L3'>gap-buffer</a>)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
<span id="L803" class="LineNr"> 803 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> copy _self
<span id="L804" class="LineNr"> 804 </span> <span class="PreProc">var</span> curr/<span class="muRegEcx">ecx</span>: (addr <a href='513grapheme-stack.mu.html#L3'>grapheme-stack</a>) <span class="Special">&lt;-</span> get self, left
<span id="L805" class="LineNr"> 805 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L537'>grapheme-stack-is-decimal-integer?</a> curr
<span id="L805" class="LineNr"> 805 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L552'>grapheme-stack-is-decimal-integer?</a> curr
<span id="L806" class="LineNr"> 806 </span> <span class="Delimiter">{</span>
<span id="L807" class="LineNr"> 807 </span> compare result, <span class="Constant">0</span>/false
<span id="L808" class="LineNr"> 808 </span> <span class="PreProc">break-if-=</span>
<span id="L809" class="LineNr"> 809 </span> curr <span class="Special">&lt;-</span> get self, right
<span id="L810" class="LineNr"> 810 </span> result <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L537'>grapheme-stack-is-decimal-integer?</a> curr
<span id="L810" class="LineNr"> 810 </span> result <span class="Special">&lt;-</span> <a href='513grapheme-stack.mu.html#L552'>grapheme-stack-is-decimal-integer?</a> curr
<span id="L811" class="LineNr"> 811 </span> <span class="Delimiter">}</span>
<span id="L812" class="LineNr"> 812 </span> <span class="PreProc">return</span> result
<span id="L813" class="LineNr"> 813 </span><span class="Delimiter">}</span>
@ -882,15 +882,15 @@ if ('onhashchange' in window) {
<span id="L818" class="LineNr"> 818 </span> <span class="PreProc">var</span> gap/<span class="muRegEsi">esi</span>: (addr <a href='514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> address gap-storage
<span id="L819" class="LineNr"> 819 </span> <a href='514gap-buffer.mu.html#L53'>initialize-gap-buffer-with</a> gap, <span class="Constant">&quot;abc&quot;</span>
<span id="L820" class="LineNr"> 820 </span> <span class="muComment"># setup: screen</span>
<span id="L821" class="LineNr"> 821 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L822" class="LineNr"> 822 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L823" class="LineNr"> 823 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L821" class="LineNr"> 821 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L822" class="LineNr"> 822 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L823" class="LineNr"> 823 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L824" class="LineNr"> 824 </span> <span class="muComment">#</span>
<span id="L825" class="LineNr"> 825 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">0</span>/no-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L826" class="LineNr"> 826 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-without-cursor&quot;</span>
<span id="L827" class="LineNr"> 827 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L815'>test-render-gap-buffer-without-cursor</a>: result&quot;</span>
<span id="L828" class="LineNr"> 828 </span> <span class="muComment"># abc</span>
<span id="L829" class="LineNr"> 829 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L815'>test-render-gap-buffer-without-cursor</a>: bg&quot;</span>
<span id="L829" class="LineNr"> 829 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L815'>test-render-gap-buffer-without-cursor</a>: bg&quot;</span>
<span id="L830" class="LineNr"> 830 </span><span class="Delimiter">}</span>
<span id="L831" class="LineNr"> 831 </span>
<span id="L832" class="LineNr"> 832 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L832'>test-render-gap-buffer-with-cursor-at-end</a></span> <span class="Delimiter">{</span>
@ -900,16 +900,16 @@ if ('onhashchange' in window) {
<span id="L836" class="LineNr"> 836 </span> <a href='514gap-buffer.mu.html#L53'>initialize-gap-buffer-with</a> gap, <span class="Constant">&quot;abc&quot;</span>
<span id="L837" class="LineNr"> 837 </span> <a href='514gap-buffer.mu.html#L460'>gap-to-end</a> gap
<span id="L838" class="LineNr"> 838 </span> <span class="muComment"># setup: screen</span>
<span id="L839" class="LineNr"> 839 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L840" class="LineNr"> 840 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L841" class="LineNr"> 841 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L839" class="LineNr"> 839 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L840" class="LineNr"> 840 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L841" class="LineNr"> 841 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L842" class="LineNr"> 842 </span> <span class="muComment">#</span>
<span id="L843" class="LineNr"> 843 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L844" class="LineNr"> 844 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-with-cursor-at-end&quot;</span>
<span id="L845" class="LineNr"> 845 </span> <span class="muComment"># we've drawn one extra grapheme for the cursor</span>
<span id="L846" class="LineNr"> 846 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L832'>test-render-gap-buffer-with-cursor-at-end</a>: result&quot;</span>
<span id="L847" class="LineNr"> 847 </span> <span class="muComment"># abc</span>
<span id="L848" class="LineNr"> 848 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; |&quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L832'>test-render-gap-buffer-with-cursor-at-end</a>: bg&quot;</span>
<span id="L848" class="LineNr"> 848 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; |&quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L832'>test-render-gap-buffer-with-cursor-at-end</a>: bg&quot;</span>
<span id="L849" class="LineNr"> 849 </span><span class="Delimiter">}</span>
<span id="L850" class="LineNr"> 850 </span>
<span id="L851" class="LineNr"> 851 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L851'>test-render-gap-buffer-with-cursor-in-middle</a></span> <span class="Delimiter">{</span>
@ -920,15 +920,15 @@ if ('onhashchange' in window) {
<span id="L856" class="LineNr"> 856 </span> <a href='514gap-buffer.mu.html#L460'>gap-to-end</a> gap
<span id="L857" class="LineNr"> 857 </span> <span class="PreProc">var</span> dummy/eax: grapheme <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L496'>gap-left</a> gap
<span id="L858" class="LineNr"> 858 </span> <span class="muComment"># setup: screen</span>
<span id="L859" class="LineNr"> 859 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L860" class="LineNr"> 860 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L861" class="LineNr"> 861 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L859" class="LineNr"> 859 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L860" class="LineNr"> 860 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L861" class="LineNr"> 861 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L862" class="LineNr"> 862 </span> <span class="muComment">#</span>
<span id="L863" class="LineNr"> 863 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L864" class="LineNr"> 864 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-with-cursor-in-middle&quot;</span>
<span id="L865" class="LineNr"> 865 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L851'>test-render-gap-buffer-with-cursor-in-middle</a>: result&quot;</span>
<span id="L866" class="LineNr"> 866 </span> <span class="muComment"># abc</span>
<span id="L867" class="LineNr"> 867 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L851'>test-render-gap-buffer-with-cursor-in-middle</a>: bg&quot;</span>
<span id="L867" class="LineNr"> 867 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L851'>test-render-gap-buffer-with-cursor-in-middle</a>: bg&quot;</span>
<span id="L868" class="LineNr"> 868 </span><span class="Delimiter">}</span>
<span id="L869" class="LineNr"> 869 </span>
<span id="L870" class="LineNr"> 870 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L870'>test-render-gap-buffer-with-cursor-at-start</a></span> <span class="Delimiter">{</span>
@ -937,15 +937,15 @@ if ('onhashchange' in window) {
<span id="L873" class="LineNr"> 873 </span> <a href='514gap-buffer.mu.html#L53'>initialize-gap-buffer-with</a> gap, <span class="Constant">&quot;abc&quot;</span>
<span id="L874" class="LineNr"> 874 </span> <a href='514gap-buffer.mu.html#L452'>gap-to-start</a> gap
<span id="L875" class="LineNr"> 875 </span> <span class="muComment"># setup: screen</span>
<span id="L876" class="LineNr"> 876 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L877" class="LineNr"> 877 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L878" class="LineNr"> 878 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L876" class="LineNr"> 876 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L877" class="LineNr"> 877 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L878" class="LineNr"> 878 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L879" class="LineNr"> 879 </span> <span class="muComment">#</span>
<span id="L880" class="LineNr"> 880 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L881" class="LineNr"> 881 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;abc &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-with-cursor-at-start&quot;</span>
<span id="L882" class="LineNr"> 882 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L870'>test-render-gap-buffer-with-cursor-at-start</a>: result&quot;</span>
<span id="L883" class="LineNr"> 883 </span> <span class="muComment"># abc</span>
<span id="L884" class="LineNr"> 884 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L870'>test-render-gap-buffer-with-cursor-at-start</a>: bg&quot;</span>
<span id="L884" class="LineNr"> 884 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L870'>test-render-gap-buffer-with-cursor-at-start</a>: bg&quot;</span>
<span id="L885" class="LineNr"> 885 </span><span class="Delimiter">}</span>
<span id="L886" class="LineNr"> 886 </span>
<span id="L887" class="LineNr"> 887 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a></span> <span class="Delimiter">{</span>
@ -954,15 +954,15 @@ if ('onhashchange' in window) {
<span id="L890" class="LineNr"> 890 </span> <a href='514gap-buffer.mu.html#L53'>initialize-gap-buffer-with</a> gap, <span class="Constant">&quot;(a)&quot;</span>
<span id="L891" class="LineNr"> 891 </span> <a href='514gap-buffer.mu.html#L452'>gap-to-start</a> gap
<span id="L892" class="LineNr"> 892 </span> <span class="muComment"># setup: screen</span>
<span id="L893" class="LineNr"> 893 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L894" class="LineNr"> 894 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L895" class="LineNr"> 895 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L893" class="LineNr"> 893 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L894" class="LineNr"> 894 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L895" class="LineNr"> 895 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L896" class="LineNr"> 896 </span> <span class="muComment">#</span>
<span id="L897" class="LineNr"> 897 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L898" class="LineNr"> 898 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;(a) &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-highlight-matching-close-paren&quot;</span>
<span id="L899" class="LineNr"> 899 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a>: result&quot;</span>
<span id="L900" class="LineNr"> 900 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a>: cursor&quot;</span>
<span id="L901" class="LineNr"> 901 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a>: matching paren&quot;</span>
<span id="L900" class="LineNr"> 900 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot;| &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a>: cursor&quot;</span>
<span id="L901" class="LineNr"> 901 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot; ) &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L887'>test-render-gap-buffer-highlight-matching-close-paren</a>: matching paren&quot;</span>
<span id="L902" class="LineNr"> 902 </span><span class="Delimiter">}</span>
<span id="L903" class="LineNr"> 903 </span>
<span id="L904" class="LineNr"> 904 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a></span> <span class="Delimiter">{</span>
@ -972,15 +972,15 @@ if ('onhashchange' in window) {
<span id="L908" class="LineNr"> 908 </span> <a href='514gap-buffer.mu.html#L460'>gap-to-end</a> gap
<span id="L909" class="LineNr"> 909 </span> <span class="PreProc">var</span> dummy/eax: grapheme <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L496'>gap-left</a> gap
<span id="L910" class="LineNr"> 910 </span> <span class="muComment"># setup: screen</span>
<span id="L911" class="LineNr"> 911 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L912" class="LineNr"> 912 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L913" class="LineNr"> 913 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L911" class="LineNr"> 911 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L912" class="LineNr"> 912 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L913" class="LineNr"> 913 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L914" class="LineNr"> 914 </span> <span class="muComment">#</span>
<span id="L915" class="LineNr"> 915 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L916" class="LineNr"> 916 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;(a) &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-highlight-matching-open-paren&quot;</span>
<span id="L917" class="LineNr"> 917 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a>: result&quot;</span>
<span id="L918" class="LineNr"> 918 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a>: cursor&quot;</span>
<span id="L919" class="LineNr"> 919 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a>: matching paren&quot;</span>
<span id="L918" class="LineNr"> 918 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a>: cursor&quot;</span>
<span id="L919" class="LineNr"> 919 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L904'>test-render-gap-buffer-highlight-matching-open-paren</a>: matching paren&quot;</span>
<span id="L920" class="LineNr"> 920 </span><span class="Delimiter">}</span>
<span id="L921" class="LineNr"> 921 </span>
<span id="L922" class="LineNr"> 922 </span><span class="PreProc">fn</span> <span class="muTest"><a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a></span> <span class="Delimiter">{</span>
@ -989,15 +989,15 @@ if ('onhashchange' in window) {
<span id="L925" class="LineNr"> 925 </span> <a href='514gap-buffer.mu.html#L53'>initialize-gap-buffer-with</a> gap, <span class="Constant">&quot;(a)&quot;</span>
<span id="L926" class="LineNr"> 926 </span> <a href='514gap-buffer.mu.html#L460'>gap-to-end</a> gap
<span id="L927" class="LineNr"> 927 </span> <span class="muComment"># setup: screen</span>
<span id="L928" class="LineNr"> 928 </span> <span class="PreProc">var</span> screen-on-stack: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L929" class="LineNr"> 929 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L930" class="LineNr"> 930 </span> <a href='500fake-screen.mu.html#L33'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L928" class="LineNr"> 928 </span> <span class="PreProc">var</span> screen-storage: <a href='500fake-screen.mu.html#L14'>screen</a>
<span id="L929" class="LineNr"> 929 </span> <span class="PreProc">var</span> <a href='500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-storage
<span id="L930" class="LineNr"> 930 </span> <a href='500fake-screen.mu.html#L32'>initialize-screen</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>, <span class="Constant">4</span>, <span class="Constant">0</span>/no-pixel-graphics
<span id="L931" class="LineNr"> 931 </span> <span class="muComment">#</span>
<span id="L932" class="LineNr"> 932 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='514gap-buffer.mu.html#L417'>render-gap-buffer</a> <a href='500fake-screen.mu.html#L14'>screen</a>, gap, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">1</span>/show-cursor, <span class="Constant">3</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L933" class="LineNr"> 933 </span> <a href='504test-screen.mu.html#L7'>check-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot;(a) &quot;</span>, <span class="Constant">&quot;F - test-render-gap-buffer-highlight-matching-open-paren-of-end&quot;</span>
<span id="L934" class="LineNr"> 934 </span> <a href='502test.mu.html#L2'>check-ints-equal</a> x, <span class="Constant">4</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a>: result&quot;</span>
<span id="L935" class="LineNr"> 935 </span> <a href='504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; |&quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a>: cursor&quot;</span>
<span id="L936" class="LineNr"> 936 </span> <a href='504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a>: matching paren&quot;</span>
<span id="L935" class="LineNr"> 935 </span> <a href='504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">3</span>/bg=reverse, <span class="Constant">0</span>/y, <span class="Constant">&quot; |&quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a>: cursor&quot;</span>
<span id="L936" class="LineNr"> 936 </span> <a href='504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/fg=highlight, <span class="Constant">0</span>/y, <span class="Constant">&quot;( &quot;</span>, <span class="Constant">&quot;F - <a href='514gap-buffer.mu.html#L922'>test-render-gap-buffer-highlight-matching-open-paren-of-end</a>: matching paren&quot;</span>
<span id="L937" class="LineNr"> 937 </span><span class="Delimiter">}</span>
<span id="L938" class="LineNr"> 938 </span>
<span id="L939" class="LineNr"> 939 </span><span class="muComment"># should I highlight a matching open paren? And if so, at what depth from top of left?</span>

View File

@ -66,17 +66,17 @@ if ('onhashchange' in window) {
<span id="L3" class="LineNr"> 3 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='color-game.mu.html#L3'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> second-buffer: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> second-screen/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address second-buffer
<span id="L6" class="LineNr"> 6 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> second-screen, <span class="Constant">0x80</span>, <span class="Constant">0x30</span>, <span class="Constant">1</span>/include-pixels
<span id="L6" class="LineNr"> 6 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> second-screen, <span class="Constant">0x80</span>, <span class="Constant">0x30</span>, <span class="Constant">1</span>/include-pixels
<span id="L7" class="LineNr"> 7 </span> <span class="PreProc">var</span> leftx/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0x80</span>
<span id="L8" class="LineNr"> 8 </span> <span class="PreProc">var</span> rightx/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0x380</span>
<span id="L9" class="LineNr"> 9 </span> <span class="Delimiter">{</span>
<span id="L10" class="LineNr">10 </span> compare leftx, rightx
<span id="L11" class="LineNr">11 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L12" class="LineNr">12 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> second-screen
<span id="L12" class="LineNr">12 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> second-screen
<span id="L13" class="LineNr">13 </span> <span class="muComment"># interesting value: 9/blue with 0xe/yellow</span>
<span id="L14" class="LineNr">14 </span> <a href='color-game.mu.html#L31'>color-field</a> second-screen, leftx <span class="Constant">0x40</span>/y, <span class="Constant">0x40</span>/width <span class="Constant">0x40</span>/height, <span class="Constant">1</span>/blue
<span id="L15" class="LineNr">15 </span> <a href='color-game.mu.html#L31'>color-field</a> second-screen, rightx <span class="Constant">0x41</span>/y, <span class="Constant">0x40</span>/width <span class="Constant">0x40</span>/height, <span class="Constant">2</span>/green
<span id="L16" class="LineNr">16 </span> <a href='../500fake-screen.mu.html#L548'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L16" class="LineNr">16 </span> <a href='../500fake-screen.mu.html#L620'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L17" class="LineNr">17 </span> <span class="muComment"># on the first iteration, give everyone a chance to make their guess</span>
<span id="L18" class="LineNr">18 </span> <span class="Delimiter">{</span>
<span id="L19" class="LineNr">19 </span> compare leftx, <span class="Constant">0x80</span>
@ -104,7 +104,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr">41 </span> <span class="Delimiter">{</span>
<span id="L42" class="LineNr">42 </span> compare x, xmax
<span id="L43" class="LineNr">43 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L44" class="LineNr">44 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L44" class="LineNr">44 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L45" class="LineNr">45 </span> x <span class="Special">&lt;-</span> add <span class="Constant">2</span>
<span id="L46" class="LineNr">46 </span> <span class="PreProc">loop</span>
<span id="L47" class="LineNr">47 </span> <span class="Delimiter">}</span>
@ -116,7 +116,7 @@ if ('onhashchange' in window) {
<span id="L53" class="LineNr">53 </span> <span class="Delimiter">{</span>
<span id="L54" class="LineNr">54 </span> compare x, xmax
<span id="L55" class="LineNr">55 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L56" class="LineNr">56 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L56" class="LineNr">56 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L57" class="LineNr">57 </span> x <span class="Special">&lt;-</span> add <span class="Constant">2</span>
<span id="L58" class="LineNr">58 </span> <span class="PreProc">loop</span>
<span id="L59" class="LineNr">59 </span> <span class="Delimiter">}</span>

429
html/apps/colors.mu.html generated
View File

@ -78,11 +78,11 @@ if ('onhashchange' in window) {
<span id="L15" class="LineNr"> 15 </span> <span class="PreProc">var</span> in/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address in-storage
<span id="L16" class="LineNr"> 16 </span> <span class="Delimiter">{</span>
<span id="L17" class="LineNr"> 17 </span> <span class="muComment"># print prompt</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Enter 3 hex bytes for r, g, b (lowercase; no 0x prefix) separated by a single space&gt; &quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x28</span>/y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Enter 3 hex bytes for r, g, b (lowercase; no 0x prefix) separated by a single space&gt; &quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x28</span>/y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L19" class="LineNr"> 19 </span> <span class="muComment"># read line from keyboard</span>
<span id="L20" class="LineNr"> 20 </span> <a href='../106stream.subx.html#L20'>clear-stream</a> in
<span id="L21" class="LineNr"> 21 </span> <span class="Delimiter">{</span>
<span id="L22" class="LineNr"> 22 </span> <a href='../500fake-screen.mu.html#L237'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x20</span>/space
<span id="L22" class="LineNr"> 22 </span> <a href='../500fake-screen.mu.html#L293'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x20</span>/space
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L24" class="LineNr"> 24 </span> compare key, <span class="Constant">0xa</span>/newline
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">break-if-=</span>
@ -90,219 +90,218 @@ if ('onhashchange' in window) {
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">loop-if-=</span>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> key2/eax: int <span class="Special">&lt;-</span> copy key
<span id="L29" class="LineNr"> 29 </span> <a href='../115write-byte.subx.html#L12'>append-byte</a> in, key2
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy key2
<span id="L31" class="LineNr"> 31 </span> <a href='../501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, g, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L32" class="LineNr"> 32 </span> <a href='../501draw-text.mu.html#L16'>move-cursor-right</a> <span class="Constant">0</span>
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">loop</span>
<span id="L34" class="LineNr"> 34 </span> <span class="Delimiter">}</span>
<span id="L35" class="LineNr"> 35 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L36" class="LineNr"> 36 </span> <span class="muComment"># parse</span>
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">var</span> a/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L39" class="LineNr"> 39 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L40" class="LineNr"> 40 </span> <span class="muComment"># a, b, c = r, g, b</span>
<span id="L41" class="LineNr"> 41 </span> a, b, c <span class="Special">&lt;-</span> <a href='colors.mu.html#L65'>parse</a> in
<span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1a/y</span>
<span id="L43" class="LineNr"> 43 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, a, 7/fg, 0/bg</span>
<span id="L44" class="LineNr"> 44 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L45" class="LineNr"> 45 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, b, 7/fg, 0/bg</span>
<span id="L46" class="LineNr"> 46 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L47" class="LineNr"> 47 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, c, 7/fg, 0/bg</span>
<span id="L48" class="LineNr"> 48 </span> a, b, c <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L51'>hsl</a> a, b, c
<span id="L49" class="LineNr"> 49 </span> <span class="muComment"># return all colors in the same quadrant in h, s and l</span>
<span id="L50" class="LineNr"> 50 </span> <a href='colors.mu.html#L189'>print-nearby-colors</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, a, b, c
<span id="L51" class="LineNr"> 51 </span> <span class="muComment"># another metric</span>
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L260'>nearest-color-euclidean-hsl</a> a, b, c
<span id="L53" class="LineNr"> 53 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/x, <span class="Constant">0x26</span>/y
<span id="L54" class="LineNr"> 54 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;nearest (euclidean, h/s/l): &quot;</span>, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L55" class="LineNr"> 55 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, color, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L56" class="LineNr"> 56 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L57" class="LineNr"> 57 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/fg, color
<span id="L58" class="LineNr"> 58 </span> <span class="muComment">#</span>
<span id="L59" class="LineNr"> 59 </span> <span class="PreProc">loop</span>
<span id="L60" class="LineNr"> 60 </span> <span class="Delimiter">}</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="muComment"># read exactly 3 words in a single line</span>
<span id="L64" class="LineNr"> 64 </span><span class="muComment"># Each word consists of exactly 1 or 2 hex bytes. No hex prefix.</span>
<span id="L65" class="LineNr"> 65 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L65'>parse</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/<span class="muRegEcx">ecx</span>: int, _/<span class="muRegEdx">edx</span>: int, _/<span class="muRegEbx">ebx</span>: int <span class="Delimiter">{</span>
<span id="L66" class="LineNr"> 66 </span> <span class="muComment"># read first byte of r</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L68" class="LineNr"> 68 </span> <span class="Delimiter">{</span>
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L70" class="LineNr"> 70 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">break-if-!=</span>
<span id="L72" class="LineNr"> 72 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of r&quot;</span>
<span id="L73" class="LineNr"> 73 </span> <span class="Delimiter">}</span>
<span id="L74" class="LineNr"> 74 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L75" class="LineNr"> 75 </span> <span class="PreProc">var</span> r/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L76" class="LineNr"> 76 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x10/y</span>
<span id="L77" class="LineNr"> 77 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, r, 7/fg, 0/bg</span>
<span id="L78" class="LineNr"> 78 </span> <span class="muComment"># read second byte of r</span>
<span id="L79" class="LineNr"> 79 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<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> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L83" class="LineNr"> 83 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">break-if-=</span>
<span id="L86" class="LineNr"> 86 </span> r <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L87" class="LineNr"> 87 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L88" class="LineNr"> 88 </span><span class="CommentedCode">#? {</span>
<span id="L89" class="LineNr"> 89 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L90" class="LineNr"> 90 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x11/y</span>
<span id="L91" class="LineNr"> 91 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L92" class="LineNr"> 92 </span><span class="CommentedCode">#? }</span>
<span id="L93" class="LineNr"> 93 </span> r <span class="Special">&lt;-</span> add tmp
<span id="L94" class="LineNr"> 94 </span><span class="CommentedCode">#? {</span>
<span id="L95" class="LineNr"> 95 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x12/y</span>
<span id="L96" class="LineNr"> 96 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, r, 7/fg, 0/bg</span>
<span id="L97" class="LineNr"> 97 </span><span class="CommentedCode">#? }</span>
<span id="L98" class="LineNr"> 98 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in <span class="muComment"># skip space</span>
<span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">}</span>
<span id="L100" class="LineNr">100 </span> <span class="muComment"># read first byte of g</span>
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L102" class="LineNr">102 </span> <span class="Delimiter">{</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L104" class="LineNr">104 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L105" class="LineNr">105 </span> <span class="PreProc">break-if-!=</span>
<span id="L106" class="LineNr">106 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of g&quot;</span>
<span id="L107" class="LineNr">107 </span> <span class="Delimiter">}</span>
<span id="L108" class="LineNr">108 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L109" class="LineNr">109 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L110" class="LineNr">110 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x13/y</span>
<span id="L111" class="LineNr">111 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, g, 7/fg, 0/bg</span>
<span id="L112" class="LineNr">112 </span> <span class="muComment"># read second byte of g</span>
<span id="L113" class="LineNr">113 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L114" class="LineNr">114 </span> <span class="Delimiter">{</span>
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">{</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L117" class="LineNr">117 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L118" class="LineNr">118 </span> <span class="Delimiter">}</span>
<span id="L119" class="LineNr">119 </span> <span class="PreProc">break-if-=</span>
<span id="L120" class="LineNr">120 </span> g <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L121" class="LineNr">121 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L122" class="LineNr">122 </span><span class="CommentedCode">#? {</span>
<span id="L123" class="LineNr">123 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L124" class="LineNr">124 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x14/y</span>
<span id="L125" class="LineNr">125 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L126" class="LineNr">126 </span><span class="CommentedCode">#? }</span>
<span id="L127" class="LineNr">127 </span> g <span class="Special">&lt;-</span> add tmp
<span id="L128" class="LineNr">128 </span><span class="CommentedCode">#? {</span>
<span id="L129" class="LineNr">129 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x15/y</span>
<span id="L130" class="LineNr">130 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, g, 7/fg, 0/bg</span>
<span id="L131" class="LineNr">131 </span><span class="CommentedCode">#? }</span>
<span id="L132" class="LineNr">132 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in <span class="muComment"># skip space</span>
<span id="L133" class="LineNr">133 </span> <span class="Delimiter">}</span>
<span id="L134" class="LineNr">134 </span> <span class="muComment"># read first byte of b</span>
<span id="L135" class="LineNr">135 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L136" class="LineNr">136 </span> <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L138" class="LineNr">138 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L139" class="LineNr">139 </span> <span class="PreProc">break-if-!=</span>
<span id="L140" class="LineNr">140 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of b&quot;</span>
<span id="L141" class="LineNr">141 </span> <span class="Delimiter">}</span>
<span id="L142" class="LineNr">142 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L143" class="LineNr">143 </span> <span class="PreProc">var</span> b/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L144" class="LineNr">144 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x16/y</span>
<span id="L145" class="LineNr">145 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, b, 7/fg, 0/bg</span>
<span id="L146" class="LineNr">146 </span> <span class="muComment"># read second byte of b</span>
<span id="L147" class="LineNr">147 </span> <span class="Delimiter">{</span>
<span id="L148" class="LineNr">148 </span> <span class="Delimiter">{</span>
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> in
<span id="L150" class="LineNr">150 </span> compare done?, <span class="Constant">0</span>/false
<span id="L151" class="LineNr">151 </span> <span class="Delimiter">}</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-!=</span>
<span id="L153" class="LineNr">153 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L154" class="LineNr">154 </span> <span class="Delimiter">{</span>
<span id="L155" class="LineNr">155 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L156" class="LineNr">156 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L157" class="LineNr">157 </span> <span class="Delimiter">}</span>
<span id="L158" class="LineNr">158 </span> <span class="PreProc">break-if-=</span>
<span id="L159" class="LineNr">159 </span> b <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L160" class="LineNr">160 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L176'>fast-hex-digit-value</a> tmp
<span id="L161" class="LineNr">161 </span><span class="CommentedCode">#? {</span>
<span id="L162" class="LineNr">162 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L163" class="LineNr">163 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x17/y</span>
<span id="L164" class="LineNr">164 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L165" class="LineNr">165 </span><span class="CommentedCode">#? }</span>
<span id="L166" class="LineNr">166 </span> b <span class="Special">&lt;-</span> add tmp
<span id="L167" class="LineNr">167 </span><span class="CommentedCode">#? {</span>
<span id="L168" class="LineNr">168 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x18/y</span>
<span id="L169" class="LineNr">169 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, b, 7/fg, 0/bg</span>
<span id="L170" class="LineNr">170 </span><span class="CommentedCode">#? }</span>
<span id="L171" class="LineNr">171 </span> <span class="Delimiter">}</span>
<span id="L172" class="LineNr">172 </span> <span class="PreProc">return</span> r, g, b
<span id="L173" class="LineNr">173 </span><span class="Delimiter">}</span>
<span id="L174" class="LineNr">174 </span>
<span id="L175" class="LineNr">175 </span><span class="muComment"># no error checking</span>
<span id="L176" class="LineNr">176 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L176'>fast-hex-digit-value</a></span> in: byte<span class="PreProc"> -&gt; </span>_/eax: byte <span class="Delimiter">{</span>
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> result/eax: byte <span class="Special">&lt;-</span> copy in
<span id="L178" class="LineNr">178 </span> compare result, <span class="Constant">0x39</span>
<span id="L179" class="LineNr">179 </span> <span class="Delimiter">{</span>
<span id="L180" class="LineNr">180 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L181" class="LineNr">181 </span> result <span class="Special">&lt;-</span> subtract <span class="Constant">0x30</span>/<span class="Constant">0</span>
<span id="L182" class="LineNr">182 </span> <span class="PreProc">return</span> result
<span id="L183" class="LineNr">183 </span> <span class="Delimiter">}</span>
<span id="L184" class="LineNr">184 </span> result <span class="Special">&lt;-</span> subtract <span class="Constant">0x61</span>/a
<span id="L185" class="LineNr">185 </span> result <span class="Special">&lt;-</span> add <span class="Constant">0xa</span>/<span class="Constant">10</span>
<span id="L186" class="LineNr">186 </span> <span class="PreProc">return</span> result
<span id="L187" class="LineNr">187 </span><span class="Delimiter">}</span>
<span id="L188" class="LineNr">188 </span>
<span id="L189" class="LineNr">189 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L189'>print-nearby-colors</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), h: int, s: int, l: int <span class="Delimiter">{</span>
<span id="L190" class="LineNr">190 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1c/y</span>
<span id="L191" class="LineNr">191 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, h, 7/fg, 0/bg</span>
<span id="L192" class="LineNr">192 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L193" class="LineNr">193 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, s, 7/fg, 0/bg</span>
<span id="L194" class="LineNr">194 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L195" class="LineNr">195 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, l, 7/fg, 0/bg</span>
<span id="L196" class="LineNr">196 </span> <span class="muComment"># save just top 2 bits of each, so that we narrow down to 1/64th of the volume</span>
<span id="L197" class="LineNr">197 </span> shift-right h, <span class="Constant">6</span>
<span id="L198" class="LineNr">198 </span> shift-right s, <span class="Constant">6</span>
<span id="L199" class="LineNr">199 </span> shift-right l, <span class="Constant">6</span>
<span id="L200" class="LineNr">200 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1/y</span>
<span id="L201" class="LineNr">201 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, h, 7/fg, 0/bg</span>
<span id="L202" class="LineNr">202 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L203" class="LineNr">203 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, s, 7/fg, 0/bg</span>
<span id="L204" class="LineNr">204 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L205" class="LineNr">205 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, l, 7/fg, 0/bg</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> a/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L209" class="LineNr">209 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L210" class="LineNr">210 </span> <span class="PreProc">var</span> y/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L211" class="LineNr">211 </span> <span class="Delimiter">{</span>
<span id="L212" class="LineNr">212 </span> compare color, <span class="Constant">0x100</span>
<span id="L213" class="LineNr">213 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L214" class="LineNr">214 </span> a, b, c <span class="Special">&lt;-</span> <a href='../316colors.subx.html#L7'>color-rgb</a> color
<span id="L215" class="LineNr">215 </span> a, b, c <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L51'>hsl</a> a, b, c
<span id="L216" class="LineNr">216 </span> a <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L217" class="LineNr">217 </span> b <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L218" class="LineNr">218 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L219" class="LineNr">219 </span> <span class="Delimiter">{</span>
<span id="L220" class="LineNr">220 </span> compare a, h
<span id="L221" class="LineNr">221 </span> <span class="PreProc">break-if-!=</span>
<span id="L222" class="LineNr">222 </span> compare b, s
<span id="L223" class="LineNr">223 </span> <span class="PreProc">break-if-!=</span>
<span id="L224" class="LineNr">224 </span> compare c, l
<span id="L225" class="LineNr">225 </span> <span class="PreProc">break-if-!=</span>
<span id="L226" class="LineNr">226 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/x, y
<span id="L227" class="LineNr">227 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, color, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L228" class="LineNr">228 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x14</span>/x, y
<span id="L229" class="LineNr">229 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L230" class="LineNr">230 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/fg, color
<span id="L231" class="LineNr">231 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L232" class="LineNr">232 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, a, 7/fg, 0/bg</span>
<span id="L233" class="LineNr">233 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L234" class="LineNr">234 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, b, 7/fg, 0/bg</span>
<span id="L235" class="LineNr">235 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L236" class="LineNr">236 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, c, 7/fg, 0/bg</span>
<span id="L237" class="LineNr">237 </span> y <span class="Special">&lt;-</span> increment
<span id="L238" class="LineNr">238 </span> <span class="Delimiter">}</span>
<span id="L239" class="LineNr">239 </span> color <span class="Special">&lt;-</span> increment
<span id="L240" class="LineNr">240 </span> <span class="PreProc">loop</span>
<span id="L241" class="LineNr">241 </span> <span class="Delimiter">}</span>
<span id="L242" class="LineNr">242 </span><span class="Delimiter">}</span>
<span id="L30" class="LineNr"> 30 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> copy key2 <span class="muComment"># TODO: unicode input</span>
<span id="L31" class="LineNr"> 31 </span> <a href='../501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, c, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">loop</span>
<span id="L33" class="LineNr"> 33 </span> <span class="Delimiter">}</span>
<span id="L34" class="LineNr"> 34 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L35" class="LineNr"> 35 </span> <span class="muComment"># parse</span>
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">var</span> a/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L39" class="LineNr"> 39 </span> <span class="muComment"># a, b, c = r, g, b</span>
<span id="L40" class="LineNr"> 40 </span> a, b, c <span class="Special">&lt;-</span> <a href='colors.mu.html#L64'>parse</a> in
<span id="L41" class="LineNr"> 41 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1a/y</span>
<span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, a, 7/fg, 0/bg</span>
<span id="L43" class="LineNr"> 43 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L44" class="LineNr"> 44 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, b, 7/fg, 0/bg</span>
<span id="L45" class="LineNr"> 45 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L46" class="LineNr"> 46 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, c, 7/fg, 0/bg</span>
<span id="L47" class="LineNr"> 47 </span> a, b, c <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L51'>hsl</a> a, b, c
<span id="L48" class="LineNr"> 48 </span> <span class="muComment"># return all colors in the same quadrant in h, s and l</span>
<span id="L49" class="LineNr"> 49 </span> <a href='colors.mu.html#L188'>print-nearby-colors</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, a, b, c
<span id="L50" class="LineNr"> 50 </span> <span class="muComment"># another metric</span>
<span id="L51" class="LineNr"> 51 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L260'>nearest-color-euclidean-hsl</a> a, b, c
<span id="L52" class="LineNr"> 52 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/x, <span class="Constant">0x26</span>/y
<span id="L53" class="LineNr"> 53 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;nearest (euclidean, h/s/l): &quot;</span>, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L54" class="LineNr"> 54 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, color, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L55" class="LineNr"> 55 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L56" class="LineNr"> 56 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/fg, color
<span id="L57" class="LineNr"> 57 </span> <span class="muComment">#</span>
<span id="L58" class="LineNr"> 58 </span> <span class="PreProc">loop</span>
<span id="L59" class="LineNr"> 59 </span> <span class="Delimiter">}</span>
<span id="L60" class="LineNr"> 60 </span><span class="Delimiter">}</span>
<span id="L61" class="LineNr"> 61 </span>
<span id="L62" class="LineNr"> 62 </span><span class="muComment"># read exactly 3 words in a single line</span>
<span id="L63" class="LineNr"> 63 </span><span class="muComment"># Each word consists of exactly 1 or 2 hex bytes. No hex prefix.</span>
<span id="L64" class="LineNr"> 64 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L64'>parse</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/<span class="muRegEcx">ecx</span>: int, _/<span class="muRegEdx">edx</span>: int, _/<span class="muRegEbx">ebx</span>: int <span class="Delimiter">{</span>
<span id="L65" class="LineNr"> 65 </span> <span class="muComment"># read first byte of r</span>
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L67" class="LineNr"> 67 </span> <span class="Delimiter">{</span>
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L69" class="LineNr"> 69 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">break-if-!=</span>
<span id="L71" class="LineNr"> 71 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of r&quot;</span>
<span id="L72" class="LineNr"> 72 </span> <span class="Delimiter">}</span>
<span id="L73" class="LineNr"> 73 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">var</span> r/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L75" class="LineNr"> 75 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x10/y</span>
<span id="L76" class="LineNr"> 76 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, r, 7/fg, 0/bg</span>
<span id="L77" class="LineNr"> 77 </span> <span class="muComment"># read second byte of r</span>
<span id="L78" class="LineNr"> 78 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">{</span>
<span id="L80" class="LineNr"> 80 </span> <span class="Delimiter">{</span>
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L82" class="LineNr"> 82 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">}</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">break-if-=</span>
<span id="L85" class="LineNr"> 85 </span> r <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L86" class="LineNr"> 86 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L87" class="LineNr"> 87 </span><span class="CommentedCode">#? {</span>
<span id="L88" class="LineNr"> 88 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L89" class="LineNr"> 89 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x11/y</span>
<span id="L90" class="LineNr"> 90 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L91" class="LineNr"> 91 </span><span class="CommentedCode">#? }</span>
<span id="L92" class="LineNr"> 92 </span> r <span class="Special">&lt;-</span> add tmp
<span id="L93" class="LineNr"> 93 </span><span class="CommentedCode">#? {</span>
<span id="L94" class="LineNr"> 94 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x12/y</span>
<span id="L95" class="LineNr"> 95 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, r, 7/fg, 0/bg</span>
<span id="L96" class="LineNr"> 96 </span><span class="CommentedCode">#? }</span>
<span id="L97" class="LineNr"> 97 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in <span class="muComment"># skip space</span>
<span id="L98" class="LineNr"> 98 </span> <span class="Delimiter">}</span>
<span id="L99" class="LineNr"> 99 </span> <span class="muComment"># read first byte of g</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L101" class="LineNr">101 </span> <span class="Delimiter">{</span>
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L103" class="LineNr">103 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L104" class="LineNr">104 </span> <span class="PreProc">break-if-!=</span>
<span id="L105" class="LineNr">105 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of g&quot;</span>
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">}</span>
<span id="L107" class="LineNr">107 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> g/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L109" class="LineNr">109 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x13/y</span>
<span id="L110" class="LineNr">110 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, g, 7/fg, 0/bg</span>
<span id="L111" class="LineNr">111 </span> <span class="muComment"># read second byte of g</span>
<span id="L112" class="LineNr">112 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L113" class="LineNr">113 </span> <span class="Delimiter">{</span>
<span id="L114" class="LineNr">114 </span> <span class="Delimiter">{</span>
<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L116" class="LineNr">116 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L117" class="LineNr">117 </span> <span class="Delimiter">}</span>
<span id="L118" class="LineNr">118 </span> <span class="PreProc">break-if-=</span>
<span id="L119" class="LineNr">119 </span> g <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L120" class="LineNr">120 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L121" class="LineNr">121 </span><span class="CommentedCode">#? {</span>
<span id="L122" class="LineNr">122 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L123" class="LineNr">123 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x14/y</span>
<span id="L124" class="LineNr">124 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L125" class="LineNr">125 </span><span class="CommentedCode">#? }</span>
<span id="L126" class="LineNr">126 </span> g <span class="Special">&lt;-</span> add tmp
<span id="L127" class="LineNr">127 </span><span class="CommentedCode">#? {</span>
<span id="L128" class="LineNr">128 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x15/y</span>
<span id="L129" class="LineNr">129 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, g, 7/fg, 0/bg</span>
<span id="L130" class="LineNr">130 </span><span class="CommentedCode">#? }</span>
<span id="L131" class="LineNr">131 </span> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in <span class="muComment"># skip space</span>
<span id="L132" class="LineNr">132 </span> <span class="Delimiter">}</span>
<span id="L133" class="LineNr">133 </span> <span class="muComment"># read first byte of b</span>
<span id="L134" class="LineNr">134 </span> <span class="PreProc">var</span> tmp/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L135" class="LineNr">135 </span> <span class="Delimiter">{</span>
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L137" class="LineNr">137 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L138" class="LineNr">138 </span> <span class="PreProc">break-if-!=</span>
<span id="L139" class="LineNr">139 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;invalid byte 0 of b&quot;</span>
<span id="L140" class="LineNr">140 </span> <span class="Delimiter">}</span>
<span id="L141" class="LineNr">141 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> b/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy tmp
<span id="L143" class="LineNr">143 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x16/y</span>
<span id="L144" class="LineNr">144 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, b, 7/fg, 0/bg</span>
<span id="L145" class="LineNr">145 </span> <span class="muComment"># read second byte of b</span>
<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> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> in
<span id="L149" class="LineNr">149 </span> compare done?, <span class="Constant">0</span>/false
<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> tmp <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L13'>read-byte</a> in
<span id="L153" class="LineNr">153 </span> <span class="Delimiter">{</span>
<span id="L154" class="LineNr">154 </span> <span class="PreProc">var</span> valid?/eax: boolean <span class="Special">&lt;-</span> <a href='../118parse-hex-int.subx.html#L701'>hex-digit?</a> tmp
<span id="L155" class="LineNr">155 </span> compare valid?, <span class="Constant">0</span>/false
<span id="L156" class="LineNr">156 </span> <span class="Delimiter">}</span>
<span id="L157" class="LineNr">157 </span> <span class="PreProc">break-if-=</span>
<span id="L158" class="LineNr">158 </span> b <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>
<span id="L159" class="LineNr">159 </span> tmp <span class="Special">&lt;-</span> <a href='colors.mu.html#L175'>fast-hex-digit-value</a> tmp
<span id="L160" class="LineNr">160 </span><span class="CommentedCode">#? {</span>
<span id="L161" class="LineNr">161 </span><span class="CommentedCode">#? var foo/eax: int &lt;- copy tmp</span>
<span id="L162" class="LineNr">162 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x17/y</span>
<span id="L163" class="LineNr">163 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 7/fg, 0/bg</span>
<span id="L164" class="LineNr">164 </span><span class="CommentedCode">#? }</span>
<span id="L165" class="LineNr">165 </span> b <span class="Special">&lt;-</span> add tmp
<span id="L166" class="LineNr">166 </span><span class="CommentedCode">#? {</span>
<span id="L167" class="LineNr">167 </span><span class="CommentedCode">#? set-cursor-position 0/screen, 0x10/x, 0x18/y</span>
<span id="L168" class="LineNr">168 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, b, 7/fg, 0/bg</span>
<span id="L169" class="LineNr">169 </span><span class="CommentedCode">#? }</span>
<span id="L170" class="LineNr">170 </span> <span class="Delimiter">}</span>
<span id="L171" class="LineNr">171 </span> <span class="PreProc">return</span> r, g, b
<span id="L172" class="LineNr">172 </span><span class="Delimiter">}</span>
<span id="L173" class="LineNr">173 </span>
<span id="L174" class="LineNr">174 </span><span class="muComment"># no error checking</span>
<span id="L175" class="LineNr">175 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L175'>fast-hex-digit-value</a></span> in: byte<span class="PreProc"> -&gt; </span>_/eax: byte <span class="Delimiter">{</span>
<span id="L176" class="LineNr">176 </span> <span class="PreProc">var</span> result/eax: byte <span class="Special">&lt;-</span> copy in
<span id="L177" class="LineNr">177 </span> compare result, <span class="Constant">0x39</span>
<span id="L178" class="LineNr">178 </span> <span class="Delimiter">{</span>
<span id="L179" class="LineNr">179 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L180" class="LineNr">180 </span> result <span class="Special">&lt;-</span> subtract <span class="Constant">0x30</span>/<span class="Constant">0</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">return</span> result
<span id="L182" class="LineNr">182 </span> <span class="Delimiter">}</span>
<span id="L183" class="LineNr">183 </span> result <span class="Special">&lt;-</span> subtract <span class="Constant">0x61</span>/a
<span id="L184" class="LineNr">184 </span> result <span class="Special">&lt;-</span> add <span class="Constant">0xa</span>/<span class="Constant">10</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">return</span> result
<span id="L186" class="LineNr">186 </span><span class="Delimiter">}</span>
<span id="L187" class="LineNr">187 </span>
<span id="L188" class="LineNr">188 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='colors.mu.html#L188'>print-nearby-colors</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), h: int, s: int, l: int <span class="Delimiter">{</span>
<span id="L189" class="LineNr">189 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1c/y</span>
<span id="L190" class="LineNr">190 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, h, 7/fg, 0/bg</span>
<span id="L191" class="LineNr">191 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L192" class="LineNr">192 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, s, 7/fg, 0/bg</span>
<span id="L193" class="LineNr">193 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L194" class="LineNr">194 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, l, 7/fg, 0/bg</span>
<span id="L195" class="LineNr">195 </span> <span class="muComment"># save just top 2 bits of each, so that we narrow down to 1/64th of the volume</span>
<span id="L196" class="LineNr">196 </span> shift-right h, <span class="Constant">6</span>
<span id="L197" class="LineNr">197 </span> shift-right s, <span class="Constant">6</span>
<span id="L198" class="LineNr">198 </span> shift-right l, <span class="Constant">6</span>
<span id="L199" class="LineNr">199 </span><span class="CommentedCode">#? set-cursor-position screen, 0x10/x, 0x1/y</span>
<span id="L200" class="LineNr">200 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, h, 7/fg, 0/bg</span>
<span id="L201" class="LineNr">201 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L202" class="LineNr">202 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, s, 7/fg, 0/bg</span>
<span id="L203" class="LineNr">203 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L204" class="LineNr">204 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, l, 7/fg, 0/bg</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> a/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> c/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L209" class="LineNr">209 </span> <span class="PreProc">var</span> y/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">2</span>
<span id="L210" class="LineNr">210 </span> <span class="Delimiter">{</span>
<span id="L211" class="LineNr">211 </span> compare color, <span class="Constant">0x100</span>
<span id="L212" class="LineNr">212 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L213" class="LineNr">213 </span> a, b, c <span class="Special">&lt;-</span> <a href='../316colors.subx.html#L7'>color-rgb</a> color
<span id="L214" class="LineNr">214 </span> a, b, c <span class="Special">&lt;-</span> <a href='../505colors.mu.html#L51'>hsl</a> a, b, c
<span id="L215" class="LineNr">215 </span> a <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L216" class="LineNr">216 </span> b <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L217" class="LineNr">217 </span> c <span class="Special">&lt;-</span> shift-right <span class="Constant">6</span>
<span id="L218" class="LineNr">218 </span> <span class="Delimiter">{</span>
<span id="L219" class="LineNr">219 </span> compare a, h
<span id="L220" class="LineNr">220 </span> <span class="PreProc">break-if-!=</span>
<span id="L221" class="LineNr">221 </span> compare b, s
<span id="L222" class="LineNr">222 </span> <span class="PreProc">break-if-!=</span>
<span id="L223" class="LineNr">223 </span> compare c, l
<span id="L224" class="LineNr">224 </span> <span class="PreProc">break-if-!=</span>
<span id="L225" class="LineNr">225 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x10</span>/x, y
<span id="L226" class="LineNr">226 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, color, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L227" class="LineNr">227 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x14</span>/x, y
<span id="L228" class="LineNr">228 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L229" class="LineNr">229 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/fg, color
<span id="L230" class="LineNr">230 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L231" class="LineNr">231 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, a, 7/fg, 0/bg</span>
<span id="L232" class="LineNr">232 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L233" class="LineNr">233 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, b, 7/fg, 0/bg</span>
<span id="L234" class="LineNr">234 </span><span class="CommentedCode">#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, &quot; &quot;, 7/fg, 0/bg</span>
<span id="L235" class="LineNr">235 </span><span class="CommentedCode">#? draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen screen, c, 7/fg, 0/bg</span>
<span id="L236" class="LineNr">236 </span> y <span class="Special">&lt;-</span> increment
<span id="L237" class="LineNr">237 </span> <span class="Delimiter">}</span>
<span id="L238" class="LineNr">238 </span> color <span class="Special">&lt;-</span> increment
<span id="L239" class="LineNr">239 </span> <span class="PreProc">loop</span>
<span id="L240" class="LineNr">240 </span> <span class="Delimiter">}</span>
<span id="L241" class="LineNr">241 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

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

@ -60,14 +60,12 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex1.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output: blank screen with no errors</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex1.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">loop</span>
<span id="L14" class="LineNr">14 </span><span class="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: blank screen with no errors</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex1.mu.html#L10'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> <span class="PreProc">loop</span>
<span id="L12" class="LineNr">12 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

68
html/apps/ex10.mu.html generated
View File

@ -63,42 +63,40 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex10.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output:</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># Values between -256 and +255 as you move the mouse over the window.</span>
<span id="L12" class="LineNr">12 </span><span class="muComment"># You might need to click on the window once.</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='ex10.mu.html#L14'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> <span class="muComment"># repeatedly print out mouse driver results if non-zero</span>
<span id="L16" class="LineNr">16 </span> $main:event-loop: <span class="Delimiter">{</span>
<span id="L17" class="LineNr">17 </span> <span class="PreProc">var</span> dx/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">var</span> dy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L19" class="LineNr">19 </span> dx, dy <span class="Special">&lt;-</span> read-mouse-event
<span id="L20" class="LineNr">20 </span> <span class="Delimiter">{</span>
<span id="L21" class="LineNr">21 </span> compare dx, <span class="Constant">0</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output:</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># Values between -256 and +255 as you move the mouse over the window.</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># You might need to click on the window once.</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex10.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <span class="muComment"># repeatedly print out mouse driver results if non-zero</span>
<span id="L14" class="LineNr">14 </span> $main:event-loop: <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> dx/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> dy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L17" class="LineNr">17 </span> dx, dy <span class="Special">&lt;-</span> read-mouse-event
<span id="L18" class="LineNr">18 </span> <span class="Delimiter">{</span>
<span id="L19" class="LineNr">19 </span> compare dx, <span class="Constant">0</span>
<span id="L20" class="LineNr">20 </span> <span class="PreProc">break-if-!=</span>
<span id="L21" class="LineNr">21 </span> compare dy, <span class="Constant">0</span>
<span id="L22" class="LineNr">22 </span> <span class="PreProc">break-if-!=</span>
<span id="L23" class="LineNr">23 </span> compare dy, <span class="Constant">0</span>
<span id="L24" class="LineNr">24 </span> <span class="PreProc">break-if-!=</span>
<span id="L25" class="LineNr">25 </span> <span class="PreProc">loop</span> $main:event-loop
<span id="L26" class="LineNr">26 </span> <span class="Delimiter">}</span>
<span id="L27" class="LineNr">27 </span> <span class="Delimiter">{</span>
<span id="L28" class="LineNr">28 </span> <span class="PreProc">var</span> dummy1/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L29" class="LineNr">29 </span> <span class="PreProc">var</span> dummy2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L30" class="LineNr">30 </span> dummy1, dummy2 <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L253'>draw-text-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L31" class="LineNr">31 </span> <span class="Delimiter">}</span>
<span id="L32" class="LineNr">32 </span> <span class="Delimiter">{</span>
<span id="L33" class="LineNr">33 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L34" class="LineNr">34 </span> dx, dummy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L361'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, dx, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<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> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L38" class="LineNr">38 </span> dummy, dy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L361'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, dy, <span class="Constant">5</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L39" class="LineNr">39 </span> <span class="Delimiter">}</span>
<span id="L40" class="LineNr">40 </span> <span class="PreProc">loop</span>
<span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span>
<span id="L42" class="LineNr">42 </span><span class="Delimiter">}</span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">loop</span> $main:event-loop
<span id="L24" class="LineNr">24 </span> <span class="Delimiter">}</span>
<span id="L25" class="LineNr">25 </span> <span class="Delimiter">{</span>
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> dummy1/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L27" class="LineNr">27 </span> <span class="PreProc">var</span> dummy2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L28" class="LineNr">28 </span> dummy1, dummy2 <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &quot;</span>, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L29" class="LineNr">29 </span> <span class="Delimiter">}</span>
<span id="L30" class="LineNr">30 </span> <span class="Delimiter">{</span>
<span id="L31" class="LineNr">31 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L32" class="LineNr">32 </span> dx, dummy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L371'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, dx, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L33" class="LineNr">33 </span> <span class="Delimiter">}</span>
<span id="L34" class="LineNr">34 </span> <span class="Delimiter">{</span>
<span id="L35" class="LineNr">35 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L36" class="LineNr">36 </span> dummy, dy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L371'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, dy, <span class="Constant">5</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L37" class="LineNr">37 </span> <span class="Delimiter">}</span>
<span id="L38" class="LineNr">38 </span> <span class="PreProc">loop</span>
<span id="L39" class="LineNr">39 </span> <span class="Delimiter">}</span>
<span id="L40" class="LineNr">40 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

508
html/apps/ex11.mu.html generated
View File

@ -67,261 +67,259 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex11.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># Expected output: a spline with 3 control points. Use `Tab` to switch cursor</span>
<span id="L11" class="LineNr"> 11 </span><span class="muComment"># between control points, and arrow keys to move the control point at the</span>
<span id="L12" class="LineNr"> 12 </span><span class="muComment"># cursor.</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='ex11.mu.html#L14'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L15" class="LineNr"> 15 </span> <span class="PreProc">var</span> env-storage: <a href='ex11.mu.html#L25'>environment</a>
<span id="L16" class="LineNr"> 16 </span> <span class="PreProc">var</span> env/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> address env-storage
<span id="L17" class="LineNr"> 17 </span> <a href='ex11.mu.html#L233'>initialize-environment</a> env, <span class="Constant">0x200</span> <span class="Constant">0x20</span>, <span class="Constant">0x180</span> <span class="Constant">0x90</span>, <span class="Constant">0x180</span> <span class="Constant">0x160</span>
<span id="L18" class="LineNr"> 18 </span> <span class="Delimiter">{</span>
<span id="L19" class="LineNr"> 19 </span> <a href='ex11.mu.html#L37'>render</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L20" class="LineNr"> 20 </span> <a href='ex11.mu.html#L101'>edit</a> keyboard, env
<span id="L21" class="LineNr"> 21 </span> <span class="PreProc">loop</span>
<span id="L22" class="LineNr"> 22 </span> <span class="Delimiter">}</span>
<span id="L23" class="LineNr"> 23 </span><span class="Delimiter">}</span>
<span id="L24" class="LineNr"> 24 </span>
<span id="L25" class="LineNr"> 25 </span><span class="PreProc">type</span> <a href='ex11.mu.html#L25'>environment</a> <span class="Delimiter">{</span>
<span id="L26" class="LineNr"> 26 </span> p0: (handle <a href='ex11.mu.html#L32'>point</a>)
<span id="L27" class="LineNr"> 27 </span> p1: (handle <a href='ex11.mu.html#L32'>point</a>)
<span id="L28" class="LineNr"> 28 </span> p2: (handle <a href='ex11.mu.html#L32'>point</a>)
<span id="L29" class="LineNr"> 29 </span> <a href='ex11.mu.html#L77'>cursor</a>: (handle <a href='ex11.mu.html#L32'>point</a>) <span class="muComment"># one of p0, p1 or p2</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">type</span> <a href='ex11.mu.html#L32'>point</a> <span class="Delimiter">{</span>
<span id="L33" class="LineNr"> 33 </span> x: int
<span id="L34" class="LineNr"> 34 </span> y: int
<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='ex11.mu.html#L37'>render</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L38" class="LineNr"> 38 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L39" class="LineNr"> 39 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> tmp-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L41" class="LineNr"> 41 </span> <span class="PreProc">var</span> tmp/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">var</span> p0/<span class="muRegEbx">ebx</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L43" class="LineNr"> 43 </span> tmp-ah <span class="Special">&lt;-</span> get self, p1
<span id="L44" class="LineNr"> 44 </span> tmp <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> p1/<span class="muRegEdx">edx</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L46" class="LineNr"> 46 </span> tmp-ah <span class="Special">&lt;-</span> get self, p2
<span id="L47" class="LineNr"> 47 </span> tmp <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L48" class="LineNr"> 48 </span> <span class="PreProc">var</span> p2/<span class="muRegEcx">ecx</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L49" class="LineNr"> 49 </span> <span class="muComment"># control lines</span>
<span id="L50" class="LineNr"> 50 </span> <a href='ex11.mu.html#L216'>line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, p1, <span class="Constant">7</span>/color
<span id="L51" class="LineNr"> 51 </span> <a href='ex11.mu.html#L216'>line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p1, p2, <span class="Constant">7</span>/color
<span id="L52" class="LineNr"> 52 </span> <span class="muComment"># curve above control lines</span>
<span id="L53" class="LineNr"> 53 </span> <a href='ex11.mu.html#L64'>bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, p1, p2, <span class="Constant">0xc</span>/color
<span id="L54" class="LineNr"> 54 </span> <span class="muComment"># points above curve</span>
<span id="L55" class="LineNr"> 55 </span> <a href='ex11.mu.html#L226'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L56" class="LineNr"> 56 </span> <a href='ex11.mu.html#L226'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p1, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L57" class="LineNr"> 57 </span> <a href='ex11.mu.html#L226'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p2, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L58" class="LineNr"> 58 </span> <span class="muComment"># cursor last of all</span>
<span id="L59" class="LineNr"> 59 </span> <span class="PreProc">var</span> cursor-ah/eax: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L77'>cursor</a>/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L61" class="LineNr"> 61 </span> <a href='ex11.mu.html#L77'>cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <a href='ex11.mu.html#L77'>cursor</a>, <span class="Constant">0xa</span>/side, <span class="Constant">3</span>/color
<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="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L64'>bezier</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p0: (addr <a href='ex11.mu.html#L32'>point</a>), _p1: (addr <a href='ex11.mu.html#L32'>point</a>), _p2: (addr <a href='ex11.mu.html#L32'>point</a>), color: int <span class="Delimiter">{</span>
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> p0/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p0
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> x0/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p0, x
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> y0/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p0, y
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> p1/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p1
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> x1/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get p1, x
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">var</span> y1/eax: (addr int) <span class="Special">&lt;-</span> get p1, y
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">var</span> p2/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p2
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">var</span> x2/<span class="muRegEdi">edi</span>: (addr int) <span class="Special">&lt;-</span> get p2, x
<span id="L73" class="LineNr"> 73 </span> <span class="PreProc">var</span> y2/<span class="muRegEsi">esi</span>: (addr int) <span class="Special">&lt;-</span> get p2, y
<span id="L74" class="LineNr"> 74 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x0 *y0, *x1 *y1, *x2 *y2, color
<span id="L75" class="LineNr"> 75 </span><span class="Delimiter">}</span>
<span id="L76" class="LineNr"> 76 </span>
<span id="L77" class="LineNr"> 77 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L77'>cursor</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p: (addr <a href='ex11.mu.html#L32'>point</a>), side: int, color: int <span class="Delimiter">{</span>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> half-side/eax: int <span class="Special">&lt;-</span> copy side
<span id="L79" class="LineNr"> 79 </span> half-side <span class="Special">&lt;-</span> shift-right <span class="Constant">1</span>
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L81" class="LineNr"> 81 </span> <span class="PreProc">var</span> x-a/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">var</span> left-x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *x-a
<span id="L83" class="LineNr"> 83 </span> left-x <span class="Special">&lt;-</span> subtract half-side
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> y-a/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p, y
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> top-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *y-a
<span id="L86" class="LineNr"> 86 </span> top-y <span class="Special">&lt;-</span> subtract half-side
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">var</span> max/eax: int <span class="Special">&lt;-</span> copy left-x
<span id="L88" class="LineNr"> 88 </span> max <span class="Special">&lt;-</span> add side
<span id="L89" class="LineNr"> 89 </span> <a href='../507line.mu.html#L64'>draw-horizontal-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, top-y, left-x, max, color
<span id="L90" class="LineNr"> 90 </span> max <span class="Special">&lt;-</span> copy top-y
<span id="L91" class="LineNr"> 91 </span> max <span class="Special">&lt;-</span> add side
<span id="L92" class="LineNr"> 92 </span> <a href='../507line.mu.html#L75'>draw-vertical-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, left-x, top-y, max, color
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">var</span> right-x/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy left-x
<span id="L94" class="LineNr"> 94 </span> right-x <span class="Special">&lt;-</span> add side
<span id="L95" class="LineNr"> 95 </span> <a href='../507line.mu.html#L75'>draw-vertical-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-x, top-y, max, color
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> bottom-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy top-y
<span id="L97" class="LineNr"> 97 </span> bottom-y <span class="Special">&lt;-</span> add side
<span id="L98" class="LineNr"> 98 </span> <a href='../507line.mu.html#L64'>draw-horizontal-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, bottom-y, left-x, right-x, color
<span id="L99" class="LineNr"> 99 </span><span class="Delimiter">}</span>
<span id="L100" class="LineNr">100 </span>
<span id="L101" class="LineNr">101 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L101'>edit</a></span> keyboard: (addr keyboard), _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L104" class="LineNr">104 </span> compare key, <span class="Constant">0</span>
<span id="L105" class="LineNr">105 </span> <span class="PreProc">loop-if-=</span>
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">{</span>
<span id="L107" class="LineNr">107 </span> compare key, <span class="Constant">9</span>/tab
<span id="L108" class="LineNr">108 </span> <span class="PreProc">break-if-!=</span>
<span id="L109" class="LineNr">109 </span> <a href='ex11.mu.html#L138'>toggle-cursor</a> self
<span id="L110" class="LineNr">110 </span> <span class="PreProc">return</span>
<span id="L111" class="LineNr">111 </span> <span class="Delimiter">}</span>
<span id="L112" class="LineNr">112 </span> <span class="Delimiter">{</span>
<span id="L113" class="LineNr">113 </span> compare key, <span class="Constant">0x80</span>/left-arrow
<span id="L114" class="LineNr">114 </span> <span class="PreProc">break-if-!=</span>
<span id="L115" class="LineNr">115 </span> <a href='ex11.mu.html#L168'>cursor-left</a> self
<span id="L116" class="LineNr">116 </span> <span class="PreProc">return</span>
<span id="L117" class="LineNr">117 </span> <span class="Delimiter">}</span>
<span id="L118" class="LineNr">118 </span> <span class="Delimiter">{</span>
<span id="L119" class="LineNr">119 </span> compare key, <span class="Constant">0x83</span>/right-arrow
<span id="L120" class="LineNr">120 </span> <span class="PreProc">break-if-!=</span>
<span id="L121" class="LineNr">121 </span> <a href='ex11.mu.html#L180'>cursor-right</a> self
<span id="L122" class="LineNr">122 </span> <span class="PreProc">return</span>
<span id="L123" class="LineNr">123 </span> <span class="Delimiter">}</span>
<span id="L124" class="LineNr">124 </span> <span class="Delimiter">{</span>
<span id="L125" class="LineNr">125 </span> compare key, <span class="Constant">0x81</span>/down-arrow
<span id="L126" class="LineNr">126 </span> <span class="PreProc">break-if-!=</span>
<span id="L127" class="LineNr">127 </span> <a href='ex11.mu.html#L204'>cursor-down</a> self
<span id="L128" class="LineNr">128 </span> <span class="PreProc">return</span>
<span id="L129" class="LineNr">129 </span> <span class="Delimiter">}</span>
<span id="L130" class="LineNr">130 </span> <span class="Delimiter">{</span>
<span id="L131" class="LineNr">131 </span> compare key, <span class="Constant">0x82</span>/up-arrow
<span id="L132" class="LineNr">132 </span> <span class="PreProc">break-if-!=</span>
<span id="L133" class="LineNr">133 </span> <a href='ex11.mu.html#L192'>cursor-up</a> self
<span id="L134" class="LineNr">134 </span> <span class="PreProc">return</span>
<span id="L135" class="LineNr">135 </span> <span class="Delimiter">}</span>
<span id="L136" class="LineNr">136 </span><span class="Delimiter">}</span>
<span id="L137" class="LineNr">137 </span>
<span id="L138" class="LineNr">138 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L138'>toggle-cursor</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L140" class="LineNr">140 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEdi">edi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">var</span> p0-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L142" class="LineNr">142 </span> <span class="PreProc">var</span> p1-ah/<span class="muRegEdx">edx</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p1
<span id="L143" class="LineNr">143 </span> <span class="PreProc">var</span> p2-ah/<span class="muRegEbx">ebx</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p2
<span id="L144" class="LineNr">144 </span> <span class="Delimiter">{</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> p0?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p0-ah, *cursor-ah
<span id="L146" class="LineNr">146 </span> compare p0?, <span class="Constant">0</span>/false
<span id="L147" class="LineNr">147 </span> <span class="PreProc">break-if-=</span>
<span id="L148" class="LineNr">148 </span> copy-object p1-ah, cursor-ah
<span id="L149" class="LineNr">149 </span> <span class="PreProc">return</span>
<span id="L150" class="LineNr">150 </span> <span class="Delimiter">}</span>
<span id="L151" class="LineNr">151 </span> <span class="Delimiter">{</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">var</span> p1?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p1-ah, *cursor-ah
<span id="L153" class="LineNr">153 </span> compare p1?, <span class="Constant">0</span>/false
<span id="L154" class="LineNr">154 </span> <span class="PreProc">break-if-=</span>
<span id="L155" class="LineNr">155 </span> copy-object p2-ah, cursor-ah
<span id="L156" class="LineNr">156 </span> <span class="PreProc">return</span>
<span id="L157" class="LineNr">157 </span> <span class="Delimiter">}</span>
<span id="L158" class="LineNr">158 </span> <span class="Delimiter">{</span>
<span id="L159" class="LineNr">159 </span> <span class="PreProc">var</span> p2?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p2-ah, *cursor-ah
<span id="L160" class="LineNr">160 </span> compare p2?, <span class="Constant">0</span>/false
<span id="L161" class="LineNr">161 </span> <span class="PreProc">break-if-=</span>
<span id="L162" class="LineNr">162 </span> copy-object p0-ah, cursor-ah
<span id="L163" class="LineNr">163 </span> <span class="PreProc">return</span>
<span id="L164" class="LineNr">164 </span> <span class="Delimiter">}</span>
<span id="L165" class="LineNr">165 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;lost cursor&quot;</span>
<span id="L166" class="LineNr">166 </span><span class="Delimiter">}</span>
<span id="L167" class="LineNr">167 </span>
<span id="L168" class="LineNr">168 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L168'>cursor-left</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L171" class="LineNr">171 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L77'>cursor</a>/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L172" class="LineNr">172 </span> <span class="PreProc">var</span> cursor-x/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L77'>cursor</a>, x
<span id="L173" class="LineNr">173 </span> compare *cursor-x, <span class="Constant">0x20</span>
<span id="L174" class="LineNr">174 </span> <span class="Delimiter">{</span>
<span id="L175" class="LineNr">175 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L176" class="LineNr">176 </span> subtract-from *cursor-x, <span class="Constant">0x20</span>
<span id="L177" class="LineNr">177 </span> <span class="Delimiter">}</span>
<span id="L178" class="LineNr">178 </span><span class="Delimiter">}</span>
<span id="L179" class="LineNr">179 </span>
<span id="L180" class="LineNr">180 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L180'>cursor-right</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L182" class="LineNr">182 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L183" class="LineNr">183 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L77'>cursor</a>/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L184" class="LineNr">184 </span> <span class="PreProc">var</span> cursor-x/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L77'>cursor</a>, x
<span id="L185" class="LineNr">185 </span> compare *cursor-x, <span class="Constant">0x3f0</span>
<span id="L186" class="LineNr">186 </span> <span class="Delimiter">{</span>
<span id="L187" class="LineNr">187 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L188" class="LineNr">188 </span> add-to *cursor-x, <span class="Constant">0x20</span>
<span id="L189" class="LineNr">189 </span> <span class="Delimiter">}</span>
<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='ex11.mu.html#L192'>cursor-up</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L193" class="LineNr">193 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L194" class="LineNr">194 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L195" class="LineNr">195 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L77'>cursor</a>/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L196" class="LineNr">196 </span> <span class="PreProc">var</span> cursor-y/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L77'>cursor</a>, y
<span id="L197" class="LineNr">197 </span> compare *cursor-y, <span class="Constant">0x20</span>
<span id="L198" class="LineNr">198 </span> <span class="Delimiter">{</span>
<span id="L199" class="LineNr">199 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L200" class="LineNr">200 </span> subtract-from *cursor-y, <span class="Constant">0x20</span>
<span id="L201" class="LineNr">201 </span> <span class="Delimiter">}</span>
<span id="L202" class="LineNr">202 </span><span class="Delimiter">}</span>
<span id="L203" class="LineNr">203 </span>
<span id="L204" class="LineNr">204 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L204'>cursor-down</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Delimiter">{</span>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L77'>cursor</a>/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> cursor-y/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L77'>cursor</a>, y
<span id="L209" class="LineNr">209 </span> compare *cursor-y, <span class="Constant">0x2f0</span>
<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> add-to *cursor-y, <span class="Constant">0x20</span>
<span id="L213" class="LineNr">213 </span> <span class="Delimiter">}</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='ex11.mu.html#L216'>line</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p0: (addr <a href='ex11.mu.html#L32'>point</a>), _p1: (addr <a href='ex11.mu.html#L32'>point</a>), color: int <span class="Delimiter">{</span>
<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> p0/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p0
<span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> x0/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p0, x
<span id="L219" class="LineNr">219 </span> <span class="PreProc">var</span> y0/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p0, y
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> p1/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p1
<span id="L221" class="LineNr">221 </span> <span class="PreProc">var</span> x1/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get p1, x
<span id="L222" class="LineNr">222 </span> <span class="PreProc">var</span> y1/eax: (addr int) <span class="Special">&lt;-</span> get p1, y
<span id="L223" class="LineNr">223 </span> <a href='../507line.mu.html#L1'>draw-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x0 *y0, *x1 *y1, color
<span id="L224" class="LineNr">224 </span><span class="Delimiter">}</span>
<span id="L225" class="LineNr">225 </span>
<span id="L226" class="LineNr">226 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L226'>disc</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p: (addr <a href='ex11.mu.html#L32'>point</a>), radius: int, color: int, border-color: int <span class="Delimiter">{</span>
<span id="L227" class="LineNr">227 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L228" class="LineNr">228 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L229" class="LineNr">229 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p, y
<span id="L230" class="LineNr">230 </span> <a href='../508circle.mu.html#L80'>draw-disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x *y, radius, color, border-color
<span id="L231" class="LineNr">231 </span><span class="Delimiter">}</span>
<span id="L232" class="LineNr">232 </span>
<span id="L233" class="LineNr">233 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L233'>initialize-environment</a></span> _self: (addr <a href='ex11.mu.html#L25'>environment</a>), x0: int, y0: int, x1: int, y1: int, x2: int, y2: int <span class="Delimiter">{</span>
<span id="L234" class="LineNr">234 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L25'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L235" class="LineNr">235 </span> <span class="PreProc">var</span> p0-ah/eax: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L236" class="LineNr">236 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p0-ah
<span id="L237" class="LineNr">237 </span> <span class="PreProc">var</span> p0/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p0-ah
<span id="L238" class="LineNr">238 </span> <a href='ex11.mu.html#L253'>initialize-point</a> p0, x0 y0
<span id="L239" class="LineNr">239 </span> <span class="PreProc">var</span> p1-ah/eax: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p1
<span id="L240" class="LineNr">240 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p1-ah
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> p1/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p1-ah
<span id="L242" class="LineNr">242 </span> <a href='ex11.mu.html#L253'>initialize-point</a> p1, x1 y1
<span id="L243" class="LineNr">243 </span> <span class="PreProc">var</span> p2-ah/eax: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p2
<span id="L244" class="LineNr">244 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p2-ah
<span id="L245" class="LineNr">245 </span> <span class="PreProc">var</span> p2/eax: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p2-ah
<span id="L246" class="LineNr">246 </span> <a href='ex11.mu.html#L253'>initialize-point</a> p2, x2 y2
<span id="L247" class="LineNr">247 </span> <span class="muComment"># cursor initially at p0</span>
<span id="L248" class="LineNr">248 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEdi">edi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L77'>cursor</a>
<span id="L249" class="LineNr">249 </span> <span class="PreProc">var</span> src-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L250" class="LineNr">250 </span> copy-object src-ah, cursor-ah
<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="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L253'>initialize-point</a></span> _p: (addr <a href='ex11.mu.html#L32'>point</a>), x: int, y: int <span class="Delimiter">{</span>
<span id="L254" class="LineNr">254 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L32'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L255" class="LineNr">255 </span> <span class="PreProc">var</span> dest/eax: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> src/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L257" class="LineNr">257 </span> copy-to *dest, src
<span id="L258" class="LineNr">258 </span> dest <span class="Special">&lt;-</span> get p, y
<span id="L259" class="LineNr">259 </span> src <span class="Special">&lt;-</span> copy y
<span id="L260" class="LineNr">260 </span> copy-to *dest, src
<span id="L261" class="LineNr">261 </span><span class="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: a spline with 3 control points. Use `Tab` to switch cursor</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># between control points, and arrow keys to move the control point at the</span>
<span id="L10" class="LineNr"> 10 </span><span class="muComment"># cursor.</span>
<span id="L11" class="LineNr"> 11 </span>
<span id="L12" class="LineNr"> 12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr"> 13 </span> <span class="PreProc">var</span> env-storage: <a href='ex11.mu.html#L23'>environment</a>
<span id="L14" class="LineNr"> 14 </span> <span class="PreProc">var</span> env/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> address env-storage
<span id="L15" class="LineNr"> 15 </span> <a href='ex11.mu.html#L231'>initialize-environment</a> env, <span class="Constant">0x200</span> <span class="Constant">0x20</span>, <span class="Constant">0x180</span> <span class="Constant">0x90</span>, <span class="Constant">0x180</span> <span class="Constant">0x160</span>
<span id="L16" class="LineNr"> 16 </span> <span class="Delimiter">{</span>
<span id="L17" class="LineNr"> 17 </span> <a href='ex11.mu.html#L35'>render</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L18" class="LineNr"> 18 </span> <a href='ex11.mu.html#L99'>edit</a> keyboard, env
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">loop</span>
<span id="L20" class="LineNr"> 20 </span> <span class="Delimiter">}</span>
<span id="L21" class="LineNr"> 21 </span><span class="Delimiter">}</span>
<span id="L22" class="LineNr"> 22 </span>
<span id="L23" class="LineNr"> 23 </span><span class="PreProc">type</span> <a href='ex11.mu.html#L23'>environment</a> <span class="Delimiter">{</span>
<span id="L24" class="LineNr"> 24 </span> p0: (handle <a href='ex11.mu.html#L30'>point</a>)
<span id="L25" class="LineNr"> 25 </span> p1: (handle <a href='ex11.mu.html#L30'>point</a>)
<span id="L26" class="LineNr"> 26 </span> p2: (handle <a href='ex11.mu.html#L30'>point</a>)
<span id="L27" class="LineNr"> 27 </span> <a href='ex11.mu.html#L75'>cursor</a>: (handle <a href='ex11.mu.html#L30'>point</a>) <span class="muComment"># one of p0, p1 or p2</span>
<span id="L28" class="LineNr"> 28 </span><span class="Delimiter">}</span>
<span id="L29" class="LineNr"> 29 </span>
<span id="L30" class="LineNr"> 30 </span><span class="PreProc">type</span> <a href='ex11.mu.html#L30'>point</a> <span class="Delimiter">{</span>
<span id="L31" class="LineNr"> 31 </span> x: int
<span id="L32" class="LineNr"> 32 </span> y: int
<span id="L33" class="LineNr"> 33 </span><span class="Delimiter">}</span>
<span id="L34" class="LineNr"> 34 </span>
<span id="L35" class="LineNr"> 35 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L35'>render</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L36" class="LineNr"> 36 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L37" class="LineNr"> 37 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">var</span> tmp-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L39" class="LineNr"> 39 </span> <span class="PreProc">var</span> tmp/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">var</span> p0/<span class="muRegEbx">ebx</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L41" class="LineNr"> 41 </span> tmp-ah <span class="Special">&lt;-</span> get self, p1
<span id="L42" class="LineNr"> 42 </span> tmp <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">var</span> p1/<span class="muRegEdx">edx</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L44" class="LineNr"> 44 </span> tmp-ah <span class="Special">&lt;-</span> get self, p2
<span id="L45" class="LineNr"> 45 </span> tmp <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *tmp-ah
<span id="L46" class="LineNr"> 46 </span> <span class="PreProc">var</span> p2/<span class="muRegEcx">ecx</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy tmp
<span id="L47" class="LineNr"> 47 </span> <span class="muComment"># control lines</span>
<span id="L48" class="LineNr"> 48 </span> <a href='ex11.mu.html#L214'>line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, p1, <span class="Constant">7</span>/color
<span id="L49" class="LineNr"> 49 </span> <a href='ex11.mu.html#L214'>line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p1, p2, <span class="Constant">7</span>/color
<span id="L50" class="LineNr"> 50 </span> <span class="muComment"># curve above control lines</span>
<span id="L51" class="LineNr"> 51 </span> <a href='ex11.mu.html#L62'>bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, p1, p2, <span class="Constant">0xc</span>/color
<span id="L52" class="LineNr"> 52 </span> <span class="muComment"># points above curve</span>
<span id="L53" class="LineNr"> 53 </span> <a href='ex11.mu.html#L224'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p0, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L54" class="LineNr"> 54 </span> <a href='ex11.mu.html#L224'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p1, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L55" class="LineNr"> 55 </span> <a href='ex11.mu.html#L224'>disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, p2, <span class="Constant">3</span>/radius, <span class="Constant">7</span>/color <span class="Constant">0xf</span>/border
<span id="L56" class="LineNr"> 56 </span> <span class="muComment"># cursor last of all</span>
<span id="L57" class="LineNr"> 57 </span> <span class="PreProc">var</span> cursor-ah/eax: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L58" class="LineNr"> 58 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L75'>cursor</a>/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L59" class="LineNr"> 59 </span> <a href='ex11.mu.html#L75'>cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <a href='ex11.mu.html#L75'>cursor</a>, <span class="Constant">0xa</span>/side, <span class="Constant">3</span>/color
<span id="L60" class="LineNr"> 60 </span><span class="Delimiter">}</span>
<span id="L61" class="LineNr"> 61 </span>
<span id="L62" class="LineNr"> 62 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L62'>bezier</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p0: (addr <a href='ex11.mu.html#L30'>point</a>), _p1: (addr <a href='ex11.mu.html#L30'>point</a>), _p2: (addr <a href='ex11.mu.html#L30'>point</a>), color: int <span class="Delimiter">{</span>
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">var</span> p0/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p0
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">var</span> x0/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p0, x
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> y0/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p0, y
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> p1/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p1
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> x1/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get p1, x
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> y1/eax: (addr int) <span class="Special">&lt;-</span> get p1, y
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> p2/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p2
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">var</span> x2/<span class="muRegEdi">edi</span>: (addr int) <span class="Special">&lt;-</span> get p2, x
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">var</span> y2/<span class="muRegEsi">esi</span>: (addr int) <span class="Special">&lt;-</span> get p2, y
<span id="L72" class="LineNr"> 72 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x0 *y0, *x1 *y1, *x2 *y2, color
<span id="L73" class="LineNr"> 73 </span><span class="Delimiter">}</span>
<span id="L74" class="LineNr"> 74 </span>
<span id="L75" class="LineNr"> 75 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L75'>cursor</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p: (addr <a href='ex11.mu.html#L30'>point</a>), side: int, color: int <span class="Delimiter">{</span>
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">var</span> half-side/eax: int <span class="Special">&lt;-</span> copy side
<span id="L77" class="LineNr"> 77 </span> half-side <span class="Special">&lt;-</span> shift-right <span class="Constant">1</span>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">var</span> x-a/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> left-x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy *x-a
<span id="L81" class="LineNr"> 81 </span> left-x <span class="Special">&lt;-</span> subtract half-side
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">var</span> y-a/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p, y
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">var</span> top-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *y-a
<span id="L84" class="LineNr"> 84 </span> top-y <span class="Special">&lt;-</span> subtract half-side
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> max/eax: int <span class="Special">&lt;-</span> copy left-x
<span id="L86" class="LineNr"> 86 </span> max <span class="Special">&lt;-</span> add side
<span id="L87" class="LineNr"> 87 </span> <a href='../507line.mu.html#L64'>draw-horizontal-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, top-y, left-x, max, color
<span id="L88" class="LineNr"> 88 </span> max <span class="Special">&lt;-</span> copy top-y
<span id="L89" class="LineNr"> 89 </span> max <span class="Special">&lt;-</span> add side
<span id="L90" class="LineNr"> 90 </span> <a href='../507line.mu.html#L75'>draw-vertical-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, left-x, top-y, max, color
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> right-x/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy left-x
<span id="L92" class="LineNr"> 92 </span> right-x <span class="Special">&lt;-</span> add side
<span id="L93" class="LineNr"> 93 </span> <a href='../507line.mu.html#L75'>draw-vertical-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-x, top-y, max, color
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">var</span> bottom-y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy top-y
<span id="L95" class="LineNr"> 95 </span> bottom-y <span class="Special">&lt;-</span> add side
<span id="L96" class="LineNr"> 96 </span> <a href='../507line.mu.html#L64'>draw-horizontal-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, bottom-y, left-x, right-x, color
<span id="L97" class="LineNr"> 97 </span><span class="Delimiter">}</span>
<span id="L98" class="LineNr"> 98 </span>
<span id="L99" class="LineNr"> 99 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L99'>edit</a></span> keyboard: (addr keyboard), _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L102" class="LineNr">102 </span> compare key, <span class="Constant">0</span>
<span id="L103" class="LineNr">103 </span> <span class="PreProc">loop-if-=</span>
<span id="L104" class="LineNr">104 </span> <span class="Delimiter">{</span>
<span id="L105" class="LineNr">105 </span> compare key, <span class="Constant">9</span>/tab
<span id="L106" class="LineNr">106 </span> <span class="PreProc">break-if-!=</span>
<span id="L107" class="LineNr">107 </span> <a href='ex11.mu.html#L136'>toggle-cursor</a> self
<span id="L108" class="LineNr">108 </span> <span class="PreProc">return</span>
<span id="L109" class="LineNr">109 </span> <span class="Delimiter">}</span>
<span id="L110" class="LineNr">110 </span> <span class="Delimiter">{</span>
<span id="L111" class="LineNr">111 </span> compare key, <span class="Constant">0x80</span>/left-arrow
<span id="L112" class="LineNr">112 </span> <span class="PreProc">break-if-!=</span>
<span id="L113" class="LineNr">113 </span> <a href='ex11.mu.html#L166'>cursor-left</a> self
<span id="L114" class="LineNr">114 </span> <span class="PreProc">return</span>
<span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span>
<span id="L116" class="LineNr">116 </span> <span class="Delimiter">{</span>
<span id="L117" class="LineNr">117 </span> compare key, <span class="Constant">0x83</span>/right-arrow
<span id="L118" class="LineNr">118 </span> <span class="PreProc">break-if-!=</span>
<span id="L119" class="LineNr">119 </span> <a href='ex11.mu.html#L178'>cursor-right</a> self
<span id="L120" class="LineNr">120 </span> <span class="PreProc">return</span>
<span id="L121" class="LineNr">121 </span> <span class="Delimiter">}</span>
<span id="L122" class="LineNr">122 </span> <span class="Delimiter">{</span>
<span id="L123" class="LineNr">123 </span> compare key, <span class="Constant">0x81</span>/down-arrow
<span id="L124" class="LineNr">124 </span> <span class="PreProc">break-if-!=</span>
<span id="L125" class="LineNr">125 </span> <a href='ex11.mu.html#L202'>cursor-down</a> self
<span id="L126" class="LineNr">126 </span> <span class="PreProc">return</span>
<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> compare key, <span class="Constant">0x82</span>/up-arrow
<span id="L130" class="LineNr">130 </span> <span class="PreProc">break-if-!=</span>
<span id="L131" class="LineNr">131 </span> <a href='ex11.mu.html#L190'>cursor-up</a> self
<span id="L132" class="LineNr">132 </span> <span class="PreProc">return</span>
<span id="L133" class="LineNr">133 </span> <span class="Delimiter">}</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="muFunction"><a href='ex11.mu.html#L136'>toggle-cursor</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L138" class="LineNr">138 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEdi">edi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L139" class="LineNr">139 </span> <span class="PreProc">var</span> p0-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L140" class="LineNr">140 </span> <span class="PreProc">var</span> p1-ah/<span class="muRegEdx">edx</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p1
<span id="L141" class="LineNr">141 </span> <span class="PreProc">var</span> p2-ah/<span class="muRegEbx">ebx</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p2
<span id="L142" class="LineNr">142 </span> <span class="Delimiter">{</span>
<span id="L143" class="LineNr">143 </span> <span class="PreProc">var</span> p0?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p0-ah, *cursor-ah
<span id="L144" class="LineNr">144 </span> compare p0?, <span class="Constant">0</span>/false
<span id="L145" class="LineNr">145 </span> <span class="PreProc">break-if-=</span>
<span id="L146" class="LineNr">146 </span> copy-object p1-ah, cursor-ah
<span id="L147" class="LineNr">147 </span> <span class="PreProc">return</span>
<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> <span class="PreProc">var</span> p1?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p1-ah, *cursor-ah
<span id="L151" class="LineNr">151 </span> compare p1?, <span class="Constant">0</span>/false
<span id="L152" class="LineNr">152 </span> <span class="PreProc">break-if-=</span>
<span id="L153" class="LineNr">153 </span> copy-object p2-ah, cursor-ah
<span id="L154" class="LineNr">154 </span> <span class="PreProc">return</span>
<span id="L155" class="LineNr">155 </span> <span class="Delimiter">}</span>
<span id="L156" class="LineNr">156 </span> <span class="Delimiter">{</span>
<span id="L157" class="LineNr">157 </span> <span class="PreProc">var</span> p2?/eax: boolean <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L460'>handle-equal?</a> *p2-ah, *cursor-ah
<span id="L158" class="LineNr">158 </span> compare p2?, <span class="Constant">0</span>/false
<span id="L159" class="LineNr">159 </span> <span class="PreProc">break-if-=</span>
<span id="L160" class="LineNr">160 </span> copy-object p0-ah, cursor-ah
<span id="L161" class="LineNr">161 </span> <span class="PreProc">return</span>
<span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span>
<span id="L163" class="LineNr">163 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;lost cursor&quot;</span>
<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='ex11.mu.html#L166'>cursor-left</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L167" class="LineNr">167 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L75'>cursor</a>/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> cursor-x/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L75'>cursor</a>, x
<span id="L171" class="LineNr">171 </span> compare *cursor-x, <span class="Constant">0x20</span>
<span id="L172" class="LineNr">172 </span> <span class="Delimiter">{</span>
<span id="L173" class="LineNr">173 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L174" class="LineNr">174 </span> subtract-from *cursor-x, <span class="Constant">0x20</span>
<span id="L175" class="LineNr">175 </span> <span class="Delimiter">}</span>
<span id="L176" class="LineNr">176 </span><span class="Delimiter">}</span>
<span id="L177" class="LineNr">177 </span>
<span id="L178" class="LineNr">178 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L178'>cursor-right</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L179" class="LineNr">179 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L180" class="LineNr">180 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L181" class="LineNr">181 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L75'>cursor</a>/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L182" class="LineNr">182 </span> <span class="PreProc">var</span> cursor-x/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L75'>cursor</a>, x
<span id="L183" class="LineNr">183 </span> compare *cursor-x, <span class="Constant">0x3f0</span>
<span id="L184" class="LineNr">184 </span> <span class="Delimiter">{</span>
<span id="L185" class="LineNr">185 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L186" class="LineNr">186 </span> add-to *cursor-x, <span class="Constant">0x20</span>
<span id="L187" class="LineNr">187 </span> <span class="Delimiter">}</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="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L190'>cursor-up</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L191" class="LineNr">191 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L192" class="LineNr">192 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L193" class="LineNr">193 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L75'>cursor</a>/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L194" class="LineNr">194 </span> <span class="PreProc">var</span> cursor-y/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L75'>cursor</a>, y
<span id="L195" class="LineNr">195 </span> compare *cursor-y, <span class="Constant">0x20</span>
<span id="L196" class="LineNr">196 </span> <span class="Delimiter">{</span>
<span id="L197" class="LineNr">197 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L198" class="LineNr">198 </span> subtract-from *cursor-y, <span class="Constant">0x20</span>
<span id="L199" class="LineNr">199 </span> <span class="Delimiter">}</span>
<span id="L200" class="LineNr">200 </span><span class="Delimiter">}</span>
<span id="L201" class="LineNr">201 </span>
<span id="L202" class="LineNr">202 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L202'>cursor-down</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Delimiter">{</span>
<span id="L203" class="LineNr">203 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L204" class="LineNr">204 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L205" class="LineNr">205 </span> <span class="PreProc">var</span> <a href='ex11.mu.html#L75'>cursor</a>/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *cursor-ah
<span id="L206" class="LineNr">206 </span> <span class="PreProc">var</span> cursor-y/eax: (addr int) <span class="Special">&lt;-</span> get <a href='ex11.mu.html#L75'>cursor</a>, y
<span id="L207" class="LineNr">207 </span> compare *cursor-y, <span class="Constant">0x2f0</span>
<span id="L208" class="LineNr">208 </span> <span class="Delimiter">{</span>
<span id="L209" class="LineNr">209 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L210" class="LineNr">210 </span> add-to *cursor-y, <span class="Constant">0x20</span>
<span id="L211" class="LineNr">211 </span> <span class="Delimiter">}</span>
<span id="L212" class="LineNr">212 </span><span class="Delimiter">}</span>
<span id="L213" class="LineNr">213 </span>
<span id="L214" class="LineNr">214 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L214'>line</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p0: (addr <a href='ex11.mu.html#L30'>point</a>), _p1: (addr <a href='ex11.mu.html#L30'>point</a>), color: int <span class="Delimiter">{</span>
<span id="L215" class="LineNr">215 </span> <span class="PreProc">var</span> p0/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p0
<span id="L216" class="LineNr">216 </span> <span class="PreProc">var</span> x0/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p0, x
<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> y0/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p0, y
<span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> p1/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p1
<span id="L219" class="LineNr">219 </span> <span class="PreProc">var</span> x1/<span class="muRegEbx">ebx</span>: (addr int) <span class="Special">&lt;-</span> get p1, x
<span id="L220" class="LineNr">220 </span> <span class="PreProc">var</span> y1/eax: (addr int) <span class="Special">&lt;-</span> get p1, y
<span id="L221" class="LineNr">221 </span> <a href='../507line.mu.html#L1'>draw-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x0 *y0, *x1 *y1, color
<span id="L222" class="LineNr">222 </span><span class="Delimiter">}</span>
<span id="L223" class="LineNr">223 </span>
<span id="L224" class="LineNr">224 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L224'>disc</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _p: (addr <a href='ex11.mu.html#L30'>point</a>), radius: int, color: int, border-color: int <span class="Delimiter">{</span>
<span id="L225" class="LineNr">225 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L226" class="LineNr">226 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L227" class="LineNr">227 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> get p, y
<span id="L228" class="LineNr">228 </span> <a href='../508circle.mu.html#L80'>draw-disc</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *x *y, radius, color, border-color
<span id="L229" class="LineNr">229 </span><span class="Delimiter">}</span>
<span id="L230" class="LineNr">230 </span>
<span id="L231" class="LineNr">231 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L231'>initialize-environment</a></span> _self: (addr <a href='ex11.mu.html#L23'>environment</a>), x0: int, y0: int, x1: int, y1: int, x2: int, y2: int <span class="Delimiter">{</span>
<span id="L232" class="LineNr">232 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L23'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> p0-ah/eax: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L234" class="LineNr">234 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p0-ah
<span id="L235" class="LineNr">235 </span> <span class="PreProc">var</span> p0/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p0-ah
<span id="L236" class="LineNr">236 </span> <a href='ex11.mu.html#L251'>initialize-point</a> p0, x0 y0
<span id="L237" class="LineNr">237 </span> <span class="PreProc">var</span> p1-ah/eax: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p1
<span id="L238" class="LineNr">238 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p1-ah
<span id="L239" class="LineNr">239 </span> <span class="PreProc">var</span> p1/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p1-ah
<span id="L240" class="LineNr">240 </span> <a href='ex11.mu.html#L251'>initialize-point</a> p1, x1 y1
<span id="L241" class="LineNr">241 </span> <span class="PreProc">var</span> p2-ah/eax: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p2
<span id="L242" class="LineNr">242 </span> <a href='../120allocate.subx.html#L43'>allocate</a> p2-ah
<span id="L243" class="LineNr">243 </span> <span class="PreProc">var</span> p2/eax: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *p2-ah
<span id="L244" class="LineNr">244 </span> <a href='ex11.mu.html#L251'>initialize-point</a> p2, x2 y2
<span id="L245" class="LineNr">245 </span> <span class="muComment"># cursor initially at p0</span>
<span id="L246" class="LineNr">246 </span> <span class="PreProc">var</span> cursor-ah/<span class="muRegEdi">edi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, <a href='ex11.mu.html#L75'>cursor</a>
<span id="L247" class="LineNr">247 </span> <span class="PreProc">var</span> src-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> get self, p0
<span id="L248" class="LineNr">248 </span> copy-object src-ah, cursor-ah
<span id="L249" class="LineNr">249 </span><span class="Delimiter">}</span>
<span id="L250" class="LineNr">250 </span>
<span id="L251" class="LineNr">251 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex11.mu.html#L251'>initialize-point</a></span> _p: (addr <a href='ex11.mu.html#L30'>point</a>), x: int, y: int <span class="Delimiter">{</span>
<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> p/<span class="muRegEsi">esi</span>: (addr <a href='ex11.mu.html#L30'>point</a>) <span class="Special">&lt;-</span> copy _p
<span id="L253" class="LineNr">253 </span> <span class="PreProc">var</span> dest/eax: (addr int) <span class="Special">&lt;-</span> get p, x
<span id="L254" class="LineNr">254 </span> <span class="PreProc">var</span> src/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L255" class="LineNr">255 </span> copy-to *dest, src
<span id="L256" class="LineNr">256 </span> dest <span class="Special">&lt;-</span> get p, y
<span id="L257" class="LineNr">257 </span> src <span class="Special">&lt;-</span> copy y
<span id="L258" class="LineNr">258 </span> copy-to *dest, src
<span id="L259" class="LineNr">259 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

42
html/apps/ex12.mu.html generated
View File

@ -64,28 +64,26 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex12.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output: text with slowly updating colors</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex12.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> fg/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> prev-timer-counter/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L15" class="LineNr">15 </span> <span class="Delimiter">{</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello from baremetal Mu!&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x400</span>/xmax, <span class="Constant">0x10</span>/y, fg, <span class="Constant">0</span>/bg
<span id="L17" class="LineNr">17 </span> <span class="muComment"># wait for timer to bump</span>
<span id="L18" class="LineNr">18 </span> <span class="Delimiter">{</span>
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> curr-timer-counter/eax: int <span class="Special">&lt;-</span> <a href='../319timer.subx.html#L3'>timer-counter</a>
<span id="L20" class="LineNr">20 </span> compare curr-timer-counter, prev-timer-counter
<span id="L21" class="LineNr">21 </span> <span class="PreProc">loop-if-=</span>
<span id="L22" class="LineNr">22 </span> prev-timer-counter <span class="Special">&lt;-</span> copy curr-timer-counter
<span id="L23" class="LineNr">23 </span> <span class="Delimiter">}</span>
<span id="L24" class="LineNr">24 </span> <span class="muComment"># switch color</span>
<span id="L25" class="LineNr">25 </span> fg <span class="Special">&lt;-</span> increment
<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="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: text with slowly updating colors</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex12.mu.html#L10'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> <span class="PreProc">var</span> fg/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> prev-timer-counter/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L13" class="LineNr">13 </span> <span class="Delimiter">{</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello from baremetal Mu!&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x400</span>/xmax, <span class="Constant">0x10</span>/y, fg, <span class="Constant">0</span>/bg
<span id="L15" class="LineNr">15 </span> <span class="muComment"># wait for timer to bump</span>
<span id="L16" class="LineNr">16 </span> <span class="Delimiter">{</span>
<span id="L17" class="LineNr">17 </span> <span class="PreProc">var</span> curr-timer-counter/eax: int <span class="Special">&lt;-</span> <a href='../319timer.subx.html#L3'>timer-counter</a>
<span id="L18" class="LineNr">18 </span> compare curr-timer-counter, prev-timer-counter
<span id="L19" class="LineNr">19 </span> <span class="PreProc">loop-if-=</span>
<span id="L20" class="LineNr">20 </span> prev-timer-counter <span class="Special">&lt;-</span> copy curr-timer-counter
<span id="L21" class="LineNr">21 </span> <span class="Delimiter">}</span>
<span id="L22" class="LineNr">22 </span> <span class="muComment"># switch color</span>
<span id="L23" class="LineNr">23 </span> fg <span class="Special">&lt;-</span> increment
<span id="L24" class="LineNr">24 </span> <span class="PreProc">loop</span>
<span id="L25" class="LineNr">25 </span> <span class="Delimiter">}</span>
<span id="L26" class="LineNr">26 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

90
html/apps/ex14.mu.html generated Normal file
View File

@ -0,0 +1,90 @@
<!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/ex14.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: #ffffd7; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #ffffd7; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.PreProc { color: #c000c0; }
.Special { color: #ff6060; }
.LineNr { }
.muRegEsi { color: #005faf; }
.Constant { color: #008787; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muComment { color: #005faf; }
-->
</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/main/apps/ex14.mu'>https://github.com/akkartik/mu/blob/main/apps/ex14.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># Unicode demo</span>
<span id="L2" class="LineNr"> 2 </span><span class="muComment">#</span>
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># Mu can't read Unicode from keyboard yet, so we'll read from disk and print</span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># to screen.</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment">#</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># Steps for trying it out:</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># 1. Translate this example into a disk image code.img.</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># ./translate apps/ex14.mu</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># 2. Build a second disk image data.img containing some Unicode text.</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># dd if=/dev/zero of=data.img count=20160</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># echo 'நட' |dd of=data.img conv=notrunc</span>
<span id="L12" class="LineNr">12 </span><span class="muComment"># 3. Run:</span>
<span id="L13" class="LineNr">13 </span><span class="muComment"># qemu-system-i386 -hda code.img -hdb data.img</span>
<span id="L14" class="LineNr">14 </span><span class="muComment">#</span>
<span id="L15" class="LineNr">15 </span><span class="muComment"># Expected output: 'நட' in green near the top-left corner of screen</span>
<span id="L16" class="LineNr">16 </span><span class="muComment">#</span>
<span id="L17" class="LineNr">17 </span><span class="muComment"># Limitations:</span>
<span id="L18" class="LineNr">18 </span><span class="muComment"># - Utf-8 is the one true encoding.</span>
<span id="L19" class="LineNr">19 </span><span class="muComment"># - No keyboard support yet.</span>
<span id="L20" class="LineNr">20 </span><span class="muComment"># - Just single-code-point graphemes so far. No combiner characters, etc.</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='ex14.mu.html#L22'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">var</span> text-storage: (stream byte <span class="Constant">0x200</span>)
<span id="L24" class="LineNr">24 </span> <span class="PreProc">var</span> text/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address text-storage
<span id="L25" class="LineNr">25 </span> <a href='../510disk.mu.html#L1'>load-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">1</span>/num-sectors, text
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L117'>draw-stream-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, text, <span class="Constant">0</span>/x <span class="Constant">0x80</span>/xmax <span class="Constant">0</span>/y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L27" class="LineNr">27 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->

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

@ -64,28 +64,26 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex2.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex2.mu.html#L10'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> <span class="PreProc">var</span> y/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L12" class="LineNr">12 </span> <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> compare y, <span class="Constant">0x300</span>/screen-height=<span class="Constant">768</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L16" class="LineNr">16 </span> <span class="Delimiter">{</span>
<span id="L17" class="LineNr">17 </span> compare x, <span class="Constant">0x400</span>/screen-width=<span class="Constant">1024</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> color/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L20" class="LineNr">20 </span> color <span class="Special">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L21" class="LineNr">21 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a> x, y, color
<span id="L22" class="LineNr">22 </span> x <span class="Special">&lt;-</span> increment
<span id="L23" class="LineNr">23 </span> <span class="PreProc">loop</span>
<span id="L24" class="LineNr">24 </span> <span class="Delimiter">}</span>
<span id="L25" class="LineNr">25 </span> y <span class="Special">&lt;-</span> increment
<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="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span>
<span id="L8" class="LineNr"> 8 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex2.mu.html#L8'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L9" class="LineNr"> 9 </span> <span class="PreProc">var</span> y/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L10" class="LineNr">10 </span> <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> compare y, <span class="Constant">0x300</span>/screen-height=<span class="Constant">768</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> x/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L14" class="LineNr">14 </span> <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> compare x, <span class="Constant">0x400</span>/screen-width=<span class="Constant">1024</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L17" class="LineNr">17 </span> <span class="PreProc">var</span> color/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy x
<span id="L18" class="LineNr">18 </span> color <span class="Special">&lt;-</span> and <span class="Constant">0xff</span>
<span id="L19" class="LineNr">19 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a> x, y, color
<span id="L20" class="LineNr">20 </span> x <span class="Special">&lt;-</span> increment
<span id="L21" class="LineNr">21 </span> <span class="PreProc">loop</span>
<span id="L22" class="LineNr">22 </span> <span class="Delimiter">}</span>
<span id="L23" class="LineNr">23 </span> y <span class="Special">&lt;-</span> increment
<span id="L24" class="LineNr">24 </span> <span class="PreProc">loop</span>
<span id="L25" class="LineNr">25 </span> <span class="Delimiter">}</span>
<span id="L26" class="LineNr">26 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

46
html/apps/ex3.mu.html generated
View File

@ -65,30 +65,28 @@ if ('onhashchange' in window) {
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># ./translate apps/ex3.mu # emits code.img</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># To run:</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Or:</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L10" class="LineNr">10 </span><span class="muComment">#</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># Expected output: a new green pixel starting from the top left corner of the</span>
<span id="L12" class="LineNr">12 </span><span class="muComment"># screen every time you press a key (letter or digit)</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='ex3.mu.html#L14'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L17" class="LineNr">17 </span> <span class="Delimiter">{</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L19" class="LineNr">19 </span> compare key, <span class="Constant">0</span>
<span id="L20" class="LineNr">20 </span> <span class="PreProc">loop-if-=</span> <span class="muComment"># busy wait</span>
<span id="L21" class="LineNr">21 </span> <a href='../101screen.subx.html#L8'>pixel-on-real-screen</a> x, y, <span class="Constant">0x31</span>/green
<span id="L22" class="LineNr">22 </span> x <span class="Special">&lt;-</span> increment
<span id="L23" class="LineNr">23 </span> compare x, <span class="Constant">0x400</span>/screen-width=<span class="Constant">1024</span>
<span id="L24" class="LineNr">24 </span> <span class="Delimiter">{</span>
<span id="L25" class="LineNr">25 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L26" class="LineNr">26 </span> y <span class="Special">&lt;-</span> increment
<span id="L27" class="LineNr">27 </span> x <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span>
<span id="L29" class="LineNr">29 </span> <span class="PreProc">loop</span>
<span id="L30" class="LineNr">30 </span> <span class="Delimiter">}</span>
<span id="L31" class="LineNr">31 </span><span class="Delimiter">}</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment">#</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># Expected output: a new green pixel starting from the top left corner of the</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># screen every time you press a key (letter or digit)</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex3.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> x/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> y/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L15" class="LineNr">15 </span> <span class="Delimiter">{</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L17" class="LineNr">17 </span> compare key, <span class="Constant">0</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">loop-if-=</span> <span class="muComment"># busy wait</span>
<span id="L19" class="LineNr">19 </span> <a href='../101screen.subx.html#L8'>pixel-on-real-screen</a> x, y, <span class="Constant">0x31</span>/green
<span id="L20" class="LineNr">20 </span> x <span class="Special">&lt;-</span> increment
<span id="L21" class="LineNr">21 </span> compare x, <span class="Constant">0x400</span>/screen-width=<span class="Constant">1024</span>
<span id="L22" class="LineNr">22 </span> <span class="Delimiter">{</span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L24" class="LineNr">24 </span> y <span class="Special">&lt;-</span> increment
<span id="L25" class="LineNr">25 </span> x <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L26" class="LineNr">26 </span> <span class="Delimiter">}</span>
<span id="L27" class="LineNr">27 </span> <span class="PreProc">loop</span>
<span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span>
<span id="L29" class="LineNr">29 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

16
html/apps/ex4.mu.html generated
View File

@ -15,8 +15,10 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color:
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.PreProc { color: #c000c0; }
.Special { color: #ff6060; }
.LineNr { }
.Constant { color: #008787; }
.CommentedCode { color: #8a8a8a; }
.Delimiter { color: #c000c0; }
.muFunction { color: #af5f00; text-decoration: underline; }
.muComment { color: #005faf; }
@ -61,13 +63,13 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex4.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output: letter 'A' in green near the top-left corner of screen</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex4.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <a href='../500fake-screen.mu.html#L130'>draw-code-point</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x41</span>/A, <span class="Constant">2</span>/row, <span class="Constant">1</span>/col, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: letter 'A' in green near the top-left corner of screen</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex4.mu.html#L10'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L92'>draw-code-point</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x41</span>/A, <span class="Constant">2</span>/row, <span class="Constant">1</span>/col, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L12" class="LineNr">12 </span> <span class="muComment"># wide glyph</span>
<span id="L13" class="LineNr">13 </span><span class="CommentedCode">#? var dummy/eax: int &lt;- draw-code-point screen, 0x1b/esc, 2/row, 1/col, 0xa/fg, 0/bg</span>
<span id="L14" class="LineNr">14 </span><span class="Delimiter">}</span>
</pre>
</body>

16
html/apps/ex5.mu.html generated
View File

@ -63,15 +63,13 @@ if ('onhashchange' in window) {
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># ./translate apps/ex5.mu # emits code.img</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># To run:</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Or:</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L10" class="LineNr">10 </span><span class="muComment">#</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># Expected output: text in green near the top-left corner of screen</span>
<span id="L12" class="LineNr">12 </span>
<span id="L13" class="LineNr">13 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex5.mu.html#L13'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello from baremetal Mu!&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x400</span>/xmax, <span class="Constant">0x10</span>/y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L15" class="LineNr">15 </span> dummy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;you shouldn't see this&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0xa0</span>/xmax, <span class="Constant">0x30</span>/y, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg <span class="muComment"># xmax is too narrow</span>
<span id="L16" class="LineNr">16 </span><span class="Delimiter">}</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment">#</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># Expected output: text in green near the top-left corner of screen</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='ex5.mu.html#L11'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello from baremetal Mu!&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0x400</span>/xmax, <span class="Constant">0x10</span>/y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L13" class="LineNr">13 </span> dummy <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;you shouldn't see this&quot;</span>, <span class="Constant">0x10</span>/x, <span class="Constant">0xa0</span>/xmax, <span class="Constant">0x30</span>/y, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg <span class="muComment"># xmax is too narrow</span>
<span id="L14" class="LineNr">14 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

50
html/apps/ex6.mu.html generated
View File

@ -63,32 +63,30 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex6.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output: a box and text that doesn't overflow it</span>
<span id="L11" class="LineNr">11 </span>
<span id="L12" class="LineNr">12 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex6.mu.html#L12'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L13" class="LineNr">13 </span> <span class="muComment"># drawing text within a bounding box</span>
<span id="L14" class="LineNr">14 </span> <a href='../503manhattan-line.mu.html#L1'>draw-box-on-real-screen</a> <span class="Constant">0xf</span>, <span class="Constant">0x1f</span>, <span class="Constant">0x79</span>, <span class="Constant">0x51</span>, <span class="Constant">0x4</span>
<span id="L15" class="LineNr">15 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L17" class="LineNr">17 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L18" class="LineNr">18 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;from &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L19" class="LineNr">19 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;baremetal &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L20" class="LineNr">20 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L174'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Mu!&quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L21" class="LineNr">21 </span>
<span id="L22" class="LineNr">22 </span> <span class="muComment"># drawing at the cursor in multiple directions</span>
<span id="L23" class="LineNr">23 </span> <a href='../501draw-text.mu.html#L490'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;abc&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L24" class="LineNr">24 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;def&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L25" class="LineNr">25 </span>
<span id="L26" class="LineNr">26 </span> <span class="muComment"># test drawing near the edge</span>
<span id="L27" class="LineNr">27 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;R&quot;</span>, <span class="Constant">0x7f</span>/x, <span class="Constant">0x80</span>/xmax=screen-width, <span class="Constant">0x18</span>/y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L28" class="LineNr">28 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;wrapped from R&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L29" class="LineNr">29 </span>
<span id="L30" class="LineNr">30 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L396'>draw-text-downward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;D&quot;</span>, <span class="Constant">0x20</span>/x, <span class="Constant">0x2f</span>/y, <span class="Constant">0x30</span>/ymax=screen-height, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L31" class="LineNr">31 </span> <a href='../501draw-text.mu.html#L490'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;wrapped from D&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L32" class="LineNr">32 </span><span class="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: a box and text that doesn't overflow it</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex6.mu.html#L10'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L11" class="LineNr">11 </span> <span class="muComment"># drawing text within a bounding box</span>
<span id="L12" class="LineNr">12 </span> <a href='../503manhattan-line.mu.html#L1'>draw-box-on-real-screen</a> <span class="Constant">0xf</span>, <span class="Constant">0x1f</span>, <span class="Constant">0x79</span>, <span class="Constant">0x51</span>, <span class="Constant">0x4</span>
<span id="L13" class="LineNr">13 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L15" class="LineNr">15 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;hello &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L16" class="LineNr">16 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;from &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L17" class="LineNr">17 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;baremetal &quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L18" class="LineNr">18 </span> x, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L181'>draw-text-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;Mu!&quot;</span>, <span class="Constant">0x10</span>/xmin, <span class="Constant">0x20</span>/ymin, <span class="Constant">0x78</span>/xmax, <span class="Constant">0x50</span>/ymax, x, y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L19" class="LineNr">19 </span>
<span id="L20" class="LineNr">20 </span> <span class="muComment"># drawing at the cursor in multiple directions</span>
<span id="L21" class="LineNr">21 </span> <a href='../501draw-text.mu.html#L504'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;abc&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L22" class="LineNr">22 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;def&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L23" class="LineNr">23 </span>
<span id="L24" class="LineNr">24 </span> <span class="muComment"># test drawing near the edge</span>
<span id="L25" class="LineNr">25 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;R&quot;</span>, <span class="Constant">0x7f</span>/x, <span class="Constant">0x80</span>/xmax=screen-width, <span class="Constant">0x18</span>/y, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L26" class="LineNr">26 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;wrapped from R&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L27" class="LineNr">27 </span>
<span id="L28" class="LineNr">28 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L406'>draw-text-downward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;D&quot;</span>, <span class="Constant">0x20</span>/x, <span class="Constant">0x2f</span>/y, <span class="Constant">0x30</span>/ymax=screen-height, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L29" class="LineNr">29 </span> <a href='../501draw-text.mu.html#L504'>draw-text-wrapping-down-then-right-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;wrapped from D&quot;</span>, <span class="Constant">0xa</span>/fg, <span class="Constant">0</span>/bg
<span id="L30" class="LineNr">30 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

78
html/apps/ex7.mu.html generated
View File

@ -62,46 +62,44 @@ if ('onhashchange' in window) {
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex7.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output: an interactive game a bit like &quot;snakes&quot;. Try pressing h, j,</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># k, l.</span>
<span id="L12" class="LineNr">12 </span>
<span id="L13" class="LineNr">13 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex7.mu.html#L13'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L14" class="LineNr">14 </span> <span class="PreProc">var</span> space/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L15" class="LineNr">15 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>, <span class="Constant">0</span>
<span id="L16" class="LineNr">16 </span> <span class="Delimiter">{</span>
<span id="L17" class="LineNr">17 </span> <a href='../500fake-screen.mu.html#L237'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space
<span id="L18" class="LineNr">18 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L19" class="LineNr">19 </span> <span class="Delimiter">{</span>
<span id="L20" class="LineNr">20 </span> compare key, <span class="Constant">0x68</span>/h
<span id="L21" class="LineNr">21 </span> <span class="PreProc">break-if-!=</span>
<span id="L22" class="LineNr">22 </span> <a href='../501draw-text.mu.html#L92'>draw-code-point-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/dash, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L23" class="LineNr">23 </span> <a href='../501draw-text.mu.html#L3'>move-cursor-left</a> <span class="Constant">0</span>
<span id="L24" class="LineNr">24 </span> <span class="Delimiter">}</span>
<span id="L25" class="LineNr">25 </span> <span class="Delimiter">{</span>
<span id="L26" class="LineNr">26 </span> compare key, <span class="Constant">0x6a</span>/j
<span id="L27" class="LineNr">27 </span> <span class="PreProc">break-if-!=</span>
<span id="L28" class="LineNr">28 </span> <a href='../501draw-text.mu.html#L92'>draw-code-point-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x7c</span>/vertical-bar, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L29" class="LineNr">29 </span> <a href='../501draw-text.mu.html#L47'>move-cursor-down</a> <span class="Constant">0</span>
<span id="L30" class="LineNr">30 </span> <span class="Delimiter">}</span>
<span id="L31" class="LineNr">31 </span> <span class="Delimiter">{</span>
<span id="L32" class="LineNr">32 </span> compare key, <span class="Constant">0x6b</span>/k
<span id="L33" class="LineNr">33 </span> <span class="PreProc">break-if-!=</span>
<span id="L34" class="LineNr">34 </span> <a href='../501draw-text.mu.html#L92'>draw-code-point-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x7c</span>/vertical-bar, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L35" class="LineNr">35 </span> <a href='../501draw-text.mu.html#L34'>move-cursor-up</a> <span class="Constant">0</span>
<span id="L36" class="LineNr">36 </span> <span class="Delimiter">}</span>
<span id="L37" class="LineNr">37 </span> <span class="Delimiter">{</span>
<span id="L38" class="LineNr">38 </span> compare key, <span class="Constant">0x6c</span>/l
<span id="L39" class="LineNr">39 </span> <span class="PreProc">break-if-!=</span>
<span id="L40" class="LineNr">40 </span> <span class="PreProc">var</span> g/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x2d</span>/dash
<span id="L41" class="LineNr">41 </span> <a href='../501draw-text.mu.html#L92'>draw-code-point-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/dash, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L42" class="LineNr">42 </span> <a href='../501draw-text.mu.html#L16'>move-cursor-right</a> <span class="Constant">0</span>
<span id="L43" class="LineNr">43 </span> <span class="Delimiter">}</span>
<span id="L44" class="LineNr">44 </span> <span class="PreProc">loop</span>
<span id="L45" class="LineNr">45 </span> <span class="Delimiter">}</span>
<span id="L46" class="LineNr">46 </span><span class="Delimiter">}</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment">#</span>
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># Expected output: an interactive game a bit like &quot;snakes&quot;. Try pressing h, j,</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># k, l.</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='ex7.mu.html#L11'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L12" class="LineNr">12 </span> <span class="PreProc">var</span> space/eax: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L13" class="LineNr">13 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>, <span class="Constant">0</span>
<span id="L14" class="LineNr">14 </span> <span class="Delimiter">{</span>
<span id="L15" class="LineNr">15 </span> <a href='../500fake-screen.mu.html#L293'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space
<span id="L16" class="LineNr">16 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L17" class="LineNr">17 </span> <span class="Delimiter">{</span>
<span id="L18" class="LineNr">18 </span> compare key, <span class="Constant">0x68</span>/h
<span id="L19" class="LineNr">19 </span> <span class="PreProc">break-if-!=</span>
<span id="L20" class="LineNr">20 </span> draw-code-point-at-cursor <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/dash, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L21" class="LineNr">21 </span> <a href='../501draw-text.mu.html#L3'>move-cursor-left</a> <span class="Constant">0</span>
<span id="L22" class="LineNr">22 </span> <span class="Delimiter">}</span>
<span id="L23" class="LineNr">23 </span> <span class="Delimiter">{</span>
<span id="L24" class="LineNr">24 </span> compare key, <span class="Constant">0x6a</span>/j
<span id="L25" class="LineNr">25 </span> <span class="PreProc">break-if-!=</span>
<span id="L26" class="LineNr">26 </span> draw-code-point-at-cursor <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x7c</span>/vertical-bar, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L27" class="LineNr">27 </span> <a href='../501draw-text.mu.html#L47'>move-cursor-down</a> <span class="Constant">0</span>
<span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span>
<span id="L29" class="LineNr">29 </span> <span class="Delimiter">{</span>
<span id="L30" class="LineNr">30 </span> compare key, <span class="Constant">0x6b</span>/k
<span id="L31" class="LineNr">31 </span> <span class="PreProc">break-if-!=</span>
<span id="L32" class="LineNr">32 </span> draw-code-point-at-cursor <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x7c</span>/vertical-bar, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L33" class="LineNr">33 </span> <a href='../501draw-text.mu.html#L34'>move-cursor-up</a> <span class="Constant">0</span>
<span id="L34" class="LineNr">34 </span> <span class="Delimiter">}</span>
<span id="L35" class="LineNr">35 </span> <span class="Delimiter">{</span>
<span id="L36" class="LineNr">36 </span> compare key, <span class="Constant">0x6c</span>/l
<span id="L37" class="LineNr">37 </span> <span class="PreProc">break-if-!=</span>
<span id="L38" class="LineNr">38 </span> <span class="PreProc">var</span> g/eax: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x2d</span>/dash
<span id="L39" class="LineNr">39 </span> draw-code-point-at-cursor <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/dash, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
<span id="L40" class="LineNr">40 </span> <a href='../501draw-text.mu.html#L16'>move-cursor-right</a> <span class="Constant">0</span>
<span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span>
<span id="L42" class="LineNr">42 </span> <span class="PreProc">loop</span>
<span id="L43" class="LineNr">43 </span> <span class="Delimiter">}</span>
<span id="L44" class="LineNr">44 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

4
html/apps/ex8.mu.html generated
View File

@ -61,8 +61,8 @@ if ('onhashchange' in window) {
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># To build a disk image:</span>
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate apps/ex8.mu # emits code.img</span>
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Set a breakpoint at 0x7c00 and start stepping.</span>
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 code.img</span>
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># You shouldn't see any exceptions.</span>
<span id="L8" class="LineNr"> 8 </span>
<span id="L9" class="LineNr"> 9 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex8.mu.html#L9'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L10" class="LineNr">10 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>

79
html/apps/ex9.mu.html generated
View File

@ -68,47 +68,46 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># echo 'abc def ghi' |dd of=data.img conv=notrunc</span>
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># 3. Familiarize yourself with how the data disk looks within xxd:</span>
<span id="L10" class="LineNr">10 </span><span class="muComment"># xxd data.img |head</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># 4. Run in an emulator, either Qemu or Bochs.</span>
<span id="L11" class="LineNr">11 </span><span class="muComment"># 4. Run:</span>
<span id="L12" class="LineNr">12 </span><span class="muComment"># qemu-system-i386 -hda code.img -hdb data.img</span>
<span id="L13" class="LineNr">13 </span><span class="muComment"># bochs -f bochsrc.2disks</span>
<span id="L14" class="LineNr">14 </span><span class="muComment"># 5. Exit the emulator.</span>
<span id="L15" class="LineNr">15 </span><span class="muComment"># 6. Notice that the data disk now contains the word count of the original text.</span>
<span id="L16" class="LineNr">16 </span><span class="muComment"># xxd data.img |head</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='ex9.mu.html#L18'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> text-storage: (stream byte <span class="Constant">0x200</span>)
<span id="L20" class="LineNr">20 </span> <span class="PreProc">var</span> text/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address text-storage
<span id="L21" class="LineNr">21 </span> <a href='../510disk.mu.html#L1'>load-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">1</span>/num-sectors, text
<span id="L22" class="LineNr">22 </span>
<span id="L23" class="LineNr">23 </span> <span class="PreProc">var</span> <a href='ex9.mu.html#L31'>word-count</a>/eax: int <span class="Special">&lt;-</span> <a href='ex9.mu.html#L31'>word-count</a> text
<span id="L24" class="LineNr">24 </span>
<span id="L25" class="LineNr">25 </span> <span class="PreProc">var</span> result-storage: (stream byte <span class="Constant">0x10</span>)
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> address result-storage
<span id="L27" class="LineNr">27 </span> <a href='../126write-int-decimal.subx.html#L8'>write-int32-decimal</a> result, <a href='ex9.mu.html#L31'>word-count</a>
<span id="L28" class="LineNr">28 </span> <a href='../510disk.mu.html#L23'>store-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">1</span>/num-sectors, 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='ex9.mu.html#L31'>word-count</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L32" class="LineNr">32 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L33" class="LineNr">33 </span> <span class="Delimiter">{</span>
<span id="L34" class="LineNr">34 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> in
<span id="L35" class="LineNr">35 </span> compare done?, <span class="Constant">0</span>/false
<span id="L36" class="LineNr">36 </span> <span class="PreProc">break-if-!=</span>
<span id="L37" class="LineNr">37 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in
<span id="L38" class="LineNr">38 </span> <span class="Delimiter">{</span>
<span id="L39" class="LineNr">39 </span> compare g, <span class="Constant">0x20</span>/space
<span id="L40" class="LineNr">40 </span> <span class="PreProc">break-if-!=</span>
<span id="L41" class="LineNr">41 </span> result <span class="Special">&lt;-</span> increment
<span id="L42" class="LineNr">42 </span> <span class="Delimiter">}</span>
<span id="L43" class="LineNr">43 </span> <span class="Delimiter">{</span>
<span id="L44" class="LineNr">44 </span> compare g, <span class="Constant">0xa</span>/newline
<span id="L45" class="LineNr">45 </span> <span class="PreProc">break-if-!=</span>
<span id="L46" class="LineNr">46 </span> result <span class="Special">&lt;-</span> increment
<span id="L47" class="LineNr">47 </span> <span class="Delimiter">}</span>
<span id="L48" class="LineNr">48 </span> <span class="PreProc">loop</span>
<span id="L49" class="LineNr">49 </span> <span class="Delimiter">}</span>
<span id="L50" class="LineNr">50 </span> <span class="PreProc">return</span> result
<span id="L51" class="LineNr">51 </span><span class="Delimiter">}</span>
<span id="L13" class="LineNr">13 </span><span class="muComment"># 5. Exit the emulator.</span>
<span id="L14" class="LineNr">14 </span><span class="muComment"># 6. Notice that the data disk now contains the word count of the original text.</span>
<span id="L15" class="LineNr">15 </span><span class="muComment"># xxd data.img |head</span>
<span id="L16" class="LineNr">16 </span>
<span id="L17" class="LineNr">17 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex9.mu.html#L17'>main</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), keyboard: (addr keyboard), data-disk: (addr disk) <span class="Delimiter">{</span>
<span id="L18" class="LineNr">18 </span> <span class="PreProc">var</span> text-storage: (stream byte <span class="Constant">0x200</span>)
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> text/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address text-storage
<span id="L20" class="LineNr">20 </span> <a href='../510disk.mu.html#L1'>load-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">1</span>/num-sectors, text
<span id="L21" class="LineNr">21 </span>
<span id="L22" class="LineNr">22 </span> <span class="PreProc">var</span> <a href='ex9.mu.html#L30'>word-count</a>/eax: int <span class="Special">&lt;-</span> <a href='ex9.mu.html#L30'>word-count</a> text
<span id="L23" class="LineNr">23 </span>
<span id="L24" class="LineNr">24 </span> <span class="PreProc">var</span> result-storage: (stream byte <span class="Constant">0x10</span>)
<span id="L25" class="LineNr">25 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> address result-storage
<span id="L26" class="LineNr">26 </span> <a href='../126write-int-decimal.subx.html#L8'>write-int32-decimal</a> result, <a href='ex9.mu.html#L30'>word-count</a>
<span id="L27" class="LineNr">27 </span> <a href='../510disk.mu.html#L23'>store-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">1</span>/num-sectors, result
<span id="L28" class="LineNr">28 </span><span class="Delimiter">}</span>
<span id="L29" class="LineNr">29 </span>
<span id="L30" class="LineNr">30 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex9.mu.html#L30'>word-count</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L31" class="LineNr">31 </span> <span class="PreProc">var</span> result/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L32" class="LineNr">32 </span> <span class="Delimiter">{</span>
<span id="L33" class="LineNr">33 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> in
<span id="L34" class="LineNr">34 </span> compare done?, <span class="Constant">0</span>/false
<span id="L35" class="LineNr">35 </span> <span class="PreProc">break-if-!=</span>
<span id="L36" class="LineNr">36 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in
<span id="L37" class="LineNr">37 </span> <span class="Delimiter">{</span>
<span id="L38" class="LineNr">38 </span> compare g, <span class="Constant">0x20</span>/space
<span id="L39" class="LineNr">39 </span> <span class="PreProc">break-if-!=</span>
<span id="L40" class="LineNr">40 </span> result <span class="Special">&lt;-</span> increment
<span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span>
<span id="L42" class="LineNr">42 </span> <span class="Delimiter">{</span>
<span id="L43" class="LineNr">43 </span> compare g, <span class="Constant">0xa</span>/newline
<span id="L44" class="LineNr">44 </span> <span class="PreProc">break-if-!=</span>
<span id="L45" class="LineNr">45 </span> result <span class="Special">&lt;-</span> increment
<span id="L46" class="LineNr">46 </span> <span class="Delimiter">}</span>
<span id="L47" class="LineNr">47 </span> <span class="PreProc">loop</span>
<span id="L48" class="LineNr">48 </span> <span class="Delimiter">}</span>
<span id="L49" class="LineNr">49 </span> <span class="PreProc">return</span> result
<span id="L50" class="LineNr">50 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

View File

@ -90,10 +90,10 @@ if ('onhashchange' in window) {
<span id="L26" class="LineNr"> 26 </span> <a href='hest-life.mu.html#L718'>initialize-environment</a> env
<span id="L27" class="LineNr"> 27 </span> <span class="PreProc">var</span> second-buffer: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L28" class="LineNr"> 28 </span> <span class="PreProc">var</span> second-screen/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address second-buffer
<span id="L29" class="LineNr"> 29 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> second-screen, <span class="Constant">0x80</span>, <span class="Constant">0x30</span>, <span class="Constant">1</span>/include-pixels
<span id="L29" class="LineNr"> 29 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> second-screen, <span class="Constant">0x80</span>, <span class="Constant">0x30</span>, <span class="Constant">1</span>/include-pixels
<span id="L30" class="LineNr"> 30 </span> <a href='hest-life.mu.html#L63'>render</a> second-screen, env
<span id="L31" class="LineNr"> 31 </span> <a href='../500fake-screen.mu.html#L588'>convert-graphemes-to-pixels</a> second-screen
<span id="L32" class="LineNr"> 32 </span> <a href='../500fake-screen.mu.html#L548'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L31" class="LineNr"> 31 </span> convert-graphemes-to-pixels second-screen
<span id="L32" class="LineNr"> 32 </span> <a href='../500fake-screen.mu.html#L620'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L33" class="LineNr"> 33 </span> <span class="Delimiter">{</span>
<span id="L34" class="LineNr"> 34 </span> <a href='hest-life.mu.html#L595'>edit</a> keyboard, env
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> play?/eax: (addr boolean) <span class="Special">&lt;-</span> get env, play?
@ -101,10 +101,10 @@ if ('onhashchange' in window) {
<span id="L37" class="LineNr"> 37 </span> <span class="Delimiter">{</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">break-if-=</span>
<span id="L39" class="LineNr"> 39 </span> <a href='hest-life.mu.html#L679'>step</a> env
<span id="L40" class="LineNr"> 40 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> second-screen
<span id="L40" class="LineNr"> 40 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> second-screen
<span id="L41" class="LineNr"> 41 </span> <a href='hest-life.mu.html#L63'>render</a> second-screen, env
<span id="L42" class="LineNr"> 42 </span> <a href='../500fake-screen.mu.html#L588'>convert-graphemes-to-pixels</a> second-screen
<span id="L43" class="LineNr"> 43 </span> <a href='../500fake-screen.mu.html#L548'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L42" class="LineNr"> 42 </span> convert-graphemes-to-pixels second-screen
<span id="L43" class="LineNr"> 43 </span> <a href='../500fake-screen.mu.html#L620'>copy-pixels</a> second-screen, <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L44" class="LineNr"> 44 </span> <span class="Delimiter">}</span>
<span id="L45" class="LineNr"> 45 </span> <a href='hest-life.mu.html#L1019'>linger</a>
<span id="L46" class="LineNr"> 46 </span> <span class="PreProc">loop</span>
@ -130,13 +130,13 @@ if ('onhashchange' in window) {
<span id="L66" class="LineNr"> 66 </span> compare *zoom, <span class="Constant">0</span>
<span id="L67" class="LineNr"> 67 </span> <span class="Delimiter">{</span>
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">break-if-!=</span>
<span id="L69" class="LineNr"> 69 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L69" class="LineNr"> 69 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L70" class="LineNr"> 70 </span> <a href='hest-life.mu.html#L92'>render0</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, self
<span id="L71" class="LineNr"> 71 </span> <span class="Delimiter">}</span>
<span id="L72" class="LineNr"> 72 </span> compare *zoom, <span class="Constant">1</span>
<span id="L73" class="LineNr"> 73 </span> <span class="Delimiter">{</span>
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">break-if-!=</span>
<span id="L75" class="LineNr"> 75 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L75" class="LineNr"> 75 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L76" class="LineNr"> 76 </span> <a href='hest-life.mu.html#L212'>render1</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, self
<span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">}</span>
<span id="L78" class="LineNr"> 78 </span> compare *zoom, <span class="Constant">4</span>
@ -146,8 +146,8 @@ if ('onhashchange' in window) {
<span id="L82" class="LineNr"> 82 </span> <span class="Delimiter">}</span>
<span id="L83" class="LineNr"> 83 </span> <span class="muComment"># clock</span>
<span id="L84" class="LineNr"> 84 </span> <span class="PreProc">var</span> tick-a/eax: (addr int) <span class="Special">&lt;-</span> get self, tick
<span id="L85" class="LineNr"> 85 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x78</span>/x, <span class="Constant">0</span>/y
<span id="L86" class="LineNr"> 86 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *tick-a, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L85" class="LineNr"> 85 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x78</span>/x, <span class="Constant">0</span>/y
<span id="L86" class="LineNr"> 86 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, *tick-a, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L87" class="LineNr"> 87 </span><span class="Delimiter">}</span>
<span id="L88" class="LineNr"> 88 </span>
<span id="L89" class="LineNr"> 89 </span><span class="muComment"># Lots of hardcoded constants for now.</span>
@ -180,8 +180,8 @@ if ('onhashchange' in window) {
<span id="L116" class="LineNr"> 116 </span> <a href='../507line.mu.html#L86'>draw-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x350</span>/xmin <span class="Constant">0x170</span>/ymin, <span class="Constant">0x370</span>/xmax <span class="Constant">0x190</span>/ymax, color
<span id="L117" class="LineNr"> 117 </span> <span class="muComment"># sum node</span>
<span id="L118" class="LineNr"> 118 </span> <a href='../507line.mu.html#L86'>draw-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x170</span>/xsmin <span class="Constant">0x140</span>/ysmin, <span class="Constant">0x190</span>/xsmax <span class="Constant">0x160</span>/ysmax, <span class="Constant">0x40</span>/color
<span id="L119" class="LineNr"> 119 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/scol, <span class="Constant">0x13</span>/srow
<span id="L120" class="LineNr"> 120 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;+&quot;</span>, <span class="Constant">0xf</span>/color, <span class="Constant">0</span>/bg
<span id="L119" class="LineNr"> 119 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>/scol, <span class="Constant">0x13</span>/srow
<span id="L120" class="LineNr"> 120 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;+&quot;</span>, <span class="Constant">0xf</span>/color, <span class="Constant">0</span>/bg
<span id="L121" class="LineNr"> 121 </span> <span class="muComment"># conveyors from neighboring inputs to sum node</span>
<span id="L122" class="LineNr"> 122 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xa0</span>/x0 <span class="Constant">0x20</span>/y0, <span class="Constant">0x100</span>/x1 <span class="Constant">0x150</span>/ys, <span class="Constant">0x180</span>/xs <span class="Constant">0x150</span>/ys, <span class="Constant">4</span>/color
<span id="L123" class="LineNr"> 123 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xa0</span>/x0 <span class="Constant">0x180</span>/y0, <span class="Constant">0xc0</span>/x1 <span class="Constant">0x150</span>/ys, <span class="Constant">0x180</span>/xs <span class="Constant">0x150</span>/ys, <span class="Constant">4</span>/color
@ -193,8 +193,8 @@ if ('onhashchange' in window) {
<span id="L129" class="LineNr"> 129 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x360</span>/x0 <span class="Constant">0x2e0</span>/y0, <span class="Constant">0x180</span>/x1 <span class="Constant">0x200</span>/y1, <span class="Constant">0x180</span>/xs <span class="Constant">0x150</span>/ys, <span class="Constant">4</span>/color
<span id="L130" class="LineNr"> 130 </span> <span class="muComment"># filter node</span>
<span id="L131" class="LineNr"> 131 </span> <a href='../507line.mu.html#L86'>draw-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x200</span>/xfmin <span class="Constant">0x1c0</span>/yfmin, <span class="Constant">0x220</span>/xfmax <span class="Constant">0x1e0</span>/yfmax, <span class="Constant">0x31</span>/color
<span id="L132" class="LineNr"> 132 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x40</span>/fcol, <span class="Constant">0x1b</span>/frow
<span id="L133" class="LineNr"> 133 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;?&quot;</span>, <span class="Constant">0xf</span>/color, <span class="Constant">0</span>/bg
<span id="L132" class="LineNr"> 132 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x40</span>/fcol, <span class="Constant">0x1b</span>/frow
<span id="L133" class="LineNr"> 133 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;?&quot;</span>, <span class="Constant">0xf</span>/color, <span class="Constant">0</span>/bg
<span id="L134" class="LineNr"> 134 </span> <span class="muComment"># conveyor from sum node to filter node</span>
<span id="L135" class="LineNr"> 135 </span> <a href='../507line.mu.html#L1'>draw-line</a> <a href='../500fake-screen.mu.html#L14'>screen</a> <span class="Constant">0x180</span>/xs, <span class="Constant">0x150</span>/ys, <span class="Constant">0x210</span>/xf, <span class="Constant">0x1d0</span>/yf, <span class="Constant">0xa2</span>/color
<span id="L136" class="LineNr"> 136 </span> <span class="muComment"># cell outputs at corners</span>
@ -251,9 +251,9 @@ if ('onhashchange' in window) {
<span id="L187" class="LineNr"> 187 </span> <span class="PreProc">var</span> three-f/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> convert three
<span id="L188" class="LineNr"> 188 </span> u <span class="Special">&lt;-</span> divide three-f
<span id="L189" class="LineNr"> 189 </span> <a href='hest-life.mu.html#L588'>draw-linear-point</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, u, <span class="Constant">0x180</span>/xs, <span class="Constant">0x150</span>/ys, <span class="Constant">0x210</span>/xf, <span class="Constant">0x1d0</span>/yf, <span class="Constant">7</span>/color, <span class="Constant">4</span>/radius
<span id="L190" class="LineNr"> 190 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x3a</span>/scol, <span class="Constant">0x18</span>/srow
<span id="L190" class="LineNr"> 190 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x3a</span>/scol, <span class="Constant">0x18</span>/srow
<span id="L191" class="LineNr"> 191 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='hest-life.mu.html#L953'>num-live-neighbors</a> self, <span class="Constant">0x80</span>/curx, <span class="Constant">0x60</span>/cury
<span id="L192" class="LineNr"> 192 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L192" class="LineNr"> 192 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L193" class="LineNr"> 193 </span> <span class="PreProc">return</span>
<span id="L194" class="LineNr"> 194 </span> <span class="Delimiter">}</span>
<span id="L195" class="LineNr"> 195 </span> <span class="muComment"># final 7 time steps for updating output</span>
@ -369,17 +369,17 @@ if ('onhashchange' in window) {
<span id="L305" class="LineNr"> 305 </span> <a href='../507line.mu.html#L86'>draw-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2a0</span>/xfmin <span class="Constant">0x218</span>/yfmin, <span class="Constant">0x2b0</span>/xfmax <span class="Constant">0x228</span>/yfmax, <span class="Constant">0x31</span>/color
<span id="L306" class="LineNr"> 306 </span> <span class="muComment"># neighbor counts</span>
<span id="L307" class="LineNr"> 307 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='hest-life.mu.html#L953'>num-live-neighbors</a> self, <span class="Constant">0x80</span>/curx, <span class="Constant">0x60</span>/cury
<span id="L308" class="LineNr"> 308 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>, <span class="Constant">0xe</span>
<span id="L309" class="LineNr"> 309 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L308" class="LineNr"> 308 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>, <span class="Constant">0xe</span>
<span id="L309" class="LineNr"> 309 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L310" class="LineNr"> 310 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='hest-life.mu.html#L953'>num-live-neighbors</a> self, <span class="Constant">0x81</span>/curx, <span class="Constant">0x60</span>/cury
<span id="L311" class="LineNr"> 311 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x52</span>, <span class="Constant">0xe</span>
<span id="L312" class="LineNr"> 312 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L311" class="LineNr"> 311 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x52</span>, <span class="Constant">0xe</span>
<span id="L312" class="LineNr"> 312 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L313" class="LineNr"> 313 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='hest-life.mu.html#L953'>num-live-neighbors</a> self, <span class="Constant">0x80</span>/curx, <span class="Constant">0x61</span>/cury
<span id="L314" class="LineNr"> 314 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>, <span class="Constant">0x20</span>
<span id="L315" class="LineNr"> 315 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L314" class="LineNr"> 314 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x2d</span>, <span class="Constant">0x20</span>
<span id="L315" class="LineNr"> 315 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L316" class="LineNr"> 316 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='hest-life.mu.html#L953'>num-live-neighbors</a> self, <span class="Constant">0x81</span>/curx, <span class="Constant">0x61</span>/cury
<span id="L317" class="LineNr"> 317 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x52</span>, <span class="Constant">0x20</span>
<span id="L318" class="LineNr"> 318 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L317" class="LineNr"> 317 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x52</span>, <span class="Constant">0x20</span>
<span id="L318" class="LineNr"> 318 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, n, <span class="Constant">0xf</span>/fg <span class="Constant">0</span>/bg
<span id="L319" class="LineNr"> 319 </span> <span class="muComment"># cell 0: conveyors from neighboring inputs to sum node</span>
<span id="L320" class="LineNr"> 320 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xc0</span>/x0 <span class="Constant">0x40</span>/y0, <span class="Constant">0x100</span>/x1 <span class="Constant">0xd0</span>/ys, <span class="Constant">0x150</span>/xs <span class="Constant">0xd0</span>/ys, <span class="Constant">4</span>/color
<span id="L321" class="LineNr"> 321 </span> <a href='../509bezier.mu.html#L14'>draw-monotonic-bezier</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xc0</span>/x0 <span class="Constant">0xe8</span>/y0, <span class="Constant">0xc0</span>/x1 <span class="Constant">0xd0</span>/ys, <span class="Constant">0x150</span>/xs <span class="Constant">0xd0</span>/ys, <span class="Constant">4</span>/color

View File

@ -191,7 +191,7 @@ if ('onhashchange' in window) {
<span id="L127" class="LineNr">127 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-fixed.mu.html#L127'>mandelbrot</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), scene-cx-f: int, scene-cy-f: int, scene-width-f: int <span class="Delimiter">{</span>
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> b/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L130" class="LineNr">130 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L130" class="LineNr">130 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> width/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy a
<span id="L132" class="LineNr">132 </span> width <span class="Special">&lt;-</span> shift-left <span class="Constant">3</span>/log2-font-width
<span id="L133" class="LineNr">133 </span> <span class="PreProc">var</span> height/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy b
@ -214,7 +214,7 @@ if ('onhashchange' in window) {
<span id="L150" class="LineNr">150 </span> dummy, color <span class="Special">&lt;-</span> <a href='../314divide.subx.html#L3'>integer-divide</a> iterations, <span class="Constant">0x18</span>/<span class="Constant">24</span>/size-of-cycle-0
<span id="L151" class="LineNr">151 </span> color <span class="Special">&lt;-</span> add <span class="Constant">0x20</span>/cycle-0
<span id="L152" class="LineNr">152 </span> <span class="Delimiter">}</span>
<span id="L153" class="LineNr">153 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L153" class="LineNr">153 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L154" class="LineNr">154 </span> x <span class="Special">&lt;-</span> increment
<span id="L155" class="LineNr">155 </span> <span class="PreProc">loop</span>
<span id="L156" class="LineNr">156 </span> <span class="Delimiter">}</span>

View File

@ -79,7 +79,7 @@ if ('onhashchange' in window) {
<span id="L17" class="LineNr"> 17 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-silhouette.mu.html#L17'>mandelbrot</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Delimiter">{</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> b/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L20" class="LineNr"> 20 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L20" class="LineNr"> 20 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L21" class="LineNr"> 21 </span> <span class="PreProc">var</span> width/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy a
<span id="L22" class="LineNr"> 22 </span> width <span class="Special">&lt;-</span> shift-left <span class="Constant">3</span>/log2-font-width
<span id="L23" class="LineNr"> 23 </span> <span class="PreProc">var</span> height/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy b
@ -98,12 +98,12 @@ if ('onhashchange' in window) {
<span id="L36" class="LineNr"> 36 </span> compare iterations, <span class="Constant">0x400</span>/max
<span id="L37" class="LineNr"> 37 </span> <span class="Delimiter">{</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">break-if-&gt;=</span>
<span id="L39" class="LineNr"> 39 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, <span class="Constant">0xf</span>/white
<span id="L39" class="LineNr"> 39 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, <span class="Constant">0xf</span>/white
<span id="L40" class="LineNr"> 40 </span> <span class="Delimiter">}</span>
<span id="L41" class="LineNr"> 41 </span> compare iterations, <span class="Constant">0x400</span>/max
<span id="L42" class="LineNr"> 42 </span> <span class="Delimiter">{</span>
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">break-if-&lt;</span>
<span id="L44" class="LineNr"> 44 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, <span class="Constant">0</span>/black
<span id="L44" class="LineNr"> 44 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, <span class="Constant">0</span>/black
<span id="L45" class="LineNr"> 45 </span> <span class="Delimiter">}</span>
<span id="L46" class="LineNr"> 46 </span> x <span class="Special">&lt;-</span> increment
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">loop</span>

View File

@ -104,7 +104,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr"> 41 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot.mu.html#L41'>mandelbrot</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), scene-cx: float, scene-cy: float, scene-width: float <span class="Delimiter">{</span>
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L43" class="LineNr"> 43 </span> <span class="PreProc">var</span> b/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L44" class="LineNr"> 44 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L44" class="LineNr"> 44 </span> a, b <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> width/<span class="muRegEsi">esi</span>: int <span class="Special">&lt;-</span> copy a
<span id="L46" class="LineNr"> 46 </span> width <span class="Special">&lt;-</span> shift-left <span class="Constant">3</span>/log2-font-width
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">var</span> height/<span class="muRegEdi">edi</span>: int <span class="Special">&lt;-</span> copy b
@ -124,7 +124,7 @@ if ('onhashchange' in window) {
<span id="L61" class="LineNr"> 61 </span> <span class="PreProc">var</span> color/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L62" class="LineNr"> 62 </span> iterations, color <span class="Special">&lt;-</span> <a href='../314divide.subx.html#L3'>integer-divide</a> iterations, <span class="Constant">0x18</span>/<span class="Constant">24</span>/size-of-cycle-0
<span id="L63" class="LineNr"> 63 </span> color <span class="Special">&lt;-</span> add <span class="Constant">0x20</span>/cycle-0
<span id="L64" class="LineNr"> 64 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L64" class="LineNr"> 64 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L65" class="LineNr"> 65 </span> x <span class="Special">&lt;-</span> increment
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">loop</span>
<span id="L67" class="LineNr"> 67 </span> <span class="Delimiter">}</span>

233
html/apps/rpn.mu.html generated
View File

@ -81,15 +81,15 @@ if ('onhashchange' in window) {
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> in-storage: (stream byte <span class="Constant">0x80</span>)
<span id="L20" class="LineNr"> 20 </span> <span class="PreProc">var</span> in/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> address in-storage
<span id="L21" class="LineNr"> 21 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">var</span> space/<span class="muRegEdx">edx</span>: grapheme <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L22" class="LineNr"> 22 </span> <span class="PreProc">var</span> space/<span class="muRegEdx">edx</span>: code-point <span class="Special">&lt;-</span> copy <span class="Constant">0x20</span>
<span id="L23" class="LineNr"> 23 </span> <span class="muComment"># read-eval-print loop</span>
<span id="L24" class="LineNr"> 24 </span> <span class="Delimiter">{</span>
<span id="L25" class="LineNr"> 25 </span> <span class="muComment"># print prompt</span>
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;&gt; &quot;</span>, <span class="Constant">0</span>/x, <span class="Constant">0x80</span>/xmax, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;&gt; &quot;</span>, <span class="Constant">0</span>/x, <span class="Constant">0x80</span>/xmax, y, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L27" class="LineNr"> 27 </span> <span class="muComment"># read line from keyboard</span>
<span id="L28" class="LineNr"> 28 </span> <a href='../106stream.subx.html#L20'>clear-stream</a> in
<span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">{</span>
<span id="L30" class="LineNr"> 30 </span> <a href='../500fake-screen.mu.html#L237'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space
<span id="L30" class="LineNr"> 30 </span> <a href='../500fake-screen.mu.html#L293'>draw-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space
<span id="L31" class="LineNr"> 31 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L32" class="LineNr"> 32 </span> compare key, <span class="Constant">0xa</span>/newline
<span id="L33" class="LineNr"> 33 </span> <span class="PreProc">break-if-=</span>
@ -97,120 +97,119 @@ if ('onhashchange' in window) {
<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">loop-if-=</span>
<span id="L36" class="LineNr"> 36 </span> <span class="PreProc">var</span> key2/eax: int <span class="Special">&lt;-</span> copy key
<span id="L37" class="LineNr"> 37 </span> <a href='../115write-byte.subx.html#L12'>append-byte</a> in, key2
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> copy key2
<span id="L39" class="LineNr"> 39 </span> <a href='../501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, g, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L40" class="LineNr"> 40 </span> <a href='../501draw-text.mu.html#L16'>move-cursor-right</a> <span class="Constant">0</span>
<span id="L41" class="LineNr"> 41 </span> <span class="PreProc">loop</span>
<span id="L42" class="LineNr"> 42 </span> <span class="Delimiter">}</span>
<span id="L43" class="LineNr"> 43 </span> <span class="muComment"># clear cursor</span>
<span id="L44" class="LineNr"> 44 </span> <a href='../501draw-text.mu.html#L84'>draw-grapheme-at-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space, <span class="Constant">3</span>/fg/never-used, <span class="Constant">0</span>/bg
<span id="L45" class="LineNr"> 45 </span> <span class="muComment"># parse and eval</span>
<span id="L46" class="LineNr"> 46 </span> <span class="PreProc">var</span> out/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L62'>simplify</a> in
<span id="L47" class="LineNr"> 47 </span> <span class="muComment"># print</span>
<span id="L48" class="LineNr"> 48 </span> y <span class="Special">&lt;-</span> increment
<span id="L49" class="LineNr"> 49 </span> out, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L337'>draw-int32-decimal-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, out, <span class="Constant">0</span>/xmin, y, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x30</span>/ymax, <span class="Constant">0</span>/x, y, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L50" class="LineNr"> 50 </span> <span class="muComment"># newline</span>
<span id="L51" class="LineNr"> 51 </span> y <span class="Special">&lt;-</span> increment
<span id="L52" class="LineNr"> 52 </span> <span class="muComment">#</span>
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">loop</span>
<span id="L54" class="LineNr"> 54 </span> <span class="Delimiter">}</span>
<span id="L55" class="LineNr"> 55 </span><span class="Delimiter">}</span>
<span id="L56" class="LineNr"> 56 </span>
<span id="L57" class="LineNr"> 57 </span><span class="PreProc">type</span> <a href='rpn.mu.html#L57'>int-stack</a> <span class="Delimiter">{</span>
<span id="L58" class="LineNr"> 58 </span> data: (handle array int)
<span id="L59" class="LineNr"> 59 </span> top: int
<span id="L60" class="LineNr"> 60 </span><span class="Delimiter">}</span>
<span id="L61" class="LineNr"> 61 </span>
<span id="L62" class="LineNr"> 62 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L62'>simplify</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">var</span> word-storage: slice
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">var</span> word/<span class="muRegEcx">ecx</span>: (addr slice) <span class="Special">&lt;-</span> address word-storage
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> stack-storage: <a href='rpn.mu.html#L57'>int-stack</a>
<span id="L66" class="LineNr"> 66 </span> <span class="PreProc">var</span> stack/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L57'>int-stack</a>) <span class="Special">&lt;-</span> address stack-storage
<span id="L67" class="LineNr"> 67 </span> <a href='rpn.mu.html#L116'>initialize-int-stack</a> stack, <span class="Constant">0x10</span>
<span id="L68" class="LineNr"> 68 </span> $simplify:word-loop: <span class="Delimiter">{</span>
<span id="L69" class="LineNr"> 69 </span> <a href='../127next-word.subx.html#L11'>next-word</a> in, word
<span id="L70" class="LineNr"> 70 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L9'>slice-empty?</a> word
<span id="L71" class="LineNr"> 71 </span> compare done?, <span class="Constant">0</span>
<span id="L72" class="LineNr"> 72 </span> <span class="PreProc">break-if-!=</span>
<span id="L73" class="LineNr"> 73 </span> <span class="muComment"># if word is an operator, perform it</span>
<span id="L74" class="LineNr"> 74 </span> <span class="Delimiter">{</span>
<span id="L75" class="LineNr"> 75 </span> <span class="PreProc">var</span> is-add?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;+&quot;</span>
<span id="L76" class="LineNr"> 76 </span> compare is-add?, <span class="Constant">0</span>
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">break-if-=</span>
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L80" class="LineNr"> 80 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L81" class="LineNr"> 81 </span> a <span class="Special">&lt;-</span> add b
<span id="L82" class="LineNr"> 82 </span> <a href='rpn.mu.html#L124'>push-int-stack</a> stack, a
<span id="L83" class="LineNr"> 83 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span>
<span id="L85" class="LineNr"> 85 </span> <span class="Delimiter">{</span>
<span id="L86" class="LineNr"> 86 </span> <span class="PreProc">var</span> is-sub?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;-&quot;</span>
<span id="L87" class="LineNr"> 87 </span> compare is-sub?, <span class="Constant">0</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">break-if-=</span>
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L92" class="LineNr"> 92 </span> a <span class="Special">&lt;-</span> subtract b
<span id="L93" class="LineNr"> 93 </span> <a href='rpn.mu.html#L124'>push-int-stack</a> stack, a
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L95" class="LineNr"> 95 </span> <span class="Delimiter">}</span>
<span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">{</span>
<span id="L97" class="LineNr"> 97 </span> <span class="PreProc">var</span> is-mul?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;*&quot;</span>
<span id="L98" class="LineNr"> 98 </span> compare is-mul?, <span class="Constant">0</span>
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">break-if-=</span>
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L102" class="LineNr">102 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L103" class="LineNr">103 </span> a <span class="Special">&lt;-</span> multiply b
<span id="L104" class="LineNr">104 </span> <a href='rpn.mu.html#L124'>push-int-stack</a> stack, a
<span id="L105" class="LineNr">105 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L106" class="LineNr">106 </span> <span class="Delimiter">}</span>
<span id="L107" class="LineNr">107 </span> <span class="muComment"># otherwise it's an int</span>
<span id="L108" class="LineNr">108 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='../311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> word
<span id="L109" class="LineNr">109 </span> <a href='rpn.mu.html#L124'>push-int-stack</a> stack, n
<span id="L110" class="LineNr">110 </span> <span class="PreProc">loop</span>
<span id="L111" class="LineNr">111 </span> <span class="Delimiter">}</span>
<span id="L112" class="LineNr">112 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L136'>pop-int-stack</a> stack
<span id="L113" class="LineNr">113 </span> <span class="PreProc">return</span> result
<span id="L114" class="LineNr">114 </span><span class="Delimiter">}</span>
<span id="L115" class="LineNr">115 </span>
<span id="L116" class="LineNr">116 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L116'>initialize-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L57'>int-stack</a>), n: int <span class="Delimiter">{</span>
<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L57'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> d/<span class="muRegEdi">edi</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L119" class="LineNr">119 </span> populate d, n
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> top/eax: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L121" class="LineNr">121 </span> copy-to *top, <span class="Constant">0</span>
<span id="L122" class="LineNr">122 </span><span class="Delimiter">}</span>
<span id="L123" class="LineNr">123 </span>
<span id="L124" class="LineNr">124 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L124'>push-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L57'>int-stack</a>), _val: int <span class="Delimiter">{</span>
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L57'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdx">edx</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> data/eax: (addr array int) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> top/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> dest-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> index data, top
<span id="L131" class="LineNr">131 </span> <span class="PreProc">var</span> val/eax: int <span class="Special">&lt;-</span> copy _val
<span id="L132" class="LineNr">132 </span> copy-to *dest-addr, val
<span id="L133" class="LineNr">133 </span> add-to *top-addr, <span class="Constant">1</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="muFunction"><a href='rpn.mu.html#L136'>pop-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L57'>int-stack</a>)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L57'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L138" class="LineNr">138 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L139" class="LineNr">139 </span> <span class="Delimiter">{</span>
<span id="L140" class="LineNr">140 </span> compare *top-addr, <span class="Constant">0</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L142" class="LineNr">142 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L143" class="LineNr">143 </span> <span class="Delimiter">}</span>
<span id="L144" class="LineNr">144 </span> subtract-from *top-addr, <span class="Constant">1</span>
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdx">edx</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L146" class="LineNr">146 </span> <span class="PreProc">var</span> data/eax: (addr array int) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L147" class="LineNr">147 </span> <span class="PreProc">var</span> top/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L148" class="LineNr">148 </span> <span class="PreProc">var</span> result-addr/eax: (addr int) <span class="Special">&lt;-</span> index data, top
<span id="L149" class="LineNr">149 </span> <span class="PreProc">var</span> val/eax: int <span class="Special">&lt;-</span> copy *result-addr
<span id="L150" class="LineNr">150 </span> <span class="PreProc">return</span> val
<span id="L151" class="LineNr">151 </span><span class="Delimiter">}</span>
<span id="L38" class="LineNr"> 38 </span> <span class="PreProc">var</span> c/eax: code-point <span class="Special">&lt;-</span> copy key2
<span id="L39" class="LineNr"> 39 </span> <a href='../501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, c, <span class="Constant">0xf</span>/fg, <span class="Constant">0</span>/bg
<span id="L40" class="LineNr"> 40 </span> <span class="PreProc">loop</span>
<span id="L41" class="LineNr"> 41 </span> <span class="Delimiter">}</span>
<span id="L42" class="LineNr"> 42 </span> <span class="muComment"># clear cursor</span>
<span id="L43" class="LineNr"> 43 </span> <a href='../501draw-text.mu.html#L84'>draw-code-point-at-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, space, <span class="Constant">3</span>/fg/never-used, <span class="Constant">0</span>/bg
<span id="L44" class="LineNr"> 44 </span> <span class="muComment"># parse and eval</span>
<span id="L45" class="LineNr"> 45 </span> <span class="PreProc">var</span> out/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L61'>simplify</a> in
<span id="L46" class="LineNr"> 46 </span> <span class="muComment"># print</span>
<span id="L47" class="LineNr"> 47 </span> y <span class="Special">&lt;-</span> increment
<span id="L48" class="LineNr"> 48 </span> out, y <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L346'>draw-int32-decimal-wrapping-right-then-down</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, out, <span class="Constant">0</span>/xmin, y, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x30</span>/ymax, <span class="Constant">0</span>/x, y, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L49" class="LineNr"> 49 </span> <span class="muComment"># newline</span>
<span id="L50" class="LineNr"> 50 </span> y <span class="Special">&lt;-</span> increment
<span id="L51" class="LineNr"> 51 </span> <span class="muComment">#</span>
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">loop</span>
<span id="L53" class="LineNr"> 53 </span> <span class="Delimiter">}</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">type</span> <a href='rpn.mu.html#L56'>int-stack</a> <span class="Delimiter">{</span>
<span id="L57" class="LineNr"> 57 </span> data: (handle array int)
<span id="L58" class="LineNr"> 58 </span> top: int
<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="muFunction"><a href='rpn.mu.html#L61'>simplify</a></span> in: (addr stream byte)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L62" class="LineNr"> 62 </span> <span class="PreProc">var</span> word-storage: slice
<span id="L63" class="LineNr"> 63 </span> <span class="PreProc">var</span> word/<span class="muRegEcx">ecx</span>: (addr slice) <span class="Special">&lt;-</span> address word-storage
<span id="L64" class="LineNr"> 64 </span> <span class="PreProc">var</span> stack-storage: <a href='rpn.mu.html#L56'>int-stack</a>
<span id="L65" class="LineNr"> 65 </span> <span class="PreProc">var</span> stack/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L56'>int-stack</a>) <span class="Special">&lt;-</span> address stack-storage
<span id="L66" class="LineNr"> 66 </span> <a href='rpn.mu.html#L115'>initialize-int-stack</a> stack, <span class="Constant">0x10</span>
<span id="L67" class="LineNr"> 67 </span> $simplify:word-loop: <span class="Delimiter">{</span>
<span id="L68" class="LineNr"> 68 </span> <a href='../127next-word.subx.html#L11'>next-word</a> in, word
<span id="L69" class="LineNr"> 69 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L9'>slice-empty?</a> word
<span id="L70" class="LineNr"> 70 </span> compare done?, <span class="Constant">0</span>
<span id="L71" class="LineNr"> 71 </span> <span class="PreProc">break-if-!=</span>
<span id="L72" class="LineNr"> 72 </span> <span class="muComment"># if word is an operator, perform it</span>
<span id="L73" class="LineNr"> 73 </span> <span class="Delimiter">{</span>
<span id="L74" class="LineNr"> 74 </span> <span class="PreProc">var</span> is-add?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;+&quot;</span>
<span id="L75" class="LineNr"> 75 </span> compare is-add?, <span class="Constant">0</span>
<span id="L76" class="LineNr"> 76 </span> <span class="PreProc">break-if-=</span>
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L78" class="LineNr"> 78 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L79" class="LineNr"> 79 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L80" class="LineNr"> 80 </span> a <span class="Special">&lt;-</span> add b
<span id="L81" class="LineNr"> 81 </span> <a href='rpn.mu.html#L123'>push-int-stack</a> stack, a
<span id="L82" class="LineNr"> 82 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">}</span>
<span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">{</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> is-sub?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;-&quot;</span>
<span id="L86" class="LineNr"> 86 </span> compare is-sub?, <span class="Constant">0</span>
<span id="L87" class="LineNr"> 87 </span> <span class="PreProc">break-if-=</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L90" class="LineNr"> 90 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L91" class="LineNr"> 91 </span> a <span class="Special">&lt;-</span> subtract b
<span id="L92" class="LineNr"> 92 </span> <a href='rpn.mu.html#L123'>push-int-stack</a> stack, a
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L94" class="LineNr"> 94 </span> <span class="Delimiter">}</span>
<span id="L95" class="LineNr"> 95 </span> <span class="Delimiter">{</span>
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> is-mul?/eax: boolean <span class="Special">&lt;-</span> <a href='../123slice.subx.html#L120'>slice-equal?</a> word, <span class="Constant">&quot;*&quot;</span>
<span id="L97" class="LineNr"> 97 </span> compare is-mul?, <span class="Constant">0</span>
<span id="L98" class="LineNr"> 98 </span> <span class="PreProc">break-if-=</span>
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">var</span> _b/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L100" class="LineNr">100 </span> <span class="PreProc">var</span> b/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _b
<span id="L101" class="LineNr">101 </span> <span class="PreProc">var</span> a/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L102" class="LineNr">102 </span> a <span class="Special">&lt;-</span> multiply b
<span id="L103" class="LineNr">103 </span> <a href='rpn.mu.html#L123'>push-int-stack</a> stack, a
<span id="L104" class="LineNr">104 </span> <span class="PreProc">loop</span> $simplify:word-loop
<span id="L105" class="LineNr">105 </span> <span class="Delimiter">}</span>
<span id="L106" class="LineNr">106 </span> <span class="muComment"># otherwise it's an int</span>
<span id="L107" class="LineNr">107 </span> <span class="PreProc">var</span> n/eax: int <span class="Special">&lt;-</span> <a href='../311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> word
<span id="L108" class="LineNr">108 </span> <a href='rpn.mu.html#L123'>push-int-stack</a> stack, n
<span id="L109" class="LineNr">109 </span> <span class="PreProc">loop</span>
<span id="L110" class="LineNr">110 </span> <span class="Delimiter">}</span>
<span id="L111" class="LineNr">111 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> <a href='rpn.mu.html#L135'>pop-int-stack</a> stack
<span id="L112" class="LineNr">112 </span> <span class="PreProc">return</span> result
<span id="L113" class="LineNr">113 </span><span class="Delimiter">}</span>
<span id="L114" class="LineNr">114 </span>
<span id="L115" class="LineNr">115 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L115'>initialize-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L56'>int-stack</a>), n: int <span class="Delimiter">{</span>
<span id="L116" class="LineNr">116 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L56'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L117" class="LineNr">117 </span> <span class="PreProc">var</span> d/<span class="muRegEdi">edi</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L118" class="LineNr">118 </span> populate d, n
<span id="L119" class="LineNr">119 </span> <span class="PreProc">var</span> top/eax: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L120" class="LineNr">120 </span> copy-to *top, <span class="Constant">0</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="muFunction"><a href='rpn.mu.html#L123'>push-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L56'>int-stack</a>), _val: int <span class="Delimiter">{</span>
<span id="L124" class="LineNr">124 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L56'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L125" class="LineNr">125 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L126" class="LineNr">126 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdx">edx</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L127" class="LineNr">127 </span> <span class="PreProc">var</span> data/eax: (addr array int) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L128" class="LineNr">128 </span> <span class="PreProc">var</span> top/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L129" class="LineNr">129 </span> <span class="PreProc">var</span> dest-addr/<span class="muRegEdx">edx</span>: (addr int) <span class="Special">&lt;-</span> index data, top
<span id="L130" class="LineNr">130 </span> <span class="PreProc">var</span> val/eax: int <span class="Special">&lt;-</span> copy _val
<span id="L131" class="LineNr">131 </span> copy-to *dest-addr, val
<span id="L132" class="LineNr">132 </span> add-to *top-addr, <span class="Constant">1</span>
<span id="L133" class="LineNr">133 </span><span class="Delimiter">}</span>
<span id="L134" class="LineNr">134 </span>
<span id="L135" class="LineNr">135 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L135'>pop-int-stack</a></span> _self: (addr <a href='rpn.mu.html#L56'>int-stack</a>)<span class="PreProc"> -&gt; </span>_/eax: int <span class="Delimiter">{</span>
<span id="L136" class="LineNr">136 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='rpn.mu.html#L56'>int-stack</a>) <span class="Special">&lt;-</span> copy _self
<span id="L137" class="LineNr">137 </span> <span class="PreProc">var</span> top-addr/<span class="muRegEcx">ecx</span>: (addr int) <span class="Special">&lt;-</span> get self, top
<span id="L138" class="LineNr">138 </span> <span class="Delimiter">{</span>
<span id="L139" class="LineNr">139 </span> compare *top-addr, <span class="Constant">0</span>
<span id="L140" class="LineNr">140 </span> <span class="PreProc">break-if-&gt;</span>
<span id="L141" class="LineNr">141 </span> <span class="PreProc">return</span> <span class="Constant">0</span>
<span id="L142" class="LineNr">142 </span> <span class="Delimiter">}</span>
<span id="L143" class="LineNr">143 </span> subtract-from *top-addr, <span class="Constant">1</span>
<span id="L144" class="LineNr">144 </span> <span class="PreProc">var</span> data-ah/<span class="muRegEdx">edx</span>: (addr handle array int) <span class="Special">&lt;-</span> get self, data
<span id="L145" class="LineNr">145 </span> <span class="PreProc">var</span> data/eax: (addr array int) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L146" class="LineNr">146 </span> <span class="PreProc">var</span> top/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy *top-addr
<span id="L147" class="LineNr">147 </span> <span class="PreProc">var</span> result-addr/eax: (addr int) <span class="Special">&lt;-</span> index data, top
<span id="L148" class="LineNr">148 </span> <span class="PreProc">var</span> val/eax: int <span class="Special">&lt;-</span> copy *result-addr
<span id="L149" class="LineNr">149 </span> <span class="PreProc">return</span> val
<span id="L150" class="LineNr">150 </span><span class="Delimiter">}</span>
</pre>
</body>
</html>

1533
html/boot.subx.html generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -121,12 +121,12 @@ if ('onhashchange' in window) {
<span id="L57" class="LineNr"> 57 </span> <span class="PreProc">var</span> s/<span class="muRegEbx">ebx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _s
<span id="L58" class="LineNr"> 58 </span> <span class="PreProc">var</span> sector-count/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0x400</span> <span class="muComment"># test_data</span>
<span id="L59" class="LineNr"> 59 </span><span class="CommentedCode">#? var sector-count/eax: int &lt;- copy 0x20000 # largest size tested; slow</span>
<span id="L60" class="LineNr"> 60 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0</span>/y <span class="muComment"># aborts clobber the screen starting x=0</span>
<span id="L61" class="LineNr"> 61 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;loading &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L62" class="LineNr"> 62 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, sector-count, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L63" class="LineNr"> 63 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; sectors from data disk..&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L60" class="LineNr"> 60 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">0</span>/y <span class="muComment"># aborts clobber the screen starting x=0</span>
<span id="L61" class="LineNr"> 61 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;loading &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L62" class="LineNr"> 62 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, sector-count, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L63" class="LineNr"> 63 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; sectors from data disk..&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L64" class="LineNr"> 64 </span> <a href='../510disk.mu.html#L1'>load-sectors</a> data-disk, <span class="Constant">0</span>/lba, sector-count, s
<span id="L65" class="LineNr"> 65 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;done&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L65" class="LineNr"> 65 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;done&quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L66" class="LineNr"> 66 </span> <span class="muComment"># parse global data structures out of the stream</span>
<span id="L67" class="LineNr"> 67 </span> <span class="PreProc">var</span> users-h: (handle array <a href='main.mu.html#L7'>user</a>)
<span id="L68" class="LineNr"> 68 </span> <span class="PreProc">var</span> users-ah/eax: (addr handle array <a href='main.mu.html#L7'>user</a>) <span class="Special">&lt;-</span> address users-h
@ -153,7 +153,7 @@ if ('onhashchange' in window) {
<span id="L89" class="LineNr"> 89 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> keyboard
<span id="L90" class="LineNr"> 90 </span> compare key, <span class="Constant">0</span>
<span id="L91" class="LineNr"> 91 </span> <span class="PreProc">loop-if-=</span>
<span id="L92" class="LineNr"> 92 </span> <a href='environment.mu.html#L764'>update-environment</a> env, key, users, channels, items
<span id="L92" class="LineNr"> 92 </span> <a href='environment.mu.html#L765'>update-environment</a> env, key, users, channels, items
<span id="L93" class="LineNr"> 93 </span> <span class="Delimiter">}</span>
<span id="L94" class="LineNr"> 94 </span> <span class="PreProc">loop</span>
<span id="L95" class="LineNr"> 95 </span> <span class="Delimiter">}</span>
@ -176,12 +176,12 @@ if ('onhashchange' in window) {
<span id="L112" class="LineNr">112 </span> <span class="PreProc">var</span> c/eax: byte <span class="Special">&lt;-</span> <a href='../112read-byte.subx.html#L47'>peek-byte</a> in
<span id="L113" class="LineNr">113 </span> compare c, <span class="Constant">0</span>
<span id="L114" class="LineNr">114 </span> <span class="PreProc">break-if-=</span>
<span id="L115" class="LineNr">115 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">1</span>/y
<span id="L116" class="LineNr">116 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;parsed &quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L117" class="LineNr">117 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, user-idx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L118" class="LineNr">118 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; users, &quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L119" class="LineNr">119 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, item-idx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L120" class="LineNr">120 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; posts/comments&quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L115" class="LineNr">115 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span>/x <span class="Constant">1</span>/y
<span id="L116" class="LineNr">116 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;parsed &quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L117" class="LineNr">117 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, user-idx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L118" class="LineNr">118 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; users, &quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L119" class="LineNr">119 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, item-idx, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L120" class="LineNr">120 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; posts/comments&quot;</span> <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L121" class="LineNr">121 </span> <a href='../106stream.subx.html#L20'>clear-stream</a> record
<span id="L122" class="LineNr">122 </span> <a href='main.mu.html#L142'>parse-record</a> in, record
<span id="L123" class="LineNr">123 </span> <span class="PreProc">var</span> user?/eax: boolean <span class="Special">&lt;-</span> <a href='main.mu.html#L178'>user-record?</a> record
@ -208,9 +208,9 @@ if ('onhashchange' in window) {
<span id="L144" class="LineNr">144 </span> compare paren, <span class="Constant">0x28</span>/open-paren
<span id="L145" class="LineNr">145 </span> <span class="Delimiter">{</span>
<span id="L146" class="LineNr">146 </span> <span class="PreProc">break-if-=</span>
<span id="L147" class="LineNr">147 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span> <span class="Constant">0x10</span>
<span id="L147" class="LineNr">147 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span> <span class="Constant">0x10</span>
<span id="L148" class="LineNr">148 </span> <span class="PreProc">var</span> c/eax: int <span class="Special">&lt;-</span> copy paren
<span id="L149" class="LineNr">149 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen c, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L149" class="LineNr">149 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen c, <span class="Constant">5</span>/fg <span class="Constant">0</span>/bg
<span id="L150" class="LineNr">150 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;parse-record: (&quot;</span>
<span id="L151" class="LineNr">151 </span> <span class="Delimiter">}</span>
<span id="L152" class="LineNr">152 </span> <span class="PreProc">var</span> paren-int/eax: int <span class="Special">&lt;-</span> copy paren

8949
html/font.subx.html generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -78,10 +78,10 @@ if ('onhashchange' in window) {
<span id="L22" class="LineNr">22 </span> 3d/compare-eax-and 0/imm32
<span id="L23" class="LineNr">23 </span> 75/jump-if-!= <span class="Constant">break</span>/disp8
<span id="L24" class="LineNr">24 </span> c7 0/subop/copy *Running-tests? 0/imm32/false
<span id="L25" class="LineNr">25 </span> (<a href='500fake-screen.mu.html#L385'>clear-real-screen</a>)
<span id="L26" class="LineNr">26 </span> c7 0/subop/copy *<span class="SpecialChar"><a href='103grapheme.subx.html#L231'>Real-screen-cursor-x</a></span> 0/imm32
<span id="L27" class="LineNr">27 </span> c7 0/subop/copy *<span class="SpecialChar"><a href='103grapheme.subx.html#L233'>Real-screen-cursor-y</a></span> 0/imm32
<span id="L28" class="LineNr">28 </span> (main 0 0 <span class="SpecialChar"><a href='boot.subx.html#L949'>Primary-bus-secondary-drive</a></span>)
<span id="L25" class="LineNr">25 </span> (<a href='500fake-screen.mu.html#L441'>clear-real-screen</a>)
<span id="L26" class="LineNr">26 </span> c7 0/subop/copy *<span class="SpecialChar"><a href='103glyph.subx.html#L362'>Real-screen-cursor-x</a></span> 0/imm32
<span id="L27" class="LineNr">27 </span> c7 0/subop/copy *<span class="SpecialChar"><a href='103glyph.subx.html#L364'>Real-screen-cursor-y</a></span> 0/imm32
<span id="L28" class="LineNr">28 </span> (main 0 0 <span class="SpecialChar"><a href='boot.subx.html#L735'>Primary-bus-secondary-drive</a></span>)
<span id="L29" class="LineNr">29 </span> }
<span id="L30" class="LineNr">30 </span>
<span id="L31" class="LineNr">31 </span> <span class="subxComment"># hang indefinitely</span>

View File

@ -268,7 +268,7 @@ if ('onhashchange' in window) {
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> dest-ah/eax: (addr handle <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> get out-addr, screen-data
<span id="L209" class="LineNr">209 </span> <a href='../120allocate.subx.html#L43'>allocate</a> dest-ah
<span id="L210" class="LineNr">210 </span> <span class="PreProc">var</span> dest-addr/eax: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *dest-ah
<span id="L211" class="LineNr">211 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> dest-addr, width, height, pixel-graphics?
<span id="L211" class="LineNr">211 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> dest-addr, width, height, pixel-graphics?
<span id="L212" class="LineNr">212 </span><span class="Delimiter">}</span>
<span id="L213" class="LineNr">213 </span>
<span id="L214" class="LineNr">214 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='cell.mu.html#L214'>screen?</a></span> _x: (addr <a href='cell.mu.html#L1'>cell</a>)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
@ -292,7 +292,7 @@ if ('onhashchange' in window) {
<span id="L232" class="LineNr">232 </span> <span class="Delimiter">}</span>
<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> screen-ah/eax: (addr handle <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> get self, screen-data
<span id="L234" class="LineNr">234 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/eax: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *screen-ah
<span id="L235" class="LineNr">235 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L235" class="LineNr">235 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L236" class="LineNr">236 </span><span class="Delimiter">}</span>
<span id="L237" class="LineNr">237 </span>
<span id="L238" class="LineNr">238 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='cell.mu.html#L238'>allocate-keyboard</a></span> _out: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Delimiter">{</span>

View File

@ -89,7 +89,7 @@ if ('onhashchange' in window) {
<span id="L24" class="LineNr"> 24 </span> <span class="muComment"># setup: screen</span>
<span id="L25" class="LineNr"> 25 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L26" class="LineNr"> 26 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L27" class="LineNr"> 27 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L27" class="LineNr"> 27 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L28" class="LineNr"> 28 </span> <span class="muComment"># type some code into sandbox</span>
<span id="L29" class="LineNr"> 29 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;(+ 3 4)&quot;</span> <span class="muComment"># we don't have any global definitions here, so no macros</span>
<span id="L30" class="LineNr"> 30 </span> <span class="muComment"># run code in sandbox</span>
@ -99,12 +99,12 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr"> 34 </span> <span class="muComment"># top row blank for now</span>
<span id="L35" class="LineNr"> 35 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/0&quot;</span>
<span id="L36" class="LineNr"> 36 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/y, <span class="Constant">&quot; <a href='../500fake-screen.mu.html#L14'>screen</a>: &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/1&quot;</span>
<span id="L37" class="LineNr"> 37 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">2</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/2&quot;</span>
<span id="L38" class="LineNr"> 38 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">3</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/3&quot;</span>
<span id="L39" class="LineNr"> 39 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">4</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/4&quot;</span>
<span id="L37" class="LineNr"> 37 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">2</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/2&quot;</span>
<span id="L38" class="LineNr"> 38 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">3</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/3&quot;</span>
<span id="L39" class="LineNr"> 39 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">4</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/4&quot;</span>
<span id="L40" class="LineNr"> 40 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/5&quot;</span>
<span id="L41" class="LineNr"> 41 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; keyboard: &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/6&quot;</span>
<span id="L42" class="LineNr"> 42 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/6-2&quot;</span>
<span id="L42" class="LineNr"> 42 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/6-2&quot;</span>
<span id="L43" class="LineNr"> 43 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/7&quot;</span>
<span id="L44" class="LineNr"> 44 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; (+ 3 4) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/8&quot;</span>
<span id="L45" class="LineNr"> 45 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">9</span>/y, <span class="Constant">&quot; ... trace depth: 4 &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L20'>test-environment</a>/9&quot;</span>
@ -124,7 +124,7 @@ if ('onhashchange' in window) {
<span id="L59" class="LineNr"> 59 </span> <span class="muComment"># setup: screen</span>
<span id="L60" class="LineNr"> 60 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L61" class="LineNr"> 61 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L62" class="LineNr"> 62 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L62" class="LineNr"> 62 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L63" class="LineNr"> 63 </span> <span class="muComment"># define a global on the right (sandbox) side</span>
<span id="L64" class="LineNr"> 64 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;(define f 42)&quot;</span>
<span id="L65" class="LineNr"> 65 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x13</span>/ctrl-s, <span class="Constant">0</span>/no-disk
@ -133,12 +133,12 @@ if ('onhashchange' in window) {
<span id="L68" class="LineNr"> 68 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/0&quot;</span>
<span id="L69" class="LineNr"> 69 </span> <span class="muComment"># global definition is now on the left side</span>
<span id="L70" class="LineNr"> 70 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/y, <span class="Constant">&quot; (define f 42) <a href='../500fake-screen.mu.html#L14'>screen</a>: &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/1&quot;</span>
<span id="L71" class="LineNr"> 71 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">2</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/2&quot;</span>
<span id="L72" class="LineNr"> 72 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">3</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/3&quot;</span>
<span id="L73" class="LineNr"> 73 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">4</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/4&quot;</span>
<span id="L71" class="LineNr"> 71 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">2</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/2&quot;</span>
<span id="L72" class="LineNr"> 72 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">3</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/3&quot;</span>
<span id="L73" class="LineNr"> 73 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">4</span>/y, <span class="Constant">&quot; ........ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/4&quot;</span>
<span id="L74" class="LineNr"> 74 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/4&quot;</span>
<span id="L75" class="LineNr"> 75 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; keyboard: &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/5&quot;</span>
<span id="L76" class="LineNr"> 76 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/5-2&quot;</span>
<span id="L76" class="LineNr"> 76 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/5-2&quot;</span>
<span id="L77" class="LineNr"> 77 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/6&quot;</span>
<span id="L78" class="LineNr"> 78 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L55'>test-definition-in-environment</a>/7&quot;</span>
<span id="L79" class="LineNr"> 79 </span> <span class="muComment"># you can still see the trace on the right for what you just added to the left</span>
@ -158,7 +158,7 @@ if ('onhashchange' in window) {
<span id="L93" class="LineNr"> 93 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> input-stream
<span id="L94" class="LineNr"> 94 </span> compare done?, <span class="Constant">0</span>/false
<span id="L95" class="LineNr"> 95 </span> <span class="PreProc">break-if-!=</span>
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> key/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> input-stream
<span id="L96" class="LineNr"> 96 </span> <span class="PreProc">var</span> key/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> input-stream
<span id="L97" class="LineNr"> 97 </span> <a href='environment.mu.html#L148'>edit-environment</a> self, key, <span class="Constant">0</span>/no-disk
<span id="L98" class="LineNr"> 98 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, self
<span id="L99" class="LineNr"> 99 </span> <span class="PreProc">loop</span>
@ -246,8 +246,8 @@ if ('onhashchange' in window) {
<span id="L181" class="LineNr"> 181 </span> tmp <span class="Special">&lt;-</span> address args
<span id="L182" class="LineNr"> 182 </span> <a href='cell.mu.html#L142'>new-pair</a> tmp, <a href='main.mu.html#L4'>main</a>, *tmp
<span id="L183" class="LineNr"> 183 </span> <span class="muComment"># clear real screen</span>
<span id="L184" class="LineNr"> 184 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <span class="Constant">0</span>/screen
<span id="L185" class="LineNr"> 185 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>, <span class="Constant">0</span>
<span id="L184" class="LineNr"> 184 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <span class="Constant">0</span>/screen
<span id="L185" class="LineNr"> 185 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0</span>, <span class="Constant">0</span>
<span id="L186" class="LineNr"> 186 </span> <span class="muComment"># run</span>
<span id="L187" class="LineNr"> 187 </span> <span class="PreProc">var</span> out: (handle <a href='cell.mu.html#L1'>cell</a>)
<span id="L188" class="LineNr"> 188 </span> <span class="PreProc">var</span> out-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> address out
@ -281,7 +281,7 @@ if ('onhashchange' in window) {
<span id="L216" class="LineNr"> 216 </span> <a href='global.mu.html#L233'>edit-globals</a> globals, key
<span id="L217" class="LineNr"> 217 </span> <span class="Delimiter">}</span>
<span id="L218" class="LineNr"> 218 </span> <span class="muComment"># update sandbox whether the cursor is in globals or sandbox</span>
<span id="L219" class="LineNr"> 219 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, key, globals, data-disk
<span id="L219" class="LineNr"> 219 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, key, globals, data-disk
<span id="L220" class="LineNr"> 220 </span> <span class="Delimiter">}</span>
<span id="L221" class="LineNr"> 221 </span> <span class="PreProc">return</span>
<span id="L222" class="LineNr"> 222 </span> <span class="Delimiter">}</span>
@ -447,7 +447,7 @@ if ('onhashchange' in window) {
<span id="L382" class="LineNr"> 382 </span> <a href='global.mu.html#L233'>edit-globals</a> globals, key
<span id="L383" class="LineNr"> 383 </span> <span class="PreProc">return</span>
<span id="L384" class="LineNr"> 384 </span> <span class="Delimiter">}</span>
<span id="L385" class="LineNr"> 385 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, key, globals, data-disk
<span id="L385" class="LineNr"> 385 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, key, globals, data-disk
<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="PreProc">fn</span> <span class="muFunction"><a href='environment.mu.html#L388'>read-and-evaluate-and-save-gap-buffer-to-globals</a></span> _in-ah: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>), result-ah: (addr handle <a href='cell.mu.html#L1'>cell</a>), globals: (addr <a href='global.mu.html#L1'>global-table</a>), definitions-created: (addr stream int), trace: (addr trace), inner-screen-var: (addr handle <a href='cell.mu.html#L1'>cell</a>), inner-keyboard-var: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Delimiter">{</span>
@ -500,32 +500,32 @@ if ('onhashchange' in window) {
<span id="L435" class="LineNr"> 435 </span> <span class="muComment"># setup: screen</span>
<span id="L436" class="LineNr"> 436 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L437" class="LineNr"> 437 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L438" class="LineNr"> 438 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L438" class="LineNr"> 438 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L439" class="LineNr"> 439 </span> <span class="muComment"># hit ctrl-g</span>
<span id="L440" class="LineNr"> 440 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L441" class="LineNr"> 441 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L442" class="LineNr"> 442 </span> <span class="muComment">#</span>
<span id="L443" class="LineNr"> 443 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/0&quot;</span>
<span id="L444" class="LineNr"> 444 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/1&quot;</span>
<span id="L445" class="LineNr"> 445 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/2&quot;</span>
<span id="L446" class="LineNr"> 446 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/3&quot;</span>
<span id="L447" class="LineNr"> 447 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/4&quot;</span>
<span id="L448" class="LineNr"> 448 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/5&quot;</span>
<span id="L443" class="LineNr"> 443 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/0&quot;</span>
<span id="L444" class="LineNr"> 444 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/1&quot;</span>
<span id="L445" class="LineNr"> 445 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/2&quot;</span>
<span id="L446" class="LineNr"> 446 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/3&quot;</span>
<span id="L447" class="LineNr"> 447 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/4&quot;</span>
<span id="L448" class="LineNr"> 448 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/5&quot;</span>
<span id="L449" class="LineNr"> 449 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/6-text&quot;</span>
<span id="L450" class="LineNr"> 450 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/6&quot;</span>
<span id="L451" class="LineNr"> 451 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/7&quot;</span>
<span id="L450" class="LineNr"> 450 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/6&quot;</span>
<span id="L451" class="LineNr"> 451 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/7&quot;</span>
<span id="L452" class="LineNr"> 452 </span> <span class="muComment"># cursor is in the modal</span>
<span id="L453" class="LineNr"> 453 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/8-cursor&quot;</span>
<span id="L454" class="LineNr"> 454 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ............................................................... &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/8&quot;</span>
<span id="L455" class="LineNr"> 455 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/9&quot;</span>
<span id="L456" class="LineNr"> 456 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/10&quot;</span>
<span id="L457" class="LineNr"> 457 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/11&quot;</span>
<span id="L458" class="LineNr"> 458 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/12&quot;</span>
<span id="L459" class="LineNr"> 459 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/13&quot;</span>
<span id="L460" class="LineNr"> 460 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/14&quot;</span>
<span id="L453" class="LineNr"> 453 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/8-cursor&quot;</span>
<span id="L454" class="LineNr"> 454 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ............................................................... &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/8&quot;</span>
<span id="L455" class="LineNr"> 455 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/9&quot;</span>
<span id="L456" class="LineNr"> 456 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/10&quot;</span>
<span id="L457" class="LineNr"> 457 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/11&quot;</span>
<span id="L458" class="LineNr"> 458 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/12&quot;</span>
<span id="L459" class="LineNr"> 459 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/13&quot;</span>
<span id="L460" class="LineNr"> 460 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/14&quot;</span>
<span id="L461" class="LineNr"> 461 </span> <span class="muComment"># menu at bottom is correct in context</span>
<span id="L462" class="LineNr"> 462 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; ^r run <a href='main.mu.html#L4'>main</a> enter go ^m create esc cancel ^a &lt;&lt; ^b &lt;word ^f word&gt; ^e &gt;&gt; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/15-text&quot;</span>
<span id="L463" class="LineNr"> 463 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/15&quot;</span>
<span id="L463" class="LineNr"> 463 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L431'>test-go-modal</a>/15&quot;</span>
<span id="L464" class="LineNr"> 464 </span><span class="Delimiter">}</span>
<span id="L465" class="LineNr"> 465 </span>
<span id="L466" class="LineNr"> 466 </span><span class="PreProc">fn</span> <span class="muTest"><a href='environment.mu.html#L466'>test-leave-go-modal</a></span> <span class="Delimiter">{</span>
@ -535,7 +535,7 @@ if ('onhashchange' in window) {
<span id="L470" class="LineNr"> 470 </span> <span class="muComment"># setup: screen</span>
<span id="L471" class="LineNr"> 471 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L472" class="LineNr"> 472 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L473" class="LineNr"> 473 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L473" class="LineNr"> 473 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L474" class="LineNr"> 474 </span> <span class="muComment"># hit ctrl-g</span>
<span id="L475" class="LineNr"> 475 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L476" class="LineNr"> 476 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -543,22 +543,22 @@ if ('onhashchange' in window) {
<span id="L478" class="LineNr"> 478 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x1b</span>/escape, <span class="Constant">0</span>/no-disk
<span id="L479" class="LineNr"> 479 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L480" class="LineNr"> 480 </span> <span class="muComment"># no modal</span>
<span id="L481" class="LineNr"> 481 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/0&quot;</span>
<span id="L482" class="LineNr"> 482 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/1&quot;</span>
<span id="L483" class="LineNr"> 483 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/2&quot;</span>
<span id="L484" class="LineNr"> 484 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/3&quot;</span>
<span id="L485" class="LineNr"> 485 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/4&quot;</span>
<span id="L486" class="LineNr"> 486 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/5&quot;</span>
<span id="L487" class="LineNr"> 487 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/6&quot;</span>
<span id="L488" class="LineNr"> 488 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/7&quot;</span>
<span id="L489" class="LineNr"> 489 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/8&quot;</span>
<span id="L490" class="LineNr"> 490 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/9&quot;</span>
<span id="L491" class="LineNr"> 491 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/10&quot;</span>
<span id="L492" class="LineNr"> 492 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/11&quot;</span>
<span id="L493" class="LineNr"> 493 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/12&quot;</span>
<span id="L494" class="LineNr"> 494 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/13&quot;</span>
<span id="L495" class="LineNr"> 495 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/14&quot;</span>
<span id="L496" class="LineNr"> 496 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/15&quot;</span>
<span id="L481" class="LineNr"> 481 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/0&quot;</span>
<span id="L482" class="LineNr"> 482 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/1&quot;</span>
<span id="L483" class="LineNr"> 483 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/2&quot;</span>
<span id="L484" class="LineNr"> 484 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/3&quot;</span>
<span id="L485" class="LineNr"> 485 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/4&quot;</span>
<span id="L486" class="LineNr"> 486 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/5&quot;</span>
<span id="L487" class="LineNr"> 487 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/6&quot;</span>
<span id="L488" class="LineNr"> 488 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/7&quot;</span>
<span id="L489" class="LineNr"> 489 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/8&quot;</span>
<span id="L490" class="LineNr"> 490 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/9&quot;</span>
<span id="L491" class="LineNr"> 491 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/10&quot;</span>
<span id="L492" class="LineNr"> 492 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/11&quot;</span>
<span id="L493" class="LineNr"> 493 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/12&quot;</span>
<span id="L494" class="LineNr"> 494 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/13&quot;</span>
<span id="L495" class="LineNr"> 495 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/14&quot;</span>
<span id="L496" class="LineNr"> 496 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L466'>test-leave-go-modal</a>/15&quot;</span>
<span id="L497" class="LineNr"> 497 </span><span class="Delimiter">}</span>
<span id="L498" class="LineNr"> 498 </span>
<span id="L499" class="LineNr"> 499 </span><span class="PreProc">fn</span> <span class="muTest"><a href='environment.mu.html#L499'>test-jump-to-global</a></span> <span class="Delimiter">{</span>
@ -568,7 +568,7 @@ if ('onhashchange' in window) {
<span id="L503" class="LineNr"> 503 </span> <span class="muComment"># setup: screen</span>
<span id="L504" class="LineNr"> 504 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L505" class="LineNr"> 505 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L506" class="LineNr"> 506 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L506" class="LineNr"> 506 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L507" class="LineNr"> 507 </span> <span class="muComment"># define a global</span>
<span id="L508" class="LineNr"> 508 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;(define f 42)&quot;</span>
<span id="L509" class="LineNr"> 509 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x13</span>/ctrl-s, <span class="Constant">0</span>/no-disk
@ -584,24 +584,24 @@ if ('onhashchange' in window) {
<span id="L519" class="LineNr"> 519 </span> <span class="muComment"># | global definitions | sandbox</span>
<span id="L520" class="LineNr"> 520 </span> <span class="muComment"># cursor now in global definition</span>
<span id="L521" class="LineNr"> 521 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">1</span>/y, <span class="Constant">&quot; (define f 42) <a href='../500fake-screen.mu.html#L14'>screen</a>: &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/1&quot;</span>
<span id="L522" class="LineNr"> 522 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/bg=cursor, <span class="Constant">1</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/1-cursor&quot;</span>
<span id="L522" class="LineNr"> 522 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/bg=cursor, <span class="Constant">1</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/1-cursor&quot;</span>
<span id="L523" class="LineNr"> 523 </span> <span class="muComment"># no modal</span>
<span id="L524" class="LineNr"> 524 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg0&quot;</span>
<span id="L525" class="LineNr"> 525 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg1&quot;</span>
<span id="L526" class="LineNr"> 526 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg2&quot;</span>
<span id="L527" class="LineNr"> 527 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg3&quot;</span>
<span id="L528" class="LineNr"> 528 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg4&quot;</span>
<span id="L529" class="LineNr"> 529 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg5&quot;</span>
<span id="L530" class="LineNr"> 530 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg6&quot;</span>
<span id="L531" class="LineNr"> 531 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg7&quot;</span>
<span id="L532" class="LineNr"> 532 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg8&quot;</span>
<span id="L533" class="LineNr"> 533 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg9&quot;</span>
<span id="L534" class="LineNr"> 534 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg10&quot;</span>
<span id="L535" class="LineNr"> 535 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg11&quot;</span>
<span id="L536" class="LineNr"> 536 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg12&quot;</span>
<span id="L537" class="LineNr"> 537 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg13&quot;</span>
<span id="L538" class="LineNr"> 538 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg14&quot;</span>
<span id="L539" class="LineNr"> 539 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg15&quot;</span>
<span id="L524" class="LineNr"> 524 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg0&quot;</span>
<span id="L525" class="LineNr"> 525 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg1&quot;</span>
<span id="L526" class="LineNr"> 526 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg2&quot;</span>
<span id="L527" class="LineNr"> 527 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg3&quot;</span>
<span id="L528" class="LineNr"> 528 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg4&quot;</span>
<span id="L529" class="LineNr"> 529 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg5&quot;</span>
<span id="L530" class="LineNr"> 530 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg6&quot;</span>
<span id="L531" class="LineNr"> 531 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg7&quot;</span>
<span id="L532" class="LineNr"> 532 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg8&quot;</span>
<span id="L533" class="LineNr"> 533 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg9&quot;</span>
<span id="L534" class="LineNr"> 534 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg10&quot;</span>
<span id="L535" class="LineNr"> 535 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg11&quot;</span>
<span id="L536" class="LineNr"> 536 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg12&quot;</span>
<span id="L537" class="LineNr"> 537 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg13&quot;</span>
<span id="L538" class="LineNr"> 538 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg14&quot;</span>
<span id="L539" class="LineNr"> 539 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L499'>test-jump-to-global</a>/bg15&quot;</span>
<span id="L540" class="LineNr"> 540 </span><span class="Delimiter">}</span>
<span id="L541" class="LineNr"> 541 </span>
<span id="L542" class="LineNr"> 542 </span><span class="PreProc">fn</span> <span class="muTest"><a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a></span> <span class="Delimiter">{</span>
@ -611,34 +611,34 @@ if ('onhashchange' in window) {
<span id="L546" class="LineNr"> 546 </span> <span class="muComment"># setup: screen</span>
<span id="L547" class="LineNr"> 547 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L548" class="LineNr"> 548 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L549" class="LineNr"> 549 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L549" class="LineNr"> 549 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L550" class="LineNr"> 550 </span> <span class="muComment"># type a word at the cursor</span>
<span id="L551" class="LineNr"> 551 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;fn1&quot;</span>
<span id="L552" class="LineNr"> 552 </span> <span class="muComment"># hit ctrl-g</span>
<span id="L553" class="LineNr"> 553 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L554" class="LineNr"> 554 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L555" class="LineNr"> 555 </span> <span class="muComment"># modal prepopulates word at cursor</span>
<span id="L556" class="LineNr"> 556 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/0&quot;</span>
<span id="L557" class="LineNr"> 557 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/1&quot;</span>
<span id="L558" class="LineNr"> 558 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/2&quot;</span>
<span id="L559" class="LineNr"> 559 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/3&quot;</span>
<span id="L560" class="LineNr"> 560 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/4&quot;</span>
<span id="L561" class="LineNr"> 561 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/5&quot;</span>
<span id="L556" class="LineNr"> 556 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/0&quot;</span>
<span id="L557" class="LineNr"> 557 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/1&quot;</span>
<span id="L558" class="LineNr"> 558 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/2&quot;</span>
<span id="L559" class="LineNr"> 559 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/3&quot;</span>
<span id="L560" class="LineNr"> 560 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/4&quot;</span>
<span id="L561" class="LineNr"> 561 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/5&quot;</span>
<span id="L562" class="LineNr"> 562 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/6-text&quot;</span>
<span id="L563" class="LineNr"> 563 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/6&quot;</span>
<span id="L564" class="LineNr"> 564 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/7&quot;</span>
<span id="L563" class="LineNr"> 563 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/6&quot;</span>
<span id="L564" class="LineNr"> 564 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/7&quot;</span>
<span id="L565" class="LineNr"> 565 </span> <span class="muComment"># word at cursor</span>
<span id="L566" class="LineNr"> 566 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; fn1 &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/8-text&quot;</span>
<span id="L567" class="LineNr"> 567 </span> <span class="muComment"># new cursor position</span>
<span id="L568" class="LineNr"> 568 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/8-cursor&quot;</span>
<span id="L569" class="LineNr"> 569 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ... ............................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/8&quot;</span>
<span id="L570" class="LineNr"> 570 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/9&quot;</span>
<span id="L571" class="LineNr"> 571 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/10&quot;</span>
<span id="L572" class="LineNr"> 572 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/11&quot;</span>
<span id="L573" class="LineNr"> 573 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/12&quot;</span>
<span id="L574" class="LineNr"> 574 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/13&quot;</span>
<span id="L575" class="LineNr"> 575 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/14&quot;</span>
<span id="L576" class="LineNr"> 576 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/15&quot;</span>
<span id="L568" class="LineNr"> 568 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/8-cursor&quot;</span>
<span id="L569" class="LineNr"> 569 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ... ............................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/8&quot;</span>
<span id="L570" class="LineNr"> 570 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/9&quot;</span>
<span id="L571" class="LineNr"> 571 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/10&quot;</span>
<span id="L572" class="LineNr"> 572 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/11&quot;</span>
<span id="L573" class="LineNr"> 573 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/12&quot;</span>
<span id="L574" class="LineNr"> 574 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/13&quot;</span>
<span id="L575" class="LineNr"> 575 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/14&quot;</span>
<span id="L576" class="LineNr"> 576 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/15&quot;</span>
<span id="L577" class="LineNr"> 577 </span> <span class="muComment"># cancel</span>
<span id="L578" class="LineNr"> 578 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x1b</span>/escape, <span class="Constant">0</span>/no-disk
<span id="L579" class="LineNr"> 579 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -649,27 +649,27 @@ if ('onhashchange' in window) {
<span id="L584" class="LineNr"> 584 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L585" class="LineNr"> 585 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L586" class="LineNr"> 586 </span> <span class="muComment"># no word prepopulated since cursor is not on the word</span>
<span id="L587" class="LineNr"> 587 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-0&quot;</span>
<span id="L588" class="LineNr"> 588 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-1&quot;</span>
<span id="L589" class="LineNr"> 589 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-2&quot;</span>
<span id="L590" class="LineNr"> 590 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-3&quot;</span>
<span id="L591" class="LineNr"> 591 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-4&quot;</span>
<span id="L592" class="LineNr"> 592 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-5&quot;</span>
<span id="L587" class="LineNr"> 587 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-0&quot;</span>
<span id="L588" class="LineNr"> 588 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-1&quot;</span>
<span id="L589" class="LineNr"> 589 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-2&quot;</span>
<span id="L590" class="LineNr"> 590 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-3&quot;</span>
<span id="L591" class="LineNr"> 591 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-4&quot;</span>
<span id="L592" class="LineNr"> 592 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-5&quot;</span>
<span id="L593" class="LineNr"> 593 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-6-text&quot;</span>
<span id="L594" class="LineNr"> 594 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-6&quot;</span>
<span id="L595" class="LineNr"> 595 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-7&quot;</span>
<span id="L594" class="LineNr"> 594 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-6&quot;</span>
<span id="L595" class="LineNr"> 595 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-7&quot;</span>
<span id="L596" class="LineNr"> 596 </span> <span class="muComment"># no word at cursor</span>
<span id="L597" class="LineNr"> 597 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-8-text&quot;</span>
<span id="L598" class="LineNr"> 598 </span> <span class="muComment"># new cursor position</span>
<span id="L599" class="LineNr"> 599 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-8-cursor&quot;</span>
<span id="L600" class="LineNr"> 600 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ............................................................... &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-8&quot;</span>
<span id="L601" class="LineNr"> 601 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-9&quot;</span>
<span id="L602" class="LineNr"> 602 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-10&quot;</span>
<span id="L603" class="LineNr"> 603 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-11&quot;</span>
<span id="L604" class="LineNr"> 604 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-12&quot;</span>
<span id="L605" class="LineNr"> 605 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-13&quot;</span>
<span id="L606" class="LineNr"> 606 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-14&quot;</span>
<span id="L607" class="LineNr"> 607 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-15&quot;</span>
<span id="L599" class="LineNr"> 599 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-8-cursor&quot;</span>
<span id="L600" class="LineNr"> 600 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ............................................................... &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-8&quot;</span>
<span id="L601" class="LineNr"> 601 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-9&quot;</span>
<span id="L602" class="LineNr"> 602 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-10&quot;</span>
<span id="L603" class="LineNr"> 603 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-11&quot;</span>
<span id="L604" class="LineNr"> 604 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-12&quot;</span>
<span id="L605" class="LineNr"> 605 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-13&quot;</span>
<span id="L606" class="LineNr"> 606 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-14&quot;</span>
<span id="L607" class="LineNr"> 607 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test2-15&quot;</span>
<span id="L608" class="LineNr"> 608 </span> <span class="muComment"># cancel</span>
<span id="L609" class="LineNr"> 609 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x1b</span>/escape, <span class="Constant">0</span>/no-disk
<span id="L610" class="LineNr"> 610 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -682,27 +682,27 @@ if ('onhashchange' in window) {
<span id="L617" class="LineNr"> 617 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L618" class="LineNr"> 618 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L619" class="LineNr"> 619 </span> <span class="muComment"># word prepopulated like before</span>
<span id="L620" class="LineNr"> 620 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-0&quot;</span>
<span id="L621" class="LineNr"> 621 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-1&quot;</span>
<span id="L622" class="LineNr"> 622 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-2&quot;</span>
<span id="L623" class="LineNr"> 623 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-3&quot;</span>
<span id="L624" class="LineNr"> 624 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-4&quot;</span>
<span id="L625" class="LineNr"> 625 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-5&quot;</span>
<span id="L620" class="LineNr"> 620 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-0&quot;</span>
<span id="L621" class="LineNr"> 621 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-1&quot;</span>
<span id="L622" class="LineNr"> 622 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-2&quot;</span>
<span id="L623" class="LineNr"> 623 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-3&quot;</span>
<span id="L624" class="LineNr"> 624 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-4&quot;</span>
<span id="L625" class="LineNr"> 625 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-5&quot;</span>
<span id="L626" class="LineNr"> 626 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-6-text&quot;</span>
<span id="L627" class="LineNr"> 627 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-6&quot;</span>
<span id="L628" class="LineNr"> 628 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-7&quot;</span>
<span id="L627" class="LineNr"> 627 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-6&quot;</span>
<span id="L628" class="LineNr"> 628 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-7&quot;</span>
<span id="L629" class="LineNr"> 629 </span> <span class="muComment"># word at cursor</span>
<span id="L630" class="LineNr"> 630 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; fn1 &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-8-text&quot;</span>
<span id="L631" class="LineNr"> 631 </span> <span class="muComment"># new cursor position</span>
<span id="L632" class="LineNr"> 632 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-8-cursor&quot;</span>
<span id="L633" class="LineNr"> 633 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ... ............................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-8&quot;</span>
<span id="L634" class="LineNr"> 634 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-9&quot;</span>
<span id="L635" class="LineNr"> 635 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-10&quot;</span>
<span id="L636" class="LineNr"> 636 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-11&quot;</span>
<span id="L637" class="LineNr"> 637 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-12&quot;</span>
<span id="L638" class="LineNr"> 638 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-13&quot;</span>
<span id="L639" class="LineNr"> 639 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-14&quot;</span>
<span id="L640" class="LineNr"> 640 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-15&quot;</span>
<span id="L632" class="LineNr"> 632 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-8-cursor&quot;</span>
<span id="L633" class="LineNr"> 633 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; ... ............................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-8&quot;</span>
<span id="L634" class="LineNr"> 634 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-9&quot;</span>
<span id="L635" class="LineNr"> 635 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-10&quot;</span>
<span id="L636" class="LineNr"> 636 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-11&quot;</span>
<span id="L637" class="LineNr"> 637 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-12&quot;</span>
<span id="L638" class="LineNr"> 638 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-13&quot;</span>
<span id="L639" class="LineNr"> 639 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-14&quot;</span>
<span id="L640" class="LineNr"> 640 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L542'>test-go-modal-prepopulates-word-at-cursor</a>/test3-15&quot;</span>
<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='environment.mu.html#L643'>test-jump-to-nonexistent-global</a></span> <span class="Delimiter">{</span>
@ -712,7 +712,7 @@ if ('onhashchange' in window) {
<span id="L647" class="LineNr"> 647 </span> <span class="muComment"># setup: screen</span>
<span id="L648" class="LineNr"> 648 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L649" class="LineNr"> 649 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L650" class="LineNr"> 650 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L650" class="LineNr"> 650 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L651" class="LineNr"> 651 </span> <span class="muComment"># type in any (nonexistent) global name</span>
<span id="L652" class="LineNr"> 652 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;f&quot;</span>
<span id="L653" class="LineNr"> 653 </span> <span class="muComment"># hit ctrl-g</span>
@ -723,28 +723,28 @@ if ('onhashchange' in window) {
<span id="L658" class="LineNr"> 658 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L659" class="LineNr"> 659 </span> <span class="muComment"># modal now shows an error</span>
<span id="L660" class="LineNr"> 660 </span> <span class="muComment"># | global definitions | sandbox</span>
<span id="L661" class="LineNr"> 661 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/0&quot;</span>
<span id="L662" class="LineNr"> 662 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/1&quot;</span>
<span id="L663" class="LineNr"> 663 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/2&quot;</span>
<span id="L664" class="LineNr"> 664 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/3&quot;</span>
<span id="L665" class="LineNr"> 665 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/4&quot;</span>
<span id="L666" class="LineNr"> 666 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/5&quot;</span>
<span id="L661" class="LineNr"> 661 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/0&quot;</span>
<span id="L662" class="LineNr"> 662 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/1&quot;</span>
<span id="L663" class="LineNr"> 663 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/2&quot;</span>
<span id="L664" class="LineNr"> 664 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/3&quot;</span>
<span id="L665" class="LineNr"> 665 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/4&quot;</span>
<span id="L666" class="LineNr"> 666 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/5&quot;</span>
<span id="L667" class="LineNr"> 667 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/6-text&quot;</span>
<span id="L668" class="LineNr"> 668 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/6&quot;</span>
<span id="L669" class="LineNr"> 669 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; no such <a href='global.mu.html#L8'>global</a> &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/7-text&quot;</span>
<span id="L670" class="LineNr"> 670 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/7&quot;</span>
<span id="L668" class="LineNr"> 668 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/6&quot;</span>
<span id="L669" class="LineNr"> 669 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; no such <a href='global.mu.html#L8'>global</a> &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/7-text&quot;</span>
<span id="L670" class="LineNr"> 670 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/7&quot;</span>
<span id="L671" class="LineNr"> 671 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/8-text&quot;</span>
<span id="L672" class="LineNr"> 672 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/8-cursor&quot;</span>
<span id="L673" class="LineNr"> 673 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/8&quot;</span>
<span id="L674" class="LineNr"> 674 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/9&quot;</span>
<span id="L675" class="LineNr"> 675 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/10&quot;</span>
<span id="L676" class="LineNr"> 676 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/11&quot;</span>
<span id="L677" class="LineNr"> 677 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/12&quot;</span>
<span id="L678" class="LineNr"> 678 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/13&quot;</span>
<span id="L679" class="LineNr"> 679 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/14&quot;</span>
<span id="L672" class="LineNr"> 672 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/8-cursor&quot;</span>
<span id="L673" class="LineNr"> 673 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/8&quot;</span>
<span id="L674" class="LineNr"> 674 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/9&quot;</span>
<span id="L675" class="LineNr"> 675 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/10&quot;</span>
<span id="L676" class="LineNr"> 676 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/11&quot;</span>
<span id="L677" class="LineNr"> 677 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/12&quot;</span>
<span id="L678" class="LineNr"> 678 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/13&quot;</span>
<span id="L679" class="LineNr"> 679 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/14&quot;</span>
<span id="L680" class="LineNr"> 680 </span> <span class="muComment"># menu at bottom is correct in context</span>
<span id="L681" class="LineNr"> 681 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; ^r run <a href='main.mu.html#L4'>main</a> enter go ^m create esc cancel ^a &lt;&lt; ^b &lt;word ^f word&gt; ^e &gt;&gt; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/15-text&quot;</span>
<span id="L682" class="LineNr"> 682 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/15&quot;</span>
<span id="L682" class="LineNr"> 682 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/15&quot;</span>
<span id="L683" class="LineNr"> 683 </span> <span class="muComment"># cancel</span>
<span id="L684" class="LineNr"> 684 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x1b</span>/escape, <span class="Constant">0</span>/no-disk
<span id="L685" class="LineNr"> 685 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -752,28 +752,28 @@ if ('onhashchange' in window) {
<span id="L687" class="LineNr"> 687 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L688" class="LineNr"> 688 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L689" class="LineNr"> 689 </span> <span class="muComment"># word prepopulated like before, but no error</span>
<span id="L690" class="LineNr"> 690 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-0&quot;</span>
<span id="L691" class="LineNr"> 691 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-1&quot;</span>
<span id="L692" class="LineNr"> 692 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-2&quot;</span>
<span id="L693" class="LineNr"> 693 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-3&quot;</span>
<span id="L694" class="LineNr"> 694 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-4&quot;</span>
<span id="L695" class="LineNr"> 695 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-5&quot;</span>
<span id="L690" class="LineNr"> 690 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-0&quot;</span>
<span id="L691" class="LineNr"> 691 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-1&quot;</span>
<span id="L692" class="LineNr"> 692 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-2&quot;</span>
<span id="L693" class="LineNr"> 693 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-3&quot;</span>
<span id="L694" class="LineNr"> 694 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-4&quot;</span>
<span id="L695" class="LineNr"> 695 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-5&quot;</span>
<span id="L696" class="LineNr"> 696 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-6-text&quot;</span>
<span id="L697" class="LineNr"> 697 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-6&quot;</span>
<span id="L698" class="LineNr"> 698 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-7-text&quot;</span>
<span id="L699" class="LineNr"> 699 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-7&quot;</span>
<span id="L697" class="LineNr"> 697 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-6&quot;</span>
<span id="L698" class="LineNr"> 698 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-7-text&quot;</span>
<span id="L699" class="LineNr"> 699 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-7&quot;</span>
<span id="L700" class="LineNr"> 700 </span> <span class="muComment"># same word at cursor</span>
<span id="L701" class="LineNr"> 701 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-8-text&quot;</span>
<span id="L702" class="LineNr"> 702 </span> <span class="muComment"># new cursor position</span>
<span id="L703" class="LineNr"> 703 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-8-cursor&quot;</span>
<span id="L704" class="LineNr"> 704 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-8&quot;</span>
<span id="L705" class="LineNr"> 705 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-9&quot;</span>
<span id="L706" class="LineNr"> 706 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-10&quot;</span>
<span id="L707" class="LineNr"> 707 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-11&quot;</span>
<span id="L708" class="LineNr"> 708 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-12&quot;</span>
<span id="L709" class="LineNr"> 709 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-13&quot;</span>
<span id="L710" class="LineNr"> 710 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-14&quot;</span>
<span id="L711" class="LineNr"> 711 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-15&quot;</span>
<span id="L703" class="LineNr"> 703 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-8-cursor&quot;</span>
<span id="L704" class="LineNr"> 704 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-8&quot;</span>
<span id="L705" class="LineNr"> 705 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-9&quot;</span>
<span id="L706" class="LineNr"> 706 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-10&quot;</span>
<span id="L707" class="LineNr"> 707 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-11&quot;</span>
<span id="L708" class="LineNr"> 708 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-12&quot;</span>
<span id="L709" class="LineNr"> 709 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-13&quot;</span>
<span id="L710" class="LineNr"> 710 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-14&quot;</span>
<span id="L711" class="LineNr"> 711 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L643'>test-jump-to-nonexistent-global</a>/test2-15&quot;</span>
<span id="L712" class="LineNr"> 712 </span><span class="Delimiter">}</span>
<span id="L713" class="LineNr"> 713 </span>
<span id="L714" class="LineNr"> 714 </span><span class="PreProc">fn</span> <span class="muTest"><a href='environment.mu.html#L714'>test-create-global</a></span> <span class="Delimiter">{</span>
@ -783,7 +783,7 @@ if ('onhashchange' in window) {
<span id="L718" class="LineNr"> 718 </span> <span class="muComment"># setup: screen</span>
<span id="L719" class="LineNr"> 719 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L720" class="LineNr"> 720 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L721" class="LineNr"> 721 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L721" class="LineNr"> 721 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x30</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L722" class="LineNr"> 722 </span> <span class="muComment"># hit ctrl-g</span>
<span id="L723" class="LineNr"> 723 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L724" class="LineNr"> 724 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -794,24 +794,24 @@ if ('onhashchange' in window) {
<span id="L729" class="LineNr"> 729 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L730" class="LineNr"> 730 </span> <span class="muComment"># | global definitions | sandbox</span>
<span id="L731" class="LineNr"> 731 </span> <span class="muComment"># cursor now on global side</span>
<span id="L732" class="LineNr"> 732 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/bg=cursor, <span class="Constant">1</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/1-cursor&quot;</span>
<span id="L732" class="LineNr"> 732 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">7</span>/bg=cursor, <span class="Constant">1</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/1-cursor&quot;</span>
<span id="L733" class="LineNr"> 733 </span> <span class="muComment"># no modal</span>
<span id="L734" class="LineNr"> 734 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg0&quot;</span>
<span id="L735" class="LineNr"> 735 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg1&quot;</span>
<span id="L736" class="LineNr"> 736 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg2&quot;</span>
<span id="L737" class="LineNr"> 737 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg3&quot;</span>
<span id="L738" class="LineNr"> 738 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg4&quot;</span>
<span id="L739" class="LineNr"> 739 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg5&quot;</span>
<span id="L740" class="LineNr"> 740 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg6&quot;</span>
<span id="L741" class="LineNr"> 741 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg7&quot;</span>
<span id="L742" class="LineNr"> 742 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg8&quot;</span>
<span id="L743" class="LineNr"> 743 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg9&quot;</span>
<span id="L744" class="LineNr"> 744 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg10&quot;</span>
<span id="L745" class="LineNr"> 745 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg11&quot;</span>
<span id="L746" class="LineNr"> 746 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg12&quot;</span>
<span id="L747" class="LineNr"> 747 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg13&quot;</span>
<span id="L748" class="LineNr"> 748 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg14&quot;</span>
<span id="L749" class="LineNr"> 749 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg15&quot;</span>
<span id="L734" class="LineNr"> 734 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg0&quot;</span>
<span id="L735" class="LineNr"> 735 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg1&quot;</span>
<span id="L736" class="LineNr"> 736 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg2&quot;</span>
<span id="L737" class="LineNr"> 737 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg3&quot;</span>
<span id="L738" class="LineNr"> 738 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg4&quot;</span>
<span id="L739" class="LineNr"> 739 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg5&quot;</span>
<span id="L740" class="LineNr"> 740 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg6&quot;</span>
<span id="L741" class="LineNr"> 741 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg7&quot;</span>
<span id="L742" class="LineNr"> 742 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg8&quot;</span>
<span id="L743" class="LineNr"> 743 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg9&quot;</span>
<span id="L744" class="LineNr"> 744 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg10&quot;</span>
<span id="L745" class="LineNr"> 745 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg11&quot;</span>
<span id="L746" class="LineNr"> 746 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg12&quot;</span>
<span id="L747" class="LineNr"> 747 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg13&quot;</span>
<span id="L748" class="LineNr"> 748 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg14&quot;</span>
<span id="L749" class="LineNr"> 749 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L714'>test-create-global</a>/bg15&quot;</span>
<span id="L750" class="LineNr"> 750 </span><span class="Delimiter">}</span>
<span id="L751" class="LineNr"> 751 </span>
<span id="L752" class="LineNr"> 752 </span><span class="PreProc">fn</span> <span class="muTest"><a href='environment.mu.html#L752'>test-create-nonexistent-global</a></span> <span class="Delimiter">{</span>
@ -821,7 +821,7 @@ if ('onhashchange' in window) {
<span id="L756" class="LineNr"> 756 </span> <span class="muComment"># setup: screen</span>
<span id="L757" class="LineNr"> 757 </span> <span class="PreProc">var</span> screen-on-stack: <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L758" class="LineNr"> 758 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEdi">edi</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> address screen-on-stack
<span id="L759" class="LineNr"> 759 </span> <a href='../500fake-screen.mu.html#L33'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L759" class="LineNr"> 759 </span> <a href='../500fake-screen.mu.html#L32'>initialize-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0x80</span>/width, <span class="Constant">0x10</span>/height, <span class="Constant">0</span>/no-pixel-graphics
<span id="L760" class="LineNr"> 760 </span> <span class="muComment"># define a global</span>
<span id="L761" class="LineNr"> 761 </span> <a href='environment.mu.html#L84'>type-in</a> env, <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;(define f 42)&quot;</span>
<span id="L762" class="LineNr"> 762 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x13</span>/ctrl-s, <span class="Constant">0</span>/no-disk
@ -836,28 +836,28 @@ if ('onhashchange' in window) {
<span id="L771" class="LineNr"> 771 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L772" class="LineNr"> 772 </span> <span class="muComment"># modal now shows an error</span>
<span id="L773" class="LineNr"> 773 </span> <span class="muComment"># | global definitions | sandbox</span>
<span id="L774" class="LineNr"> 774 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/0&quot;</span>
<span id="L775" class="LineNr"> 775 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/1&quot;</span>
<span id="L776" class="LineNr"> 776 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/2&quot;</span>
<span id="L777" class="LineNr"> 777 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/3&quot;</span>
<span id="L778" class="LineNr"> 778 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/4&quot;</span>
<span id="L779" class="LineNr"> 779 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/5&quot;</span>
<span id="L774" class="LineNr"> 774 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/0&quot;</span>
<span id="L775" class="LineNr"> 775 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/1&quot;</span>
<span id="L776" class="LineNr"> 776 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/2&quot;</span>
<span id="L777" class="LineNr"> 777 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/3&quot;</span>
<span id="L778" class="LineNr"> 778 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/4&quot;</span>
<span id="L779" class="LineNr"> 779 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/5&quot;</span>
<span id="L780" class="LineNr"> 780 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/6-text&quot;</span>
<span id="L781" class="LineNr"> 781 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/6&quot;</span>
<span id="L782" class="LineNr"> 782 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; already exists &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/7-text&quot;</span>
<span id="L783" class="LineNr"> 783 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/7&quot;</span>
<span id="L784" class="LineNr"> 784 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/fg, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8-text&quot;</span>
<span id="L785" class="LineNr"> 785 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8-cursor&quot;</span>
<span id="L786" class="LineNr"> 786 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8&quot;</span>
<span id="L787" class="LineNr"> 787 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/9&quot;</span>
<span id="L788" class="LineNr"> 788 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/10&quot;</span>
<span id="L789" class="LineNr"> 789 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/11&quot;</span>
<span id="L790" class="LineNr"> 790 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/12&quot;</span>
<span id="L791" class="LineNr"> 791 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/13&quot;</span>
<span id="L792" class="LineNr"> 792 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/14&quot;</span>
<span id="L781" class="LineNr"> 781 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/6&quot;</span>
<span id="L782" class="LineNr"> 782 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; already exists &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/7-text&quot;</span>
<span id="L783" class="LineNr"> 783 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/7&quot;</span>
<span id="L784" class="LineNr"> 784 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/fg, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8-text&quot;</span>
<span id="L785" class="LineNr"> 785 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8-cursor&quot;</span>
<span id="L786" class="LineNr"> 786 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/8&quot;</span>
<span id="L787" class="LineNr"> 787 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/9&quot;</span>
<span id="L788" class="LineNr"> 788 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/10&quot;</span>
<span id="L789" class="LineNr"> 789 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/11&quot;</span>
<span id="L790" class="LineNr"> 790 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/12&quot;</span>
<span id="L791" class="LineNr"> 791 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/13&quot;</span>
<span id="L792" class="LineNr"> 792 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/14&quot;</span>
<span id="L793" class="LineNr"> 793 </span> <span class="muComment"># menu at bottom is correct in context</span>
<span id="L794" class="LineNr"> 794 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; ^r run <a href='main.mu.html#L4'>main</a> enter go ^m create esc cancel ^a &lt;&lt; ^b &lt;word ^f word&gt; ^e &gt;&gt; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/15-text&quot;</span>
<span id="L795" class="LineNr"> 795 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/15&quot;</span>
<span id="L795" class="LineNr"> 795 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/15&quot;</span>
<span id="L796" class="LineNr"> 796 </span> <span class="muComment"># cancel</span>
<span id="L797" class="LineNr"> 797 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">0x1b</span>/escape, <span class="Constant">0</span>/no-disk
<span id="L798" class="LineNr"> 798 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
@ -865,35 +865,35 @@ if ('onhashchange' in window) {
<span id="L800" class="LineNr"> 800 </span> <a href='environment.mu.html#L148'>edit-environment</a> env, <span class="Constant">7</span>/ctrl-g, <span class="Constant">0</span>/no-disk
<span id="L801" class="LineNr"> 801 </span> <a href='environment.mu.html#L115'>render-environment</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, env
<span id="L802" class="LineNr"> 802 </span> <span class="muComment"># word prepopulated like before, but no error</span>
<span id="L803" class="LineNr"> 803 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-0&quot;</span>
<span id="L804" class="LineNr"> 804 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-1&quot;</span>
<span id="L805" class="LineNr"> 805 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-2&quot;</span>
<span id="L806" class="LineNr"> 806 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-3&quot;</span>
<span id="L807" class="LineNr"> 807 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-4&quot;</span>
<span id="L808" class="LineNr"> 808 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-5&quot;</span>
<span id="L803" class="LineNr"> 803 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-0&quot;</span>
<span id="L804" class="LineNr"> 804 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">1</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-1&quot;</span>
<span id="L805" class="LineNr"> 805 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">2</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-2&quot;</span>
<span id="L806" class="LineNr"> 806 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">3</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-3&quot;</span>
<span id="L807" class="LineNr"> 807 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">4</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-4&quot;</span>
<span id="L808" class="LineNr"> 808 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">5</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-5&quot;</span>
<span id="L809" class="LineNr"> 809 </span> <a href='../504test-screen.mu.html#L7'>check-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">6</span>/y, <span class="Constant">&quot; go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL) &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-6-text&quot;</span>
<span id="L810" class="LineNr"> 810 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-6&quot;</span>
<span id="L811" class="LineNr"> 811 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-7-text&quot;</span>
<span id="L812" class="LineNr"> 812 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-7&quot;</span>
<span id="L810" class="LineNr"> 810 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">6</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-6&quot;</span>
<span id="L811" class="LineNr"> 811 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">7</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-7-text&quot;</span>
<span id="L812" class="LineNr"> 812 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">7</span>/y, <span class="Constant">&quot; ................................................................ &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-7&quot;</span>
<span id="L813" class="LineNr"> 813 </span> <span class="muComment"># same word at cursor</span>
<span id="L814" class="LineNr"> 814 </span> <a href='../504test-screen.mu.html#L71'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/fg, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8-text&quot;</span>
<span id="L814" class="LineNr"> 814 </span> <a href='../504test-screen.mu.html#L75'>check-screen-row-in-color</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/fg, <span class="Constant">8</span>/y, <span class="Constant">&quot; f &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8-text&quot;</span>
<span id="L815" class="LineNr"> 815 </span> <span class="muComment"># new cursor position</span>
<span id="L816" class="LineNr"> 816 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8-cursor&quot;</span>
<span id="L817" class="LineNr"> 817 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8&quot;</span>
<span id="L818" class="LineNr"> 818 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-9&quot;</span>
<span id="L819" class="LineNr"> 819 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-10&quot;</span>
<span id="L820" class="LineNr"> 820 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-11&quot;</span>
<span id="L821" class="LineNr"> 821 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-12&quot;</span>
<span id="L822" class="LineNr"> 822 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-13&quot;</span>
<span id="L823" class="LineNr"> 823 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-14&quot;</span>
<span id="L824" class="LineNr"> 824 </span> <a href='../504test-screen.mu.html#L257'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-15&quot;</span>
<span id="L816" class="LineNr"> 816 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/bg=cursor, <span class="Constant">8</span>/y, <span class="Constant">&quot; | &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8-cursor&quot;</span>
<span id="L817" class="LineNr"> 817 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">8</span>/y, <span class="Constant">&quot; . .............................................................. &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-8&quot;</span>
<span id="L818" class="LineNr"> 818 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">9</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-9&quot;</span>
<span id="L819" class="LineNr"> 819 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xa</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-10&quot;</span>
<span id="L820" class="LineNr"> 820 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xb</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-11&quot;</span>
<span id="L821" class="LineNr"> 821 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xc</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-12&quot;</span>
<span id="L822" class="LineNr"> 822 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xd</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-13&quot;</span>
<span id="L823" class="LineNr"> 823 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xe</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-14&quot;</span>
<span id="L824" class="LineNr"> 824 </span> <a href='../504test-screen.mu.html#L267'>check-background-color-in-screen-row</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0xf</span>/bg=modal, <span class="Constant">0xf</span>/y, <span class="Constant">&quot; &quot;</span>, <span class="Constant">&quot;F - <a href='environment.mu.html#L752'>test-create-nonexistent-global</a>/test2-15&quot;</span>
<span id="L825" class="LineNr"> 825 </span><span class="Delimiter">}</span>
<span id="L826" class="LineNr"> 826 </span>
<span id="L827" class="LineNr"> 827 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='environment.mu.html#L827'>render-go-modal</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='environment.mu.html#L8'>environment</a>) <span class="Delimiter">{</span>
<span id="L828" class="LineNr"> 828 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='environment.mu.html#L8'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L829" class="LineNr"> 829 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L830" class="LineNr"> 830 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L831" class="LineNr"> 831 </span> width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L831" class="LineNr"> 831 </span> width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L832" class="LineNr"> 832 </span> <span class="muComment"># xmin = max(0, width/2 - 0x20)</span>
<span id="L833" class="LineNr"> 833 </span> <span class="PreProc">var</span> xmin: int
<span id="L834" class="LineNr"> 834 </span> <span class="PreProc">var</span> tmp/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy width
@ -927,10 +927,10 @@ if ('onhashchange' in window) {
<span id="L862" class="LineNr"> 862 </span> tmp <span class="Special">&lt;-</span> add <span class="Constant">3</span>
<span id="L863" class="LineNr"> 863 </span> copy-to ymax, tmp
<span id="L864" class="LineNr"> 864 </span> <span class="muComment">#</span>
<span id="L865" class="LineNr"> 865 </span> <a href='../500fake-screen.mu.html#L353'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, ymin, xmax, ymax, <span class="Constant">0xf</span>/bg=modal
<span id="L865" class="LineNr"> 865 </span> <a href='../500fake-screen.mu.html#L409'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, ymin, xmax, ymax, <span class="Constant">0xf</span>/bg=modal
<span id="L866" class="LineNr"> 866 </span> add-to xmin, <span class="Constant">4</span>
<span id="L867" class="LineNr"> 867 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, ymin
<span id="L868" class="LineNr"> 868 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL)&quot;</span>, xmax, <span class="Constant">8</span>/fg=dark-grey, <span class="Constant">0xf</span>/bg=modal
<span id="L867" class="LineNr"> 867 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, ymin
<span id="L868" class="LineNr"> 868 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;go to <a href='global.mu.html#L8'>global</a> (or leave blank to go to REPL)&quot;</span>, xmax, <span class="Constant">8</span>/fg=dark-grey, <span class="Constant">0xf</span>/bg=modal
<span id="L869" class="LineNr"> 869 </span> <span class="PreProc">var</span> partial-global-name-ah/eax: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get self, partial-global-name
<span id="L870" class="LineNr"> 870 </span> <span class="PreProc">var</span> _partial-global-name/eax: (addr <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *partial-global-name-ah
<span id="L871" class="LineNr"> 871 </span> <span class="PreProc">var</span> partial-global-name/<span class="muRegEdx">edx</span>: (addr <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> copy _partial-global-name
@ -941,7 +941,7 @@ if ('onhashchange' in window) {
<span id="L876" class="LineNr"> 876 </span> <span class="PreProc">var</span> go-modal-error/eax: (addr array byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *go-modal-error-ah
<span id="L877" class="LineNr"> 877 </span> compare go-modal-error, <span class="Constant">0</span>
<span id="L878" class="LineNr"> 878 </span> <span class="PreProc">break-if-=</span>
<span id="L879" class="LineNr"> 879 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, go-modal-error, xmin, xmax, ymin, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">0xf</span>/bg=modal
<span id="L879" class="LineNr"> 879 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, go-modal-error, xmin, xmax, ymin, <span class="Constant">4</span>/fg=<span class="Special"><a href='trace.mu.html#L197'>error</a></span>, <span class="Constant">0xf</span>/bg=modal
<span id="L880" class="LineNr"> 880 </span> <span class="Delimiter">}</span>
<span id="L881" class="LineNr"> 881 </span> increment ymin
<span id="L882" class="LineNr"> 882 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
@ -953,30 +953,30 @@ if ('onhashchange' in window) {
<span id="L888" class="LineNr"> 888 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='environment.mu.html#L8'>environment</a>) <span class="Special">&lt;-</span> copy _self
<span id="L889" class="LineNr"> 889 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L890" class="LineNr"> 890 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L891" class="LineNr"> 891 </span> _width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L891" class="LineNr"> 891 </span> _width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L892" class="LineNr"> 892 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L893" class="LineNr"> 893 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy height
<span id="L894" class="LineNr"> 894 </span> y <span class="Special">&lt;-</span> decrement
<span id="L895" class="LineNr"> 895 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L896" class="LineNr"> 896 </span> height <span class="Special">&lt;-</span> increment
<span id="L897" class="LineNr"> 897 </span> <a href='../500fake-screen.mu.html#L353'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y, width, height, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L898" class="LineNr"> 898 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y
<span id="L899" class="LineNr"> 899 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^r &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L900" class="LineNr"> 900 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='main.mu.html#L4'>main</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L901" class="LineNr"> 901 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; enter &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0xc</span>/bg=menu-really-highlight
<span id="L902" class="LineNr"> 902 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; go &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L903" class="LineNr"> 903 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^m &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0xc</span>/bg=menu-really-highlight
<span id="L904" class="LineNr"> 904 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; create &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L905" class="LineNr"> 905 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; esc &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L906" class="LineNr"> 906 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cancel &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L907" class="LineNr"> 907 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^a &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L908" class="LineNr"> 908 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;&lt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L909" class="LineNr"> 909 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^b &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L910" class="LineNr"> 910 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;word &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L911" class="LineNr"> 911 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^f &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L912" class="LineNr"> 912 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; word&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L913" class="LineNr"> 913 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^e &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L914" class="LineNr"> 914 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &gt;&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L897" class="LineNr"> 897 </span> <a href='../500fake-screen.mu.html#L409'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y, width, height, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L898" class="LineNr"> 898 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y
<span id="L899" class="LineNr"> 899 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^r &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L900" class="LineNr"> 900 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='main.mu.html#L4'>main</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L901" class="LineNr"> 901 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; enter &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0xc</span>/bg=menu-really-highlight
<span id="L902" class="LineNr"> 902 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; go &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L903" class="LineNr"> 903 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^m &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0xc</span>/bg=menu-really-highlight
<span id="L904" class="LineNr"> 904 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; create &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L905" class="LineNr"> 905 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; esc &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L906" class="LineNr"> 906 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cancel &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L907" class="LineNr"> 907 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^a &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L908" class="LineNr"> 908 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;&lt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L909" class="LineNr"> 909 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^b &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L910" class="LineNr"> 910 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;word &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L911" class="LineNr"> 911 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^f &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L912" class="LineNr"> 912 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; word&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L913" class="LineNr"> 913 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^e &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L914" class="LineNr"> 914 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &gt;&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L915" class="LineNr"> 915 </span><span class="Delimiter">}</span>
<span id="L916" class="LineNr"> 916 </span>
<span id="L917" class="LineNr"> 917 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='environment.mu.html#L917'>word-at-cursor</a></span> _self: (addr <a href='environment.mu.html#L8'>environment</a>), out: (addr stream byte) <span class="Delimiter">{</span>
@ -1017,18 +1017,18 @@ if ('onhashchange' in window) {
<span id="L952" class="LineNr"> 952 </span> <span class="muComment"># data-disk -&gt; stream</span>
<span id="L953" class="LineNr"> 953 </span> <span class="PreProc">var</span> s-storage: (stream byte <span class="Constant">0x40000</span>) <span class="muComment"># space for 0x200/sectors</span>
<span id="L954" class="LineNr"> 954 </span> <span class="PreProc">var</span> s/<span class="muRegEbx">ebx</span>: (addr stream byte) <span class="Special">&lt;-</span> address s-storage
<span id="L955" class="LineNr"> 955 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading sectors from data disk&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L955" class="LineNr"> 955 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading sectors from data disk&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L956" class="LineNr"> 956 </span> <a href='../501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L957" class="LineNr"> 957 </span> <a href='../510disk.mu.html#L1'>load-sectors</a> data-disk, <span class="Constant">0</span>/lba, <span class="Constant">0x200</span>/sectors, s
<span id="L958" class="LineNr"> 958 </span><span class="CommentedCode">#? draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, s, 7/fg, 0xc5/bg=blue-bg</span>
<span id="L959" class="LineNr"> 959 </span> <span class="muComment"># stream -&gt; gap-buffer (HACK: we temporarily cannibalize the sandbox's gap-buffer)</span>
<span id="L960" class="LineNr"> 960 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;parsing&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L960" class="LineNr"> 960 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;parsing&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L961" class="LineNr"> 961 </span> <a href='../501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L962" class="LineNr"> 962 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/eax: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> get self, <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L963" class="LineNr"> 963 </span> <span class="PreProc">var</span> data-ah/eax: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data
<span id="L964" class="LineNr"> 964 </span> <span class="PreProc">var</span> data/eax: (addr <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *data-ah
<span id="L965" class="LineNr"> 965 </span> <a href='../514gap-buffer.mu.html#L68'>load-gap-buffer-from-stream</a> data, s
<span id="L966" class="LineNr"> 966 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; into gap buffer&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L966" class="LineNr"> 966 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; into gap buffer&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L967" class="LineNr"> 967 </span> <a href='../501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L968" class="LineNr"> 968 </span> <a href='../106stream.subx.html#L20'>clear-stream</a> s
<span id="L969" class="LineNr"> 969 </span> <span class="muComment"># read: gap-buffer -&gt; cell</span>
@ -1038,7 +1038,7 @@ if ('onhashchange' in window) {
<span id="L973" class="LineNr"> 973 </span> <span class="PreProc">var</span> trace/<span class="muRegEdi">edi</span>: (addr trace) <span class="Special">&lt;-</span> address trace-storage
<span id="L974" class="LineNr"> 974 </span> <a href='trace.mu.html#L61'>initialize-trace</a> trace, <span class="Constant">1</span>/only-errors, <span class="Constant">0x10</span>/capacity, <span class="Constant">0</span>/visible
<span id="L975" class="LineNr"> 975 </span> <a href='read.mu.html#L1'>read-cell</a> data, initial-root, trace
<span id="L976" class="LineNr"> 976 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; into s-expressions&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L976" class="LineNr"> 976 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; into s-expressions&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L977" class="LineNr"> 977 </span> <a href='../501draw-text.mu.html#L65'>move-cursor-to-left-margin-of-next-line</a> <span class="Constant">0</span>/screen
<span id="L978" class="LineNr"> 978 </span> <a href='../514gap-buffer.mu.html#L19'>clear-gap-buffer</a> data
<span id="L979" class="LineNr"> 979 </span> <span class="muComment">#</span>
@ -1065,7 +1065,7 @@ if ('onhashchange' in window) {
<span id="L1000" class="LineNr">1000 </span> <a href='global.mu.html#L30'>load-globals</a> globals-cell-ah, globals
<span id="L1001" class="LineNr">1001 </span> <span class="Delimiter">}</span>
<span id="L1002" class="LineNr">1002 </span> <span class="muComment"># sandbox = assoc(initial-root, 'sandbox)</span>
<span id="L1003" class="LineNr">1003 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading sandbox&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L1003" class="LineNr">1003 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading sandbox&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L1004" class="LineNr">1004 </span> <span class="PreProc">var</span> sandbox-literal-storage: (handle <a href='cell.mu.html#L1'>cell</a>)
<span id="L1005" class="LineNr">1005 </span> <span class="PreProc">var</span> sandbox-literal-ah/eax: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> address sandbox-literal-storage
<span id="L1006" class="LineNr">1006 </span> <a href='cell.mu.html#L43'>new-symbol</a> sandbox-literal-ah, <span class="Constant">&quot;sandbox&quot;</span>

View File

@ -83,9 +83,9 @@ if ('onhashchange' in window) {
<span id="L17" class="LineNr"> 17 </span> <span class="PreProc">break-if-!=</span>
<span id="L18" class="LineNr"> 18 </span> <span class="PreProc">var</span> old-x/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L19" class="LineNr"> 19 </span> <span class="PreProc">var</span> old-y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L20" class="LineNr"> 20 </span> old-x, old-y <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L174'>cursor-position</a> <span class="Constant">0</span>/screen
<span id="L20" class="LineNr"> 20 </span> old-x, old-y <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L230'>cursor-position</a> <span class="Constant">0</span>/screen
<span id="L21" class="LineNr"> 21 </span> <a href='../315stack-debug.subx.html#L26'>show-stack-state</a>
<span id="L22" class="LineNr"> 22 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, old-x, old-y
<span id="L22" class="LineNr"> 22 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, old-x, old-y
<span id="L23" class="LineNr"> 23 </span> <span class="Delimiter">}</span>
<span id="L24" class="LineNr"> 24 </span> <span class="muComment"># show intermediate progress on screen if necessary</span>
<span id="L25" class="LineNr"> 25 </span> <span class="muComment"># treat input at the real keyboard as interrupting</span>
@ -108,7 +108,7 @@ if ('onhashchange' in window) {
<span id="L42" class="LineNr"> 42 </span> <span class="PreProc">var</span> screen-obj/eax: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *screen-obj-ah
<span id="L43" class="LineNr"> 43 </span> compare screen-obj, <span class="Constant">0</span>
<span id="L44" class="LineNr"> 44 </span> <span class="PreProc">break-if-=</span>
<span id="L45" class="LineNr"> 45 </span> <a href='sandbox.mu.html#L257'>render-screen</a> <span class="Constant">0</span>/screen, screen-obj, <span class="Constant">0x58</span>/xmin, <span class="Constant">2</span>/ymin
<span id="L45" class="LineNr"> 45 </span> <a href='sandbox.mu.html#L256'>render-screen</a> <span class="Constant">0</span>/screen, screen-obj, <span class="Constant">0x58</span>/xmin, <span class="Constant">2</span>/ymin
<span id="L46" class="LineNr"> 46 </span> <span class="PreProc">var</span> key/eax: byte <span class="Special">&lt;-</span> <a href='../102keyboard.subx.html#L21'>read-key</a> <span class="Constant">0</span>/keyboard
<span id="L47" class="LineNr"> 47 </span> compare key, <span class="Constant">0</span>
<span id="L48" class="LineNr"> 48 </span> <span class="PreProc">break-if-=</span>

View File

@ -91,7 +91,7 @@ if ('onhashchange' in window) {
<span id="L28" class="LineNr"> 28 </span><span class="Delimiter">}</span>
<span id="L29" class="LineNr"> 29 </span>
<span id="L30" class="LineNr"> 30 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='global.mu.html#L30'>load-globals</a></span> in: (addr handle <a href='cell.mu.html#L1'>cell</a>), self: (addr <a href='global.mu.html#L1'>global-table</a>) <span class="Delimiter">{</span>
<span id="L31" class="LineNr"> 31 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading globals:&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L31" class="LineNr"> 31 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;loading globals:&quot;</span>, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L32" class="LineNr"> 32 </span> <span class="PreProc">var</span> remaining-ah/<span class="muRegEsi">esi</span>: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> copy in
<span id="L33" class="LineNr"> 33 </span> <span class="Delimiter">{</span>
<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">var</span> _remaining/eax: (addr <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *remaining-ah
@ -109,8 +109,8 @@ if ('onhashchange' in window) {
<span id="L46" class="LineNr"> 46 </span> <span class="PreProc">var</span> _name-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *name-data-ah
<span id="L47" class="LineNr"> 47 </span> <span class="PreProc">var</span> name-data/<span class="muRegEdx">edx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _name-data
<span id="L48" class="LineNr"> 48 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> name-data
<span id="L49" class="LineNr"> 49 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L50" class="LineNr"> 50 </span> <a href='../501draw-text.mu.html#L232'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, name-data, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L49" class="LineNr"> 49 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">3</span>/fg <span class="Constant">0</span>/bg
<span id="L50" class="LineNr"> 50 </span> <a href='../501draw-text.mu.html#L240'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, name-data, <span class="Constant">3</span>/fg, <span class="Constant">0</span>/bg
<span id="L51" class="LineNr"> 51 </span> <span class="PreProc">var</span> value-ah/eax: (addr handle <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> get curr, right
<span id="L52" class="LineNr"> 52 </span> <span class="PreProc">var</span> value/eax: (addr <a href='cell.mu.html#L1'>cell</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *value-ah
<span id="L53" class="LineNr"> 53 </span> <span class="PreProc">var</span> value-data-ah/eax: (addr handle stream byte) <span class="Special">&lt;-</span> get value, text-data
@ -179,7 +179,7 @@ if ('onhashchange' in window) {
<span id="L116" class="LineNr">116 </span>
<span id="L117" class="LineNr">117 </span><span class="muComment"># globals layout: 1 char padding, 41 code, 1 padding, 41 code, 1 padding = 85 chars</span>
<span id="L118" class="LineNr">118 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='global.mu.html#L118'>render-globals</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='global.mu.html#L1'>global-table</a>), show-cursor?: boolean <span class="Delimiter">{</span>
<span id="L119" class="LineNr">119 </span> <a href='../500fake-screen.mu.html#L353'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, <span class="Constant">0x55</span>/xmax, <span class="Constant">0x2f</span>/ymax=screen-height-without-menu, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L119" class="LineNr">119 </span> <a href='../500fake-screen.mu.html#L409'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, <span class="Constant">0x55</span>/xmax, <span class="Constant">0x2f</span>/ymax=screen-height-without-menu, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L120" class="LineNr">120 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='global.mu.html#L1'>global-table</a>) <span class="Special">&lt;-</span> copy _self
<span id="L121" class="LineNr">121 </span> compare self, <span class="Constant">0</span>
<span id="L122" class="LineNr">122 </span> <span class="Delimiter">{</span>
@ -269,28 +269,28 @@ if ('onhashchange' in window) {
<span id="L206" class="LineNr">206 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='global.mu.html#L206'>render-globals-menu</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='global.mu.html#L1'>global-table</a>) <span class="Delimiter">{</span>
<span id="L207" class="LineNr">207 </span> <span class="PreProc">var</span> _width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L208" class="LineNr">208 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L209" class="LineNr">209 </span> _width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L209" class="LineNr">209 </span> _width, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L210" class="LineNr">210 </span> <span class="PreProc">var</span> width/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy _width
<span id="L211" class="LineNr">211 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy height
<span id="L212" class="LineNr">212 </span> y <span class="Special">&lt;-</span> decrement
<span id="L213" class="LineNr">213 </span> <span class="PreProc">var</span> height/<span class="muRegEbx">ebx</span>: int <span class="Special">&lt;-</span> copy y
<span id="L214" class="LineNr">214 </span> height <span class="Special">&lt;-</span> increment
<span id="L215" class="LineNr">215 </span> <a href='../500fake-screen.mu.html#L353'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y, width, height, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L216" class="LineNr">216 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y
<span id="L217" class="LineNr">217 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^r &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L218" class="LineNr">218 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='main.mu.html#L4'>main</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L219" class="LineNr">219 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^s &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L220" class="LineNr">220 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='sandbox.mu.html#L1'>sandbox</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L221" class="LineNr">221 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^g &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L222" class="LineNr">222 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; go to &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L223" class="LineNr">223 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^a &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L224" class="LineNr">224 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;&lt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L225" class="LineNr">225 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^b &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L226" class="LineNr">226 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;word &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L227" class="LineNr">227 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^f &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L228" class="LineNr">228 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; word&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L229" class="LineNr">229 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^e &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L230" class="LineNr">230 </span> <a href='../501draw-text.mu.html#L133'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &gt;&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L215" class="LineNr">215 </span> <a href='../500fake-screen.mu.html#L409'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y, width, height, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L216" class="LineNr">216 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">0</span>/x, y
<span id="L217" class="LineNr">217 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^r &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L218" class="LineNr">218 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='main.mu.html#L4'>main</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L219" class="LineNr">219 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^s &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L220" class="LineNr">220 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; run <a href='sandbox.mu.html#L1'>sandbox</a> &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L221" class="LineNr">221 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^g &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L222" class="LineNr">222 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; go to &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L223" class="LineNr">223 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^a &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L224" class="LineNr">224 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;&lt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L225" class="LineNr">225 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^b &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L226" class="LineNr">226 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt;word &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L227" class="LineNr">227 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^f &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L228" class="LineNr">228 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; word&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L229" class="LineNr">229 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; ^e &quot;</span>, width, <span class="Constant">0</span>/fg, <span class="Constant">0x5c</span>/bg=menu-highlight
<span id="L230" class="LineNr">230 </span> <a href='../501draw-text.mu.html#L140'>draw-text-rightward-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &gt;&gt; &quot;</span>, width, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L231" class="LineNr">231 </span><span class="Delimiter">}</span>
<span id="L232" class="LineNr">232 </span>
<span id="L233" class="LineNr">233 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='global.mu.html#L233'>edit-globals</a></span> _self: (addr <a href='global.mu.html#L1'>global-table</a>), key: grapheme <span class="Delimiter">{</span>
@ -683,14 +683,14 @@ if ('onhashchange' in window) {
<span id="L620" class="LineNr">620 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='global.mu.html#L620'>render-image-definition</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), _self: (addr <a href='global.mu.html#L8'>global</a>), x: int, _y: int<span class="PreProc"> -&gt; </span>_/<span class="muRegEcx">ecx</span>: int <span class="Delimiter">{</span>
<span id="L621" class="LineNr">621 </span> <span class="PreProc">var</span> self/<span class="muRegEsi">esi</span>: (addr <a href='global.mu.html#L8'>global</a>) <span class="Special">&lt;-</span> copy _self
<span id="L622" class="LineNr">622 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy _y
<span id="L623" class="LineNr">623 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span> <span class="Constant">0x20</span>
<span id="L624" class="LineNr">624 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L623" class="LineNr">623 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x20</span> <span class="Constant">0x20</span>
<span id="L624" class="LineNr">624 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, y, <span class="Constant">4</span>/fg <span class="Constant">0</span>/bg
<span id="L625" class="LineNr">625 </span> <span class="Delimiter">{</span>
<span id="L626" class="LineNr">626 </span> <span class="PreProc">var</span> name-ah/eax: (addr handle array byte) <span class="Special">&lt;-</span> get self, name
<span id="L627" class="LineNr">627 </span> <span class="PreProc">var</span> _name/eax: (addr array byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *name-ah
<span id="L628" class="LineNr">628 </span> <span class="PreProc">var</span> name/<span class="muRegEdx">edx</span>: (addr array byte) <span class="Special">&lt;-</span> copy _name
<span id="L629" class="LineNr">629 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L125'>draw-text-rightward-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;define &quot;</span>, x y, <span class="Constant">7</span>/fg=definition, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L630" class="LineNr">630 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L125'>draw-text-rightward-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, name, x y, <span class="Constant">7</span>/fg=definition, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L629" class="LineNr">629 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L132'>draw-text-rightward-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;define &quot;</span>, x y, <span class="Constant">7</span>/fg=definition, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L630" class="LineNr">630 </span> x <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L132'>draw-text-rightward-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, name, x y, <span class="Constant">7</span>/fg=definition, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L631" class="LineNr">631 </span> <span class="Delimiter">}</span>
<span id="L632" class="LineNr">632 </span> y <span class="Special">&lt;-</span> increment <span class="muComment"># skip definition line</span>
<span id="L633" class="LineNr">633 </span> <span class="muComment"># y is now in pixels</span>

View File

@ -323,7 +323,7 @@ if ('onhashchange' in window) {
<span id="L312" class="LineNr">312 </span> <span class="PreProc">var</span> buffer/<span class="muRegEdi">edi</span>: (addr <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> address buffer-storage
<span id="L313" class="LineNr">313 </span> <a href='../514gap-buffer.mu.html#L11'>initialize-gap-buffer</a> buffer, <span class="Constant">0x40</span>/max-symbol-size
<span id="L314" class="LineNr">314 </span> <span class="muComment"># scan for first non-$</span>
<span id="L315" class="LineNr">315 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> sym-data
<span id="L315" class="LineNr">315 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> sym-data
<span id="L316" class="LineNr">316 </span> <a href='../514gap-buffer.mu.html#L441'>add-grapheme-at-gap</a> buffer, g
<span id="L317" class="LineNr">317 </span> <span class="Delimiter">{</span>
<span id="L318" class="LineNr">318 </span> compare g, <span class="Constant">0x24</span>/dollar
@ -334,7 +334,7 @@ if ('onhashchange' in window) {
<span id="L323" class="LineNr">323 </span> <span class="PreProc">break-if-=</span>
<span id="L324" class="LineNr">324 </span> <span class="PreProc">return</span> <span class="muComment"># symbol is all '$'s; do nothing</span>
<span id="L325" class="LineNr">325 </span> <span class="Delimiter">}</span>
<span id="L326" class="LineNr">326 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> sym-data
<span id="L326" class="LineNr">326 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> sym-data
<span id="L327" class="LineNr">327 </span> <a href='../514gap-buffer.mu.html#L441'>add-grapheme-at-gap</a> buffer, g
<span id="L328" class="LineNr">328 </span> <span class="PreProc">loop</span>
<span id="L329" class="LineNr">329 </span> <span class="Delimiter">}</span>
@ -345,7 +345,7 @@ if ('onhashchange' in window) {
<span id="L334" class="LineNr">334 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> sym-data
<span id="L335" class="LineNr">335 </span> compare done?, <span class="Constant">0</span>/false
<span id="L336" class="LineNr">336 </span> <span class="PreProc">break-if-!=</span>
<span id="L337" class="LineNr">337 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> sym-data
<span id="L337" class="LineNr">337 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> sym-data
<span id="L338" class="LineNr">338 </span> <span class="Delimiter">{</span>
<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> curr-operator?/eax: boolean <span class="Special">&lt;-</span> <a href='infix.mu.html#L458'>operator-grapheme?</a> g
<span id="L340" class="LineNr">340 </span> compare curr-operator?, operator-so-far?
@ -432,7 +432,7 @@ if ('onhashchange' in window) {
<span id="L421" class="LineNr">421 </span> <span class="PreProc">var</span> _x-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *x-data-ah
<span id="L422" class="LineNr">422 </span> <span class="PreProc">var</span> x-data/<span class="muRegEsi">esi</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _x-data
<span id="L423" class="LineNr">423 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> x-data
<span id="L424" class="LineNr">424 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> x-data
<span id="L424" class="LineNr">424 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> x-data
<span id="L425" class="LineNr">425 </span> <span class="muComment"># special case: '$' is reserved for gensyms, and can work with either</span>
<span id="L426" class="LineNr">426 </span> <span class="muComment"># operator or non-operator symbols.</span>
<span id="L427" class="LineNr">427 </span> <span class="Delimiter">{</span>
@ -445,7 +445,7 @@ if ('onhashchange' in window) {
<span id="L434" class="LineNr">434 </span> <span class="muComment"># '$', '$$', '$$$', etc. are regular symbols</span>
<span id="L435" class="LineNr">435 </span> <span class="PreProc">return</span> <span class="Constant">0</span>/false
<span id="L436" class="LineNr">436 </span> <span class="Delimiter">}</span>
<span id="L437" class="LineNr">437 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> x-data
<span id="L437" class="LineNr">437 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> x-data
<span id="L438" class="LineNr">438 </span> <span class="PreProc">loop</span>
<span id="L439" class="LineNr">439 </span> <span class="Delimiter">}</span>
<span id="L440" class="LineNr">440 </span> <span class="Delimiter">{</span>
@ -460,7 +460,7 @@ if ('onhashchange' in window) {
<span id="L449" class="LineNr">449 </span> compare done?, <span class="Constant">0</span>/false
<span id="L450" class="LineNr">450 </span> <span class="Delimiter">}</span>
<span id="L451" class="LineNr">451 </span> <span class="PreProc">break-if-!=</span>
<span id="L452" class="LineNr">452 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> x-data
<span id="L452" class="LineNr">452 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> x-data
<span id="L453" class="LineNr">453 </span> <span class="PreProc">loop</span>
<span id="L454" class="LineNr">454 </span> <span class="Delimiter">}</span>
<span id="L455" class="LineNr">455 </span> <span class="PreProc">return</span> <span class="Constant">1</span>/true

View File

@ -411,7 +411,7 @@ if ('onhashchange' in window) {
<span id="L457" class="LineNr">457 </span> <span class="PreProc">var</span> sandbox-storage: <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L458" class="LineNr">458 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/<span class="muRegEsi">esi</span>: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> address sandbox-storage
<span id="L459" class="LineNr">459 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(define m (litmac litfn () (a b) `(+ ,a ,b)))&quot;</span>
<span id="L460" class="LineNr">460 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L460" class="LineNr">460 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L461" class="LineNr">461 </span> <span class="muComment"># invoke macro</span>
<span id="L462" class="LineNr">462 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(m 3 4)&quot;</span>
<span id="L463" class="LineNr">463 </span> <span class="PreProc">var</span> gap-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data
@ -450,7 +450,7 @@ if ('onhashchange' in window) {
<span id="L496" class="LineNr">496 </span> <span class="PreProc">var</span> sandbox-storage: <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L497" class="LineNr">497 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/<span class="muRegEsi">esi</span>: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> address sandbox-storage
<span id="L498" class="LineNr">498 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(define m (litmac litfn () (a b) `(+ ,a ,b)))&quot;</span>
<span id="L499" class="LineNr">499 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L499" class="LineNr">499 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L500" class="LineNr">500 </span> <span class="muComment"># invoke macro</span>
<span id="L501" class="LineNr">501 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(fn() (m 3 4))&quot;</span>
<span id="L502" class="LineNr">502 </span> <span class="PreProc">var</span> gap-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data
@ -488,7 +488,7 @@ if ('onhashchange' in window) {
<span id="L534" class="LineNr">534 </span> <span class="PreProc">var</span> sandbox-storage: <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L535" class="LineNr">535 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/<span class="muRegEsi">esi</span>: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> address sandbox-storage
<span id="L536" class="LineNr">536 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(define m (litmac litfn () (a b) `(+ ,a ,b)))&quot;</span>
<span id="L537" class="LineNr">537 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L537" class="LineNr">537 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L538" class="LineNr">538 </span> <span class="muComment"># invoke macro</span>
<span id="L539" class="LineNr">539 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;((fn() (m 3 4)))&quot;</span>
<span id="L540" class="LineNr">540 </span> <span class="PreProc">var</span> gap-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data
@ -557,7 +557,7 @@ if ('onhashchange' in window) {
<span id="L603" class="LineNr">603 </span> <span class="PreProc">var</span> sandbox-storage: <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L604" class="LineNr">604 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/<span class="muRegEsi">esi</span>: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> address sandbox-storage
<span id="L605" class="LineNr">605 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(define m (litmac litfn () (a b) `(+ ,a ,b)))&quot;</span>
<span id="L606" class="LineNr">606 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L606" class="LineNr">606 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L607" class="LineNr">607 </span> <span class="muComment"># invoke macro</span>
<span id="L608" class="LineNr">608 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;`(print [result is ] ,(m 3 4)))&quot;</span>
<span id="L609" class="LineNr">609 </span> <span class="PreProc">var</span> gap-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data
@ -595,7 +595,7 @@ if ('onhashchange' in window) {
<span id="L641" class="LineNr">641 </span> <span class="PreProc">var</span> sandbox-storage: <a href='sandbox.mu.html#L1'>sandbox</a>
<span id="L642" class="LineNr">642 </span> <span class="PreProc">var</span> <a href='sandbox.mu.html#L1'>sandbox</a>/<span class="muRegEsi">esi</span>: (addr <a href='sandbox.mu.html#L1'>sandbox</a>) <span class="Special">&lt;-</span> address sandbox-storage
<span id="L643" class="LineNr">643 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;(define m (litmac litfn () (a b) `(+ ,a ,b)))&quot;</span>
<span id="L644" class="LineNr">644 </span> <a href='sandbox.mu.html#L453'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L644" class="LineNr">644 </span> <a href='sandbox.mu.html#L452'>edit-sandbox</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">0x13</span>/ctrl-s, globals, <span class="Constant">0</span>/no-disk
<span id="L645" class="LineNr">645 </span> <span class="muComment"># invoke macro</span>
<span id="L646" class="LineNr">646 </span> <a href='sandbox.mu.html#L41'>initialize-sandbox-with</a> <a href='sandbox.mu.html#L1'>sandbox</a>, <span class="Constant">&quot;`(a ,(m 3 4) `(b ,(m 3 4) ,,(m 3 4)))&quot;</span>
<span id="L647" class="LineNr">647 </span> <span class="PreProc">var</span> gap-ah/<span class="muRegEcx">ecx</span>: (addr handle <a href='../514gap-buffer.mu.html#L3'>gap-buffer</a>) <span class="Special">&lt;-</span> get <a href='sandbox.mu.html#L1'>sandbox</a>, data

View File

@ -407,12 +407,12 @@ if ('onhashchange' in window) {
<span id="L341" class="LineNr">341 </span> <span class="Delimiter">{</span>
<span id="L342" class="LineNr">342 </span> <span class="PreProc">break-if-!=</span>
<span id="L343" class="LineNr">343 </span> <span class="muComment"># actual empty, but expected not empty</span>
<span id="L344" class="LineNr">344 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L345" class="LineNr">345 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: too short\n&quot;</span>, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L344" class="LineNr">344 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L345" class="LineNr">345 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: too short\n&quot;</span>, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L346" class="LineNr">346 </span> <a href='../104test.subx.html#L5'>count-test-failure</a>
<span id="L347" class="LineNr">347 </span> <span class="PreProc">return</span>
<span id="L348" class="LineNr">348 </span> <span class="Delimiter">}</span>
<span id="L349" class="LineNr">349 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<span id="L349" class="LineNr">349 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;.&quot;</span>, <span class="Constant">3</span>/fg/cyan, <span class="Constant">0</span>/bg
<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> <span class="PreProc">var</span> expected-done?/eax: boolean <span class="Special">&lt;-</span> <a href='../309stream.subx.html#L6'>stream-empty?</a> expected
@ -420,8 +420,8 @@ if ('onhashchange' in window) {
<span id="L354" class="LineNr">354 </span> <span class="Delimiter">{</span>
<span id="L355" class="LineNr">355 </span> <span class="PreProc">break-if-=</span>
<span id="L356" class="LineNr">356 </span> <span class="muComment"># actual not empty, but expected empty</span>
<span id="L357" class="LineNr">357 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L358" class="LineNr">358 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: too long\n&quot;</span>, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L357" class="LineNr">357 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L358" class="LineNr">358 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;: too long\n&quot;</span>, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L359" class="LineNr">359 </span> <a href='../104test.subx.html#L5'>count-test-failure</a>
<span id="L360" class="LineNr">360 </span> <span class="PreProc">return</span>
<span id="L361" class="LineNr">361 </span> <span class="Delimiter">}</span>
@ -438,7 +438,7 @@ if ('onhashchange' in window) {
<span id="L372" class="LineNr">372 </span> compare match?, <span class="Constant">0</span>/false
<span id="L373" class="LineNr">373 </span> <span class="Delimiter">{</span>
<span id="L374" class="LineNr">374 </span> <span class="PreProc">break-if-!=</span>
<span id="L375" class="LineNr">375 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L375" class="LineNr">375 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, message, <span class="Constant">3</span>/fg=cyan <span class="Constant">0</span>/bg
<span id="L376" class="LineNr">376 </span> <a href='../104test.subx.html#L5'>count-test-failure</a>
<span id="L377" class="LineNr">377 </span> <span class="PreProc">return</span>
<span id="L378" class="LineNr">378 </span> <span class="Delimiter">}</span>

View File

@ -137,56 +137,56 @@ if ('onhashchange' in window) {
<span id="L72" class="LineNr"> 72 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='primitives.mu.html#L72'>render-primitives</a></span> <a href='../500fake-screen.mu.html#L14'>screen</a>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>), xmin: int, xmax: int, ymax: int <span class="Delimiter">{</span>
<span id="L73" class="LineNr"> 73 </span> <span class="PreProc">var</span> y/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy ymax
<span id="L74" class="LineNr"> 74 </span> y <span class="Special">&lt;-</span> subtract <span class="Constant">0x11</span>/primitives-border
<span id="L75" class="LineNr"> 75 </span> <a href='../500fake-screen.mu.html#L353'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, y, xmax, ymax, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L75" class="LineNr"> 75 </span> <a href='../500fake-screen.mu.html#L409'>clear-rect</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, xmin, y, xmax, ymax, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L76" class="LineNr"> 76 </span> y <span class="Special">&lt;-</span> increment
<span id="L77" class="LineNr"> 77 </span> <span class="PreProc">var</span> right-min/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy xmax
<span id="L78" class="LineNr"> 78 </span> right-min <span class="Special">&lt;-</span> subtract <span class="Constant">0x1e</span>/primitives-divider
<span id="L79" class="LineNr"> 79 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L80" class="LineNr"> 80 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;primitives&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L79" class="LineNr"> 79 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L80" class="LineNr"> 80 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;primitives&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L81" class="LineNr"> 81 </span> y <span class="Special">&lt;-</span> increment
<span id="L82" class="LineNr"> 82 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L83" class="LineNr"> 83 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; fn <a href='evaluate.mu.html#L681'>apply</a> set if while&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L82" class="LineNr"> 82 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L83" class="LineNr"> 83 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; fn <a href='evaluate.mu.html#L681'>apply</a> set if while&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L84" class="LineNr"> 84 </span> y <span class="Special">&lt;-</span> increment
<span id="L85" class="LineNr"> 85 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L86" class="LineNr"> 86 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;booleans&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L85" class="LineNr"> 85 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L86" class="LineNr"> 86 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;booleans&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L87" class="LineNr"> 87 </span> y <span class="Special">&lt;-</span> increment
<span id="L88" class="LineNr"> 88 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L89" class="LineNr"> 89 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; = and or not&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L88" class="LineNr"> 88 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L89" class="LineNr"> 89 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; = and or not&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L90" class="LineNr"> 90 </span> y <span class="Special">&lt;-</span> increment
<span id="L91" class="LineNr"> 91 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L92" class="LineNr"> 92 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;lists&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L91" class="LineNr"> 91 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L92" class="LineNr"> 92 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;lists&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L93" class="LineNr"> 93 </span> y <span class="Special">&lt;-</span> increment
<span id="L94" class="LineNr"> 94 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L95" class="LineNr"> 95 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cons <a href='evaluate.mu.html#L1237'>car</a> <a href='evaluate.mu.html#L1265'>cdr</a> no cons? len&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L94" class="LineNr"> 94 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L95" class="LineNr"> 95 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cons <a href='evaluate.mu.html#L1237'>car</a> <a href='evaluate.mu.html#L1265'>cdr</a> no cons? len&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L96" class="LineNr"> 96 </span> y <span class="Special">&lt;-</span> increment
<span id="L97" class="LineNr"> 97 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L98" class="LineNr"> 98 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;numbers&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L97" class="LineNr"> 97 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L98" class="LineNr"> 98 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;numbers&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L99" class="LineNr"> 99 </span> y <span class="Special">&lt;-</span> increment
<span id="L100" class="LineNr"> 100 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L101" class="LineNr"> 101 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; + - * / %&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L100" class="LineNr"> 100 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L101" class="LineNr"> 101 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; + - * / %&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L102" class="LineNr"> 102 </span> y <span class="Special">&lt;-</span> increment
<span id="L103" class="LineNr"> 103 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L104" class="LineNr"> 104 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt; &gt; &lt;= &gt;=&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L103" class="LineNr"> 103 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L104" class="LineNr"> 104 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; &lt; &gt; &lt;= &gt;=&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L105" class="LineNr"> 105 </span> y <span class="Special">&lt;-</span> increment
<span id="L106" class="LineNr"> 106 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L107" class="LineNr"> 107 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; sqrt <a href='../506math.mu.html#L1'>abs</a> sgn&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L106" class="LineNr"> 106 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L107" class="LineNr"> 107 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; sqrt <a href='../506math.mu.html#L1'>abs</a> sgn&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L108" class="LineNr"> 108 </span> y <span class="Special">&lt;-</span> increment
<span id="L109" class="LineNr"> 109 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L110" class="LineNr"> 110 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;arrays&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L109" class="LineNr"> 109 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L110" class="LineNr"> 110 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;arrays&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L111" class="LineNr"> 111 </span> y <span class="Special">&lt;-</span> increment
<span id="L112" class="LineNr"> 112 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L113" class="LineNr"> 113 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; array index iset len&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L112" class="LineNr"> 112 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L113" class="LineNr"> 113 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; array index iset len&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L114" class="LineNr"> 114 </span> y <span class="Special">&lt;-</span> increment
<span id="L115" class="LineNr"> 115 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy right-min
<span id="L116" class="LineNr"> 116 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; populate&quot;</span>, tmpx, xmax, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L117" class="LineNr"> 117 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: int _ -&gt; array&quot;</span>, tmpx, xmax, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L116" class="LineNr"> 116 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; populate&quot;</span>, tmpx, xmax, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L117" class="LineNr"> 117 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: int _ -&gt; array&quot;</span>, tmpx, xmax, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L118" class="LineNr"> 118 </span> y <span class="Special">&lt;-</span> increment
<span id="L119" class="LineNr"> 119 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L120" class="LineNr"> 120 </span> <a href='../501draw-text.mu.html#L261'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;images&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L119" class="LineNr"> 119 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, right-min, y
<span id="L120" class="LineNr"> 120 </span> <a href='../501draw-text.mu.html#L269'>draw-text-wrapping-right-then-down-from-cursor</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;images&quot;</span>, right-min, y, xmax, ymax, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L121" class="LineNr"> 121 </span> y <span class="Special">&lt;-</span> increment
<span id="L122" class="LineNr"> 122 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy right-min
<span id="L123" class="LineNr"> 123 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; img&quot;</span>, tmpx, xmax, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L124" class="LineNr"> 124 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> stream x y w h&quot;</span>, tmpx, xmax, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L123" class="LineNr"> 123 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; img&quot;</span>, tmpx, xmax, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L124" class="LineNr"> 124 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> stream x y w h&quot;</span>, tmpx, xmax, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L125" class="LineNr"> 125 </span><span class="CommentedCode">#? {</span>
<span id="L126" class="LineNr"> 126 </span><span class="CommentedCode">#? compare screen, 0</span>
<span id="L127" class="LineNr"> 127 </span><span class="CommentedCode">#? break-if-!=</span>
@ -199,64 +199,64 @@ if ('onhashchange' in window) {
<span id="L134" class="LineNr"> 134 </span> <span class="PreProc">var</span> left-max/<span class="muRegEdx">edx</span>: int <span class="Special">&lt;-</span> copy xmax
<span id="L135" class="LineNr"> 135 </span> left-max <span class="Special">&lt;-</span> subtract <span class="Constant">0x20</span>/primitives-divider
<span id="L136" class="LineNr"> 136 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L137" class="LineNr"> 137 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;cursor graphics&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L137" class="LineNr"> 137 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;cursor graphics&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L138" class="LineNr"> 138 </span> y <span class="Special">&lt;-</span> increment
<span id="L139" class="LineNr"> 139 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L140" class="LineNr"> 140 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; print&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L141" class="LineNr"> 141 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> _ -&gt; _&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L140" class="LineNr"> 140 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; print&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L141" class="LineNr"> 141 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> _ -&gt; _&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L142" class="LineNr"> 142 </span> y <span class="Special">&lt;-</span> increment
<span id="L143" class="LineNr"> 143 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L144" class="LineNr"> 144 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; lines columns&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L145" class="LineNr"> 145 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> -&gt; number&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L144" class="LineNr"> 144 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; lines columns&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L145" class="LineNr"> 145 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> -&gt; number&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L146" class="LineNr"> 146 </span> y <span class="Special">&lt;-</span> increment
<span id="L147" class="LineNr"> 147 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L148" class="LineNr"> 148 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; up down left right&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L149" class="LineNr"> 149 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: screen&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L148" class="LineNr"> 148 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; up down left right&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L149" class="LineNr"> 149 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: screen&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L150" class="LineNr"> 150 </span> y <span class="Special">&lt;-</span> increment
<span id="L151" class="LineNr"> 151 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L152" class="LineNr"> 152 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cr&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L153" class="LineNr"> 153 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> &quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L154" class="LineNr"> 154 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;# move cursor down and to left margin&quot;</span>, tmpx, left-max, y, <span class="Constant">0x38</span>/fg=trace, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L152" class="LineNr"> 152 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; cr&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L153" class="LineNr"> 153 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> &quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L154" class="LineNr"> 154 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;# move cursor down and to left margin&quot;</span>, tmpx, left-max, y, <span class="Constant">0x38</span>/fg=trace, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L155" class="LineNr"> 155 </span> y <span class="Special">&lt;-</span> increment
<span id="L156" class="LineNr"> 156 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L157" class="LineNr"> 157 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;pixel graphics&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L157" class="LineNr"> 157 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;pixel graphics&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L158" class="LineNr"> 158 </span> y <span class="Special">&lt;-</span> increment
<span id="L159" class="LineNr"> 159 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L160" class="LineNr"> 160 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; circle bezier line hline vline pixel&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L160" class="LineNr"> 160 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; circle bezier line hline vline pixel&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L161" class="LineNr"> 161 </span> y <span class="Special">&lt;-</span> increment
<span id="L162" class="LineNr"> 162 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L163" class="LineNr"> 163 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; width height&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L164" class="LineNr"> 164 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> -&gt; number&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L163" class="LineNr"> 163 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; width height&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L164" class="LineNr"> 164 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: <a href='../500fake-screen.mu.html#L14'>screen</a> -&gt; number&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L165" class="LineNr"> 165 </span> y <span class="Special">&lt;-</span> increment
<span id="L166" class="LineNr"> 166 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L167" class="LineNr"> 167 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; clear&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L168" class="LineNr"> 168 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: screen&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L167" class="LineNr"> 167 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; clear&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L168" class="LineNr"> 168 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: screen&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L169" class="LineNr"> 169 </span> y <span class="Special">&lt;-</span> increment
<span id="L170" class="LineNr"> 170 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L171" class="LineNr"> 171 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;input&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L171" class="LineNr"> 171 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;input&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L172" class="LineNr"> 172 </span> y <span class="Special">&lt;-</span> increment
<span id="L173" class="LineNr"> 173 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L174" class="LineNr"> 174 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; key&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L175" class="LineNr"> 175 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: keyboard -&gt; grapheme?&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L174" class="LineNr"> 174 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; key&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L175" class="LineNr"> 175 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: keyboard -&gt; grapheme?&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L176" class="LineNr"> 176 </span> y <span class="Special">&lt;-</span> increment
<span id="L177" class="LineNr"> 177 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L178" class="LineNr"> 178 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;streams&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L178" class="LineNr"> 178 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;streams&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L179" class="LineNr"> 179 </span> y <span class="Special">&lt;-</span> increment
<span id="L180" class="LineNr"> 180 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L181" class="LineNr"> 181 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; stream&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L182" class="LineNr"> 182 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: -&gt; stream &quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L181" class="LineNr"> 181 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; stream&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L182" class="LineNr"> 182 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: -&gt; stream &quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L183" class="LineNr"> 183 </span> y <span class="Special">&lt;-</span> increment
<span id="L184" class="LineNr"> 184 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L185" class="LineNr"> 185 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; write&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L186" class="LineNr"> 186 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream grapheme -&gt; stream&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L185" class="LineNr"> 185 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; write&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L186" class="LineNr"> 186 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream grapheme -&gt; stream&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L187" class="LineNr"> 187 </span> y <span class="Special">&lt;-</span> increment
<span id="L188" class="LineNr"> 188 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L189" class="LineNr"> 189 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; rewind clear&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L190" class="LineNr"> 190 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L189" class="LineNr"> 189 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; rewind clear&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L190" class="LineNr"> 190 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L191" class="LineNr"> 191 </span> y <span class="Special">&lt;-</span> increment
<span id="L192" class="LineNr"> 192 </span> <span class="PreProc">var</span> tmpx/eax: int <span class="Special">&lt;-</span> copy xmin
<span id="L193" class="LineNr"> 193 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; read&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L194" class="LineNr"> 194 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L100'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream -&gt; grapheme&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L193" class="LineNr"> 193 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot; read&quot;</span>, tmpx, left-max, y, <span class="Constant">0x2a</span>/fg=orange, <span class="Constant">0xdc</span>/bg=green-bg
<span id="L194" class="LineNr"> 194 </span> tmpx <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L106'>draw-text-rightward</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, <span class="Constant">&quot;: stream -&gt; grapheme&quot;</span>, tmpx, left-max, y, <span class="Constant">7</span>/fg=grey, <span class="Constant">0xdc</span>/bg=green-bg
<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='primitives.mu.html#L197'>primitive-global?</a></span> _x: (addr <a href='global.mu.html#L8'>global</a>)<span class="PreProc"> -&gt; </span>_/eax: boolean <span class="Delimiter">{</span>
@ -1836,7 +1836,7 @@ if ('onhashchange' in window) {
<span id="L1771" class="LineNr">1771 </span> <span class="PreProc">var</span> stream-storage: (stream byte <span class="Constant">0x100</span>)
<span id="L1772" class="LineNr">1772 </span> <span class="PreProc">var</span> stream/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> address stream-storage
<span id="L1773" class="LineNr">1773 </span> <a href='print.mu.html#L7'>print-cell</a> second-ah, stream, trace
<span id="L1774" class="LineNr">1774 </span> <a href='../501draw-text.mu.html#L232'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, stream, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L1774" class="LineNr">1774 </span> <a href='../501draw-text.mu.html#L240'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, stream, <span class="Constant">7</span>/fg, <span class="Constant">0</span>/bg
<span id="L1775" class="LineNr">1775 </span> <span class="muComment"># return what was printed</span>
<span id="L1776" class="LineNr">1776 </span> copy-object second-ah, out
<span id="L1777" class="LineNr">1777 </span><span class="Delimiter">}</span>
@ -1879,7 +1879,7 @@ if ('onhashchange' in window) {
<span id="L1814" class="LineNr">1814 </span> <span class="PreProc">var</span> screen-ah/eax: (addr handle <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> get first, screen-data
<span id="L1815" class="LineNr">1815 </span> <span class="PreProc">var</span> _screen/eax: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *screen-ah
<span id="L1816" class="LineNr">1816 </span> <span class="PreProc">var</span> <a href='../500fake-screen.mu.html#L14'>screen</a>/<span class="muRegEcx">ecx</span>: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> copy _screen
<span id="L1817" class="LineNr">1817 </span> <a href='../500fake-screen.mu.html#L251'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L1817" class="LineNr">1817 </span> <a href='../500fake-screen.mu.html#L307'>clear-screen</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L1818" class="LineNr">1818 </span> <span class="PreProc">return</span>
<span id="L1819" class="LineNr">1819 </span> <span class="Delimiter">}</span>
<span id="L1820" class="LineNr">1820 </span> <span class="Special"><a href='trace.mu.html#L197'>error</a></span> trace, <span class="Constant">&quot;first arg for 'clear' is not a <a href='../500fake-screen.mu.html#L14'>screen</a> or a stream&quot;</span>
@ -2184,7 +2184,7 @@ if ('onhashchange' in window) {
<span id="L2119" class="LineNr">2119 </span> <span class="Delimiter">}</span>
<span id="L2120" class="LineNr">2120 </span> <span class="PreProc">var</span> fourth-value/eax: (addr float) <span class="Special">&lt;-</span> get fourth, number-data
<span id="L2121" class="LineNr">2121 </span> <span class="PreProc">var</span> color/eax: int <span class="Special">&lt;-</span> convert *fourth-value
<span id="L2122" class="LineNr">2122 </span> <a href='../500fake-screen.mu.html#L483'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L2122" class="LineNr">2122 </span> <a href='../500fake-screen.mu.html#L557'>pixel</a> <a href='../500fake-screen.mu.html#L14'>screen</a>, x, y, color
<span id="L2123" class="LineNr">2123 </span> <span class="muComment"># return nothing</span>
<span id="L2124" class="LineNr">2124 </span><span class="Delimiter">}</span>
<span id="L2125" class="LineNr">2125 </span>
@ -3193,7 +3193,7 @@ if ('onhashchange' in window) {
<span id="L3128" class="LineNr">3128 </span> <span class="PreProc">var</span> x-float/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> copy *second-value
<span id="L3129" class="LineNr">3129 </span> <span class="PreProc">var</span> x/eax: int <span class="Special">&lt;-</span> convert x-float
<span id="L3130" class="LineNr">3130 </span> <span class="PreProc">var</span> x-grapheme/eax: grapheme <span class="Special">&lt;-</span> copy x
<span id="L3131" class="LineNr">3131 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> stream-data, x-grapheme
<span id="L3131" class="LineNr">3131 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> stream-data, x-grapheme
<span id="L3132" class="LineNr">3132 </span> <span class="muComment"># return the stream</span>
<span id="L3133" class="LineNr">3133 </span> copy-object first-ah, out
<span id="L3134" class="LineNr">3134 </span><span class="Delimiter">}</span>
@ -3267,7 +3267,7 @@ if ('onhashchange' in window) {
<span id="L3202" class="LineNr">3202 </span> <span class="PreProc">var</span> _stream-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *stream-data-ah
<span id="L3203" class="LineNr">3203 </span> <span class="PreProc">var</span> stream-data/<span class="muRegEbx">ebx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _stream-data
<span id="L3204" class="LineNr">3204 </span><span class="CommentedCode">#? rewind-stream stream-data</span>
<span id="L3205" class="LineNr">3205 </span> <span class="PreProc">var</span> result-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> stream-data
<span id="L3205" class="LineNr">3205 </span> <span class="PreProc">var</span> result-grapheme/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> stream-data
<span id="L3206" class="LineNr">3206 </span> <span class="PreProc">var</span> result/eax: int <span class="Special">&lt;-</span> copy result-grapheme
<span id="L3207" class="LineNr">3207 </span> <a href='cell.mu.html#L99'>new-integer</a> out, result
<span id="L3208" class="LineNr">3208 </span><span class="Delimiter">}</span>
@ -3307,7 +3307,7 @@ if ('onhashchange' in window) {
<span id="L3242" class="LineNr">3242 </span> <span class="muComment"># compute dimensions</span>
<span id="L3243" class="LineNr">3243 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3244" class="LineNr">3244 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3245" class="LineNr">3245 </span> dummy, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3245" class="LineNr">3245 </span> dummy, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3246" class="LineNr">3246 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> convert height
<span id="L3247" class="LineNr">3247 </span> <a href='cell.mu.html#L112'>new-float</a> out, result
<span id="L3248" class="LineNr">3248 </span><span class="Delimiter">}</span>
@ -3347,7 +3347,7 @@ if ('onhashchange' in window) {
<span id="L3282" class="LineNr">3282 </span> <span class="muComment"># compute dimensions</span>
<span id="L3283" class="LineNr">3283 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3284" class="LineNr">3284 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3285" class="LineNr">3285 </span> width, dummy <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3285" class="LineNr">3285 </span> width, dummy <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3286" class="LineNr">3286 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> convert width
<span id="L3287" class="LineNr">3287 </span> <a href='cell.mu.html#L112'>new-float</a> out, result
<span id="L3288" class="LineNr">3288 </span><span class="Delimiter">}</span>
@ -3387,7 +3387,7 @@ if ('onhashchange' in window) {
<span id="L3322" class="LineNr">3322 </span> <span class="muComment"># compute dimensions</span>
<span id="L3323" class="LineNr">3323 </span> <span class="PreProc">var</span> width/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3324" class="LineNr">3324 </span> <span class="PreProc">var</span> dummy/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3325" class="LineNr">3325 </span> width, dummy <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3325" class="LineNr">3325 </span> width, dummy <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3326" class="LineNr">3326 </span> width <span class="Special">&lt;-</span> shift-left <span class="Constant">3</span>/log2-font-width
<span id="L3327" class="LineNr">3327 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> convert width
<span id="L3328" class="LineNr">3328 </span> <a href='cell.mu.html#L112'>new-float</a> out, result
@ -3428,7 +3428,7 @@ if ('onhashchange' in window) {
<span id="L3363" class="LineNr">3363 </span> <span class="muComment"># compute dimensions</span>
<span id="L3364" class="LineNr">3364 </span> <span class="PreProc">var</span> dummy/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3365" class="LineNr">3365 </span> <span class="PreProc">var</span> height/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L3366" class="LineNr">3366 </span> dummy, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L86'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3366" class="LineNr">3366 </span> dummy, height <span class="Special">&lt;-</span> <a href='../500fake-screen.mu.html#L73'>screen-size</a> <a href='../500fake-screen.mu.html#L14'>screen</a>
<span id="L3367" class="LineNr">3367 </span> height <span class="Special">&lt;-</span> shift-left <span class="Constant">4</span>/log2-font-height
<span id="L3368" class="LineNr">3368 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special">&lt;-</span> convert height
<span id="L3369" class="LineNr">3369 </span> <a href='cell.mu.html#L112'>new-float</a> out, result
@ -3558,8 +3558,8 @@ if ('onhashchange' in window) {
<span id="L3493" class="LineNr">3493 </span> <span class="PreProc">var</span> dest-ah/eax: (addr handle <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> get second, screen-data
<span id="L3494" class="LineNr">3494 </span> <span class="PreProc">var</span> dest/eax: (addr <a href='../500fake-screen.mu.html#L14'>screen</a>) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *dest-ah
<span id="L3495" class="LineNr">3495 </span> <span class="muComment">#</span>
<span id="L3496" class="LineNr">3496 </span> <a href='../500fake-screen.mu.html#L588'>convert-graphemes-to-pixels</a> src
<span id="L3497" class="LineNr">3497 </span> <a href='../500fake-screen.mu.html#L548'>copy-pixels</a> src, dest
<span id="L3496" class="LineNr">3496 </span> <a href='../500fake-screen.mu.html#L660'>convert-screen-cells-to-pixels</a> src
<span id="L3497" class="LineNr">3497 </span> <a href='../500fake-screen.mu.html#L620'>copy-pixels</a> src, dest
<span id="L3498" class="LineNr">3498 </span><span class="Delimiter">}</span>
<span id="L3499" class="LineNr">3499 </span>
<span id="L3500" class="LineNr">3500 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='primitives.mu.html#L3500'>apply-array</a></span> _args-ah: (addr handle <a href='cell.mu.html#L1'>cell</a>), _out-ah: (addr handle <a href='cell.mu.html#L1'>cell</a>), trace: (addr trace) <span class="Delimiter">{</span>

View File

@ -230,7 +230,7 @@ if ('onhashchange' in window) {
<span id="L167" class="LineNr">167 </span> <a href='print.mu.html#L7'>print-cell</a> in-ah, stream, trace
<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> d1/eax: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> d2/<span class="muRegEcx">ecx</span>: int <span class="Special">&lt;-</span> copy <span class="Constant">0</span>
<span id="L170" class="LineNr">170 </span> d1, d2 <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L199'>draw-stream-wrapping-right-then-down</a> <span class="Constant">0</span>/screen, stream, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x30</span>/ymax, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L170" class="LineNr">170 </span> d1, d2 <span class="Special">&lt;-</span> <a href='../501draw-text.mu.html#L206'>draw-stream-wrapping-right-then-down</a> <span class="Constant">0</span>/screen, stream, <span class="Constant">0</span>/xmin, <span class="Constant">0</span>/ymin, <span class="Constant">0x80</span>/xmax, <span class="Constant">0x30</span>/ymax, <span class="Constant">0</span>/x, <span class="Constant">0</span>/y, <span class="Constant">7</span>/fg, <span class="Constant">0xc5</span>/bg=blue-bg
<span id="L171" class="LineNr">171 </span><span class="Delimiter">}</span>
<span id="L172" class="LineNr">172 </span>
<span id="L173" class="LineNr">173 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='print.mu.html#L173'>dump-cell-from-cursor-over-full-screen</a></span> in-ah: (addr handle <a href='cell.mu.html#L1'>cell</a>), fg: int, bg: int <span class="Delimiter">{</span>
@ -240,7 +240,7 @@ if ('onhashchange' in window) {
<span id="L177" class="LineNr">177 </span> <span class="PreProc">var</span> trace/<span class="muRegEdi">edi</span>: (addr trace) <span class="Special">&lt;-</span> address trace-storage
<span id="L178" class="LineNr">178 </span> <a href='trace.mu.html#L61'>initialize-trace</a> trace, <span class="Constant">1</span>/only-errors, <span class="Constant">0x10</span>/capacity, <span class="Constant">0</span>/visible
<span id="L179" class="LineNr">179 </span> <a href='print.mu.html#L7'>print-cell</a> in-ah, stream, trace
<span id="L180" class="LineNr">180 </span> <a href='../501draw-text.mu.html#L232'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, stream, fg, bg
<span id="L180" class="LineNr">180 </span> <a href='../501draw-text.mu.html#L240'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, stream, fg, bg
<span id="L181" class="LineNr">181 </span><span class="Delimiter">}</span>
<span id="L182" class="LineNr">182 </span>
<span id="L183" class="LineNr">183 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='print.mu.html#L183'>print-symbol</a></span> _in: (addr <a href='cell.mu.html#L1'>cell</a>), out: (addr stream byte), trace: (addr trace) <span class="Delimiter">{</span>

File diff suppressed because it is too large Load Diff

View File

@ -612,10 +612,10 @@ if ('onhashchange' in window) {
<span id="L548" class="LineNr"> 548 </span> <a href='tokenize.mu.html#L1151'>initialize-token</a> out, <span class="Constant">&quot;,&quot;</span>
<span id="L549" class="LineNr"> 549 </span> <span class="PreProc">break</span> $next-token:case
<span id="L550" class="LineNr"> 550 </span> <span class="Delimiter">}</span>
<span id="L551" class="LineNr"> 551 </span> <a href='../500fake-screen.mu.html#L190'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x40</span> <span class="Constant">0x20</span>
<span id="L551" class="LineNr"> 551 </span> <a href='../500fake-screen.mu.html#L246'>set-cursor-position</a> <span class="Constant">0</span>/screen, <span class="Constant">0x40</span> <span class="Constant">0x20</span>
<span id="L552" class="LineNr"> 552 </span> <span class="Delimiter">{</span>
<span id="L553" class="LineNr"> 553 </span> <span class="PreProc">var</span> foo/eax: int <span class="Special">&lt;-</span> copy g
<span id="L554" class="LineNr"> 554 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, foo, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L554" class="LineNr"> 554 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, foo, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L555" class="LineNr"> 555 </span> <span class="Delimiter">}</span>
<span id="L556" class="LineNr"> 556 </span> <a href='../317abort.subx.html#L5'>abort</a> <span class="Constant">&quot;unknown <a href='tokenize.mu.html#L3'>token</a> type&quot;</span>
<span id="L557" class="LineNr"> 557 </span> <span class="Delimiter">}</span>
@ -668,7 +668,7 @@ if ('onhashchange' in window) {
<span id="L604" class="LineNr"> 604 </span> <span class="PreProc">break</span> $next-symbol-token:<span class="PreProc">loop</span>
<span id="L605" class="LineNr"> 605 </span> <span class="Delimiter">}</span>
<span id="L606" class="LineNr"> 606 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1083'>read-from-gap-buffer</a> in
<span id="L607" class="LineNr"> 607 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L607" class="LineNr"> 607 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L608" class="LineNr"> 608 </span> <span class="PreProc">loop</span>
<span id="L609" class="LineNr"> 609 </span> <span class="Delimiter">}</span>
<span id="L610" class="LineNr"> 610 </span> <a href='trace.mu.html#L250'>trace-higher</a> trace
@ -697,7 +697,7 @@ if ('onhashchange' in window) {
<span id="L633" class="LineNr"> 633 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1047'>peek-from-gap-buffer</a> in
<span id="L634" class="LineNr"> 634 </span> compare g, <span class="Constant">0x2d</span>/minus
<span id="L635" class="LineNr"> 635 </span> g <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1083'>read-from-gap-buffer</a> in <span class="muComment"># consume</span>
<span id="L636" class="LineNr"> 636 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L636" class="LineNr"> 636 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L637" class="LineNr"> 637 </span> <span class="Delimiter">}</span>
<span id="L638" class="LineNr"> 638 </span> $next-number-token:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
<span id="L639" class="LineNr"> 639 </span> <span class="PreProc">var</span> done?/eax: boolean <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1023'>gap-buffer-scan-done?</a> in
@ -735,7 +735,7 @@ if ('onhashchange' in window) {
<span id="L671" class="LineNr"> 671 </span> <span class="Delimiter">}</span>
<span id="L672" class="LineNr"> 672 </span> <a href='trace.mu.html#L185'>trace-text</a> trace, <span class="Constant">&quot;tokenize&quot;</span>, <span class="Constant">&quot;append&quot;</span>
<span id="L673" class="LineNr"> 673 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1083'>read-from-gap-buffer</a> in
<span id="L674" class="LineNr"> 674 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L674" class="LineNr"> 674 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L675" class="LineNr"> 675 </span> <span class="PreProc">loop</span>
<span id="L676" class="LineNr"> 676 </span> <span class="Delimiter">}</span>
<span id="L677" class="LineNr"> 677 </span> <a href='trace.mu.html#L250'>trace-higher</a> trace
@ -763,7 +763,7 @@ if ('onhashchange' in window) {
<span id="L699" class="LineNr"> 699 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../514gap-buffer.mu.html#L1083'>read-from-gap-buffer</a> in
<span id="L700" class="LineNr"> 700 </span> compare g, <span class="Constant">0x22</span>/double-quote
<span id="L701" class="LineNr"> 701 </span> <span class="PreProc">break-if-=</span>
<span id="L702" class="LineNr"> 702 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L702" class="LineNr"> 702 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L703" class="LineNr"> 703 </span> <span class="PreProc">loop</span>
<span id="L704" class="LineNr"> 704 </span> <span class="Delimiter">}</span>
<span id="L705" class="LineNr"> 705 </span> <span class="Delimiter">{</span>
@ -812,7 +812,7 @@ if ('onhashchange' in window) {
<span id="L748" class="LineNr"> 748 </span> <span class="PreProc">break-if-=</span> $next-balanced-stream-token:<span class="PreProc">loop</span>
<span id="L749" class="LineNr"> 749 </span> decrement bracket-count
<span id="L750" class="LineNr"> 750 </span> <span class="Delimiter">}</span>
<span id="L751" class="LineNr"> 751 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L751" class="LineNr"> 751 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L752" class="LineNr"> 752 </span> <span class="PreProc">loop</span>
<span id="L753" class="LineNr"> 753 </span> <span class="Delimiter">}</span>
<span id="L754" class="LineNr"> 754 </span> <span class="Delimiter">{</span>
@ -835,7 +835,7 @@ if ('onhashchange' in window) {
<span id="L771" class="LineNr"> 771 </span> populate-stream out-data-ah, <span class="Constant">0x40</span>
<span id="L772" class="LineNr"> 772 </span> <span class="PreProc">var</span> _out-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *out-data-ah
<span id="L773" class="LineNr"> 773 </span> <span class="PreProc">var</span> out-data/<span class="muRegEdi">edi</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _out-data
<span id="L774" class="LineNr"> 774 </span> <a href='../403unicode.mu.html#L176'>write-grapheme</a> out-data, g
<span id="L774" class="LineNr"> 774 </span> <a href='../403unicode.mu.html#L339'>write-grapheme</a> out-data, g
<span id="L775" class="LineNr"> 775 </span> <span class="Delimiter">{</span>
<span id="L776" class="LineNr"> 776 </span> <span class="PreProc">var</span> <a href='trace.mu.html#L123'>should-trace?</a>/eax: boolean <span class="Special">&lt;-</span> <a href='trace.mu.html#L123'>should-trace?</a> trace
<span id="L777" class="LineNr"> 777 </span> compare <a href='trace.mu.html#L123'>should-trace?</a>, <span class="Constant">0</span>/false
@ -1035,12 +1035,12 @@ if ('onhashchange' in window) {
<span id="L971" class="LineNr"> 971 </span> <span class="PreProc">var</span> _in-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *in-data-ah
<span id="L972" class="LineNr"> 972 </span> <span class="PreProc">var</span> in-data/<span class="muRegEcx">ecx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _in-data
<span id="L973" class="LineNr"> 973 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> in-data
<span id="L974" class="LineNr"> 974 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L974" class="LineNr"> 974 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L975" class="LineNr"> 975 </span> <span class="muComment"># if '-', read another</span>
<span id="L976" class="LineNr"> 976 </span> <span class="Delimiter">{</span>
<span id="L977" class="LineNr"> 977 </span> compare g, <span class="Constant">0x2d</span>/minus
<span id="L978" class="LineNr"> 978 </span> <span class="PreProc">break-if-!=</span>
<span id="L979" class="LineNr"> 979 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L979" class="LineNr"> 979 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L980" class="LineNr"> 980 </span> <span class="Delimiter">}</span>
<span id="L981" class="LineNr"> 981 </span> <span class="Delimiter">{</span>
<span id="L982" class="LineNr"> 982 </span> <span class="Delimiter">{</span>
@ -1054,7 +1054,7 @@ if ('onhashchange' in window) {
<span id="L990" class="LineNr"> 990 </span> compare done?, <span class="Constant">0</span>/false
<span id="L991" class="LineNr"> 991 </span> <span class="Delimiter">}</span>
<span id="L992" class="LineNr"> 992 </span> <span class="PreProc">break-if-!=</span>
<span id="L993" class="LineNr"> 993 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L993" class="LineNr"> 993 </span> g <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L994" class="LineNr"> 994 </span> <span class="PreProc">loop</span>
<span id="L995" class="LineNr"> 995 </span> <span class="Delimiter">}</span>
<span id="L996" class="LineNr"> 996 </span> <span class="PreProc">return</span> <span class="Constant">1</span>/true
@ -1072,7 +1072,7 @@ if ('onhashchange' in window) {
<span id="L1008" class="LineNr">1008 </span> <span class="PreProc">var</span> in-data-ah/eax: (addr handle stream byte) <span class="Special">&lt;-</span> get self, text-data
<span id="L1009" class="LineNr">1009 </span> <span class="PreProc">var</span> in-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *in-data-ah
<span id="L1010" class="LineNr">1010 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> in-data
<span id="L1011" class="LineNr">1011 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L1011" class="LineNr">1011 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L1012" class="LineNr">1012 </span> <span class="PreProc">var</span> result/eax: boolean <span class="Special">&lt;-</span> <a href='tokenize.mu.html#L934'>bracket-grapheme?</a> g
<span id="L1013" class="LineNr">1013 </span> <span class="PreProc">return</span> result
<span id="L1014" class="LineNr">1014 </span><span class="Delimiter">}</span>
@ -1119,7 +1119,7 @@ if ('onhashchange' in window) {
<span id="L1055" class="LineNr">1055 </span> <span class="PreProc">var</span> _in-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *in-data-ah
<span id="L1056" class="LineNr">1056 </span> <span class="PreProc">var</span> in-data/<span class="muRegEcx">ecx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _in-data
<span id="L1057" class="LineNr">1057 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> in-data
<span id="L1058" class="LineNr">1058 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L1058" class="LineNr">1058 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L1059" class="LineNr">1059 </span> compare g, <span class="Constant">0x28</span>/open-paren
<span id="L1060" class="LineNr">1060 </span> <span class="Delimiter">{</span>
<span id="L1061" class="LineNr">1061 </span> <span class="PreProc">break-if-!=</span>
@ -1135,7 +1135,7 @@ if ('onhashchange' in window) {
<span id="L1071" class="LineNr">1071 </span> <span class="PreProc">var</span> _in-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *in-data-ah
<span id="L1072" class="LineNr">1072 </span> <span class="PreProc">var</span> in-data/<span class="muRegEcx">ecx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _in-data
<span id="L1073" class="LineNr">1073 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> in-data
<span id="L1074" class="LineNr">1074 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L1074" class="LineNr">1074 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L1075" class="LineNr">1075 </span> compare g, <span class="Constant">0x29</span>/close-paren
<span id="L1076" class="LineNr">1076 </span> <span class="Delimiter">{</span>
<span id="L1077" class="LineNr">1077 </span> <span class="PreProc">break-if-!=</span>
@ -1151,7 +1151,7 @@ if ('onhashchange' in window) {
<span id="L1087" class="LineNr">1087 </span> <span class="PreProc">var</span> _in-data/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *in-data-ah
<span id="L1088" class="LineNr">1088 </span> <span class="PreProc">var</span> in-data/<span class="muRegEcx">ecx</span>: (addr stream byte) <span class="Special">&lt;-</span> copy _in-data
<span id="L1089" class="LineNr">1089 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> in-data
<span id="L1090" class="LineNr">1090 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L92'>read-grapheme</a> in-data
<span id="L1090" class="LineNr">1090 </span> <span class="PreProc">var</span> g/eax: grapheme <span class="Special">&lt;-</span> <a href='../403unicode.mu.html#L236'>read-grapheme</a> in-data
<span id="L1091" class="LineNr">1091 </span> compare g, <span class="Constant">0x2e</span>/dot
<span id="L1092" class="LineNr">1092 </span> <span class="Delimiter">{</span>
<span id="L1093" class="LineNr">1093 </span> <span class="PreProc">break-if-!=</span>
@ -1277,16 +1277,16 @@ if ('onhashchange' in window) {
<span id="L1213" class="LineNr">1213 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='tokenize.mu.html#L1213'>dump-token-from-cursor</a></span> _t: (addr <a href='tokenize.mu.html#L3'>token</a>) <span class="Delimiter">{</span>
<span id="L1214" class="LineNr">1214 </span> <span class="PreProc">var</span> t/<span class="muRegEsi">esi</span>: (addr <a href='tokenize.mu.html#L3'>token</a>) <span class="Special">&lt;-</span> copy _t
<span id="L1215" class="LineNr">1215 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/eax: (addr int) <span class="Special">&lt;-</span> get t, <span class="PreProc">type</span>
<span id="L1216" class="LineNr">1216 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, *<span class="PreProc">type</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1217" class="LineNr">1217 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1216" class="LineNr">1216 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, *<span class="PreProc">type</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1217" class="LineNr">1217 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1218" class="LineNr">1218 </span> <span class="PreProc">var</span> text-ah/eax: (addr handle stream byte) <span class="Special">&lt;-</span> get t, text-data
<span id="L1219" class="LineNr">1219 </span> <span class="PreProc">var</span> text/eax: (addr stream byte) <span class="Special">&lt;-</span> <a href='../120allocate.subx.html#L235'>lookup</a> *text-ah
<span id="L1220" class="LineNr">1220 </span> <a href='../106stream.subx.html#L59'>rewind-stream</a> text
<span id="L1221" class="LineNr">1221 </span> <a href='../501draw-text.mu.html#L232'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, text, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1222" class="LineNr">1222 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1221" class="LineNr">1221 </span> <a href='../501draw-text.mu.html#L240'>draw-stream-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, text, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1222" class="LineNr">1222 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot; &quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1223" class="LineNr">1223 </span> <span class="PreProc">var</span> num/eax: (addr int) <span class="Special">&lt;-</span> get t, number-data
<span id="L1224" class="LineNr">1224 </span> <a href='../501draw-text.mu.html#L384'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, *num, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1225" class="LineNr">1225 </span> <a href='../501draw-text.mu.html#L276'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;\n&quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1224" class="LineNr">1224 </span> <a href='../501draw-text.mu.html#L394'>draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, *num, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1225" class="LineNr">1225 </span> <a href='../501draw-text.mu.html#L284'>draw-text-wrapping-right-then-down-from-cursor-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">&quot;\n&quot;</span>, <span class="Constant">7</span>/fg <span class="Constant">0</span>/bg
<span id="L1226" class="LineNr">1226 </span><span class="Delimiter">}</span>
</pre>
</body>

452
html/shell/trace.mu.html generated

File diff suppressed because it is too large Load Diff