Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!hplabs!hpda!hpwala!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.sys.ibm.pc Subject: Accessing the comm port with MS C Message-ID: <411@lakart.UUCP> Date: 2 Feb 89 20:19:56 GMT Organization: Lakart Corporation, Newton, MA Lines: 28 I've just been landed with a project to write some software that communicates with the modem and printer ports on a PC. I'm going to be using MS C V5.1, but I have no real idea how to go about writing / reading / testing the state of the ports. I need the following: 1. Check if the modem port has a character to read 2. Get that character 3. Write a character to the modem port 4. Write a character to the printer port Also, if there is any code that needs to be executed to initiate the modem port to run at 9600 (or possibly 19200) BPS, and 8N1, I'd want to know about that too. In addition I'd like to be able to "hook" into some form of system clock tick, to execute a subroutine every 1/100th of a second or so. The exact frequency is not important, but at least once every 1/10th of a second would be desireable. I know the PC has a system clock, but I don't have a clue how to get at it. Please E-mail any answers, I don't usually get to read this group. Thanks in advance, -- dg@pallio.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!pallio!dg +-+-+ | AKA: dg%pallio.uucp@cfisun.cfi.com +---+