home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_07_1985_Transactor_Publishing.d64 / terminal_vic.c1 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  2KB  |  59 lines

  1. 10 rem  *** new protocol ***
  2. 20 rem  release 1: jul 31 1984
  3. 30 rem  by steve punter
  4. 40 rem  converted to the vic-20
  5. 50 rem  by david tingler & dave caruana
  6. 60 rem  requires at least 8k expansion
  7. 70 ifpeek(12288)<>169thenload"term/vic.c1",8,1
  8. 80 poke56,48:poke644,48:clr:open5,2,0,chr$(6):poke665,75:get#5,a$:bs=255
  9. 90 open1,8,15,"ui-":dimt$(3):ml=12288:bf=ml+2048:printchr$(14);
  10. 100 ty$="psp":t$(1)="[208]rogram":t$(2)="[211][197][209]":t$(3)="[215]ord[208]ro"
  11. 110 print"[147][194]lock [211]ize ="bs
  12. 120 print"[207]ptions:"
  13. 130 print" 1 - [212]erminal [205]ode"
  14. 140 print" 2 - [212]ransmit a [198]ile"
  15. 150 print" 3 - [210]eceive a [198]ile"
  16. 160 print" 4 - [195]hange [194]lock [211]ize"
  17. 170 geta$:ifa$=""then170
  18. 180 ifa$="2"then1000
  19. 190 ifa$="3"then2000
  20. 200 ifa$="4"then3000
  21. 210 ifa$="1"thenprint"[212]erminal [205]ode:":goto4000
  22. 220 goto170
  23. 1000 print"[208]rogram [206]ame? ";:gosub5000:ifi$=""orfl=1then110
  24. 1010 print"[198]ile [212]ype ([208],[211],[215])?":print">  [146][157]";
  25. 1020 geta$:ifa$=""then1020
  26. 1030 ifa$="[133]"then110
  27. 1040 ifa$="p"thensa=0:t=1:goto1080
  28. 1050 ifa$="s"thensa=2:t=2:goto1080
  29. 1060 ifa$="w"thensa=0:t=3:goto1080
  30. 1070 goto1020
  31. 1080 printt$(t)"":open2,8,sa,i$:input#1,e$,em$,t$,s$
  32. 1090 ifval(e$)>0thenprint""e$","em$","t$","s$:close2:goto1000
  33. 1120 sysml+21:pokebf+27,t:sysml+12:ifpeek(512)=1thenclose2:goto4000
  34. 1130 sysml+21:pokebf+24,bs:sysml+6:close2:goto4000
  35. 2000 print"[211]ave [193]s? ";:gosub5000:ifi$=""orfl=1then110
  36. 2010 sysml+21:sysml+9:ifpeek(512)=1then4000
  37. 2020 t$=","+mid$(ty$,peek(bf+27),1)+",w"
  38. 2025 print"[198]ile [212]ype: "t$(peek(bf+27))
  39. 2030 open2,8,2,"0:"+i$+t$:forx=1to1300:nextx:print:sys61531
  40. 2040 sysml+21:sysml+3:close2:forx=1to1500:nextx:poke668,peek(667):goto4000
  41. 3000 print"[194]lock [211]ize? ";:gosub5000:ifi$=""then110
  42. 3010 bs=val(i$):ifbs<40thenbs=40
  43. 3020 ifbs>255thenbs=255
  44. 3030 goto110
  45. 4000 print
  46. 4010 sysml+21:sysml+15:goto110
  47. 5000 i$="":fl=0
  48. 5010 print" [146][157]";
  49. 5020 geta$:ifa$=""then5020
  50. 5030 ifa$=chr$(13)then5100
  51. 5040 ifa$=chr$(20)then5080
  52. 5045 ifa$="[133]"thenfl=1:goto5100
  53. 5050 iflen(a$)>20then5020
  54. 5060 if(asc(a$)and127)<32then5020
  55. 5070 printa$;:i$=i$+a$:goto5010
  56. 5080 iflen(i$)=0then5020
  57. 5090 print" [157][157]";:i$=left$(i$,len(i$)-1):goto5010
  58. 5100 print" ":return
  59.