diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-12-04 10:40:01 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-12-04 10:40:01 -0800 |
commit | af5797eeffdcec43198337f60571ff4ac5f80228 (patch) | |
tree | e55ce0a382168e27027b2dddb5ed3082c6f25f12 /html/subx | |
parent | 9e03e2bd37dc440eeb62783378f11d718bab160f (diff) | |
download | mu-af5797eeffdcec43198337f60571ff4ac5f80228.tar.gz |
4838
Better to use EDI as a mnemonic for 'destination'.
Diffstat (limited to 'html/subx')
-rw-r--r-- | html/subx/062write-byte.subx.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/html/subx/062write-byte.subx.html b/html/subx/062write-byte.subx.html index d544a136..e279a005 100644 --- a/html/subx/062write-byte.subx.html +++ b/html/subx/062write-byte.subx.html @@ -107,24 +107,24 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr"> 42 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/r32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L43" class="LineNr"> 43 </span> <span class="subxS1Comment"># . save registers</span> <span id="L44" class="LineNr"> 44 </span> 51/push-ECX -<span id="L45" class="LineNr"> 45 </span> 56/push-ESI -<span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># ESI = f</span> -<span id="L47" class="LineNr"> 47 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> 6/r32/ESI 8/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *(EBP+8) to ESI</span> +<span id="L45" class="LineNr"> 45 </span> 57/push-EDI +<span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># EDI = f</span> +<span id="L47" class="LineNr"> 47 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> 7/r32/EDI 8/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *(EBP+8) to EDI</span> <span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># ECX = f->write</span> -<span id="L49" class="LineNr"> 49 </span> 8b/copy 1/mod/*+disp8 6/rm32/ESI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 1/r32/ECX 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *(ESI+4) to ECX</span> +<span id="L49" class="LineNr"> 49 </span> 8b/copy 1/mod/*+disp8 7/rm32/EDI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 1/r32/ECX 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *(EDI+4) to ECX</span> <span id="L50" class="LineNr"> 50 </span> <span class="subxComment"># if (f->write >= f->length) flush and clear f's stream</span> -<span id="L51" class="LineNr"> 51 </span> 3b/compare 1/mod/*+disp8 6/rm32/ESI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 1/r32/ECX 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># compare ECX with *(ESI+12)</span> +<span id="L51" class="LineNr"> 51 </span> 3b/compare 1/mod/*+disp8 7/rm32/EDI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 1/r32/ECX 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># compare ECX with *(EDI+12)</span> <span id="L52" class="LineNr"> 52 </span> 7c/jump-if-lesser $write-byte:to-stream/disp8 <span id="L53" class="LineNr"> 53 </span> <span class="subxS1Comment"># . flush(f)</span> <span id="L54" class="LineNr"> 54 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L55" class="LineNr"> 55 </span> 56/push-ESI +<span id="L55" class="LineNr"> 55 </span> 57/push-EDI <span id="L56" class="LineNr"> 56 </span> <span class="subxS2Comment"># . . call</span> <span id="L57" class="LineNr"> 57 </span> e8/call flush/disp32 <span id="L58" class="LineNr"> 58 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L59" class="LineNr"> 59 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> <span id="L60" class="LineNr"> 60 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span> <span id="L61" class="LineNr"> 61 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L62" class="LineNr"> 62 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/ESI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESI+4 to EAX</span> +<span id="L62" class="LineNr"> 62 </span> 8d/copy-address 1/mod/*+disp8 7/rm32/EDI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EDI+4 to EAX</span> <span id="L63" class="LineNr"> 63 </span> 50/push-EAX <span id="L64" class="LineNr"> 64 </span> <span class="subxS2Comment"># . . call</span> <span id="L65" class="LineNr"> 65 </span> e8/call clear-stream/disp32 @@ -135,12 +135,12 @@ if ('onhashchange' in window) { <span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># f->data[f->read] = LSB(n)</span> <span id="L71" class="LineNr"> 71 </span> 31/xor 3/mod/direct 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># clear EAX</span> <span id="L72" class="LineNr"> 72 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> 0/r32/AL 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy byte at *(EBP+12) to AL</span> -<span id="L73" class="LineNr"> 73 </span> 88/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX <span class="CommentedCode"> . </span> 0/r32/AL 0x10/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy AL to *(ESI+ECX+16)</span> +<span id="L73" class="LineNr"> 73 </span> 88/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/EDI 1/index/ECX <span class="CommentedCode"> . </span> 0/r32/AL 0x10/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy AL to *(EDI+ECX+16)</span> <span id="L74" class="LineNr"> 74 </span> <span class="subxComment"># ++f->read</span> -<span id="L75" class="LineNr"> 75 </span> ff 0/subop/increment 1/mod/*+disp8 6/rm32/ESI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># increment *(ESI+4)</span> +<span id="L75" class="LineNr"> 75 </span> ff 0/subop/increment 1/mod/*+disp8 7/rm32/EDI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># increment *(EDI+4)</span> <span id="L76" class="LineNr"> 76 </span><span class="Constant">$write-byte:end</span>: <span id="L77" class="LineNr"> 77 </span> <span class="subxS1Comment"># . restore registers</span> -<span id="L78" class="LineNr"> 78 </span> 5e/pop-to-ESI +<span id="L78" class="LineNr"> 78 </span> 5f/pop-to-EDI <span id="L79" class="LineNr"> 79 </span> 59/pop-to-ECX <span id="L80" class="LineNr"> 80 </span> <span class="subxS1Comment"># . epilog</span> <span id="L81" class="LineNr"> 81 </span> 89/copy 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 5/r32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy EBP to ESP</span> |