记忆训练程序
20 FOR Z = 1 TO 2: FOR V = 3 TO 6: COLOR V - 6 + Z * 4: LOCATE 12, (V - 3) * 2 + 5 + Z * 8: PRINT CHR$(V): NEXT V, Z
30 I = I + 1: O = 1: J = INT(RND * 8): J$ = J$ + RIGHT$(STR$(J), 1): COLOR 2: LOCATE 9, 19: PRINT I
40 q$ = CHR$(SCREEN(12, 13 + J * 2)): LOCATE 12, 13 + J * 2: COLOR 31: PRINT q$: FOR H = 1 TO 20000: NEXT: LOCATE 12, 13 + J * 2: COLOR J + 1: PRINT q$
50 K$ = INKEY$: IF K$ <> "" THEN K = ASC(RIGHT$(K$, 1)) ELSE K = 0
60 COLOR 15: LOCATE 13, L: PRINT " ": L = L + (K = 75 AND L > 13) * 2 - (K = 77 AND L < 27) * 2: LOCATE 13, L: PRINT A$
70 IF K = 13 AND L = 13 + VAL(MID$(J$, O, 1)) * 2 THEN F = 0: O = O + 1: BEEP ELSE IF K = 13 THEN PLAY "O0BAGFEDC": F = F + 1: IF F > 2 THEN END
80 IF O - 1 = I THEN FOR P = 1 TO I + 5: SOUND RND * 1000 + 500, 3: NEXT: GOTO 30
100 GOTO 50
本程序在286、386微机,GWBASIC3.23通过。