<?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>C51 interrupt routine</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15447/c51-interrupt-routine</link><description> Dear friends, 
 
 Wish you all Happy merry Christmas.In C51 interrupt routine function 
attribute USING Rn what purpose it will serve.If i am not using the same,what will happen in ISR.Pls explain me. 
 
regards, 
manivelm </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: C51 interrupt routine</title><link>https://community.arm.com/thread/39564?ContentTypeID=1</link><pubDate>Thu, 26 Dec 2002 08:11:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a3aaf5ff-73ac-4291-992c-1b19d7fe0034</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;In C51 interrupt routine function&lt;br /&gt;
attribute USING Rn what purpose it will serve.&lt;/i&gt;&lt;br /&gt;
Used correctly it switches the register bank to one that is neither used by the body of the code nor an interrupt with higher priority.  My &amp;quot;standard&amp;quot; is main in bank 0, low priority ints in bank 1 and high priority ints in bank 2.&lt;br /&gt;
&lt;i&gt;If i am &lt;b&gt;not&lt;/b&gt; using the same &lt;/i&gt; &lt;b&gt;as in main&lt;/b&gt; (added for clarification)&lt;i&gt;,what will happen in ISR.Pls explain me.&lt;/i&gt;&lt;br /&gt;
Nothing, everything will work as your code says.  But if you are using the same in main and an ISR that affect ANY register, your code will show erratic behaviour.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>