home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol6n20.zip / PROFIL.ZIP / PROFILE.PAS < prev    next >
Pascal/Delphi Source File  |  1987-01-11  |  774b  |  35 lines

  1. program Profiler ;
  2.  
  3. {.L-}
  4. {$I declare.prf}
  5. {$I environ.prf}
  6. {$I screen.prf}
  7. {$I profile.prf}
  8. {$I invoke.prf}
  9. {$I drawhist.prf}
  10. {.L+}
  11.  
  12. var
  13.   ch : char ;
  14.  
  15. begin
  16.   SetupScreen ;
  17.   DrawWarningScreen ;
  18.   Read( KBD, ch ) ;
  19.   if ((ch <> 'y') and (ch <> 'Y')) then
  20.   begin
  21.     ClrScr;
  22.     Halt;
  23.   end;
  24.   DrawProfileScreen ;
  25.   Init_Profiler ;              { Install the profiler }
  26.   TopOfStack := StackPointer;  { Needed by invoke }
  27.   Invoke( Command ) ;          { Execute the program to be profiled }
  28.   Fastwrite( 'Press any key to continue.', 25, 1, TextAttr ) ;
  29.   Read( KBD, ch );
  30.   Remove_Int ;                 { Remove the profiler }
  31.   ShowProfile ;                { Display data }
  32.   ClrScr ;                     { Restore the screen }
  33. end.
  34.  
  35.