Radio Shack TRS-80 Model 100 Basic Manual page 162

Basic language lab
Hide thumbs Also See for TRS-80 Model 100:
Table of Contents

Advertisement

display of the current time.
You can eliminate the need to press
~
if you also program it as part of the
string. You can use CHR$(13) to do this.
Enter:
KEY G, "PRINT TIME$"+CHR$( 13)
and press function
~
to obtain the current time. Notice that it is not necessary to
press
~
this time since it is programmed as part of the string.
You might wish to program Function Key
~
with the EDIT command, since it is so
frequently used in BASIC programming.
Enter:
KEY 7, "EDIT" + CHR$(13)
and press function key
~
whenever you wish to enter the Edit mode. If there is no
program currently in working memory, this command will have no effect.
Use the KEYLIST command to confirm that you have programmed
(fID
and
~.
If
you enter:
KEYLIST
you should see
hEYLIST
Fi Ies
Save
U
List
EDIT
Ok
Load
U
Run
PRINT TIME$
MenLI
You can change any of the Function Keys. including the factory programmed keys.
For example, enter:
KEY 3, "PRINT DATE$" + CHR$(13)
and press Function Key CE3) to obtain a display of the current date. Use the KEYLIST
command to verify that
~
contains the string
PRINT DATE$
To program
~
back to the original string
Save "
you will have to use the CHR$(34) form of the quotation marks when you enter the
string:
KEY 3, "Save" + CHR$(3a)
156

Advertisement

Table of Contents
loading

Table of Contents