?? 12345.c
字號:
asm(".include hardware.inc");
extern int Sec;
extern int Min;
extern int Hour;
extern int day;
extern int month;
extern int year;
extern int i3;
extern int stoptag;
extern int keycode;
void key_change(void){
i3=0;
switch (keycode){
case 1: {if(stoptag==0){asm("[P_INT_Ctrl]=%0"::"r"(0x0080));
stoptag=1;keycode=0;
break;}
else{asm("[P_INT_Ctrl]=%0"::"r"(0x0084));
stoptag=0;keycode=0;
break;}
}
case 2:{if(Sec==60)Sec=0;
else Sec++;
break;}
case 3:{if(Sec==0)Sec=0;
else Sec--;
break;}
case 4:{if(Min==60)Min=0;
else Min++;
break;}
case 5:{if(Min==0)Min=0;
else Min--;
break;}
case 6:{if(Hour==23)Hour=0;
else Hour++;
break;}
case 7:{if(Hour==0)Hour=0;
else Hour--;
break;}
case 9:{if((year-2000)%4==0)
{if(month==2&&day==29){day=1,month=3;break;}}
else if(month==2&&day==28){day=1,month=3;break;}
if(month==12&&day==31){month=1,day=1,year++;break;}
else if(day==31&&(month==1||month==3||month==5||month==7||month==8||month==10)){day=1,++month;break;}
else if(day==30&&month!=12){day=1,++month;break;}
else ++day;
break;}
case 10:{if(day==1){if((year-2000)%4==0)
{if(month==3){day=29;month=2;break;}}
else if(month==3){day=28;month=2;break;}
if(month==1){year--,month=12,day=31;break;}
else if(month==5||month==7||month==8||month==10||month==12){month--,day=30;break;}
else{ --month,day=31;break;}
}
else --day;
break;
}
case 11:{if(month==12)month=1,year++;
else ++month;
break;
}
case 12:{if(month==1)month=12,year--;
else --month;
break;}
case 13:++year;break;
case 14:--year;break;
default: break;}
asm("[P_Watchdog_Clear]=%0"::"r"(0x0001));
keycode=0;
return;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -