想问下那个段号的百位十位数字是什么?能否解释一下这个程序
#include
#include"Config.h"
#include"timeDLY.h"
#include"Config.c"
#include"zlg7289.h"
#include"RecordMng.h"
#include"PlayMng.h"
void InitIO() //口初始化
{
RECD_PLAY = 1;
RecordGUD = 0;
PlayGUD = 0;
ZLG7289CS = 1;
ZLG7289CLK = 0;
ZLG7289DIO = 1;
ZLG7289INT = 1;
ADCEOT = 0;
ADCSTART = 1;
ADCOE = 1;
DACCS = 1;
SRAMCE = 0;
SRAMWE = 0;
SRAMOE = 0;
A16 = 0;
A17 = 0;
P2 = 0x00;
P1 = 0x00;
}
void main()
{
INT16U seg; //unsigned int seg数组
INT8U key,key1,key2,key3,key4; //unsigned char 四个键
InitIO();
while(1)
{
if(RECD_PLAY==1) //录音
{
//设置段号
//段号的百位数字
seg0: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key1 = key;
while(!ZLG7289INT);
while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto seg0;
else
{
key2 = key;
while(!ZLG7289INT);
goto esc1;
}
//段号的十位数字
seg1: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key2 = key;
while(!ZLG7289INT);
esc1: while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto seg1;
else
{
key3 = key;
while(!ZLG7289INT);
goto esc2;
}
//段号的个位数字
seg2: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key3 = key;
while(!ZLG7289INT);
esc2: while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto seg2;
else
{
seg = key1*100+key2*10+key3;
key4 = key;
while(!ZLG7289INT);
if(key4==ENTER) goto start;
else goto wait;
}
//等待开始
wait: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key!=ENTER);
while(!ZLG7289INT);
start: Record(seg);
if(ZLG7289INT==0)
{
key = ZLG7289_ReadKey();
if(key == NEXT)
{
if(seg<300) seg +=1;
goto start;
}
while(!ZLG7289INT);
}
}
else if(RECD_PLAY==0) //放音
{
//设置段号
//段号的百位数字
pseg0: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key1 = key;
while(!ZLG7289INT);
while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto pseg0;
else
{
key2 = key;
while(!ZLG7289INT);
goto pesc1;
}
//段号的十位数字
pseg1: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key2 = key;
while(!ZLG7289INT);
pesc1: while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto pseg1;
else
{
key3 = key;
while(!ZLG7289INT);
goto pesc2;
}
//段号的个位数字
pseg2: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key>9);
key3 = key;
while(!ZLG7289INT);
pesc2: while(ZLG7289INT);
key = ZLG7289_ReadKey();
if(key==ESC) goto pseg2;
else
{
seg = key1*100+key2*10+key3;
key4 = key;
while(!ZLG7289INT);
if(key4==ENTER) goto pstart;
else goto pwait;
}
//等待开始
pwait: do
{
while(ZLG7289INT);
key = ZLG7289_ReadKey();
}
while(key!=ENTER);
while(!ZLG7289INT);
pstart: Play(seg);
if(ZLG7289INT==0)
{
key = ZLG7289_ReadKey();
if(key == NEXT)
{
if(seg<300) seg +=1;
goto pstart;
}
while(!ZLG7289INT);
}
}
}
}