diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
commit | 6070c23e5e1c60d3bb169e43bddfa59b1d322427 (patch) | |
tree | 9a70e378c33c15e4779cf94abda8f37c35a5d1da /html/075print-int-decimal.subx.html | |
parent | 5a6601aba973ba1d1ef30b7b64438c25623b89c5 (diff) | |
download | mu-6070c23e5e1c60d3bb169e43bddfa59b1d322427.tar.gz |
5897 - rename comparison instructions
Signed and unsigned don't quite capture the essence of what the different combinations of x86 flags are doing for SubX. The crucial distinction is that one set of comparison operators is for integers and the second is for addresses.
Diffstat (limited to 'html/075print-int-decimal.subx.html')
-rw-r--r-- | html/075print-int-decimal.subx.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/html/075print-int-decimal.subx.html b/html/075print-int-decimal.subx.html index 9a7c6ce2..bf35a3be 100644 --- a/html/075print-int-decimal.subx.html +++ b/html/075print-int-decimal.subx.html @@ -112,7 +112,7 @@ if ('onhashchange' in window) { <span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># var eax : int = abs(n)</span> <span id="L52" class="LineNr"> 52 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <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 *(ebp+12) to eax</span> <span id="L53" class="LineNr"> 53 </span> 3d/compare-eax-with 0/imm32 -<span id="L54" class="LineNr"> 54 </span> 7d/jump-if-greater-or-equal $print-int32-decimal:read-loop/disp8 +<span id="L54" class="LineNr"> 54 </span> 7d/jump-if->= $print-int32-decimal:read-loop/disp8 <span id="L55" class="LineNr"> 55 </span><span class="Constant">$print-int32-decimal:negative</span>: <span id="L56" class="LineNr"> 56 </span> f7 3/subop/negate 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># negate eax</span> <span id="L57" class="LineNr"> 57 </span><span class="Constant">$print-int32-decimal:read-loop</span>: @@ -125,11 +125,11 @@ if ('onhashchange' in window) { <span id="L64" class="LineNr"> 64 </span> 52/push-edx <span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># if (eax == 0) break</span> <span id="L66" class="LineNr"> 66 </span> 3d/compare-eax-and 0/imm32 -<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-greater $print-int32-decimal:read-loop/disp8 +<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-> $print-int32-decimal:read-loop/disp8 <span id="L68" class="LineNr"> 68 </span><span class="Constant">$print-int32-decimal:read-break</span>: <span id="L69" class="LineNr"> 69 </span> <span class="subxComment"># if (n < 0) push('-')</span> <span id="L70" class="LineNr"> 70 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 0/imm32 <span class="subxComment"># compare *(ebp+12)</span> -<span id="L71" class="LineNr"> 71 </span> 7d/jump-if-greater-or-equal $print-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8 +<span id="L71" class="LineNr"> 71 </span> 7d/jump-if->= $print-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8 <span id="L72" class="LineNr"> 72 </span><span class="Constant">$print-int32-decimal:push-negative</span>: <span id="L73" class="LineNr"> 73 </span> 68/push 0x2d/imm32/- <span id="L74" class="LineNr"> 74 </span><span class="Constant">$print-int32-decimal:<a href='057write.subx.html#L24'>write</a></span>: @@ -147,10 +147,10 @@ if ('onhashchange' in window) { <span id="L86" class="LineNr"> 86 </span> 58/pop-to-eax <span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># if (eax == sentinel) break</span> <span id="L88" class="LineNr"> 88 </span> 3d/compare-eax-and 0/imm32/sentinel -<span id="L89" class="LineNr"> 89 </span> 74/jump-if-equal $print-int32-decimal:write-break/disp8 +<span id="L89" class="LineNr"> 89 </span> 74/jump-if-= $print-int32-decimal:write-break/disp8 <span id="L90" class="LineNr"> 90 </span> <span class="subxComment"># if (curr >= max) abort</span> <span id="L91" class="LineNr"> 91 </span> 39/compare 3/mod/direct 1/rm32/ecx <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"># compare ecx with ebx</span> -<span id="L92" class="LineNr"> 92 </span> 73/jump-if-greater-or-equal-unsigned $print-int32-decimal:abort/disp8 +<span id="L92" class="LineNr"> 92 </span> 73/jump-if-addr>= $print-int32-decimal:abort/disp8 <span id="L93" class="LineNr"> 93 </span><span class="Constant">$print-int32-decimal:write-char</span>: <span id="L94" class="LineNr"> 94 </span> <span class="subxComment"># *curr = AL</span> <span id="L95" class="LineNr"> 95 </span> 88/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 AL to byte at *ecx</span> @@ -350,10 +350,10 @@ if ('onhashchange' in window) { <span id="L314" class="LineNr">314 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to ecx</span> <span id="L315" class="LineNr">315 </span> <span class="subxComment"># return false if c < '0'</span> <span id="L316" class="LineNr">316 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x30/imm32 <span class="subxComment"># compare ecx</span> -<span id="L317" class="LineNr">317 </span> 7c/jump-if-lesser $is-decimal-digit?:false/disp8 +<span id="L317" class="LineNr">317 </span> 7c/jump-if-< $is-decimal-digit?:false/disp8 <span id="L318" class="LineNr">318 </span> <span class="subxComment"># return true if c <= '9'</span> <span id="L319" class="LineNr">319 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x39/imm32 <span class="subxComment"># compare ecx</span> -<span id="L320" class="LineNr">320 </span> 7e/jump-if-lesser-or-equal $is-decimal-digit?:true/disp8 +<span id="L320" class="LineNr">320 </span> 7e/jump-if-<= $is-decimal-digit?:true/disp8 <span id="L321" class="LineNr">321 </span> <span class="subxComment"># otherwise return false</span> <span id="L322" class="LineNr">322 </span><span class="Constant">$is-decimal-digit?:false</span>: <span id="L323" class="LineNr">323 </span> b8/copy-to-eax 0/imm32/false |