<?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>Re:  Far memory access</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/42601/re-far-memory-access</link><description> Hi all, 
I force PK51 to generate a SRC file which convert following C code to assemble, 
 
C code: 
val = FVAR(unsigned char, 0x800000); 
 
assemble code 
MOV R3,#081H 
MOV R2,#00H 
MOV R1,#00H 
LCALL	?C?CLDPTR 
 
But I don&amp;#39;t understand 
(1) why 80H</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Re:  Far memory access</title><link>https://community.arm.com/thread/87284?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2005 13:48:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:188bf4ba-fed7-4203-b1a1-8ec0e6356be3</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;Generic pointers are not flat addresses.  They&amp;#39;re really a tag byte that represents the memory space, followed by a 16-bit address.&lt;br /&gt;
&lt;br /&gt;
For what I guess are historical reasons, the tag byte value 0 is not xdata, but the internal data memory space.  The first 64K block of xdata has tag value 1.  Further blocks of external RAM (&amp;quot;far&amp;quot; or &amp;quot;hdata&amp;quot;) have increasing tag values.  You can, if you like, view this as the 24-bit generic pointer value having a value 0x10000 more than the actual address.&lt;br /&gt;
&lt;br /&gt;
01 0000 = offset 0 in xdata&lt;br /&gt;
02 0000 = offset 10000H in external memory&lt;br /&gt;
81 0000 = offset 800000 in xdata&lt;br /&gt;
&lt;br /&gt;
In addition to the manual, see the &amp;quot;theory of operation&amp;quot; section in the comments in the example XBANKING.A51 code in the lib directory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re:  Far memory access</title><link>https://community.arm.com/thread/44285?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2005 08:06:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:794a5de4-95a8-4eb1-ab62-a20bfe5c6224</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;You&amp;#39;ll want to read up about the internal encoding used for generic pointers in the manual.&lt;br /&gt;
&lt;br /&gt;
The library routine ?C?CLDPTR just does the reading of a byte at a given generic pointer for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>