#include "hard.h"

static RE_TS_DATA data;

void inzt01()
{
 	sys0(1,0x1111);
	sys1(1,1,0,0);
	sys2(1,3,0,0);
	re_ts_init();
	sys5(1,0,TS_INT_VCT,0,0);
	sys8(1,0,0);
	ts_enable_int();
}

void nrmt01(int a,int b)
{
	int i,dat;
	unsigned datr,datl;
	sys1(0,1,0,0);
	led_on(GREEN);
}

void timt01(int a,int b)
{
	unsigned datar,datal;

	data=re_ts_data();
	datar=data.r;
	datal=data.l;
	sys8(1,2,datar);
	sys8(1,3,datal);
}

interrupt void intt01()
{
	int datat;

	ts_disable_int();
	datat=ts_data();
	sys8(1,1,datat);
	led_set_all(datat);
	ts_enable_int();
}