Radio Shack TRS-80 Model 4 Owner's Manual page 316

Hide thumbs Also See for TRS-80 Model 4:
Table of Contents

Advertisement

You can modify START/JCL to show several uses of IIALERT:
• This
pro~raM
shows several uses of IIALERT.
TURN TO PAGE 4 AT THE TONE.
IIALERT O,O,1,5,O,2
• PRESS ENTER TO BEGIN EXECUTION.
IIALERT (1,0,],0)
DEl.IICE
FREE
IIE)<IT
The first tone tells you when to turn to page 4. The second tone
repeats until you press (ENTER) to continue execution of the program
or (BREAK) to abort the JCL.
The next example shows how you could build a menu using execution
comments to display different program choices. Using the IIKEYIN
macro lets you press a single key to execute the desired program.
• START/JCL
Pro~raM
1 is FREE :O
Pro~raM
2 is FREE
Pro~raM
3 is DEVICE
IIKEYIN Select
pro~raMt
1 - 3
//1
FREE :O
IIE)-(IT
112
FREE
IIE)-(IT
113
DEl.I I CE
IIE)-(IT
1//
There are two new macros used in this example. They are Iinumber
and III.
Iinumber is used to start a block of lines that corresponds to a value
selected with the IIKEYIN macro. This block extends until the next
Iinumber or to the III.
III (the triple slash) is used to mark the end of all Iinumber blocks.
JCL stops looking for a match as soon as it encounters a III.
Execution continues with the following line.
In the above example, pressing 1, 2, or 3 selects the cc;>rresponding
block of lines and runs the appropriate command. If you press a key
other than 1, 2, or 3, all three Iinumber blocks are ignored, and
execution continues with the line after the III.
A-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Trs-80 model 4p

Table of Contents