about summary refs log tree commit diff stats
path: root/html/subx/012indirect_addressing.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-15 00:06:37 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-15 00:06:37 -0700
commit125bea475fab2220e3e462986cfc8313fa937f7f (patch)
tree572373684305516deefbea2abab782629dc0d0f9 /html/subx/012indirect_addressing.cc.html
parent311297cb006201f4706704b32c762630806c7adb (diff)
downloadmu-125bea475fab2220e3e462986cfc8313fa937f7f.tar.gz
4067
subx: 'mov'
Diffstat (limited to 'html/subx/012indirect_addressing.cc.html')
-rw-r--r--html/subx/012indirect_addressing.cc.html35
1 files changed, 34 insertions, 1 deletions
diff --git a/html/subx/012indirect_addressing.cc.html b/html/subx/012indirect_addressing.cc.html
index ab3650f6..b43a2098 100644
--- a/html/subx/012indirect_addressing.cc.html
+++ b/html/subx/012indirect_addressing.cc.html
@@ -257,7 +257,7 @@ if ('onhashchange' in window) {
 <span id="L193" class="LineNr">193 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 3)</span>
 <span id="L194" class="LineNr">194 </span><span class="traceContains">+run: storing 0xf0f0ff00</span>
 <span id="L195" class="LineNr">195 </span>
-<span id="L196" class="LineNr">196 </span><span class="SalientComment">//:: compare</span>
+<span id="L196" class="LineNr">196 </span><span class="SalientComment">//:: compare (cmp)</span>
 <span id="L197" class="LineNr">197 </span>
 <span id="L198" class="LineNr">198 </span><span class="Delimiter">:(scenario compare_mem_at_r32_with_r32_greater)</span>
 <span id="L199" class="LineNr">199 </span><span class="Special">% Reg[0].i = 0x60;</span>
@@ -336,6 +336,39 @@ if ('onhashchange' in window) {
 <span id="L272" class="LineNr">272 </span><span class="traceContains">+run: compare effective address with <a href='010core.cc.html#L15'>reg</a> 3</span>
 <span id="L273" class="LineNr">273 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 0)</span>
 <span id="L274" class="LineNr">274 </span><span class="traceContains">+run: SF=0; ZF=1; OF=0</span>
+<span id="L275" class="LineNr">275 </span>
+<span id="L276" class="LineNr">276 </span><span class="SalientComment">//:: copy (mov)</span>
+<span id="L277" class="LineNr">277 </span>
+<span id="L278" class="LineNr">278 </span><span class="Delimiter">:(scenario copy_r32_to_mem_at_r32)</span>
+<span id="L279" class="LineNr">279 </span><span class="Special">% Reg[3].i = 0xaf;</span>
+<span id="L280" class="LineNr">280 </span><span class="Special">% Reg[0].i = 0x60;</span>
+<span id="L281" class="LineNr">281 </span><span class="Comment"># op  ModRM   SIB   displacement  immediate</span>
+<span id="L282" class="LineNr">282 </span>  <span class="Constant">89</span>  <span class="Constant">18</span>                                      <span class="Comment"># copy EBX (reg 3) to *EAX (reg 0)</span>
+<span id="L283" class="LineNr">283 </span><span class="traceContains">+run: copy <a href='010core.cc.html#L15'>reg</a> 3 to effective address</span>
+<span id="L284" class="LineNr">284 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 0)</span>
+<span id="L285" class="LineNr">285 </span><span class="traceContains">+run: storing 0x000000af</span>
+<span id="L286" class="LineNr">286 </span>
+<span id="L287" class="LineNr">287 </span><span class="Comment">//:</span>
+<span id="L288" class="LineNr">288 </span>
+<span id="L289" class="LineNr">289 </span><span class="Delimiter">:(scenario copy_mem_at_r32_to_r32)</span>
+<span id="L290" class="LineNr">290 </span><span class="Special">% Reg[0].i = 0x60;</span>
+<span id="L291" class="LineNr">291 </span><span class="Special">% SET_WORD_IN_MEM(0x60, 0x000000af);</span>
+<span id="L292" class="LineNr">292 </span><span class="Comment"># op  ModRM   SIB   displacement  immediate</span>
+<span id="L293" class="LineNr">293 </span>  8b  <span class="Constant">18</span>                                      <span class="Comment"># copy *EAX (reg 0) to EBX (reg 3)</span>
+<span id="L294" class="LineNr">294 </span><span class="traceContains">+run: copy effective address to <a href='010core.cc.html#L15'>reg</a> 3</span>
+<span id="L295" class="LineNr">295 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 0)</span>
+<span id="L296" class="LineNr">296 </span><span class="traceContains">+run: storing 0x000000af</span>
+<span id="L297" class="LineNr">297 </span>
+<span id="L298" class="LineNr">298 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
+<span id="L299" class="LineNr">299 </span><span class="Normal">case</span> <span class="Constant">0x8b</span>: <span class="Delimiter">{</span>  <span class="Comment">// copy r32 to r/m32</span>
+<span id="L300" class="LineNr">300 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span>
+<span id="L301" class="LineNr">301 </span>  <span class="Normal">uint8_t</span> reg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
+<span id="L302" class="LineNr">302 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;copy effective address to <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>reg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L303" class="LineNr">303 </span>  <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
+<span id="L304" class="LineNr">304 </span>  Reg[reg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a> = *arg2<span class="Delimiter">;</span>
+<span id="L305" class="LineNr">305 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</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='010core.cc.html#L226'>HEXWORD</a> &lt;&lt; *arg2 &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L306" class="LineNr">306 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span id="L307" class="LineNr">307 </span><span class="Delimiter">}</span>
 </pre>
 </body>
 </html>