Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05068A

 
Output of file : 3N05068A contained in archive : WDMAY92.ZIP
/*
* 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);
}


  3 Responses to “Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05068A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/