<?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: Question about DSP 56K Assembly Syntax in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376631#M337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Keith,&lt;/P&gt;&lt;P&gt;Maybe I did not elaborate it clearly. Firstly, the following assembly instruction "btst" only polls a bit&amp;nbsp; in memory or register, and copy the bit logic to Carry bit in CCR register. for example the following instruction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;btst&lt;/TD&gt;&lt;TD&gt;#M_PD5,X:&amp;lt;&amp;lt;M_PDRC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the #M_PD5 bit is set, the C bit(bit 0 in CCR register) is set in CCR after the btst instruction, if the #M_PD5 bit is cleared, the C bit in CCR is cleared after the instruction. Note that the btst only polls the bit and take effect on the carry bit in&amp;nbsp; CCR, it does not clear or set the bit in memory or register. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bcc executes the jump based on the Carry bit in CCR register. For the instruction bcc _elsewhere, if the Carry bit&amp;nbsp; in CCR register is cleared, the code beginning with _elsewhere is executed, if the Carry bit is set, the next instruction will be executed.&lt;/P&gt;&lt;P&gt;In conclusion, the btst changes the carry bit in CCR, the bcc instruction will branch based on the carry bit logic in CCR.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2015 02:31:53 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2015-04-08T02:31:53Z</dc:date>
    <item>
      <title>Question about DSP 56K Assembly Syntax</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376628#M334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am coming up to speed on a project that uses a DSP 56303. The project is written completely in assembly, an old project.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking at code that has to do with testing and branching. The DSP Family Manual is a bit unclear to me on a few instructions.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I have&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;btst&amp;nbsp;&amp;nbsp;&amp;nbsp; #M_PD5,X:&amp;lt;&amp;lt;M_PDRC&lt;/P&gt;&lt;P&gt;bcc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _elsewhere&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What value does bit M_PD5 have for the code to branch to '_elsewhere', 0 or 1?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I have the following&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;btst&amp;nbsp;&amp;nbsp;&amp;nbsp; #M_PD5,X:&amp;lt;&amp;lt;M_PDRC&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;bcs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _elsewhere&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;this is branching on the opposite state of bit M_PD5 as the code above, correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 13:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376628#M334</guid>
      <dc:creator>Keith4DSmith</dc:creator>
      <dc:date>2015-04-03T13:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question about DSP 56K Assembly Syntax</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376629#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Keith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the assembly instruction, pls download the DSP56300 family manual and refer to the instruction.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="jive-link-external-small" href="http://tinyurl.com/qjgst3l" target="_blank"&gt;http://tinyurl.com/qjgst3l&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For the assembly instruction&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;btst&amp;nbsp;&amp;nbsp;&amp;nbsp; #M_PD5,X:&amp;lt;&amp;lt;M_PDRC&lt;/P&gt;&lt;P&gt;bcc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _elsewhere&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The btst instruction tests the bit specified by the #M_PD5 in the memory location specified by ,X:&amp;lt;&amp;lt;M_PDRC, the "&amp;lt;&amp;lt;" means that the X:M_PDRC address is a short I/O address which ranges from $FFFF80 to $FFFFFF. after the btst instruction, the bit value will change the carry bit(bit 0) in CCR register of the status register.&lt;/P&gt;&lt;P&gt;the bcc means "branch to _elsewhere" if the carry bit is cleared. The bcs instruction means "branch to somewhere" if the carry bit is set.&lt;/P&gt;&lt;P&gt;In conclusion, the btst instruction tests a bit in register and change the carry bit(bit 0) in CCR register, the bcc will branch based on the carry bit in CCR register.&lt;/P&gt;&lt;P&gt;The characters&amp;nbsp; "&amp;lt;&amp;lt;" means it is a short address mode, it means that the btst is a one word instruction.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 03:02:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376629#M335</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-04-07T03:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Question about DSP 56K Assembly Syntax</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376630#M336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;XiangJun Rong - Yes, I have read the DSP56300 family manual. I have read the paragraph you copied above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still confused about '...the bit value will change the carry bit(bit 0)... bcc means 'branch to _elsewhere' if the carry bit is cleared.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...If #M_PD5 is set, and one executes 'btst &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;#M_PD5,X:&amp;lt;&amp;lt;M_PDRC'&lt;/SPAN&gt;&amp;nbsp; is the carry bit cleared or set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 18:58:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376630#M336</guid>
      <dc:creator>Keith4DSmith</dc:creator>
      <dc:date>2015-04-07T18:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question about DSP 56K Assembly Syntax</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376631#M337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Keith,&lt;/P&gt;&lt;P&gt;Maybe I did not elaborate it clearly. Firstly, the following assembly instruction "btst" only polls a bit&amp;nbsp; in memory or register, and copy the bit logic to Carry bit in CCR register. for example the following instruction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;btst&lt;/TD&gt;&lt;TD&gt;#M_PD5,X:&amp;lt;&amp;lt;M_PDRC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the #M_PD5 bit is set, the C bit(bit 0 in CCR register) is set in CCR after the btst instruction, if the #M_PD5 bit is cleared, the C bit in CCR is cleared after the instruction. Note that the btst only polls the bit and take effect on the carry bit in&amp;nbsp; CCR, it does not clear or set the bit in memory or register. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bcc executes the jump based on the Carry bit in CCR register. For the instruction bcc _elsewhere, if the Carry bit&amp;nbsp; in CCR register is cleared, the code beginning with _elsewhere is executed, if the Carry bit is set, the next instruction will be executed.&lt;/P&gt;&lt;P&gt;In conclusion, the btst changes the carry bit in CCR, the bcc instruction will branch based on the carry bit logic in CCR.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 02:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Question-about-DSP-56K-Assembly-Syntax/m-p/376631#M337</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-04-08T02:31:53Z</dc:date>
    </item>
  </channel>
</rss>

