<?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: Macro parameters in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140122#M2422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Pit:&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the syntax for macros in the Motorola assemblers have never been very symbolic in the eight-bit world. The rules for macros go something like this:&lt;BR /&gt;&lt;BR /&gt;Symbolic names for macro parameters are not supported. The "MACRO" keyword cannot be followed by arguments.&lt;BR /&gt;&lt;BR /&gt;In the macro body, the first parameter is specified as "\1", the second as "\2", etcetera. If more than 9 parameters are needed, then the tenth parameter is specified as "\A", the eleventh as "\B", etcetera. No more than 35 parameters are allowed.&lt;BR /&gt;&lt;BR /&gt;Macro arguments must be separated by commas. A space will terminate the argument list. A null argument is specified by two commas in a row, with no space in between.&lt;BR /&gt;&lt;BR /&gt;There is also a "\0" parameter, which is used to specify the character that might follow a "." (period) at the end the macro name in its invocation. As an example, if a macro named "Alban" was invoked as "Alban.b", parameter \0 would be equal to "b".&lt;BR /&gt;&lt;BR /&gt;hope that helps.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2006 06:11:02 GMT</pubDate>
    <dc:creator>rocco</dc:creator>
    <dc:date>2006-12-15T06:11:02Z</dc:date>
    <item>
      <title>HC12: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140118#M2418</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;may be someone can help me with flw.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I 've to assemble old HC11 code for a HC12 µctroller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using CW 4.5 B6037&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The old macros looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MENUE: MACRO &amp;amp;ID,&amp;amp;SK1TXT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FCB &amp;amp;ID ;MENUE ENTRY IDENTIFIER&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FDB &amp;amp;SK1TXT ;SOFT KEY1 TEXT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MEND&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed the syntax to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MENUE: MACRO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FCB \ID ;MENUE ENTRY IDENTIFIER&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FDB \SK1TXT ;SOFT KEY1 TEXT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ENDM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and got an error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I change it to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MENUE: MACRO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FCB \1 ;MENUE ENTRY IDENTIFIER&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FDB \2 ;SOFT KEY1 TEXT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ENDM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;all is fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I don't want to use numbers, because I' ve also macros with more than 10 arguments and it will be more clear if I can use the given arguments. Further I found in the CW help this sentence: "A parameter designator consists of a backlashes character (\), followed by a digit (0 - 9) or an uppercase letter (A - Z). "&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So why I can't use letters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this due to that I only use a special edition of CW?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;May be somebody has an answer.&lt;/SPAN&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;11:20 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 21:20:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140118#M2418</guid>
      <dc:creator>Pitrunner</dc:creator>
      <dc:date>2006-12-14T21:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140119#M2419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;It may be that "gaps" in the sequence of macro argument identifiers are not allowed.&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;The easiest way to clarify the sequence that the arguments need to be entered might be as a comment, as follows -&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 face="Courier New" size="2"&gt;MENUE: MACRO&amp;nbsp;&amp;nbsp;; ID, SK1TXT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FCB \1 ; MENUE ENTRY IDENTIFIER&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FDB \2 ; SOFT KEY1 TEXT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ENDM&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 23:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140119#M2419</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-12-14T23:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140120#M2420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Mac,&lt;BR /&gt;&lt;BR /&gt;thanks for your answer.&lt;BR /&gt;But the gaps are not the problem, because in my last post the representation of the Macro looks not so good.&lt;BR /&gt;I would like to have that:&lt;BR /&gt;&lt;BR /&gt;MENUE: MACRO&lt;BR /&gt;FCB \ID ; MENUE ENTRY IDENTIFIER&lt;BR /&gt;FDB \SK1TEXT ; SOFT KEY1 TEXT&lt;BR /&gt;ENDM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And with that kind of macro I got an error.&lt;BR /&gt;If I use your representation of the macro all is fine.&lt;BR /&gt;Any idea?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pit&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 01:21:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140120#M2420</guid>
      <dc:creator>Pitrunner</dc:creator>
      <dc:date>2006-12-15T01:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140121#M2421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Mac again, I saw my result of the post and I'm confused about the representation. So I try again MENUE: MACRO FCB \ID FDB \SK1TXT ENDM&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 01:26:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140121#M2421</guid>
      <dc:creator>Pitrunner</dc:creator>
      <dc:date>2006-12-15T01:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140122#M2422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Pit:&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the syntax for macros in the Motorola assemblers have never been very symbolic in the eight-bit world. The rules for macros go something like this:&lt;BR /&gt;&lt;BR /&gt;Symbolic names for macro parameters are not supported. The "MACRO" keyword cannot be followed by arguments.&lt;BR /&gt;&lt;BR /&gt;In the macro body, the first parameter is specified as "\1", the second as "\2", etcetera. If more than 9 parameters are needed, then the tenth parameter is specified as "\A", the eleventh as "\B", etcetera. No more than 35 parameters are allowed.&lt;BR /&gt;&lt;BR /&gt;Macro arguments must be separated by commas. A space will terminate the argument list. A null argument is specified by two commas in a row, with no space in between.&lt;BR /&gt;&lt;BR /&gt;There is also a "\0" parameter, which is used to specify the character that might follow a "." (period) at the end the macro name in its invocation. As an example, if a macro named "Alban" was invoked as "Alban.b", parameter \0 would be equal to "b".&lt;BR /&gt;&lt;BR /&gt;hope that helps.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 06:11:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140122#M2422</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-12-15T06:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140123#M2423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi rocco,&lt;BR /&gt;&lt;BR /&gt;thank you very much for your detailed explanation.&lt;BR /&gt;Now I understand more, about macros.&lt;BR /&gt;&lt;BR /&gt;Thanks again. Pit&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Macro-parameters/m-p/140123#M2423</guid>
      <dc:creator>Pitrunner</dc:creator>
      <dc:date>2006-12-15T15:39:15Z</dc:date>
    </item>
  </channel>
</rss>

