home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / 30TURUTL / README.DOC < prev    next >
Text File  |  1985-04-08  |  4KB  |  95 lines

  1. Introduction:
  2. ------------
  3.  
  4. This library contains procedures which allow you to execute DOS
  5. commands and many other programs from within a running Turbo Pascal
  6. program.  The assembler routine TURBORUN.COM performs the
  7. actual execution of the external commands via DOS function 4B.  The
  8. sample Turbo Pascal program PIBDODOS demonstrates how to use TURBORUN.COM
  9. in two different ways:
  10.  
  11.      (1)  To directly perform a selected command;
  12.      (2)  To start up a secondary command processor so that
  13.           any set of commands can be executed.  Control is
  14.           returned to the Turbo routine PIBDODOS by entering EXIT.
  15.  
  16. Files:
  17. -----
  18.  
  19. Libbrary PIBDODOS.LBR contains the following files:
  20.  
  21.      README.DOC   --- what you are reading now.
  22.      PIBDODOS.PQS --- squeezed Turbo Pascal routine showing
  23.                       how to use TURBORUN.COM (see below).
  24.      TURBORUN.COM --- Assembled external routine for invoking
  25.                       DOS commands from Turbo Pascal.
  26.      TURBORUN.AQM --- Squeezed assembler source from which
  27.                       TURBORUN.COM was created.
  28.  
  29. PIBDODOS.PQS and TURBORUN.AQM are both squeezed files.  They were
  30. squeezed without the time and date stamp, so your favorite
  31. unsqueezer should have no difficulty.  I especially recommend
  32. Alan Losoff's ALUSQ.COM.
  33.  
  34. Credits:
  35. -------
  36.  
  37. The external routine TURBORUN.COM was written by John Cooper and
  38. John Falconer.  The sample routine PIBDODOS was written by Philip R. Burns.
  39. Cooper and Falconer provided a sample routine, but theirs required
  40. that COMMAND.COM be present in the active directory in order to work,
  41. and they did not show how to bring up a secondary command processor.
  42.  
  43. What PIBDODOS does:
  44. ------------------
  45.  
  46. PIBDODOS first searches the DOS environment string for COMSPEC= to
  47. obtain the current location of COMMAND.COM.  It then prompts for a
  48. command to execute. If a command is entered, then it is passed to DOS
  49. for execution, if possible.  After the command is executed, control returns
  50. to PIBDODOS.  If no command is entered -- i.e., a null line is input --
  51. then PIBDODOS brings up a secondary DOS command processor.  DOS commands
  52. may be entered as desired.  Entering 'EXIT' returns control to
  53. PIBDODOS. PIBDODOS then prompts for another command to execute, and so on,
  54. until 'END' is entered.
  55.  
  56. Using PIBDODOS:
  57. --------------
  58.  
  59. You may use the file TURBORUN.COM as provided in the library.  If you
  60. prefer, you may extract the deck TURBORUN.AQM, unsqueeze it, and follow
  61. the directions in that deck's comments to produce TURBORUN.COM.
  62.  
  63. Unsqueeze PIBDODOS.PQS --> PIBDODOS.PAS.  Invoke Turbo Pascal,
  64. making sure that TURBORUN.COM is in the same directory as PIBDODOS.PAS.
  65. Compile PIBDODOS.PAS to a .COM file, and also set the maximum heap
  66. size (Axxxx in O)ptions) to what the Turbo program will need to
  67. execute.  Any remaining memory will be used for executing external
  68. commands.
  69.  
  70. You can find out more information by reading the comments in the
  71. source file TURBORUN.ASM.
  72.  
  73. Glitches:
  74. --------
  75.  
  76. There are some glitches with the approach used by PIBDODOS/TURBORUN.
  77. DOS may freeze up if there is not enough memory to execute the command,
  78. or if the command clobbers memory that does not belong to it.  In these
  79. cases, a re-boot is required.
  80.  
  81. Comments:
  82. --------
  83.  
  84. Send comments, suggestions, etc. to PHILIP BURNS on either of the
  85. following two Chicago BBSs:
  86.  
  87.        Gene Plantz's BBS (312) 882 4227
  88.        Ron Fox's BBS     (312) 940 6496
  89.  
  90. If you find a problem in TURBORUN.ASM, you may also want to notify
  91. Cooper and Falconer -- their address is in the comments of TURBORUN.ASM.
  92.  
  93. Thanks,
  94. Phil Burns
  95. April, 1985