BBS: Inland Empire Archive
Date: 02-01-93 (09:53)             Number: 384
From: JOHN GALLAS                  Refer#: NONE
  To: SCOTT DRYSDALE                Recvd: NO  
Subj: CARRIER DETECT                 Conf: (2) Quik_Bas
SD>A problem here that I recently thought is "RING" that might occour during
SD>the hang up time thus resetting it for another three minutes...  Hmm...  I
SD>guess I'll have to put in a check for a "NO CARRIER" string in which case
SD>if the user can type "NO CARRIER" or send it in a macro fast enough it
SD>drops back to the BBS.  You just gave me something to think about,
SD>hopefully I've given you something to think about.

Sounds like quite a problem!  If you want to avoid all that, carrier
detect isn't very hard at all..  Juse use the following function:

FUNCTION Carrier  'returns false if no carrier

BaseAddress = &H3F8  '&H2F8 for com 2

DEF SEG = &H40
Carrier = ((INP(BaseAddress + 6) AND 128) >= &H80)


Then add the following line in your main BBS loop, or better yet in your
modem-inkey$ function (which is probably called quite often):

IF NOT Carrier THEN [restart the BBS]

 * OLX 2.1 TD * New from McAfee: WinScan -- removes all Windows programs.

--- TMail v1.30.4
 * Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
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