diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-03-29 00:47:30 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-03-29 00:47:30 -0700 |
commit | 9c1056f531217f3c1c12b3b3a648ca1cffe4beab (patch) | |
tree | 0e5a0bd0619e481470be58c11805434c630d996b /html/subx/072slice.subx.html | |
parent | d689ac180ad47222aa59944d42c1e26e7b2423c6 (diff) | |
download | mu-9c1056f531217f3c1c12b3b3a648ca1cffe4beab.tar.gz |
5033
Diffstat (limited to 'html/subx/072slice.subx.html')
-rw-r--r-- | html/subx/072slice.subx.html | 314 |
1 files changed, 159 insertions, 155 deletions
diff --git a/html/subx/072slice.subx.html b/html/subx/072slice.subx.html index 10e75e80..95b18d2a 100644 --- a/html/subx/072slice.subx.html +++ b/html/subx/072slice.subx.html @@ -87,7 +87,7 @@ if ('onhashchange' in window) { <span id="L25" class="LineNr"> 25 </span> <span class="subxComment"># if (s->start == s->end) return true</span> <span id="L26" class="LineNr"> 26 </span> <span class="subxS1Comment"># . EAX = s->start</span> <span id="L27" class="LineNr"> 27 </span> 8b/copy 0/mod/indirect 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ECX to EAX</span> -<span id="L28" class="LineNr"> 28 </span> <span class="subxS1Comment"># . compare EAX with s->end</span> +<span id="L28" class="LineNr"> 28 </span> <span class="subxS1Comment"># . compare EAX and s->end</span> <span id="L29" class="LineNr"> 29 </span> 39/compare 1/mod/*+disp8 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare EAX and *(ECX+4)</span> <span id="L30" class="LineNr"> 30 </span> b8/copy-to-EAX 1/imm32/true <span id="L31" class="LineNr"> 31 </span> 74/jump-if-equal $slice-empty?:end/disp8 @@ -164,7 +164,7 @@ if ('onhashchange' in window) { <span id="L102" class="LineNr">102 </span> <span class="subxComment"># maxs = s->end</span> <span id="L103" class="LineNr">103 </span> <span class="subxComment"># if (maxs - currs != p->length) return false</span> <span id="L104" class="LineNr">104 </span> <span class="subxComment"># currp = p->data</span> -<span id="L105" class="LineNr">105 </span> <span class="subxComment"># while (currs < maxs)</span> +<span id="L105" class="LineNr">105 </span> <span class="subxComment"># while currs < maxs</span> <span id="L106" class="LineNr">106 </span> <span class="subxComment"># if (*currs != *currp) return false</span> <span id="L107" class="LineNr">107 </span> <span class="subxComment"># ++currs</span> <span id="L108" class="LineNr">108 </span> <span class="subxComment"># ++currp</span> @@ -206,7 +206,7 @@ if ('onhashchange' in window) { <span id="L144" class="LineNr">144 </span> 31/xor 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ECX</span> <span id="L145" class="LineNr">145 </span><span class="Constant">$slice-equal?:loop</span>: <span id="L146" class="LineNr">146 </span> <span class="subxComment"># if (currs >= maxs) return true</span> -<span id="L147" class="LineNr">147 </span> 39/compare 3/mod/direct 2/rm32/EDX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare EDX and ESI</span> +<span id="L147" class="LineNr">147 </span> 39/compare 3/mod/direct 2/rm32/EDX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare EDX with ESI</span> <span id="L148" class="LineNr">148 </span> 7d/jump-if-greater-or-equal $slice-equal?:true/disp8 <span id="L149" class="LineNr">149 </span> <span class="subxComment"># AL = *currp</span> <span id="L150" class="LineNr">150 </span> 8a/copy-byte 0/mod/indirect 3/rm32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *EBX to AL</span> @@ -242,8 +242,8 @@ if ('onhashchange' in window) { <span id="L180" class="LineNr">180 </span> 55/push-EBP <span id="L181" class="LineNr">181 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L182" class="LineNr">182 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L183" class="LineNr">183 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L184" class="LineNr">184 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L183" class="LineNr">183 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L184" class="LineNr">184 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L185" class="LineNr">185 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L186" class="LineNr">186 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L187" class="LineNr">187 </span> <span class="subxS2Comment"># . . push args</span> @@ -273,8 +273,8 @@ if ('onhashchange' in window) { <span id="L211" class="LineNr">211 </span> 55/push-EBP <span id="L212" class="LineNr">212 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L213" class="LineNr">213 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L214" class="LineNr">214 </span> 68/push <a href='072slice.subx.html#L917'>_test-slice-data-4</a>/imm32/end -<span id="L215" class="LineNr">215 </span> 68/push <a href='072slice.subx.html#L911'>_test-slice-data-1</a>/imm32/start +<span id="L214" class="LineNr">214 </span> 68/push <a href='072slice.subx.html#L921'>_test-slice-data-4</a>/imm32/end +<span id="L215" class="LineNr">215 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-1</a>/imm32/start <span id="L216" class="LineNr">216 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L217" class="LineNr">217 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L218" class="LineNr">218 </span> <span class="subxS2Comment"># . . push args</span> @@ -304,8 +304,8 @@ if ('onhashchange' in window) { <span id="L242" class="LineNr">242 </span> 55/push-EBP <span id="L243" class="LineNr">243 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L244" class="LineNr">244 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L245" class="LineNr">245 </span> 68/push <a href='072slice.subx.html#L917'>_test-slice-data-4</a>/imm32/end -<span id="L246" class="LineNr">246 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L245" class="LineNr">245 </span> 68/push <a href='072slice.subx.html#L921'>_test-slice-data-4</a>/imm32/end +<span id="L246" class="LineNr">246 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L247" class="LineNr">247 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L248" class="LineNr">248 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L249" class="LineNr">249 </span> <span class="subxS2Comment"># . . push args</span> @@ -335,8 +335,8 @@ if ('onhashchange' in window) { <span id="L273" class="LineNr">273 </span> 55/push-EBP <span id="L274" class="LineNr">274 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L275" class="LineNr">275 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L276" class="LineNr">276 </span> 68/push <a href='072slice.subx.html#L911'>_test-slice-data-1</a>/imm32/end -<span id="L277" class="LineNr">277 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L276" class="LineNr">276 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-1</a>/imm32/end +<span id="L277" class="LineNr">277 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L278" class="LineNr">278 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L279" class="LineNr">279 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L280" class="LineNr">280 </span> <span class="subxS2Comment"># . . push args</span> @@ -366,8 +366,8 @@ if ('onhashchange' in window) { <span id="L304" class="LineNr">304 </span> 55/push-EBP <span id="L305" class="LineNr">305 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L306" class="LineNr">306 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L307" class="LineNr">307 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/end -<span id="L308" class="LineNr">308 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L307" class="LineNr">307 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/end +<span id="L308" class="LineNr">308 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L309" class="LineNr">309 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L310" class="LineNr">310 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L311" class="LineNr">311 </span> <span class="subxS2Comment"># . . push args</span> @@ -397,8 +397,8 @@ if ('onhashchange' in window) { <span id="L335" class="LineNr">335 </span> 55/push-EBP <span id="L336" class="LineNr">336 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L337" class="LineNr">337 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L338" class="LineNr">338 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-2</a>/imm32/end -<span id="L339" class="LineNr">339 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L338" class="LineNr">338 </span> 68/push <a href='072slice.subx.html#L917'>_test-slice-data-2</a>/imm32/end +<span id="L339" class="LineNr">339 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L340" class="LineNr">340 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L341" class="LineNr">341 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "")</span> <span id="L342" class="LineNr">342 </span> <span class="subxS2Comment"># . . push args</span> @@ -428,8 +428,8 @@ if ('onhashchange' in window) { <span id="L366" class="LineNr">366 </span> 55/push-EBP <span id="L367" class="LineNr">367 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L368" class="LineNr">368 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L369" class="LineNr">369 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/end -<span id="L370" class="LineNr">370 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L369" class="LineNr">369 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/end +<span id="L370" class="LineNr">370 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L371" class="LineNr">371 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L372" class="LineNr">372 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "")</span> <span id="L373" class="LineNr">373 </span> <span class="subxS2Comment"># . . push args</span> @@ -546,8 +546,8 @@ if ('onhashchange' in window) { <span id="L484" class="LineNr">484 </span> 55/push-EBP <span id="L485" class="LineNr">485 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L486" class="LineNr">486 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L487" class="LineNr">487 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L488" class="LineNr">488 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L487" class="LineNr">487 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L488" class="LineNr">488 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L489" class="LineNr">489 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L490" class="LineNr">490 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "A")</span> <span id="L491" class="LineNr">491 </span> <span class="subxS2Comment"># . . push args</span> @@ -577,8 +577,8 @@ if ('onhashchange' in window) { <span id="L515" class="LineNr">515 </span> 55/push-EBP <span id="L516" class="LineNr">516 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L517" class="LineNr">517 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L518" class="LineNr">518 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L519" class="LineNr">519 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L518" class="LineNr">518 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L519" class="LineNr">519 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L520" class="LineNr">520 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L521" class="LineNr">521 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "")</span> <span id="L522" class="LineNr">522 </span> <span class="subxS2Comment"># . . push args</span> @@ -608,8 +608,8 @@ if ('onhashchange' in window) { <span id="L546" class="LineNr">546 </span> 55/push-EBP <span id="L547" class="LineNr">547 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L548" class="LineNr">548 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L549" class="LineNr">549 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L550" class="LineNr">550 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L549" class="LineNr">549 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L550" class="LineNr">550 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L551" class="LineNr">551 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L552" class="LineNr">552 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "Ab")</span> <span id="L553" class="LineNr">553 </span> <span class="subxS2Comment"># . . push args</span> @@ -639,8 +639,8 @@ if ('onhashchange' in window) { <span id="L577" class="LineNr">577 </span> 55/push-EBP <span id="L578" class="LineNr">578 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L579" class="LineNr">579 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L580" class="LineNr">580 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L581" class="LineNr">581 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L580" class="LineNr">580 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L581" class="LineNr">581 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L582" class="LineNr">582 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L583" class="LineNr">583 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "Abc")</span> <span id="L584" class="LineNr">584 </span> <span class="subxS2Comment"># . . push args</span> @@ -670,8 +670,8 @@ if ('onhashchange' in window) { <span id="L608" class="LineNr">608 </span> 55/push-EBP <span id="L609" class="LineNr">609 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L610" class="LineNr">610 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L611" class="LineNr">611 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L612" class="LineNr">612 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L611" class="LineNr">611 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L612" class="LineNr">612 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L613" class="LineNr">613 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L614" class="LineNr">614 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "Abd")</span> <span id="L615" class="LineNr">615 </span> <span class="subxS2Comment"># . . push args</span> @@ -701,8 +701,8 @@ if ('onhashchange' in window) { <span id="L639" class="LineNr">639 </span> 55/push-EBP <span id="L640" class="LineNr">640 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L641" class="LineNr">641 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L642" class="LineNr">642 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L643" class="LineNr">643 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L642" class="LineNr">642 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L643" class="LineNr">643 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L644" class="LineNr">644 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L645" class="LineNr">645 </span> <span class="subxComment"># EAX = slice-starts-with?(ECX, "Ac")</span> <span id="L646" class="LineNr">646 </span> <span class="subxS2Comment"># . . push args</span> @@ -743,29 +743,29 @@ if ('onhashchange' in window) { <span id="L681" class="LineNr">681 </span> 8b/copy 0/mod/indirect 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ESI to ECX</span> <span id="L682" class="LineNr">682 </span> <span class="subxComment"># max/ESI = s->end</span> <span id="L683" class="LineNr">683 </span> 8b/copy 1/mod/*+disp8 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ESI+4) to ESI</span> -<span id="L684" class="LineNr">684 </span> <span class="subxComment"># EDI = f</span> +<span id="L684" class="LineNr">684 </span> <span class="subxComment"># EDI = out</span> <span id="L685" class="LineNr">685 </span> 8b/copy 1/mod/*+disp8 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> 7/r32/EDI 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(EBP+8) to EDI</span> -<span id="L686" class="LineNr">686 </span> <span class="subxComment"># EDX = f->length</span> +<span id="L686" class="LineNr">686 </span> <span class="subxComment"># EDX = out->length</span> <span id="L687" class="LineNr">687 </span> 8b/copy 1/mod/*+disp8 7/rm32/EDI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/EDX 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(EDI+12) to EDX</span> -<span id="L688" class="LineNr">688 </span> <span class="subxComment"># EBX = f->write</span> +<span id="L688" class="LineNr">688 </span> <span class="subxComment"># EBX = out->write</span> <span id="L689" class="LineNr">689 </span> 8b/copy 1/mod/*+disp8 7/rm32/EDI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/EBX 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(EDI+4) to EBX</span> <span id="L690" class="LineNr">690 </span><span class="Constant">$write-slice:loop</span>: <span id="L691" class="LineNr">691 </span> <span class="subxComment"># if (curr >= max) break</span> <span id="L692" class="LineNr">692 </span> 39/compare 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ECX with ESI</span> <span id="L693" class="LineNr">693 </span> 7d/jump-if-greater-or-equal $write-slice:loop-end/disp8 -<span id="L694" class="LineNr">694 </span> <span class="subxComment"># if (f->write >= f->length) flush and clear f's stream</span> +<span id="L694" class="LineNr">694 </span> <span class="subxComment"># if (out->write >= out->length) flush and clear out's stream</span> <span id="L695" class="LineNr">695 </span> 39/compare 3/mod/direct 3/rm32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/EDX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare EBX with EDX</span> <span id="L696" class="LineNr">696 </span> 7c/jump-if-lesser $write-slice:to-stream/disp8 -<span id="L697" class="LineNr">697 </span> <span class="subxS1Comment"># . persist f->write</span> +<span id="L697" class="LineNr">697 </span> <span class="subxS1Comment"># . persist out->write</span> <span id="L698" class="LineNr">698 </span> 89/copy 1/mod/*+disp8 7/rm32/EDI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/EBX 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy EBX to *(EDI+4)</span> -<span id="L699" class="LineNr">699 </span> <span class="subxS1Comment"># . flush(f)</span> +<span id="L699" class="LineNr">699 </span> <span class="subxS1Comment"># . flush(out)</span> <span id="L700" class="LineNr">700 </span> <span class="subxS2Comment"># . . push args</span> <span id="L701" class="LineNr">701 </span> 57/push-EDI <span id="L702" class="LineNr">702 </span> <span class="subxS2Comment"># . . call</span> <span id="L703" class="LineNr">703 </span> e8/call <a href='064write-byte.subx.html#L79'>flush</a>/disp32 <span id="L704" class="LineNr">704 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L705" class="LineNr">705 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L706" class="LineNr">706 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span> +<span id="L706" class="LineNr">706 </span> <span class="subxS1Comment"># . clear-stream(stream = out+4)</span> <span id="L707" class="LineNr">707 </span> <span class="subxS2Comment"># . . push args</span> <span id="L708" class="LineNr">708 </span> 8d/copy-address 1/mod/*+disp8 7/rm32/EDI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy EDI+4 to EAX</span> <span id="L709" class="LineNr">709 </span> 50/push-EAX @@ -773,16 +773,16 @@ if ('onhashchange' in window) { <span id="L711" class="LineNr">711 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 <span id="L712" class="LineNr">712 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L713" class="LineNr">713 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L714" class="LineNr">714 </span> <span class="subxS1Comment"># . f->write must now be 0; update its cache at EBX</span> +<span id="L714" class="LineNr">714 </span> <span class="subxS1Comment"># . out->write must now be 0; update its cache at EBX</span> <span id="L715" class="LineNr">715 </span> 31/xor 3/mod/direct 3/rm32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear EBX</span> <span id="L716" class="LineNr">716 </span><span class="Constant">$write-slice:to-stream</span>: -<span id="L717" class="LineNr">717 </span> <span class="subxComment"># f->data[f->write] = *in</span> +<span id="L717" class="LineNr">717 </span> <span class="subxComment"># out->data[out->write] = *in</span> <span id="L718" class="LineNr">718 </span> <span class="subxS1Comment"># . AL = *in</span> <span id="L719" class="LineNr">719 </span> 31/xor 3/mod/direct 0/rm32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear EAX</span> <span id="L720" class="LineNr">720 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ECX to AL</span> -<span id="L721" class="LineNr">721 </span> <span class="subxS1Comment"># . f->data[f->write] = AL</span> +<span id="L721" class="LineNr">721 </span> <span class="subxS1Comment"># . out->data[out->write] = AL</span> <span id="L722" class="LineNr">722 </span> 88/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/EDI 3/index/EBX <span class="Normal"> . </span> 0/r32/AL 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy AL to *(EDI+EBX+16)</span> -<span id="L723" class="LineNr">723 </span> <span class="subxComment"># ++f->write</span> +<span id="L723" class="LineNr">723 </span> <span class="subxComment"># ++out->write</span> <span id="L724" class="LineNr">724 </span> 43/increment-EBX <span id="L725" class="LineNr">725 </span> <span class="subxComment"># ++in</span> <span id="L726" class="LineNr">726 </span> 41/increment-ECX @@ -825,8 +825,8 @@ if ('onhashchange' in window) { <span id="L763" class="LineNr">763 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L764" class="LineNr">764 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> <span id="L765" class="LineNr">765 </span> <span class="subxComment"># var slice/ECX = "Abc"</span> -<span id="L766" class="LineNr">766 </span> 68/push <a href='072slice.subx.html#L915'>_test-slice-data-3</a>/imm32/end -<span id="L767" class="LineNr">767 </span> 68/push <a href='072slice.subx.html#L909'>_test-slice-data-0</a>/imm32/start +<span id="L766" class="LineNr">766 </span> 68/push <a href='072slice.subx.html#L919'>_test-slice-data-3</a>/imm32/end +<span id="L767" class="LineNr">767 </span> 68/push <a href='072slice.subx.html#L913'>_test-slice-data-0</a>/imm32/start <span id="L768" class="LineNr">768 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> <span id="L769" class="LineNr">769 </span> <span class="subxComment"># write-slice(_test-buffered-file, slice)</span> <span id="L770" class="LineNr">770 </span> <span class="subxS2Comment"># . . push args</span> @@ -849,7 +849,7 @@ if ('onhashchange' in window) { <span id="L787" class="LineNr">787 </span> 68/push <span class="Constant">"Abc"</span>/imm32 <span id="L788" class="LineNr">788 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32 <span id="L789" class="LineNr">789 </span> <span class="subxS2Comment"># . . call</span> -<span id="L790" class="LineNr">790 </span> e8/call <a href='058stream-equal.subx.html#L198'>check-stream-equal</a>/disp32 +<span id="L790" class="LineNr">790 </span> e8/call <a href='058stream-equal.subx.html#L199'>check-stream-equal</a>/disp32 <span id="L791" class="LineNr">791 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L792" class="LineNr">792 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to ESP</span> <span id="L793" class="LineNr">793 </span> <span class="subxS1Comment"># . epilog</span> @@ -862,123 +862,127 @@ if ('onhashchange' in window) { <span id="L800" class="LineNr">800 </span><span class="subxComment"># - construct a 'maximal slice' and pass it to write-slice</span> <span id="L801" class="LineNr">801 </span><span class="subxComment"># - flush the buffered-file and pass the stream directly to its fd (disabling buffering)</span> <span id="L802" class="LineNr">802 </span><span class="subxComment"># we'll go with the first way for now</span> -<span id="L803" class="LineNr">803 </span><span class="subxFunction">write-stream-buffered</span>: <span class="subxComment"># f : (address buffered-file), s : (address stream)</span> +<span id="L803" class="LineNr">803 </span><span class="subxFunction">write-stream-buffered</span>: <span class="subxComment"># f : (address buffered-file), s : (address stream) -> <void></span> <span id="L804" class="LineNr">804 </span> <span class="subxS1Comment"># . prolog</span> <span id="L805" class="LineNr">805 </span> 55/push-EBP <span id="L806" class="LineNr">806 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L807" class="LineNr">807 </span> <span class="subxS1Comment"># . save registers</span> <span id="L808" class="LineNr">808 </span> 50/push-EAX -<span id="L809" class="LineNr">809 </span> 56/push-ESI -<span id="L810" class="LineNr">810 </span> <span class="subxComment"># ESI = s</span> -<span id="L811" class="LineNr">811 </span> 8b/copy 1/mod/*+disp8 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(EBP+12) to ESI</span> -<span id="L812" class="LineNr">812 </span> <span class="subxComment"># var slice/ECX = {s->data, s->data + s->write}</span> -<span id="L813" class="LineNr">813 </span> <span class="subxS1Comment"># . push s->data + s->write</span> -<span id="L814" class="LineNr">814 </span> 8b/copy 0/mod/indirect 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ESI to EAX</span> -<span id="L815" class="LineNr">815 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX <span class="Normal"> . </span> 0/r32/EAX 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ESI+EAX+12 to EAX</span> -<span id="L816" class="LineNr">816 </span> 50/push-EAX -<span id="L817" class="LineNr">817 </span> <span class="subxS1Comment"># . push s->data</span> -<span id="L818" class="LineNr">818 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ESI+12 to EAX</span> -<span id="L819" class="LineNr">819 </span> 50/push-EAX -<span id="L820" class="LineNr">820 </span> <span class="subxS1Comment"># . ECX = ESP</span> -<span id="L821" class="LineNr">821 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> -<span id="L822" class="LineNr">822 </span> <span class="subxComment"># write-slice(f, slice)</span> -<span id="L823" class="LineNr">823 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L824" class="LineNr">824 </span> 51/push-ECX -<span id="L825" class="LineNr">825 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(EBP+8)</span> -<span id="L826" class="LineNr">826 </span> <span class="subxS2Comment"># . . call</span> -<span id="L827" class="LineNr">827 </span> e8/call <a href='072slice.subx.html#L667'>write-slice</a>/disp32 -<span id="L828" class="LineNr">828 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L829" class="LineNr">829 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> -<span id="L830" class="LineNr">830 </span><span class="Constant">$write-stream-buffered:end</span>: -<span id="L831" class="LineNr">831 </span> <span class="subxS1Comment"># . restore registers</span> -<span id="L832" class="LineNr">832 </span> 5e/pop-to-ESI -<span id="L833" class="LineNr">833 </span> 58/pop-to-EAX -<span id="L834" class="LineNr">834 </span> <span class="subxS1Comment"># . epilog</span> -<span id="L835" class="LineNr">835 </span> 89/copy 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy EBP to ESP</span> -<span id="L836" class="LineNr">836 </span> 5d/pop-to-EBP -<span id="L837" class="LineNr">837 </span> c3/return -<span id="L838" class="LineNr">838 </span> -<span id="L839" class="LineNr">839 </span><span class="subxTest">test-write-stream-buffered</span>: -<span id="L840" class="LineNr">840 </span> <span class="subxS1Comment"># . prolog</span> -<span id="L841" class="LineNr">841 </span> 55/push-EBP -<span id="L842" class="LineNr">842 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> -<span id="L843" class="LineNr">843 </span> <span class="subxComment"># setup</span> -<span id="L844" class="LineNr">844 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span> -<span id="L845" class="LineNr">845 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L846" class="LineNr">846 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32 -<span id="L847" class="LineNr">847 </span> <span class="subxS2Comment"># . . call</span> -<span id="L848" class="LineNr">848 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 -<span id="L849" class="LineNr">849 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L850" class="LineNr">850 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L851" class="LineNr">851 </span> <span class="subxS1Comment"># . clear-stream(_test-buffered-file+4)</span> -<span id="L852" class="LineNr">852 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L853" class="LineNr">853 </span> b8/copy-to-EAX <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 -<span id="L854" class="LineNr">854 </span> 05/add-to-EAX 4/imm32 -<span id="L855" class="LineNr">855 </span> 50/push-EAX -<span id="L856" class="LineNr">856 </span> <span class="subxS2Comment"># . . call</span> -<span id="L857" class="LineNr">857 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 -<span id="L858" class="LineNr">858 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L859" class="LineNr">859 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L860" class="LineNr">860 </span> <span class="subxS1Comment"># . clear-stream(_test-tmp-stream)</span> -<span id="L861" class="LineNr">861 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L862" class="LineNr">862 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 -<span id="L863" class="LineNr">863 </span> <span class="subxS2Comment"># . . call</span> -<span id="L864" class="LineNr">864 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 -<span id="L865" class="LineNr">865 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L866" class="LineNr">866 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L867" class="LineNr">867 </span> <span class="subxComment"># initialize input</span> -<span id="L868" class="LineNr">868 </span> <span class="subxS1Comment"># . write(_test-tmp-stream, "abcd")</span> -<span id="L869" class="LineNr">869 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L870" class="LineNr">870 </span> 68/push <span class="Constant">"abcd"</span>/imm32 -<span id="L871" class="LineNr">871 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 -<span id="L872" class="LineNr">872 </span> <span class="subxS2Comment"># . . call</span> -<span id="L873" class="LineNr">873 </span> e8/call <a href='057write.subx.html#L24'>write</a>/disp32 -<span id="L874" class="LineNr">874 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L875" class="LineNr">875 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> -<span id="L876" class="LineNr">876 </span> <span class="subxComment"># perform the write-stream-buffered</span> -<span id="L877" class="LineNr">877 </span> <span class="subxS1Comment"># . write-stream-buffered(_test-buffered-file, _test-tmp-stream)</span> -<span id="L878" class="LineNr">878 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L879" class="LineNr">879 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 -<span id="L880" class="LineNr">880 </span> 68/push <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 -<span id="L881" class="LineNr">881 </span> <span class="subxS2Comment"># . . call</span> -<span id="L882" class="LineNr">882 </span> e8/call <a href='072slice.subx.html#L803'>write-stream-buffered</a>/disp32 -<span id="L883" class="LineNr">883 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L884" class="LineNr">884 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> -<span id="L885" class="LineNr">885 </span> <span class="subxComment"># check that the write happened as expected</span> -<span id="L886" class="LineNr">886 </span> <span class="subxS1Comment"># . flush(_test-buffered-file)</span> -<span id="L887" class="LineNr">887 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L888" class="LineNr">888 </span> 68/push <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 -<span id="L889" class="LineNr">889 </span> <span class="subxS2Comment"># . . call</span> -<span id="L890" class="LineNr">890 </span> e8/call <a href='064write-byte.subx.html#L79'>flush</a>/disp32 -<span id="L891" class="LineNr">891 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L892" class="LineNr">892 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> -<span id="L893" class="LineNr">893 </span> <span class="subxS1Comment"># . check-stream-equal(_test-stream, "abcd", msg)</span> -<span id="L894" class="LineNr">894 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L895" class="LineNr">895 </span> 68/push <span class="Constant">"F - test-write-stream-buffered"</span>/imm32 -<span id="L896" class="LineNr">896 </span> 68/push <span class="Constant">"abcd"</span>/imm32 -<span id="L897" class="LineNr">897 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32 -<span id="L898" class="LineNr">898 </span> <span class="subxS2Comment"># . . call</span> -<span id="L899" class="LineNr">899 </span> e8/call <a href='058stream-equal.subx.html#L198'>check-stream-equal</a>/disp32 -<span id="L900" class="LineNr">900 </span> <span class="subxS2Comment"># . . discard args</span> -<span id="L901" class="LineNr">901 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to ESP</span> -<span id="L902" class="LineNr">902 </span> <span class="subxS1Comment"># . epilog</span> -<span id="L903" class="LineNr">903 </span> 89/copy 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy EBP to ESP</span> -<span id="L904" class="LineNr">904 </span> 5d/pop-to-EBP -<span id="L905" class="LineNr">905 </span> c3/return -<span id="L906" class="LineNr">906 </span> -<span id="L907" class="LineNr">907 </span>== data -<span id="L908" class="LineNr">908 </span> -<span id="L909" class="LineNr">909 </span><span class="subxMinorFunction">_test-slice-data-0</span>: -<span id="L910" class="LineNr">910 </span> 41/A -<span id="L911" class="LineNr">911 </span><span class="subxMinorFunction">_test-slice-data-1</span>: -<span id="L912" class="LineNr">912 </span> 62/b -<span id="L913" class="LineNr">913 </span><span class="subxMinorFunction">_test-slice-data-2</span>: -<span id="L914" class="LineNr">914 </span> 63/c -<span id="L915" class="LineNr">915 </span><span class="subxMinorFunction">_test-slice-data-3</span>: -<span id="L916" class="LineNr">916 </span> 64/d -<span id="L917" class="LineNr">917 </span><span class="subxMinorFunction">_test-slice-data-4</span>: -<span id="L918" class="LineNr">918 </span> -<span id="L919" class="LineNr">919 </span><span class="subxS1Comment"># . _. vim:nowrap:textwidth=0</span> +<span id="L809" class="LineNr">809 </span> 51/push-ECX +<span id="L810" class="LineNr">810 </span> 56/push-ESI +<span id="L811" class="LineNr">811 </span> <span class="subxComment"># ESI = s</span> +<span id="L812" class="LineNr">812 </span> 8b/copy 1/mod/*+disp8 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/ESI 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(EBP+12) to ESI</span> +<span id="L813" class="LineNr">813 </span> <span class="subxComment"># var slice/ECX = {s->data, s->data + s->write}</span> +<span id="L814" class="LineNr">814 </span> <span class="subxS1Comment"># . push s->data + s->write</span> +<span id="L815" class="LineNr">815 </span> 8b/copy 0/mod/indirect 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ESI to EAX</span> +<span id="L816" class="LineNr">816 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX <span class="Normal"> . </span> 0/r32/EAX 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ESI+EAX+12 to EAX</span> +<span id="L817" class="LineNr">817 </span> 50/push-EAX +<span id="L818" class="LineNr">818 </span> <span class="subxS1Comment"># . push s->data</span> +<span id="L819" class="LineNr">819 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/EAX 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ESI+12 to EAX</span> +<span id="L820" class="LineNr">820 </span> 50/push-EAX +<span id="L821" class="LineNr">821 </span> <span class="subxS1Comment"># . ECX = ESP</span> +<span id="L822" class="LineNr">822 </span> 89/copy 3/mod/direct 1/rm32/ECX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to ECX</span> +<span id="L823" class="LineNr">823 </span> <span class="subxComment"># write-slice(f, slice)</span> +<span id="L824" class="LineNr">824 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L825" class="LineNr">825 </span> 51/push-ECX +<span id="L826" class="LineNr">826 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(EBP+8)</span> +<span id="L827" class="LineNr">827 </span> <span class="subxS2Comment"># . . call</span> +<span id="L828" class="LineNr">828 </span> e8/call <a href='072slice.subx.html#L667'>write-slice</a>/disp32 +<span id="L829" class="LineNr">829 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L830" class="LineNr">830 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> +<span id="L831" class="LineNr">831 </span><span class="Constant">$write-stream-buffered:end</span>: +<span id="L832" class="LineNr">832 </span> <span class="subxS1Comment"># . restore locals</span> +<span id="L833" class="LineNr">833 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> +<span id="L834" class="LineNr">834 </span> <span class="subxS1Comment"># . restore registers</span> +<span id="L835" class="LineNr">835 </span> 5e/pop-to-ESI +<span id="L836" class="LineNr">836 </span> 59/pop-to-ECX +<span id="L837" class="LineNr">837 </span> 58/pop-to-EAX +<span id="L838" class="LineNr">838 </span> <span class="subxS1Comment"># . epilog</span> +<span id="L839" class="LineNr">839 </span> 89/copy 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy EBP to ESP</span> +<span id="L840" class="LineNr">840 </span> 5d/pop-to-EBP +<span id="L841" class="LineNr">841 </span> c3/return +<span id="L842" class="LineNr">842 </span> +<span id="L843" class="LineNr">843 </span><span class="subxTest">test-write-stream-buffered</span>: +<span id="L844" class="LineNr">844 </span> <span class="subxS1Comment"># . prolog</span> +<span id="L845" class="LineNr">845 </span> 55/push-EBP +<span id="L846" class="LineNr">846 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ESP to EBP</span> +<span id="L847" class="LineNr">847 </span> <span class="subxComment"># setup</span> +<span id="L848" class="LineNr">848 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span> +<span id="L849" class="LineNr">849 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L850" class="LineNr">850 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32 +<span id="L851" class="LineNr">851 </span> <span class="subxS2Comment"># . . call</span> +<span id="L852" class="LineNr">852 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 +<span id="L853" class="LineNr">853 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L854" class="LineNr">854 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> +<span id="L855" class="LineNr">855 </span> <span class="subxS1Comment"># . clear-stream(_test-buffered-file+4)</span> +<span id="L856" class="LineNr">856 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L857" class="LineNr">857 </span> b8/copy-to-EAX <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 +<span id="L858" class="LineNr">858 </span> 05/add-to-EAX 4/imm32 +<span id="L859" class="LineNr">859 </span> 50/push-EAX +<span id="L860" class="LineNr">860 </span> <span class="subxS2Comment"># . . call</span> +<span id="L861" class="LineNr">861 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 +<span id="L862" class="LineNr">862 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L863" class="LineNr">863 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> +<span id="L864" class="LineNr">864 </span> <span class="subxS1Comment"># . clear-stream(_test-tmp-stream)</span> +<span id="L865" class="LineNr">865 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L866" class="LineNr">866 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 +<span id="L867" class="LineNr">867 </span> <span class="subxS2Comment"># . . call</span> +<span id="L868" class="LineNr">868 </span> e8/call <a href='055stream.subx.html#L17'>clear-stream</a>/disp32 +<span id="L869" class="LineNr">869 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L870" class="LineNr">870 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> +<span id="L871" class="LineNr">871 </span> <span class="subxComment"># initialize input</span> +<span id="L872" class="LineNr">872 </span> <span class="subxS1Comment"># . write(_test-tmp-stream, "abcd")</span> +<span id="L873" class="LineNr">873 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L874" class="LineNr">874 </span> 68/push <span class="Constant">"abcd"</span>/imm32 +<span id="L875" class="LineNr">875 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 +<span id="L876" class="LineNr">876 </span> <span class="subxS2Comment"># . . call</span> +<span id="L877" class="LineNr">877 </span> e8/call <a href='057write.subx.html#L24'>write</a>/disp32 +<span id="L878" class="LineNr">878 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L879" class="LineNr">879 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> +<span id="L880" class="LineNr">880 </span> <span class="subxComment"># perform the write-stream-buffered</span> +<span id="L881" class="LineNr">881 </span> <span class="subxS1Comment"># . write-stream-buffered(_test-buffered-file, _test-tmp-stream)</span> +<span id="L882" class="LineNr">882 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L883" class="LineNr">883 </span> 68/push <a href='060read.subx.html#L345'>_test-tmp-stream</a>/imm32 +<span id="L884" class="LineNr">884 </span> 68/push <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 +<span id="L885" class="LineNr">885 </span> <span class="subxS2Comment"># . . call</span> +<span id="L886" class="LineNr">886 </span> e8/call <a href='072slice.subx.html#L803'>write-stream-buffered</a>/disp32 +<span id="L887" class="LineNr">887 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L888" class="LineNr">888 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> +<span id="L889" class="LineNr">889 </span> <span class="subxComment"># check that the write happened as expected</span> +<span id="L890" class="LineNr">890 </span> <span class="subxS1Comment"># . flush(_test-buffered-file)</span> +<span id="L891" class="LineNr">891 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L892" class="LineNr">892 </span> 68/push <a href='061read-byte.subx.html#L289'>_test-buffered-file</a>/imm32 +<span id="L893" class="LineNr">893 </span> <span class="subxS2Comment"># . . call</span> +<span id="L894" class="LineNr">894 </span> e8/call <a href='064write-byte.subx.html#L79'>flush</a>/disp32 +<span id="L895" class="LineNr">895 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L896" class="LineNr">896 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> +<span id="L897" class="LineNr">897 </span> <span class="subxS1Comment"># . check-stream-equal(_test-stream, "abcd", msg)</span> +<span id="L898" class="LineNr">898 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L899" class="LineNr">899 </span> 68/push <span class="Constant">"F - test-write-stream-buffered"</span>/imm32 +<span id="L900" class="LineNr">900 </span> 68/push <span class="Constant">"abcd"</span>/imm32 +<span id="L901" class="LineNr">901 </span> 68/push <a href='057write.subx.html#L148'>_test-stream</a>/imm32 +<span id="L902" class="LineNr">902 </span> <span class="subxS2Comment"># . . call</span> +<span id="L903" class="LineNr">903 </span> e8/call <a href='058stream-equal.subx.html#L199'>check-stream-equal</a>/disp32 +<span id="L904" class="LineNr">904 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L905" class="LineNr">905 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to ESP</span> +<span id="L906" class="LineNr">906 </span> <span class="subxS1Comment"># . epilog</span> +<span id="L907" class="LineNr">907 </span> 89/copy 3/mod/direct 4/rm32/ESP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/EBP <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy EBP to ESP</span> +<span id="L908" class="LineNr">908 </span> 5d/pop-to-EBP +<span id="L909" class="LineNr">909 </span> c3/return +<span id="L910" class="LineNr">910 </span> +<span id="L911" class="LineNr">911 </span>== data +<span id="L912" class="LineNr">912 </span> +<span id="L913" class="LineNr">913 </span><span class="subxMinorFunction">_test-slice-data-0</span>: +<span id="L914" class="LineNr">914 </span> 41/A +<span id="L915" class="LineNr">915 </span><span class="subxMinorFunction">_test-slice-data-1</span>: +<span id="L916" class="LineNr">916 </span> 62/b +<span id="L917" class="LineNr">917 </span><span class="subxMinorFunction">_test-slice-data-2</span>: +<span id="L918" class="LineNr">918 </span> 63/c +<span id="L919" class="LineNr">919 </span><span class="subxMinorFunction">_test-slice-data-3</span>: +<span id="L920" class="LineNr">920 </span> 64/d +<span id="L921" class="LineNr">921 </span><span class="subxMinorFunction">_test-slice-data-4</span>: +<span id="L922" class="LineNr">922 </span> +<span id="L923" class="LineNr">923 </span><span class="subxS1Comment"># . _. vim:nowrap:textwidth=0</span> </pre> </body> </html> |