about summary refs log tree commit diff stats
path: root/html/subx/010---vm.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/010---vm.cc.html')
-rw-r--r--html/subx/010---vm.cc.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/html/subx/010---vm.cc.html b/html/subx/010---vm.cc.html
index 5019bf6e..86ac7aec 100644
--- a/html/subx/010---vm.cc.html
+++ b/html/subx/010---vm.cc.html
@@ -131,7 +131,7 @@ if ('onhashchange' in window) {
 <span id="L70" class="LineNr"> 70 </span>  <span class="Comment">/*</span><span class="Comment"> arg1 and arg2 must be signed </span><span class="Comment">*/</span> \
 <span id="L71" class="LineNr"> 71 </span>  <span class="Normal">int64_t</span> tmp = arg1 op arg2<span class="Delimiter">;</span> \
 <span id="L72" class="LineNr"> 72 </span>  arg1 = arg1 op arg2<span class="Delimiter">;</span> \
-<span id="L73" class="LineNr"> 73 </span>  <a href='003trace.cc.html#L196'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; arg1 &lt;&lt; <a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span> \
+<span id="L73" class="LineNr"> 73 </span>  <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; arg1 &lt;&lt; <a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span> \
 <span id="L74" class="LineNr"> 74 </span>  SF = <span class="Delimiter">(</span>arg1 &lt; <span class="Constant">0</span><span class="Delimiter">);</span> \
 <span id="L75" class="LineNr"> 75 </span>  ZF = <span class="Delimiter">(</span>arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> \
 <span id="L76" class="LineNr"> 76 </span>  <a href='010---vm.cc.html#L59'>OF</a> = <span class="Delimiter">(</span>arg1 != tmp<span class="Delimiter">);</span> \
@@ -142,7 +142,7 @@ if ('onhashchange' in window) {
 <span id="L81" class="LineNr"> 81 </span><span class="Comment">#define BINARY_BITWISE_OP(op, arg1, arg2) { \</span>
 <span id="L82" class="LineNr"> 82 </span>  <span class="Comment">/*</span><span class="Comment"> arg1 and arg2 must be unsigned </span><span class="Comment">*/</span> \
 <span id="L83" class="LineNr"> 83 </span>  arg1 = arg1 op arg2<span class="Delimiter">;</span> \
-<span id="L84" class="LineNr"> 84 </span>  <a href='003trace.cc.html#L196'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; arg1 &lt;&lt; <a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span> \
+<span id="L84" class="LineNr"> 84 </span>  <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; arg1 &lt;&lt; <a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span> \
 <span id="L85" class="LineNr"> 85 </span>  SF = <span class="Delimiter">(</span>arg1 &gt;&gt; <span class="Constant">31</span><span class="Delimiter">);</span> \
 <span id="L86" class="LineNr"> 86 </span>  ZF = <span class="Delimiter">(</span>arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> \
 <span id="L87" class="LineNr"> 87 </span>  <a href='010---vm.cc.html#L59'>OF</a> =<span class="Constant"> false</span><span class="Delimiter">;</span> \
@@ -210,7 +210,7 @@ if ('onhashchange' in window) {
 <span id="L149" class="LineNr">149 </span><span class="Comment">// skeleton of how x86 instructions are decoded</span>
 <span id="L150" class="LineNr">150 </span><span class="Normal">void</span> <a href='010---vm.cc.html#L150'>run_one_instruction</a><span class="Delimiter">()</span> <span class="Delimiter">{</span>
 <span id="L151" class="LineNr">151 </span>  <span class="Normal">uint8_t</span> op=<span class="Constant">0</span><span class="Delimiter">,</span> op2=<span class="Constant">0</span><span class="Delimiter">,</span> op3=<span class="Constant">0</span><span class="Delimiter">;</span>
-<span id="L152" class="LineNr">152 </span>  <a href='003trace.cc.html#L196'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;inst: 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; <a href='010---vm.cc.html#L29'>EIP</a> &lt;&lt; <a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span>
+<span id="L152" class="LineNr">152 </span>  <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;inst: 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L260'>HEXWORD</a> &lt;&lt; <a href='010---vm.cc.html#L29'>EIP</a> &lt;&lt; <a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span>
 <span id="L153" class="LineNr">153 </span><span class="CommentedCode">//?   dump_registers();</span>
 <span id="L154" class="LineNr">154 </span><span class="CommentedCode">//?   cerr &lt;&lt; &quot;inst: 0x&quot; &lt;&lt; EIP &lt;&lt; &quot; =&gt; &quot;;</span>
 <span id="L155" class="LineNr">155 </span>  op = <a href='010---vm.cc.html#L214'>next</a><span class="Delimiter">();</span>
@@ -225,7 +225,7 @@ if ('onhashchange' in window) {
 <span id="L164" class="LineNr">164 </span>    <span class="Comment">// End Two-Byte Opcodes Starting With 0f</span>
 <span id="L165" class="LineNr">165 </span>    <span class="Normal">default</span>:
 <span id="L166" class="LineNr">166 </span>      cerr &lt;&lt; <span class="Constant">&quot;unrecognized second opcode after 0f: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op2<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L167" class="LineNr">167 </span>      <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L167" class="LineNr">167 </span>      <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L168" class="LineNr">168 </span>      exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L169" class="LineNr">169 </span>    <span class="Delimiter">}</span>
 <span id="L170" class="LineNr">170 </span>    <span class="Identifier">break</span><span class="Delimiter">;</span>
@@ -237,13 +237,13 @@ if ('onhashchange' in window) {
 <span id="L176" class="LineNr">176 </span>      <span class="Comment">// End Three-Byte Opcodes Starting With f2 0f</span>
 <span id="L177" class="LineNr">177 </span>      <span class="Normal">default</span>:
 <span id="L178" class="LineNr">178 </span>        cerr &lt;&lt; <span class="Constant">&quot;unrecognized third opcode after f2 0f: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op3<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L179" class="LineNr">179 </span>        <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L179" class="LineNr">179 </span>        <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L180" class="LineNr">180 </span>        exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L181" class="LineNr">181 </span>      <span class="Delimiter">}</span>
 <span id="L182" class="LineNr">182 </span>      <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L183" class="LineNr">183 </span>    <span class="Normal">default</span>:
 <span id="L184" class="LineNr">184 </span>      cerr &lt;&lt; <span class="Constant">&quot;unrecognized second opcode after f2: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op2<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L185" class="LineNr">185 </span>      <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L185" class="LineNr">185 </span>      <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L186" class="LineNr">186 </span>      exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L187" class="LineNr">187 </span>    <span class="Delimiter">}</span>
 <span id="L188" class="LineNr">188 </span>    <span class="Identifier">break</span><span class="Delimiter">;</span>
@@ -255,19 +255,19 @@ if ('onhashchange' in window) {
 <span id="L194" class="LineNr">194 </span>      <span class="Comment">// End Three-Byte Opcodes Starting With f3 0f</span>
 <span id="L195" class="LineNr">195 </span>      <span class="Normal">default</span>:
 <span id="L196" class="LineNr">196 </span>        cerr &lt;&lt; <span class="Constant">&quot;unrecognized third opcode after f3 0f: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op3<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L197" class="LineNr">197 </span>        <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L197" class="LineNr">197 </span>        <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L198" class="LineNr">198 </span>        exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L199" class="LineNr">199 </span>      <span class="Delimiter">}</span>
 <span id="L200" class="LineNr">200 </span>      <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L201" class="LineNr">201 </span>    <span class="Normal">default</span>:
 <span id="L202" class="LineNr">202 </span>      cerr &lt;&lt; <span class="Constant">&quot;unrecognized second opcode after f3: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op2<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L203" class="LineNr">203 </span>      <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L203" class="LineNr">203 </span>      <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L204" class="LineNr">204 </span>      exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L205" class="LineNr">205 </span>    <span class="Delimiter">}</span>
 <span id="L206" class="LineNr">206 </span>    <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L207" class="LineNr">207 </span>  <span class="Normal">default</span>:
 <span id="L208" class="LineNr">208 </span>    cerr &lt;&lt; <span class="Constant">&quot;unrecognized opcode: &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L259'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L262'>NUM</a><span class="Delimiter">(</span>op<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L209" class="LineNr">209 </span>    <a href='003trace.cc.html#L200'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L209" class="LineNr">209 </span>    <a href='003trace.cc.html#L208'>DUMP</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L210" class="LineNr">210 </span>    exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L211" class="LineNr">211 </span>  <span class="Delimiter">}</span>
 <span id="L212" class="LineNr">212 </span><span class="Delimiter">}</span>
@@ -301,13 +301,13 @@ if ('onhashchange' in window) {
 <span id="L240" class="LineNr">240 </span><span class="Delimiter">:(before &quot;End <a href='001help.cc.html#L53'>Help</a> Special-cases(key)&quot;)</span>
 <span id="L241" class="LineNr">241 </span><span class="Normal">if</span> <span class="Delimiter">(</span>key == <span class="Constant">&quot;opcodes&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L242" class="LineNr">242 </span>  cerr &lt;&lt; <span class="Constant">&quot;Opcodes currently supported by SubX:</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
-<span id="L243" class="LineNr">243 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L228'>name</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L228'>name</a><span class="Delimiter">.</span><a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
+<span id="L243" class="LineNr">243 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L228'>name</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L228'>name</a><span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
 <span id="L244" class="LineNr">244 </span>    cerr &lt;&lt; <span class="Constant">&quot;  &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>first &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>second &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L245" class="LineNr">245 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L229'>name_0f</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L229'>name_0f</a><span class="Delimiter">.</span><a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
+<span id="L245" class="LineNr">245 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L229'>name_0f</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L229'>name_0f</a><span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
 <span id="L246" class="LineNr">246 </span>    cerr &lt;&lt; <span class="Constant">&quot;  0f &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>first &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>second &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L247" class="LineNr">247 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L230'>name_f3</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L230'>name_f3</a><span class="Delimiter">.</span><a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
+<span id="L247" class="LineNr">247 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L230'>name_f3</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L230'>name_f3</a><span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
 <span id="L248" class="LineNr">248 </span>    cerr &lt;&lt; <span class="Constant">&quot;  f3 &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>first &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>second &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-<span id="L249" class="LineNr">249 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L231'>name_f3_0f</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L231'>name_f3_0f</a><span class="Delimiter">.</span><a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
+<span id="L249" class="LineNr">249 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::iterator p = <a href='010---vm.cc.html#L231'>name_f3_0f</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span>  p != <a href='010---vm.cc.html#L231'>name_f3_0f</a><span class="Delimiter">.</span><a href='003trace.cc.html#L230'>end</a><span class="Delimiter">();</span>  ++p<span class="Delimiter">)</span>
 <span id="L250" class="LineNr">250 </span>    cerr &lt;&lt; <span class="Constant">&quot;  f3 0f &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>first &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>second &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
 <span id="L251" class="LineNr">251 </span>  cerr &lt;&lt; <span class="Constant">&quot;Run `subx help instructions` for details on <a href='011run.cc.html#L118'>words</a> like 'r32' and 'disp8'.</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
 <span id="L252" class="LineNr">252 </span>  <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span>