' TERMINAL.BAS ' A simple half-duplex terminal program ' Remove line number 2 and 4 if host sends LF ' Remove line number 3 for full-duplex ' comset=&h9a : ' 1200,E71 1 if (comstat and &h100)<>0 then a=comin : ' read character print chr$(a); : ' print it 2 if a=13 then print : ' new line endif a$=inkey$ : ' check for keypress if a$="" then goto 1 : ' if none, check incoming if a$=chr$(27) then 5 : ' ESC key to exit 3 print a$; : ' Print keyboard char 4 if a$=chr$(13) then print : ' new line comout=asc(a$) : ' send it goto 1 5 if isrun then run "MENU" else end