<?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: How to clear an array in assembly language?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207357#M17568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ingo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is generally more than one method of solving a particular problem.&amp;nbsp; For example, provided the array size is less than 256 bytes, the following method may provide a simpler solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;ARRAY_SIZE equ 64&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;array: rmb ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; ldhx #ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt; &lt;FONT face="courier new,courier"&gt;clra&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOOP:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; sta&amp;nbsp; array-1,x&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; dbnzx LOOP&lt;/FONT&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2009 19:36:14 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2009-08-14T19:36:14Z</dc:date>
    <item>
      <title>How to clear an array in assembly language?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207354#M17565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me please, how to clear an array in asm?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ARRAY: DS.B 64&lt;/P&gt;&lt;P&gt;VAR1:&amp;nbsp;&amp;nbsp;&amp;nbsp; DS.B 1&lt;/P&gt;&lt;P&gt;VAR2:&amp;nbsp;&amp;nbsp;&amp;nbsp; DS.B 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;clr VAR1&amp;nbsp;&amp;nbsp;&amp;nbsp; ;clear VAR1&lt;/P&gt;&lt;P&gt;clr VAR2&amp;nbsp;&amp;nbsp;&amp;nbsp; ;clear VAR2, deletes only the first address&lt;/P&gt;&lt;P&gt;clr VAR2+1 ;clear VAR2, deletes the 2nd address too&lt;/P&gt;&lt;P&gt;clr ARRAY&amp;nbsp;&amp;nbsp; ;deletes only the first address but how can I clear the rest of the reserved space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would be very nice if someone could help me!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ingo Kauf&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 15:19:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207354#M17565</guid>
      <dc:creator>mnemonic</dc:creator>
      <dc:date>2009-08-14T15:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to clear an array in assembly language?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207355#M17566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, try to use symbols rather than the actual numbers, at all times.&amp;nbsp; It makes the code more readable and more easily updateable.&amp;nbsp; Regarding your question, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;ARRAY_SIZE equ 64&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Array rmb ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;ldhx #Array&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Loop&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;clr ,x&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;aix #1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;cphx #Array+ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;blo Loop&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by tonyp on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-08-14&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;11:30 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 15:26:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207355#M17566</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2009-08-14T15:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to clear an array in assembly language?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207356#M17567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! This was very fast!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will work on this at evening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ingo Kauf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 16:00:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207356#M17567</guid>
      <dc:creator>mnemonic</dc:creator>
      <dc:date>2009-08-14T16:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to clear an array in assembly language?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207357#M17568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ingo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is generally more than one method of solving a particular problem.&amp;nbsp; For example, provided the array size is less than 256 bytes, the following method may provide a simpler solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;ARRAY_SIZE equ 64&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;array: rmb ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; ldhx #ARRAY_SIZE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt; &lt;FONT face="courier new,courier"&gt;clra&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOOP:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; sta&amp;nbsp; array-1,x&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp; dbnzx LOOP&lt;/FONT&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 19:36:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-clear-an-array-in-assembly-language/m-p/207357#M17568</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-08-14T19:36:14Z</dc:date>
    </item>
  </channel>
</rss>

