tiberio@seismo.UUCP (Mike Tiberio) (08/28/83)
here is my terminal program, termcap entry and stty line that i use to get my vic20, with vicmodem and datasette, to talk with our unix machine. 100 open 5,2,3,chr$(6) 110 dim t%(223),f%(127),c%(7) 120 r=18: k=0: b=13: s=6: p=2 130 c%(0)=5: c%(1)=28: c%(2)=30 140 c%(3)=31: c%(4)=144: c%(5)=156 150 c%(6)=158: c%(7)=159 160 poke 36878,15: poke 36869,242 170 poke 36879,s*16+b: print chr$(c%(p)); 200 t%(13)=13: t%(17)=10: t%(19)=11 210 t%(20)=8: t%(29)=9 220 for j=32 to 64: t%(j)=j: next 230 for j=65 to 90: t%(j)=j+32: next 240 for j=91 to 94: t%(j)=j: next 250 t%(95)=27: t%(133)=124: t%(134)=96 260 t%(135)=123: t%(136)=125: t%(140)=127 270 t%(147)=12: t%(163)=20: t%(165)=7 280 t%(166)=30: t%(168)=28: t%(170)=14 290 t%(171)=17: t%(172)=4: t%(173)=26 300 t%(174)=19: t%(175)=16: t%(176)=1 310 t%(177)=5: t%(178)=18: t%(179)=23 320 t%(183)=25: t%(184)=21: t%(185)=15 330 t%(187)=6: t%(188)=3: t%(189)=24 340 t%(190)=22: t%(191)=2 350 for j=193 to 218: t%(j)=j-128: next 360 t%(220)=29: t%(221)=95: t%(222)=126 370 t%(223)=31 400 for j=13 to 223: f%(t%(j))=j: next 410 f%(0)=0: f%(10)=0: f%(12)=147 420 f%(92)=223: f%(95)=164: f%(96)=190 430 f%(123)=179: f%(124)=170: f%(125)=171 440 f%(126)=163 450 print chr$(147)"terminal ready" 500 get #5,a$: if a$="" then 580 510 a=asc(a$)and127: if a<>7 then 540 520 poke 36875,235: for l=1 to 50: next 530 poke 36875,0: goto 560 540 print " "chr$(157)chr$(f%(a)); 550 if a=34 then poke 212,0 560 get a$: if a$="" then 500 570 goto 600 580 print chr$(r)" "chr$(157)chr$(146); 590 get a$: if a$="" then 700 600 a=asc(a$): if a<>169 then 630 610 p=p+1: if p>7 then p=0 620 print chr$(c%(p));: goto 700 630 if a<>192 then 660 640 b=b+1: if b>15 then b=8 650 poke 36879,s*16+b: goto 700 660 if a<>219 then 690 670 s=s+1: if s>15 then s=0 680 goto 650 690 print #5,chr$(t%(a)); 700 k=k+1: if k=8 then k=0: r=164-r 710 if (peek(37151)and64)=1 then 710 720 goto 500 vc|vic20|VICTERM II:co#20:bs:cl=^L:li#23:bw: stty crt crterase crtkill -tabs erase kill _ intr quit brk i have been unable to get vi to work, even the game `warp' says my terminal is too dumb. this version is a little too slow for large quantities of text remove the screen, border and character color code and get a big speed up also run nooptimize when you use `ex'