Carrier detection

 BBS: Inland Empire Archive
Date: 03-15-93 (15:41)             Number: 356
From: DANNY ROBINSON               Refer#: NONE
  To: ROB MCKEE                     Recvd: NO  
Subj: Carrier detection              Conf: (2) Quik_Bas
I tried out your carrier detect routine.  You should look
over it again.  I wrote a small program which will dial the
number to one of my local BBS's and then enter an endless
loop which monitors the carrier using your routine and
prints the result.  It returned 0 even when carrier was
present.
I did rewrite it somewhat, but I don't think I did anything
which would alter the result returned...

DEFINT A-Z
SUB DetectCarrier(cd)

SELECT CASE Port               ' This variable was COMMON SHARED
                               ' throughout the program.  Port=1
CASE 1
b% = &H3F8

CASE 2
b% = &H2F8

CASE 3
b% = &H3E8

CASE 4
b% = &H2E8

END SELECT

cd = ((INP(b%) + 6) AND &H80) > 0
if cd = -1 THEN REM * Carrier detected *

END SUB

Did I do anything wrong?  I would use this routine if it would work.
The fossil carrier detect routine I have works great on
every machine I've tried it on except a friend's Packard
Bell 386SX/16.
It returns carrier=true no matter what.  Could be a dip
switch on the modem, or it could be because it is a non-
standard machine.  I
don't know.  I'd like to have a carrier detect routine that would work on all
systems regardless of standard/non-standard or if a fossil
is loaded or not.

Thanks.  (*Danny*)
---
 * Origin: Someone stole my origin line! (1:2260/9)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET