[comp.sys.mac.comm] Using serial ports with THINK C

hoshino@tkysun.phys.s.u-tokyo.ac.jp (HOSHINO Takashi) (11/08/90)

Does anyone know how to use serial ports with THINK C?
What I want to do is traeting modem as a pseudo file,
i.e. using functions like fopen, fclose, fread, fwrite.

Any comments are welcome. 
Thanks in advance.

HOSHINO Takashi, U of Tokyo, JAPAN
hoshino@is.s.u-tokyo.ac.jp

oster@well.sf.ca.us (David Phillip Oster) (11/10/90)

In article <HOSHINO.90Nov8213125@tkysun.phys.s.u-tokyo.ac.jp> hoshino@tkysun.phys.s.u-tokyo.ac.jp (HOSHINO Takashi) writes:
_>Does anyone know how to use serial ports with THINK C?
_>What I want to do is traeting modem as a pseudo file,
_>i.e. using functions like fopen, fclose, fread, fwrite.
the modem port is fopen(".AIn", "r");
and 	          fopen(".AOut", "w");
the printer port is ".BIn" and ".BOut" respectively. Case is significant
for device drivers (names starting with ".").
The ports default to 9600 baud. Once they are open you can use the Mac-specific
refNum to change their baud rates (i.e., .AIn is always -6 in the calls
documented in the Serial Driver section of Inside Mac.)
-- 
-- David Phillip Oster - Note new signature. Old one has gone Bye Bye.
-- oster@well.sf.ca.us = {backbone}!well!oster