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

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;             Function 2DH: Set Time                         ;
  4.         ;                                                            ;
  5.         ;             int set_time(hour,min,sec,hund)                ;
  6.         ;                 char hour,min,sec,hund;                    ;
  7.         ;                                                            ;
  8.         ;             Returns 0 if time was OK, -1 if not.           ;
  9.         ;                                                            ;
  10.         ;************************************************************;
  11.  
  12. cProc   set_time,PUBLIC
  13. parmB   hour
  14. parmB   min
  15. parmB   sec
  16. parmB   hund
  17. cBegin
  18.         mov     ch,hour         ; Get new hour.
  19.         mov     cl,min          ; Get new minutes.
  20.         mov     dh,sec          ; Get new seconds.
  21.         mov     dl,hund         ; Get new hundredths.
  22.         mov     ah,2dh          ; Set function code.
  23.         int     21h             ; Ask MS-DOS to change time.
  24.         cbw                     ; Return 0 or -1.
  25. cEnd
  26.