<?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 compile the program,please help me</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14960/how-to-compile-the-program-please-help-me</link><description> 
/*******************************************/
/*Name&amp;amp;#65306;Main Function */
/* Memory model: LARGE */
unsigned char Temp;
unsigned char *pTemp;

void func(void);

void main(void)
{	
	unsigned char i = 6;
 
	pTemp = &amp;amp;Temp;
	
	*pTemp = 98;
	
	func();</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/85116?ContentTypeID=1</link><pubDate>Thu, 09 May 2002 22:38:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6ff8d7dd-d425-4788-a82f-b82b6795cc85</guid><dc:creator>New Chinese bird</dc:creator><description>&lt;p&gt;&lt;pre&gt; 
Thanks very much!Thanks Mike,Thanks Jon!
Thanks all of you!
My program is OK.
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/84260?ContentTypeID=1</link><pubDate>Thu, 09 May 2002 08:01:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:84cf532b-bd13-4331-b834-1d471e1a1fe2</guid><dc:creator>Jon Young</dc:creator><description>&lt;p&gt;If you have optimizations on, doing absolutely nothing IS correct for &amp;quot;i = *pTemp;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Does your code fail if you compile it with no optimizations?&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/95042?ContentTypeID=1</link><pubDate>Thu, 09 May 2002 03:16:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8f9ce245-8f84-4360-89c0-c41642c15978</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;the compiler generated wrong code for &amp;#39;i = *pTemp;&amp;#39;.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
In what way was it &lt;i&gt;&amp;quot;wrong?&amp;quot;&lt;/i&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/95037?ContentTypeID=1</link><pubDate>Thu, 09 May 2002 03:05:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:de0c2423-1337-4eb7-9541-5c1f48ac7dd5</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Are both files compiled for the same memory model?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/54381?ContentTypeID=1</link><pubDate>Thu, 09 May 2002 02:17:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fd29a017-ad40-4e89-a0c7-40a34a72b4ae</guid><dc:creator>New Chinese bird</dc:creator><description>&lt;p&gt;&lt;pre&gt; 
When I had compiled in SMALL memory model,it was OK.
But when in LARGE memory model,the compiler generated wrong code for &amp;quot;i = *pTemp;&amp;quot;.
Is this a bug in Keil?
-Bird
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile the program,please help me</title><link>https://community.arm.com/thread/38697?ContentTypeID=1</link><pubDate>Wed, 08 May 2002 08:04:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4f672071-e645-491d-a172-fa57ec17856c</guid><dc:creator>Mik Kleshov</dc:creator><description>&lt;p&gt;Is it possible that the compiler has optimized the variable &lt;b&gt;i&lt;/b&gt; out? Since the value assigned to it is never used the compiler has the right to do so. You can try and disable optimizations or use the variable &lt;b&gt;i&lt;/b&gt; somehow. Anyway, why not have a look at the generated code?&lt;br /&gt;
Regards,&lt;br /&gt;
- Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>