' testcons.bas ' using BASIC standard device CONS: for output to COM4 ' INKEY$ for input from COM4 ' PS. need not InstallCom(4,...),and ' cannot use IsCom(4),ToCom(4,..),ReadCom(4).... ' can use PRINT #n,.... to print message to COM4 ' ' compiler: bc /o testcons ' link : link testcons ' need not 7188l.lib , testcons.exe can run on PC. ' OPEN "CONS:" FOR OUTPUT AS #1 PRINT #1, "test" nextinput: A$=inkey$ if A$<>"" then print #1,A$; if asc(A$)=ASC("q") goto endprogram if asc(A$)=13 then print #1, endif goto nextinput endprogram: CLOSE #1