home *** CD-ROM | disk | FTP | other *** search
- ; Dial V1.0 1/2/87 Dial Created
- ; V1.1 3/29/88 Removed baud check, fkeys, ATX4 -> ATX1, add xmit delay
- let v7 = value(character-delay)
- :begin
- let v0=upper(pack(v0))
- if v0="?"
- goto help
- endif
- let v8=value(BAUD)
- if v0="ATH"
- goto hangup
- endif
- if v0=""
- goto usage
- endif
- set character-delay 3
- display "^M^JConfiguring Modem^M^J"
- display "^[&bR"
- wait 0:0:1
- transmit "ATZ^M"
- wait 0:0:2 for "OK"
- if not found
- transmit "+++"
- wait 0:0:2
- endif
- let v9=10
- wait 0:0:1
- transmit "ATX1^M"
- wait 0:0:1 for "OK"
- wait 0:0:1
- :tryagain
- transmit "ATE1Q0V1^M"
- wait 0:0:$9 for "OK"
- let v9=v9+10
- if not found
- if v9<21
- goto tryagain
- else
- display "^M^JThe modem is not responding correctly. Change the baud rate if"
- display "^M^Jit is not a $8 baud modem. Check cabling or try powering modem"
- display "^M^Joff and back on.^M^J"
- goto exit
- endif
- endif
- wait 0:0:1
- display "Dialing Modem^M^J"
- transmit "ATDT$0^M"
- wait 0:0:50 for "CONNECT"
- if not found
- display "Could not connect to remote modem.^M^J"
- display "Check phone number and try again.^M^J"
- goto hangup
- endif
- wait 0:0:2
- display "^M^J^JConnection Established with remote modem.^M^J^M^J"
- transmit "^M"
- goto exit
- :usage
- display "^M^JEnter phone number or '?' for help: "
- accept v0
- :help
- if pack(v0)="?"
- display "^M^J^JDIAL attempts to set a Hayes modem to default operation^M^J"
- display "and dial a number. DIAL may be used from the command line^M^J"
- display "as in the examples below.^M^J^J"
- display " DIAL - Invokes DIAL and prompts for a number^M^J"
- display " DIAL ? - Displays this help screen^M^J"
- display " DIAL ATH - Disconnects (hang up)^M^J"
- display " DIAL 3228047 - Dials the number 322-8047^M^J"
- display " DIAL 9,3228047 - Dials 9 followed by a pause and 322-8047^M^J^J"
- goto exit
- else
- goto begin
- endif
- :hangup
- display "^[&bR"
- wait 0:0:1
- transmit "ATH^M"
- wait 0:0:3 for "OK"
- if not found
- let v9 = -2
- :hangagain
- let v9 = v9 + 4
- wait 0:0:$9
- transmit "+++"
- wait 0:0:$9
- transmit "ATH^M"
- wait 0:0:2 for "OK"
- if not found
- if v9 < 5
- goto hangagain
- else
- display "^M^JThe modem did not respond to a disconnect request.^M^J"
- display "Try powering the modem off and back on.^M^J"
- endif
- endif
- goto exit
- endif
- :exit
- set character-delay $7
- return
-