#include<reg52.h> #define uint unsigned int #define uchar unsigned char uchar code f[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; sbit wela=P1^1; sbit dula=P1^0; sbit jian=P2^4; sbit jian2=P2^5; uchar a=0,b=0,c; uchar key_1(void); uchar ke…