#include
#include#define uchar unsigned char#define uint unsigned int#define setb(val,bitn) (val|=(1<<(bitn)))//设置某IO口某位为1#define clr(val,bitn) (val&=~(1<<(bitn)))//设置某IO口某位为0#define get(val,bitn) (val&(1<<(bitn)))//读取某位状况uchar shi=20,fen=39,miao,a=0xff,num;#pragma interrupt_handler zhong:9//它所对应的方位#pragma data:code//界说程序存在ROM里边const uchar table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};/***********************************************//*******************延时子程序******************//***********************************************/void delay(uchar z){uchar x,y;for(x=0;x<255;x++)for(y=0;y