Radio Shack TRS-80 Model 100 Basic Manual page 199

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

Advertisement

Lines 399 - 359 The user is prompted to enter his answer in the form of a sequence of
L keys. The tone is heard as each key is pressed (Line 324). A flag is set (C
=
1)
if
a key is pressed out of sequence (Line 340).
Lines 369.- 519 The flag
(C)
is checked to determine if the user's answer was correct
or not. The numQer of correct responses (NC) is incremented if the answer was
correct.
Lines 699 - 630 The correct sequence of tones is replayed to provide feedback to the
user. Note the use of FOR/NEXT loops (Lines 600 and 620) to cause a short pause
between tones.
Lines 632 - 740 The score is computed and displayed. Note that the score is added to
the cumulative score (LAST) from any previous level of play. The user is allowed to
continue playing at the current level, change the difficulty level or stop the game. Any
other response will result in the prompt being redisplayed (Line 740).
Lines 808 - 879 This section of the program lets the user listen to the tones associated
with the number keys
(1
through 9). When any key other than a number key is
pressed, execution jumps back to the beginning of the program.
Line 1M This subroutine continuously scans the keyboard (A$
=
INKEY$) and waits
for a key to be pressed (A$ will be null until a key is pressed). When a key is
pressed, it will
be
stored in the string variable A$ and displayed before execution
returns.
Lines 28M - 29288 This subroutine displays the instructions. A subroutine (GOSUB
30000) is repeatedly called to wait for a key to continue the instructions.
Lines 38_ - 39929 This subroutine displays a prompt to remind you to press any
key to continue the instructions. It also calls a subroutine (GOSUB 1000) to wait for
any key to be pressed before returning.
193

Advertisement

Table of Contents
loading

Table of Contents