home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH24EX10.C < prev   
Encoding:
Text File  |  1990-03-26  |  680 b   |  30 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.    
  5. pascal mydate_0(int Year, int Month, int Day)
  6. {
  7.    asm    mov      cx,Year
  8.    asm    mov      dh,Month
  9.    asm    mov      dl,Day
  10.    asm    mov      ah,02BH
  11.    asm    int      21H /* Set the new date */
  12. }
  13.  
  14. pascal mydate_1(int *Year, int *Month, int *Day)
  15. {
  16.    asm    mov      ah,2AH
  17.    asm    int      21H
  18.  
  19. /* Now the date is placed in the registers: CX=Year, DH=Month,
  20. DL=Day */
  21.    asm    les      di,Year
  22.    asm    mov      es:[di],cx
  23.    asm    les      di,Month
  24.    asm    mov      es:[di],dh
  25.    asm    mov      es:1[di],byte ptr 0
  26.    asm    les      di,Day
  27.    asm    mov      es:[di],dl
  28.    asm    mov      es:1[di],byte ptr 0
  29. }
  30.