diff options
Diffstat (limited to 'html/subx/apps')
-rw-r--r-- | html/subx/apps/crenshaw2-1.subx.html | 28 | ||||
-rw-r--r-- | html/subx/apps/crenshaw2-1b.subx.html | 34 | ||||
-rw-r--r-- | html/subx/apps/factorial.subx.html | 4 |
3 files changed, 33 insertions, 33 deletions
diff --git a/html/subx/apps/crenshaw2-1.subx.html b/html/subx/apps/crenshaw2-1.subx.html index 122254e1..37ea2738 100644 --- a/html/subx/apps/crenshaw2-1.subx.html +++ b/html/subx/apps/crenshaw2-1.subx.html @@ -113,7 +113,7 @@ if ('onhashchange' in window) { <span id="L51" class="LineNr"> 51 </span> <span class="subxS1Comment"># . run-tests()</span> <span id="L52" class="LineNr"> 52 </span> e8/call run-tests/disp32 <span id="L53" class="LineNr"> 53 </span><span class="CommentedCode">#? e8/call test-get-num-reads-multiple-digits/disp32</span> -<span id="L54" class="LineNr"> 54 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="SpecialChar"> Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EBX</span> +<span id="L54" class="LineNr"> 54 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="SpecialChar">Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EBX</span> <span id="L55" class="LineNr"> 55 </span> eb/jump $main:end/disp8 <span id="L56" class="LineNr"> 56 </span>$run-main: <span id="L57" class="LineNr"> 57 </span> <span class="subxH1Comment"># - otherwise read a program from stdin and emit its translation to stdout</span> @@ -128,7 +128,7 @@ if ('onhashchange' in window) { <span id="L66" class="LineNr"> 66 </span> 50/push-EAX/ed <span id="L67" class="LineNr"> 67 </span> 68/push 2/imm32/stderr <span id="L68" class="LineNr"> 68 </span> 68/push 1/imm32/stdout -<span id="L69" class="LineNr"> 69 </span> 68/push <span class="SpecialChar"> Stdin</span>/imm32 +<span id="L69" class="LineNr"> 69 </span> 68/push <span class="SpecialChar">Stdin</span>/imm32 <span id="L70" class="LineNr"> 70 </span> <span class="subxS2Comment"># . . call</span> <span id="L71" class="LineNr"> 71 </span> e8/call compile/disp32 <span id="L72" class="LineNr"> 72 </span> <span class="subxS2Comment"># . . discard args</span> @@ -203,7 +203,7 @@ if ('onhashchange' in window) { <span id="L141" class="LineNr">141 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L142" class="LineNr">142 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L143" class="LineNr">143 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L144" class="LineNr">144 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L144" class="LineNr">144 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L145" class="LineNr">145 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L146" class="LineNr">146 </span> <span class="subxS2Comment"># . . call</span> <span id="L147" class="LineNr">147 </span> e8/call write/disp32 @@ -219,7 +219,7 @@ if ('onhashchange' in window) { <span id="L157" class="LineNr">157 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L158" class="LineNr">158 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L159" class="LineNr">159 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L160" class="LineNr">160 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L160" class="LineNr">160 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L161" class="LineNr">161 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L162" class="LineNr">162 </span> <span class="subxS2Comment"># . . call</span> <span id="L163" class="LineNr">163 </span> e8/call write/disp32 @@ -235,7 +235,7 @@ if ('onhashchange' in window) { <span id="L173" class="LineNr">173 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L174" class="LineNr">174 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L175" class="LineNr">175 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L176" class="LineNr">176 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L176" class="LineNr">176 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L177" class="LineNr">177 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L178" class="LineNr">178 </span> <span class="subxS2Comment"># . . call</span> <span id="L179" class="LineNr">179 </span> e8/call write/disp32 @@ -279,7 +279,7 @@ if ('onhashchange' in window) { <span id="L217" class="LineNr">217 </span> <span class="subxH1Comment"># - if is-digit?(Look) expected(ed, err, "integer")</span> <span id="L218" class="LineNr">218 </span> <span class="subxS1Comment"># . EAX = is-digit?(Look)</span> <span id="L219" class="LineNr">219 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L220" class="LineNr">220 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> +<span id="L220" class="LineNr">220 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> <span id="L221" class="LineNr">221 </span> <span class="subxS2Comment"># . . call</span> <span id="L222" class="LineNr">222 </span> e8/call is-digit?/disp32 <span id="L223" class="LineNr">223 </span> <span class="subxS2Comment"># . . discard args</span> @@ -329,7 +329,7 @@ if ('onhashchange' in window) { <span id="L267" class="LineNr">267 </span>$get-num:stage2: <span id="L268" class="LineNr">268 </span> <span class="subxComment"># out->data[out->write] = LSB(Look)</span> <span id="L269" class="LineNr">269 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/EDI 1/index/ECX <span class="CommentedCode"> . </span> 3/r32/EBX 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EDI+ECX+12 to EBX</span> -<span id="L270" class="LineNr">270 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Look to EAX</span> +<span id="L270" class="LineNr">270 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Look to EAX</span> <span id="L271" class="LineNr">271 </span> 88/copy-byte 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/AL <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy byte at AL to *EBX</span> <span id="L272" class="LineNr">272 </span> <span class="subxComment"># ++out->write</span> <span id="L273" class="LineNr">273 </span> 41/increment-ECX @@ -433,7 +433,7 @@ if ('onhashchange' in window) { <span id="L371" class="LineNr">371 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0x10/imm32 <span class="subxComment"># add to ESP</span> <span id="L372" class="LineNr">372 </span> <span class="subxComment"># check-ints-equal(*_test-output-stream.data, '3')</span> <span id="L373" class="LineNr">373 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L374" class="LineNr">374 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-reads-single-digit"/imm32 +<span id="L374" class="LineNr">374 </span> 68/push <span class="Constant">"F - test-get-num-reads-single-digit"</span>/imm32 <span id="L375" class="LineNr">375 </span> 68/push 0x33/imm32 <span id="L376" class="LineNr">376 </span> b8/copy-to-EAX _test-output-stream/imm32 <span id="L377" class="LineNr">377 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+12)</span> @@ -518,7 +518,7 @@ if ('onhashchange' in window) { <span id="L456" class="LineNr">456 </span> <span class="subxComment"># check that get-num tried to call exit(1)</span> <span id="L457" class="LineNr">457 </span> <span class="subxS1Comment"># . check-ints-equal(ed->value, 2, msg) # i.e. stop was called with value 1</span> <span id="L458" class="LineNr">458 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L459" class="LineNr">459 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-aborts-on-non-digit-in-Look"/imm32 +<span id="L459" class="LineNr">459 </span> 68/push <span class="Constant">"F - test-get-num-aborts-on-non-digit-in-Look"</span>/imm32 <span id="L460" class="LineNr">460 </span> 68/push 2/imm32 <span id="L461" class="LineNr">461 </span> <span class="subxS2Comment"># . . push ed->value</span> <span id="L462" class="LineNr">462 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+4)</span> @@ -540,7 +540,7 @@ if ('onhashchange' in window) { <span id="L478" class="LineNr">478 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/r32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L479" class="LineNr">479 </span> <span class="subxComment"># write(f, "Error: ")</span> <span id="L480" class="LineNr">480 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L481" class="LineNr">481 </span> 68/push <span class="SpecialChar">"Error</span>: "/imm32 +<span id="L481" class="LineNr">481 </span> 68/push <span class="Constant">"Error: "</span>/imm32 <span id="L482" class="LineNr">482 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L483" class="LineNr">483 </span> <span class="subxS2Comment"># . . call</span> <span id="L484" class="LineNr">484 </span> e8/call write/disp32 @@ -564,7 +564,7 @@ if ('onhashchange' in window) { <span id="L502" class="LineNr">502 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L503" class="LineNr">503 </span> <span class="subxComment"># write(f, Newline)</span> <span id="L504" class="LineNr">504 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L505" class="LineNr">505 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L505" class="LineNr">505 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L506" class="LineNr">506 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L507" class="LineNr">507 </span> <span class="subxS2Comment"># . . call</span> <span id="L508" class="LineNr">508 </span> e8/call write/disp32 @@ -589,7 +589,7 @@ if ('onhashchange' in window) { <span id="L527" class="LineNr">527 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/r32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L528" class="LineNr">528 </span> <span class="subxComment"># write(f, "Error: ")</span> <span id="L529" class="LineNr">529 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L530" class="LineNr">530 </span> 68/push <span class="SpecialChar">"Error</span>: "/imm32 +<span id="L530" class="LineNr">530 </span> 68/push <span class="Constant">"Error: "</span>/imm32 <span id="L531" class="LineNr">531 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L532" class="LineNr">532 </span> <span class="subxS2Comment"># . . call</span> <span id="L533" class="LineNr">533 </span> e8/call write/disp32 @@ -605,7 +605,7 @@ if ('onhashchange' in window) { <span id="L543" class="LineNr">543 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L544" class="LineNr">544 </span> <span class="subxComment"># write(f, Newline)</span> <span id="L545" class="LineNr">545 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L546" class="LineNr">546 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L546" class="LineNr">546 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L547" class="LineNr">547 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L548" class="LineNr">548 </span> <span class="subxS2Comment"># . . call</span> <span id="L549" class="LineNr">549 </span> e8/call write/disp32 @@ -638,7 +638,7 @@ if ('onhashchange' in window) { <span id="L576" class="LineNr">576 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L577" class="LineNr">577 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> <span id="L578" class="LineNr">578 </span> <span class="subxComment"># save EAX to Look</span> -<span id="L579" class="LineNr">579 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *Look</span> +<span id="L579" class="LineNr">579 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *Look</span> <span id="L580" class="LineNr">580 </span> <span class="subxS1Comment"># . restore registers</span> <span id="L581" class="LineNr">581 </span> 58/pop-to-EAX <span id="L582" class="LineNr">582 </span> <span class="subxS1Comment"># . epilog</span> diff --git a/html/subx/apps/crenshaw2-1b.subx.html b/html/subx/apps/crenshaw2-1b.subx.html index 2d5015b9..20439c1a 100644 --- a/html/subx/apps/crenshaw2-1b.subx.html +++ b/html/subx/apps/crenshaw2-1b.subx.html @@ -113,7 +113,7 @@ if ('onhashchange' in window) { <span id="L51" class="LineNr"> 51 </span> <span class="subxS1Comment"># . run-tests()</span> <span id="L52" class="LineNr"> 52 </span> e8/call run-tests/disp32 <span id="L53" class="LineNr"> 53 </span><span class="CommentedCode">#? e8/call test-get-num-reads-multiple-digits/disp32</span> -<span id="L54" class="LineNr"> 54 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="SpecialChar"> Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EBX</span> +<span id="L54" class="LineNr"> 54 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="SpecialChar">Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EBX</span> <span id="L55" class="LineNr"> 55 </span> eb/jump $main:end/disp8 <span id="L56" class="LineNr"> 56 </span>$run-main: <span id="L57" class="LineNr"> 57 </span> <span class="subxH1Comment"># - otherwise read a program from stdin and emit its translation to stdout</span> @@ -128,7 +128,7 @@ if ('onhashchange' in window) { <span id="L66" class="LineNr"> 66 </span> 50/push-EAX/ed <span id="L67" class="LineNr"> 67 </span> 68/push 2/imm32/stderr <span id="L68" class="LineNr"> 68 </span> 68/push 1/imm32/stdout -<span id="L69" class="LineNr"> 69 </span> 68/push <span class="SpecialChar"> Stdin</span>/imm32 +<span id="L69" class="LineNr"> 69 </span> 68/push <span class="SpecialChar">Stdin</span>/imm32 <span id="L70" class="LineNr"> 70 </span> <span class="subxS2Comment"># . . call</span> <span id="L71" class="LineNr"> 71 </span> e8/call compile/disp32 <span id="L72" class="LineNr"> 72 </span> <span class="subxS2Comment"># . . discard args</span> @@ -204,7 +204,7 @@ if ('onhashchange' in window) { <span id="L142" class="LineNr">142 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L143" class="LineNr">143 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L144" class="LineNr">144 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L145" class="LineNr">145 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L145" class="LineNr">145 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L146" class="LineNr">146 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L147" class="LineNr">147 </span> <span class="subxS2Comment"># . . call</span> <span id="L148" class="LineNr">148 </span> e8/call write/disp32 @@ -220,7 +220,7 @@ if ('onhashchange' in window) { <span id="L158" class="LineNr">158 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L159" class="LineNr">159 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L160" class="LineNr">160 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L161" class="LineNr">161 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L161" class="LineNr">161 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L162" class="LineNr">162 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L163" class="LineNr">163 </span> <span class="subxS2Comment"># . . call</span> <span id="L164" class="LineNr">164 </span> e8/call write/disp32 @@ -236,7 +236,7 @@ if ('onhashchange' in window) { <span id="L174" class="LineNr">174 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L175" class="LineNr">175 </span> <span class="subxS1Comment"># . write(out, Newline)</span> <span id="L176" class="LineNr">176 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L177" class="LineNr">177 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L177" class="LineNr">177 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L178" class="LineNr">178 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L179" class="LineNr">179 </span> <span class="subxS2Comment"># . . call</span> <span id="L180" class="LineNr">180 </span> e8/call write/disp32 @@ -285,7 +285,7 @@ if ('onhashchange' in window) { <span id="L223" class="LineNr">223 </span> <span class="subxH1Comment"># - if is-digit?(Look) expected(ed, err, "integer")</span> <span id="L224" class="LineNr">224 </span> <span class="subxS1Comment"># . EAX = is-digit?(Look)</span> <span id="L225" class="LineNr">225 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L226" class="LineNr">226 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> +<span id="L226" class="LineNr">226 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> <span id="L227" class="LineNr">227 </span> <span class="subxS2Comment"># . . call</span> <span id="L228" class="LineNr">228 </span> e8/call is-digit?/disp32 <span id="L229" class="LineNr">229 </span> <span class="subxS2Comment"># . . discard args</span> @@ -336,7 +336,7 @@ if ('onhashchange' in window) { <span id="L274" class="LineNr">274 </span>$get-num:loop-stage2: <span id="L275" class="LineNr">275 </span> <span class="subxComment"># out->data[out->write] = LSB(Look)</span> <span id="L276" class="LineNr">276 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/EDI 1/index/ECX <span class="CommentedCode"> . </span> 3/r32/EBX 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EDI+ECX+12 to EBX</span> -<span id="L277" class="LineNr">277 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Look to EAX</span> +<span id="L277" class="LineNr">277 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Look to EAX</span> <span id="L278" class="LineNr">278 </span> 88/copy-byte 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/AL <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy byte at AL to *EBX</span> <span id="L279" class="LineNr">279 </span> <span class="subxComment"># ++out->write</span> <span id="L280" class="LineNr">280 </span> 41/increment-ECX @@ -350,7 +350,7 @@ if ('onhashchange' in window) { <span id="L288" class="LineNr">288 </span> <span class="subxComment"># if is-digit?(Look) loop</span> <span id="L289" class="LineNr">289 </span> <span class="subxS1Comment"># . EAX = is-digit?(Look)</span> <span id="L290" class="LineNr">290 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L291" class="LineNr">291 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> +<span id="L291" class="LineNr">291 </span> ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># push *Look</span> <span id="L292" class="LineNr">292 </span> <span class="subxS2Comment"># . . call</span> <span id="L293" class="LineNr">293 </span> e8/call is-digit?/disp32 <span id="L294" class="LineNr">294 </span> <span class="subxS2Comment"># . . discard args</span> @@ -451,7 +451,7 @@ if ('onhashchange' in window) { <span id="L389" class="LineNr">389 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0x10/imm32 <span class="subxComment"># add to ESP</span> <span id="L390" class="LineNr">390 </span> <span class="subxComment"># check-ints-equal(*_test-output-stream.data, '3')</span> <span id="L391" class="LineNr">391 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L392" class="LineNr">392 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-reads-single-digit"/imm32 +<span id="L392" class="LineNr">392 </span> 68/push <span class="Constant">"F - test-get-num-reads-single-digit"</span>/imm32 <span id="L393" class="LineNr">393 </span> 68/push 0x33/imm32 <span id="L394" class="LineNr">394 </span> b8/copy-to-EAX _test-output-stream/imm32 <span id="L395" class="LineNr">395 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+12)</span> @@ -536,7 +536,7 @@ if ('onhashchange' in window) { <span id="L474" class="LineNr">474 </span> <span class="subxComment"># check that get-num tried to call exit(1)</span> <span id="L475" class="LineNr">475 </span> <span class="subxS1Comment"># . check-ints-equal(ed->value, 2, msg) # i.e. stop was called with value 1</span> <span id="L476" class="LineNr">476 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L477" class="LineNr">477 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-aborts-on-non-digit-in-Look"/imm32 +<span id="L477" class="LineNr">477 </span> 68/push <span class="Constant">"F - test-get-num-aborts-on-non-digit-in-Look"</span>/imm32 <span id="L478" class="LineNr">478 </span> 68/push 2/imm32 <span id="L479" class="LineNr">479 </span> <span class="subxS2Comment"># . . push ed->value</span> <span id="L480" class="LineNr">480 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+4)</span> @@ -627,7 +627,7 @@ if ('onhashchange' in window) { <span id="L565" class="LineNr">565 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0x10/imm32 <span class="subxComment"># add to ESP</span> <span id="L566" class="LineNr">566 </span> <span class="subxComment"># check-ints-equal(*_test-output-stream.data, '3456')</span> <span id="L567" class="LineNr">567 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L568" class="LineNr">568 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-reads-multiple-digits"/imm32 +<span id="L568" class="LineNr">568 </span> 68/push <span class="Constant">"F - test-get-num-reads-multiple-digits"</span>/imm32 <span id="L569" class="LineNr">569 </span> 68/push 0x36353433/imm32 <span id="L570" class="LineNr">570 </span> b8/copy-to-EAX _test-output-stream/imm32 <span id="L571" class="LineNr">571 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+12)</span> @@ -718,7 +718,7 @@ if ('onhashchange' in window) { <span id="L656" class="LineNr">656 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0x10/imm32 <span class="subxComment"># add to ESP</span> <span id="L657" class="LineNr">657 </span> <span class="subxComment"># check-ints-equal(*_test-output-stream.data, '3456')</span> <span id="L658" class="LineNr">658 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L659" class="LineNr">659 </span> 68/push <span class="SpecialChar">"F</span> - test-get-num-reads-multiple-digits-followed-by-nondigit"/imm32 +<span id="L659" class="LineNr">659 </span> 68/push <span class="Constant">"F - test-get-num-reads-multiple-digits-followed-by-nondigit"</span>/imm32 <span id="L660" class="LineNr">660 </span> 68/push 0x36353433/imm32 <span id="L661" class="LineNr">661 </span> b8/copy-to-EAX _test-output-stream/imm32 <span id="L662" class="LineNr">662 </span> ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EAX+12)</span> @@ -740,7 +740,7 @@ if ('onhashchange' in window) { <span id="L678" class="LineNr">678 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/r32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L679" class="LineNr">679 </span> <span class="subxComment"># write(f, "Error: ")</span> <span id="L680" class="LineNr">680 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L681" class="LineNr">681 </span> 68/push <span class="SpecialChar">"Error</span>: "/imm32 +<span id="L681" class="LineNr">681 </span> 68/push <span class="Constant">"Error: "</span>/imm32 <span id="L682" class="LineNr">682 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L683" class="LineNr">683 </span> <span class="subxS2Comment"># . . call</span> <span id="L684" class="LineNr">684 </span> e8/call write/disp32 @@ -764,7 +764,7 @@ if ('onhashchange' in window) { <span id="L702" class="LineNr">702 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L703" class="LineNr">703 </span> <span class="subxComment"># write(f, Newline)</span> <span id="L704" class="LineNr">704 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L705" class="LineNr">705 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L705" class="LineNr">705 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L706" class="LineNr">706 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L707" class="LineNr">707 </span> <span class="subxS2Comment"># . . call</span> <span id="L708" class="LineNr">708 </span> e8/call write/disp32 @@ -789,7 +789,7 @@ if ('onhashchange' in window) { <span id="L727" class="LineNr">727 </span> 89/copy 3/mod/direct 5/rm32/EBP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/r32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy ESP to EBP</span> <span id="L728" class="LineNr">728 </span> <span class="subxComment"># write(f, "Error: ")</span> <span id="L729" class="LineNr">729 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L730" class="LineNr">730 </span> 68/push <span class="SpecialChar">"Error</span>: "/imm32 +<span id="L730" class="LineNr">730 </span> 68/push <span class="Constant">"Error: "</span>/imm32 <span id="L731" class="LineNr">731 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L732" class="LineNr">732 </span> <span class="subxS2Comment"># . . call</span> <span id="L733" class="LineNr">733 </span> e8/call write/disp32 @@ -805,7 +805,7 @@ if ('onhashchange' in window) { <span id="L743" class="LineNr">743 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/imm32 <span class="subxComment"># add to ESP</span> <span id="L744" class="LineNr">744 </span> <span class="subxComment"># write(f, Newline)</span> <span id="L745" class="LineNr">745 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L746" class="LineNr">746 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L746" class="LineNr">746 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L747" class="LineNr">747 </span> ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># push *(EBP+12)</span> <span id="L748" class="LineNr">748 </span> <span class="subxS2Comment"># . . call</span> <span id="L749" class="LineNr">749 </span> e8/call write/disp32 @@ -838,7 +838,7 @@ if ('onhashchange' in window) { <span id="L776" class="LineNr">776 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L777" class="LineNr">777 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> <span id="L778" class="LineNr">778 </span> <span class="subxComment"># save EAX to Look</span> -<span id="L779" class="LineNr">779 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *Look</span> +<span id="L779" class="LineNr">779 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Look</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *Look</span> <span id="L780" class="LineNr">780 </span> <span class="subxS1Comment"># . restore registers</span> <span id="L781" class="LineNr">781 </span> 58/pop-to-EAX <span id="L782" class="LineNr">782 </span> <span class="subxS1Comment"># . epilog</span> diff --git a/html/subx/apps/factorial.subx.html b/html/subx/apps/factorial.subx.html index 3ae32e83..61c6854a 100644 --- a/html/subx/apps/factorial.subx.html +++ b/html/subx/apps/factorial.subx.html @@ -101,7 +101,7 @@ if ('onhashchange' in window) { <span id="L39" class="LineNr"> 39 </span> 75/jump-if-not-equal $run-main/disp8 <span id="L40" class="LineNr"> 40 </span> <span class="subxS1Comment"># . run-tests()</span> <span id="L41" class="LineNr"> 41 </span> e8/call run-tests/disp32 -<span id="L42" class="LineNr"> 42 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EAX</span> +<span id="L42" class="LineNr"> 42 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Num-test-failures</span>/disp32 <span class="subxComment"># copy *Num-test-failures to EAX</span> <span id="L43" class="LineNr"> 43 </span> eb/jump $main:end/disp8 <span class="subxComment"># where EAX will get copied to EBX</span> <span id="L44" class="LineNr"> 44 </span> <span class="subxH1Comment"># - otherwise return factorial(5)</span> <span id="L45" class="LineNr"> 45 </span>$run-main: @@ -157,7 +157,7 @@ if ('onhashchange' in window) { <span id="L95" class="LineNr"> 95 </span> 81 0/subop/add 3/mod/direct 4/rm32/ESP <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 4/imm32 <span class="subxComment"># add to ESP</span> <span id="L96" class="LineNr"> 96 </span> <span class="subxComment"># check-ints-equal(EAX, 120, failure message)</span> <span id="L97" class="LineNr"> 97 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L98" class="LineNr"> 98 </span> 68/push <span class="SpecialChar">"F</span> - test-factorial"/imm32 +<span id="L98" class="LineNr"> 98 </span> 68/push <span class="Constant">"F - test-factorial"</span>/imm32 <span id="L99" class="LineNr"> 99 </span> 68/push 0x78/imm32/expected-120 <span id="L100" class="LineNr">100 </span> 50/push-EAX <span id="L101" class="LineNr">101 </span> <span class="subxS2Comment"># . . call</span> |