Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.comm Subject: Re: Using serial ports with THINK C Message-ID: <21598@well.sf.ca.us> Date: 10 Nov 90 10:05:28 GMT References: Distribution: comp Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 14 In article 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