Re: modem dialing

 BBS: Inland Empire Archive
Date: 11-12-92 (18:08)             Number: 357
From: BOB PERKINS                  Refer#: NONE
  To: CHAD KIEFFER                  Recvd: NO  
Subj: Re: modem dialing              Conf: (2) Quik_Bas
 CK> was wondering if anyone could leave me a message with a
 CK> couple of lines of QB45 code that would allow me to dial a
 CK> long distance number, pause for 5 seconds, then dial my
 CK> credit card number.  Please use code not "standard

  Change the "XXX" stuff to the actual numbers, of course.  And you may have
to modify the com port and speed for your modem.  The
timing loop for the 5 seconds is reading the lower bytes of
the system timer instead of using the TIMER function so as
to avoid floating point and to avoid midnight rollover of
the timer value causing a _very_ long loop.  :-)   Since
there are 18.2 ticks per second, and 18.2 * 5 = 91, you can
see where I got the delay value from.

   DECLARE SUB biosdelay (ticks%)
   phonenum$ = "XXX-XXX-XXXX"
   cardnum$ = "XXXXXXXXXXXX"
   OPEN "com1:2400,n,8,1,ds0" FOR RANDOM AS #1
   PRINT "Dialing...";
   PRINT #1, "ATDT"; phonenum$
   biosdelay 91
   PRINT #1, cardnum$
   PRINT : PRINT "Pick up the receiver and press any key!"
   DO: LOOP UNTIL LEN(INKEY$)
   CLOSE
   END

   SUB biosdelay (ticks%)
    DEF SEG = &H40
    DO
      biosticks% = PEEK(&H6C)
      IF biosticks% <> oldticks% THEN
        expired% = expired% + 1
        oldticks% = biosticks%
      END IF
      IF expired% > ticks% THEN EXIT DO
    LOOP
    DEF SEG
   END SUB

--- Msg V4.5
 * Origin: Reciprocity Failure  (1:124/4115.236)
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