home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / a / ansi_bas.zip / ANSITERM.BAS next >
BASIC Source File  |  1993-02-20  |  391b  |  24 lines

  1. OPEN "com2:2400,N,8,1" FOR RANDOM AS 55 LEN = 256
  2. OPEN "cons:" FOR OUTPUT AS 1
  3. PRINT #1, CHR$(27) + "[2J";
  4. KEY(1) ON
  5. ON KEY(1) GOSUB key1hit
  6. ON ERROR GOTO overflow
  7. done = 0
  8. DO
  9.  IF NOT EOF(55) THEN
  10.   t$ = INPUT$(LOC(55), #55)
  11.   PRINT #1, t$;
  12.  END IF
  13.  i$ = INKEY$
  14.  IF i$ <> "" THEN PRINT #55, i$;
  15. LOOP UNTIL done
  16. CLOSE
  17. END
  18. key1hit:
  19.  done = -1
  20.  RETURN
  21. overflow:
  22.  RESUME
  23.  
  24.