This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Improper fixup

I am currently evaluating your product to develop codefor the Philips 87LPC764.

I have setup the compiler to use the Small memory module and when compiling with an interrupt routine I get the above error. If I comment out the interrupt the problem goes away. Can you please point me in the right direction?

BTW this code is just junk and does not do much...I just wittled it down to try and find the problem.

Regards,

Dale

#include <reg764.h> /* define 8051 registers */
#include <stdio.h> /* define I/O functions */



unsigned int interruptcnt;
unsigned char second;
void ext_int (void) interrupt 1
{
}
//{
// if (++interruptcnt == 4000)
// { /* count to 4000 */
// second++; /* second counter */
// interruptcnt = 0; /* clear int counter */
// }
//}

void next_int ()
{
if (++interruptcnt == 4000)
{ /* count to 4000 */
second++; /* second counter */
interruptcnt = 0; /* clear int counter */
}
}

main()
{
int x;
next_int();
while(1)
if(x);
while(1)
if(x);
while(1)
if(x);
while(1)
if(x);
while(1)
if(x);
}

Regards

Dale