home *** CD-ROM | disk | FTP | other *** search
- Running DOS Commands From BASIC
-
- Don Davis
- Modesto-Turlock User's Group
-
- The following program, DOSLINK.BAS,
- calls a DOS internal or external
- program while in BASIC, executes it
- and returns to the BASIC program.
- Also illustrated in the program is a
- method for putting a menu on the
- screen, and executing a command from
- the menu by a single key depression.
-
- In order for DOSLINK.BAS to work,
- three programs must reside on the
- diskette: BASIC.COM, CHKDSK.COM and
- BEGIN.BAT. The first two are DOS
- external commands, so I suggest you
- put the BASIC program we're about to
- create on your DOS working disk. The
- third program needs to be created.
-
- Here is the BEGIN.BAT batch file:
-
- BASIC DOSLINK.BAS
- LINK
-
- The simplest way to create a short
- batch file like this one is to use
- the COPY CON command:
-
- A>COPY CON:BEGIN.BAT
- BASIC DOSLINK.BAS
- LINK.BAT
- <CTRL> Z [or press function key 6
- and <Enter>]
-
- The BEGIN.BAT file may be included as
- the last command of an AUTOEXEC.BAT
- file, in which case the menu of
- DOSLINK.BAS will appear on the
- screen. The program may also be
- started by typing BEGIN from DOS.