#include"..\LIB\i7188.h" void main(void) { int year,month,day,hour,min,sec; int oyear,omonth,oday,ohour,omin,osec; int quit=0; oyear=omonth=oday=ohour=omin=osec=-1; if(!Is7188()) { Print("dt.exe must run on I-7188..."); } else Print("Start dt.exe\n\r"); while(!quit){ if(Kbhit()){ switch(Getch()){ case 'q': quit=1; break; case 'd': /* set date to 02/29/2000 */ SetDate(2000,2,29); break; case 't': SetTime(23,59,50); break; case 'y': /* set date to 02/28/2000 */ SetDate(2000,2,28); SetTime(23,59,50); break; } } GetDate(&year,&month,&day); GetTime(&hour,&min,&sec); if(oyear!=year || omonth!=month || oday!=day || ohour!=hour|| omin!=min || osec!=sec){ oyear=year; omonth=month; oday=day; ohour=hour; omin=min; osec=sec; Print("Date=%02d/%02d/%04d Time=%02d:%02d:%02d\n\r", month,day,year,hour,min,sec); } } }