home *** CD-ROM | disk | FTP | other *** search
/ Rockford Magazine / Rockford_Magazine_022_19xx_-_de_Disk_4_of_4_Side_B.d64 / morsen (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  99 lines

  1. 100 poke53280,6:poke53281,6:printchr$(147);chr$(142);chr$(8)
  2. 110 gosub 55000
  3. 400 dim a$(47):fori=1to47:reada$(i):next
  4. 450 if peek(2)>0 then 600
  5. 500 print"[147]":print" geschwindigkeit "
  6. 510 print"  -1-  40 bpm"
  7. 520 print"  -2-  50 bpm"
  8. 530 print"  -3-  60 bpm"
  9. 540 print"  -4-  90 bpm"
  10. 550 print"  -5-  140 bpm"
  11. 560 print" bitte waehlen sie "
  12. 561 print"":for i=1 to (6-g)*2+1:print:next:print"x"
  13. 570 geta$:if(a$<"1" or a$>"5")and a$<>chr$(13) then 570
  14. 575 if a$=chr$(13) then 600
  15. 580 poke2,(6-val(a$))
  16. 600 print"[147]        morsetrainer         "
  17. 601 ta=1
  18. 602 print"-1-  training"
  19. 603 print"-2-  umsetzung"
  20. 604 print"-3-  simultan"
  21. 605 print"-4-  geschwindigkeit"
  22. 606 print"-5-  ende"
  23. 610 print"      bitte waehlen sie      "
  24. 615 mo=0:g=peek(2)
  25. 620 geta$:if a$<"1" or a$>"5" then 620
  26. 625 if a$="5" then end
  27. 630 if a$="4"then500
  28. 640 if a$="3" then 4000
  29. 650 if a$="1" then ta=0:goto3000
  30. 660 if a$="2" then input "[147]text: ";a$:rp=0:input"wiederholungen";rp:rp=rp+1
  31. 1000 rem
  32. 1005 forh=1torp:ifta then printchr$(13)
  33. 1007 for k=1to len(a$)
  34. 1010 b$=mid$(a$,k,1)
  35. 1020 b=asc(b$):b=b-43:ifb<1 or b>47 then b$="":goto1040
  36. 1030 b$=a$(b)
  37. 1040 ifb$=""thenforj=1tog*10:nextj:goto1100
  38. 1050 forj=1tolen(b$)
  39. 1060 on val(mid$(b$,j,1)) goto 1070,1080
  40. 1070 zz=g*20:gosub 55100:iftathenprint".";
  41. 1075 goto1090
  42. 1080 zz=g*60:gosub55100:if tathenprint"-";
  43. 1090 nextj
  44. 1100 forj=1to(g-1)*30:nextj:iftathenprint"[146] ";
  45. 1105 if mo<>1 and mx<>1 then next:next
  46. 1110 forj=1 to (g-1)*30:iftathenprint"[146] ";
  47. 1115 ifaf=1thenreturn
  48. 1120 if mo=1 then return
  49. 1130 iftathengetx$:ifx$=""then1130
  50. 1140 run
  51. 2000 a$=d$:printd$;:ifd$="*"then500
  52. 2020 ifd$=""thena$=" "
  53. 2030 return
  54. 3000 af=1:printchr$(147):print"    morsetraining    "
  55. 3010 print"ascii-zeichenbereich:"
  56. 3012 input"von";a1:input"bis";a2
  57. 3015 if a1<44 or a2<44 or a1>91 or a2>91 or a1>a2 then3000
  58. 3020 for i=1 to 10
  59. 3030 t$(i)="":forj=1to5:t$(i)=t$(i)+chr$(a1+int(rnd(0)*(a2-a1)+.5)):next:next
  60. 3040 a$="":fori=1to10:a$=a$+t$(i)+" ":next:rp=1
  61. 3050 print"ok?[160]"
  62. 3053 geta$:ifa$=""then3053
  63. 3070 printchr$(147):fori=1to10:a$=t$(i):gosub1000
  64. 3080 print"gruppe"i;:inputd$(i):next
  65. 3090 print"[147]":k=0:print"gruppe","gegeben","empfangen","fehler"
  66. 3100 f=0:fori=1to10:printi,t$(i),d$(i),:s=5
  67. 3105 forj=1to5:ifmid$(t$(i),j,1)=mid$(d$(i),j,1)thens=s-1
  68. 3110 next:prints:f=f+s:next
  69. 3120 print"fehler gesamt:"f
  70. 3125 print"w[146]eiter oder zum m[146]enue?"
  71. 3130 geta$:ifa$<>"w"anda$<>"m"then3130
  72. 3140 if a$="w" then 3000
  73. 3150 af=0:goto 600
  74. 4000 print"[147]":print"simultanuebersetzung:    ende mit * [146]"
  75. 4001 print"eingabe des textes:"
  76. 4002 ta=0
  77. 4004 getd$:ifd$=""then4004
  78. 4005 if d$="*"then 600
  79. 4006 if peek(198)>6 then poke53281,1
  80. 4007 if peek(198)<3 then poke53281,6
  81. 4010 gosub 2000:mo=1
  82. 4020 gosub 1000:goto4004
  83. 10000 data "221122","21112","121212","21121","22222","12222"
  84. 10010 data "11222","11122","11112","11111","21111","22111"
  85. 10020 data "22211","22221","222111","","",""
  86. 10030 data "","112211","","12","2111","2121"
  87. 10040 data "211","1","1121","221","1111","11"
  88. 10050 data "1222","212","1211","22","21","222"
  89. 10060 data "1221","2212","121","111","2","112"
  90. 10070 data "1112","122","2112","2122","2211"
  91. 50000 end
  92. 55000 poke54295,0:poke54276,0:poke54273,0:poke54296,15
  93. 55005 poke54277,21:poke54278,160
  94. 55010 return
  95. 55100 poke54276,33
  96. 55110 poke54273,70:forw=1tozz:next
  97. 55120 poke54276,0
  98. 55130 return
  99.