home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / NETMAIL / FT4A_IBM.ZIP / DIAL.SCR next >
Encoding:
Text File  |  1989-10-20  |  1.2 KB  |  75 lines

  1.     jmp init
  2. :get-result
  3.     sample
  4.     if "96" 9600b
  5.     if "48" 2400b
  6.     if "24" 2400b
  7.     if "12" 1200b
  8.     if "3" 300b
  9.     if "VOI" voice
  10.     if "ECT\r" 300b
  11.     if "BUSY" busy
  12.     if "RING" ring
  13.     if "NO" noans
  14.     jmp get-result
  15. :init
  16.     throttle 20
  17.     trap timeout
  18.     &t= 4
  19.     dtr
  20.     output "\r"
  21.     quiet 100
  22. ;    &b= 38400        ; for Hayes V-Series, HST, etc ONLY!!!
  23.     output "ATX3V1E1\r"
  24.     match "OK\r"
  25.     quiet 100
  26. ;    output"AT\&B1\&H1\&R2\r" ; USR only
  27. ;    match "OK\r"        ; USR only
  28. ;    quiet 100        ; USR only
  29.     &t= 90
  30.     output "ATDT &1\r"    ; issue dial command and number
  31.     match "&1\r"        ; wait til its echoed
  32.     jmp get-result        ; go get result
  33.  
  34. :busy
  35.     message "Busy, redialing ..."
  36.     &t= 60
  37.     output "A/\r"
  38.     jmp get-result
  39. :ring
  40.     message "Ring!"
  41.     jmp get-result
  42. :timeout
  43.     message "The modem is dead as a doorknob"
  44.     return 1
  45. :noans
  46.     message "No connection!"
  47.     return 1
  48. :voice
  49.     message "Voice!"
  50.     return 1
  51. :300b
  52.     &a= 300
  53.     jmp connect
  54. :1200b
  55.     &a= 1200
  56.     jmp connect
  57. :2400b
  58.     &a= 2400
  59.     jmp connect
  60. :4800b
  61.     &a= 4800
  62.     jmp connect
  63. :9600b
  64.     &a= 9600
  65.     jmp connect
  66. :19200b
  67.     &a= 19200
  68. :connect
  69.     &b= &a            ;set baud rate, or...
  70. ;    &b= 38400        ;locked-rate modems only
  71.  
  72.     message "Connected at &a baud"
  73.     return 0
  74. :end
  75.