<?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>Assembly code embedded in C code</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/20425/assembly-code-embedded-in-c-code</link><description> Hi all, 
 
I am using the chip C8051F020 manufactured by Cygnal Integrated Products. My compiler is C51. How can I include a assembly code in the C code to implement a clock of 8MHz. I tried using for loop with a count of 1, it delivers only a clock</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Assembly code embedded in C code</title><link>https://community.arm.com/thread/98280?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2006 08:51:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b7734e34-2070-4381-bf5f-703bd8dbf703</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;A far better approach would be to write a separate assembler function in a separate assembler source file, and call that function form your &amp;#39;C&amp;#39; code.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
even better:&lt;br /&gt;
write a skeleton function in C. use the SRC directive to extract the assembly and use that as a base for &lt;i&gt;a separate assembler function in a separate assembler source file&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assembly code embedded in C code</title><link>https://community.arm.com/thread/87806?ContentTypeID=1</link><pubDate>Sun, 16 Jul 2006 05:44:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4dfb2f19-aa1c-4530-8899-995d5214c690</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;A far better approach would be to write a separate assembler function in a separate assembler source file, and &lt;i&gt;&lt;b&gt;call&lt;/b&gt;&lt;/i&gt; that function form your &amp;#39;C&amp;#39; code.&lt;br /&gt;
&lt;br /&gt;
This is also described in the &lt;b&gt;manuals&lt;/b&gt;, and has been discussed here many times before - just search!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assembly code embedded in C code</title><link>https://community.arm.com/thread/46412?ContentTypeID=1</link><pubDate>Sat, 15 Jul 2006 09:39:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:516cc6d9-a8b0-4a93-aa5b-05e5cd3f9b96</guid><dc:creator>ashley madison</dc:creator><description>&lt;p&gt;Not surprisingly, the manual addresses this topic.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_asm.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_asm.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>