home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 01e / lynn00.zip / DOSDATE.C < prev    next >
Text File  |  1989-03-20  |  384b  |  21 lines

  1. #include <dos.h>
  2. dosdate(date)
  3. char date[];
  4. {
  5.      char mon[3],
  6.          day[3],
  7.          yy[5];
  8.     union REGS DREG;
  9.     DREG.h.ah=0x2a;
  10.     intdos(&DREG.h,&DREG.h);
  11.     stcu_d(mon,DREG.h.dh,3);
  12.     stcu_d(day,DREG.h.dl,3);
  13.     stcu_d(yy,DREG.x.cx,5);
  14.     strcpy(date,mon);
  15.     strcat(date,"-");
  16.     strcat(date,day);
  17.     strcat(date,"-");
  18.     strcat(date,yy);
  19.  
  20. }