<?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>Need explination of these two decloration software lines</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23345/need-explination-of-these-two-decloration-software-lines</link><description> 
What do the following lines do? Generaly not specificaly. 

 
What do the terms mean/and or do? 1) xdata * xdata mean? 2) s_pSIN
= (MASTER_2_AFPU*)&amp;amp;s_SIN; 

 
static xdata uchar s_SIN[sizeof(MASTER_2_AFPU)];
static MASTER_2_AFPU xdata * xdata s_pSIN</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Need explination of these two decloration software lines</title><link>https://community.arm.com/thread/100257?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2008 06:02:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:37fc4a54-31ed-4c2f-872a-fc3aad4be8a0</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Do you have a referance for xdata?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What kind of reference ? What the keyword &lt;b&gt;xdata&lt;/b&gt; does ? That
is explained, in great detail and with examples, in the C51 compiler
manual.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need explination of these two decloration software lines</title><link>https://community.arm.com/thread/100259?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2008 05:55:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6aa693bc-2cbf-45df-997b-a784e1af6f00</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;This is a piece of contracted software that I suspect that the
authors purposely making it obscure what are your thoughts?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&amp;quot;Don&amp;#39;t attribute to malice what can properly be explained with
negligence.&amp;quot;&lt;/p&gt;

&lt;p&gt;
It&amp;#39;s not all that obscure - if the author really wants to obscure
the code, then he&amp;#39;s doing a really poor job at it.&lt;/p&gt;

&lt;p&gt;
It looks more like whoever wrote this is single-mindedly following
conventions without considering if they make sense in the current
context.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need explination of these two decloration software lines</title><link>https://community.arm.com/thread/75991?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2008 05:43:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:22f9ff94-e98a-4edc-8af1-ea4caa264da8</guid><dc:creator>Harry Watkins</dc:creator><description>&lt;p&gt;&lt;p&gt;
Do you have a referance for xdata?&lt;/p&gt;

&lt;p&gt;
This is a piece of contracted software that I suspect that the
authors purposely making it obscure what are your thoughts? I
appreciate your answer thank you very much.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need explination of these two decloration software lines</title><link>https://community.arm.com/thread/49420?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2008 07:56:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:47f560cc-b17d-415c-92d9-dcf9e48cae41</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
For question 1, please do consult the C51 manual. &amp;#39;xdata&amp;#39; is a
language extension, and you really have to study the documentation
thoroughly to use it.&lt;/p&gt;

&lt;p&gt;
As to what this:&lt;/p&gt;

&lt;pre&gt;
&lt;i&gt;static xdata uchar s_SIN[sizeof(MASTER_2_AFPU)];
static MASTER_2_AFPU xdata * xdata s_pSIN = (MASTER_2_AFPU*)&amp;amp;s_SIN;&lt;/i&gt;
&lt;/pre&gt;

&lt;p&gt;
does: this is a somewhat silly detour for defining a pointer to an
object of type MASTER_2_AFPU. s_SIN is a buffer of the right size for
such an object, but of the wrong type. s_pSIN is meant to access that
space as if it were of type MASTER_2_AFPU.&lt;/p&gt;

&lt;p&gt;
Whether or not this code is correct or not depends on the unknown
definition of MASTER_2_AFPU. If that&amp;#39;s anything else but a an array
of unsigned char itself, the code is sick.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need explination of these two decloration software lines</title><link>https://community.arm.com/thread/51487?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2008 14:34:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10aefced-e2b3-480f-a63f-e95495139b81</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Note that you can have a pointer that are stored in xdata
memory.&lt;/p&gt;

&lt;p&gt;
And you can have a pointer that points to an object stored in
xdata memory.&lt;/p&gt;

&lt;p&gt;
And then you can have a pointer stored in xdata memory, and
pointing to an object in xdata memory. Hence the need for one xdata
attribute before, and one after the star.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>