#ifndef UTILSDEF #define UTILSDEF #include typedef struct date Date; typedef struct { unsigned char ti_min; unsigned char ti_hour; unsigned char ti_hund; unsigned char ti_sec; unsigned char ti_ms; unsigned char ti_hlth; } Time; unsigned char BCD(unsigned char c); unsigned char unBCD(unsigned char c); unsigned char BCD(unsigned char c); unsigned char unBCD(unsigned char c); long mydostounixInt(struct date *dt,struct time *tm); long mydostounix(struct date *dt,struct time *tm); void myunixtodos(long time, struct date *dt, struct time *tm); #define PORTSREG 1 #define DMAREG 2 #define SIMPLETIMEINFO 0xABAA typedef struct { char keyWord[10]; unsigned int type; int far *regimList; int regimListLen; void far *buf; char requested; } TimeDriverInfo; // time driver commands #define GETCLOCKPARS 0 #define SETCLOCK 1 #define GETCLOCK 2 #define CLOCKONOFF 3 #define SETCLOCKREGIM 0x70 #define TIMEREQUEST 0x80 // time driver's retcodes #define INVALIDCOMMAND 0x00FF int getClockParameters(int intNum, TimeDriverInfo far *tdi); int setClock(int intNum, Time far *t, Date far *d); int getClock(int intNum, Time far *t, Date far *d); int clockOnOff(int intNum,int mode); int setClockRegim(int intNum,int reg); int setTimeRequest(int intNum); void ttDateTime(Time *t, Date *d); int checkIntClock(long timeout,int timeBase, int mainClockIntNum, int addClockIntNum, int maxRTC_INTshift); // DOSACT.H - define DOS Active Section setDOSActiv(); resetDOSActiv(); // Other util's function unsigned short calcControlSum(unsigned short *buf, unsigned short len); int chkstat(void); void DOStoRTC(int intNum); #endif