<?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: C Macro with asm in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134244#M1407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Somebody has an idea ?&lt;BR /&gt;Can I use branch relative instructions inside C macro ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Emmanuel&lt;P&gt;Message Edited by BugMan on &lt;SPAN class="date_text"&gt;2006-10-25&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:02 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Oct 2006 20:57:48 GMT</pubDate>
    <dc:creator>Nouchi</dc:creator>
    <dc:date>2006-10-25T20:57:48Z</dc:date>
    <item>
      <title>C Macro with asm</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134243#M1406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here's my C macro&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;volatile uint32 myVar;#define myMACRO() asm {\&amp;nbsp; TST.L myVar\&amp;nbsp; BEQ LABEL\&amp;nbsp; ADD.L %-1,myVar\LABEL:\&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;SPAN&gt;I would like to know how to to genarate unique label each time the macro is used, I tried "\@" after label name but it doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the right syntax ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tahnks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2006 14:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134243#M1406</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2006-10-25T14:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: C Macro with asm</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134244#M1407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Somebody has an idea ?&lt;BR /&gt;Can I use branch relative instructions inside C macro ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Emmanuel&lt;P&gt;Message Edited by BugMan on &lt;SPAN class="date_text"&gt;2006-10-25&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:02 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2006 20:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134244#M1407</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2006-10-25T20:57:48Z</dc:date>
    </item>
    <item>
      <title>[SOLVED] Re: C Macro with asm</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134245#M1408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, The right syntax is in the header files: &lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;extern volatile uint32 myVar;inline asm void myFunction(void){  TST.L myVar  BEQ LABEL  ADD.L %-1,myVarLABEL:}#define myMACRO() myFunction()&lt;/PRE&gt;&lt;DIV&gt;&lt;/DIV&gt;Emmanuel,&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:36:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134245#M1408</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2006-10-26T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: C Macro with asm</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134246#M1409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I don't know what your compiler is, but GCC has a Very Useful Feature that allows silliness like:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF3300"&gt;#define myMACRO() asm {\&lt;BR /&gt;&amp;nbsp;TST.L myVar\&lt;BR /&gt;&amp;nbsp;BEQ 1f\&lt;BR /&gt;&amp;nbsp;ADD.L %-1,myVar\&lt;BR /&gt;1:\&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF3300"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;It appears in this case to search forward ( indicated by the 'f' ) for the next label 1:&amp;nbsp; ... I really like this in that it frees you from coming up with unique labels for landing points within subroutines, which you'd never call from outside.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;I have NO IDEA if other compilers allow this.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Nov 2006 00:09:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134246#M1409</guid>
      <dc:creator>ynaught</dc:creator>
      <dc:date>2006-11-18T00:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: C Macro with asm</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134247#M1410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Sorry, I forgot to mention that it was CodeWarrior 6.3 for ColdFire.&lt;BR /&gt;I think that CW documentation isn't clear enough about asm macro.&lt;BR /&gt;This kind of feature seems only works with in lined asm function in CodeWarrior.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Emmanuel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 16:31:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/C-Macro-with-asm/m-p/134247#M1410</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2006-11-20T16:31:50Z</dc:date>
    </item>
  </channel>
</rss>

