home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1987 October
/
1987-10.d64
/
geoconverter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
1KB
|
41 lines
10 rem copyright 1987 compute! publications, inc. - all rights reserved
20 poke 53280,0:poke 53281,0:poke 646,5:print"[147]"
30 fori=1to10:print"":next
40 printtab(5)"[151][213][196][201] copyright 1987"
50 printtab(5)"[199]c[200] compute! publications inc."
60 printtab(5)"[202][198][203] all rights reserved"
70 print"[155]geoconverter[146]"
80 input"file to convert";gf$
90 print"searching for "gf$
100 hd$="":for i=1 to 4:read he:hd$=hd$+chr$(he):next
110 for i=1to5:readie:id$=id$+chr$(ie):next
120 nl$="":t$=chr$(18):s$=chr$(1):open 15,8,15,"i0:":open 2,8,2,"#"
130 gosub360:get #2,nt$,ns$
140 for e=0 to 7
150 d$=nl$:get#2,b$:i=1:ifb$=nl$ then210
160 if asc(b$)<>130 then210
170 get#2,ht$,hs$:i=3
180 get#2,b$:i=i+1
190 if asc(b$)=160 then210
200 d$=d$+b$:goto180
210 for i=i to 31:get#2,b$:next
220 if d$=gf$ then250
230 next e:if nt$=nl$ then250
240 t$=nt$:s$=ns$:goto130
250 if d$=nl$ thenprint"file not found[146]":goto350
260 print"converting "gf$
270 dt$=t$:ds$=s$:t$=ht$:s$=hs$:gosub360
280 get#2,mt$,ms$
290 for i=0 to 65:get #2,b$:next
300 get#2,ct$,gt$:gosub360:print#2,hd$;:gosub370:t$=dt$:s$=ds$:gosub360
310 for i=0 to 32*e+2:get#2,b$:next
320 print#2,mt$;ms$;:fori=0 to 15:get#2,b$:next
330 print#2,ht$;hs$;chr$(0);gt$;
340 print#2,id$;:gosub370:print:printgf$" converted"
350 close2:close15:end
360 u$="u1":goto380
370 u$="u2"
380 print#15,u$;2;0;asc(t$+"0");asc(s$+"0")
390 return
400 data 0,255,3,21,87,10,1,0,0