<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 9S12X assembly instruction clarification in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1308414#M18000</link>
    <description>&lt;P&gt;Hi Robert,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1626351242178.png" style="width: 646px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149913iEE2A74A08FB28D28/image-dimensions/646x179?v=v2" width="646" height="179" role="button" title="danielmartynek_0-1626351242178.png" alt="danielmartynek_0-1626351242178.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1626351293290.png" style="width: 659px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149914iB997AE7EDF59AF99/image-dimensions/659x339?v=v2" width="659" height="339" role="button" title="danielmartynek_1-1626351293290.png" alt="danielmartynek_1-1626351293290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, (8+2) is an offset to location M which is the SP in this case&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_2-1626351360222.png" style="width: 748px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149915i8A72F62857035F07/image-dimensions/748x590?v=v2" width="748" height="590" role="button" title="danielmartynek_2-1626351360222.png" alt="danielmartynek_2-1626351360222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_3-1626351397508.png" style="width: 749px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149916i3202F3CB55BA73E5/image-dimensions/749x589?v=v2" width="749" height="589" role="button" title="danielmartynek_3-1626351397508.png" alt="danielmartynek_3-1626351397508.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;M = 0x6E, M+1 = 0x88 which is added to D (A = 0x00, B=0x00).&lt;/P&gt;
&lt;P&gt;D = 0x6E88&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 12:23:57 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2021-07-15T12:23:57Z</dc:date>
    <item>
      <title>9S12X assembly instruction clarification</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1302590#M17964</link>
      <description>&lt;P&gt;I have some assembly code written for the 9S12X that I am trying to figure out what it does. One instruction is:&lt;/P&gt;&lt;P&gt;ADDD 8,SP&amp;nbsp; &amp;nbsp;I believe that is and instruction to add the contents of Accu D with the contents at stack +8.&lt;/P&gt;&lt;P&gt;Another instruction is :&lt;/P&gt;&lt;P&gt;ADDD (8+2),SP&amp;nbsp; Is that the same as ADDD 10,SP which would be an instruction to add the contents of Accu D with the contents at stack +10?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 20:40:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1302590#M17964</guid>
      <dc:creator>roberthiebert</dc:creator>
      <dc:date>2021-07-05T20:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12X assembly instruction clarification</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1306954#M17989</link>
      <description>&lt;P&gt;Hello Robert,&lt;/P&gt;
&lt;P&gt;I'm sorry for the delay.&lt;/P&gt;
&lt;P&gt;It is explained in the CPU12X reference manual v01.04.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1626178642806.png" style="width: 648px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149668i4D22B10F49F3BE45/image-dimensions/648x214?v=v2" width="648" height="214" role="button" title="danielmartynek_0-1626178642806.png" alt="danielmartynek_0-1626178642806.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It concatenates the content of M with the content of M+1 and adds it to the accumulator D.&lt;/P&gt;
&lt;P&gt;I believe you can test it in CW 5.2, there is a simulator if you don't have any board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 12:21:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1306954#M17989</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-07-13T12:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12X assembly instruction clarification</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1307095#M17990</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Thanks for your response. Yes, I had looked up the ADDD instruction as you posted, and it makes sense when ADDD is followed by a memory location, but I am still confused as to what (8+2),SP means. I'm afraid that any manipulations on the stack confuse me easily.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 16:15:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1307095#M17990</guid>
      <dc:creator>roberthiebert</dc:creator>
      <dc:date>2021-07-13T16:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12X assembly instruction clarification</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1308414#M18000</link>
      <description>&lt;P&gt;Hi Robert,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1626351242178.png" style="width: 646px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149913iEE2A74A08FB28D28/image-dimensions/646x179?v=v2" width="646" height="179" role="button" title="danielmartynek_0-1626351242178.png" alt="danielmartynek_0-1626351242178.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1626351293290.png" style="width: 659px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149914iB997AE7EDF59AF99/image-dimensions/659x339?v=v2" width="659" height="339" role="button" title="danielmartynek_1-1626351293290.png" alt="danielmartynek_1-1626351293290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, (8+2) is an offset to location M which is the SP in this case&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_2-1626351360222.png" style="width: 748px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149915i8A72F62857035F07/image-dimensions/748x590?v=v2" width="748" height="590" role="button" title="danielmartynek_2-1626351360222.png" alt="danielmartynek_2-1626351360222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_3-1626351397508.png" style="width: 749px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149916i3202F3CB55BA73E5/image-dimensions/749x589?v=v2" width="749" height="589" role="button" title="danielmartynek_3-1626351397508.png" alt="danielmartynek_3-1626351397508.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;M = 0x6E, M+1 = 0x88 which is added to D (A = 0x00, B=0x00).&lt;/P&gt;
&lt;P&gt;D = 0x6E88&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 12:23:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1308414#M18000</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-07-15T12:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12X assembly instruction clarification</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1308509#M18001</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Got it, and thanks so much for the lesson in debugging. So it looks like I was correct in my original post where I thought that (8+2),SP could be the same as 10,SP. I wonder why the author would chose to do it that way?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12X-assembly-instruction-clarification/m-p/1308509#M18001</guid>
      <dc:creator>roberthiebert</dc:creator>
      <dc:date>2021-07-15T15:15:33Z</dc:date>
    </item>
  </channel>
</rss>

