home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-2.ZIP / GFUNC / GSETTIME.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  989 b   |  52 lines

  1. ;/*
  2. ;** settime.asm
  3. ;** contains: SetTime()
  4. ;*/
  5.  
  6. SETTIME     equ    02dh            ;DOS: set time function number
  7. DOSCALL     equ    021h            ;Interface with DOS here
  8.  
  9.         include model.h
  10.         include prologue.h
  11.  
  12.         pseg    pSetTime
  13.  
  14. ;/*
  15. ;**  int
  16. ;** SetTime(int hr,int mi,int se,int hsec)
  17. ;**
  18. ;** ARGUMENT(s)
  19. ;**    hr    -    hour (0-23)
  20. ;**    mi    -    minute (0-59)
  21. ;**    se    -    second (0-59)
  22. ;**    hsec    -    hundredth (0-99)
  23. ;**
  24. ;** DESCRIPTION
  25. ;**  Sets DOS time.
  26. ;**
  27. ;** RETURNS
  28. ;**  0 if successful, 1 if time not valid
  29. ;**
  30. ;** AUTHOR
  31. ;**  ""   Tue 15-Nov-1988    09:47:56
  32. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  33. ;**
  34. ;** MODIFICATIONS
  35. ;**
  36. ;*/
  37.         cproc    SetTime
  38.         mov    ch,parm1_        ;ch = hour
  39.         mov    cl,parm2_        ;cl = minutes
  40.         mov    dh,parm3_        ;dh = seconds
  41.         mov    dl,parm4_        ;dl = hundredths
  42.         mov    ah,SETTIME
  43.         int    DOSCALL
  44.         or    al,al
  45.         mov    ax,0            ;return AX=0 if return code
  46.         jz    settimeexit        ;in al=0
  47.         inc    ax            ;else return 1
  48. settimeexit:
  49.         cproce
  50.         endps
  51.         end
  52.