#define uchar unsigned char
#define uint unsigned int
#include <reg52.h>
#include "asc.h" //ASCII字模表
#include "12864.h" //12864液晶屏底层驱动程序
bit ERROR=1; //输入字符错误标志位
bit result=0; //输入结果对错的标志位,为0是正确
bit verify=1; //已按了确认键后清零
sbit ERR=P2^7;
uchar correctNUM; //统计测试正确的单词数,即得分
/*****************************************
/** 存储要测试的单词,放在ROM中
/****************************************/
uchar code S[10][5]={ "tree ", //树
"rain ", //雨
"water", //水
"fly ", //飞
"go ", //去
"fish ", //鱼
"snow ", //雪
"eat ", //吃
"rice ", //米
"ice ", //冰
} ;
uchar code SL[10]={4,4,5,3,2,4,4,3,4,3};//存储各测试单词的长度
uchar KeyNum[8]; //储存输入的单词
/*****************************************
/** 存储键盘的字母值 ,放在ROM中
/****************************************/
uchar code tab1[6][5]={{‘a‘,‘b‘,‘c‘,‘d‘,‘e‘},
{‘f‘,‘g‘,‘h‘,‘i‘,‘j‘},
{‘k‘,‘l‘,‘m‘,‘n‘,‘o‘},
{‘p‘,‘q‘,‘r‘,‘s‘,‘t‘},