From: Bill Currie Newsgroups: comp.os.msdos.djgpp Subject: Re: Serial ports? Date: Mon, 16 Feb 1998 08:26:49 +1300 Organization: Telecommunication Systems Support Centre Lines: 39 Message-ID: <34E74179.4924@tssc.co.nz> References: <6bupsu$9eo AT bbcnews DOT rd DOT bbc DOT co DOT uk> <34E3F4FA DOT 48A8 AT post DOT comstar DOT ru> <6c16q7$5pc AT bbcnews DOT rd DOT bbc DOT co DOT uk> NNTP-Posting-Host: node106.tssc.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Nigel Megitt wrote: > > Dim Zegebart (zager AT post DOT comstar DOT ru) wrote: > : It seems to me BCSerio can handles any number of ports, it does via DXE > : modules. That was bcserio.zip, bcsio20.zip dropped DXE's in favor of a (hopefully) more robust sytem. > : Contact the author of BCSerio for details. > > Thanks - this looks like exactly what I want. If the author is reading, a > question: What is the buffer size used by BCSERIO? Is it changeable? How would > I go about flushing the buffer? 1k each for rx & tx. It's fixed at compile time, but controlled by a single variable at the top of the .s file. Whatch out, however; there is a bug in gas (as.exe) up to version 2.8.1 (fixed somewhere before binutils 2.8.1.0.15 (?too many dots?)) that causes it to produce bogus code for serio.s. There should be a patch for gas (binutils 2.8.1) in bcsio20.zip that fixes this. If not send me mail (see below) and I'll make sure you have it. By flushing, do you mean discarding the contents (unsupported), forcing the contents to be sent (automatic), or waiting for the tx buffer to empty (see below)? For waiting till the tx buffer is empty, just have a while (sio_senddone(port)) { /*optional other code*/} (yes, the logic for sio_senddone is backwards (I didn't write it, sio_senddone was contributed), should I change it?). NOTE: bcsio20.zip has some nasty bugs in it (mostly sio_senddone and sio_write, segfaults and the like). Send some email to bill AT taniwha DOT tssc DOT co DOT nz and I will email you the latest version (probably with the sio_senddone issue cleared up, I don't know why I left it that way). Bill -- Leave others their otherness