home *** CD-ROM | disk | FTP | other *** search
- 'Reference Manual Example Page 198
- CLS
-
- $COM 1024 'set up 1K input buffer
- OPEN "COM1:300,n,8,1,DS,RS,CS,CD" AS #1 LEN = 1
- PRINT "Press any key to terminate the program..."
- 'while a key hasn't been pressed
- WHILE NOT INSTAT
- 'if there is any input available
- IF LOC(1) <> 0 THEN
- 'read any info available in the COM port buffer
- COMPortInput$ = INPUT$(LOC(1), #1)
- 'display input
- PRINT "COM Port input: "; COMPortInput$
- END IF
- WEND
- CLOSE 1
- END