home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
MODEMS
/
MODEM
/
MDMFND13.LBR
/
MDMFND13.DQC
/
MDMFND13.DOC
Wrap
Text File
|
2000-06-30
|
3KB
|
55 lines
Date: 1/5/85 MDMFND13.C Modem finder program ver 1.3
I originally wrote this program some time ago as an exercise in
converting a "BASIC lover" friend of mine (who shall remain nameless to
protect the guilty) to C. It's intended as amusement only and should be
used as such!! No .com or .obj file is provided as, it is hoped, if you
are advanced enough to port this program to your computer (as well as have
a C compiler), you are old/mature enough to use it as a novelty and not
for illegal or unethical activity.
Some random notes: After the point was made about C's suitability
for such a program, no further developement was done. This means (1) this
is an early C program of mine so the code can be cleaned up considerably,
(Dennis Ritchie has little to fear for his job from this program) and
(2) no attempt was made to make it bulletproof i.e. its possible (but
not likely on a real smartmodem-more on that later) that the modem will
hang. Some suggested improvements are (1) use numeric codes for reliabil-
ity, and (2) use 1200 baud response codes and note which speed modem ans-
wers in the file.
On so called "Hayes compatible modems": All developement was done
on a Hayes Smartmodem 1200. On a Hayes, if you send the modem a "+++" to
get its attention, you get back an "OK". This can be trapped for and used
to make sure you have its attention before the "ATH" is sent. On a US
Robotics Password, the "+++" actually hangs up the phone. Like a Hayes,
however, the Password will not respond to a "+++" if there is incoming data.
Guess what happens if you hit a long winded dial-up that sends 60 sec. of
hellos-how-are-yous. Your "+++" is ignored and you have no way of knowing
it. Only known modem cure is to put the hangup routine into a loop that
hangs up say 5 times separated by healthy delays. This will minimize the
chance of the modem hanging. Other way (best) is to drop DTR to make it
hang up, but that was beyond the scope of the original program. Understand,
I have never seen a Password instruction book, all I know is what was read
to me over the phone when my new program would hang on a Password, but not
on a Smartmodem (this did neither C's nor my credibility a whole lot of good).
The inclusion of a routine to hang up many times (and hope) took care of the
problem. Perhaps the documentation provided with the Password/Anchor etc.
will be more useful if you have the problem.
Final notes: Last argument is an optional "modem str" i.e. an
initialization string for the modem. 30 secs default for calls makes the
program scan slower than molasses. Cut it to 15 or so and you may miss a modem
or two that doesn't answer until the 6th ring, but you will make it back in
numbers scanned that pick it up on 1st or 2nd ring. If you improve or change
this program, please leave the warning in it and do not provide .com files.
This program is guaranteed to "wowee" any non computer person that has seen
"War Games". Never again will they ask you what could you possibly want with
a home computer! Original source is Q/C, (recommended, by the way) but should
be portable to any other with little effort.
Tom Burnett
Vacaville,Ca.
data (707 425-2277)
my only connection with above RCP/M is as a user