<?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>How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/22411/how-to-access-upper-128b-ram-on-aduc814-using-keil-in-c</link><description> 
Hi. 

 
I have a feeling, Keil is using only lower 128Bytes Data space of
my ADuC814. 
The ADuC manual says, it has a lower RAM (00H - 7FH), and upper RAM
(80H - FFH). The upper RAM is addressable by indirect adressing. 
Can anyone write one line as</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/113343?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 10:07:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d38d8c03-50a3-4eec-92e3-d3537ba2ea7f</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
When running out of &amp;#39;data&amp;#39; space do not willy-nilly change some
variables to &amp;#39;idata&amp;#39;. The access of an idata variable is slower than
the access of a data variable&lt;/p&gt;

&lt;p&gt;
First check arrays (data/idata makes no difference unless
addressed by fixed offsets). Then find some rarely used variables and
change them. then ... well you should have gotten the drift by
now.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/99837?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 08:54:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2a916e43-36cd-4180-b5ad-2afb4ddac8a6</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
before writing&lt;/p&gt;

&lt;pre&gt;
int i;
&lt;/pre&gt;

&lt;p&gt;
for any memory space in an 8051, one should think very carefully
about whether an &amp;#39;int&amp;#39; is really needed - or will a &amp;#39;char&amp;#39; do?&lt;/p&gt;

&lt;p&gt;
And should it be unsigned?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/75648?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 07:46:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5ba9d558-a8d8-44ff-984e-d6445f7e0983</guid><dc:creator>Tomek H</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you so much for your replies.&lt;br /&gt;
You&amp;#39;ve been very helpful.&lt;br /&gt;
The problem solved - instead of:&lt;/p&gt;

&lt;pre&gt;
int i;
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
one should write:&lt;/p&gt;

&lt;pre&gt;
int idata i;
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
and that&amp;#39;s it.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/88629?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 07:11:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b2ffd50e-39fa-4c7c-ba54-53ba3e3a0765</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Look up the &amp;#39;data&amp;#39; and &amp;#39;idata&amp;#39; keywords in the
manual...&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
... and also look up the various memory models while you&amp;#39;re at it.
You&amp;#39;ll see that C51 will not use the upper 128 bytes of RAM &lt;b&gt;unless
you explicitly tell it to do so&lt;/b&gt; by using the &lt;b&gt;idata&lt;/b&gt;
specifier.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/48844?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 07:10:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:db6c1984-afbd-4082-8620-6ac73b0181cc</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;The upper RAM is addressable by indirect adressing&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
To be precise, the &amp;quot;upper&amp;quot; RAM is addressable &lt;i&gt;&lt;b&gt;only&lt;/b&gt;&lt;/i&gt;
by indirect adressing;&lt;/p&gt;

&lt;p&gt;
The &amp;quot;lower&amp;quot; RAM is addressable &lt;i&gt;&lt;b&gt;also&lt;/b&gt;&lt;/i&gt; by indirect
adressing.&lt;/p&gt;

&lt;p&gt;
See: &lt;a href="http://www.8052.com/tut8052.phtml"&gt;www.8052.com/tut8052.phtml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
You probably also need to download &amp;amp; study a copy of the
so-called &amp;quot;bible&amp;quot; for the 8051:&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Chapter 1 - 80C51 Family Architecture:&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://www.nxp.com/acrobat_download/various/80C51_FAM_ARCH_1.pdf"&gt;www.nxp.com/.../80C51_FAM_ARCH_1.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Chapter 2 - 80C51 Family Programmer&amp;#39;s Guide and Instruction
Set:&lt;/b&gt;&lt;br /&gt;

&lt;a href="http://www.nxp.com/acrobat_download/various/80C51_FAM_PROG_GUIDE_1.pdf"&gt;www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Chapter 3 - 80C51 Family Hardware Description:&lt;/b&gt;&lt;br /&gt;

&lt;a href="http://www.nxp.com/acrobat_download/various/80C51_FAM_HARDWARE_1.pdf"&gt;www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Here are some other introductory &amp;amp; reference materials:&lt;br /&gt;
&lt;a href="http://www.keil.com/books/8051books.asp"&gt;http://www.keil.com/books/8051books.asp&lt;/a&gt;&lt;br /&gt;

&lt;a href="http://www.8052.com/books.phtml"&gt;www.8052.com/books.phtml&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to access upper 128B RAM on ADuC814 using Keil in C?</title><link>https://community.arm.com/thread/48845?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2007 07:05:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9dc73ba1-d006-4063-8a42-3ea47fe74b03</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Look up the &amp;#39;&lt;b&gt;data&lt;/b&gt;&amp;#39; and &amp;#39;&lt;b&gt;idata&lt;/b&gt;&amp;#39; keywords in the
manual...&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm&lt;/a&gt;&lt;br /&gt;

&lt;a href="http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>