
This program generates a random character, either a letter or a number, and displays it on the screen, enlarged to eight lines. The Player presses the matching key on the ZX81 keyboard and is rewarded with a “Happy Face” and a song. A wrong response gets a “Sad Face” and a beep. You also get a beep each time a key is pressed. The program is suitable for teaching young children the keyboard. My daughter, aged 2½ years, finds it very entertaining and has mastered the alphabet and numbers on the keyboard. It required very little encouragement, just a willingness to load and supervise her play.
To play, you need a ZX81 or TS 1000 with at least 2k, and an external amplifier (example: RS Mini Amp Cat. #277-1008B). A “real” keyboard helps, but is not required. Young children have much better results on a keyboard than on a Sinclair membrane.
The sound is generated by the MC routine in line zero. This routine is from a program by Neal Bridges, which appeared in TS USER, Vol.1 Nov.7. You must be in FAST mode when calling this code or it won’t work. Sound output is via the microphone jack, and frequency is controlled by the values POKED in locations 16519 and 16520. Duration of the tone is controlled by a delay loop (see lines 605 to 640).
To enter the program, first enter lines 700 to 750. Then enter a REM statement (line 1) with 38 characters. RUN and list the program. If it looks OK, then POKE 16510,0 to change the line number to zero. SAVE and then test as follows: First hook up the amp to the MIC output from the computer. Turn on the amp and turn up the volume until you hear the 60hz hum. (NOTE: you can also hear the music without the amp by turning up the TV volume very loud or placing a transistor radio near the computer, tuned to a very weak station.) Second, FAST, followed by RAND USR 16514 should produce a short beep and a horizontal pattern of bars across the screen similar to the loading pattern. The error code should return 0/0. Now, enter the rest of the program, lines 10 to 690. SAVE it…and then RUN. Correct any errors, delete lines 700 to 750, and SAVE the final version.
One final tip is in order. You can break into the program by pressing the SPACE key. I had to make a cardboard space guard to keep my daughter from breaking out every few minutes. It seems that getting Daddy to fix the ‘puter is almost as much fun as her “Happy Face” program.
I can make a copy of the program for anyone who’ll send a good quality tape, and a S.A.S.E. to: [address omitted].
MC Loader for Happy Letters
MC LOADER FOR HAPPY LETTERS
********************************
FIRST MAKE A REM WITH 38 SPACES
THEN GOTO 700
THEN TEST RUN THE PROGRAM
THEN DELETE 700 - 750
********************************
700▒LET A$="260A2E01010220C5D3FFCD9C40C1DBFECD9C402D20EE2520E9C90405280210FE0C0DC80D18F8"
705 LET B=16514
710 FOR N=1 TO LEN A$ STEP 2
720 LET A=(CODE A$(N)-28)*16+CODE A$(N+1)-28
730 POKE B,A
740 LET B=B+1
750 NEXT N
Happy Letters
0▒REM A▒I▒▒▒4VAL PEEK COPY LN ▒RNDAT <= RETURN LN ▒RNDH4 INPUT 94 DIM TAN ▒▒C▒( RETURN £$COS $/ SAVE
10 RAND
20 FAST
25 CLS
30 LET A$=CHR$ (INT (RND*36)+28)
70 LET C=CODE A$
80 FOR H=0 TO 7
90 LET P=PEEK (7680+C*8+H)
100 LET V=128
110 FOR G=0 TO 7
120 IF P<V THEN GOTO 150
130 PRINT AT H,G;"▒"
140 LET P=P-V
150 LET V=V/2
160 NEXT G
170 NEXT H
180 SLOW
220 IF INKEY$="" THEN GOTO 220
222 LET X=CODE INKEY$
223 FAST
224 LET Y=USR 16514
225 IF INKEY$<>"" THEN GOTO 225
230 FOR H=0 TO 7
235 LET P=PEEK (7680+X*8+H)
240 LET V=128
245 FOR G=0 TO 7
250 IF P<V THEN GOTO 265
255 PRINT AT H,10+G;"▒"
260 LET P=P-V
265 LET V=V/2
270 NEXT G
275 NEXT H
300 IF X=C THEN GOTO 400
302 GOSUB 500
305 FOR H=0 TO 7
310 PRINT AT H,10;" "
315 NEXT H
330 GOTO 180

551 FAST
552 POKE 16519,3
554 LET X=USR 16514
555 POKE 16519,2
558 SLOW
560 PAUSE 100
570 RETURN
600 FAST
605 FOR M=1 TO 3
610 FOR N=1 TO 5
620 LET X=USR 16514
630 NEXT N
640 NEXT M
645 POKE 16519,2
650 POKE 16520,176
655 FOR N=1 TO 15
660 LET X=USR 16514
665 NEXT N
670 POKE 16519,2
675 POKE 16520,32
680 SLOW
690 RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.