# include
# include "absacc. H"
# define uint unsigned int
# define uchar unsigned char
# define PA8255 XBYTE [0 xff7c]
# define PB8255 XBYTE [0 xff7d]
# define COM8255 XBYTE [0 xff7f]
Sbit S1=P3 ^ 2;
Void delay (uint t);
Uchar time []={x5b x3f 0, 0 x06, 0, 0, x4f x66 0, 0 x6d, 0 x7d, 0 x07, 0 x7f, 0 x6f, 0 x01};
Uchar a=0, b=0;
Void main ()
{
COM8255=0 x80;
EA=1;
EX0=1;
IT0=1;
TMOD=0 x55;
TH0=0 XFF;
TL0=0 XFF;
TH1=0 XFF;
TL1=0 XFF;
PX0=0;
PA8255=0 x00;
PA8255=0 x00;
While (1)
{
PB8255=time [a];
PA8255=time [b];
delay(1000);
+;
If (time [b]==0 x7d) b=0;
If (time [a]==0 x01) a=0, b++;
}
}
Void ting () interrupt 0
{
Uchar n=100;
PB8255=0 x00;
PA8255=0 x00;
delay(1000);
ET0=1;