<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why not?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25443/why-not</link><description> 
How come I can do this: 
char LCDstring[] = &amp;quot;ABC&amp;quot;; 
ACC = LCDstring[0]; Print an A to LCD 

 
But I cannot do this: 
int z = 0; 
ACC = LCD[z]; Print an A to LCD 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Why not?</title><link>https://community.arm.com/thread/78195?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2010 10:17:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:824cf2e9-11eb-4b2c-a475-b2187ae5a97d</guid><dc:creator>Doug Robinson</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks Andy, that was it. I&amp;#39;m used to programming in assembly
language and having total control of my accumulator.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why not?</title><link>https://community.arm.com/thread/57958?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2010 15:29:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7172cf59-2262-438a-bb27-19e006480709</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;ACC = LCDstring[0]; Print an A to LCD&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
No, that just copies the 1st character of LCDstring into the
Accumulator.&lt;/p&gt;

&lt;p&gt;
If that did just happen to result in it apppearing on your LCD
then you were extremely lucky!!&lt;/p&gt;

&lt;p&gt;
You have absolutely no guarantee whatsoever that the compiler
won&amp;#39;t be using ACC for its own internal purposes - in fact, it is
extremely likely that the compiler &lt;i&gt;&lt;b&gt;will&lt;/b&gt;&lt;/i&gt; be using ACC
for its own internal purposes!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why not?</title><link>https://community.arm.com/thread/57961?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2010 14:35:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:02d9e9e2-bfc3-4bd1-9c11-e99ae6855c1b</guid><dc:creator>doubt that my ISP Al Bradford</dc:creator><description>&lt;p&gt;&lt;p&gt;
Doug;&lt;br /&gt;
Did you mis-type?&lt;br /&gt;
ACC = LCD[z]; is not the same as ACC = LCDstring[0];&lt;br /&gt;
Bradford&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>