Article View: comp.sys.atari.st
Article #25321A flush utility for RS232 I/O
From: RDROYA01
Date: Fri, 27 Feb 1987 17:59
Date: Fri, 27 Feb 1987 17:59
65 lines
2670 bytes
2670 bytes
Someone mentioned having problems with locked up serial lines. I too have
had that problem before. I use the short program below to reset the input
and output record. You may also have to turn off your modem to flush any
buffers it has (at least I have to with my Avatex), but at least you do not
have to reset the ST. However, flow control will still not work even
though the head and tail indexes are reset, so the explanation of how flow
control is set up given in an earlier message must not be correct.
--------------------------- source uuencode follows ---------------------
#include <osbind.h>
typedef struct IOSTRUCT {
long ibuf;
int ibufsiz;
int ibufhd;
int ibuftl;
int ibuflow;
int ibufhi;
long obuf;
int obufsiz;
int obufhd;
int obuftl;
int obuflow;
int obufhi;
} IOSTRUCT;
main()
{
register IOSTRUCT *ioptr;
ioptr = (IOSTRUCT *)Iorec(0);
ioptr->ibufhd = 0;
ioptr->ibuftl = 0;
ioptr->ibuflow= 0x40;
ioptr->ibufhi = 0xc0;
ioptr->obufhd = 0;
ioptr->obuftl = 0;
ioptr->obuflow= 0x40;
ioptr->obufhi = 0xc0;
exit(0);
}
------------------------ cut - here ---------------------------------
table
!"#$%&'()*+
,-./0123456
789:;<=>?@A
BCDEFGHIJKL
MNOPQRSTUVW
XYZ[\]^_
begin 777 FLSRS2.PRG
M8!H #D @ ": $*%(&\ !"/( Z")H !C3a
MZ <3KD "23OD @2I\_/ !,3D$@;P $,B\ "# O I(P%. ;P "!#!a
M4<C__$* 3G4@;P $,"\ "$H09@ !D* 3G6P&&;R( A3@$YU(]\ #D3D$Oa
M.0 .1.=2/? Y$Y-+SD #D3G4CWP .1.3B\Y Y$YU3E8 $CGa
M 01"5S\\ Y.N0 ()4CRI 0FT !D)M @[? ! H[? # Q";0 40FT a
M%CM\ $ &#M\ , &D)73KD @2I],WR 3EY.=5]?97AI= H@ @a
M7V5X:70 "B "!?7W-T87)T *( %]?8F%S90 H0 #H7VENa
M9&5X "B $9?<W1R8VAR *( 1E]G96UD;W, H@ !B7V)I;W, a
M "B ')?>&)I;W, *( @E]B;&MF:6QLH@ H7VUA:6X "Ba
4 )( (#@9(" @(" @6- a
a
end
Technical Details
Message-ID:
<8702280226.AA01209@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!ULKYVX.BITNET!RDROYA01Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!ULKYVX.BITNET!RDROYA01 From: RDROYA01@ULKYVX.BITNET.UUCP Newsgroups: comp.sys.atari.st Subject: A flush utility for RS232 I/O Message-ID: <8702280226.AA01209@ucbvax.Berkeley.EDU> Date: Fri, 27-Feb-87 12:59:00 EST Article-I.D.: ucbvax.8702280226.AA01209 Posted: Fri Feb 27 12:59:00 1987 Date-Received: Sun, 1-Mar-87 10:46:46 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: University of Louisville Lines: 65