home *** CD-ROM | disk | FTP | other *** search
- ;/*
- ;** setdate.asm
- ;** contains: SetDate()
- ;*/
-
- SETDATE equ 02bh ;DOS: set date function number
- DOSCALL equ 021h ;Interface with DOS here
-
- include model.h
- include prologue.h
-
- pseg pSetDate
-
- ;/*
- ;** int
- ;** SetDate(int mo,int da,int yr)
- ;**
- ;** ARGUMENT(s)
- ;** mo - Month (1-12)
- ;** da - Day (1-31)
- ;** yr - Year (1980-2099)
- ;**
- ;** DESCRIPTION
- ;** Sets DOS date.
- ;**
- ;**
- ;** RETURNS
- ;** 0 if successful, else 1 = date invalid.
- ;**
- ;** AUTHOR
- ;** "" Tue 15-Nov-1988 09:59:00
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc SetDate
- mov dh,parm1_ ;dh = month
- mov dl,parm2_ ;dl = day
- mov cx,parm3_ ;cx = year
- mov ah,SETDATE
- int DOSCALL
- or al,al
- mov ax,0 ;return AX=0 if return code
- jz setdateexit ;in al=0
- inc ax ;else return 1
- setdateexit:
- cproce
- endps
- end
-