diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-11-30 20:01:41 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-11-30 20:01:41 -0800 |
commit | c6f522007de6f96e79d52ae9db2e23333c318c8f (patch) | |
tree | 545d6db816273a4099c45bc854728e2e13421449 | |
parent | 87c606ee062077f51c37e819e458ddf9a6ef8bc9 (diff) | |
download | mu-c6f522007de6f96e79d52ae9db2e23333c318c8f.tar.gz |
4811
-rw-r--r-- | html/subx/051test.subx.html | 4 | ||||
-rw-r--r-- | html/subx/052kernel_string_equal.subx.html | 40 | ||||
-rw-r--r-- | html/subx/054string_equal.subx.html | 20 | ||||
-rw-r--r-- | html/subx/055trace.subx.html | 18 | ||||
-rw-r--r-- | html/subx/056write.subx.html | 15 | ||||
-rw-r--r-- | html/subx/057stop.subx.html | 7 | ||||
-rw-r--r-- | html/subx/058read.subx.html | 19 | ||||
-rw-r--r-- | html/subx/059read-byte.subx.html | 13 | ||||
-rw-r--r-- | html/subx/060write-stream.subx.html | 13 | ||||
-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 | ||||
-rw-r--r-- | html/subx/examples/ex11.subx.html | 40 | ||||
-rw-r--r-- | html/subx/examples/ex12.subx.html | 2 | ||||
-rw-r--r-- | html/subx/examples/ex4.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex6.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex7.subx.html | 26 | ||||
-rw-r--r-- | subx/subx.vim | 5 |
18 files changed, 151 insertions, 145 deletions
diff --git a/html/subx/051test.subx.html b/html/subx/051test.subx.html index d528662b..cf87bbb0 100644 --- a/html/subx/051test.subx.html +++ b/html/subx/051test.subx.html @@ -118,14 +118,14 @@ if ('onhashchange' in window) { <span id="L57" class="LineNr">57 </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="L58" class="LineNr">58 </span> <span class="subxS1Comment"># . _write(2/stderr, Newline)</span> <span id="L59" class="LineNr">59 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L60" class="LineNr">60 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L60" class="LineNr">60 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L61" class="LineNr">61 </span> 68/push 2/imm32/stderr <span id="L62" class="LineNr">62 </span> <span class="subxS2Comment"># . . call</span> <span id="L63" class="LineNr">63 </span> e8/call _write/disp32 <span id="L64" class="LineNr">64 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L65" class="LineNr">65 </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="L66" class="LineNr">66 </span> <span class="subxComment"># increment Num-test-failures</span> -<span id="L67" class="LineNr">67 </span> ff 0/subop/increment 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar"> Num-test-failures</span>/disp32 <span class="subxComment"># increment *Num-test-failures</span> +<span id="L67" class="LineNr">67 </span> ff 0/subop/increment 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="SpecialChar">Num-test-failures</span>/disp32 <span class="subxComment"># increment *Num-test-failures</span> <span id="L68" class="LineNr">68 </span>$check-ints-equal:end: <span id="L69" class="LineNr">69 </span> <span class="subxS1Comment"># . restore registers</span> <span id="L70" class="LineNr">70 </span> 5b/pop-to-EBX diff --git a/html/subx/052kernel_string_equal.subx.html b/html/subx/052kernel_string_equal.subx.html index 48efe02d..ae0840b8 100644 --- a/html/subx/052kernel_string_equal.subx.html +++ b/html/subx/052kernel_string_equal.subx.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L22" class="LineNr"> 22 </span><span class="subxComment"># main:</span> <span id="L23" class="LineNr"> 23 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L24" class="LineNr"> 24 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L25" class="LineNr"> 25 </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="L25" class="LineNr"> 25 </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="L26" class="LineNr"> 26 </span> b8/copy-to-EAX 1/imm32 <span id="L27" class="LineNr"> 27 </span> cd/syscall 0x80/imm8 <span id="L28" class="LineNr"> 28 </span> @@ -177,14 +177,14 @@ if ('onhashchange' in window) { <span id="L115" class="LineNr">115 </span> <span class="subxComment"># EAX = kernel-string-equal(Null-kernel-string, "")</span> <span id="L116" class="LineNr">116 </span> <span class="subxS2Comment"># . . push args</span> <span id="L117" class="LineNr">117 </span> 68/push <span class="Constant">""</span>/imm32 -<span id="L118" class="LineNr">118 </span> 68/push <span class="SpecialChar"> Null-kernel-string</span>/imm32 +<span id="L118" class="LineNr">118 </span> 68/push <span class="SpecialChar">Null-kernel-string</span>/imm32 <span id="L119" class="LineNr">119 </span> <span class="subxS2Comment"># . . call</span> <span id="L120" class="LineNr">120 </span> e8/call kernel-string-equal/disp32 <span id="L121" class="LineNr">121 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L122" class="LineNr">122 </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="L123" class="LineNr">123 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L124" class="LineNr">124 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L125" class="LineNr">125 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-null-kernel-string-with-empty-array"/imm32 +<span id="L125" class="LineNr">125 </span> 68/push <span class="Constant">"F - test-compare-null-kernel-string-with-empty-array"</span>/imm32 <span id="L126" class="LineNr">126 </span> 68/push 1/imm32/true <span id="L127" class="LineNr">127 </span> 50/push-EAX <span id="L128" class="LineNr">128 </span> <span class="subxS2Comment"># . . call</span> @@ -196,15 +196,15 @@ if ('onhashchange' in window) { <span id="L134" class="LineNr">134 </span>test-compare-null-kernel-string-with-non-empty-array: <span id="L135" class="LineNr">135 </span> <span class="subxComment"># EAX = kernel-string-equal(Null-kernel-string, "Abc")</span> <span id="L136" class="LineNr">136 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L137" class="LineNr">137 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 -<span id="L138" class="LineNr">138 </span> 68/push <span class="SpecialChar"> Null-kernel-string</span>/imm32 +<span id="L137" class="LineNr">137 </span> 68/push <span class="Constant">"Abc"</span>/imm32 +<span id="L138" class="LineNr">138 </span> 68/push <span class="SpecialChar">Null-kernel-string</span>/imm32 <span id="L139" class="LineNr">139 </span> <span class="subxS2Comment"># . . call</span> <span id="L140" class="LineNr">140 </span> e8/call kernel-string-equal/disp32 <span id="L141" class="LineNr">141 </span> <span class="subxS2Comment"># . . discard args</span> <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="subxComment"># check-ints-equal(EAX, 0, msg)</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">"F</span> - test-compare-null-kernel-string-with-non-empty-array"/imm32 +<span id="L145" class="LineNr">145 </span> 68/push <span class="Constant">"F - test-compare-null-kernel-string-with-non-empty-array"</span>/imm32 <span id="L146" class="LineNr">146 </span> 68/push 0/imm32/false <span id="L147" class="LineNr">147 </span> 50/push-EAX <span id="L148" class="LineNr">148 </span> <span class="subxS2Comment"># . . call</span> @@ -216,15 +216,15 @@ if ('onhashchange' in window) { <span id="L154" class="LineNr">154 </span>test-compare-kernel-string-with-equal-array: <span id="L155" class="LineNr">155 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Abc")</span> <span id="L156" class="LineNr">156 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L157" class="LineNr">157 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 -<span id="L158" class="LineNr">158 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L157" class="LineNr">157 </span> 68/push <span class="Constant">"Abc"</span>/imm32 +<span id="L158" class="LineNr">158 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L159" class="LineNr">159 </span> <span class="subxS2Comment"># . . call</span> <span id="L160" class="LineNr">160 </span> e8/call kernel-string-equal/disp32 <span id="L161" class="LineNr">161 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L162" class="LineNr">162 </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="L163" class="LineNr">163 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L164" class="LineNr">164 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L165" class="LineNr">165 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L165" class="LineNr">165 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L166" class="LineNr">166 </span> 68/push 1/imm32/true <span id="L167" class="LineNr">167 </span> 50/push-EAX <span id="L168" class="LineNr">168 </span> <span class="subxS2Comment"># . . call</span> @@ -236,15 +236,15 @@ if ('onhashchange' in window) { <span id="L174" class="LineNr">174 </span>test-compare-kernel-string-with-inequal-array: <span id="L175" class="LineNr">175 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Adc")</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">"Adc</span>"/imm32 -<span id="L178" class="LineNr">178 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L177" class="LineNr">177 </span> 68/push <span class="Constant">"Adc"</span>/imm32 +<span id="L178" class="LineNr">178 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L179" class="LineNr">179 </span> <span class="subxS2Comment"># . . call</span> <span id="L180" class="LineNr">180 </span> e8/call kernel-string-equal/disp32 <span id="L181" class="LineNr">181 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L182" class="LineNr">182 </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="L183" class="LineNr">183 </span> <span class="subxComment"># check-ints-equal(EAX, 0, msg)</span> <span id="L184" class="LineNr">184 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L185" class="LineNr">185 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L185" class="LineNr">185 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L186" class="LineNr">186 </span> 68/push 0/imm32/false <span id="L187" class="LineNr">187 </span> 50/push-EAX <span id="L188" class="LineNr">188 </span> <span class="subxS2Comment"># . . call</span> @@ -257,14 +257,14 @@ if ('onhashchange' in window) { <span id="L195" class="LineNr">195 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "")</span> <span id="L196" class="LineNr">196 </span> <span class="subxS2Comment"># . . push args</span> <span id="L197" class="LineNr">197 </span> 68/push <span class="Constant">""</span>/imm32 -<span id="L198" class="LineNr">198 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L198" class="LineNr">198 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L199" class="LineNr">199 </span> <span class="subxS2Comment"># . . call</span> <span id="L200" class="LineNr">200 </span> e8/call kernel-string-equal/disp32 <span id="L201" class="LineNr">201 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L202" class="LineNr">202 </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="L203" class="LineNr">203 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L204" class="LineNr">204 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L205" class="LineNr">205 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L205" class="LineNr">205 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L206" class="LineNr">206 </span> 68/push 0/imm32/false <span id="L207" class="LineNr">207 </span> 50/push-EAX <span id="L208" class="LineNr">208 </span> <span class="subxS2Comment"># . . call</span> @@ -276,15 +276,15 @@ if ('onhashchange' in window) { <span id="L214" class="LineNr">214 </span>test-compare-kernel-string-with-shorter-array: <span id="L215" class="LineNr">215 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Ab")</span> <span id="L216" class="LineNr">216 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L217" class="LineNr">217 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 -<span id="L218" class="LineNr">218 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L217" class="LineNr">217 </span> 68/push <span class="Constant">"Ab"</span>/imm32 +<span id="L218" class="LineNr">218 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L219" class="LineNr">219 </span> <span class="subxS2Comment"># . . call</span> <span id="L220" class="LineNr">220 </span> e8/call kernel-string-equal/disp32 <span id="L221" class="LineNr">221 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L222" class="LineNr">222 </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="L223" class="LineNr">223 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L224" class="LineNr">224 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L225" class="LineNr">225 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-shorter-array"/imm32 +<span id="L225" class="LineNr">225 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-shorter-array"</span>/imm32 <span id="L226" class="LineNr">226 </span> 68/push 0/imm32/false <span id="L227" class="LineNr">227 </span> 50/push-EAX <span id="L228" class="LineNr">228 </span> <span class="subxS2Comment"># . . call</span> @@ -296,15 +296,15 @@ if ('onhashchange' in window) { <span id="L234" class="LineNr">234 </span>test-compare-kernel-string-with-longer-array: <span id="L235" class="LineNr">235 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Abcd")</span> <span id="L236" class="LineNr">236 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L237" class="LineNr">237 </span> 68/push <span class="SpecialChar">"Abcd</span>"/imm32 -<span id="L238" class="LineNr">238 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L237" class="LineNr">237 </span> 68/push <span class="Constant">"Abcd"</span>/imm32 +<span id="L238" class="LineNr">238 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L239" class="LineNr">239 </span> <span class="subxS2Comment"># . . call</span> <span id="L240" class="LineNr">240 </span> e8/call kernel-string-equal/disp32 <span id="L241" class="LineNr">241 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L242" class="LineNr">242 </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="L243" class="LineNr">243 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L244" class="LineNr">244 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L245" class="LineNr">245 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-longer-array"/imm32 +<span id="L245" class="LineNr">245 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-longer-array"</span>/imm32 <span id="L246" class="LineNr">246 </span> 68/push 0/imm32/false <span id="L247" class="LineNr">247 </span> 50/push-EAX <span id="L248" class="LineNr">248 </span> <span class="subxS2Comment"># . . call</span> diff --git a/html/subx/054string_equal.subx.html b/html/subx/054string_equal.subx.html index 814e60f0..657cce79 100644 --- a/html/subx/054string_equal.subx.html +++ b/html/subx/054string_equal.subx.html @@ -71,7 +71,7 @@ if ('onhashchange' in window) { <span id="L9" class="LineNr"> 9 </span> <span class="subxComment"># run-tests()</span> <span id="L10" class="LineNr"> 10 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L11" class="LineNr"> 11 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L12" class="LineNr"> 12 </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="L12" class="LineNr"> 12 </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="L13" class="LineNr"> 13 </span> b8/copy-to-EAX 1/imm32 <span id="L14" class="LineNr"> 14 </span> cd/syscall 0x80/imm8 <span id="L15" class="LineNr"> 15 </span> @@ -160,7 +160,7 @@ if ('onhashchange' in window) { <span id="L98" class="LineNr"> 98 </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="L99" class="LineNr"> 99 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L100" class="LineNr">100 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L101" class="LineNr">101 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-empty-with-empty-string"/imm32 +<span id="L101" class="LineNr">101 </span> 68/push <span class="Constant">"F - test-compare-empty-with-empty-string"</span>/imm32 <span id="L102" class="LineNr">102 </span> 68/push 1/imm32/true <span id="L103" class="LineNr">103 </span> 50/push-EAX <span id="L104" class="LineNr">104 </span> <span class="subxS2Comment"># . . call</span> @@ -172,7 +172,7 @@ if ('onhashchange' in window) { <span id="L110" class="LineNr">110 </span>test-compare-empty-with-non-empty-string: <span class="subxComment"># also checks length-mismatch code path</span> <span id="L111" class="LineNr">111 </span> <span class="subxComment"># EAX = string-equal("", "Abc")</span> <span id="L112" class="LineNr">112 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L113" class="LineNr">113 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 +<span id="L113" class="LineNr">113 </span> 68/push <span class="Constant">"Abc"</span>/imm32 <span id="L114" class="LineNr">114 </span> 68/push <span class="Constant">""</span>/imm32 <span id="L115" class="LineNr">115 </span> <span class="subxS2Comment"># . . call</span> <span id="L116" class="LineNr">116 </span> e8/call string-equal/disp32 @@ -180,7 +180,7 @@ if ('onhashchange' in window) { <span id="L118" class="LineNr">118 </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="L119" class="LineNr">119 </span> <span class="subxComment"># check-ints-equal(EAX, 0, msg)</span> <span id="L120" class="LineNr">120 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L121" class="LineNr">121 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-empty-with-non-empty-string"/imm32 +<span id="L121" class="LineNr">121 </span> 68/push <span class="Constant">"F - test-compare-empty-with-non-empty-string"</span>/imm32 <span id="L122" class="LineNr">122 </span> 68/push 0/imm32/false <span id="L123" class="LineNr">123 </span> 50/push-EAX <span id="L124" class="LineNr">124 </span> <span class="subxS2Comment"># . . call</span> @@ -192,15 +192,15 @@ if ('onhashchange' in window) { <span id="L130" class="LineNr">130 </span>test-compare-equal-strings: <span id="L131" class="LineNr">131 </span> <span class="subxComment"># EAX = string-equal("Abc", "Abc")</span> <span id="L132" class="LineNr">132 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L133" class="LineNr">133 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 -<span id="L134" class="LineNr">134 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 +<span id="L133" class="LineNr">133 </span> 68/push <span class="Constant">"Abc"</span>/imm32 +<span id="L134" class="LineNr">134 </span> 68/push <span class="Constant">"Abc"</span>/imm32 <span id="L135" class="LineNr">135 </span> <span class="subxS2Comment"># . . call</span> <span id="L136" class="LineNr">136 </span> e8/call string-equal/disp32 <span id="L137" class="LineNr">137 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L138" class="LineNr">138 </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="L139" class="LineNr">139 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L140" class="LineNr">140 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L141" class="LineNr">141 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-equal-strings"/imm32 +<span id="L141" class="LineNr">141 </span> 68/push <span class="Constant">"F - test-compare-equal-strings"</span>/imm32 <span id="L142" class="LineNr">142 </span> 68/push 1/imm32/true <span id="L143" class="LineNr">143 </span> 50/push-EAX <span id="L144" class="LineNr">144 </span> <span class="subxS2Comment"># . . call</span> @@ -212,15 +212,15 @@ if ('onhashchange' in window) { <span id="L150" class="LineNr">150 </span>test-compare-inequal-strings-equal-lengths: <span id="L151" class="LineNr">151 </span> <span class="subxComment"># EAX = string-equal("Abc", "Adc")</span> <span id="L152" class="LineNr">152 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L153" class="LineNr">153 </span> 68/push <span class="SpecialChar">"Adc</span>"/imm32 -<span id="L154" class="LineNr">154 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 +<span id="L153" class="LineNr">153 </span> 68/push <span class="Constant">"Adc"</span>/imm32 +<span id="L154" class="LineNr">154 </span> 68/push <span class="Constant">"Abc"</span>/imm32 <span id="L155" class="LineNr">155 </span> <span class="subxS2Comment"># . . call</span> <span id="L156" class="LineNr">156 </span> e8/call string-equal/disp32 <span id="L157" class="LineNr">157 </span> <span class="subxS2Comment"># . . discard args</span> <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="subxComment"># check-ints-equal(EAX, 0, msg)</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">"F</span> - test-compare-inequal-strings-equal-lengths"/imm32 +<span id="L161" class="LineNr">161 </span> 68/push <span class="Constant">"F - test-compare-inequal-strings-equal-lengths"</span>/imm32 <span id="L162" class="LineNr">162 </span> 68/push 0/imm32/false <span id="L163" class="LineNr">163 </span> 50/push-EAX <span id="L164" class="LineNr">164 </span> <span class="subxS2Comment"># . . call</span> diff --git a/html/subx/055trace.subx.html b/html/subx/055trace.subx.html index b83a95b2..b46b0a11 100644 --- a/html/subx/055trace.subx.html +++ b/html/subx/055trace.subx.html @@ -108,7 +108,7 @@ if ('onhashchange' in window) { <span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># run-tests()</span> <span id="L47" class="LineNr"> 47 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L49" class="LineNr"> 49 </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="L49" class="LineNr"> 49 </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="L50" class="LineNr"> 50 </span> b8/copy-to-EAX 1/imm32 <span id="L51" class="LineNr"> 51 </span> cd/syscall 0x80/imm8 <span id="L52" class="LineNr"> 52 </span> @@ -123,7 +123,7 @@ if ('onhashchange' in window) { <span id="L61" class="LineNr"> 61 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L62" class="LineNr"> 62 </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="L63" class="LineNr"> 63 </span> <span class="subxComment"># copy EAX to *Trace-stream</span> -<span id="L64" class="LineNr"> 64 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar"> Trace-stream</span>/disp32 <span class="subxComment"># copy EAX to *Trace-stream</span> +<span id="L64" class="LineNr"> 64 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="SpecialChar">Trace-stream</span>/disp32 <span class="subxComment"># copy EAX to *Trace-stream</span> <span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># Trace-stream.length = 0x1000/N - 12</span> <span id="L66" class="LineNr"> 66 </span> c7 0/copy 1/mod/*+disp8 0/rm32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 8/disp8 0xff4/imm32 <span class="subxComment"># copy 0xff4 to *(EAX+8)</span> <span id="L67" class="LineNr"> 67 </span> c3/return @@ -171,7 +171,7 @@ if ('onhashchange' in window) { <span id="L109" class="LineNr">109 </span> 8b/copy 0/mod/indirect 7/rm32/EDI <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 1/r32/ECX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EDI to ECX</span> <span id="L110" class="LineNr">110 </span> <span class="subxComment"># EAX = _append-3(&t->data[t->write], &t->data[t->length], line)</span> <span id="L111" class="LineNr">111 </span> <span class="subxS2Comment"># . . push line</span> -<span id="L112" class="LineNr">112 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L112" class="LineNr">112 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L113" class="LineNr">113 </span> <span class="subxS2Comment"># . . push &t->data[t->length]</span> <span id="L114" class="LineNr">114 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/EDI 2/index/EDX <span class="CommentedCode"> . </span> 3/r32/EBX 0xc/disp8 <span class="CommentedCode"> . </span> <span class="subxComment"># copy EDI+EDX+12 to EBX</span> <span id="L115" class="LineNr">115 </span> 53/push-EBX @@ -247,7 +247,7 @@ if ('onhashchange' in window) { <span id="L185" class="LineNr">185 </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="L186" class="LineNr">186 </span> <span class="subxComment"># trace(_test-trace-stream, "Ab")</span> <span id="L187" class="LineNr">187 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L188" class="LineNr">188 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L188" class="LineNr">188 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L189" class="LineNr">189 </span> 68/push _test-trace-stream/imm32 <span id="L190" class="LineNr">190 </span> <span class="subxS2Comment"># . . call</span> <span id="L191" class="LineNr">191 </span> e8/call trace/disp32 @@ -255,7 +255,7 @@ if ('onhashchange' in window) { <span id="L193" class="LineNr">193 </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="L194" class="LineNr">194 </span> <span class="subxComment"># check-ints-equal(*_test-trace-stream.data, 41/A 62/b 0a/newline 00, msg)</span> <span id="L195" class="LineNr">195 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L196" class="LineNr">196 </span> 68/push <span class="SpecialChar">"F</span> - test-trace-single"/imm32 +<span id="L196" class="LineNr">196 </span> 68/push <span class="Constant">"F - test-trace-single"</span>/imm32 <span id="L197" class="LineNr">197 </span> 68/push 0x0a6241/imm32/Ab-newline <span id="L198" class="LineNr">198 </span> <span class="subxS2Comment"># . . push *_test-trace-stream.data</span> <span id="L199" class="LineNr">199 </span> b8/copy-to-EAX _test-trace-stream/imm32 @@ -277,7 +277,7 @@ if ('onhashchange' in window) { <span id="L215" class="LineNr">215 </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="L216" class="LineNr">216 </span> <span class="subxComment"># trace(_test-trace-stream, "C")</span> <span id="L217" class="LineNr">217 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L218" class="LineNr">218 </span> 68/push <span class="SpecialChar">"C</span>"/imm32 +<span id="L218" class="LineNr">218 </span> 68/push <span class="Constant">"C"</span>/imm32 <span id="L219" class="LineNr">219 </span> 68/push _test-trace-stream/imm32 <span id="L220" class="LineNr">220 </span> <span class="subxS2Comment"># . . call</span> <span id="L221" class="LineNr">221 </span> e8/call trace/disp32 @@ -285,7 +285,7 @@ if ('onhashchange' in window) { <span id="L223" class="LineNr">223 </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="L224" class="LineNr">224 </span> <span class="subxComment"># trace(_test-trace-stream, "D")</span> <span id="L225" class="LineNr">225 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L226" class="LineNr">226 </span> 68/push <span class="SpecialChar">"D</span>"/imm32 +<span id="L226" class="LineNr">226 </span> 68/push <span class="Constant">"D"</span>/imm32 <span id="L227" class="LineNr">227 </span> 68/push _test-trace-stream/imm32 <span id="L228" class="LineNr">228 </span> <span class="subxS2Comment"># . . call</span> <span id="L229" class="LineNr">229 </span> e8/call trace/disp32 @@ -293,7 +293,7 @@ if ('onhashchange' in window) { <span id="L231" class="LineNr">231 </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="L232" class="LineNr">232 </span> <span class="subxComment"># check-ints-equal(*_test-trace-stream.data, 43/C 0a/newline 44/D 0a/newline, msg)</span> <span id="L233" class="LineNr">233 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L234" class="LineNr">234 </span> 68/push <span class="SpecialChar">"F</span> - test-trace-appends"/imm32 +<span id="L234" class="LineNr">234 </span> 68/push <span class="Constant">"F - test-trace-appends"</span>/imm32 <span id="L235" class="LineNr">235 </span> 68/push 0x0a440a43/imm32/C-newline-D-newline <span id="L236" class="LineNr">236 </span> <span class="subxS2Comment"># . . push *_test-trace-stream.data</span> <span id="L237" class="LineNr">237 </span> b8/copy-to-EAX _test-trace-stream/imm32 @@ -323,7 +323,7 @@ if ('onhashchange' in window) { <span id="L261" class="LineNr">261 </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="L262" class="LineNr">262 </span> <span class="subxComment"># check-ints-equal(*_test-trace-stream.data, 0, msg)</span> <span id="L263" class="LineNr">263 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L264" class="LineNr">264 </span> 68/push <span class="SpecialChar">"F</span> - test-trace-empty-line"/imm32 +<span id="L264" class="LineNr">264 </span> 68/push <span class="Constant">"F - test-trace-empty-line"</span>/imm32 <span id="L265" class="LineNr">265 </span> 68/push 0/imm32 <span id="L266" class="LineNr">266 </span> <span class="subxS2Comment"># . . push *_test-trace-stream.data</span> <span id="L267" class="LineNr">267 </span> b8/copy-to-EAX _test-trace-stream/imm32 diff --git a/html/subx/056write.subx.html b/html/subx/056write.subx.html index 96c7f1cf..e92b59bb 100644 --- a/html/subx/056write.subx.html +++ b/html/subx/056write.subx.html @@ -23,6 +23,7 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } +.Constant { color:#00a0a0; } .SpecialChar { color: #ff0000; } --> </style> @@ -83,7 +84,7 @@ if ('onhashchange' in window) { <span id="L23" class="LineNr"> 23 </span><span class="subxComment"># main:</span> <span id="L24" class="LineNr"> 24 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L25" class="LineNr"> 25 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L26" class="LineNr"> 26 </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="L26" class="LineNr"> 26 </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="L27" class="LineNr"> 27 </span> b8/copy-to-EAX 1/imm32 <span id="L28" class="LineNr"> 28 </span> cd/syscall 0x80/imm8 <span id="L29" class="LineNr"> 29 </span> @@ -190,7 +191,7 @@ if ('onhashchange' in window) { <span id="L130" class="LineNr">130 </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="L131" class="LineNr">131 </span> <span class="subxComment"># write(_test-stream, "Ab")</span> <span id="L132" class="LineNr">132 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L133" class="LineNr">133 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L133" class="LineNr">133 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L134" class="LineNr">134 </span> 68/push _test-stream/imm32 <span id="L135" class="LineNr">135 </span> <span class="subxS2Comment"># . . call</span> <span id="L136" class="LineNr">136 </span> e8/call write/disp32 @@ -198,7 +199,7 @@ if ('onhashchange' in window) { <span id="L138" class="LineNr">138 </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="L139" class="LineNr">139 </span> <span class="subxComment"># check-ints-equal(EAX, 2)</span> <span id="L140" class="LineNr">140 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L141" class="LineNr">141 </span> 68/push <span class="SpecialChar">"F</span> - test-read-single: return EAX"/imm32 +<span id="L141" class="LineNr">141 </span> 68/push <span class="Constant">"F - test-read-single: return EAX"</span>/imm32 <span id="L142" class="LineNr">142 </span> 68/push 2/imm32 <span id="L143" class="LineNr">143 </span> 50/push-EAX <span id="L144" class="LineNr">144 </span> <span class="subxS2Comment"># . . call</span> @@ -207,7 +208,7 @@ if ('onhashchange' in window) { <span id="L147" class="LineNr">147 </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> 0xc/imm32 <span class="subxComment"># add to ESP</span> <span id="L148" class="LineNr">148 </span> <span class="subxComment"># check-ints-equal(*_test-stream->data, 41/A 62/b 00 00, msg)</span> <span id="L149" class="LineNr">149 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L150" class="LineNr">150 </span> 68/push <span class="SpecialChar">"F</span> - test-write-single"/imm32 +<span id="L150" class="LineNr">150 </span> 68/push <span class="Constant">"F - test-write-single"</span>/imm32 <span id="L151" class="LineNr">151 </span> 68/push 0x006241/imm32/Ab <span id="L152" class="LineNr">152 </span> <span class="subxS2Comment"># . . push *_test-stream->data</span> <span id="L153" class="LineNr">153 </span> b8/copy-to-EAX _test-stream/imm32 @@ -229,7 +230,7 @@ if ('onhashchange' in window) { <span id="L169" class="LineNr">169 </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="L170" class="LineNr">170 </span> <span class="subxComment"># write(_test-stream, "C")</span> <span id="L171" class="LineNr">171 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L172" class="LineNr">172 </span> 68/push <span class="SpecialChar">"C</span>"/imm32 +<span id="L172" class="LineNr">172 </span> 68/push <span class="Constant">"C"</span>/imm32 <span id="L173" class="LineNr">173 </span> 68/push _test-stream/imm32 <span id="L174" class="LineNr">174 </span> <span class="subxS2Comment"># . . call</span> <span id="L175" class="LineNr">175 </span> e8/call write/disp32 @@ -237,7 +238,7 @@ if ('onhashchange' in window) { <span id="L177" class="LineNr">177 </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="L178" class="LineNr">178 </span> <span class="subxComment"># write(_test-stream, "D")</span> <span id="L179" class="LineNr">179 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L180" class="LineNr">180 </span> 68/push <span class="SpecialChar">"D</span>"/imm32 +<span id="L180" class="LineNr">180 </span> 68/push <span class="Constant">"D"</span>/imm32 <span id="L181" class="LineNr">181 </span> 68/push _test-stream/imm32 <span id="L182" class="LineNr">182 </span> <span class="subxS2Comment"># . . call</span> <span id="L183" class="LineNr">183 </span> e8/call write/disp32 @@ -245,7 +246,7 @@ if ('onhashchange' in window) { <span id="L185" class="LineNr">185 </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="L186" class="LineNr">186 </span> <span class="subxComment"># check-ints-equal(*_test-stream->data, 43/C 44/D 00 00, msg)</span> <span id="L187" class="LineNr">187 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L188" class="LineNr">188 </span> 68/push <span class="SpecialChar">"F</span> - test-write-appends"/imm32 +<span id="L188" class="LineNr">188 </span> 68/push <span class="Constant">"F - test-write-appends"</span>/imm32 <span id="L189" class="LineNr">189 </span> 68/push 0x00004443/imm32/C-D <span id="L190" class="LineNr">190 </span> <span class="subxS2Comment"># . . push *_test-stream->data</span> <span id="L191" class="LineNr">191 </span> b8/copy-to-EAX _test-stream/imm32 diff --git a/html/subx/057stop.subx.html b/html/subx/057stop.subx.html index a9f29155..1f859d12 100644 --- a/html/subx/057stop.subx.html +++ b/html/subx/057stop.subx.html @@ -23,6 +23,7 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } +.Constant { color:#00a0a0; } .SpecialChar { color: #ff0000; } --> </style> @@ -101,7 +102,7 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L42" class="LineNr"> 42 </span><span class="CommentedCode">#? e8/call test-stop-skips-returns-on-exit/disp32</span> <span id="L43" class="LineNr"> 43 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L44" class="LineNr"> 44 </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="L44" class="LineNr"> 44 </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="L45" class="LineNr"> 45 </span> b8/copy-to-EAX 1/imm32 <span id="L46" class="LineNr"> 46 </span> cd/syscall 0x80/imm8 <span id="L47" class="LineNr"> 47 </span> @@ -210,7 +211,7 @@ if ('onhashchange' in window) { <span id="L150" class="LineNr">150 </span> <span class="subxComment"># check that _test-stop-1 tried to call exit(1)</span> <span id="L151" class="LineNr">151 </span> <span class="subxComment"># check-ints-equal(ed->value, 2, msg) # i.e. stop was called with value 1</span> <span id="L152" class="LineNr">152 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L153" class="LineNr">153 </span> 68/push <span class="SpecialChar">"F</span> - test-stop-skips-returns-on-exit"/imm32 +<span id="L153" class="LineNr">153 </span> 68/push <span class="Constant">"F - test-stop-skips-returns-on-exit"</span>/imm32 <span id="L154" class="LineNr">154 </span> 68/push 2/imm32 <span id="L155" class="LineNr">155 </span> <span class="subxS2Comment"># . . push ed->value</span> <span id="L156" class="LineNr">156 </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> @@ -238,7 +239,7 @@ if ('onhashchange' in window) { <span id="L178" class="LineNr">178 </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="L179" class="LineNr">179 </span> <span class="subxComment"># signal test failed: check-ints-equal(1, 0, msg)</span> <span id="L180" class="LineNr">180 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L181" class="LineNr">181 </span> 68/push <span class="SpecialChar">"F</span> - test-stop-skips-returns-on-exit"/imm32 +<span id="L181" class="LineNr">181 </span> 68/push <span class="Constant">"F - test-stop-skips-returns-on-exit"</span>/imm32 <span id="L182" class="LineNr">182 </span> 68/push 0/imm32 <span id="L183" class="LineNr">183 </span> 68/push 1/imm32 <span id="L184" class="LineNr">184 </span> <span class="subxS2Comment"># . . call</span> diff --git a/html/subx/058read.subx.html b/html/subx/058read.subx.html index f85f16d0..b464068c 100644 --- a/html/subx/058read.subx.html +++ b/html/subx/058read.subx.html @@ -23,6 +23,7 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } +.Constant { color:#00a0a0; } .SpecialChar { color: #ff0000; } .subxH1Comment { color:#00ffff; } --> @@ -109,7 +110,7 @@ if ('onhashchange' in window) { <span id="L48" class="LineNr"> 48 </span><span class="subxComment"># main:</span> <span id="L49" class="LineNr"> 49 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L50" class="LineNr"> 50 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L51" class="LineNr"> 51 </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="L51" class="LineNr"> 51 </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="L52" class="LineNr"> 52 </span> b8/copy-to-EAX 1/imm32 <span id="L53" class="LineNr"> 53 </span> cd/syscall 0x80/imm8 <span id="L54" class="LineNr"> 54 </span> @@ -257,7 +258,7 @@ if ('onhashchange' in window) { <span id="L196" class="LineNr">196 </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="L197" class="LineNr">197 </span> <span class="subxComment"># write(_test-stream, "Ab")</span> <span id="L198" class="LineNr">198 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L199" class="LineNr">199 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L199" class="LineNr">199 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L200" class="LineNr">200 </span> 68/push _test-stream/imm32 <span id="L201" class="LineNr">201 </span> <span class="subxS2Comment"># . . call</span> <span id="L202" class="LineNr">202 </span> e8/call write/disp32 @@ -273,7 +274,7 @@ if ('onhashchange' in window) { <span id="L212" class="LineNr">212 </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="L213" class="LineNr">213 </span> <span class="subxComment"># check-ints-equal(EAX, 2)</span> <span id="L214" class="LineNr">214 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L215" class="LineNr">215 </span> 68/push <span class="SpecialChar">"F</span> - test-read-single: return EAX"/imm32 +<span id="L215" class="LineNr">215 </span> 68/push <span class="Constant">"F - test-read-single: return EAX"</span>/imm32 <span id="L216" class="LineNr">216 </span> 68/push 2/imm32 <span id="L217" class="LineNr">217 </span> 50/push-EAX <span id="L218" class="LineNr">218 </span> <span class="subxS2Comment"># . . call</span> @@ -282,7 +283,7 @@ if ('onhashchange' in window) { <span id="L221" class="LineNr">221 </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> 0xc/imm32 <span class="subxComment"># add to ESP</span> <span id="L222" class="LineNr">222 </span> <span class="subxComment"># check-ints-equal(*_test-stream-buffer->data, 41/A 62/b 00 00, msg)</span> <span id="L223" class="LineNr">223 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L224" class="LineNr">224 </span> 68/push <span class="SpecialChar">"F</span> - test-read-single"/imm32 +<span id="L224" class="LineNr">224 </span> 68/push <span class="Constant">"F - test-read-single"</span>/imm32 <span id="L225" class="LineNr">225 </span> 68/push 0x006241/imm32/Ab <span id="L226" class="LineNr">226 </span> <span class="subxS2Comment"># . . push *_test-stream-buffer->data</span> <span id="L227" class="LineNr">227 </span> b8/copy-to-EAX _test-stream-buffer/imm32 @@ -312,7 +313,7 @@ if ('onhashchange' in window) { <span id="L251" class="LineNr">251 </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="L252" class="LineNr">252 </span> <span class="subxComment"># write(_test-stream, "C")</span> <span id="L253" class="LineNr">253 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L254" class="LineNr">254 </span> 68/push <span class="SpecialChar">"C</span>"/imm32 +<span id="L254" class="LineNr">254 </span> 68/push <span class="Constant">"C"</span>/imm32 <span id="L255" class="LineNr">255 </span> 68/push _test-stream/imm32 <span id="L256" class="LineNr">256 </span> <span class="subxS2Comment"># . . call</span> <span id="L257" class="LineNr">257 </span> e8/call write/disp32 @@ -328,7 +329,7 @@ if ('onhashchange' in window) { <span id="L267" class="LineNr">267 </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="L268" class="LineNr">268 </span> <span class="subxComment"># write(_test-stream, "D")</span> <span id="L269" class="LineNr">269 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L270" class="LineNr">270 </span> 68/push <span class="SpecialChar">"D</span>"/imm32 +<span id="L270" class="LineNr">270 </span> 68/push <span class="Constant">"D"</span>/imm32 <span id="L271" class="LineNr">271 </span> 68/push _test-stream/imm32 <span id="L272" class="LineNr">272 </span> <span class="subxS2Comment"># . . call</span> <span id="L273" class="LineNr">273 </span> e8/call write/disp32 @@ -344,7 +345,7 @@ if ('onhashchange' in window) { <span id="L283" class="LineNr">283 </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="L284" class="LineNr">284 </span> <span class="subxComment"># check-ints-equal(*_test-stream-buffer->data, 43/C 44/D 00 00, msg)</span> <span id="L285" class="LineNr">285 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L286" class="LineNr">286 </span> 68/push <span class="SpecialChar">"F</span> - test-read-is-stateful"/imm32 +<span id="L286" class="LineNr">286 </span> 68/push <span class="Constant">"F - test-read-is-stateful"</span>/imm32 <span id="L287" class="LineNr">287 </span> 68/push 0x00004443/imm32/C-D <span id="L288" class="LineNr">288 </span> <span class="subxS1Comment"># . push *_test-stream-buffer->data</span> <span id="L289" class="LineNr">289 </span> b8/copy-to-EAX _test-stream-buffer/imm32 @@ -375,7 +376,7 @@ if ('onhashchange' in window) { <span id="L314" class="LineNr">314 </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="L315" class="LineNr">315 </span> <span class="subxS1Comment"># . write(_test-stream, "Ab")</span> <span id="L316" class="LineNr">316 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L317" class="LineNr">317 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L317" class="LineNr">317 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L318" class="LineNr">318 </span> 68/push _test-stream/imm32 <span id="L319" class="LineNr">319 </span> <span class="subxS2Comment"># . . call</span> <span id="L320" class="LineNr">320 </span> e8/call write/disp32 @@ -401,7 +402,7 @@ if ('onhashchange' in window) { <span id="L340" class="LineNr">340 </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="L341" class="LineNr">341 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L342" class="LineNr">342 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L343" class="LineNr">343 </span> 68/push <span class="SpecialChar">"F</span> - test-read-returns-0-on-end-of-file"/imm32 +<span id="L343" class="LineNr">343 </span> 68/push <span class="Constant">"F - test-read-returns-0-on-end-of-file"</span>/imm32 <span id="L344" class="LineNr">344 </span> 68/push 0/imm32 <span id="L345" class="LineNr">345 </span> 50/push-EAX <span id="L346" class="LineNr">346 </span> <span class="subxS2Comment"># . . call</span> diff --git a/html/subx/059read-byte.subx.html b/html/subx/059read-byte.subx.html index 16db53f6..6573c8c5 100644 --- a/html/subx/059read-byte.subx.html +++ b/html/subx/059read-byte.subx.html @@ -23,6 +23,7 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .SpecialChar { color: #ff0000; } +.Constant { color:#00a0a0; } .CommentedCode { color: #6c6c6c; } .subxH1Comment { color:#00ffff; } --> @@ -96,7 +97,7 @@ if ('onhashchange' in window) { <span id="L35" class="LineNr"> 35 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L36" class="LineNr"> 36 </span><span class="CommentedCode">#? e8/call test-read-byte-multiple/disp32</span> <span id="L37" class="LineNr"> 37 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L38" class="LineNr"> 38 </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="L38" class="LineNr"> 38 </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="L39" class="LineNr"> 39 </span> b8/copy-to-EAX 1/imm32 <span id="L40" class="LineNr"> 40 </span> cd/syscall 0x80/imm8 <span id="L41" class="LineNr"> 41 </span> @@ -180,7 +181,7 @@ if ('onhashchange' in window) { <span id="L119" class="LineNr">119 </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="L120" class="LineNr">120 </span> <span class="subxS1Comment"># . write(_test-stream, "Ab")</span> <span id="L121" class="LineNr">121 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L122" class="LineNr">122 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L122" class="LineNr">122 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L123" class="LineNr">123 </span> 68/push _test-stream/imm32 <span id="L124" class="LineNr">124 </span> <span class="subxS2Comment"># . . call</span> <span id="L125" class="LineNr">125 </span> e8/call write/disp32 @@ -195,7 +196,7 @@ if ('onhashchange' in window) { <span id="L134" class="LineNr">134 </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="L135" class="LineNr">135 </span> <span class="subxComment"># check-ints-equal(EAX, 'A')</span> <span id="L136" class="LineNr">136 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L137" class="LineNr">137 </span> 68/push <span class="SpecialChar">"F</span> - test-read-byte-single"/imm32 +<span id="L137" class="LineNr">137 </span> 68/push <span class="Constant">"F - test-read-byte-single"</span>/imm32 <span id="L138" class="LineNr">138 </span> 68/push 0x41/imm32 <span id="L139" class="LineNr">139 </span> 50/push-EAX <span id="L140" class="LineNr">140 </span> <span class="subxS2Comment"># . . call</span> @@ -226,7 +227,7 @@ if ('onhashchange' in window) { <span id="L165" class="LineNr">165 </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="L166" class="LineNr">166 </span> <span class="subxS1Comment"># . write(_test-stream, "Ab")</span> <span id="L167" class="LineNr">167 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L168" class="LineNr">168 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L168" class="LineNr">168 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L169" class="LineNr">169 </span> 68/push _test-stream/imm32 <span id="L170" class="LineNr">170 </span> <span class="subxS2Comment"># . . call</span> <span id="L171" class="LineNr">171 </span> e8/call write/disp32 @@ -248,7 +249,7 @@ if ('onhashchange' in window) { <span id="L187" class="LineNr">187 </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="L188" class="LineNr">188 </span> <span class="subxComment"># check-ints-equal(EAX, 'b')</span> <span id="L189" class="LineNr">189 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L190" class="LineNr">190 </span> 68/push <span class="SpecialChar">"F</span> - test-read-byte-multiple"/imm32 +<span id="L190" class="LineNr">190 </span> 68/push <span class="Constant">"F - test-read-byte-multiple"</span>/imm32 <span id="L191" class="LineNr">191 </span> 68/push 0x62/imm32 <span id="L192" class="LineNr">192 </span> 50/push-EAX <span id="L193" class="LineNr">193 </span> <span class="subxS2Comment"># . . call</span> @@ -286,7 +287,7 @@ if ('onhashchange' in window) { <span id="L225" class="LineNr">225 </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="L226" class="LineNr">226 </span> <span class="subxComment"># check-ints-equal(EAX, -1)</span> <span id="L227" class="LineNr">227 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L228" class="LineNr">228 </span> 68/push <span class="SpecialChar">"F</span> - test-read-byte-end-of-file"/imm32 +<span id="L228" class="LineNr">228 </span> 68/push <span class="Constant">"F - test-read-byte-end-of-file"</span>/imm32 <span id="L229" class="LineNr">229 </span> 68/push -1/imm32 <span id="L230" class="LineNr">230 </span> 50/push-EAX <span id="L231" class="LineNr">231 </span> <span class="subxS2Comment"># . . call</span> diff --git a/html/subx/060write-stream.subx.html b/html/subx/060write-stream.subx.html index 222b538a..ba6ed457 100644 --- a/html/subx/060write-stream.subx.html +++ b/html/subx/060write-stream.subx.html @@ -23,6 +23,7 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .CommentedCode { color: #6c6c6c; } +.Constant { color:#00a0a0; } .SpecialChar { color: #ff0000; } --> </style> @@ -75,7 +76,7 @@ if ('onhashchange' in window) { <span id="L15" class="LineNr"> 15 </span><span class="CommentedCode">#? e8/call test-write-stream-appends/disp32</span> <span id="L16" class="LineNr"> 16 </span> e8/call run-tests/disp32 <span class="subxComment"># 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'.</span> <span id="L17" class="LineNr"> 17 </span> <span class="subxComment"># syscall(exit, Num-test-failures)</span> -<span id="L18" class="LineNr"> 18 </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="L18" class="LineNr"> 18 </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="L19" class="LineNr"> 19 </span> b8/copy-to-EAX 1/imm32 <span id="L20" class="LineNr"> 20 </span> cd/syscall 0x80/imm8 <span id="L21" class="LineNr"> 21 </span> @@ -196,7 +197,7 @@ if ('onhashchange' in window) { <span id="L136" class="LineNr">136 </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="L137" class="LineNr">137 </span> <span class="subxS1Comment"># . write(_test-stream2, "Ab")</span> <span id="L138" class="LineNr">138 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L139" class="LineNr">139 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 +<span id="L139" class="LineNr">139 </span> 68/push <span class="Constant">"Ab"</span>/imm32 <span id="L140" class="LineNr">140 </span> 68/push _test-stream2/imm32 <span id="L141" class="LineNr">141 </span> <span class="subxS2Comment"># . . call</span> <span id="L142" class="LineNr">142 </span> e8/call write/disp32 @@ -212,7 +213,7 @@ if ('onhashchange' in window) { <span id="L152" class="LineNr">152 </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="L153" class="LineNr">153 </span> <span class="subxComment"># check-ints-equal(*_test-stream.data, 41/A 62/b 00 00, msg)</span> <span id="L154" class="LineNr">154 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L155" class="LineNr">155 </span> 68/push <span class="SpecialChar">"F</span> - test-write-stream-single"/imm32 +<span id="L155" class="LineNr">155 </span> 68/push <span class="Constant">"F - test-write-stream-single"</span>/imm32 <span id="L156" class="LineNr">156 </span> 68/push 0x006241/imm32/Ab <span id="L157" class="LineNr">157 </span> <span class="subxComment"># push *_test-stream.data</span> <span id="L158" class="LineNr">158 </span> b8/copy-to-EAX _test-stream/imm32 @@ -242,7 +243,7 @@ if ('onhashchange' in window) { <span id="L182" class="LineNr">182 </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="L183" class="LineNr">183 </span> <span class="subxS1Comment"># . write(_test-stream2, "C")</span> <span id="L184" class="LineNr">184 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L185" class="LineNr">185 </span> 68/push <span class="SpecialChar">"C</span>"/imm32 +<span id="L185" class="LineNr">185 </span> 68/push <span class="Constant">"C"</span>/imm32 <span id="L186" class="LineNr">186 </span> 68/push _test-stream2/imm32 <span id="L187" class="LineNr">187 </span> <span class="subxS2Comment"># . . call</span> <span id="L188" class="LineNr">188 </span> e8/call write/disp32 @@ -260,7 +261,7 @@ if ('onhashchange' in window) { <span id="L200" class="LineNr">200 </span> <span class="subxComment"># second write</span> <span id="L201" class="LineNr">201 </span> <span class="subxS1Comment"># . write(_test-stream2, "D")</span> <span id="L202" class="LineNr">202 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L203" class="LineNr">203 </span> 68/push <span class="SpecialChar">"D</span>"/imm32 +<span id="L203" class="LineNr">203 </span> 68/push <span class="Constant">"D"</span>/imm32 <span id="L204" class="LineNr">204 </span> 68/push _test-stream2/imm32 <span id="L205" class="LineNr">205 </span> <span class="subxS2Comment"># . . call</span> <span id="L206" class="LineNr">206 </span> e8/call write/disp32 @@ -276,7 +277,7 @@ if ('onhashchange' in window) { <span id="L216" class="LineNr">216 </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="L217" class="LineNr">217 </span> <span class="subxComment"># check-ints-equal(*_test-stream.data, 43/C 44/D 00 00, msg)</span> <span id="L218" class="LineNr">218 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L219" class="LineNr">219 </span> 68/push <span class="SpecialChar">"F</span> - test-write-stream-appends"/imm32 +<span id="L219" class="LineNr">219 </span> 68/push <span class="Constant">"F - test-write-stream-appends"</span>/imm32 <span id="L220" class="LineNr">220 </span> 68/push 0x00004443/imm32/C-D <span id="L221" class="LineNr">221 </span> <span class="subxComment"># push *_test-stream.data</span> <span id="L222" class="LineNr">222 </span> b8/copy-to-EAX _test-stream/imm32 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> diff --git a/html/subx/examples/ex11.subx.html b/html/subx/examples/ex11.subx.html index d4460ce5..56377403 100644 --- a/html/subx/examples/ex11.subx.html +++ b/html/subx/examples/ex11.subx.html @@ -176,14 +176,14 @@ if ('onhashchange' in window) { <span id="L114" class="LineNr">114 </span> <span class="subxComment"># EAX = kernel-string-equal(Null-kernel-string, "")</span> <span id="L115" class="LineNr">115 </span> <span class="subxS2Comment"># . . push args</span> <span id="L116" class="LineNr">116 </span> 68/push <span class="Constant">""</span>/imm32 -<span id="L117" class="LineNr">117 </span> 68/push <span class="SpecialChar"> Null-kernel-string</span>/imm32 +<span id="L117" class="LineNr">117 </span> 68/push <span class="SpecialChar">Null-kernel-string</span>/imm32 <span id="L118" class="LineNr">118 </span> <span class="subxS2Comment"># . . call</span> <span id="L119" class="LineNr">119 </span> e8/call kernel-string-equal/disp32 <span id="L120" class="LineNr">120 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L121" class="LineNr">121 </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="L122" class="LineNr">122 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L123" class="LineNr">123 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L124" class="LineNr">124 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-null-kernel-string-with-empty-array"/imm32 +<span id="L124" class="LineNr">124 </span> 68/push <span class="Constant">"F - test-compare-null-kernel-string-with-empty-array"</span>/imm32 <span id="L125" class="LineNr">125 </span> 68/push 1/imm32/true <span id="L126" class="LineNr">126 </span> 50/push-EAX <span id="L127" class="LineNr">127 </span> <span class="subxS2Comment"># . . call</span> @@ -195,15 +195,15 @@ if ('onhashchange' in window) { <span id="L133" class="LineNr">133 </span>test-compare-null-kernel-string-with-non-empty-array: <span id="L134" class="LineNr">134 </span> <span class="subxComment"># EAX = kernel-string-equal(Null-kernel-string, "Abc")</span> <span id="L135" class="LineNr">135 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L136" class="LineNr">136 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 -<span id="L137" class="LineNr">137 </span> 68/push <span class="SpecialChar"> Null-kernel-string</span>/imm32 +<span id="L136" class="LineNr">136 </span> 68/push <span class="Constant">"Abc"</span>/imm32 +<span id="L137" class="LineNr">137 </span> 68/push <span class="SpecialChar">Null-kernel-string</span>/imm32 <span id="L138" class="LineNr">138 </span> <span class="subxS2Comment"># . . call</span> <span id="L139" class="LineNr">139 </span> e8/call kernel-string-equal/disp32 <span id="L140" class="LineNr">140 </span> <span class="subxS2Comment"># . . discard args</span> <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="subxComment"># check-ints-equal(EAX, 0, msg)</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">"F</span> - test-compare-null-kernel-string-with-non-empty-array"/imm32 +<span id="L144" class="LineNr">144 </span> 68/push <span class="Constant">"F - test-compare-null-kernel-string-with-non-empty-array"</span>/imm32 <span id="L145" class="LineNr">145 </span> 68/push 0/imm32/false <span id="L146" class="LineNr">146 </span> 50/push-EAX <span id="L147" class="LineNr">147 </span> <span class="subxS2Comment"># . . call</span> @@ -215,15 +215,15 @@ if ('onhashchange' in window) { <span id="L153" class="LineNr">153 </span>test-compare-kernel-string-with-equal-array: <span id="L154" class="LineNr">154 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Abc")</span> <span id="L155" class="LineNr">155 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L156" class="LineNr">156 </span> 68/push <span class="SpecialChar">"Abc</span>"/imm32 -<span id="L157" class="LineNr">157 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L156" class="LineNr">156 </span> 68/push <span class="Constant">"Abc"</span>/imm32 +<span id="L157" class="LineNr">157 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L158" class="LineNr">158 </span> <span class="subxS2Comment"># . . call</span> <span id="L159" class="LineNr">159 </span> e8/call kernel-string-equal/disp32 <span id="L160" class="LineNr">160 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L161" class="LineNr">161 </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="L162" class="LineNr">162 </span> <span class="subxComment"># check-ints-equal(EAX, 1, msg)</span> <span id="L163" class="LineNr">163 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L164" class="LineNr">164 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L164" class="LineNr">164 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L165" class="LineNr">165 </span> 68/push 1/imm32/true <span id="L166" class="LineNr">166 </span> 50/push-EAX <span id="L167" class="LineNr">167 </span> <span class="subxS2Comment"># . . call</span> @@ -235,15 +235,15 @@ if ('onhashchange' in window) { <span id="L173" class="LineNr">173 </span>test-compare-kernel-string-with-inequal-array: <span id="L174" class="LineNr">174 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Adc")</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">"Adc</span>"/imm32 -<span id="L177" class="LineNr">177 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L176" class="LineNr">176 </span> 68/push <span class="Constant">"Adc"</span>/imm32 +<span id="L177" class="LineNr">177 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L178" class="LineNr">178 </span> <span class="subxS2Comment"># . . call</span> <span id="L179" class="LineNr">179 </span> e8/call kernel-string-equal/disp32 <span id="L180" class="LineNr">180 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L181" class="LineNr">181 </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="L182" class="LineNr">182 </span> <span class="subxComment"># check-ints-equal(EAX, 0, msg)</span> <span id="L183" class="LineNr">183 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L184" class="LineNr">184 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L184" class="LineNr">184 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L185" class="LineNr">185 </span> 68/push 0/imm32/false <span id="L186" class="LineNr">186 </span> 50/push-EAX <span id="L187" class="LineNr">187 </span> <span class="subxS2Comment"># . . call</span> @@ -256,14 +256,14 @@ if ('onhashchange' in window) { <span id="L194" class="LineNr">194 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "")</span> <span id="L195" class="LineNr">195 </span> <span class="subxS2Comment"># . . push args</span> <span id="L196" class="LineNr">196 </span> 68/push <span class="Constant">""</span>/imm32 -<span id="L197" class="LineNr">197 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L197" class="LineNr">197 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L198" class="LineNr">198 </span> <span class="subxS2Comment"># . . call</span> <span id="L199" class="LineNr">199 </span> e8/call kernel-string-equal/disp32 <span id="L200" class="LineNr">200 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L201" class="LineNr">201 </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="L202" class="LineNr">202 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L203" class="LineNr">203 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L204" class="LineNr">204 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-equal-array"/imm32 +<span id="L204" class="LineNr">204 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-equal-array"</span>/imm32 <span id="L205" class="LineNr">205 </span> 68/push 0/imm32/false <span id="L206" class="LineNr">206 </span> 50/push-EAX <span id="L207" class="LineNr">207 </span> <span class="subxS2Comment"># . . call</span> @@ -275,15 +275,15 @@ if ('onhashchange' in window) { <span id="L213" class="LineNr">213 </span>test-compare-kernel-string-with-shorter-array: <span id="L214" class="LineNr">214 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Ab")</span> <span id="L215" class="LineNr">215 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L216" class="LineNr">216 </span> 68/push <span class="SpecialChar">"Ab</span>"/imm32 -<span id="L217" class="LineNr">217 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L216" class="LineNr">216 </span> 68/push <span class="Constant">"Ab"</span>/imm32 +<span id="L217" class="LineNr">217 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L218" class="LineNr">218 </span> <span class="subxS2Comment"># . . call</span> <span id="L219" class="LineNr">219 </span> e8/call kernel-string-equal/disp32 <span id="L220" class="LineNr">220 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L221" class="LineNr">221 </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="L222" class="LineNr">222 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L223" class="LineNr">223 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L224" class="LineNr">224 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-shorter-array"/imm32 +<span id="L224" class="LineNr">224 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-shorter-array"</span>/imm32 <span id="L225" class="LineNr">225 </span> 68/push 0/imm32/false <span id="L226" class="LineNr">226 </span> 50/push-EAX <span id="L227" class="LineNr">227 </span> <span class="subxS2Comment"># . . call</span> @@ -295,15 +295,15 @@ if ('onhashchange' in window) { <span id="L233" class="LineNr">233 </span>test-compare-kernel-string-with-longer-array: <span id="L234" class="LineNr">234 </span> <span class="subxComment"># EAX = kernel-string-equal(Abc-kernel-string, "Abcd")</span> <span id="L235" class="LineNr">235 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L236" class="LineNr">236 </span> 68/push <span class="SpecialChar">"Abcd</span>"/imm32 -<span id="L237" class="LineNr">237 </span> 68/push <span class="SpecialChar"> Abc-kernel-string</span>/imm32 +<span id="L236" class="LineNr">236 </span> 68/push <span class="Constant">"Abcd"</span>/imm32 +<span id="L237" class="LineNr">237 </span> 68/push <span class="SpecialChar">Abc-kernel-string</span>/imm32 <span id="L238" class="LineNr">238 </span> <span class="subxS2Comment"># . . call</span> <span id="L239" class="LineNr">239 </span> e8/call kernel-string-equal/disp32 <span id="L240" class="LineNr">240 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L241" class="LineNr">241 </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="L242" class="LineNr">242 </span> <span class="subxComment"># check-ints-equal(EAX, 0)</span> <span id="L243" class="LineNr">243 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L244" class="LineNr">244 </span> 68/push <span class="SpecialChar">"F</span> - test-compare-kernel-string-with-longer-array"/imm32 +<span id="L244" class="LineNr">244 </span> 68/push <span class="Constant">"F - test-compare-kernel-string-with-longer-array"</span>/imm32 <span id="L245" class="LineNr">245 </span> 68/push 0/imm32/false <span id="L246" class="LineNr">246 </span> 50/push-EAX <span id="L247" class="LineNr">247 </span> <span class="subxS2Comment"># . . call</span> @@ -350,7 +350,7 @@ if ('onhashchange' in window) { <span id="L288" class="LineNr">288 </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="L289" class="LineNr">289 </span> <span class="subxComment"># print newline</span> <span id="L290" class="LineNr">290 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L291" class="LineNr">291 </span> 68/push <span class="SpecialChar"> Newline</span>/imm32 +<span id="L291" class="LineNr">291 </span> 68/push <span class="SpecialChar">Newline</span>/imm32 <span id="L292" class="LineNr">292 </span> <span class="subxS2Comment"># . . call</span> <span id="L293" class="LineNr">293 </span> e8/call write-stderr/disp32 <span id="L294" class="LineNr">294 </span> <span class="subxS2Comment"># . . discard args</span> diff --git a/html/subx/examples/ex12.subx.html b/html/subx/examples/ex12.subx.html index 92a98277..35235c57 100644 --- a/html/subx/examples/ex12.subx.html +++ b/html/subx/examples/ex12.subx.html @@ -73,7 +73,7 @@ if ('onhashchange' in window) { <span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span> <span id="L13" class="LineNr">13 </span> <span id="L14" class="LineNr">14 </span> <span class="subxComment"># syscall(mmap, 0x1000)</span> -<span id="L15" class="LineNr">15 </span> bb/copy-to-EBX <span class="SpecialChar"> Mmap-new-segment</span>/imm32 +<span id="L15" class="LineNr">15 </span> bb/copy-to-EBX <span class="SpecialChar">Mmap-new-segment</span>/imm32 <span id="L16" class="LineNr">16 </span> b8/copy-to-EAX 0x5a/imm32/mmap <span id="L17" class="LineNr">17 </span> cd/syscall 0x80/imm8 <span id="L18" class="LineNr">18 </span> diff --git a/html/subx/examples/ex4.subx.html b/html/subx/examples/ex4.subx.html index 4e442a60..dab870b9 100644 --- a/html/subx/examples/ex4.subx.html +++ b/html/subx/examples/ex4.subx.html @@ -69,7 +69,7 @@ if ('onhashchange' in window) { <span id="L10" class="LineNr">10 </span><span class="subxS1Comment"># . fd = 0 (stdin)</span> <span id="L11" class="LineNr">11 </span>bb/copy-to-EBX 0/imm32 <span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . data = X (location to write result to)</span> -<span id="L13" class="LineNr">13 </span>b9/copy-to-ECX <span class="SpecialChar"> X</span>/imm32 +<span id="L13" class="LineNr">13 </span>b9/copy-to-ECX <span class="SpecialChar">X</span>/imm32 <span id="L14" class="LineNr">14 </span><span class="subxS1Comment"># . size = 1 character</span> <span id="L15" class="LineNr">15 </span>ba/copy-to-EDX 1/imm32 <span id="L16" class="LineNr">16 </span><span class="subxS1Comment"># . syscall</span> @@ -80,7 +80,7 @@ if ('onhashchange' in window) { <span id="L21" class="LineNr">21 </span><span class="subxS1Comment"># . fd = 1 (stdout)</span> <span id="L22" class="LineNr">22 </span>bb/copy-to-EBX 1/imm32 <span id="L23" class="LineNr">23 </span><span class="subxS1Comment"># . initialize X (location to read from)</span> -<span id="L24" class="LineNr">24 </span>b9/copy-to-ECX <span class="SpecialChar"> X</span>/imm32 +<span id="L24" class="LineNr">24 </span>b9/copy-to-ECX <span class="SpecialChar">X</span>/imm32 <span id="L25" class="LineNr">25 </span><span class="subxS1Comment"># . size = 1 character</span> <span id="L26" class="LineNr">26 </span>ba/copy-to-EDX 1/imm32 <span id="L27" class="LineNr">27 </span><span class="subxS1Comment"># . syscall</span> diff --git a/html/subx/examples/ex6.subx.html b/html/subx/examples/ex6.subx.html index a987f60c..092685e2 100644 --- a/html/subx/examples/ex6.subx.html +++ b/html/subx/examples/ex6.subx.html @@ -74,9 +74,9 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr">14 </span> <span class="subxS1Comment"># . fd = 1 (stdout)</span> <span id="L15" class="LineNr">15 </span> bb/copy-to-EBX 1/imm32 <span id="L16" class="LineNr">16 </span> <span class="subxS1Comment"># . initialize X (location to write result to)</span> -<span id="L17" class="LineNr">17 </span> b9/copy-to-ECX <span class="SpecialChar"> X</span>/imm32 +<span id="L17" class="LineNr">17 </span> b9/copy-to-ECX <span class="SpecialChar">X</span>/imm32 <span id="L18" class="LineNr">18 </span> <span class="subxS1Comment"># . initialize Size</span> -<span id="L19" class="LineNr">19 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 2/r32/EDX <span class="SpecialChar"> Size</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Size to EDX</span> +<span id="L19" class="LineNr">19 </span> 8b/copy 0/mod/indirect 5/rm32/.disp32 <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 2/r32/EDX <span class="SpecialChar">Size</span>/disp32 <span class="CommentedCode"> . </span> <span class="subxComment"># copy *Size to EDX</span> <span id="L20" class="LineNr">20 </span> <span class="subxS1Comment"># . syscall</span> <span id="L21" class="LineNr">21 </span> b8/copy-to-EAX 4/imm32/write <span id="L22" class="LineNr">22 </span> cd/syscall 0x80/imm8 diff --git a/html/subx/examples/ex7.subx.html b/html/subx/examples/ex7.subx.html index 2a835bbb..e20ebc88 100644 --- a/html/subx/examples/ex7.subx.html +++ b/html/subx/examples/ex7.subx.html @@ -77,75 +77,75 @@ if ('onhashchange' in window) { <span id="L17" class="LineNr"> 17 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span> <span id="L18" class="LineNr"> 18 </span> <span id="L19" class="LineNr"> 19 </span> <span class="subxComment"># syscall(creat, Filename)</span> -<span id="L20" class="LineNr"> 20 </span> bb/copy-to-EBX <span class="SpecialChar"> Filename</span>/imm32 +<span id="L20" class="LineNr"> 20 </span> bb/copy-to-EBX <span class="SpecialChar">Filename</span>/imm32 <span id="L21" class="LineNr"> 21 </span> b9/copy-to-ECX 0x180/imm32/fixed-perms <span id="L22" class="LineNr"> 22 </span> b8/copy-to-EAX 8/imm32/creat <span id="L23" class="LineNr"> 23 </span> cd/syscall 0x80/imm8 <span id="L24" class="LineNr"> 24 </span> <span id="L25" class="LineNr"> 25 </span> <span class="subxComment"># stream = syscall(open, Filename, O_WRONLY, 0) # we can't use 'fd' because it looks like a hex byte</span> -<span id="L26" class="LineNr"> 26 </span> bb/copy-to-EBX <span class="SpecialChar"> Filename</span>/imm32 +<span id="L26" class="LineNr"> 26 </span> bb/copy-to-EBX <span class="SpecialChar">Filename</span>/imm32 <span id="L27" class="LineNr"> 27 </span> b9/copy-to-ECX 1/imm32/wronly <span id="L28" class="LineNr"> 28 </span> ba/copy-to-EDX 0x180/imm32/fixed-perms <span id="L29" class="LineNr"> 29 </span> b8/copy-to-EAX 5/imm32/open <span id="L30" class="LineNr"> 30 </span> cd/syscall 0x80/imm8 <span id="L31" class="LineNr"> 31 </span> <span class="subxComment"># save stream</span> -<span id="L32" class="LineNr"> 32 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L32" class="LineNr"> 32 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L33" class="LineNr"> 33 </span> 89/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *EBX</span> <span id="L34" class="LineNr"> 34 </span> <span id="L35" class="LineNr"> 35 </span> <span class="subxComment"># syscall(write, Stream, "a", 1)</span> <span id="L36" class="LineNr"> 36 </span> <span class="subxS1Comment"># . load stream</span> -<span id="L37" class="LineNr"> 37 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L37" class="LineNr"> 37 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L38" class="LineNr"> 38 </span> 8b/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EBX to EBX</span> <span id="L39" class="LineNr"> 39 </span> <span class="subxS1Comment"># .</span> -<span id="L40" class="LineNr"> 40 </span> b9/copy-to-ECX <span class="SpecialChar"> A</span>/imm32 +<span id="L40" class="LineNr"> 40 </span> b9/copy-to-ECX <span class="SpecialChar">A</span>/imm32 <span id="L41" class="LineNr"> 41 </span> ba/copy-to-EDX 1/imm32/size <span id="L42" class="LineNr"> 42 </span> b8/copy-to-EAX 4/imm32/write <span id="L43" class="LineNr"> 43 </span> cd/syscall 0x80/imm8 <span id="L44" class="LineNr"> 44 </span> <span id="L45" class="LineNr"> 45 </span> <span class="subxComment"># syscall(close, Stream)</span> <span id="L46" class="LineNr"> 46 </span> <span class="subxS1Comment"># . load stream</span> -<span id="L47" class="LineNr"> 47 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L47" class="LineNr"> 47 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L48" class="LineNr"> 48 </span> 8b/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EBX to EBX</span> <span id="L49" class="LineNr"> 49 </span> <span class="subxS1Comment"># .</span> <span id="L50" class="LineNr"> 50 </span> b8/copy-to-EAX 6/imm32/close <span id="L51" class="LineNr"> 51 </span> cd/syscall 0x80/imm8 <span id="L52" class="LineNr"> 52 </span> <span id="L53" class="LineNr"> 53 </span> <span class="subxComment"># stream = syscall(open, Filename, O_RDONLY, 0)</span> -<span id="L54" class="LineNr"> 54 </span> bb/copy-to-EBX <span class="SpecialChar"> Filename</span>/imm32 +<span id="L54" class="LineNr"> 54 </span> bb/copy-to-EBX <span class="SpecialChar">Filename</span>/imm32 <span id="L55" class="LineNr"> 55 </span> b9/copy-to-ECX 0/imm32/rdonly <span id="L56" class="LineNr"> 56 </span> ba/copy-to-EDX 0x180/imm32/fixed-perms <span id="L57" class="LineNr"> 57 </span> b8/copy-to-EAX 5/imm32/open <span id="L58" class="LineNr"> 58 </span> cd/syscall 0x80/imm8 <span id="L59" class="LineNr"> 59 </span> <span class="subxS1Comment"># . save Stream</span> -<span id="L60" class="LineNr"> 60 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L60" class="LineNr"> 60 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L61" class="LineNr"> 61 </span> 89/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 0/r32/EAX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy EAX to *EBX</span> <span id="L62" class="LineNr"> 62 </span> <span id="L63" class="LineNr"> 63 </span> <span class="subxComment"># syscall(read, Stream, B, 1)</span> <span id="L64" class="LineNr"> 64 </span> <span class="subxS1Comment"># . load stream</span> -<span id="L65" class="LineNr"> 65 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L65" class="LineNr"> 65 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L66" class="LineNr"> 66 </span> 8b/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EBX to EBX</span> <span id="L67" class="LineNr"> 67 </span> <span class="subxS1Comment"># .</span> -<span id="L68" class="LineNr"> 68 </span> b9/copy-to-ECX <span class="SpecialChar"> B</span>/imm32 +<span id="L68" class="LineNr"> 68 </span> b9/copy-to-ECX <span class="SpecialChar">B</span>/imm32 <span id="L69" class="LineNr"> 69 </span> ba/copy-to-EDX 1/imm32/size <span id="L70" class="LineNr"> 70 </span> b8/copy-to-EAX 3/imm32/read <span id="L71" class="LineNr"> 71 </span> cd/syscall 0x80/imm8 <span id="L72" class="LineNr"> 72 </span> <span id="L73" class="LineNr"> 73 </span> <span class="subxComment"># syscall(close, Stream)</span> <span id="L74" class="LineNr"> 74 </span> <span class="subxS1Comment"># . load stream</span> -<span id="L75" class="LineNr"> 75 </span> bb/copy-to-EBX <span class="SpecialChar"> Stream</span>/imm32 +<span id="L75" class="LineNr"> 75 </span> bb/copy-to-EBX <span class="SpecialChar">Stream</span>/imm32 <span id="L76" class="LineNr"> 76 </span> 8b/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EBX to EBX</span> <span id="L77" class="LineNr"> 77 </span> <span class="subxComment">#</span> <span id="L78" class="LineNr"> 78 </span> b8/copy-to-EAX 6/imm32/close <span id="L79" class="LineNr"> 79 </span> cd/syscall 0x80/imm8 <span id="L80" class="LineNr"> 80 </span> <span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># syscall(unlink, filename)</span> -<span id="L82" class="LineNr"> 82 </span> bb/copy-to-EBX <span class="SpecialChar"> Filename</span>/imm32 +<span id="L82" class="LineNr"> 82 </span> bb/copy-to-EBX <span class="SpecialChar">Filename</span>/imm32 <span id="L83" class="LineNr"> 83 </span> b8/copy-to-EAX 0xa/imm32/unlink <span id="L84" class="LineNr"> 84 </span> cd/syscall 0x80/imm8 <span id="L85" class="LineNr"> 85 </span> <span id="L86" class="LineNr"> 86 </span> <span class="subxComment"># syscall(exit, b)</span> <span id="L87" class="LineNr"> 87 </span> <span class="subxS1Comment"># . load b</span> -<span id="L88" class="LineNr"> 88 </span> bb/copy-to-EBX <span class="SpecialChar"> B</span>/imm32 +<span id="L88" class="LineNr"> 88 </span> bb/copy-to-EBX <span class="SpecialChar">B</span>/imm32 <span id="L89" class="LineNr"> 89 </span> 8b/copy 0/mod/indirect 3/rm32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> 3/r32/EBX <span class="CommentedCode"> . </span> <span class="CommentedCode"> . </span> <span class="subxComment"># copy *EBX to EBX</span> <span id="L90" class="LineNr"> 90 </span> <span class="subxComment">#</span> <span id="L91" class="LineNr"> 91 </span> b8/copy-to-EAX 1/imm32/exit diff --git a/subx/subx.vim b/subx/subx.vim index f150718d..0a112fbb 100644 --- a/subx/subx.vim +++ b/subx/subx.vim @@ -34,8 +34,9 @@ syntax match subxDelimiter / \. / | highlight link subxDelimiter CommentedCode syntax match subxString %"[^"]*"% | highlight link subxString Constant " match globals but not registers like 'EAX' -syntax match subxGlobal %[^/]\<[A-Z][a-z0-9_-]*\>\|^[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar -"? syntax match subxGlobal %\/\@!\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar +" don't match capitalized words in metadata +" don't match inside strings +syntax match subxGlobal %\(/\)\@<!\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar " tweak the red color from the colorscheme just a tad to improve contrast highlight SpecialChar ctermfg=196 |