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 / GSETDATE.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  925 b   |  51 lines

  1. ;/*
  2. ;** setdate.asm
  3. ;** contains: SetDate()
  4. ;*/
  5.  
  6. SETDATE     equ    02bh            ;DOS: set date function number
  7. DOSCALL     equ    021h            ;Interface with DOS here
  8.  
  9.         include model.h
  10.         include prologue.h
  11.  
  12.         pseg    pSetDate
  13.  
  14. ;/*
  15. ;**  int
  16. ;** SetDate(int mo,int da,int yr)
  17. ;**
  18. ;** ARGUMENT(s)
  19. ;**    mo        -    Month (1-12)
  20. ;**    da        -    Day   (1-31)
  21. ;**    yr        -    Year  (1980-2099)
  22. ;**
  23. ;** DESCRIPTION
  24. ;**  Sets DOS date.
  25. ;**
  26. ;**
  27. ;** RETURNS
  28. ;**  0 if successful, else 1 = date invalid.
  29. ;**
  30. ;** AUTHOR
  31. ;**  ""   Tue 15-Nov-1988    09:59:00
  32. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  33. ;**
  34. ;** MODIFICATIONS
  35. ;**
  36. ;*/
  37.         cproc    SetDate
  38.         mov    dh,parm1_        ;dh = month
  39.         mov    dl,parm2_        ;dl = day
  40.         mov    cx,parm3_        ;cx = year
  41.         mov    ah,SETDATE
  42.         int    DOSCALL
  43.         or    al,al
  44.         mov    ax,0            ;return AX=0 if return code
  45.         jz    setdateexit        ;in al=0
  46.         inc    ax            ;else return 1
  47. setdateexit:
  48.         cproce
  49.         endps
  50.         end
  51.