Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > e677bbbdff6d27fe001f15e0ef2bb4cc > files > 92

sdcc-3.0.0-0.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4.5.3 Interrupt Code</TITLE>
<META NAME="description" CONTENT="4.5.3 Interrupt Code">
<META NAME="keywords" CONTENT="sdccman">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="sdccman.css">

<LINK REL="next" HREF="node114.html">
<LINK REL="previous" HREF="node112.html">
<LINK REL="up" HREF="node110.html">
<LINK REL="next" HREF="node114.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html2427"
  HREF="node114.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html2421"
  HREF="node110.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html2415"
  HREF="node112.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html2423"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html2425"
  HREF="node191.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html2428"
  HREF="node114.html">4.5.4 Linking and Assembling</A>
<B> Up:</B> <A NAME="tex2html2422"
  HREF="node110.html">4.5 The PIC14 port</A>
<B> Previous:</B> <A NAME="tex2html2416"
  HREF="node112.html">4.5.2 Adding New Devices</A>
 &nbsp; <B>  <A NAME="tex2html2424"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html2426"
  HREF="node191.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00553000000000000000">
4.5.3 Interrupt Code</A>
</H2>

<P>
For the interrupt function, use the keyword `__interrupt'<A NAME="2966"></A>
with level number of 0 (PIC14 only has 1 interrupt so this number
is only there to avoid a syntax error - it ought to be fixed). E.g.:
<BLOCKQUOTE>
<TT>void Intr(void) __interrupt 0</TT>&nbsp;
<BR><TT>{</TT>&nbsp;
<BR><TT>&nbsp;&nbsp;T0IF = 0; /* Clear timer interrupt */</TT>&nbsp;
<BR><TT>}</TT>

</BLOCKQUOTE>

<P>
<BR><HR>
<ADDRESS>

2011-03-20
</ADDRESS>
</BODY>
</HTML>