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 >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
117 lines
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 (NULL)%:clr
3 (NULL)5,1
4 (NULL)6,7
5 (NULL)5,4
6 dim a(41),b(41)
7 n$="---"
8 fori=1to41:reada(i):next
9 (NULL),18,2,"[212]extkonvertierung ins [205]astertext 128-[198]ormat"
10 (NULL),17,3,"---------------------------------------------"
11 (NULL)5,4,79,24,1
12 (NULL)
13 (NULL),14,4," 1 [146] [206]eue [203]onvertierungstabelle erstellen"
14 (NULL),14,6," 2 [146] [203]onvertierungstabelle einlesen"
15 (NULL),14,8," 3 [146] [212]ext konvertieren"
16 (NULL),14,10," 4 [146] [208]rogramm beenden"
17 (NULL),5,13,"[193]ktuelle [203]onvertierungstabelle: "
18 printn$
19 get(NULL) g$
20 g=val(g$)
21 on g goto 100,200,300,50
22 goto 19
50 (NULL)
51 print"[215]ollen [211]ie wirklich?"
52 get(NULL) g$
53 if g$<>"j"then 12
54 end
60 poke21,1:inputa$:poke21,0:return
70 print:g$="n"
71 if ds=62 then print"[203]onvertierungstabelle nicht gefunden."
72 if ds=63 then print"[196]iese [196]atei existiert bereits. [197]rsetzen?":get(NULL)g$
73 if ds<62 or ds>63 then print"[196]iskettenfehler: ";ds$
74 return
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
101 restore100
102 (NULL)
103 fori=1to41:read a:a$=chr$(a)
104 if a=13 then a$="[210]eturn"
105 if a=32 then a$="[211]pace"
106 if a=128 then a$="[211]hift+[211]pace"
107 if a=119 then a$="geschweifte [203]lammer auf"
108 if a=121 then a$="geschweifte [203]lammer zu"
109 print"";i;"[157]. ";a$;" "
110 print" ";b(i);" "
111 input"[145][145] ";b(i)
112 next
113 print"[193]lles richtig?"
114 get(NULL) g$
115 if g$="n" then 101
116 if g$<>"j"then 114
117 (NULL)
118 print"[206]ame der [203]onvertierungstabelle: ";
119 gosub 60
120 if a$="$" then print"":(NULL)".*":goto118
121 if a$="" then 12
122 n$="."+a$
123 (NULL):open2,8,2,n$+",s,w"
124 if ds<>0 then gosub 70:if g$="j" then (NULL)(n$):goto123
125 if ds<>0 then 118
126 fori=0to41
127 print#2,b(i)
128 next
129 (NULL)#2
130 goto12
200 (NULL)
201 a$="":input"[215]elche [203]onvertierungstabelle soll geladen werden";a$
202 if a$="" then 12
203 if a$="$"then print:(NULL)".*":goto201
204 m$="."+a$
205 (NULL)
#2,(m$)
206 if ds<>0 then gosub 70:(NULL)#2:goto201
207 fori=0to41:input#2,a$:b(i)=val(a$):next:n$=m$
208 (NULL)#2:goto12
300 (NULL)
301 if n$="---" then print"[203]eine [203]onvertierungstabelle geladen.":get(NULL)g$:goto12
302 print"[212]extdiskette einlegen."
303 print"[206]ame des zu konvertierenden [212]extes: ";:gosub60
304 if a$="$" then print"":(NULL):goto303
305 if a$="" then12
306 print:print"[145][212]ext wird gelesen:":ti$="000000"
307 (NULL)
#2,(a$)
308 if ds<>0then 70:goto300
309 z=10600:(NULL)0
310 get#2,a$:if st<>0 then pokez,asc(a$):goto313
311 print"[145]";z-10600
312 pokez,asc(a$):z=z+1:goto310
313 (NULL)#2
314 print"[145][212]ext wird konvertiert:"
315 fori=10600to z
316 print"[145]";z-i;"[157] "
317 a=peek(i)
318 if a>=b(1) and a<=b(1)+25 then a=a-b(1)+a(1):goto325
319 if a>=b(2) and a<=b(2)+25 then a=a-b(2)+a(2):goto325
320 if a>=b(3) and a<=b(3)+9 then a=a-b(3)+a(3):goto325
321 j=4
322 if a=b(j) then a=a(j):goto325
323 if j<41 then j=j+1:goto322
324 a=0
325 poke i,a
326 next:print"[218]eit: ";left$(ti$,2);":";mid$(ti$,3,2);":";right$(ti$,2)
327 print"[205]astertextdiskette einlegen."
328 print"[206]ame des konvertierten [212]extes: ";:gosub60
329 if a$="$" then print"":(NULL):goto328
330 a$=left$(a$+" ",15)+"k"
331 (NULL):open2,8,2,a$+",p,w"
332 if ds<>0 then gosub 70:if g$="j" then (NULL)(a$):goto331
333 if ds<>0 then get(NULL) g$:goto327
334 print:print"[145][212]ext wird geschrieben:"
335 print#2,chr$(0);chr$(4);
336 fori=10600toz
337 print"[145]";z-i;"[157] "
338 a=peek(i):if a=0 then 340
339 print#2,chr$(a);
340 next
341 close2
342 goto12