Radio Shack TRS-80 Model 100 Basic Manual page 196

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

Advertisement

"
130
STOP ELSE GOTO 850
hear tones
PRINTA( I) ;
FOR J=1 TO 500
20070
2121080
20080
20100
2121110
1I30
GO TO 800
500 PRINT
510 PRINT "101 RON G
!"
800 PRINT "LISTEN AGAIN"
NEXT J : FOR 1=1 TO L
810 SOUND 6000-A(I)*500,20
820 FOR J=1 TO 150 : NEXT J
830 NEXT I
832 CLS
833 SC = LAST
+
INT(1000*L*N * NC/NP)
635 PRINT@2110,"
8110 PRINT@2110,"SCORE=";SC
650 PRINT@0,"";
700 PRINT "Want to pIa>' a!tain?"
705 PRINT "ENTER=Yes, D=chan!te difficulty, S=stop)"
710 GOSUB 1000
712 CLS : PRINT@240,"SCORE=";SC
7111 PRINT@0, "";
720 IF ASC(A$)=13 GOTO 150
730 IF A$="D" OR A$="d" GOTO
740 IF A$="S" OR A$="s" THEN
800 REM Press nUMber Keys to
810 CLS
820 PRINT "Press any number Key (1 - 8) to"
830 PRINT "hear the tone associated with it."
835 PRINT@280,"Press ESC to be!tin !tame";
8110 A$=INKEY$ : IF A$="" GO TO 8110
850 IF A$<"l" OR A$)"8"
GOTO 100
880 SOUND 8000-(ASC(A$)-48)*500,20
87121 GOTO 811121
1000 A$=INKE'($ ; IF A$='"1 GOTO 1000 ELSE PRINT
A$ ; RETURN
2000121 REM:::::: INSTRUCTIONS::::::
20010 CLS : PRINT"MEMORY MASTER is a !tame ",.hich
tests" : PRINT"your ability to memorize a
seCluence" : PRINT"of tones."
20020 GOSUB 30000
20030 PRINT"Two different sKills are bein!t
tested:" : PRINT: PRINT"!. Your ability to
reco!tnize different"
20040 PRINT"tones (pitch), and"
20050 PRINT"2. Your ability to reoall a random"
PRINT"seCluence of events.":
GOSUB 30000
2121080 PRINT"The objective of the !tame is to
maximize"; : PRINT"your score, which is
computed as:"
PRINT"
1000 * N * L *
CIT
where"
PRINT"N = number of different tones"
PRINT"L = len!tth of seCluence"
PRINT"C = nUITlber of correct recalls"
PRINT"T = total number of seCluences tried";
: GOSUB 312101210
190

Advertisement

Table of Contents
loading

Table of Contents