<?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>interrupts</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19872/interrupts</link><description> 
hi everyone 
i am new to 8051 and and have some problem with interrupts while
working with kiel software. 

 
i am unable to pass arguments to following function 

 
void serial_isr(char code *ptr) interrupt 4 

 
please do reply 

 
good day.... 
</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: interrupts</title><link>https://community.arm.com/thread/74660?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2006 03:45:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e2511f99-4519-4c37-8dba-45fd56a90971</guid><dc:creator>ankit puri</dc:creator><description>&lt;p&gt;&lt;p&gt;
hi&lt;/p&gt;

&lt;p&gt;
thanx for ur reply.&lt;br /&gt;
now i got where was the problem.&lt;/p&gt;

&lt;p&gt;
bye&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interrupts</title><link>https://community.arm.com/thread/98750?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2006 11:24:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:644c44de-53e0-47c9-adc9-7f0b9964e052</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;t does not have to do with &amp;quot;the 8051 architecture&amp;quot; it has to do
with interrupts on any processor&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
... you need to add &amp;quot;hardware interrupts&amp;quot;. If you&amp;#39;re using an
operating system to route the interrupts for you, you may pass
arguments to the handlers (which will be plain-vanilla functions in
that case).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interrupts</title><link>https://community.arm.com/thread/98751?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2006 11:10:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a50bd4e7-f802-4a3c-b2c2-85ad93a45240</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
OK, so now we&amp;#39;ve established that you cannot pass parameters to
interrupt handlers - not in Keil, not using anything else on an 8051,
and not even on any other processor.&lt;/p&gt;

&lt;p&gt;
So, why don&amp;#39;t you explain what you&amp;#39;re actually trying to
&lt;i&gt;achieve&lt;/i&gt; - then maybe people can suggest ways to reach that
goal...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interrupts</title><link>https://community.arm.com/thread/88081?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2006 08:22:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d3a5b6b9-9d9c-4d81-988c-5a10c5c37bef</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Your problem has nothing to do with Keil software, but with the
8051 architecture.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That, while true, is wrong.&lt;/p&gt;

&lt;p&gt;
it does not have to do with &amp;quot;the 8051 architecture&amp;quot; it has to do
with interrupts &lt;b&gt;on any processor&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interrupts</title><link>https://community.arm.com/thread/88080?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2006 05:46:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ada0914a-8c07-45cc-a010-49b1f82a16c2</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
See also:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&amp;quot;&lt;b&gt;The following rules apply to interrupt functions&lt;/b&gt;.&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
&amp;quot;&lt;b&gt;No function arguments may be specified for an interrupt
function.&lt;/b&gt;&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
&amp;quot;&lt;b&gt;Interrupt function declarations may not include a return
value.&lt;/b&gt;&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interrupts</title><link>https://community.arm.com/thread/47448?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2006 05:38:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6946e771-0ef8-4e95-b385-025d16a4596d</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;i am new to 8051 and and have some problem with interrupts
while working with kiel software.&lt;/i&gt;&amp;lt;p&amp;gt;&lt;/p&gt;

&lt;p&gt;
Your problem has nothing to do with Keil software, but with the
8051 architecture. Or, in a more general sense, with the concept of
interrupt functions.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;i am unable to pass arguments to following function&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;You cannot pass an argument to an interrupt function&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;
It is that simple. An interrupt function does not have a &amp;quot;caller&amp;quot;
that could pass arguments to the function, since it is called by
hard-wired logic inside the processor. (Note that if you perform an
explicit call of an interrupt function anywhere in your program, you
have introduced a quite nasty bug).&lt;/p&gt;

&lt;p&gt;
Any data your interrupt function required must be delivered in
some other way (i.e. kept in global variables and similar).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>