
	SYSTIME++;		//increament the SYSTIME variable used for fire timing
	if (IE0)		//If zero cross detected.
	{
		SYSTIME=0;	//increase systimer.
		cycles++;
		IE0=0;		//Clear zero cross flag.
		firecount=4;	//set fire couter.
	}
	if (SYSTIME>99)		//If SYSTIME exceeding 100 it is a zero cross.
	{
		SYSTIME=0;	//reset system timer.
		firecount=4;	//set fire counter.
	}
	if (onfire && SYSTIME>firedly && firecount)
	{
		FIREPORT=(firecount & 1);	//Put the fire pulse	
		firecount--;	//Reduce remining pulse counter.
	}
	else
		FIREPORT=1;	//Make fire pin 1 to keep transistor off.
	ioport=OPSTATUS;
}