Screen and keyboard effects
The MOS provides several commands which enable you to affect how the
computer communicates with the user. The first of these, *SPOOL, directs a
copy of all the computer's output which appears on the screen to a named file on
disc. This is achieved by issuing a command such as:
*SPOOL screen
in which case all screen output will be copied to the file until the command:
*SPOOL
(without a filename) is executed. This is useful for keeping a record of the
output a program has produced, particularly when it fills several screenfuls.
The *TYPE command displays the contents of such a file on the screen,
'replaying' the recording made with *SPOOL. For example:
*TYPE screen
An alternative form to this command, *LIST, displays the file in the same way
but adds line numbers (from 0001 upwards) at the start of each displayed line.
A command which has roughly the opposite effect of *SPOOL is *EXEC. This
reads in the contents of a named file as if it had been typed at the keyboard,
disabling the keyboard whilst this takes place. Because the ADFS knows the
length of the file (from its directory information) \you do not need to stop *EXEC
explicitly, though pressing
will do this if you so desire.
The *BUILD command creates a file containing lines of text typed at the
keyboard, suitable for subsequent *EXECing. If you type:
*BUILD Droid
the computer will respond with:
0001
and store what you type in the file 'Droid' (without the line numbers, which are
displayed simply to aid you). Each line must be terminated by pressing ,
and to tell the computer you have finished you should press .
You may
have noticed that the *LIST command is the precise reverse of this.
The *BUILD command is a handy way of storing sequences of commands you
often have to type, for example to define the contents of function keys. You may
also like to know that any line of text preceded by '* |' is ignored by the
operating system, for example:
*BUILD keys
0001 *| My function key definition file
0002 *KEY 0 OLD:||MLIST ||M
F 22