🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #998

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

#998
From: Ralph Yozzo
Date: Mon, 25 Dec 1989 02:51
20 lines
1680 bytes
From article <1989Dec24.103004.26003@larouch.uucp>, by yozzo@larouch.uucp (Ralph Yozzo):
> 
> 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.
> 
To answer my own question, there is a DosDevIOCtl() call that
gives the number of characters in the receive queue.

The call is documented in the I/O Subsystems and Device Drivers Volume 1
page 7-34 Category 1- Function 68H
------------------------------------------------------------------------------
| Ralph E. Yozzo                     |                                       |
| Arpanet: yozzo@ibm.com             |                                       |
| Bitnet: yozzo@yktvmx.bitnet        \---------------------------------------|
| Home: ..!uunet!bywater!acheron!larouch!yozzo  | Phone: (914) 945-3634 work |
|                                               | Phone: (914) 564-4731 home |
------------------------------------------------------------------------------
Technical Details
Message-ID: <1989Dec25.025130.27715@larouch.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!bywater!acheron!archet!larouch!news
References: <1989Dec24.103004.26003@larouch.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!bywater!acheron!archet!larouch!news
From: yozzo@larouch.UUCP (Ralph Yozzo)
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: <1989Dec25.025130.27715@larouch.uucp>
Date: 25 Dec 89 02:51:30 GMT
References: <1989Dec24.103004.26003@larouch.uucp>
Sender: news@larouch.uucp (Usenet News Program)
Organization: Larouch Headquarters
Lines: 20