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