diff options
Diffstat (limited to 'html/subx/012indirect_addressing.cc.html')
-rw-r--r-- | html/subx/012indirect_addressing.cc.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/html/subx/012indirect_addressing.cc.html b/html/subx/012indirect_addressing.cc.html index ef408d32..b64886da 100644 --- a/html/subx/012indirect_addressing.cc.html +++ b/html/subx/012indirect_addressing.cc.html @@ -80,9 +80,9 @@ if ('onhashchange' in window) { <span id="L15" class="LineNr"> 15 </span> <span class="Comment">// mod 0 is usually indirect addressing</span> <span id="L16" class="LineNr"> 16 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>rm<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L17" class="LineNr"> 17 </span> <span class="Normal">default</span>: -<span id="L18" class="LineNr"> 18 </span> <span class="Conceal">¦</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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"effective address is mem at address 0x"</span> << std::hex << Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> << <span class="Constant">" (reg "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> -<span id="L19" class="LineNr"> 19 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> + <span class="Normal">sizeof</span><span class="Delimiter">(</span><span class="Normal">int32_t</span><span class="Delimiter">)</span> <= <a href='010core.cc.html#L65'>Mem</a><span class="Delimiter">.</span>size<span class="Delimiter">());</span> -<span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span> result = <span class="Normal">reinterpret_cast</span><<span class="Normal">int32_t</span>*><span class="Delimiter">(</span>&Mem<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">));</span> <span class="Comment">// rely on the host itself being in little-endian order</span> +<span id="L18" class="LineNr"> 18 </span> <span class="Conceal">¦</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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"effective address is mem at address 0x"</span> << std::hex << Reg[rm]<span class="Delimiter">.</span>u << <span class="Constant">" (reg "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L19" class="LineNr"> 19 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span>u + <span class="Normal">sizeof</span><span class="Delimiter">(</span><span class="Normal">int32_t</span><span class="Delimiter">)</span> <= <a href='010core.cc.html#L65'>Mem</a><span class="Delimiter">.</span>size<span class="Delimiter">());</span> +<span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span> result = <span class="Normal">reinterpret_cast</span><<span class="Normal">int32_t</span>*><span class="Delimiter">(</span>&Mem<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span>u<span class="Delimiter">));</span> <span class="Comment">// rely on the host itself being in little-endian order</span> <span id="L21" class="LineNr"> 21 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L22" class="LineNr"> 22 </span> <span class="Comment">// End Mod 0 Special-cases</span> <span id="L23" class="LineNr"> 23 </span> <span class="Delimiter">}</span> @@ -106,7 +106,7 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L42" class="LineNr"> 42 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"add effective address to <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L43" class="LineNr"> 43 </span> <span class="Normal">const</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="L44" class="LineNr"> 44 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>+<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> +<span id="L44" class="LineNr"> 44 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>+<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> <span id="L45" class="LineNr"> 45 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L46" class="LineNr"> 46 </span><span class="Delimiter">}</span> <span id="L47" class="LineNr"> 47 </span> @@ -140,7 +140,7 @@ if ('onhashchange' in window) { <span id="L75" class="LineNr"> 75 </span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L76" class="LineNr"> 76 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"subtract effective address from <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L77" class="LineNr"> 77 </span> <span class="Normal">const</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="L78" class="LineNr"> 78 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> +<span id="L78" class="LineNr"> 78 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> <span id="L79" class="LineNr"> 79 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L80" class="LineNr"> 80 </span><span class="Delimiter">}</span> <span id="L81" class="LineNr"> 81 </span> @@ -174,7 +174,7 @@ if ('onhashchange' in window) { <span id="L109" class="LineNr">109 </span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L110" class="LineNr">110 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"and effective address with <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L111" class="LineNr">111 </span> <span class="Normal">const</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="L112" class="LineNr">112 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> +<span id="L112" class="LineNr">112 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span>u<span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> <span id="L113" class="LineNr">113 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L114" class="LineNr">114 </span><span class="Delimiter">}</span> <span id="L115" class="LineNr">115 </span> @@ -208,7 +208,7 @@ if ('onhashchange' in window) { <span id="L143" class="LineNr">143 </span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L144" class="LineNr">144 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"or effective address with <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L145" class="LineNr">145 </span> <span class="Normal">const</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="L146" class="LineNr">146 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> +<span id="L146" class="LineNr">146 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span>u<span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> <span id="L147" class="LineNr">147 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L148" class="LineNr">148 </span><span class="Delimiter">}</span> <span id="L149" class="LineNr">149 </span> @@ -242,7 +242,7 @@ if ('onhashchange' in window) { <span id="L177" class="LineNr">177 </span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L178" class="LineNr">178 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"xor effective address with <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L179" class="LineNr">179 </span> <span class="Normal">const</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="L180" class="LineNr">180 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> +<span id="L180" class="LineNr">180 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span>u<span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span> <span id="L181" class="LineNr">181 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L182" class="LineNr">182 </span><span class="Delimiter">}</span> <span id="L183" class="LineNr">183 </span> @@ -307,7 +307,7 @@ if ('onhashchange' in window) { <span id="L242" class="LineNr">242 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L212'>next</a><span class="Delimiter">();</span> <span id="L243" class="LineNr">243 </span> <span class="Normal">uint8_t</span> reg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L244" class="LineNr">244 </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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"compare effective address with <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>reg1<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> -<span id="L245" class="LineNr">245 </span> <span class="Normal">int32_t</span> arg1 = Reg[reg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">;</span> +<span id="L245" class="LineNr">245 </span> <span class="Normal">int32_t</span> arg1 = Reg[reg1]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> <span id="L246" class="LineNr">246 </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="L247" class="LineNr">247 </span> <span class="Normal">int32_t</span> tmp1 = arg1 - *arg2<span class="Delimiter">;</span> <span id="L248" class="LineNr">248 </span> SF = <span class="Delimiter">(</span>tmp1 < <span class="Constant">0</span><span class="Delimiter">);</span> @@ -366,7 +366,7 @@ if ('onhashchange' in window) { <span id="L301" class="LineNr">301 </span> <span class="Normal">uint8_t</span> reg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"copy effective address to <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L230'>NUM</a><span class="Delimiter">(</span>reg1<span class="Delimiter">)</span> << <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="L304" class="LineNr">304 </span> Reg[reg1]<span class="Delimiter">.</span>i = *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">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010core.cc.html#L228'>HEXWORD</a> << *arg2 << <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> |