<?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>Simulator clarification</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18130/simulator-clarification</link><description> Hai 
 When simulating, keil IDE Skips some bit manipulating instructions.I think there is some point in that which I cannot locate.please pont out 
 
Roy Thomas </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/137948?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 12:49:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2e7ad85a-af84-4b13-bc3e-bdeb8ed8958d</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;That&amp;#39;s why it&amp;#39;s called an &lt;i&gt;Optimising&lt;/i&gt; compiler!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/c51/c51_opt.htm"&gt;http://www.keil.com/c51/c51_opt.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Almost every  &amp;#39;C&amp;#39; compiler these days is an &amp;quot;Optimising&amp;quot; compiler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/134469?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 08:48:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:efdfaf42-39da-448a-b60d-4d3040d6c316</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;Any way how I can avoid such merging!&lt;/i&gt;&lt;br /&gt;
set the minimum optimization you can live with and there will still be some &amp;quot;merging&amp;quot;.&lt;br /&gt;
A C compiler is supposed to be efficient and thus debugging via C source is sometimes confoosing.  When wondering, set the breakpoint in the disassembly and see what actually happens.  This phenomena is not a &amp;quot;Keil bug&amp;quot; I know of no &lt;i&gt;decent&lt;/i&gt; compiler that does not show such behaviour.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/122597?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 08:45:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a5af3067-1948-4ae1-ae16-671130a597c9</guid><dc:creator>Roy  Thomas</dc:creator><description>&lt;p&gt;Hai&lt;br /&gt;
      I think I have found some clue.&lt;br /&gt;
      Some are optimised out and some others are actually not skipped,but &lt;b&gt;they are merged with the nearby delay routines.&lt;/b&gt; Could be seen in the dissassembly window like that. But when stepping through C sourse they appear to be skipped. Causes some confusion but code is there eventhough not like how I proposed!! .&lt;br /&gt;
   Any way how I can avoid such merging!&lt;br /&gt;
  Thanks&lt;br /&gt;
Roy Thomas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/111164?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 08:28:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b9255e00-e9dc-4221-b7c5-08a6241540f4</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;I caught it.&lt;br /&gt;
&lt;br /&gt;
They are probably optimized out.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/96733?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 07:37:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:66567722-51a3-445b-8108-02b9001b1b5a</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;When simulating, keil IDE Skips some bit manipulating instructions.I think there is some point in that which I cannot locate.please pont out&lt;br /&gt;
&lt;br /&gt;
Sorry for being not clear in the last post.I was off the impression that being a &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
you are still &amp;quot;not clear&amp;quot;.  Repost your code (thanks for using pre) with the &amp;quot;Skips some bit manipulating instructions&amp;quot; marked.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/72865?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 06:19:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:88bddc27-18ca-42c4-9b62-6f71ced53ac2</guid><dc:creator>Roy  Thomas</dc:creator><description>&lt;p&gt;Sorry for being not clear in the last post.I was off the impression that being a newcomer I may be ignorant of some very common rules of keil.&lt;br /&gt;
  I am just starting in C and Keil .Sorry if my code looks awkward&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;

sbit LCD_EN    	        = P0^4;
sbit LCD_RW		= P0^5;
sbit LCD_RS		= P0^6;

void lcd_ini(void)

{
	delayUs(0x40);

	LCD_RW = 0;						// write operation
	LCD_RS = 0;						// write to command register

	P0 =(P0 &amp;amp; 0xF0) | 0x03;


	delayUs(0x10);

LCD_EN = 0;
LCD_EN=1;

	LCD_STROBE;

	delayUs(0x20);

	LCD_STROBE;

LCD_EN = 0;
LCD_EN=1;


	delayUs(0x30);

	LCD_STROBE;

	delayUs(0x25);

LCD_EN =0;//  /These //two //instructions are skipped
	LCD_EN=1;

	delayUs(0x50);

	P0	&amp;amp;=	0xFE;

	delayUs(0x23);

	LCD_STROBE;

	delayUs(0x50);


//this is my delay

void delayUs(unsigned char del)

{
	unsigned char delloc;
    for(delloc=0;delloc &amp;lt;= del;delloc++)
		{
		}
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simulator clarification</title><link>https://community.arm.com/thread/50292?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2004 04:54:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:46965797-9bf5-428e-bd91-4e15bd89e4bd</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;It would be a lot easier to answer meaningfully if you had bothered to specify &lt;b&gt;which&lt;/b&gt; instructions are being skipped, in what context.  Please don&amp;#39;t assume your audience to be clairvoyant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>