#include <stdio.h>
#include "fx2.h"
#include "fx2regs.h"


void ISR_EXTR0(void) interrupt 0
{ 
  TCON &= 0xFD;         // Clear INT0  TCON.1 Flag
  // Yes .  You do not need to clear this flag as it is
  // cleared by hardware 
  IOC ^= 0x01;		    // Toggle pin 0 of PortA
}
void ISR_EXTR1(void) interrupt 2
{ 
  TCON &= 0xF7;         // Clear INT1  TCON.3 Flag
  // Yes .  You do not need to clear this flag as it is
  // cleared by hardware 
  IOC ^= 0x02;		    // Toggle pin 1 of PortA
}
void ISR_EXTR4(void) interrupt 10
{
  	EXIF &= 0xBF;      // Clear INT4 EXIF.6  Flag
	IOC ^= 0x10;	   // Toggle pin 4 of PortC
}
void ISR_EXTR5(void) interrupt 11
{
    EXIF &= 0x7F;      // Clear INT5 EXIF.7  Flag
	IOC ^= 0x20;	   // Toggle pin 5 of PortC
}
void ISR_EXTR6(void) interrupt 12
{
   EICON &= 0xF7;      // Clear INT6 EICON.3  Flag
   IOC  ^= 0x40;	   // Toggle pin 6  of PortC
}
