home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
463.lha
/
Date_routines
/
dateset.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-04
|
584b
|
28 lines
/*****
dateset()
This function sets the system date using interrupt 0x21. The date
must fall between 1980 and 2099.
Argument list: int day the day
int month the month
int year the year
Return value: int 0 if successful, 0xff if not
*****/
#include <dos.h>
int dateset(int day, int month, int year)
{
union REGS ireg;
ireg.h.ah = 0x2b;
ireg.h.dl = day;
ireg.h.dh = month;
ireg.x.cx = year;
intdos(&ireg, &ireg);
return (ireg.h.al);
}