home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / at / atim.arc / ATIM.DOC < prev   
Encoding:
Text File  |  1986-12-28  |  2.2 KB  |  45 lines

  1.                               ATIM
  2.               PC-AT High Resolution Execution Timer
  3.  
  4. ATIM is a utility to which will load and execute another program
  5. and report elapsed time using the PC-AT high resolution timer.
  6.  
  7. This program is both hardware and operating system dependent. It
  8. requires an IBM PC-AT or close clone with a high resolution
  9. timer accessable at port 70h as well as bios support for INT 70h.
  10. As supplied, this program uses the undocumented INT 2Eh back
  11. door entry point into COMMAND.COM for its load & execute
  12. function. For operation under Concurrent Dos 5.0 XM, the CCPM
  13. equate is provided which will enable conditional assembly of
  14. the traditional DOS load & execute function.
  15.  
  16. My primary reason for writing this program is to distinguish
  17. between alternate assembly language subroutines in programs
  18. which I develop. The high resolution timer generates a tick
  19. 1024 times a second as oposed to 18.2 ticks per second with
  20. the low resolution timer. This provides accuracy to 3 decimal
  21. places and minimizes the need to put sequences within repeat
  22. loops in order to time them - after all, a repeat loop can
  23. distort true performance because of its side effect of purging
  24. the pre-fetch queue each time through. And use of the back door
  25. INT 2Eh loader eliminates the masking overhead of loading a new
  26. copy of COMMAND.COM.
  27.  
  28. But it should be kept in mind that with the high resolution
  29. timer enabled, program execution is slowed down somewhat.
  30. You might try commenting out calls to the DISABLE_70 and
  31. running Norton's SI to get an idea of how much (then reboot).
  32. This is inevitable since the interrupt handler is being called
  33. so often. And to make matters worse, the IBM ROM bios shuts
  34. off the timer after each interrupt requiring the program to
  35. turn it back on again. The CLONE equate has been provided to
  36. skip the reinitialization and should be set TRUE if your bios
  37. is less ill mannered than IBM's (works fine on PC's LTD AT).
  38.  
  39. Most of the code for the high resolution timer was found
  40. squirreled away in a listing published by Greg Weissman in
  41. the March 1986 Dr. Dobbs starting on page 96. The INT 2Eh
  42. technique was grafted in after Ray Duncan's December 1986
  43. column, also from Dr. Dobbs.
  44.                     Howard Vigorita, NYACC
  45.                     December 27, 1986