🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #1005

Re: Is there a way to peek ahead and see how many bytes are in the COM buffer?

#1005
From: Patrick Lindstrom
Date: Thu, 28 Dec 1989 22:32
15 lines
1235 bytes
In article <1989Dec24.103004.26003@larouch.uucp> yozzo@larouch.UUCP (Ralph Yozzo) writes:
>
>Does anyone know of a way to peek ahead and see how many bytes are in 
>the COM1 buffer?
>The reason I ask is that I'd like to read as many bytes
>as possible from the COM port and I'd rather
>not ask for too much because the DosRead() will block.
>

Ralph,
There is a Generic IOCtl call that will return to you the size of the
receive buffer and the number of characters currently queued.  I don't
have my device driver technical reference manual handy so I can't tell
you the exact number.  Look for Category 1 function calls in your
device drivers manual.
Technical Details
Message-ID: <3423@hub.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!pasteur!helios.ee.lbl.gov!ucsd!hub!engrhub!patrick
References: <1989Dec24.103004.26003@larouch.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!pasteur!helios.ee.lbl.gov!ucsd!hub!engrhub!patrick
From: patrick@engrhub.ucsb.edu (Patrick Lindstrom)
Newsgroups: comp.os.os2
Subject: Re: Is there a way to peek ahead and see how many bytes are in the COM buffer?
Message-ID: <3423@hub.UUCP>
Date: 28 Dec 89 22:32:04 GMT
References: <1989Dec24.103004.26003@larouch.uucp>
Sender: news@hub.UUCP
Reply-To: patrick@engrhub.UUCP (Patrick A. Linstruth)
Organization: University of California, Santa Barbara
Lines: 15