<?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: Addressing arrays __asm lda array[1]; in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139333#M2283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Thanks, that worked!&lt;BR /&gt;&lt;BR /&gt;I guess the answer is in this?&lt;BR /&gt;&lt;BR /&gt;(Copied directly from the Codewarrior help files on inline assembly)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://rafb.net/p/0bPzPO30.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://rafb.net/p/0bPzPO30.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;Factor        = ( Expression ) | Factor {: Factor|MSB)}

?
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2007 16:03:39 GMT</pubDate>
    <dc:creator>CarlFST60L_2nd</dc:creator>
    <dc:date>2007-07-09T16:03:39Z</dc:date>
    <item>
      <title>Addressing arrays __asm lda array[1];</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139329#M2279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Should be a simple one ( i think)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static char Array[10];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void main(void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__asm lda&amp;nbsp; Array[1];&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //Cannot get this one line to work? error C18123&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2007 17:55:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139329#M2279</guid>
      <dc:creator>CarlFST60L_2nd</dc:creator>
      <dc:date>2007-07-08T17:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Addressing arrays __asm lda array[1];</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139330#M2280</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;For inline assembly use the instruction should take the following form:&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;&lt;FONT face="Courier New"&gt;__asm lda&amp;nbsp; Array:1;&lt;/FONT&gt;&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;However, within a "normal" assembly program, the equivalent instruction would be -&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;&amp;nbsp; lda&amp;nbsp; Array+1&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:16:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139330#M2280</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-08T19:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Addressing arrays __asm lda array[1];</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139331#M2281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Thanks, will try that. (I think i did try that, i tried many things, most obviously Array+1 with diffrent brackets).&lt;BR /&gt;&lt;BR /&gt;Can I ask where specifically in the help files that was, or how it was interprated from the help files?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by CarlFST60L_2nd on &lt;SPAN class="date_text"&gt;2007-07-09&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:03 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 09:01:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139331#M2281</guid>
      <dc:creator>CarlFST60L_2nd</dc:creator>
      <dc:date>2007-07-09T09:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Addressing arrays __asm lda array[1];</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139332#M2282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;I am not sure of the device you are targeting - I assume it might be the HC(S)08.&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;Within your CW installation, there should be a manual for the compiler, e.g Compiler_HC08.pdf.&amp;nbsp; Within this manual there&amp;nbsp;likely to&amp;nbsp;be a section headed "High Level Inline Assembler".&amp;nbsp; Also may be of interest, within the section "ANSI-C Frontend",&amp;nbsp;a sub-section headed "Defining C Macros containing HLI assembler code".&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;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 10:43:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139332#M2282</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-09T10:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Addressing arrays __asm lda array[1];</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139333#M2283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Thanks, that worked!&lt;BR /&gt;&lt;BR /&gt;I guess the answer is in this?&lt;BR /&gt;&lt;BR /&gt;(Copied directly from the Codewarrior help files on inline assembly)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://rafb.net/p/0bPzPO30.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://rafb.net/p/0bPzPO30.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;Factor        = ( Expression ) | Factor {: Factor|MSB)}

?
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 16:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Addressing-arrays-asm-lda-array-1/m-p/139333#M2283</guid>
      <dc:creator>CarlFST60L_2nd</dc:creator>
      <dc:date>2007-07-09T16:03:39Z</dc:date>
    </item>
  </channel>
</rss>

