diff options
Diffstat (limited to 'html/subx/011direct_addressing.cc.html')
-rw-r--r-- | html/subx/011direct_addressing.cc.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/html/subx/011direct_addressing.cc.html b/html/subx/011direct_addressing.cc.html index 7918cf20..a74072e6 100644 --- a/html/subx/011direct_addressing.cc.html +++ b/html/subx/011direct_addressing.cc.html @@ -76,9 +76,9 @@ if ('onhashchange' in window) { <span id="L11" class="LineNr"> 11 </span> <span id="L12" class="LineNr"> 12 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L13" class="LineNr"> 13 </span><span class="Normal">case</span> <span class="Constant">0x01</span>: <span class="Delimiter">{</span> <span class="Comment">// add r32 to r/m32</span> -<span id="L14" class="LineNr"> 14 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L14" class="LineNr"> 14 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L15" class="LineNr"> 15 </span> <span class="Normal">uint8_t</span> arg2 = <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="L16" class="LineNr"> 16 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" to effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L16" class="LineNr"> 16 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" to effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L17" class="LineNr"> 17 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L18" class="LineNr"> 18 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>+<span class="Delimiter">,</span> *arg1<span class="Delimiter">,</span> Reg[arg2]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">);</span> <span id="L19" class="LineNr"> 19 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -96,12 +96,12 @@ if ('onhashchange' in window) { <span id="L31" class="LineNr"> 31 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>mod<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L32" class="LineNr"> 32 </span> <span class="Normal">case</span> <span class="Constant">3</span>: <span id="L33" class="LineNr"> 33 </span> <span class="Conceal">¦</span> <span class="Comment">// mod 3 is just register direct addressing</span> -<span id="L34" class="LineNr"> 34 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L34" class="LineNr"> 34 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L35" class="LineNr"> 35 </span> <span class="Conceal">¦</span> result = &Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">;</span> <span id="L36" class="LineNr"> 36 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L37" class="LineNr"> 37 </span> <span class="Comment">// End Mod Special-cases</span> <span id="L38" class="LineNr"> 38 </span> <span class="Normal">default</span>: -<span id="L39" class="LineNr"> 39 </span> <span class="Conceal">¦</span> cerr << <span class="Constant">"unrecognized mod bits: "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>mod<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L39" class="LineNr"> 39 </span> <span class="Conceal">¦</span> cerr << <span class="Constant">"unrecognized mod bits: "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>mod<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L40" class="LineNr"> 40 </span> <span class="Conceal">¦</span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L41" class="LineNr"> 41 </span> <span class="Delimiter">}</span> <span id="L42" class="LineNr"> 42 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> @@ -120,9 +120,9 @@ if ('onhashchange' in window) { <span id="L55" class="LineNr"> 55 </span> <span id="L56" class="LineNr"> 56 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L57" class="LineNr"> 57 </span><span class="Normal">case</span> <span class="Constant">0x29</span>: <span class="Delimiter">{</span> <span class="Comment">// subtract r32 from r/m32</span> -<span id="L58" class="LineNr"> 58 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L58" class="LineNr"> 58 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L59" class="LineNr"> 59 </span> <span class="Normal">uint8_t</span> arg2 = <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="L60" class="LineNr"> 60 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" from effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L60" class="LineNr"> 60 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" from effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L61" class="LineNr"> 61 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L62" class="LineNr"> 62 </span> <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> *arg1<span class="Delimiter">,</span> Reg[arg2]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">);</span> <span id="L63" class="LineNr"> 63 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -141,9 +141,9 @@ if ('onhashchange' in window) { <span id="L76" class="LineNr"> 76 </span> <span id="L77" class="LineNr"> 77 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L78" class="LineNr"> 78 </span><span class="Normal">case</span> <span class="Constant">0x21</span>: <span class="Delimiter">{</span> <span class="Comment">// and r32 with r/m32</span> -<span id="L79" class="LineNr"> 79 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L79" class="LineNr"> 79 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L80" class="LineNr"> 80 </span> <span class="Normal">uint8_t</span> arg2 = <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="L81" class="LineNr"> 81 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L81" class="LineNr"> 81 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L82" class="LineNr"> 82 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L83" class="LineNr"> 83 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&<span class="Delimiter">,</span> *arg1<span class="Delimiter">,</span> Reg[arg2]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">);</span> <span id="L84" class="LineNr"> 84 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -162,9 +162,9 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> <span id="L98" class="LineNr"> 98 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L99" class="LineNr"> 99 </span><span class="Normal">case</span> <span class="Constant">0x09</span>: <span class="Delimiter">{</span> <span class="Comment">// or r32 with r/m32</span> -<span id="L100" class="LineNr">100 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L100" class="LineNr">100 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L101" class="LineNr">101 </span> <span class="Normal">uint8_t</span> arg2 = <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="L102" class="LineNr">102 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L102" class="LineNr">102 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L103" class="LineNr">103 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L104" class="LineNr">104 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> *arg1<span class="Delimiter">,</span> Reg[arg2]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">);</span> <span id="L105" class="LineNr">105 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -183,9 +183,9 @@ if ('onhashchange' in window) { <span id="L118" class="LineNr">118 </span> <span id="L119" class="LineNr">119 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L120" class="LineNr">120 </span><span class="Normal">case</span> <span class="Constant">0x31</span>: <span class="Delimiter">{</span> <span class="Comment">// xor r32 with r/m32</span> -<span id="L121" class="LineNr">121 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L121" class="LineNr">121 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L122" class="LineNr">122 </span> <span class="Normal">uint8_t</span> arg2 = <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="L123" class="LineNr">123 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L123" class="LineNr">123 </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 <a href='010core.cc.html#L15'>reg</a> "</span> << <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L124" class="LineNr">124 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L125" class="LineNr">125 </span> <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>^<span class="Delimiter">,</span> *arg1<span class="Delimiter">,</span> Reg[arg2]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">);</span> <span id="L126" class="LineNr">126 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -203,11 +203,11 @@ if ('onhashchange' in window) { <span id="L138" class="LineNr">138 </span> <span id="L139" class="LineNr">139 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L140" class="LineNr">140 </span><span class="Normal">case</span> <span class="Constant">0xf7</span>: <span class="Delimiter">{</span> <span class="Comment">// xor r32 with r/m32</span> -<span id="L141" class="LineNr">141 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span> +<span id="L141" class="LineNr">141 </span> <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span> <span id="L142" class="LineNr">142 </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">"'not' of effective address"</span> << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L143" class="LineNr">143 </span> <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L144" class="LineNr">144 </span> *arg1 = ~<span class="Delimiter">(</span>*arg1<span class="Delimiter">);</span> -<span id="L145" class="LineNr">145 </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#L222'>HEXWORD</a> << *arg1 << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> +<span id="L145" class="LineNr">145 </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#L226'>HEXWORD</a> << *arg1 << <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span> <span id="L146" class="LineNr">146 </span> SF = <span class="Delimiter">(</span>*arg1 >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L147" class="LineNr">147 </span> <a href='010core.cc.html#L30'>ZF</a> = <span class="Delimiter">(</span>*arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L148" class="LineNr">148 </span> <a href='010core.cc.html#L31'>OF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> |