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/apps/assort.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/apps/assort.subx.html')
-rw-r--r-- | html/apps/assort.subx.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/html/apps/assort.subx.html b/html/apps/assort.subx.html index 127ccce8..a7452e6b 100644 --- a/html/apps/assort.subx.html +++ b/html/apps/assort.subx.html @@ -102,7 +102,7 @@ if ('onhashchange' in window) { <span id="L40" class="LineNr"> 40 </span> <span class="subxH1Comment"># - if argc > 1 and argv[1] == "test", then return run_tests()</span> <span id="L41" class="LineNr"> 41 </span> <span class="subxComment"># if (argc <= 1) goto interactive</span> <span id="L42" class="LineNr"> 42 </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> 0/disp8 1/imm32 <span class="subxComment"># compare *ebp</span> -<span id="L43" class="LineNr"> 43 </span> 7e/jump-if-lesser-or-equal $subx-assort-main:interactive/disp8 +<span id="L43" class="LineNr"> 43 </span> 7e/jump-if-<= $subx-assort-main:interactive/disp8 <span id="L44" class="LineNr"> 44 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], "test")) goto interactive</span> <span id="L45" class="LineNr"> 45 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], "test")</span> <span id="L46" class="LineNr"> 46 </span> <span class="subxS2Comment"># . . push args</span> @@ -114,7 +114,7 @@ if ('onhashchange' in window) { <span id="L52" class="LineNr"> 52 </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="L53" class="LineNr"> 53 </span> <span class="subxS1Comment"># . if (eax == false) goto interactive</span> <span id="L54" class="LineNr"> 54 </span> 3d/compare-eax-and 0/imm32/false -<span id="L55" class="LineNr"> 55 </span> 74/jump-if-equal $subx-assort-main:interactive/disp8 +<span id="L55" class="LineNr"> 55 </span> 74/jump-if-= $subx-assort-main:interactive/disp8 <span id="L56" class="LineNr"> 56 </span> <span class="subxComment"># run-tests()</span> <span id="L57" class="LineNr"> 57 </span> e8/call run-tests/disp32 <span id="L58" class="LineNr"> 58 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span> @@ -539,7 +539,7 @@ if ('onhashchange' in window) { <span id="L525" class="LineNr">525 </span><span class="Constant">$read-segments:check0</span>: <span id="L526" class="LineNr">526 </span> <span class="subxComment"># if (line->write == 0) break</span> <span id="L527" class="LineNr">527 </span> 81 7/subop/compare 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *ecx</span> -<span id="L528" class="LineNr">528 </span> 0f 84/jump-if-equal $read-segments:<span class="Constant">break</span>/disp32 +<span id="L528" class="LineNr">528 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">break</span>/disp32 <span id="L529" class="Folded">529 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------</span> <span id="L562" class="LineNr">562 </span> <span class="subxComment"># next-word-or-string(line, word-slice)</span> <span id="L563" class="LineNr">563 </span> <span class="subxS2Comment"># . . push args</span> @@ -561,7 +561,7 @@ if ('onhashchange' in window) { <span id="L587" class="LineNr">587 </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="L588" class="LineNr">588 </span> <span class="subxS1Comment"># . if (eax != false) continue</span> <span id="L589" class="LineNr">589 </span> 3d/compare-eax-and 0/imm32/false -<span id="L590" class="LineNr">590 </span> 0f 85/jump-if-not-equal $read-segments:<span class="Constant">loop</span>/disp32 +<span id="L590" class="LineNr">590 </span> 0f 85/jump-if-!= $read-segments:<span class="Constant">loop</span>/disp32 <span id="L591" class="LineNr">591 </span><span class="Constant">$read-segments:check-for-comment</span>: <span id="L592" class="Folded">592 </span><span class="Folded">+-- 9 lines: #? # print("check for comment\n") ----------------------------------------------------------------------------------------------------------</span> <span id="L601" class="LineNr">601 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, "#")) continue</span> @@ -572,7 +572,7 @@ if ('onhashchange' in window) { <span id="L606" class="LineNr">606 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <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 *esi to AL</span> <span id="L607" class="LineNr">607 </span> <span class="subxS1Comment"># . if (c == '#') continue</span> <span id="L608" class="LineNr">608 </span> 3d/compare-eax-and 0x23/imm32/hash -<span id="L609" class="LineNr">609 </span> 0f 84/jump-if-equal $read-segments:<span class="Constant">loop</span>/disp32 +<span id="L609" class="LineNr">609 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">loop</span>/disp32 <span id="L610" class="LineNr">610 </span><span class="Constant">$read-segments:check-for-segment-header</span>: <span id="L611" class="Folded">611 </span><span class="Folded">+-- 9 lines: #? # print("check for segment header\n") ---------------------------------------------------------------------------------------------------</span> <span id="L620" class="Folded">620 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------</span> @@ -587,7 +587,7 @@ if ('onhashchange' in window) { <span id="L668" class="LineNr">668 </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="L669" class="LineNr">669 </span> <span class="subxS1Comment"># . if (eax == false) goto check3</span> <span id="L670" class="LineNr">670 </span> 3d/compare-eax-and 0/imm32/false -<span id="L671" class="LineNr">671 </span> 0f 84/jump-if-equal $read-segments:regular-line/disp32 +<span id="L671" class="LineNr">671 </span> 0f 84/jump-if-= $read-segments:regular-line/disp32 <span id="L672" class="LineNr">672 </span> <span class="subxComment"># segment-name = next-word-or-string(line)</span> <span id="L673" class="LineNr">673 </span> <span class="subxS2Comment"># . . push args</span> <span id="L674" class="LineNr">674 </span> 52/push-edx @@ -610,7 +610,7 @@ if ('onhashchange' in window) { <span id="L730" class="LineNr">730 </span> 8b/copy 0/mod/indirect 0/rm32/eax <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"># copy *eax to ebx</span> <span id="L731" class="LineNr">731 </span> <span class="subxComment"># if (curr-segment != 0) continue</span> <span id="L732" class="LineNr">732 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ebx</span> -<span id="L733" class="LineNr">733 </span> 0f 85/jump-if-not-equal $read-segments:<span class="Constant">loop</span>/disp32 +<span id="L733" class="LineNr">733 </span> 0f 85/jump-if-!= $read-segments:<span class="Constant">loop</span>/disp32 <span id="L734" class="LineNr">734 </span> <span class="subxComment"># curr-segment = new-stream(Heap, Segment-size, 1)</span> <span id="L735" class="LineNr">735 </span> <span class="subxS1Comment"># . save segment-slot</span> <span id="L736" class="LineNr">736 </span> 50/push-eax @@ -695,7 +695,7 @@ if ('onhashchange' in window) { <span id="L871" class="LineNr">871 </span><span class="Constant">$write-segments:loop</span>: <span id="L872" class="LineNr">872 </span> <span class="subxComment"># if (curr >= max) break</span> <span id="L873" class="LineNr">873 </span> 39/compare 3/mod/direct 6/rm32/esi <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 esi with edx</span> -<span id="L874" class="LineNr">874 </span> 73/jump-if-greater-or-equal-unsigned $write-segments:<span class="Constant">break</span>/disp8 +<span id="L874" class="LineNr">874 </span> 73/jump-if-addr>= $write-segments:<span class="Constant">break</span>/disp8 <span id="L875" class="LineNr">875 </span> <span class="subxComment"># var stream/eax : (addr stream byte) = table[i].stream</span> <span id="L876" class="LineNr">876 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <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 *(esi+4) to eax</span> <span id="L877" class="LineNr">877 </span> <span class="subxComment"># write-stream-data(out, stream)</span> |