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/factorial4.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/factorial4.subx.html')
-rw-r--r-- | html/apps/factorial4.subx.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/html/apps/factorial4.subx.html b/html/apps/factorial4.subx.html index 143ecc2c..db3331d9 100644 --- a/html/apps/factorial4.subx.html +++ b/html/apps/factorial4.subx.html @@ -90,11 +90,11 @@ if ('onhashchange' in window) { <span id="L31" class="LineNr">31 </span> { <span id="L32" class="LineNr">32 </span> <span class="subxComment"># if (argc <= 1) break</span> <span id="L33" class="LineNr">33 </span> 81 7/subop/compare *ebp 1/imm32 -<span id="L34" class="LineNr">34 </span> 7e/jump-if-lesser-or-equal <span class="Constant">break</span>/disp8 +<span id="L34" class="LineNr">34 </span> 7e/jump-if-<= <span class="Constant">break</span>/disp8 <span id="L35" class="LineNr">35 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], "test")) break</span> <span id="L36" class="LineNr">36 </span> (<a href='../052kernel-string-equal.subx.html#L33'>kernel-string-equal?</a> *(ebp+8) <span class="Constant">"test"</span>) <span class="subxComment"># => eax</span> <span id="L37" class="LineNr">37 </span> 3d/compare-eax-and 0/imm32/false -<span id="L38" class="LineNr">38 </span> 74/jump-if-equal <span class="Constant">break</span>/disp8 +<span id="L38" class="LineNr">38 </span> 74/jump-if-= <span class="Constant">break</span>/disp8 <span id="L39" class="LineNr">39 </span> <span class="subxComment">#</span> <span id="L40" class="LineNr">40 </span> (run-tests) <span id="L41" class="LineNr">41 </span> <span class="subxComment"># eax = *Num-test-failures</span> @@ -104,7 +104,7 @@ if ('onhashchange' in window) { <span id="L45" class="LineNr">45 </span> { <span id="L46" class="LineNr">46 </span> <span class="subxComment"># if (argc > 1) break</span> <span id="L47" class="LineNr">47 </span> 81 7/subop/compare *ebp 1/imm32 -<span id="L48" class="LineNr">48 </span> 7f/jump-if-greater <span class="Constant">break</span>/disp8 +<span id="L48" class="LineNr">48 </span> 7f/jump-if-> <span class="Constant">break</span>/disp8 <span id="L49" class="LineNr">49 </span> <span class="subxComment"># eax = factorial(5)</span> <span id="L50" class="LineNr">50 </span> (<a href='factorial4.subx.html#L58'>factorial</a> 5) <span id="L51" class="LineNr">51 </span> <span class="subxComment"># syscall(exit, eax)</span> @@ -123,12 +123,12 @@ if ('onhashchange' in window) { <span id="L64" class="LineNr">64 </span> <span class="subxComment"># if (n <= 1) return 1</span> <span id="L65" class="LineNr">65 </span> 81 7/subop/compare *(ebp+8) 1/imm32 <span id="L66" class="LineNr">66 </span> { -<span id="L67" class="LineNr">67 </span> 7f/jump-if-greater <span class="Constant">break</span>/disp8 +<span id="L67" class="LineNr">67 </span> 7f/jump-if-> <span class="Constant">break</span>/disp8 <span id="L68" class="LineNr">68 </span> b8/copy-to-eax 1/imm32 <span id="L69" class="LineNr">69 </span> } <span id="L70" class="LineNr">70 </span> <span class="subxComment"># if (n > 1) return n * factorial(n-1)</span> <span id="L71" class="LineNr">71 </span> { -<span id="L72" class="LineNr">72 </span> 7e/jump-if-lesser-or-equal <span class="Constant">break</span>/disp8 +<span id="L72" class="LineNr">72 </span> 7e/jump-if-<= <span class="Constant">break</span>/disp8 <span id="L73" class="LineNr">73 </span> <span class="subxComment"># var ebx : int = n-1</span> <span id="L74" class="LineNr">74 </span> 8b/-> *(ebp+8) 3/r32/ebx <span id="L75" class="LineNr">75 </span> 4b/decrement-ebx |