// *********************** START OF MSDOS.CPP *********************** // // Copyright (c) 1992 Mark R. Nelson. All Rights Reserved. // // // This module contains O/S-specific routines. These routines are // all defined for MS-DOS. When the target OS is OS/2, Windows, or // UNIX, different versions of these routines must be linked in. // #include #include "rs232.h" // The default idle function for MS-DOS does nothing. int RS232::IdleFunction( void ) { return RS232_SUCCESS; } // // ReadTime() returns the current time of day in milliseconds. // long ReadTime( void ) { union REGS r; long milliseconds; r.h.ah = 0x2c; int86( 0x21, &r, &r ); milliseconds = (long) r.h.dl * 10; // dl : hundredths milliseconds += (long) r.h.dh * 1000; // dh : seconds milliseconds += (long) r.h.cl * 60000L; // cl : minutes milliseconds += (long) r.h.ch * 3600000L; // ch : hours return( milliseconds ); } // *********************** END OF MSDOS.CPP ***********************