[comp.sys.atari.st] Expanding the RS232 Buffer

KIMMEL@ecs.umass.EDU.UUCP (06/06/87)

How do I increase the size of the RS232 buffer?  I've seen this done in
Uniterm and Gulam.  I'm writing a terminal program which needs a bigger
buffer.

Please reply to me privately rather than through the newsgroup/digest,
if possible.  We haven't received the digest in a week, and I'd hate
to miss the answer to this.  Thanks in advance.

-Matt Kimmel,
KIMMEL@UMAECS                      (BITNet)
KIMMEL%ECS.UMASS.EDU@RELAY.CS.NET  (Internet)
KIMMEL@ECS.UMASS.EDU               (CSNet)

apratt@atari.UUCP (Allan Pratt) (06/08/87)

in article <8706070513.AA24640@ucbvax.Berkeley.EDU>, KIMMEL@ecs.umass.EDU 
(Matt Kimmel) says:
>
> How do I increase the size of the RS232 buffer?  I've seen this done in
> Uniterm and Gulam.  I'm writing a terminal program which needs a bigger
> buffer.

The XBIOS call Iorec (0x0e) returns a pointer to a structure for the
BIOS I/O buffer for a given device.  In the case of RS232, there
are two structures here, one input and one output.

The structures look like this:

	struct iorec (
		LONG ibuf;
		WORD ibufsiz;
		WORD ibufhd;
		WORD ibuftl;
		WORD ibuflow;
		WORD ibufhi;
	};

ibuf points to the buffer itself; ibufsiz is its size in bytes.  The head
and tail indices are zero for an empty buffer.  ibuflow and ibufhi are
low- and high-water marks: when the buffer is more full than ibufhi,
XOFF / CTS false is used to stop the input; when the buffer empties below
ibuflow, XON / CTS true is used to restart input.  These only have any
effect if flow-control is enabled (with Rsconf).

In the case of RS232 (device number 0) the first struct is the input buffer,
the second is the output buffer.

Make sure no characters come from the device while you are changing the
buffer parameters: use IPL 7 or something.

/----------------------------------------------\
| Opinions expressed above do not necessarily  |  -- Allan Pratt, Atari Corp.
| reflect those of Atari Corp. or anyone else. |     ...lll-lcc!atari!apratt
\----------------------------------------------/