Learn/review Morse code.
Gallery
Source Code
5 GO TO 2000 8 CLS 9 RESTORE 10 FOR a=1 TO 26 14 PRINT AT 17,0;"Press [M] to return to menu" 15 PRINT AT 19,0;"Press any other key to continue" 16 IF INKEY$="m" OR INKEY$="M" THEN GO TO 2000 20 PRINT AT 0,0;CHR$ (a+64);" "; 30 READ b$ 35 FOR d=1 TO LEN b$ 36 PRINT b$(d); 41 IF b$(d)="-" THEN BEEP speed,20 42 IF b$(d)="." THEN BEEP speed/3,20 50 NEXT d 56 PAUSE 0 57 CLS 60 NEXT a 70 GO TO 2000 90 CLS 100 PRINT AT 3,9;"Send message" 101 PRINT AT 6,2;"What message would you like to send?" 105 INPUT a$ 106 CLS 107 RESTORE 110 FOR l=1 TO LEN a$ 120 LET d=CODE a$(l) 121 IF d=32 THEN NEXT l 130 FOR e=1 TO 26 135 READ w$ 140 IF e=d-64 THEN GO TO 300 150 NEXT e 301 FOR q=1 TO LEN w$ 302 PRINT AT 10,0;w$;" " 305 IF w$(q)="-" THEN BEEP speed,20 306 IF w$(q)="." THEN BEEP speed/3,20 307 NEXT q 309 PRINT AT 19,0;a$( TO l) 310 RESTORE : NEXT l 315 PAUSE 400 320 GO TO 2000 399 CLS 400 PRINT AT 3,12;"Test" 410 INPUT "How many questions?";qu 490 FOR t=1 TO qu 495 RESTORE 500 FOR a=1 TO INT (RND*26)+1 501 READ a$ 502 NEXT a 503 FOR d=1 TO LEN a$ 504 IF a$(d)="-" THEN BEEP speed,20 505 IF a$(d)="." THEN BEEP speed/3,20 506 NEXT d 508 PRINT AT 8,2;"What letter is represented by:" 509 PRINT AT 10,0;" " 530 PRINT AT 10,(31-LEN a$)/2;a$ 540 LET ans=a+63 550 INPUT n$ 555 PRINT AT 14,0;"Your answer was ";n$ 560 IF CODE n$=ans THEN GO TO 700 565 BEEP .4,-25 570 PRINT AT 12,0;" Wrong, the letter is ";CHR$ ANS 575 PAUSE 200: CLS 580 NEXT t 590 GO TO 800 700 BEEP .1,10: BEEP .1,0: BEEP .1,40 702 PRINT AT 12,0;"Correct, the letter is ";n$ 705 LET cor=cor+1 706 PAUSE 200 710 NEXT t 800 PRINT AT 21,0;"PRESS A KEY TO SEE YOUR SCORE": PAUSE 0: CLS 820 PRINT "You scored ";cor;" right" 830 PRINT "out of ";qu;". That is ";INT ((cor/qu)*100);"%." 840 PRINT 300: GO TO 2000 1000 DATA ".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.." 2000 CLS 2001 LET cor=0 2005 LET speed=.2 2010 PRINT AT 3,10;"MORSE CODE" 2012 PRINT OVER 1;AT 3,10;"__________" 2015 PRINT AT 5,2;"Choose one of the following:" 2020 PRINT AT 9,5;"1) Review alphabet/code";AT 10,5;"2) Send code";AT 11,5;"3) Test" 2060 PRINT AT 19,0;"Make sure the caps shift isin the ON ERRCBEEP Mode,or the computer will not understand you answer" 2080 LET a$=INKEY$ 2081 OVER 0 2085 IF a$="1" THEN GO TO 8 2087 IF a$="2" THEN GO TO 99 2090 IF a$="3" THEN GO TO 399 2091 FOR t=8 TO 27: PRINT OVER 1;AT 9,t;"_": NEXT t 2092 FOR t=8 TO 27: PRINT OVER 1;AT 9,t;"_": NEXT t 2093 FOR t=8 TO 16: PRINT OVER 1;AT 10,t;"_": NEXT t 2094 FOR t=8 TO 16: PRINT OVER 1;AT 10,t;"_": NEXT t 2095 FOR t=8 TO 11: PRINT OVER 1;AT 11,t;"_": NEXT t 2096 FOR t=8 TO 11: PRINT OVER 1;AT 11,t;"_": NEXT t 2110 GO TO 2080