about summary refs log tree commit diff stats
path: root/html/subx/011direct_addressing.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/011direct_addressing.cc.html')
-rw-r--r--html/subx/011direct_addressing.cc.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/html/subx/011direct_addressing.cc.html b/html/subx/011direct_addressing.cc.html
index 1738b2a2..dba0b3cf 100644
--- a/html/subx/011direct_addressing.cc.html
+++ b/html/subx/011direct_addressing.cc.html
@@ -279,6 +279,32 @@ if ('onhashchange' in window) {
 <span id="L214" class="LineNr">214 </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#L230'>HEXWORD</a> &lt;&lt; *arg1 &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L215" class="LineNr">215 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L216" class="LineNr">216 </span><span class="Delimiter">}</span>
+<span id="L217" class="LineNr">217 </span>
+<span id="L218" class="LineNr">218 </span><span class="SalientComment">//:: push</span>
+<span id="L219" class="LineNr">219 </span>
+<span id="L220" class="LineNr">220 </span><span class="Delimiter">:(scenario push_r32)</span>
+<span id="L221" class="LineNr">221 </span><span class="Special">% Reg[ESP].u = 0x64;</span>
+<span id="L222" class="LineNr">222 </span><span class="Special">% Reg[EBX].i = 10;</span>
+<span id="L223" class="LineNr">223 </span><span class="Comment"># op  ModRM   SIB   displacement  immediate</span>
+<span id="L224" class="LineNr">224 </span>  <span class="Constant">50</span>  <span class="PreProc">0</span><span class="Constant">3</span>                                      <span class="Comment"># push EBX (reg 3) to stack</span>
+<span id="L225" class="LineNr">225 </span><span class="traceContains">+run: push <a href='010core.cc.html#L17'>reg</a> 3</span>
+<span id="L226" class="LineNr">226 </span><span class="traceContains">+run: pushing value 0x0000000a</span>
+<span id="L227" class="LineNr">227 </span><span class="traceContains">+run: <a href='010core.cc.html#L11'>ESP</a> is now 0x00000060</span>
+<span id="L228" class="LineNr">228 </span><span class="traceContains">+run: <a href='003trace.cc.html#L74'>contents</a> at <a href='010core.cc.html#L11'>ESP</a>: 0x0000000a</span>
+<span id="L229" class="LineNr">229 </span>
+<span id="L230" class="LineNr">230 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
+<span id="L231" class="LineNr">231 </span><span class="Normal">case</span> <span class="Constant">0x50</span>: <span class="Delimiter">{</span>
+<span id="L232" class="LineNr">232 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L214'>next</a><span class="Delimiter">();</span>
+<span id="L233" class="LineNr">233 </span>  <span class="Normal">uint8_t</span> <a href='010core.cc.html#L17'>reg</a> = modrm &amp; <span class="Constant">0x7</span><span class="Delimiter">;</span>
+<span id="L234" class="LineNr">234 </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;push <a href='010core.cc.html#L17'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L232'>NUM</a><span class="Delimiter">(</span><a href='010core.cc.html#L17'>reg</a><span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L235" class="LineNr">235 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span> val = Reg[reg]<span class="Delimiter">.</span>u<span class="Delimiter">;</span>
+<span id="L236" class="LineNr">236 </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;pushing value 0x&quot;</span> &lt;&lt; <a href='010core.cc.html#L230'>HEXWORD</a> &lt;&lt; val &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L237" class="LineNr">237 </span>  Reg[ESP]<span class="Delimiter">.</span>u -= <span class="Constant">4</span><span class="Delimiter">;</span>
+<span id="L238" class="LineNr">238 </span>  *<span class="Normal">reinterpret_cast</span>&lt;<span class="Normal">uint32_t</span>*&gt;<span class="Delimiter">(</span>&amp;Mem<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Reg[ESP]<span class="Delimiter">.</span>u<span class="Delimiter">))</span> = val<span class="Delimiter">;</span>
+<span id="L239" class="LineNr">239 </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;ESP is now 0x&quot;</span> &lt;&lt; <a href='010core.cc.html#L230'>HEXWORD</a> &lt;&lt; Reg[ESP]<span class="Delimiter">.</span>u &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L240" class="LineNr">240 </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;contents at <a href='010core.cc.html#L11'>ESP</a>: 0x&quot;</span> &lt;&lt; <a href='010core.cc.html#L230'>HEXWORD</a> &lt;&lt; *<span class="Normal">reinterpret_cast</span>&lt;<span class="Normal">uint32_t</span>*&gt;<span class="Delimiter">(</span>&amp;Mem<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Reg[ESP]<span class="Delimiter">.</span>u<span class="Delimiter">))</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L241" class="LineNr">241 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span id="L242" class="LineNr">242 </span><span class="Delimiter">}</span>
 </pre>
 </body>
 </html>