home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource1 / cenvid / dostime.bat < prev    next >
DOS Batch File  |  1993-04-11  |  400b  |  19 lines

  1. @echo off
  2. REM DosTime - CEnvi example program for showing the Dos system time
  3. cenvi %0.bat
  4. GOTO CENVI_EXIT
  5.  
  6. printf("Displaying DOS system time; press any key to end:\n")
  7.  
  8. while( !kbhit() ) {
  9.    reg.ah = 0x2C
  10.    interrupt(0x21,reg)
  11.    printf("\r%2d:%02d:%02d.%02d",reg.ch,reg.cl,reg.dh,reg.dl)
  12. }
  13.  
  14. while( kbhit() ) getch()         // flush keyboard buffer
  15. printf("\n")
  16.  
  17.  
  18. :CENVI_EXIT
  19.