home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 October / 1987-10.d64 / geoconverter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  41 lines

  1. 10 rem copyright 1987 compute! publications, inc. - all rights reserved
  2. 20 poke 53280,0:poke 53281,0:poke 646,5:print"[147]"
  3. 30 fori=1to10:print"":next
  4. 40 printtab(5)"[151][213][196][201] copyright 1987"
  5. 50 printtab(5)"[199]c[200] compute! publications inc."
  6. 60 printtab(5)"[202][198][203] all rights reserved"
  7. 70 print"[155]geoconverter[146]"
  8. 80 input"file to convert";gf$
  9. 90 print"searching for "gf$
  10. 100 hd$="":for i=1 to 4:read he:hd$=hd$+chr$(he):next
  11. 110 for i=1to5:readie:id$=id$+chr$(ie):next
  12. 120 nl$="":t$=chr$(18):s$=chr$(1):open 15,8,15,"i0:":open 2,8,2,"#"
  13. 130 gosub360:get #2,nt$,ns$
  14. 140 for e=0 to 7
  15. 150 d$=nl$:get#2,b$:i=1:ifb$=nl$ then210
  16. 160 if asc(b$)<>130 then210
  17. 170 get#2,ht$,hs$:i=3
  18. 180 get#2,b$:i=i+1
  19. 190 if asc(b$)=160 then210
  20. 200 d$=d$+b$:goto180
  21. 210 for i=i to 31:get#2,b$:next
  22. 220 if d$=gf$ then250
  23. 230 next e:if nt$=nl$ then250
  24. 240 t$=nt$:s$=ns$:goto130
  25. 250 if d$=nl$ thenprint"file not found[146]":goto350
  26. 260 print"converting "gf$
  27. 270 dt$=t$:ds$=s$:t$=ht$:s$=hs$:gosub360
  28. 280 get#2,mt$,ms$
  29. 290 for i=0 to 65:get #2,b$:next
  30. 300 get#2,ct$,gt$:gosub360:print#2,hd$;:gosub370:t$=dt$:s$=ds$:gosub360
  31. 310 for i=0 to 32*e+2:get#2,b$:next
  32. 320 print#2,mt$;ms$;:fori=0 to 15:get#2,b$:next
  33. 330 print#2,ht$;hs$;chr$(0);gt$;
  34. 340 print#2,id$;:gosub370:print:printgf$" converted"
  35. 350 close2:close15:end
  36. 360 u$="u1":goto380
  37. 370 u$="u2"
  38. 380 print#15,u$;2;0;asc(t$+"0");asc(s$+"0")
  39. 390 return
  40. 400 data 0,255,3,21,87,10,1,0,0
  41.