temphan();
safekey[0]=(Num/1000);
Num %= 1000;
safekey[1]=(Num/100);
Num %= 100;
safekey[2]=(Num/10);
Num %= 10;
safekey[3]=Num;
for(nm9=0;nm9<4;nm9++)
{EEpromWrite(10+nm9,safekey[nm9]);}
}break;
case 5:
{
temphan();
safekey[0]=(Num/1000);
Num %= 1000;
safekey[1]=(Num/100);
Num %= 100;
safekey[2]=(Num/10);
Num %= 10;
safekey[3]=Num;
for(nm9=0;nm9<4;nm9++)
{EEpromWrite(10+nm9,safekey[nm9]);}
}break;
case 6:
{
temphan();
safekey[0]=(Num/100000);//这里添加就报错
Num %= 1000000;//这里添加了就报错
safekey[1]=(Num/10000);
Num %= 100000;
safekey[2]=(Num/1000);
Num %= 10000;
safekey[3]=(Num/100);
Num %= 1000;
safekey[4]=(Num/10);
Num %= 10;
safekey[5]=Num;
for(nm9=0;nm9<7;nm9++)
{EEpromWrite(10+nm9,safekey[nm9]);}
}break;
default:
break;
}
}
}
unsigned long Num;
void temphan()
{
unsigned long uk=0x1000000;
unsigned char m;
for(m=0;m<4;m++)
{
Num+=safekey[m]*uk;
uk>>2;
}
}