home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 March / Ahoy_Magazine_86-03_1986_Double_L.d64 / ahoy!term-128 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1986-01-01  |  4.5 KB  |  197 lines

  1. 10 rem * terminal program for c-128 *
  2. 20 rem *  copyright 1985  jeff lih  *
  3. 30 (NULL)13
  4. 40 poke 53280,0:poke 53281,0:printchr$(14)+"":poke808,107
  5. 50 if peek(12288)=32goto130
  6. 60 print"[147][193] [200] [207] [217] ! [212] [197] [210] [205]   1 2 8"
  7. 70 print"[145][145][145][145][145][196]esigned by: [202]eff [204]ih"
  8. 80 print"[201]nitializing - [215]ait......"
  9. 90 load"term.ml",8,1
  10. 100 rem
  11. 110 rem * * default values
  12. 120 rem
  13. 130 open 5,2,2,chr$(0)+chr$(0)+chr$(65)+chr$(1):poke12294,25:rem 1200 baud
  14. 140 open 2,0,0:rem keyboard
  15. 150 open 3,3,0:rem screen
  16. 160 open 4,4,7:rem printer
  17. 170 ni$="":no$=""
  18. 180 print" [208]lease enter [213][208][204][207][193][196] file name [207][210]"
  19. 190 input" carriage return for [196][197][198][193][213][204][212] ";ni$
  20. 200 gosub 1790
  21. 210 rem n$="555-1212":goto860
  22. 220 fora=1to999:next:print"[147]"+chr$(14)+""
  23. 230 print"   [205][193][201][206] [205][197][206][213] [146]"
  24. 240 print" [212] [212]erminal [205]ode"
  25. 250 print" [205] [205]odem [195]ommands"
  26. 260 print"   - [196]ial"
  27. 270 print"   - [200]ang [213]p/[210]eset [194][193][213][196]"
  28. 280 print"   - [193]nswer [205]ode"
  29. 290 print" [198] [198]ile [195]ommands"
  30. 300 print"   - [195]hange [213][208]/[196][207][215][206] [204]oad [206]ames"
  31. 310 print"   - [197]xamine/[208]rint [198]iles"
  32. 320 print"   - [210]ename [198]iles"
  33. 330 print"   - [211]cratch [198]iles"
  34. 340 print" [209] [209]uit [208]rogram"
  35. 350 print" [210][197][208][204][217] > [146][157]";
  36. 360 get#2,a$:if a$=""then360
  37. 370 printa$;
  38. 380 ifa$="t"ora$="[212]"thensys12288:no$="":gosub1930:goto220
  39. 390 ifa$="m"ora$="[205]"thengoto440
  40. 400 ifa$="f"ora$="[198]"thengoto1170
  41. 410 ifa$="q"ora$="[209]"thengoto1720
  42. 420 print" huh ??"
  43. 430 for a=1to999:nexta:goto220
  44. 440 rem modem section
  45. 450 print"[147]"
  46. 460 print"   [205][207][196][197][205] [205][197][206][213] [146]"
  47. 470 print" [196] [196][201][193][204]"
  48. 480 print" [200] [200]ang [213]p/[210]eset [194][193][213][196]"
  49. 490 print" [193] [193]nswer [205]ode"
  50. 500 print" [210] [210]epeat [204]ast [205]odem [195]ommand"
  51. 510 print"   (useful for redial)"
  52. 520 print" [204] [204]ocal [197]cho"
  53. 530 print" [216] [197][216][201][212] - [210]eturn to [205][193][201][206] [205][197][206][213]"
  54. 540 print" [210][197][208][204][217] > [146][157]";
  55. 550 get#2,a$:if a$=""then550
  56. 560 printa$
  57. 570 ifa$="d"ora$="[196]"goto650
  58. 580 ifa$="h"ora$="[200]"goto1020
  59. 590 ifa$="a"ora$="[193]"goto1160
  60. 600 ifa$="r"ora$="[210]"goto960
  61. 610 ifa$="x"ora$="[216]"goto220
  62. 620 ifa$="[204]"ora$="l"goto970
  63. 630 print" huh ??"
  64. 640 for a=1to999:next:goto450
  65. 650 print" [212]elephone [206]umber "
  66. 660 print" [206][213][205][194][197][210] > [146][157]";
  67. 670 n$=""
  68. 680 get#2,a$:if a$=""then680
  69. 690 ifa$=chr$(13)thengoto860
  70. 700 ifa$="1"thengoto850
  71. 710 ifa$="2"thengoto850
  72. 720 ifa$="3"thengoto850
  73. 730 ifa$="4"thengoto850
  74. 740 ifa$="5"thengoto850
  75. 750 ifa$="6"thengoto850
  76. 760 ifa$="7"thengoto850
  77. 770 ifa$="8"thengoto850
  78. 780 ifa$="9"thengoto850
  79. 790 ifa$="0"thengoto850
  80. 800 ifa$=","thengoto850
  81. 810 ifa$="#"thengoto850
  82. 820 ifa$="*"thengoto850
  83. 830 ifa$="-"thengoto850
  84. 840 goto680
  85. 850 n$=n$+a$:printa$+" [146][157]";:goto680
  86. 860 print" "
  87. 870 print" [207]kay to [196][201][193][204] - "n$" ?"
  88. 880 input" [193]nswer y/n ";a$
  89. 890 ifa$="y"ora$="[217]"goto930
  90. 900 input" [212]ry [193]gain ??  y/n ";a$
  91. 910 ifa$="y"ora$="[217]"goto650
  92. 920 goto450
  93. 930 print#5,"[193][212] [196][212] "n$
  94. 940 print" [215][193][201][212] [198][207][210] [195][193][210][210][201][197][210]"
  95. 950 forb=1to999:nextb:goto220
  96. 960 print#5,"[193]/";:goto950
  97. 970 print" [197]nter 1 for local echo on"
  98. 980 input" [197]nter 2 for local echo off";a$
  99. 990 ifa$="1"thenpoke12298,1:goto950
  100. 1000 ifa$="2"thenpoke12298,0:goto950
  101. 1010 goto630
  102. 1020 print#5,"+++";
  103. 1030 forb=1to999:nextb:print#5,"[214]"
  104. 1040 forb=1to999:nextb:close5
  105. 1050 print" [211]et/[210]eset [194][193][213][196] [210]ate"
  106. 1060 input" 300 or 1200 ";a
  107. 1070 ifa=300goto1100
  108. 1080 ifa=1200goto1130
  109. 1090 print" huh ?":goto1060
  110. 1100 close5
  111. 1110 open5,2,3,chr$(6):rem 300
  112. 1120 poke12294,60:goto640
  113. 1130 close5
  114. 1140 open5,2,2,chr$(0)+chr$(0)+chr$(65)+chr$(1):rem 1200 baud
  115. 1150 poke12294,25:goto640
  116. 1160 print#5,"[193]";:goto950
  117. 1170 rem files section
  118. 1180 print"[147]"
  119. 1190 print"   [198][201][204][197][211] [205][197][206][213] [146]"
  120. 1200 print" $ [196]isplay [196][201][210][197][195][212][207][210][217]"
  121. 1210 print" [195] [195]hange [213][208]/[196][207][215][206] [204][207][193][196] [198]ile [206]ames"
  122. 1220 print" [210] [210]ename [198]ile"
  123. 1230 print" [211] [211]cratch [198]ile"
  124. 1240 print" [214] [196]isplay ([214]iew) [198]ile"
  125. 1250 print" [208] [208]rint [198]ile"
  126. 1260 print" [216] [197][216][201][212] - [210]eturn to [205][193][201][206] [205][197][206][213]"
  127. 1270 print" [210][197][208][204][217] > [146][157]";
  128. 1280 get#2,a$:ifa$=""then1280
  129. 1290 printa$
  130. 1300 ifa$="$"thengoto1390
  131. 1310 ifa$="c"ora$="[195]"thengoto1420
  132. 1320 ifa$="r"ora$="[210]"thengoto1490
  133. 1330 ifa$="s"ora$="[211]"thengoto1570
  134. 1340 ifa$="v"ora$="[214]"thengoto1600
  135. 1350 ifa$="p"ora$="[208]"thengoto1610
  136. 1360 ifa$="x"ora$="[216]"thengoto220
  137. 1370 print" huh ??"
  138. 1380 for a=1to999:next:goto1180
  139. 1390 close9:close8:close15
  140. 1400 print" [217]ou [205]ay [195][200][193][206][199][197] [196]isks [206]ow":gosub1880
  141. 1410 (NULL):gosub1790:gosub1880:goto1180
  142. 1420 close8:close9:close15
  143. 1430 print
  144. 1440 gosub 1450::goto1180
  145. 1450 print" [217]ou [205]ay [195][200][193][206][199][197] [196]isks [206]ow"
  146. 1460 input" [197]nter new [213][208][204][207][193][196] [198][201][204][197] ";ni$
  147. 1470 input" [197]nter new [196][207][215][206][204][207][193][196] [198][201][204][197] ";no$
  148. 1480 gosub1790:gosub1880:return
  149. 1490 close8:close9:input" [197]nter [207][204][196] [198]ile ";xn$
  150. 1500 input" [197]nter [206][197][215] [198]ile ";yn$
  151. 1510 print" [195]hanging "+xn$+" to "+yn$
  152. 1520 input " [208]roceed (y/n)";a$
  153. 1530 if a$="[217]"ora$="y"thengoto1550
  154. 1540 goto 1560
  155. 1550 print#15,"r:"+yn$+"="+xn$
  156. 1560 gosub1860:gosub1790:gosub1880:goto1180
  157. 1570 close8:close9
  158. 1580 input " [197]nter [198]ile to [211][195][210][193][212][195][200]";nam$
  159. 1590 print#15,"s0:"+nam$:goto1560
  160. 1600 sw$="s":goto1620
  161. 1610 sw$="p"
  162. 1620 input" [197]nter [198][201][204][197] [206]ame ";nam$
  163. 1630 print" [200]it [193]ny [203]ey to [211][212][207][208]"
  164. 1640 close8:close9
  165. 1650 open 7,8,7,"0:"+nam$+",s,r"
  166. 1660 gosub1860
  167. 1670 ifsw$="p"thengoto1700
  168. 1680 get#7,a$:ifst=0thenprinta$;:get#2,b$:ifb$=""thengoto1680
  169. 1690 goto1710
  170. 1700 get#7,a$:ifst=0thenprint#4,a$;:get#2,b$:ifb$=""thengoto1700
  171. 1710 print:close7:gosub1790:gosub1880:goto1180
  172. 1720 close9:close8:close4:print#15,"i"
  173. 1730 print#5,"+++";
  174. 1740 forb=1to999:nextb:print#5,"[214]"
  175. 1750 forb=1to999:nextb:close5
  176. 1760 close5:close15
  177. 1770 print"[147]":poke808,110
  178. 1780 end
  179. 1790 close15:open15,8,15:print#15,"i"
  180. 1800 ifni$=""thenni$="zzup":nam$=ni$:gosub1920
  181. 1810 ifno$=""thenno$="zzdown":nam$=no$:gosub1920
  182. 1820 open 8,8,8,"0:"+ni$+",s,r"
  183. 1830 gosub1860
  184. 1840 ife1$<>"00"thenclose8:open8,8,8,"@0:"+ni$+",s,w":close8:goto1820
  185. 1850 open 9,8,9,"@0:"+no$+",s,w":return
  186. 1860 input#15,e1$,e2$,e3$,e4$
  187. 1870 print:printe1$;" ";e2$;" ";e3$;" ";e4$:return
  188. 1880 print:print" [200]it any key to continue[146]":print
  189. 1890 get#2,a$:if a$=""then1890
  190. 1900 return
  191. 1910 ni$="zzup":no$="zzdown":print
  192. 1920 print" [213]sing [196][197][198][193][213][204][212] filename ";nam$:return
  193. 1930 print:print" [201]f you have [211][193][214][197][196] [196][207][215][206] [204][207][193][196] data  "
  194. 1940 print" [208]lease rename zzdown[146] file immediatly"
  195. 1950 print" if you want to keep it"
  196. 1960 gosub1880:return
  197.