home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / t / tpdetect.zip / TPDETECT.DOC < prev    next >
Text File  |  1992-08-13  |  2KB  |  48 lines

  1. TPDETECT - checks for Turbo Pascal 4+ executables.
  2.  written by D.J. Murdoch for the public domain, August 1992.
  3.  
  4. Syntax:
  5.  
  6.    TPDETECT fileset1 [fileset2 ...]
  7.  
  8.    will look at all the files in the filesets to find those
  9.    that appear to have been compiled by Turbo Pascal.
  10.  
  11. Description:
  12.  
  13.    Since the introduction of "units" with version 4.0 of TP, executables
  14.    compiled by TP have been recognizable in a debugger by the fact that
  15.    they start out with a series of far calls to the initialization
  16.    sections of the various units.  I recently got a new package
  17.    containing a large collection of executables, and was curious whether
  18.    any of them had been written in TP.  Loading each of them into
  19.    a debugger looked pretty dull, so I whipped this little utility
  20.    together.
  21.  
  22.    The tests it uses are very simple:  if a file is in .EXE format, and
  23.    the first executed instruction is a far call, it is flagged as a
  24.    possible TP program.  If it's a new executable, and the first and
  25.    second instructions are both far calls, then it's a TP for Windows
  26.    program.
  27.  
  28.    This test correctly detects TP versions 4.0 to 6.0, and TPW versions
  29.    1.0 and 1.5; it may work for later versions, too.  I don't know of
  30.    any false positives, but I'm sure there are some, so don't trust it
  31.    too much.  Just have fun with it!
  32.  
  33. Bugs:
  34.  
  35.    TPDETECT is without warranty, is poorly tested, and probably contains
  36.    lots of bugs.  If you find any, please let me know; I might even fix
  37.    them.
  38.  
  39.    Duncan Murdoch
  40.    Internet:    dmurdoch@mast.queensu.ca
  41.    Compuserve:  71631,122
  42.    Fidonet:     DJ Murdoch at 1:249/99.5
  43.  
  44. Registration fee:
  45.  
  46.    TPDETECT is public domain.  There's no charge!  But, if the money is
  47.    burning a hole in your pocket, donate it to a local charity and let
  48.    me know, so we'll both feel good about it.