<?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>8051 include file issue</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/47655/8051-include-file-issue</link><description> Hi, 
 I wrote a very long routine and and hence i want to put it in seperate files for cleaner view,Im using an 8051 ,coding in assembler ,does any one know how for example do you seperate your file and include it in your main file , so that at the time</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: 8051 include file issue</title><link>https://community.arm.com/thread/167544?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 07:56:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:115e39a4-7113-4821-b117-4c5533211d40</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;All of the documentation is available online:&amp;nbsp;&lt;a href="https://www.keil.com/support/man_c51.htm"&gt;https://www.keil.com/support/man_c51.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In particular,&amp;nbsp;study the Assembler manual:&amp;nbsp;&lt;a href="https://www.keil.com/support/man/docs/a51/"&gt;https://www.keil.com/support/man/docs/a51/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s some books on the subject:&amp;nbsp;&lt;a href="https://www.keil.com/books/8051books.asp"&gt;https://www.keil.com/books/8051books.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, if your code is getting so large to be hard to manage, that strongly suggests that you would be better writing in a higher-level language - so why are you not doing this in &amp;#39;C&amp;#39; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 include file issue</title><link>https://community.arm.com/thread/167537?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 18:27:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ab86660c-4ae2-45de-9e9f-053a63ea81a7</guid><dc:creator>Broeker</dc:creator><description>&lt;p&gt;You&amp;#39;re completely mixing up to completely separate issues there: splitting the flow of your code into properly structured subroutines, and splitting source text into reasonably-sized compilable source files.&lt;/p&gt;
&lt;p&gt;You have to separate these concepts before you have any chance of implementing either successfully.&lt;/p&gt;
&lt;p&gt;You should &lt;strong&gt;not&lt;/strong&gt; include entire source code files into others.&amp;nbsp; And if a routine has become very long, that means it&amp;#39;s doing too many things in a single routine.&amp;nbsp; Learn what CALL and RET machine instructions are for.&amp;nbsp; Then learn what PUBLIC and EXTERN are for.&amp;nbsp; Then combine these two to understand how to properly put some of the code in a separate routine in a separate file, and how to use the linker and assembler to translate each file on its own, and then combine them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>