Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!uc!cs.umn.edu!cybrspc!roy From: cybrspc!roy@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: Reading modem registers in C. Keywords: registers, 0x3f8, ats#? Message-ID: Date: 15 Aug 90 22:14:23 GMT References: <10133@hubcap.clemson.edu> Organization: Villa CyberSpace, Minneapolis, MN Lines: 24 rmorris@hubcap.clemson.edu (Robert Morris) writes: > I'm trying to read the registers in a Hayes 2400 modem. I issue a > ATS#? (# - number of the register). I then check 0x3f8 for the value. > What I get is an unlikely result (ie. 13 - number of rings that occurred > and no one called). I figure the 13 is the carriage return sent to the modem > I'm using Turbo C 2.01 and would appreciate any help recieved. I figure you're right. Your modem is most likely sending an ASCII string representing the status of the register, and 0x3f8 will only contain the latest character received from the modem. If you're using a Fossil driver, the problem is easily solved by reading characters waiting in the input buffer (using INT 14h). If not, you'll have to incorporate some kind of input buffering (in effect, a mini-comm program), and read the waiting characters from the buffer. Hope this helps. -- Roy M. Silvernail | #include | Does virtual now available at: | main(){ | reality need cybrspc!roy@cs.umn.edu | float x=1; | swap space? (cyberspace... be here!)| printf("Just my $%.2f.\n",x/50);} | -- me