MORSE:
REM F5AYE 9 90
LOCAL K%,O%,W%,X%,A%,B%,E%,P,T,B,E,C,D,F,G,M$(1),A$(7),B$(2),C$(1)
PRINT "VITESSE EN MOTS/MN DE 1 A 23"
INPUT B% :A%=B%*1.2 :P=1360/A% :T=4090/A% :B=54.4/A% :E=27.2/A% :CLS
GY:: :CLS
PRINT"ENTRER LE NUMERO DU PREMIER ET DU DERNIER SIGNE A ETUDIER" :PAUSE 60 :CLS
PRINT"ABCDEFGHIJKLMNOP(16)QRSTUVWXYZ123456(32)7890";CHR$(46);",";CHR$(63);"/+";CHR$(39);CHR$(97);CHR$(118);"(44) POUR CONTINER EXE"
GET :CLS :PRINT"PREMIER SIGNE " :INPUT O% :CHR$(10) :PRINT"DERNIER SIGNE ":INPUT K% :CLS
REM POSITION CURS
FY:: :C=0 :D=0 :F=0 :G=0
CLS
BY:: :C=C+1 :D=F+1
IF C=21 :C=0 :F=F+1 :GOTO BY:: :ENDIF
G=G+1
IF G=6 :G=0 :AT C,D :PRINT" " :PAUSE 160/A% :GOTO BY:: :ENDIF
IF D=5 :GOTO FIN:: :ENDIF
REM GENE ALEA
E%=(RND*(K%-O%+1))+O%
IF E%=1 :A$="PTB " :AT C,D :PRINT "A" :GOTO AY::
ELSEIF E%=2 :A$="TPPPB " :AT C,D :PRINT"B" :GOTO AY::
ELSEIF E%=3 :A$="TPTPB " :AT C,D :PRINT"C" :GOTO AY::
ELSEIF E%=4 :A$="TPPB " :AT C,D :PRINT"D" :GOTO AY::
ELSEIF E%=5 :A$="PB " :AT C,D :PRINT"E" :GOTO AY::
ELSEIF E%=6 :A$="PPTPB " :AT C,D :PRINT"F" :GOTO AY::
ELSEIF E%=7 :A$="TTPB " :AT C,D :PRINT"G" :GOTO AY::
ELSEIF E%=8 :A$="PPPPB " :AT C,D :PRINT"H" :GOTO AY::
ELSEIF E%=9 :A$="PPB " :AT C,D :PRINT"I" :GOTO AY::
ELSEIF E%=10 :A$="PTTTB " :AT C,D :PRINT"J" :GOTO AY::
ELSEIF E%=11 :A$="TPTB " :AT C,D :PRINT"K" :GOTO AY::
ELSEIF E%=12 :A$="PTPPB " :AT C,D :PRINT"L" :GOTO AY::
ELSEIF E%=13 :A$="TTB " :AT C,D :PRINT"M" :GOTO AY::
ELSEIF E%=14 :A$="TPB " :AT C,D :PRINT"N" :GOTO AY::
ELSEIF E%=15 :A$="TTTB " :AT C,D :PRINT"O" :GOTO AY::
ELSEIF E%=16 :A$="PTTPB " :AT C,D :PRINT"P" :GOTO AY::
ELSEIF E%=17 :A$="TTPTB " :AT C,D :PRINT"Q" :GOTO AY::
ELSEIF E%=18 :A$="PTPB " :AT C,D :PRINT"R" :GOTO AY::
ELSEIF E%=19 :A$="PPPB " :AT C,D :PRINT"S" :GOTO AY::
ELSEIF E%=20 :A$="TB " :AT C,D :PRINT"T" :GOTO AY::
ELSEIF E%=21 :A$="PPTB " :AT C,D :PRINT"U" :GOTO AY::
ELSEIF E%=22 :A$="PPPTB " :AT C,D :PRINT"V" :GOTO AY::
ELSEIF E%=23 :A$="PTTB " :AT C,D :PRINT"W" :GOTO AY::
ELSEIF E%=24 :A$="TPPTB " :AT C,D :PRINT"X" :GOTO AY::
ELSEIF E%=25 :A$="TPTTB " :AT C,D :PRINT"Y" :GOTO AY::
ELSEIF E%=26 :A$="TTPPB " :AT C,D :PRINT"Z" :GOTO AY::
ELSEIF E%=27 :A$="PTTTTB " :AT C,D :PRINT"1" :GOTO AY::
ELSEIF E%=28 :A$="PPTTTB " :AT C,D :PRINT"2" :GOTO AY::
ELSEIF E%=29 :A$="PPPTTB " :AT C,D :PRINT"3" :GOTO AY::
ELSEIF E%=30 :A$="PPPPTB " :AT C,D :PRINT"4" :GOTO AY::
ELSEIF E%=31 :A$="PPPPPB " :AT C,D :PRINT"5" :GOTO AY::
ELSEIF E%=32 :A$="TPPPPB " :AT C,D :PRINT"6" :GOTO AY::
ELSEIF E%=33 :A$="TTPPPB " :AT C,D :PRINT"7" :GOTO AY::
ELSEIF E%=34 :A$="TTTPPB " :AT C,D :PRINT"8" :GOTO AY::
ELSEIF E%=35 :A$="TTTTPB " :AT C,D :PRINT"9" :GOTO AY::
ELSEIF E%=36 :A$="TTTTTB " :AT C,D :PRINT"0" :GOTO AY::
ELSEIF E%=37 :A$="PTPTPTB" :AT C,D :PRINT CHR$(46) :GOTO AY::
ELSEIF E%=38 :A$="TTPPTTB" :AT C,D :PRINT"," :GOTO AY::
ELSEIF E%=39 :A$="PPTTPPB" :AT C,D :PRINT CHR$(63) :GOTO AY::
ELSEIF E%=40 :A$="TPPTPB " :AT C,D :PRINT"/" :GOTO AY::
ELSEIF E%=41 :A$="PTPTPB " :AT C,D :PRINT"+" :GOTO AY::
ELSEIF E%=42 :A$="PTTTTPB" :AT C,D :PRINT CHR$(39) :GOTO AY::
ELSEIF E%=43 :A$="PTPPPB " :AT C,D :PRINT CHR$(97) :GOTO AY::
ELSEIF E%=44 :A$="PPPTPTB" :AT C,D :PRINT CHR$(118) :GOTO AY::
REM BEEP
AY:: :ENDIF
X%=X%+1 :M$=MID$(A$,X%,1)
IF M$="P" :BEEP P,1000 :PAUSE E
ELSEIF M$="T" :BEEP T,1000 :PAUSE E
ELSEIF M$="B" :PAUSE B :ENDIF
IF X%=7 :X%=0 :GOTO BY:: :ENDIF
GOTO AY::
FIN:: :GET :CLS :PRINT"CONTINUER C "
PRINT"NOUVEAU GROUPE N"
PRINT"ARRETER A"
INPUT C$ :IF C$="N" :GOTO GY:: :ELSEIF C$="C" :GOTO FY:: :ENDIF