home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn2bh.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.2 KB  |  25 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;             Function 2BH: Set Date                         ;
  4.         ;                                                            ;
  5.         ;             int set_date(month,day,year)                   ;
  6.         ;                 char month,day;                            ;
  7.         ;                 int year;                                  ;
  8.         ;                                                            ;
  9.         ;             Returns 0 if date was OK, -1 if not.           ;
  10.         ;                                                            ;
  11.         ;************************************************************;
  12.  
  13. cProc   set_date,PUBLIC
  14. parmB   month
  15. parmB   day
  16. parmW   year
  17. cBegin
  18.         mov     dh,month        ; Get new month.
  19.         mov     dl,day          ; Get new day.
  20.         mov     cx,year         ; Get new year.
  21.         mov     ah,2bh          ; Set function code.
  22.         int     21h             ; Ask MS-DOS to change date.
  23.         cbw                     ; Return 0 or -1.
  24. cEnd
  25.