diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-01-14 17:29:10 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-01-14 17:29:10 -0800 |
commit | 3f97166cf7360c1b8f607ba37bb350790e83101d (patch) | |
tree | 1a9e57b1c1a13a078474c8f85fd220fe4160e82b /html/subx/069slice.subx.html | |
parent | 509f0a12ca3d2061b1555ded31dead23f00ed854 (diff) | |
download | mu-3f97166cf7360c1b8f607ba37bb350790e83101d.tar.gz |
4927
Diffstat (limited to 'html/subx/069slice.subx.html')
-rw-r--r-- | html/subx/069slice.subx.html | 187 |
1 files changed, 160 insertions, 27 deletions
diff --git a/html/subx/069slice.subx.html b/html/subx/069slice.subx.html index 498d891a..65930bd3 100644 --- a/html/subx/069slice.subx.html +++ b/html/subx/069slice.subx.html @@ -223,8 +223,8 @@ if ('onhashchange' in window) { <span id="L161" class="LineNr">161 </span> 55/push-EBP <span id="L162" class="LineNr">162 </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="L163" class="LineNr">163 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L164" class="LineNr">164 </span> 68/push <a href='069slice.subx.html#L383'>_test-slice-data-3</a>/imm32/end -<span id="L165" class="LineNr">165 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L164" class="LineNr">164 </span> 68/push <a href='069slice.subx.html#L516'>_test-slice-data-3</a>/imm32/end +<span id="L165" class="LineNr">165 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L166" class="LineNr">166 </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="L167" class="LineNr">167 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L168" class="LineNr">168 </span> <span class="subxS2Comment"># . . push args</span> @@ -254,8 +254,8 @@ if ('onhashchange' in window) { <span id="L192" class="LineNr">192 </span> 55/push-EBP <span id="L193" class="LineNr">193 </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="L194" class="LineNr">194 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L195" class="LineNr">195 </span> 68/push <a href='069slice.subx.html#L385'>_test-slice-data-4</a>/imm32/end -<span id="L196" class="LineNr">196 </span> 68/push <a href='069slice.subx.html#L379'>_test-slice-data-1</a>/imm32/start +<span id="L195" class="LineNr">195 </span> 68/push <a href='069slice.subx.html#L518'>_test-slice-data-4</a>/imm32/end +<span id="L196" class="LineNr">196 </span> 68/push <a href='069slice.subx.html#L512'>_test-slice-data-1</a>/imm32/start <span id="L197" class="LineNr">197 </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="L198" class="LineNr">198 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L199" class="LineNr">199 </span> <span class="subxS2Comment"># . . push args</span> @@ -285,8 +285,8 @@ if ('onhashchange' in window) { <span id="L223" class="LineNr">223 </span> 55/push-EBP <span id="L224" class="LineNr">224 </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="L225" class="LineNr">225 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L226" class="LineNr">226 </span> 68/push <a href='069slice.subx.html#L385'>_test-slice-data-4</a>/imm32/end -<span id="L227" class="LineNr">227 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L226" class="LineNr">226 </span> 68/push <a href='069slice.subx.html#L518'>_test-slice-data-4</a>/imm32/end +<span id="L227" class="LineNr">227 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L228" class="LineNr">228 </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="L229" class="LineNr">229 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L230" class="LineNr">230 </span> <span class="subxS2Comment"># . . push args</span> @@ -316,8 +316,8 @@ if ('onhashchange' in window) { <span id="L254" class="LineNr">254 </span> 55/push-EBP <span id="L255" class="LineNr">255 </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="L256" class="LineNr">256 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L257" class="LineNr">257 </span> 68/push <a href='069slice.subx.html#L379'>_test-slice-data-1</a>/imm32/end -<span id="L258" class="LineNr">258 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L257" class="LineNr">257 </span> 68/push <a href='069slice.subx.html#L512'>_test-slice-data-1</a>/imm32/end +<span id="L258" class="LineNr">258 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L259" class="LineNr">259 </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="L260" class="LineNr">260 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L261" class="LineNr">261 </span> <span class="subxS2Comment"># . . push args</span> @@ -347,8 +347,8 @@ if ('onhashchange' in window) { <span id="L285" class="LineNr">285 </span> 55/push-EBP <span id="L286" class="LineNr">286 </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="L287" class="LineNr">287 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L288" class="LineNr">288 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/end -<span id="L289" class="LineNr">289 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L288" class="LineNr">288 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/end +<span id="L289" class="LineNr">289 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L290" class="LineNr">290 </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="L291" class="LineNr">291 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "Abc")</span> <span id="L292" class="LineNr">292 </span> <span class="subxS2Comment"># . . push args</span> @@ -378,8 +378,8 @@ if ('onhashchange' in window) { <span id="L316" class="LineNr">316 </span> 55/push-EBP <span id="L317" class="LineNr">317 </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="L318" class="LineNr">318 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L319" class="LineNr">319 </span> 68/push <a href='069slice.subx.html#L381'>_test-slice-data-2</a>/imm32/end -<span id="L320" class="LineNr">320 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L319" class="LineNr">319 </span> 68/push <a href='069slice.subx.html#L514'>_test-slice-data-2</a>/imm32/end +<span id="L320" class="LineNr">320 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L321" class="LineNr">321 </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="L322" class="LineNr">322 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "")</span> <span id="L323" class="LineNr">323 </span> <span class="subxS2Comment"># . . push args</span> @@ -409,8 +409,8 @@ if ('onhashchange' in window) { <span id="L347" class="LineNr">347 </span> 55/push-EBP <span id="L348" class="LineNr">348 </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="L349" class="LineNr">349 </span> <span class="subxComment"># var slice/ECX</span> -<span id="L350" class="LineNr">350 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/end -<span id="L351" class="LineNr">351 </span> 68/push <a href='069slice.subx.html#L377'>_test-slice-data-0</a>/imm32/start +<span id="L350" class="LineNr">350 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/end +<span id="L351" class="LineNr">351 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start <span id="L352" class="LineNr">352 </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="L353" class="LineNr">353 </span> <span class="subxComment"># EAX = slice-equal?(ECX, "")</span> <span id="L354" class="LineNr">354 </span> <span class="subxS2Comment"># . . push args</span> @@ -434,19 +434,152 @@ if ('onhashchange' in window) { <span id="L372" class="LineNr">372 </span> 5d/pop-to-EBP <span id="L373" class="LineNr">373 </span> c3/return <span id="L374" class="LineNr">374 </span> -<span id="L375" class="LineNr">375 </span>== data -<span id="L376" class="LineNr">376 </span> -<span id="L377" class="LineNr">377 </span><span class="subxMinorFunction">_test-slice-data-0</span>: -<span id="L378" class="LineNr">378 </span> 41/A -<span id="L379" class="LineNr">379 </span><span class="subxMinorFunction">_test-slice-data-1</span>: -<span id="L380" class="LineNr">380 </span> 62/b -<span id="L381" class="LineNr">381 </span><span class="subxMinorFunction">_test-slice-data-2</span>: -<span id="L382" class="LineNr">382 </span> 63/c -<span id="L383" class="LineNr">383 </span><span class="subxMinorFunction">_test-slice-data-3</span>: -<span id="L384" class="LineNr">384 </span> 64/d -<span id="L385" class="LineNr">385 </span><span class="subxMinorFunction">_test-slice-data-4</span>: -<span id="L386" class="LineNr">386 </span> -<span id="L387" class="LineNr">387 </span><span class="subxS1Comment"># . _. vim:nowrap:textwidth=0</span> +<span id="L375" class="LineNr">375 </span><span class="subxFunction">write-slice</span>: <span class="subxComment"># out : (address buffered-file), s : (address slice)</span> +<span id="L376" class="LineNr">376 </span> <span class="subxS1Comment"># . prolog</span> +<span id="L377" class="LineNr">377 </span> 55/push-EBP +<span id="L378" class="LineNr">378 </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="L379" class="LineNr">379 </span> <span class="subxS1Comment"># . save registers</span> +<span id="L380" class="LineNr">380 </span> 50/push-EAX +<span id="L381" class="LineNr">381 </span> 51/push-ECX +<span id="L382" class="LineNr">382 </span> 52/push-EDX +<span id="L383" class="LineNr">383 </span> 53/push-EBX +<span id="L384" class="LineNr">384 </span> 56/push-ESI +<span id="L385" class="LineNr">385 </span> 57/push-EDI +<span id="L386" class="LineNr">386 </span> <span class="subxComment"># ESI = s</span> +<span id="L387" class="LineNr">387 </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="L388" class="LineNr">388 </span> <span class="subxComment"># curr/ECX = s->start</span> +<span id="L389" class="LineNr">389 </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="L390" class="LineNr">390 </span> <span class="subxComment"># max/ESI = s->end</span> +<span id="L391" class="LineNr">391 </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="L392" class="LineNr">392 </span> <span class="subxComment"># EDI = f</span> +<span id="L393" class="LineNr">393 </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="L394" class="LineNr">394 </span> <span class="subxComment"># EDX = f->length</span> +<span id="L395" class="LineNr">395 </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="L396" class="LineNr">396 </span> <span class="subxComment"># EBX = f->write</span> +<span id="L397" class="LineNr">397 </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="L398" class="LineNr">398 </span><span class="Constant">$write-slice:loop</span>: +<span id="L399" class="LineNr">399 </span> <span class="subxComment"># if (curr >= max) break</span> +<span id="L400" class="LineNr">400 </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="L401" class="LineNr">401 </span> 7d/jump-if-greater-or-equal $write-slice:loop-end/disp8 +<span id="L402" class="LineNr">402 </span> <span class="subxComment"># if (f->write >= f->length) flush and clear f's stream</span> +<span id="L403" class="LineNr">403 </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="L404" class="LineNr">404 </span> 7c/jump-if-lesser $write-slice:to-stream/disp8 +<span id="L405" class="LineNr">405 </span> <span class="subxS1Comment"># . persist f->write</span> +<span id="L406" class="LineNr">406 </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="L407" class="LineNr">407 </span> <span class="subxS1Comment"># . flush(f)</span> +<span id="L408" class="LineNr">408 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L409" class="LineNr">409 </span> 57/push-EDI +<span id="L410" class="LineNr">410 </span> <span class="subxS2Comment"># . . call</span> +<span id="L411" class="LineNr">411 </span> e8/call <a href='062write-byte.subx.html#L86'>flush</a>/disp32 +<span id="L412" class="LineNr">412 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L413" class="LineNr">413 </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="L414" class="LineNr">414 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span> +<span id="L415" class="LineNr">415 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L416" class="LineNr">416 </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="L417" class="LineNr">417 </span> 50/push-EAX +<span id="L418" class="LineNr">418 </span> <span class="subxS2Comment"># . . call</span> +<span id="L419" class="LineNr">419 </span> e8/call <a href='056write.subx.html#L85'>clear-stream</a>/disp32 +<span id="L420" class="LineNr">420 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L421" class="LineNr">421 </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="L422" class="LineNr">422 </span> <span class="subxS1Comment"># . f->write must now be 0; update its cache at EBX</span> +<span id="L423" class="LineNr">423 </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="L424" class="LineNr">424 </span><span class="Constant">$write-slice:to-stream</span>: +<span id="L425" class="LineNr">425 </span> <span class="subxComment"># f->data[f->write] = *in</span> +<span id="L426" class="LineNr">426 </span> <span class="subxS1Comment"># . AL = *in</span> +<span id="L427" class="LineNr">427 </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="L428" class="LineNr">428 </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="L429" class="LineNr">429 </span> <span class="subxS1Comment"># . f->data[f->write] = AL</span> +<span id="L430" class="LineNr">430 </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="L431" class="LineNr">431 </span> <span class="subxComment"># ++f->write</span> +<span id="L432" class="LineNr">432 </span> 43/increment-EBX +<span id="L433" class="LineNr">433 </span> <span class="subxComment"># ++in</span> +<span id="L434" class="LineNr">434 </span> 41/increment-ECX +<span id="L435" class="LineNr">435 </span> eb/jump $write-slice:loop/disp8 +<span id="L436" class="LineNr">436 </span><span class="Constant">$write-slice:loop-end</span>: +<span id="L437" class="LineNr">437 </span> <span class="subxComment"># persist necessary variables from registers</span> +<span id="L438" class="LineNr">438 </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="L439" class="LineNr">439 </span><span class="Constant">$write-slice:end</span>: +<span id="L440" class="LineNr">440 </span> <span class="subxS1Comment"># . restore registers</span> +<span id="L441" class="LineNr">441 </span> 5f/pop-to-EDI +<span id="L442" class="LineNr">442 </span> 5e/pop-to-ESI +<span id="L443" class="LineNr">443 </span> 5b/pop-to-EBX +<span id="L444" class="LineNr">444 </span> 5a/pop-to-EDX +<span id="L445" class="LineNr">445 </span> 59/pop-to-ECX +<span id="L446" class="LineNr">446 </span> 58/pop-to-EAX +<span id="L447" class="LineNr">447 </span> <span class="subxS1Comment"># . epilog</span> +<span id="L448" class="LineNr">448 </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="L449" class="LineNr">449 </span> 5d/pop-to-EBP +<span id="L450" class="LineNr">450 </span> c3/return +<span id="L451" class="LineNr">451 </span> +<span id="L452" class="LineNr">452 </span><span class="subxTest">test-write-slice</span>: +<span id="L453" class="LineNr">453 </span> <span class="subxS1Comment"># . prolog</span> +<span id="L454" class="LineNr">454 </span> 55/push-EBP +<span id="L455" class="LineNr">455 </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="L456" class="LineNr">456 </span> <span class="subxComment"># setup</span> +<span id="L457" class="LineNr">457 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span> +<span id="L458" class="LineNr">458 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L459" class="LineNr">459 </span> 68/push <a href='056write.subx.html#L193'>_test-stream</a>/imm32 +<span id="L460" class="LineNr">460 </span> <span class="subxS2Comment"># . . call</span> +<span id="L461" class="LineNr">461 </span> e8/call <a href='056write.subx.html#L85'>clear-stream</a>/disp32 +<span id="L462" class="LineNr">462 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L463" class="LineNr">463 </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="L464" class="LineNr">464 </span> <span class="subxS1Comment"># . clear-stream(_test-buffered-file+4)</span> +<span id="L465" class="LineNr">465 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L466" class="LineNr">466 </span> b8/copy-to-EAX <a href='059read-byte.subx.html#L290'>_test-buffered-file</a>/imm32 +<span id="L467" class="LineNr">467 </span> 05/add-to-EAX 4/imm32 +<span id="L468" class="LineNr">468 </span> 50/push-EAX +<span id="L469" class="LineNr">469 </span> <span class="subxS2Comment"># . . call</span> +<span id="L470" class="LineNr">470 </span> e8/call <a href='056write.subx.html#L85'>clear-stream</a>/disp32 +<span id="L471" class="LineNr">471 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L472" class="LineNr">472 </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="L473" class="LineNr">473 </span> <span class="subxComment"># var slice/ECX = "Abc"</span> +<span id="L474" class="LineNr">474 </span> 68/push <a href='069slice.subx.html#L516'>_test-slice-data-3</a>/imm32/end +<span id="L475" class="LineNr">475 </span> 68/push <a href='069slice.subx.html#L510'>_test-slice-data-0</a>/imm32/start +<span id="L476" class="LineNr">476 </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="L477" class="LineNr">477 </span> <span class="subxComment"># write-slice(_test-buffered-file, slice)</span> +<span id="L478" class="LineNr">478 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L479" class="LineNr">479 </span> 51/push-ECX +<span id="L480" class="LineNr">480 </span> 68/push <a href='059read-byte.subx.html#L290'>_test-buffered-file</a>/imm32 +<span id="L481" class="LineNr">481 </span> <span class="subxS2Comment"># . . call</span> +<span id="L482" class="LineNr">482 </span> e8/call <a href='069slice.subx.html#L375'>write-slice</a>/disp32 +<span id="L483" class="LineNr">483 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L484" class="LineNr">484 </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="L485" class="LineNr">485 </span> <span class="subxComment"># flush(_test-buffered-file)</span> +<span id="L486" class="LineNr">486 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L487" class="LineNr">487 </span> 68/push <a href='059read-byte.subx.html#L290'>_test-buffered-file</a>/imm32 +<span id="L488" class="LineNr">488 </span> <span class="subxS2Comment"># . . call</span> +<span id="L489" class="LineNr">489 </span> e8/call <a href='062write-byte.subx.html#L86'>flush</a>/disp32 +<span id="L490" class="LineNr">490 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L491" class="LineNr">491 </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="L492" class="LineNr">492 </span> <span class="subxComment"># check-ints-equal(*_test-stream->data, "Abc", msg)</span> +<span id="L493" class="LineNr">493 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L494" class="LineNr">494 </span> 68/push <span class="Constant">"F - test-write-slice"</span>/imm32 +<span id="L495" class="LineNr">495 </span> 68/push 0x636241/imm32 +<span id="L496" class="LineNr">496 </span> <span class="subxS2Comment"># . . push *_test-stream->data</span> +<span id="L497" class="LineNr">497 </span> b8/copy-to-EAX <a href='056write.subx.html#L193'>_test-stream</a>/imm32 +<span id="L498" class="LineNr">498 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(EAX+12)</span> +<span id="L499" class="LineNr">499 </span> <span class="subxS2Comment"># . . call</span> +<span id="L500" class="LineNr">500 </span> e8/call <a href='051test.subx.html#L24'>check-ints-equal</a>/disp32 +<span id="L501" class="LineNr">501 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L502" class="LineNr">502 </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="L503" class="LineNr">503 </span> <span class="subxS1Comment"># . epilog</span> +<span id="L504" class="LineNr">504 </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="L505" class="LineNr">505 </span> 5d/pop-to-EBP +<span id="L506" class="LineNr">506 </span> c3/return +<span id="L507" class="LineNr">507 </span> +<span id="L508" class="LineNr">508 </span>== data +<span id="L509" class="LineNr">509 </span> +<span id="L510" class="LineNr">510 </span><span class="subxMinorFunction">_test-slice-data-0</span>: +<span id="L511" class="LineNr">511 </span> 41/A +<span id="L512" class="LineNr">512 </span><span class="subxMinorFunction">_test-slice-data-1</span>: +<span id="L513" class="LineNr">513 </span> 62/b +<span id="L514" class="LineNr">514 </span><span class="subxMinorFunction">_test-slice-data-2</span>: +<span id="L515" class="LineNr">515 </span> 63/c +<span id="L516" class="LineNr">516 </span><span class="subxMinorFunction">_test-slice-data-3</span>: +<span id="L517" class="LineNr">517 </span> 64/d +<span id="L518" class="LineNr">518 </span><span class="subxMinorFunction">_test-slice-data-4</span>: +<span id="L519" class="LineNr">519 </span> +<span id="L520" class="LineNr">520 </span><span class="subxS1Comment"># . _. vim:nowrap:textwidth=0</span> </pre> </body> </html> |