home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #6 / utv1n6s2.d64 / file converter (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  7.3 KB  |  237 lines

  1. 0 ifa=0thena=1:load"0:convert.ml",8,1
  2. 2 poke51621,6:poke56,70:clr
  3. 3 sys 65418:poke 808,234
  4. 5 b=0
  5. 10 poke53280,7:poke53281,5
  6. 20 p$=""
  7. 25 cl$="                                       "
  8. 30 print"[142]"
  9. 40 gosub3000
  10. 45 ifscthena=55:goto5000
  11. 50 print"[147] [197]nter file to convert"
  12. 70 print" > ";:gosub2000
  13. 90 ift$="" thenprint"[145][145]":goto70
  14. 110 fs$=t$
  15. 130 print" [211]elect source character type from the     list below:":gosub1610
  16. 135 print" > ";:poke204,0
  17. 250 geta$:ifa$<"a"ora$>"d"then250
  18. 270 poke204,255:t1=asc(a$)-64
  19. 290 ift1=1thencs$="[193][211][195][201][201]"
  20. 310 ift1=2thencs$="[208][197][212][211][195][201][201]"
  21. 330 ift1=3thencs$="[211]creen code"
  22. 350 ift1=4thengosub1210:goto130
  23. 370 print"[145][145][145][145][145][145][157][157][211]elect destination character type from    the list below:"
  24. 375 gosub1610
  25. 380 print" > "cs$" to ";:poke204,0
  26. 390 get a$:if a$<"a" or a$>"d" then390
  27. 410 poke204,255:t2=asc(a$)-64
  28. 412 ift2=1thencd$="[193][211][195][201][201]":x$="asc"
  29. 414 ift2=2thencd$="[208][197][212][211][195][201][201]":x$="pet"
  30. 416 ift2=3thencd$="[211]creen code":x$="scr"
  31. 430 if t2=4 then gosub1210:print"   ";:goto370
  32. 431 printcd$:ift1=t2then438
  33. 432 ift1=3andt2=2thenpoke685,0
  34. 433 ift1=3andt2=1thenpoke685,1
  35. 434 ift1=2andt2=3thenpoke685,2
  36. 435 ift1=2andt2=1thenpoke685,3
  37. 436 ift1=1andt2=3thenpoke685,4
  38. 437 ift1=1andt2=2thenpoke685,5
  39. 438 fd$=left$(fs$,8)+"."+x$
  40. 449 ift1<>t2thengosub4500
  41. 450 print" [215]hat type of file is the source file?"
  42. 470 print" ([211])equential, ([208])rogram, or ([213])nknown   > ";:poke204,0
  43. 490 geta$:ifa$<>"s"anda$<>"p"anda$<>"u"then490
  44. 500 poke204,255
  45. 502 ifa$="s"thenyt$="[211]equential"
  46. 504 ifa$="p"thenyt$="[208]rogram"
  47. 506 ifa$="u"thengosub1200:goto450
  48. 510 ts$=a$
  49. 530 print"[145][145][145][157][157][215]hat type of file is the object file?"
  50. 540 print" ([211])equential, ([208])rogram, or ([213])nknown   > "yt$" to ";:poke204,0
  51. 570 geta$:ifa$<>"s"anda$<>"p"anda$<>"u"then570
  52. 580 poke204,255
  53. 582 ifa$="s"thenprint"[211]equential"
  54. 584 ifa$="p"thenprint"[208]rogram"
  55. 586 ifa$="u"thengosub1200:print"   ";:goto530
  56. 590 td$=a$:poke682,asc(td$)
  57. 592 poke683,0:poke684,0
  58. 595 iftd$<>"p"then690
  59. 600 print" [197]nter load address: ";:gosub2000
  60. 610 ad=val(t$):ifad=0thenad=7168
  61. 630 poke684,ad/256:poke683,ad-32768and255
  62. 690 print" [198]rom drive <8>";
  63. 710 geta$:ifa$<>"8"anda$<>"9"anda$<>chr$(13)then710
  64. 730 ds=val(a$):ifds=0thends=8:a$="8"
  65. 740 print"[157][157]"a$"";
  66. 750 print"to drive <8>";
  67. 770 geta$:ifa$<>"8"anda$<>"9"anda$<>chr$(13)then770
  68. 780 dd=val(a$):ifdd=0thendd=8:a$=""
  69. 785 print"[157][157]"a$:poke679,ds:poke680,dd
  70. 787 dk=0:ifds=ddthengosub4000
  71. 790 printtab(8)"[208]ress [210][197][212][213][210][206] when ready"
  72. 791 printtab(5)"[198]1 to re-start, [198]8 for [213]p[212]ime";
  73. 792 geta$:ifa$<>chr$(13)anda$<>"[140]"anda$<>"[133]"then792
  74. 793 ifa$="[140]"then5100
  75. 794 ifa$="[133]"then45
  76. 795 cs$=" "+cs$:cd$=" "+cd$
  77. 796 ift1=1thencs$="n"+cs$
  78. 798 ift2=1thencd$="n"+cd$
  79. 800 print"[147] [198]rom [196]evice"ds"[157], a"cs$" file"
  80. 810 print" [212]o   [196]evice"dd"[157], a"cd$" file":poke17979,0:poke17980,0
  81. 811 a$="$0:"+fs$:forl=1tolen(a$):poke827+l,asc(mid$(a$,l,1)):nextl:poke780,2
  82. 812 poke781,ds:poke782,0:sys65466:poke780,len(a$):poke781,60:poke782,3
  83. 813 sys65469:poke780,0:poke781,0:poke782,70:sys65493
  84. 815 ifpeek(17979)=0andpeek(17980)=0thenprint""tab(6)fs$" isn't there!":goto1740
  85. 816 b=peek(17952)+256*peek(17953):bq=b:ifbq>130thenbq=130
  86. 817 ab=peek(17987)+256*peek(17988)
  87. 818 ifab<bthenprint" [212]his disk doesn't have enough room       for this file"
  88. 819 ifab<bthen1740
  89. 820 printtab(9)" [212]otal blocks:    "
  90. 825 ifdkandb>130thenprint"[145][145][145]  [212]his is too big for two disks":dk=0
  91. 830 printtab(9)" [194]locks read :    "
  92. 840 printtab(8)" 0%  25%  50%  75%  100%
  93. 850 [153][163]9)"or>>>>>>>>>>>>>>>>>>>>^
  94. 860 printtab(9)"[221]                    [146][221]
  95. 870 [153][163]9)"/tantantantantantantantantantantantantantantantantantantantanexp
  96. 875 printp$tab(15)"[204]oading..."
  97. 880 print""tab(20-(len(fs$)/2))fs$
  98. 881 open15,ds,15,"i0":f=15:gosub1700:open14,dd,15,"i0":f=14:gosub1700
  99. 882 ifdk=0thenprint#14,"s0:"fd$
  100. 885 open2,ds,2,"0:"+fs$+","+ts$+",r"
  101. 886 ifdk=0thenopen3,dd,3,"0:"+fd$+","+td$+",w"
  102. 890 poke39,bq:poke144,0:sys51200:gosub1680
  103. 895 ift2=t1then930
  104. 900 printp$tab(13)"[195]onverting..."
  105. 910 print""cl$:printp$"[145][145][145][145][145][145][145][145][145]"tab(24)"   "
  106. 920 poke39,bq:sys51203:ifdkthenprintp$cl$cl$cl$:printp$tab(12)"([195]hange disks.)"
  107. 922 ifdkthenclose2
  108. 925 ifdkthengeta$:ifa$=""then925
  109. 926 ifdkthenprint#14,"s0:"fd$
  110. 927 ifdkthenopen3,dd,3,"0:"+fd$+","+td$+",w"
  111. 930 printp$cl$p$tab(15)"[211]aving..."
  112. 940 print""cl$:printp$
  113. 950 printtab(20-(len(fd$)/2))fd$
  114. 954 f=14:gosub1700:printp$"[145][145][145][145][145][145][145][145][145]"tab(24)"   "
  115. 960 poke39,b:poke144,0:sys51206
  116. 962 gosub1680
  117. 965 ifpeek(254)=200thenpoke681,83:poke682,83:goto885
  118. 968 close2:close3
  119. 970 printp$cl$p$tab(15)"[198]inished!"
  120. 980 printtab(6)"[195]onvert another file? ([217]/[206])":poke198,0
  121. 990 geta$
  122. 1000 ifa$="y"then45
  123. 1010 ifa$="n"then5100
  124. 1020 goto990
  125. 1200 rem list of word processors
  126. 1210 print"[147][215]ord [208]rocessors","[195]hr type","[198]ile type"
  127. 1215 print"[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
  128. 1220 print"[197]asy [211]cript 64","[208][197][212][211][195][201][201]","[211]eq"
  129. 1230 print"[211]peed[211]cript","[211]cr codes","[208]rg"
  130. 1240 print"[194]ank [211]treet [215]riter","[208][197][212][211][195][201][201]","[211]eq"
  131. 1250 print"[208]aper [195]lip","[211]cr codes","[208]rg"
  132. 1260 print"[215]ord [205]aster 64","[208][197][212][211][195][201][201]","[211]eq"
  133. 1280 print"   [201]f not on list, assume [208][197][212][211][195][201][201] [211]eq"
  134. 1290 printtab(8)"[208]ress [210][197][212][213][210][206] to continue"
  135. 1370 geta$:ifa$<>chr$(13)then1370
  136. 1380 print"[147]"
  137. 1390 return
  138. 1400 print"[147] [215]ord processor file converter"
  139. 1600 print"[208]ossible character sets:"
  140. 1610 print" a) [193][211][195][201][201]",,"b) [208][197][212][211][195][201][201]"
  141. 1620 print" c) [211]creen codes","d) [213]nknown
  142. 1630 [142]
  143. 1680 [151]144,0:[158]51472:en$[178][199]([194](828))[170][199]([194](829)):l[178]831
  144. 1685 [139][194](l)[179][177]44[167]em$[178]em$[170][199]([194](l)):l[178]l[170]1:[137]1685
  145. 1690 et$[178][199]([194](l[170]1))[170][199]([194](l[170]2)):es$[178][199]([194](l[170]4))[170][199]([194](l[170]5))
  146. 1695 [137]1710
  147. 1700 [132]f,en$,em$,et$,es$
  148. 1710 [139]en$[179]"20"[167][142]
  149. 1720 [160]2:[160]3:[160]15
  150. 1730 [153]"load str$isk error:"en$", "em$","et$","es$
  151. 1740 [153][163]9)"(NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL) to retry,"
  152. 1742 [153][163]13)"[asc1] to restart"
  153. 1745 [153][163]11)"or [asc8] for (NULL)p(NULL)ime"
  154. 1750 [161]a$:[139]a$[178]"restore"[167]4999
  155. 1760 [139]a$[178][199](13)[167]800
  156. 1765 [139]a$[178]"input"[167]45
  157. 1770 [137]1750
  158. 2000 t$[178]"":[151]204,0
  159. 2010 [161]a$:[139]a$[178]""[167]2010
  160. 2020 [139]a$[178][199](13)[167][151]204,255:[153]" ":[142]
  161. 2030 [139]a$[178][199](20)[175]t$[178]""[167]2010
  162. 2050 [139]a$[178][199](20)[167]t$[178][200](t$,[195](t$)[171]1):[151]204,255:[153]" cmd"a$;:[151]204,0:[137]2010
  163. 2060 [139]a$[178]"restore"[167]5100
  164. 2070 [139]a$[179]" " [176]a$[177]"(NULL)"[167]2010
  165. 2090 [139]a$[178][199](34)[167]2010
  166. 2110 [139] a$[177]"_" [175] a$[179]"atn" [167]2010
  167. 2130 [139] [195](t$)[178]16 [167]2010
  168. 2150 t$[178]t$[170]a$
  169. 2170 [153]a$;
  170. 2190 [137]2010
  171. 3000 [153]"load    closeclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose"
  172. 3005 [151]53265,91:[151]53282,1:[151]53283,3:[151]53284,10
  173. 3010 [153]"    closeclosecloseclose(NULL)val(NULL)(NULL)closelen(NULL)(NULL)(NULL)val(NULL)(NULL)val(NULL)closeclosecloseclose"
  174. 3020 [153]"    closeclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose"
  175. 3030 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  176. 3040 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose    text converter    wait"
  177. 3050 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  178. 3060 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  179. 3070 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  180. 3080 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  181. 3090 [153]"    closecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose                 wait"
  182. 3100 [153]"    closeclosecloseclosecloseverifylen(NULL)(NULL)(NULL)val(NULL)(NULL)right$(NULL)(NULL)closeclose               wait"
  183. 3110 [153]"    closecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose                 wait"
  184. 3120 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  185. 3130 [153]"    closeclosecloseclosecloseclosecloseclosecloseclose                      wait"
  186. 3140 [153]"                                    wait"
  187. 3150 [153]"                                    wait"
  188. 3160 [153]"                                    wait"
  189. 3180 [153]"     petscii - ascii - screen codes"
  190. 3185 [153]"  (c)1987 by softdisk publishing, inc."
  191. 3187 [153][163]8)"press return to continue"
  192. 3190 [161] a$:[139] a$[179][177][199](13) [167] 3190
  193. 3200 [153]"load":[151]53265,27:[142]
  194. 4000 [153]" (NULL)ame disk as original? ";:[151]204,0
  195. 4010 [161]a$:[139]a$[178]"y"[167][151]204,255:[153]"(NULL)es":dk[178]0:[142]
  196. 4020 [139]a$[178]"n"[167][151]204,255:[153]"(NULL)o":dk[178][171]1:[142]
  197. 4030 [137]4010
  198. 4500 [153]" atnny special characters? ";:[151]204,0
  199. 4502 gg[178][195](cs$):[139][195](cd$)[177][195](cs$)[167]gg[178][195](cd$)
  200. 4505 [161]a$:[139]a$[178]"n"[167][153]"(NULL)o":[151]204,255:[142]
  201. 4510 [139]a$[179][177]"y"[167]4505
  202. 4520 [151]204,255:[153]"loadleft$ow many special characters? (0-5) ";:[151]204,0
  203. 4525 [161]a$:[139]a$[179]"0"[176]a$[177]"5"[167]4525
  204. 4527 [151]204,255:a[178][197](a$):[153]a$:[139]a[178]0[167][153]"load":[142]
  205. 4529 k[178]51695[170]256[172][194](685)
  206. 4530 [129]l[178]1[164]a:[153]:[153]"    "cs$" "l"cmdcmdcmd#"[163]7[170]gg)": ";:[141]4800:ad[178]yy
  207. 4540 [153]"    "cd$" "l"cmdcmdcmd#"[163]7[170]gg)": ";:[141]4800
  208. 4550 [151]k[170]ad,yy:[130]l:[153]"load":sc[178]1:[142]
  209. 4800 [151]204,0:yy$[178]""
  210. 4810 [161]a$:[139](a$[179]"0"[176]a$[177]"9")[175]a$[179][177][199](20)[175]a$[179][177][199](13)[167]4810
  211. 4812 [139]a$[178][199](13)[175]yy$[179][177]""[167]yy[178][197](yy$):[151]204,255:[153]" ":[142]
  212. 4815 [139]a$[178][199](20)[175]yy$[179][177]""[167][153]a$;:yy$[178][200](yy$,[195](yy$)[171]1):[137]4810
  213. 4817 [139][197](yy$[170]a$)[177]255[167]4810
  214. 4818 [139]a$[178][199](13)[167]4810
  215. 4819 [139]a$[178][199](20)[167]4810
  216. 4820 yy$[178]yy$[170]a$:[153]a$;:[137]4810
  217. 5000 [153]"load(NULL)eturn the converter disk to the drive,":[151]17927,0
  218. 5010 [153]"   and press (NULL)val(NULL)(NULL)(NULL)(NULL)...":[151]198,0:[151]17979,0:[151]17980,0
  219. 5020 [161]a$:[139]a$[179][177][199](13)[167]5020
  220. 5030 a$[178]"$0:convert.ml":[129]l[178]1[164][195](a$):[151]827[170]l,[198]([202](a$,l,1)):[130]l
  221. 5032 [151]780,2:[151]781,8:[151]782,0:[158]65466
  222. 5034 [151]780,[195](a$):[151]781,60:[151]782,3:[158]65469
  223. 5036 [151]780,0:[151]781,0:[151]782,70:[158]65493
  224. 5040 q$[178]"":[129]l[178]17926[164]17935:q$[178]q$[170][199]([194](l)):[130]l
  225. 5043 [153]"load     (NULL)lease wait..."
  226. 5045 [139][194](17979)[179][177]0[175][194](17980)[179][177]0[167][138]
  227. 5060 [153]"    (NULL)lease put "cu$" in drive 8.":[129]l[178]1[164]3000:[130]:[153]"on"cl$
  228. 5070 [153]"ononon":[129]l[178]217[164]242:[151]l,[194](l)[176]128:[130]:[137]5020
  229. 5100 [151] 204,1:[153]"load"[163]9)"right$nsert (NULL)p(NULL)ime disk and"
  230. 5110 [153][163]14)"press (NULL)val(NULL)(NULL)(NULL)(NULL)"
  231. 5120 [151] 198,0
  232. 5130 [161] a$:[139] a$[179][177][199](13) [167] 5130
  233. 5135 [151] 646,[194](53281)
  234. 5137 [151] 780,0:[158] 65424
  235. 5140 [153]"loadload"[199](34)"0:upt.reboot"[199](34)",8":[153]"run:"
  236. 5150 [151] 198,4:[151] 631,19:[151] 632,13:[151]633,13:[151]634,13:[162]
  237.