#define CRYSTALFREQ 12000000
#define INSFREQ (CRYSTALFREQ/12)
#define TIMERFREQ (CRYSTALFREQ/12)
#define _BASETICK 1000
#define __FREQBASE__ (65536-((TIMERFREQ/_BASETICK)-10))
#define __VTH (__FREQBASE__/256)
#define __VTL (__FREQBASE__%256)
#define intINT0 0
#define intT0 1
#define intINT1 2
#define intT1 3
#define intUART1 4
#define intUART 4
#define intINT2 6
sbit out=P0^0;
sbit Key1=P1^0;
sbit Key2=P2^1;
unsigned long acttimer;
unsigned char key1cnt;
unsigned char key2cnt;
bit hold;
bit vout;
void _T0ISR(void) interrupt intT0{
TR0=0;TH0=__VTH;TL0=__VTL;TR0=1;TF0=0;
if(acttimer>0){acttimer