home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hand Held Organizer Toolkit
/
walnutcreekcdrom-handheldorganizertoolkit-march1998.iso
/
PalmPilot
/
educational
/
mcode.bas
< prev
next >
Wrap
BASIC Source File
|
1997-12-30
|
553b
|
24 lines
# morse code practice
# nwalsh@rtd.com
# This program may be distributed freely
op "page","",-1
print "MORSE OUTPUT (. TO EXIT)"
new
60 START = fn 16 : CNT = 0
70 rem MAIN PROGRAM
80 n=97+rnd(26)
85 c$ = chr$(n)
90 sound 600,15,32,c$,10
100 a$ = chr$(fn 33)
150 if a$ = "." then goto 500
200 if a$ = c$ then print c$;
210 if not (a$ = c$) then print chr$(n - 32);
220 CNT = CNT + 1
300 goto 80
500 END = (fn 16 - START)
510 print
520 print CNT;" characters in "; END; " seconds"
540 print (CNT/5) / (END/60);" WPM"
600 end
run