Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!topaz.rutgers.edu!wilmott
From: wilmott@topaz.rutgers.edu (Ray Wilmott)
Newsgroups: comp.sys.atari.8bit
Subject: HELP!
Keywords: modem - how do it work?
Message-ID: 
Date: 29 Nov 88 02:41:18 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 47


--------------------

Well it's been well over a year since I tried to do *any* programming
on my 800xl, and now that I decided to try something, I find I need
some major help from all you bright people out in netland. In its
simplest terms my problem is this - how can I *read* data coming
over the modem. Sounds like a dumb question? Okay, here's my
dilemma. I need to have the modem answer the phone, connect to the
machine that's calling me, and then wait for that other machine to
send a specific string of text. When it does, I want my machine to
send a reply. At this point, I have 2 out of 3 parts to the problem
solved. I borrowed a subroutine from a BASIC term program that answers
the phone and connects just fine. After playing around with XIO calls
and consulting "Your Atari Computer", I found the way to send data
just fine (or so my friend at the other end says :-), namely:

OPEN #3,13,0,"R:"
XIO 40,#3,0,0,"R:"
PRINT #3; "Here's my Data!"


Okay all you Atari guru's...how do I READ data now. "INPUT #3,A$"
doesn't do anything (I can see by the modem lights that data is
being sent, but the string always ends up empty). "GET #3, A" results
in either nothing, or the letter "Q" (ascii #81) no matter what data
was being sent.

I realize that I must be overlooking something with the XIO stuff,
but that cryptic XIO command has me so confused! I also realize that
the slowness of Basic is probably a factor, but I only need this to
work at 300 baud, and if need be I would hope that compiled Turbo
Basic would be enough to cover it since the *only* thing the machine
needs to do is sit and read characters being *typed* over the line.
Any help is both desperately needed and *greatly* appreciated.
Thanks a lot all.


			-Ray



wilmott@topaz.rutgers.edu



----------