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

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