<?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: Arrays in S08 assembly language in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148562#M7737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Mac,&lt;BR /&gt;&lt;BR /&gt;I am pretty sure that although DC.B is the "native" form of the directive for Codewarrior it will still accept the more common FCB and do the same thing. The manual seems to back this up.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2009 19:39:42 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2009-02-03T19:39:42Z</dc:date>
    <item>
      <title>Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148555#M7730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Everyone,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am having trouble creating an array in S08 code. Looking for a little help here, this is a snippet of my code;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;; Wail table. Three bytes per block consisting of adjustment value, interrupt&lt;BR /&gt;; divider count, and adjustment count.&lt;/DIV&gt;&lt;DIV&gt;; Table is called wailtabl, error occurrs during compile. Using code warrior 6.2 with latest service packs.&lt;/DIV&gt;&lt;DIV&gt;; This code used to work when using the HC05C8A, now I am porting over to S08.&lt;/DIV&gt;&lt;DIV&gt;; error is; A1055 Error in Expression&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;wailtabl equ&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;; Wail up&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;adjust value, first interval&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;interrupt divider&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 36&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;adjustment count&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;second interval&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;third interval ETC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 06:53:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148555#M7730</guid>
      <dc:creator>SILKS</dc:creator>
      <dc:date>2009-02-03T06:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148556#M7731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello and welcome to the fora, SILKS,&lt;BR /&gt;&lt;BR /&gt;You don't have a valid expression after the EQU.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 07:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148556#M7731</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-02-03T07:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148557#M7732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks PEG,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Umm, This code worked under HC05, OK, I guess white space counts. How would you make an array 24 deep with three elements?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 07:32:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148557#M7732</guid>
      <dc:creator>SILKS</dc:creator>
      <dc:date>2009-02-03T07:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148558#M7733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Randall,&lt;BR /&gt;&lt;BR /&gt;What assembler did this work with?&lt;BR /&gt;&lt;BR /&gt;Just drop the EQU directive and it would work as far as I can see.&lt;BR /&gt;&lt;BR /&gt;Note that your snippet has no device/core specific instructions, it only contains assembler directives and therefore is entirely assembler specific.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 07:47:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148558#M7733</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-02-03T07:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148559#M7734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Peg,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I used the EZMCU compiler and assembler. Once I drop the EQU nothing assignes to the memory variable wailtabl.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 08:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148559#M7734</guid>
      <dc:creator>SILKS</dc:creator>
      <dc:date>2009-02-03T08:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148560#M7735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Sorry you need to drop the comment on the next line (;wail up) and move the(fcb 1&amp;nbsp; ;xxxxxxx) up onto the same line as the label (wailtabl).&lt;BR /&gt;&lt;BR /&gt;Possibly don't have to move this line up but let's just do it for now.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 08:59:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148560#M7735</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-02-03T08:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148561#M7736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hello Randall,&lt;BR /&gt;&lt;BR /&gt;It would appear that the FCB directive is not valid for CW assembler.&amp;nbsp; Substitute the directive DC.B instead, assuming that you intend the data to be constant and reside in flash.&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;waitable:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DC.B&amp;nbsp; 1, 2, 36 ; First interval&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DC.B&amp;nbsp; 1, 3, 29 ; Second interval&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ...&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial"&gt;Alternatively, the coding might be a little simpler to treat the data as three separate tables, one for each of the parameters.&amp;nbsp; This would avoid the need to increment the index value by 3, or multiply by 3, to fetch the data associated with the nth interval.&amp;nbsp; If adapting HC05 code, don't forget to clear the H-register prior to using indexed instructions such as:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; LDA (waitable+2),x&amp;nbsp; ; where x = 0, 3, 6 ...&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mac&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2009-02-03&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:49 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 19:33:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148561#M7736</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-02-03T19:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148562#M7737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Mac,&lt;BR /&gt;&lt;BR /&gt;I am pretty sure that although DC.B is the "native" form of the directive for Codewarrior it will still accept the more common FCB and do the same thing. The manual seems to back this up.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 19:39:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148562#M7737</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-02-03T19:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148563#M7738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Peg,&lt;BR /&gt;&lt;BR /&gt;I did quickly check the assembler manual (for an earlier CW version), but could not find FCB directive listed in the summary of directives.&amp;nbsp; The alternative DCB was specifically listed.&amp;nbsp; Where abouts did you find it documented?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mac&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 19:54:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148563#M7738</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-02-03T19:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148564#M7739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Mac,&lt;BR /&gt;&lt;BR /&gt;I only have CW6.2 at the moment. In Assembler_HC08.chm under the command DC it list the "synonyms" of the various forms of DC, one of which is FCB = DC.B&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 04:47:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148564#M7739</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-02-04T04:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148565#M7740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thank you all for your help, Peg, moving the FCB into the whitespace area near the label worked. I really appreciate your help.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 05:54:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148565#M7740</guid>
      <dc:creator>SILKS</dc:creator>
      <dc:date>2009-02-04T05:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148566#M7741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Randall,&lt;BR /&gt;&lt;BR /&gt;I tried some code similar to your original code within an absolute assembly CW project, and once the spurious EQU directive was removed, it assembled without error, and gave the expected result.&lt;BR /&gt;&lt;BR /&gt;For CW, it appears that a label on a separate line is quite OK, and terminating the label with a colon is optional.&amp;nbsp; Intervening comment lines between the label and the first FCB directive did not affect assembly, and use of the FCB directive did not cause a problem. The directive may be followed by a single value, or multiple values separated by commas.&lt;BR /&gt;&lt;BR /&gt;So I don't quite know what your original problem was (apart from the spurious EQU).&amp;nbsp; Is it possible that the label originally did not start in the first column - this would cause an error condition.&lt;BR /&gt;&lt;BR /&gt;If your project uses relocatable assembly (the default), and more than one .ASM file is involved, you will need to use XDEF and XREF directives for labels that are to be visible in more than one file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mac&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 11:20:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148566#M7741</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-02-04T11:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in S08 assembly language</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148567#M7742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Mac,&lt;BR /&gt;&lt;BR /&gt;Thanks for the input, the FCB statements began to work when i moved them up a line closer to the label.&lt;BR /&gt;&lt;BR /&gt;Everything else you said is true as well and I regard it as expert advice, thank you.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 00:29:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Arrays-in-S08-assembly-language/m-p/148567#M7742</guid>
      <dc:creator>SILKS</dc:creator>
      <dc:date>2009-02-05T00:29:33Z</dc:date>
    </item>
  </channel>
</rss>

