EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 336

Radio Shack TRS-80 Model 4
418 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4.
Terminate the JCL execution with IISTOP (which leaves control
with BASIC).
You can also enter a DO command directly from the TRSDOS Ready
prompt to execute a BASIC program.
To execute a JCL file once you have entered BASIC, the command
format is:
SYSTEM"DO
filenalTle"
This command can be typed
in
directly or entered as a BASIC
program line.
Also, any JCL file called from BASIC should contain the IIEXIT
termination macro, so that control will return to TRSDOS Ready when
the
JCL
file is completed.
For example, suppose you want to use the JCL IIALERT macro to
inform you when a lengthy BASIC procedure has completed.
Following the lines containing the BASIC procedure, you could have a
BASIC program line such as:
1000
SYSTEM
liDO
=
ALERT/JCL:0"
which executes the ALERT/JCL file:
You
r
pro
c e du
rei
S C
0111
pIe
t e
Pre
s s
(ENTER)
t 0
reSUll1e.
//ALERT
(1,O,7,O)
BASIC
//STOP
When BASIC reaches line 1000, the JCL file ALERT/JCL is executed,
sending a series of repeating tones out the tone generator.
You are notified that your BASIC procedure has completed. Pressing
(ENTER)
ends the JCL alert and returns you to BASIC.
There are two important points about this example. First, the
comment line
in
the ALERT/JCL file is absolutely necessary, as a JCL
file cannot start with
an
execution macro. Second, the
"BASIC"
statement will reload BASIC. If you want a particular program to be
loaded and run, you can place its name on the command line or add
the BASIC commands before the IISTOP statement. The IISTOP
termination macro must be included to assure that keyboard control
remains within BASIC.
Although the example demonstrates
an
execute only JCL file, you can
also call compiled JCL procedures from BASIC. You can even
construct a SYSTEM
"DO
filespec [(parameters)]" command using
BASIC string substitution.
Any time you want to use a SYSTEM
"DO
filespec" command from
BASIC to execute another BASIC program, you have to change the
format of the command. To DO these types of JCL files from BASIC,
use the commands:
A-31

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals