home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / REFLECT.ZIP / DIAL < prev    next >
Encoding:
Text File  |  1989-03-29  |  2.4 KB  |  102 lines

  1. ; Dial    V1.0  1/2/87   Dial Created
  2. ;    V1.1  3/29/88  Removed baud check, fkeys, ATX4 -> ATX1, add xmit delay
  3. let v7 = value(character-delay)
  4. :begin
  5. let v0=upper(pack(v0))
  6. if v0="?"
  7.   goto help
  8. endif
  9. let v8=value(BAUD)
  10. if v0="ATH"
  11.   goto hangup
  12. endif
  13. if v0=""
  14.   goto usage
  15. endif
  16. set character-delay 3
  17. display "^M^JConfiguring Modem^M^J"
  18. display "^[&bR"
  19. wait 0:0:1
  20. transmit "ATZ^M"
  21. wait 0:0:2 for "OK"
  22. if not found
  23.   transmit "+++"
  24.   wait 0:0:2
  25. endif
  26. let v9=10
  27. wait 0:0:1
  28. transmit "ATX1^M"
  29. wait 0:0:1 for "OK"
  30. wait 0:0:1
  31. :tryagain
  32. transmit "ATE1Q0V1^M"
  33. wait 0:0:$9 for "OK"
  34. let v9=v9+10
  35. if not found
  36.   if v9<21
  37.     goto tryagain
  38.   else
  39. display "^M^JThe modem is not responding correctly.  Change the baud rate if"
  40. display "^M^Jit is not a $8 baud modem.  Check cabling or try powering modem"
  41. display "^M^Joff and back on.^M^J"
  42.     goto exit
  43.   endif
  44. endif
  45. wait 0:0:1
  46. display "Dialing Modem^M^J"
  47. transmit "ATDT$0^M"
  48. wait 0:0:50 for "CONNECT"
  49. if not found
  50.   display "Could not connect to remote modem.^M^J"
  51.   display "Check phone number and try again.^M^J"
  52.   goto hangup
  53. endif
  54. wait 0:0:2
  55. display "^M^J^JConnection Established with remote modem.^M^J^M^J"
  56. transmit "^M"
  57. goto exit
  58. :usage
  59. display "^M^JEnter phone number or '?' for help: "
  60. accept v0
  61. :help
  62. if pack(v0)="?"
  63.   display "^M^J^JDIAL attempts to set a Hayes modem to default operation^M^J"
  64.   display "and dial a number.  DIAL may be used from the command line^M^J"
  65.   display "as in the examples below.^M^J^J"
  66.   display "   DIAL           - Invokes DIAL and prompts for a number^M^J"
  67.   display "   DIAL ?         - Displays this help screen^M^J"
  68.   display "   DIAL ATH       - Disconnects (hang up)^M^J"
  69.   display "   DIAL 3228047   - Dials the number 322-8047^M^J"
  70.   display "   DIAL 9,3228047 - Dials 9 followed by a pause and 322-8047^M^J^J"
  71.   goto exit
  72. else
  73.   goto begin
  74. endif
  75. :hangup
  76. display "^[&bR"
  77. wait 0:0:1
  78. transmit "ATH^M"
  79. wait 0:0:3 for "OK"
  80. if not found
  81.   let v9 = -2
  82.   :hangagain
  83.   let v9 = v9 + 4
  84.   wait 0:0:$9
  85.   transmit "+++"
  86.   wait 0:0:$9
  87.   transmit "ATH^M"
  88.   wait 0:0:2 for "OK"
  89.   if not found
  90.     if v9 < 5
  91.       goto hangagain
  92.     else
  93.       display "^M^JThe modem did not respond to a disconnect request.^M^J"
  94.       display "Try powering the modem off and back on.^M^J"
  95.     endif
  96.   endif
  97.   goto exit
  98. endif
  99. :exit
  100. set character-delay $7
  101. return
  102.