about summary refs log tree commit diff stats
path: root/html/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-12-09 16:54:34 -0800
committerKartik Agaram <vc@akkartik.com>2019-12-09 16:54:34 -0800
commitcea97b7b22e91cced90f11f1df42cdd09337e8df (patch)
tree3a8f17f164a17b80854c385649b5312e10508295 /html/apps
parentef21004a5c5b655b7e352f658a8368986ac1c1df (diff)
downloadmu-cea97b7b22e91cced90f11f1df42cdd09337e8df.tar.gz
5810
Diffstat (limited to 'html/apps')
-rw-r--r--html/apps/factorial2.subx.html8
-rw-r--r--html/apps/factorial3.subx.html6
-rw-r--r--html/apps/factorial4.subx.html35
3 files changed, 25 insertions, 24 deletions
diff --git a/html/apps/factorial2.subx.html b/html/apps/factorial2.subx.html
index 343d7d68..44870ee1 100644
--- a/html/apps/factorial2.subx.html
+++ b/html/apps/factorial2.subx.html
@@ -105,8 +105,8 @@ if ('onhashchange' in window) {
 <span id="L45" class="LineNr"> 45 </span>    e8/call <a href='../052kernel-string-equal.subx.html#L33'>kernel-string-equal?</a>/disp32
 <span id="L46" class="LineNr"> 46 </span>    <span class="subxS2Comment"># . . discard args</span>
 <span id="L47" class="LineNr"> 47 </span>    81 0/subop/add %esp 8/imm32
-<span id="L48" class="LineNr"> 48 </span>    <span class="subxS1Comment"># . if (eax == 0) goto run-main</span>
-<span id="L49" class="LineNr"> 49 </span>    3d/compare-eax-and 0/imm32
+<span id="L48" class="LineNr"> 48 </span>    <span class="subxS1Comment"># . if (eax == false) goto run-main</span>
+<span id="L49" class="LineNr"> 49 </span>    3d/compare-eax-and 0/imm32/false
 <span id="L50" class="LineNr"> 50 </span>    74/jump-if-equal $run-main/disp8
 <span id="L51" class="LineNr"> 51 </span>    <span class="subxComment"># run-tests()</span>
 <span id="L52" class="LineNr"> 52 </span>    e8/call run-tests/disp32
@@ -137,10 +137,10 @@ if ('onhashchange' in window) {
 <span id="L77" class="LineNr"> 77 </span>    b8/copy-to-eax 1/imm32
 <span id="L78" class="LineNr"> 78 </span>    81 7/subop/compare *(ebp+8) 1/imm32
 <span id="L79" class="LineNr"> 79 </span>    7e/jump-if-&lt;= $factorial:end/disp8
-<span id="L80" class="LineNr"> 80 </span>    <span class="subxComment"># ebx = n-1</span>
+<span id="L80" class="LineNr"> 80 </span>    <span class="subxComment"># var ebx : int = n-1</span>
 <span id="L81" class="LineNr"> 81 </span>    8b/-&gt; *(ebp+8) 3/r32/ebx
 <span id="L82" class="LineNr"> 82 </span>    4b/decrement-ebx
-<span id="L83" class="LineNr"> 83 </span>    <span class="subxComment"># eax = factorial(n-1)</span>
+<span id="L83" class="LineNr"> 83 </span>    <span class="subxComment"># var eax : int = factorial(n-1)</span>
 <span id="L84" class="LineNr"> 84 </span>    <span class="subxS2Comment"># . . push args</span>
 <span id="L85" class="LineNr"> 85 </span>    53/push-ebx
 <span id="L86" class="LineNr"> 86 </span>    <span class="subxS2Comment"># . . call</span>
diff --git a/html/apps/factorial3.subx.html b/html/apps/factorial3.subx.html
index bdce6a46..6966e8fb 100644
--- a/html/apps/factorial3.subx.html
+++ b/html/apps/factorial3.subx.html
@@ -91,8 +91,8 @@ if ('onhashchange' in window) {
 <span id="L32" class="LineNr">32 </span>    7e/jump-if-lesser-or-equal $run-main/disp8
 <span id="L33" class="LineNr">33 </span>    <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto run-main</span>
 <span id="L34" class="LineNr">34 </span>    (<a href='../052kernel-string-equal.subx.html#L33'>kernel-string-equal?</a> *(ebp+8) <span class="Constant">&quot;test&quot;</span>)  <span class="subxComment"># =&gt; eax</span>
-<span id="L35" class="LineNr">35 </span>    <span class="subxS1Comment"># . if (eax == 0) goto run-main</span>
-<span id="L36" class="LineNr">36 </span>    3d/compare-eax-and 0/imm32
+<span id="L35" class="LineNr">35 </span>    <span class="subxS1Comment"># . if (eax == false) goto run-main</span>
+<span id="L36" class="LineNr">36 </span>    3d/compare-eax-and 0/imm32/false
 <span id="L37" class="LineNr">37 </span>    74/jump-if-equal $run-main/disp8
 <span id="L38" class="LineNr">38 </span>    <span class="subxComment">#</span>
 <span id="L39" class="LineNr">39 </span>    (run-tests)
@@ -118,7 +118,7 @@ if ('onhashchange' in window) {
 <span id="L59" class="LineNr">59 </span>    b8/copy-to-eax 1/imm32
 <span id="L60" class="LineNr">60 </span>    81 7/subop/compare *(ebp+8) 1/imm32
 <span id="L61" class="LineNr">61 </span>    7e/jump-if-&lt;= $factorial:end/disp8
-<span id="L62" class="LineNr">62 </span>    <span class="subxComment"># ebx = n-1</span>
+<span id="L62" class="LineNr">62 </span>    <span class="subxComment"># var ebx : int = n-1</span>
 <span id="L63" class="LineNr">63 </span>    8b/-&gt; *(ebp+8) 3/r32/ebx
 <span id="L64" class="LineNr">64 </span>    4b/decrement-ebx
 <span id="L65" class="LineNr">65 </span>    <span class="subxComment">#</span>
diff --git a/html/apps/factorial4.subx.html b/html/apps/factorial4.subx.html
index 3e635e9c..6dd332a7 100644
--- a/html/apps/factorial4.subx.html
+++ b/html/apps/factorial4.subx.html
@@ -93,7 +93,7 @@ if ('onhashchange' in window) {
 <span id="L34" class="LineNr">34 </span>      7e/jump-if-lesser-or-equal <span class="Constant">break</span>/disp8
 <span id="L35" class="LineNr">35 </span>      <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) 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">&quot;test&quot;</span>)  <span class="subxComment"># =&gt; eax</span>
-<span id="L37" class="LineNr">37 </span>      3d/compare-eax-and 0/imm32
+<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="L39" class="LineNr">39 </span>      <span class="subxComment">#</span>
 <span id="L40" class="LineNr">40 </span>      (run-tests)
@@ -129,22 +129,23 @@ if ('onhashchange' in window) {
 <span id="L70" class="LineNr">70 </span>    <span class="subxComment"># if (n &gt; 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="L73" class="LineNr">73 </span>      8b/-&gt; *(ebp+8) 3/r32/ebx
-<span id="L74" class="LineNr">74 </span>      4b/decrement-ebx
-<span id="L75" class="LineNr">75 </span>      (<a href='factorial4.subx.html#L58'>factorial</a> %ebx)  <span class="subxComment"># =&gt; eax</span>
-<span id="L76" class="LineNr">76 </span>      f7 4/subop/multiply-into-eax *(ebp+8)
-<span id="L77" class="LineNr">77 </span>    }
-<span id="L78" class="LineNr">78 </span>    <span class="subxComment"># restore registers</span>
-<span id="L79" class="LineNr">79 </span>    5b/pop-to-ebx
-<span id="L80" class="LineNr">80 </span>    <span class="subxS1Comment"># . epilogue</span>
-<span id="L81" class="LineNr">81 </span>    89/&lt;- %esp 5/r32/ebp
-<span id="L82" class="LineNr">82 </span>    5d/pop-to-ebp
-<span id="L83" class="LineNr">83 </span>    c3/return
-<span id="L84" class="LineNr">84 </span>
-<span id="L85" class="LineNr">85 </span><span class="subxTest">test-factorial</span>:
-<span id="L86" class="LineNr">86 </span>    (<a href='factorial4.subx.html#L58'>factorial</a> 5)
-<span id="L87" class="LineNr">87 </span>    (<a href='../051test.subx.html#L24'>check-ints-equal</a> %eax 0x78 <span class="Constant">&quot;F - test-factorial&quot;</span>)
-<span id="L88" class="LineNr">88 </span>    c3/return
+<span id="L73" class="LineNr">73 </span>      <span class="subxComment"># var ebx : int = n-1</span>
+<span id="L74" class="LineNr">74 </span>      8b/-&gt; *(ebp+8) 3/r32/ebx
+<span id="L75" class="LineNr">75 </span>      4b/decrement-ebx
+<span id="L76" class="LineNr">76 </span>      (<a href='factorial4.subx.html#L58'>factorial</a> %ebx)  <span class="subxComment"># =&gt; eax</span>
+<span id="L77" class="LineNr">77 </span>      f7 4/subop/multiply-into-eax *(ebp+8)
+<span id="L78" class="LineNr">78 </span>    }
+<span id="L79" class="LineNr">79 </span>    <span class="subxComment"># restore registers</span>
+<span id="L80" class="LineNr">80 </span>    5b/pop-to-ebx
+<span id="L81" class="LineNr">81 </span>    <span class="subxS1Comment"># . epilogue</span>
+<span id="L82" class="LineNr">82 </span>    89/&lt;- %esp 5/r32/ebp
+<span id="L83" class="LineNr">83 </span>    5d/pop-to-ebp
+<span id="L84" class="LineNr">84 </span>    c3/return
+<span id="L85" class="LineNr">85 </span>
+<span id="L86" class="LineNr">86 </span><span class="subxTest">test-factorial</span>:
+<span id="L87" class="LineNr">87 </span>    (<a href='factorial4.subx.html#L58'>factorial</a> 5)
+<span id="L88" class="LineNr">88 </span>    (<a href='../051test.subx.html#L24'>check-ints-equal</a> %eax 0x78 <span class="Constant">&quot;F - test-factorial&quot;</span>)
+<span id="L89" class="LineNr">89 </span>    c3/return
 </pre>
 </body>
 </html>