home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1990 January
/
1990-01.d64
/
geoconverter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
1KB
|
48 lines
10 rem copyright 1990 compute! publications, inc. - all rights reserved
20 print"[147]"chr$(142):ve=peek(772)+256*peek(773)
30 ifve=42364thenpoke53280,0:poke53281,0:goto50
40 (NULL)0,1:(NULL)4,1:(NULL)6,1
50 fori=1to10:print"":next
60 printtab(5)"[151][213][196][201] copyright 1990"
70 printtab(5)"[199]c[200] compute! publications inc."
80 printtab(5)"[202][198][203] all rights reserved"
90 print"[155]geoconverter 1.3[146]"
100 n=8:print"drive number "n"[157][157][157][157]";:inputn
110 ifn<8orn>11then100
120 print"is drive"n"a 1581? ";:t$=chr$(18):s$=chr$(1)
130 getk$:ifk$<>"y"andk$<>"n"then130
140 printk$:ifk$="y"thent$=chr$(40):s$=chr$(3)
150 input"file to convert";gf$
160 print"searching for "gf$
170 hd$="":for i=1 to 4:read he:hd$=hd$+chr$(he):next
180 for i=1to5:readie:id$=id$+chr$(ie):next
190 nl$="":open 15,n,15,"i0:":open 2,n,2,"#"
200 gosub430:get #2,nt$,ns$
210 for e=0 to 7
220 d$=nl$:get#2,b$:i=1:ifb$=nl$ then280
230 if asc(b$)<>130 or i=19 then280
240 get#2,ht$,hs$:i=3:if hs$="" then hs$=chr$(0)
250 get#2,b$:i=i+1:if b$="" then b$=chr$(0)
260 ifasc(b$)=160ori=19then280
270 d$=d$+b$:goto250
280 for i=i to 31:get#2,b$:next
290 if d$=gf$ then320
300 next e:if nt$=nl$ then320
310 t$=nt$:s$=ns$:goto200
320 if d$=nl$ thenprint"file not found[146]":goto420
330 print"converting "gf$
340 dt$=t$:ss$=s$:t$=ht$:s$=hs$:gosub430
350 get#2,mt$,ms$:if ms$="" then ms$=chr$(0)
360 for i=0 to 65:get #2,b$:next
370 get#2,ct$,gt$:gosub430:print#2,hd$;:gosub440:t$=dt$:s$=ss$:gosub430
380 for i=1 to 32*e+2:get#2,b$:nexti
390 print#2,ct$;mt$;ms$;:fori=0 to 15:get#2,b$:next
400 print#2,ht$;hs$;chr$(0);gt$;
410 print#2,id$;:gosub440:print:printgf$" converted"
420 close2:close15:end
430 u$="u1":goto450
440 u$="u2"
450 print#15,u$;2;0;asc(t$+"0");asc(s$+"0")
460 return
470 data 0,255,3,21,87,10,1,0,0