home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / zendisk2.zip / PZTIME.BAT < prev    next >
DOS Batch File  |  1990-02-15  |  3KB  |  62 lines

  1. echo off
  2. rem
  3. rem *** Listing 2-4 ***
  4. rem
  5. rem ***************************************************************
  6. rem * Batch file PZTIME.BAT, which builds and runs the precision  *
  7. rem * Zen timer program PZTEST.EXE to time the code named as the  *
  8. rem * command-line parameter. Listing 2-1 must be named           *
  9. rem * PZTIMER.ASM, and Listing 2-2 must be named PZTEST.ASM. To   *
  10. rem * time the code in LST2-3, you'd type the DOS command:        *
  11. rem *                                                             *
  12. rem * pztime lst2-3                                               *
  13. rem *                                                             *
  14. rem * Note that MASM and LINK must be in the current directory or *
  15. rem * on the current path in order for this batch file to work.   *
  16. rem *                                                             *
  17. rem * This batch file can be speeded up by assembling PZTIMER.ASM *
  18. rem * once, then removing the lines:                              *
  19. rem *                                                             *
  20. rem * masm pztimer;                                               *
  21. rem * if errorlevel 1 goto errorend                               *
  22. rem *                                                             *
  23. rem * from this file.                                             *
  24. rem *                                                             *
  25. rem * By Michael Abrash 4/26/89                                   *
  26. rem ***************************************************************
  27. rem
  28. rem Make sure a file to test was specified.
  29. rem
  30. if not x%1==x goto ckexist
  31. echo ***************************************************************
  32. echo * Please specify a file to test.                              *
  33. echo ***************************************************************
  34. goto end
  35. rem
  36. rem Make sure the file exists.
  37. rem
  38. :ckexist
  39. if exist %1 goto docopy
  40. echo ***************************************************************
  41. echo * The specified file, "%1," doesn't exist.
  42. echo ***************************************************************
  43. goto end
  44. rem
  45. rem copy the file to measure to TESTCODE.
  46. rem
  47. :docopy
  48. copy %1 testcode
  49. masm pztest;
  50. if errorlevel 1 goto errorend
  51. masm pztimer;
  52. if errorlevel 1 goto errorend
  53. link pztest+pztimer;
  54. if errorlevel 1 goto errorend
  55. pztest
  56. goto end
  57. :errorend
  58. echo ***************************************************************
  59. echo * An error occurred while building the precision Zen timer.   *
  60. echo ***************************************************************
  61. :end
  62.