Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05068A
* daytime.c - a demonstration program to read and
* interpret the DOS CLOCK$ driver
* Written by M. L. Lesser, 11/7/91, for Borland C
* (Use pragma to pack structures
* if compiling with MS C)
*/
#include
#include
#include
#include
int handle;
typedef unsigned char byte;
struct {
int days;
byte minutes;
byte hours;
byte hundsecs;
byte seconds;
} today;
void main()
{
handle = open("CLOCK$",O_RDONLY | O_BINARY);
read(handle,&today,6);
close(handle);
printf("There have been %d days since 1-1-80\n",today.days);
printf("The time of day is %02d:%02d:%02d.%02d\n",
today.hours,today.minutes,today.seconds,today.hundsecs);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/