home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
alde_c
/
misc
/
lib
/
clib1
/
dosdate.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1980-01-01
|
384 b
|
21 lines
#include <dos.h>
dosdate(date)
char date[];
{
char mon[3],
day[3],
yy[5];
union REGS DREG;
DREG.h.ah=0x2a;
intdos(&DREG.h,&DREG.h);
stcu_d(mon,DREG.h.dh,3);
stcu_d(day,DREG.h.dl,3);
stcu_d(yy,DREG.x.cx,5);
strcpy(date,mon);
strcat(date,"-");
strcat(date,day);
strcat(date,"-");
strcat(date,yy);
}