

	inter.INT_event = INT_event;
	const uint8 OS_channel_ID = DT.INT_INDEX;
	inter.OS_channel_INT = OS_channel_ID;
	inter =
	#include "$chip$_interrupt.txt"
	
	
	//---------------------------------------------------
	void INT_event()
	{
		#asm "push r31"
		#asm "push r30"
		
		#asm "push r20"
		#asm "push r21"
		#asm "push r22"
		#asm "push r23"
		#asm "push r24"
		#asm "push r25"
		
		#asm "lds r20,&tick"
		#asm "lds r21,&tick+1"
		#asm "lds r22,&tick+2"
		#asm "lds r23,&tick+3"
		#asm "ldi r24,1"
		#asm "clr r25"
		#asm "add r20,r24"
		#asm "adc r21,r25"
		#asm "adc r22,r25"
		#asm "adc r23,r25"
		#asm "sts &tick,r20"
		#asm "sts &tick+1,r21"
		#asm "sts &tick+2,r22"
		#asm "sts &tick+3,r23"
		
		#asm "pop r25"
		#asm "pop r24"
		#asm "pop r23"
		#asm "pop r22"
		#asm "pop r21"
		#asm "pop r20"
		
		#asm "pop r30"
		#asm "pop r31"
	}
	
	

