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 >
Wrap
Text File
|
1985-04-08
|
4KB
|
95 lines
Introduction:
------------
This library contains procedures which allow you to execute DOS
commands and many other programs from within a running Turbo Pascal
program. The assembler routine TURBORUN.COM performs the
actual execution of the external commands via DOS function 4B. The
sample Turbo Pascal program PIBDODOS demonstrates how to use TURBORUN.COM
in two different ways:
(1) To directly perform a selected command;
(2) To start up a secondary command processor so that
any set of commands can be executed. Control is
returned to the Turbo routine PIBDODOS by entering EXIT.
Files:
-----
Libbrary PIBDODOS.LBR contains the following files:
README.DOC --- what you are reading now.
PIBDODOS.PQS --- squeezed Turbo Pascal routine showing
how to use TURBORUN.COM (see below).
TURBORUN.COM --- Assembled external routine for invoking
DOS commands from Turbo Pascal.
TURBORUN.AQM --- Squeezed assembler source from which
TURBORUN.COM was created.
PIBDODOS.PQS and TURBORUN.AQM are both squeezed files. They were
squeezed without the time and date stamp, so your favorite
unsqueezer should have no difficulty. I especially recommend
Alan Losoff's ALUSQ.COM.
Credits:
-------
The external routine TURBORUN.COM was written by John Cooper and
John Falconer. The sample routine PIBDODOS was written by Philip R. Burns.
Cooper and Falconer provided a sample routine, but theirs required
that COMMAND.COM be present in the active directory in order to work,
and they did not show how to bring up a secondary command processor.
What PIBDODOS does:
------------------
PIBDODOS first searches the DOS environment string for COMSPEC= to
obtain the current location of COMMAND.COM. It then prompts for a
command to execute. If a command is entered, then it is passed to DOS
for execution, if possible. After the command is executed, control returns
to PIBDODOS. If no command is entered -- i.e., a null line is input --
then PIBDODOS brings up a secondary DOS command processor. DOS commands
may be entered as desired. Entering 'EXIT' returns control to
PIBDODOS. PIBDODOS then prompts for another command to execute, and so on,
until 'END' is entered.
Using PIBDODOS:
--------------
You may use the file TURBORUN.COM as provided in the library. If you
prefer, you may extract the deck TURBORUN.AQM, unsqueeze it, and follow
the directions in that deck's comments to produce TURBORUN.COM.
Unsqueeze PIBDODOS.PQS --> PIBDODOS.PAS. Invoke Turbo Pascal,
making sure that TURBORUN.COM is in the same directory as PIBDODOS.PAS.
Compile PIBDODOS.PAS to a .COM file, and also set the maximum heap
size (Axxxx in O)ptions) to what the Turbo program will need to
execute. Any remaining memory will be used for executing external
commands.
You can find out more information by reading the comments in the
source file TURBORUN.ASM.
Glitches:
--------
There are some glitches with the approach used by PIBDODOS/TURBORUN.
DOS may freeze up if there is not enough memory to execute the command,
or if the command clobbers memory that does not belong to it. In these
cases, a re-boot is required.
Comments:
--------
Send comments, suggestions, etc. to PHILIP BURNS on either of the
following two Chicago BBSs:
Gene Plantz's BBS (312) 882 4227
Ron Fox's BBS (312) 940 6496
If you find a problem in TURBORUN.ASM, you may also want to notify
Cooper and Falconer -- their address is in the comments of TURBORUN.ASM.
Thanks,
Phil Burns
April, 1985