<?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>8-bit Microcontrollers中的主题 Re: P&amp;E assembler to Codewarrior</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192666#M14878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the info.&lt;BR /&gt;Still stuck on some things:&lt;BR /&gt;I am using the assembly format:&lt;BR /&gt;_ asm {&lt;BR /&gt;blaa&lt;BR /&gt;blaa&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;- Why does the assembler NOT ignore math symbols in a comment line?&amp;nbsp; (ie&amp;nbsp;&amp;nbsp;&amp;nbsp; ; hello * 12&amp;nbsp;&amp;nbsp; causes error)&lt;BR /&gt;- Label EQU causes error&amp;nbsp; 'invalid opcode or : expected'&lt;BR /&gt;DATAREVH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; DATA FORMAT&lt;BR /&gt;&amp;nbsp;I have tried with a colon after the label, then a&amp;nbsp; 'end of line expected' error.&lt;BR /&gt;&lt;BR /&gt;- The help states that there is an option to ignore label colons in the assembler. But I cant find it. CW v5.0.9 build 2404&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2008 08:32:19 GMT</pubDate>
    <dc:creator>donw</dc:creator>
    <dc:date>2008-10-10T08:32:19Z</dc:date>
    <item>
      <title>P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192664#M14876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is my first attempt to convert a P&amp;amp;E assembler code (S08) into&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeWarrior . (using&amp;nbsp; _asm&amp;nbsp; in C code assembly)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Some strange things someone may be able to help with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Maths operators and quotes on a comment line (ie after a &lt;/SPAN&gt;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif"&gt;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/A&gt;&lt;SPAN&gt; cause errors. I would have thought the line was ignored!&amp;nbsp;&amp;nbsp;&amp;nbsp; (putting ; //&amp;nbsp; solves the problem !)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;How do I express a binary format number?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDA&amp;nbsp; #%01101101&amp;nbsp;&amp;nbsp; causes an 'octal number' error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- How doI express a decimal number such as LDA #01&amp;nbsp;&amp;nbsp;&amp;nbsp; (again an octal error if there is a leading zero. I would like to show a leading zero somehow)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 06:48:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192664#M14876</guid>
      <dc:creator>donw</dc:creator>
      <dc:date>2008-10-10T06:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192665#M14877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&amp;gt;- Maths operators and quotes on a comment line (ie after a &lt;IMG border="0" height="16" src="http://forums.freescale.com/../../i/smilies/16x16_smiley-wink.gif" width="16" /&gt; cause errors.&lt;BR /&gt;&amp;gt;I would have thought the line was ignored!&amp;nbsp;&amp;nbsp;&amp;nbsp; (putting ; //&amp;nbsp; solves the problem !)&lt;BR /&gt;&lt;BR /&gt;There are two forms for HLI, in the __asm nop; the semicolon is just the usual C statement terminator.&lt;BR /&gt;Therefore everything following it has to be legal C too.&lt;BR /&gt;The other form is&lt;BR /&gt;__asm {&lt;BR /&gt;&amp;nbsp; nop; comment&lt;BR /&gt;}&lt;BR /&gt;Here the assembly line is line terminated. However it is not possible to use this form in macros expand&lt;BR /&gt;to a single line only. Anyway, I would suggest to stick with the ";// comments". It also helps the syntax coloring.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; How do I express a binary format number?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDA&amp;nbsp; #%01101101&amp;nbsp;&amp;nbsp; causes an 'octal number' error.&lt;BR /&gt;There is no support for binary numbers in C. However the Metrowerks compiler supports binary numbers with a&lt;BR /&gt;0b0101010 syntax. In HLI code, I feel free to use that, as HLI is compiler specific anyway.&lt;BR /&gt;In plain C code I usually use decimal/hex only in order to just use ANSI C.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; - How do I express a decimal number such as LDA #01&amp;nbsp;&amp;nbsp;&amp;nbsp; (again an octal error if there is a leading zero.&lt;BR /&gt;&amp;gt; I would like to show a leading zero somehow)&lt;BR /&gt;Sorry, in ANSI C if it starts with a zero, it is octal. So you have to drop the 0 there. I think the compiler warns about octal numbers so at least you should not miss those.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daiel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:17:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192665#M14877</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-10-10T08:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192666#M14878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the info.&lt;BR /&gt;Still stuck on some things:&lt;BR /&gt;I am using the assembly format:&lt;BR /&gt;_ asm {&lt;BR /&gt;blaa&lt;BR /&gt;blaa&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;- Why does the assembler NOT ignore math symbols in a comment line?&amp;nbsp; (ie&amp;nbsp;&amp;nbsp;&amp;nbsp; ; hello * 12&amp;nbsp;&amp;nbsp; causes error)&lt;BR /&gt;- Label EQU causes error&amp;nbsp; 'invalid opcode or : expected'&lt;BR /&gt;DATAREVH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; DATA FORMAT&lt;BR /&gt;&amp;nbsp;I have tried with a colon after the label, then a&amp;nbsp; 'end of line expected' error.&lt;BR /&gt;&lt;BR /&gt;- The help states that there is an option to ignore label colons in the assembler. But I cant find it. CW v5.0.9 build 2404&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:32:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192666#M14878</guid>
      <dc:creator>donw</dc:creator>
      <dc:date>2008-10-10T08:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192667#M14879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Note that the compiler (and therefore the HLI embedded in the compiler)&lt;BR /&gt;does not support the EQU directive (or most of the other assembly directives).&lt;BR /&gt;So in order to define constants, you have to use the C-ways to do that. So&lt;BR /&gt;either use defines, or enums. Those things are then available in HLI code.&lt;BR /&gt;If you want to use EQU, then you have to use the assembler, and not the HLI (the inline assembler embedded in the compiler).&lt;BR /&gt;&lt;BR /&gt;Not sure why you get errors for a multiplication operator in an assembly comment.&lt;BR /&gt;Works for me:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void test(void) {  __asm {    nop ; hello * 12    ; hello * 12    ;@&amp;amp;*$(*&amp;amp;@  }  }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;But as I said, I would use C comments in C/HLI code anyway.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:45:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192667#M14879</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2020-10-29T09:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192668#M14880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;and about&lt;BR /&gt;&amp;gt; - The help states that there is an option to ignore label colons in the assembler.&lt;BR /&gt;&lt;BR /&gt;I think there is an option in the assembler not to require colons, not sure, not using that.&lt;BR /&gt;But I doubt that there is a corresponding option in the compiler. Not that the assembler and the compiler&lt;BR /&gt;and separate animals. The compiler does not use the assembler to generate an object file.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:49:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192668#M14880</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-10-10T09:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: P&amp;E assembler to Codewarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192669#M14881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;OK it all becomes clear now !&lt;BR /&gt;I assumed the asm complier used the assembler to do the asm coding.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 11:12:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/P-E-assembler-to-Codewarrior/m-p/192669#M14881</guid>
      <dc:creator>donw</dc:creator>
      <dc:date>2008-10-10T11:12:12Z</dc:date>
    </item>
  </channel>
</rss>

