home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / DAVIS.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  1.3 KB  |  45 lines

  1. Running DOS Commands From BASIC
  2.  
  3.                Don Davis
  4.      Modesto-Turlock User's Group
  5.  
  6. The following program, DOSLINK.BAS,
  7. calls a DOS internal or external
  8. program while in BASIC, executes it
  9. and returns to the BASIC program.
  10. Also illustrated in the program is a
  11. method for putting a menu on the
  12. screen, and executing a command from
  13. the menu by a single key depression.
  14.  
  15. In order for DOSLINK.BAS to work,
  16. three programs must reside on the
  17. diskette: BASIC.COM, CHKDSK.COM and
  18. BEGIN.BAT. The first two are DOS
  19. external commands, so I suggest you
  20. put the BASIC program we're about to
  21. create on your DOS working disk. The
  22. third program needs to be created.
  23.  
  24. Here is the BEGIN.BAT batch file:
  25.  
  26. BASIC DOSLINK.BAS
  27. LINK
  28.  
  29. The simplest way to create a short
  30. batch file like this one is to use
  31. the COPY CON command:
  32.  
  33. A>COPY CON:BEGIN.BAT
  34. BASIC DOSLINK.BAS
  35. LINK.BAT
  36. <CTRL> Z [or press function key 6
  37.                 and <Enter>]
  38.  
  39. The BEGIN.BAT file may be included as
  40. the last command of an AUTOEXEC.BAT
  41. file, in which case the menu of
  42. DOSLINK.BAS will appear on the
  43. screen. The program may also be
  44. started by typing BEGIN from DOS.
  45.