<?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: How to combine assembly code with C - Inline ASM example in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139316#M1209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks loads to everyone for your help!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2007 17:38:58 GMT</pubDate>
    <dc:creator>Jalen</dc:creator>
    <dc:date>2007-07-12T17:38:58Z</dc:date>
    <item>
      <title>How to combine assembly code with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139312#M1205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am new to code warrior and embedded design. How do i combine C code with assembly codes? Thx&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2007 15:53:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139312#M1205</guid>
      <dc:creator>Jalen</dc:creator>
      <dc:date>2007-07-08T15:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine assembly code with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139313#M1206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello and welcome to the forum.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;You can incorporate assembly instructions directly within a C function, using "inline assembly".&amp;nbsp; You should find further information within the manual for the compiler.&amp;nbsp; The format for some of the instructions will differ from that for "standard" assembler.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Alternatively, you could create a separate file, written in "standard" (relocatable) assembler,&amp;nbsp;and consisting of&amp;nbsp;assembly sub-routines.&amp;nbsp; However, parameter passing to these routines will need to match the requirements of C for the MCU you are using, and a prototype for each routine will need to be visible from the C module(s).&amp;nbsp; Perhaps the simplest method of handling parameters for the assembly routines is via global variables.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2007 19:40:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139313#M1206</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-08T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine assembly code with C - Inline ASM example</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139314#M1207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;The post referenced after is showing how to do INLINE assembly.&lt;BR /&gt;You create a asm{} and put your assembly code in the curly brackets:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=235" target="_blank"&gt;/message?board.id=CFCOMM&amp;amp;message.id=235&lt;/A&gt; &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=235" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=235" target="_blank&lt;/A&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;Look for "asm {" as a keyword in the search at the bottom of forum pages.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Alban.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 01:23:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139314#M1207</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-07-09T01:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine assembly code with C - Inline ASM example</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139315#M1208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just to close the loop here, the HC08 or HC12 assembler manual include a section around mixing C and assembly in an application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; - Depending on the CPU you are using open the file {Install}\Help\PDF\Assembler_HC08.pdf or&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{Install}\Help\PDF\Assembler_HC12.pdf.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; - For HC08 go to chapter "Using the HC(S)08 Assembler", section&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Mixed C and Assembler application"&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp; - For HC12 go to chapter "Using the HC(S)12 Assembler", section&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Mixed C and Assembler application".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 16:39:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139315#M1208</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-07-09T16:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine assembly code with C - Inline ASM example</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139316#M1209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks loads to everyone for your help!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 17:38:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-combine-assembly-code-with-C/m-p/139316#M1209</guid>
      <dc:creator>Jalen</dc:creator>
      <dc:date>2007-07-12T17:38:58Z</dc:date>
    </item>
  </channel>
</rss>

