#include#include#define uchar unsigned char#define uint unsigned int#define setb(val,bitn) (val|=(1<<(bitn)))//設(shè)置某IO口某位為1#define clr(val,bitn) (val&=~(1<<(bitn)))//設(shè)置某IO口某位為0#define get(val,bitn) (val&(1<<(bitn)))//讀取某位狀態(tài)uchar shi=20,fen=39,miao,a=0xff,num;#pragma interrupt_handler zhong:9//它所對應(yīng)的位置#pragma data:code//定義程序存在ROM里面const uchar table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};/***********************************************//*******************延時(shí)子程序******************//***********************************************/void delay(uchar z){uchar x,y;for(x=0;x<255;x++)for(y=0;y
評論