home *** CD-ROM | disk | FTP | other *** search
- ;/*
- ;** settime.asm
- ;** contains: SetTime()
- ;*/
-
- SETTIME equ 02dh ;DOS: set time function number
- DOSCALL equ 021h ;Interface with DOS here
-
- include model.h
- include prologue.h
-
- pseg pSetTime
-
- ;/*
- ;** int
- ;** SetTime(int hr,int mi,int se,int hsec)
- ;**
- ;** ARGUMENT(s)
- ;** hr - hour (0-23)
- ;** mi - minute (0-59)
- ;** se - second (0-59)
- ;** hsec - hundredth (0-99)
- ;**
- ;** DESCRIPTION
- ;** Sets DOS time.
- ;**
- ;** RETURNS
- ;** 0 if successful, 1 if time not valid
- ;**
- ;** AUTHOR
- ;** "" Tue 15-Nov-1988 09:47:56
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc SetTime
- mov ch,parm1_ ;ch = hour
- mov cl,parm2_ ;cl = minutes
- mov dh,parm3_ ;dh = seconds
- mov dl,parm4_ ;dl = hundredths
- mov ah,SETTIME
- int DOSCALL
- or al,al
- mov ax,0 ;return AX=0 if return code
- jz settimeexit ;in al=0
- inc ax ;else return 1
- settimeexit:
- cproce
- endps
- end
-