home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH22EX10.C < prev    next >
Encoding:
Text File  |  1988-06-21  |  742 b   |  33 lines

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