home *** CD-ROM | disk | FTP | other *** search
- jmp init
- :get-result
- sample
- if "96" 9600b
- if "48" 2400b
- if "24" 2400b
- if "12" 1200b
- if "3" 300b
- if "VOI" voice
- if "ECT\r" 300b
- if "BUSY" busy
- if "RING" ring
- if "NO" noans
- jmp get-result
- :init
- throttle 20
- trap timeout
- &t= 4
- dtr
- output "\r"
- quiet 100
- ; &b= 38400 ; for Hayes V-Series, HST, etc ONLY!!!
- output "ATX3V1E1\r"
- match "OK\r"
- quiet 100
- ; output"AT\&B1\&H1\&R2\r" ; USR only
- ; match "OK\r" ; USR only
- ; quiet 100 ; USR only
- &t= 90
- output "ATDT &1\r" ; issue dial command and number
- match "&1\r" ; wait til its echoed
- jmp get-result ; go get result
-
- :busy
- message "Busy, redialing ..."
- &t= 60
- output "A/\r"
- jmp get-result
- :ring
- message "Ring!"
- jmp get-result
- :timeout
- message "The modem is dead as a doorknob"
- return 1
- :noans
- message "No connection!"
- return 1
- :voice
- message "Voice!"
- return 1
- :300b
- &a= 300
- jmp connect
- :1200b
- &a= 1200
- jmp connect
- :2400b
- &a= 2400
- jmp connect
- :4800b
- &a= 4800
- jmp connect
- :9600b
- &a= 9600
- jmp connect
- :19200b
- &a= 19200
- :connect
- &b= &a ;set baud rate, or...
- ; &b= 38400 ;locked-rate modems only
-
- message "Connected at &a baud"
- return 0
- :end
-