diff options
Diffstat (limited to 'html/subx/apps/factorial.subx.html')
-rw-r--r-- | html/subx/apps/factorial.subx.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/html/subx/apps/factorial.subx.html b/html/subx/apps/factorial.subx.html index 8e65e9cc..a30495cb 100644 --- a/html/subx/apps/factorial.subx.html +++ b/html/subx/apps/factorial.subx.html @@ -98,11 +98,11 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr"> 42 </span> eb/jump $main:end/disp8 <span class="Comment"># where EAX will get copied to EBX</span> <span id="L43" class="LineNr"> 43 </span> <span class="Comment"># else EAX = factorial(5)</span> <span id="L44" class="LineNr"> 44 </span>$run-main: -<span id="L45" class="LineNr"> 45 </span> <span class="Comment"># push arg</span> +<span id="L45" class="LineNr"> 45 </span> <span class="Comment"># push args</span> <span id="L46" class="LineNr"> 46 </span> 68/push 5/imm32 <span id="L47" class="LineNr"> 47 </span> <span class="Comment"># call</span> <span id="L48" class="LineNr"> 48 </span> e8/call factorial/disp32 -<span id="L49" class="LineNr"> 49 </span> <span class="Comment"># discard arg</span> +<span id="L49" class="LineNr"> 49 </span> <span class="Comment"># discard args</span> <span id="L50" class="LineNr"> 50 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> 4/imm32 <span class="Comment"># add to ESP</span> <span id="L51" class="LineNr"> 51 </span>$main:end: <span id="L52" class="LineNr"> 52 </span> <span class="Comment"># exit(EAX)</span> @@ -129,7 +129,7 @@ if ('onhashchange' in window) { <span id="L73" class="LineNr"> 73 </span> 53/push-EBX <span id="L74" class="LineNr"> 74 </span> <span class="Comment"># call</span> <span id="L75" class="LineNr"> 75 </span> e8/call factorial/disp32 -<span id="L76" class="LineNr"> 76 </span> <span class="Comment"># discard arg</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Comment"># discard args</span> <span id="L77" class="LineNr"> 77 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> 4/imm32 <span class="Comment"># add to ESP</span> <span id="L78" class="LineNr"> 78 </span> <span class="Comment"># return n * factorial(n-1)</span> <span id="L79" class="LineNr"> 79 </span> f7 4/subop/multiply 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none 8/disp8 <span class="Delimiter"> . </span> <span class="Comment"># multiply *(EBP+8) into EAX</span> @@ -143,11 +143,11 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span> <span id="L88" class="LineNr"> 88 </span>test-factorial: <span id="L89" class="LineNr"> 89 </span> <span class="Comment"># factorial(5)</span> -<span id="L90" class="LineNr"> 90 </span> <span class="Comment"># push arg</span> +<span id="L90" class="LineNr"> 90 </span> <span class="Comment"># push args</span> <span id="L91" class="LineNr"> 91 </span> 68/push 5/imm32 <span id="L92" class="LineNr"> 92 </span> <span class="Comment"># call</span> <span id="L93" class="LineNr"> 93 </span> e8/call factorial/disp32 -<span id="L94" class="LineNr"> 94 </span> <span class="Comment"># discard arg</span> +<span id="L94" class="LineNr"> 94 </span> <span class="Comment"># discard args</span> <span id="L95" class="LineNr"> 95 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> <span class="Delimiter"> . </span> 4/imm32 <span class="Comment"># add to ESP</span> <span id="L96" class="LineNr"> 96 </span> <span class="Comment"># check-ints-equal(EAX, 120, failure message)</span> <span id="L97" class="LineNr"> 97 </span> <span class="Comment"># push args</span> |