Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!amdcad!sun!imagen!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st Subject: Re: Expanding the RS232 Buffer Message-ID: <755@atari.UUCP> Date: Mon, 8-Jun-87 14:24:52 EDT Article-I.D.: atari.755 Posted: Mon Jun 8 14:24:52 1987 Date-Received: Thu, 11-Jun-87 04:57:37 EDT References: <8706070513.AA24640@ucbvax.Berkeley.EDU> Distribution: world Organization: Atari Corp., Sunnyvale CA Lines: 39 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 \----------------------------------------------/