Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!ll-xn!ames!lll-tis!oodis01!uplherc!sp7040!obie!wes
From: wes@obie.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: RS-232 & MWC:  Help....
Summary: the BIOS aux: routines ARE buffered!
Message-ID: <242@obie.UUCP>
Date: 1 Jun 88 14:32:27 GMT
References: <56200002@bucc2>
Organization: Great Salt Lake Yacht Club, north branch
Lines: 31
Posted: Wed Jun  1 10:32:27 1988

In article <56200002@bucc2>, helix@bucc2.UUCP writes:
> .........  Then, I just changed the routines and used some GDOS functions
> like Cauxin, Cauxout, Cauxis, and Cauxos.  These seem to work fine, but
> they do not use buffers.

Yes, the BIOS aux: port routines are buffered.  The default buffers
are quite small, about 700 bytes if I remember correctly, but adequate
for 1200 baud.  You'll probably want more like 2K if you're going to
use 2400 baud a lot.  The function to change the buffers is Iorec (on
page 350 of the 2.1.7 manual).  Remember to save the old buffer
information and restore it before your program exits.  I wrote a
simple vt52 emulator that sets up 8K input and output buffers, it runs
fine at 19200 baud.

> ..................  I would like to write this BBS so that it doesn't
> use too many system dependent functions.  Is there any way I can access the
> RS-232 port with the standard I/O functions or do I have to stick with 
> GDOS??  Also, I am using the right approach??

The way to do this, as always, is to ISOLATE the machine-dependant
functions.  Write a series of functions for talking to the serial
port, like 'getichar', 'putochar', etc.  Handle EOF in any manner that
seems reasonable.  Then when you move your BBS to another system, just
re-write 'getichar', 'putochar', etc.
-- 
     /|\ 	Barnacle Wes @ Great Salt Lake Yacht Club, north branch
    / | \		     @ J/22 #49, _d_J_i_n_n_i
   /__|__\
   ___|____		"If I could just be sick, I'd be fine."
  (       /		-- Joe Housely,  owner of _E_p_i_d_e_m_i_c --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~