home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1988 October / 64er_Magazin_88-10_1988_Markt__Technik_de_Side_A.d64 / m.t.-konvert (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  117 lines

  1. 1 data 65,1,48,91,92,93,30,27,28,29,142,32,96,46,44,59,58,63,33,34,97,99,60,62,40,41,119,121,43,45,42,47,94,61,126,98,39,35,36,37,38
  2. 2 (NULL)%:clr
  3. 3 (NULL)5,1
  4. 4 (NULL)6,7
  5. 5 (NULL)5,4
  6. 6 dim a(41),b(41)
  7. 7 n$="---"
  8. 8 fori=1to41:reada(i):next
  9. 9 (NULL),18,2,"[212]extkonvertierung ins [205]astertext 128-[198]ormat"
  10. 10 (NULL),17,3,"---------------------------------------------"
  11. 11 (NULL)5,4,79,24,1
  12. 12 (NULL)
  13. 13 (NULL),14,4,"  1  [146]  [206]eue [203]onvertierungstabelle erstellen"
  14. 14 (NULL),14,6,"  2  [146]  [203]onvertierungstabelle einlesen"
  15. 15 (NULL),14,8,"  3  [146]  [212]ext konvertieren"
  16. 16 (NULL),14,10,"  4  [146]  [208]rogramm beenden"
  17. 17 (NULL),5,13,"[193]ktuelle [203]onvertierungstabelle: "
  18. 18 printn$
  19. 19 get(NULL) g$
  20. 20 g=val(g$)
  21. 21 on g goto 100,200,300,50
  22. 22 goto 19
  23. 50 (NULL)
  24. 51 print"[215]ollen [211]ie wirklich?"
  25. 52 get(NULL) g$
  26. 53 if g$<>"j"then 12
  27. 54 end
  28. 60 poke21,1:inputa$:poke21,0:return
  29. 70 print:g$="n"
  30. 71 if ds=62 then print"[203]onvertierungstabelle nicht gefunden."
  31. 72 if ds=63 then print"[196]iese [196]atei existiert bereits. [197]rsetzen?":get(NULL)g$
  32. 73 if ds<62 or ds>63 then print"[196]iskettenfehler: ";ds$
  33. 74 return
  34. 100 data 97,65,48,123,124,125,190,187,188,189,13,32,128,46,44,59,58,63,33,34,91,93,60,62,40,41,119,121,43,45,42,47,94,61,35,92,39,64,36,37,38
  35. 101 restore100
  36. 102 (NULL)
  37. 103 fori=1to41:read a:a$=chr$(a)
  38. 104 if a=13 then a$="[210]eturn"
  39. 105 if a=32 then a$="[211]pace"
  40. 106 if a=128 then a$="[211]hift+[211]pace"
  41. 107 if a=119 then a$="geschweifte [203]lammer auf"
  42. 108 if a=121 then a$="geschweifte [203]lammer zu"
  43. 109 print"";i;"[157].  ";a$;" "
  44. 110 print"   ";b(i);"                      "
  45. 111 input"[145][145] ";b(i)
  46. 112 next
  47. 113 print"[193]lles richtig?"
  48. 114 get(NULL) g$
  49. 115 if g$="n" then 101
  50. 116 if g$<>"j"then 114
  51. 117 (NULL)
  52. 118 print"[206]ame der [203]onvertierungstabelle: ";
  53. 119 gosub 60
  54. 120 if a$="$" then print"":(NULL)".*":goto118
  55. 121 if a$="" then 12
  56. 122 n$="."+a$
  57. 123 (NULL):open2,8,2,n$+",s,w"
  58. 124 if ds<>0 then gosub 70:if g$="j" then (NULL)(n$):goto123
  59. 125 if ds<>0 then 118
  60. 126 fori=0to41
  61. 127 print#2,b(i)
  62. 128 next
  63. 129 (NULL)#2
  64. 130 goto12
  65. 200 (NULL)
  66. 201 a$="":input"[215]elche [203]onvertierungstabelle soll geladen werden";a$
  67. 202 if a$="" then 12
  68. 203 if a$="$"then print:(NULL)".*":goto201
  69. 204 m$="."+a$
  70. 205 (NULL)
  71. #2,(m$)
  72. 206 if ds<>0 then gosub 70:(NULL)#2:goto201
  73. 207 fori=0to41:input#2,a$:b(i)=val(a$):next:n$=m$
  74. 208 (NULL)#2:goto12
  75. 300 (NULL)
  76. 301 if n$="---" then print"[203]eine [203]onvertierungstabelle geladen.":get(NULL)g$:goto12
  77. 302 print"[212]extdiskette einlegen."
  78. 303 print"[206]ame des zu konvertierenden [212]extes: ";:gosub60
  79. 304 if a$="$" then print"":(NULL):goto303
  80. 305 if a$="" then12
  81. 306 print:print"[145][212]ext wird gelesen:":ti$="000000"
  82. 307 (NULL)
  83. #2,(a$)
  84. 308 if ds<>0then 70:goto300
  85. 309 z=10600:(NULL)0
  86. 310 get#2,a$:if st<>0 then pokez,asc(a$):goto313
  87. 311 print"[145]";z-10600
  88. 312 pokez,asc(a$):z=z+1:goto310
  89. 313 (NULL)#2
  90. 314 print"[145][212]ext wird konvertiert:"
  91. 315 fori=10600to z
  92. 316 print"[145]";z-i;"[157] "
  93. 317 a=peek(i)
  94. 318 if a>=b(1) and a<=b(1)+25 then a=a-b(1)+a(1):goto325
  95. 319 if a>=b(2) and a<=b(2)+25 then a=a-b(2)+a(2):goto325
  96. 320 if a>=b(3) and a<=b(3)+9  then a=a-b(3)+a(3):goto325
  97. 321 j=4
  98. 322 if a=b(j) then a=a(j):goto325
  99. 323 if j<41 then j=j+1:goto322
  100. 324 a=0
  101. 325 poke i,a
  102. 326 next:print"[218]eit: ";left$(ti$,2);":";mid$(ti$,3,2);":";right$(ti$,2)
  103. 327 print"[205]astertextdiskette einlegen."
  104. 328 print"[206]ame des konvertierten [212]extes: ";:gosub60
  105. 329 if a$="$" then print"":(NULL):goto328
  106. 330 a$=left$(a$+"               ",15)+"k"
  107. 331 (NULL):open2,8,2,a$+",p,w"
  108. 332 if ds<>0 then gosub 70:if g$="j" then (NULL)(a$):goto331
  109. 333 if ds<>0 then get(NULL) g$:goto327
  110. 334 print:print"[145][212]ext wird geschrieben:"
  111. 335 print#2,chr$(0);chr$(4);
  112. 336 fori=10600toz
  113. 337 print"[145]";z-i;"[157] "
  114. 338 a=peek(i):if a=0 then 340
  115. 339 print#2,chr$(a);
  116. 340 next
  117. 341 close2
  118. 342 goto12
  119.