home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TPROUTN.ZIP / PIBDODOS.DOC < prev    next >
Encoding:
Text File  |  1985-04-15  |  3.4 KB  |  92 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.PAS --- 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.ASM --- Assembler source from which
  27.                       TURBORUN.COM was created.
  28.  
  29.  
  30. Credits:
  31. -------
  32.  
  33. The external routine TURBORUN.COM was written by John Cooper and
  34. John Falconer.  The sample routine PIBDODOS was written by Philip R. Burns.
  35. Cooper and Falconer provided a sample routine, but theirs required
  36. that COMMAND.COM be present in the active directory in order to work,
  37. and they did not show how to bring up a secondary command processor.
  38.  
  39. What PIBDODOS does:
  40. ------------------
  41.  
  42. PIBDODOS first searches the DOS environment string for COMSPEC= to
  43. obtain the current location of COMMAND.COM.  It then prompts for a
  44. command to execute. If a command is entered, then it is passed to DOS
  45. for execution, if possible.  After the command is executed, control returns
  46. to PIBDODOS.  If no command is entered -- i.e., a null line is input --
  47. then PIBDODOS brings up a secondary DOS command processor.  DOS commands
  48. may be entered as desired.  Entering 'EXIT' returns control to
  49. PIBDODOS. PIBDODOS then prompts for another command to execute, and so on,
  50. until 'END' is entered.
  51.  
  52. Using PIBDODOS:
  53. --------------
  54.  
  55. You may use the file TURBORUN.COM as provided in the library.  If you
  56. prefer, you may extract the deck TURBORUN.AQM, unsqueeze it, and follow
  57. the directions in that deck's comments to produce TURBORUN.COM.
  58.  
  59. Unsqueeze PIBDODOS.PQS --> PIBDODOS.PAS.  Invoke Turbo Pascal,
  60. making sure that TURBORUN.COM is in the same directory as PIBDODOS.PAS.
  61. Compile PIBDODOS.PAS to a .COM file, and also set the maximum heap
  62. size (Axxxx in O)ptions) to what the Turbo program will need to
  63. execute.  Any remaining memory will be used for executing external
  64. commands.
  65.  
  66. You can find out more information by reading the comments in the
  67. source file TURBORUN.ASM.
  68.  
  69. Glitches:
  70. --------
  71.  
  72. There are some glitches with the approach used by PIBDODOS/TURBORUN.
  73. DOS may freeze up if there is not enough memory to execute the command,
  74. or if the command clobbers memory that does not belong to it.  In these
  75. cases, a re-boot is required.
  76.  
  77. Comments:
  78. --------
  79.  
  80. Send comments, suggestions, etc. to PHILIP BURNS on either of the
  81. following two Chicago BBSs:
  82.  
  83.        Gene Plantz's BBS (312) 882 4227
  84.        Ron Fox's BBS     (312) 940 6496
  85.  
  86. If you find a problem in TURBORUN.ASM, you may also want to notify
  87. Cooper and Falconer -- their address is in the comments of TURBORUN.ASM.
  88.  
  89. Thanks,
  90. Phil Burns
  91. April, 198
  92.