;
;ADDITIONAL MODEM ENTRIES
;
;  This appendix contains a source listing of entries for additional modems
;  that are not supported. They can be added to your active Sys.Modems 
;  file as needed. Entries for additional modems are not kept as current with 
;  manufacturers' changes as are those of the supported modems.)  These 
;  additional modems have been configured by using the ModemGen feature of  
;  the Modem Service.
;
;Additional Modems (not supported):
;
;    Cermetek InfoMate 212A
;    Codex:  2232 or 224 with ACU
;    Concord 224 (Answer only)
;    Concord 224 (Autodial)
;    Dataplex DPX224                       (added R5.2)
;    NEC N212BR
;    Okidata 1200 
;    Paradyne 2612
;    RacalVadic 3451
;    RacalVadic VI1222
;    Rixon R212A
;	 TELiNDUS ASTER 3                      (revised R5.3)
;	 TELiNDUS ASTER 4                      (revised R5.3)
;    Universal Data Systems 212AD
;    VenTel MDC2123L (with WECO option)
;    VenTel MD212 PLUS II
; 
;  __________________________________________________
;  Cermetek InfoMate 212A (Additional)
;  __________________________________________________
{Cermetek}
      ; Cermetek InfoMate 212A
[Reset_Modem]
  :DropAndRaiseDTR:2
  :SendString:' '
  :Delay:1
  :SendString:' '
  :Delay:1
  :SendString:'XY'
      ; here we send 2 space characters and XY to
      ; train the modem for right parity.In
      ; Bizcomp this is done by sending two CR.
  :Delay:1
      ; delay 1 second
  :SendString:0Eh,'U'
      ; send unlisten command    ; this is the same as
      ; STX X in Bizcomp for transparent mode.
  :Delay:1
  :SendString:' 1',0Dh
      ; continuation of unlisten command
  :IgnoreStringEndingWithCharacter:0Dh
      ; modem response with CR
  :Finish:

[Wait_For_Call]
  :WaitNoStringReturn:
      ; starting point for waiting to be called
      ; as the modem will not response with any
      ; characters when connected, we have to use
      ; WaitNoStringReturn
  :OnLine:
  :Finish:
 
[Make_A_Call]
  :SendString:0Eh,'D'
  :Delay:1
  :SendString:' ',27h
      ; initiate dialing process by sending D
  :MapPhoneNumberAndDial:'A'
      ; maps telephone number and dial
  :SendString:27h
  :Delay:1
  :SendString:0Dh
      ; ends with a CR to start dialing process
  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the first string that returns
  :SaveStringEndingWithCharacter:0Dh
      ; save the next string
  :CompareWithSavedString:'A',0Ah,0Dh
      ; compare with A,LF,CR
  :JumpIfCompareNotEqual:2
      ; if not equal then is not connected
      ; so go to finish
  :Delay:2
  :OnLine:
      ; delay for 2 seconds before going online
  :Finish:
 
;  __________________________________________________
;  Codex:  2232 or 224 with ACU (Additional)
;  __________________________________________________
{Codex}
      ; Codex 2232 or 224 with ACU
      ; Codex 2232 or 224 with ACU
[Reset_Modem]
  :DropAndRaiseDTR:2 
  :SendString:05,0Dh
      ; sends CntlE CR to get attention
  :IgnoreStringEndingWithCharacter:'*'
      ; the following programs the needed options
  :SendString:'O 1 3',0Dh
      ; reset to factory options
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'O 1 2',0Dh
      ; enable option change
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'O 21 2',0Dh
      ; disable Local Copy
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'O 16 2',0Dh
      ; normal DCD
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
 
  :SendString:'O 20 2',0Dh
      ; disable Local Copy
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'O 27 2',0Dh
      ; wait 4 seconds for dial tone
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'O 28 2',0Dh
      ; pause 6 seconds for Tandem dial tone
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'I',0Dh
      ; sends IDLE command to modem
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :Finish:

[Wait_For_Call]
  :WaitNoStringReturn:
  :OnLine:  
  :Finish:
 
[Make_A_Call]
  :Delay:2
  :SendString:05,0Dh
      ; sends CntlE, CR to get attention
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'D '
      ; sends D to initiate dialing:SendStringIfToneDial:'T'
  :Delay:1
  :MapPhoneNumberAndDial:'K','K'
      ; map phone number, pause character is K
  :Delay:1
  :SendString:0Dh
      ; here we are just ignoring strings
      ; returned from modem
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'LING',0Dh,0Ah
      ; expect 'DIALING'
  :JumpIfCompareEqual:1
  :AbortWithErrorCode:'10552'
  :Delay:2
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'TONE',0Dh,0Ah
      ; expect 'ANSWER TONE'
  :JumpIfCompareEqual:1
  :AbortWithErrorCode:'10551'
      ; No Answer
 
  :Delay:2
  :SaveStringEndingWithCharacter:07h
  :CompareWithSavedString:'LINE',0Dh,0Ah
      ; finally we are going to compare with
      ; ONLINE CR,LF
  :JumpIfCompareNotEqual:3
      ; if not equal then jumps 3 commands
  :Delay:2
  :OnLine:
  :Finish:
  :IgnoreStringEndingWithCharacter:'*'
      ; here we have to make the modem IDLE again
      ; as the modem is not connected
  :SendString:'I',0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :Finish:
 
;  __________________________________________________
;  Concord 224 (Answer only)   (Additional)
;  __________________________________________________
{ConcordAns}
      ; Concord 224 (Answer only)

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 seconds then raise DTR again
  :Finish:
      ; reset modem completed

[Wait_For_Call]
  :WaitNoStringReturn:
  :OnLine: 
  :Finish:

[Make_A_Call]
  :AbortWithErrorCode:'10552'
      ; note no auto dial in this modem
  :Finish:
 
;  __________________________________________________
;  Concord 224 (Autodial) (Additional)
;  __________________________________________________
{Concord}
      ; Concord 224 (Autodial)

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 sec then raise DTR again
  :SendString:0Dh
  :Delay:1
      ; delay 1 second
  :SendString:0Dh
  :Delay:1
      ; delay 1 second
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:'>'
      ; return string CDS >
  :IgnoreStringEndingWithCharacter:' '
      ; ends with a space
  :Finish:
      ; reset modem completed

[Wait_For_Call]

  :SendString:'E'
      ; exit to wait for call
  :Delay:1
  :SendString:0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :WaitNoStringReturn:
  :OnLine: 
  :Finish:
 
[Make_A_Call]
  :SendString:'D '
      ; dial please
  :Delay:1
  :SendString:'M'
      ; use as needed tone or pulse
  :MapPhoneNumberAndDial:'W'
      ; put out the number
  :Delay:1
  :SendString:0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :Delay:3
  :IgnoreStringEndingWithCharacter:07h
      ; gets the bell character
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:' ',0Dh,0Ah
      ; compare INITIATING
  :JumpIfCompareNotEqual:3
  :IgnoreStringEndingWithCharacter:'>'
      ; return string CDS >
  :IgnoreStringEndingWithCharacter:' '
  :AbortWithErrorCode:'10552'
  :Delay:8
  :OnLine:
  :Finish:

;
;Dataplex DPX224 12002400       
;
;

 {DATAPLEX}
; 
;{Hayes} Modified by Dave MillerSteve Jacob  UNISYS Australia
;
; This script is written for 2400 bps. To use at 1200 see 
; SPEED NOTE in Reset_Modem and 
; change the three 'CONNECT 2400' strings to 'CONNECT 1200' in Make_A_Call
;

[Reset_Modem]

        :DropAndRaiseDTR:3
		;Drop DTR, wait then raise DTR again
	:Delay:6
	:SendString:'ATFF5X6D2C1P1K0V1S0=1S7=15S36=3W'0Dh 
		;Load modem configuration
		;SPEED NOTE: To run at 1200 bps change FF5X in above string to FF4X

	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'OK',0Dh,0Ah
		;Config loaded OK
	:JumpIfCompareEqual:2

	:IgnoreStringEndingWithCharacter:0Ah
	:IgnoreStringEndingWithCharacter:0Ah
		;Ignore 'OK'

	;Delay:4
        :Finish:
		; Reset Complete

[Wait_For_call]

	:Delay:3
	:WaitStringReturn:
		; Wait for the phone to Ring
	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'RING',0Dh,0Ah
		; 'RING'
	:JumpIfCompareNotEqual:5

	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'00',0Dh,0Ah
		; 'CONNECT xx00'
	:JumpIfCompareNotEqual:1
	:Delay:10
	:OnLine:
	:Finish:

[Make_A_Call]

 	:Delay:1
	:SendString:'ATDU'
		; Initiate Dialing (Modem will retry 3 times)
 	:Delay:1
	:MapPhoneNumberAndDial:','
		; The Comma is The Pause Character
		; There is no Delay Character
	:SendString:0Dh
		; Starts Dialing process

	:IgnoreStringEndingWithCharacter:0Ah
 	:IgnoreStringEndingWithCharacter:0Ah             
	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'CONNECT 2400',0Dh,0Ah
		; 'CONNECT 2400'
	:JumpIfCompareEqual:16       ;Connect is successfull

	:IgnoreStringEndingWithCharacter:0Ah   ;Modem trying again
 	:IgnoreStringEndingWithCharacter:0Ah             
	:IgnoreStringEndingWithCharacter:0Ah
 	:IgnoreStringEndingWithCharacter:0Ah             
	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'CONNECT 2400',0Dh,0Ah
		; 'CONNECT 2400'
	:JumpIfCompareEqual:8        ;Connect is successfull

	:IgnoreStringEndingWithCharacter:0Ah   ;Modem is trying again
 	:IgnoreStringEndingWithCharacter:0Ah             
	:IgnoreStringEndingWithCharacter:0Ah
 	:IgnoreStringEndingWithCharacter:0Ah             
	:IgnoreStringEndingWithCharacter:0Ah
	:SaveStringEndingWithCharacter:0Ah
	:CompareWithSavedString:'CONNECT 2400',0Dh,0Ah
		; 'CONNECT 2400'
	:JumpIfCompareNotEqual:2     ;Connect is not successfull

	:Delay:1
	:OnLine:                 ;We are online

	:Delay:1
	:Finish:
; 
;  __________________________________________________
;  NEC N212BR   (Additional)
;  __________________________________________________
{NEC}
      ; NEC N212BR

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 secs then raise DTR again
  :SendString:0Dh
  :Delay:2
      ; delay 1 second
  :SendString:0Dh
  :Delay:1
      ; delay 1 second
  :IgnoreStringEndingWithCharacter:''
  :Finish:
      ;reset modem completed

[Wait_For_Call]
  :SendString:'Q'
  :Delay:1
  :SendString:'Y'

      ; send Q for QUIT and response with Yes
  :IgnoreStringEndingWithCharacter:0Ah
      ; ignore string from modem
  :WaitNoStringReturn:
  :OnLine:
  :Finish:

[Make_A_Call]
  :SendString:'K'
      ; sends K to initiate dialing
  :Delay:1
  :IgnoreStringEndingWithCharacter:0Ah
 
  :MapPhoneNumberAndDial:'$',''
  :SendString:0Dh
      ; starts dialing process
  :Delay:1
  :IgnoreStringEndingWithCharacter:0Ah
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'DIALING',0Dh,0Ah
      ; see if it is response string TONEPULSE DIALNG
  :JumpIfCompareNotEqual:5
      ; if not then this is an earlier version of NEC
  :SaveStringEndingWithCharacter:0Ah
      ; save string ending with LF
  :CompareWithSavedString:'$',0Dh,0Ah
      ; now we look and see phone number has pause
      ; character
  :JumpIfCompareNotEqual:2
      ; if not equal then this string is result
  :IgnoreStringEndingWithCharacter:0Ah
      ; ignore second TONEPULSE DIALING response
  :SaveStringEndingWithCharacter:0Ah
      ; and save again the result string from modem
  :CompareWithSavedString:'ABORTED',0Dh,0Ah
  :JumpIfCompareNotEqual:1
  :AbortWithErrorCode:'10552'
  :Delay:2
  :OnLine:
  :Finish:
 
;  __________________________________________________
;  Okidata 1200 (Additional)
;  __________________________________________________
{Okidata}
      ; Okidata 1200 modem

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 sec then raise DTR again
  :SendString:'ATZ',0Dh
  :Delay:3
      ; initializing takes some time
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; ignore the 'OK'  
  :SendString:'ATM0',0Dh      
      ; set the speaker off
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah

      ;ignore the 'OK'
  :SendString:'ATS2=128',0Dh
      ; Disable escape sequence so we can        
      ; read data which might contain the        
      ; escape sequence.
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK'       
  :SendString:'ATS0=1',0Dh
      ; Answer after 1 ring 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK'       
  :SendString:'ATS9=4',0Dh
      ; Set carrier detect delay to .4 sec 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK'       
  :SendString:'ATS7=60',0Dh
      ; Set wait for carrier detect delay to 6 sec 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK'       
  :SendString:'ATS10=50',0Dh
      ; Set carrier drop check for 5 sec 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK'       
  :SendString:'ATS7=60',0Dh
      ; wait time for carrier 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ;ignore the 'OK        
  :Finish:
      ;reset modem completed

[Wait_For_Call]
  :WaitStringReturn:
      ; WAIT FOR THE PHONE TO RING
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; Ignore the first 'Ring' echo
  :Delay:3     
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; Ignore the 'Connect' response
  :OnLine:     
  :Finish:
  
[Make_A_Call]
  :SendString:'ATDT'
      ; initiate dialing
  :Delay:1
  :MapPhoneNumberAndDial:','
      ;  The comma is the pause character        
      ;  There is no delay character        
  :Delay:1 
  :SendString:0Dh

      ; starts dialing process
  :Delay:2
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; Ignore the 'Connect' response       
  :Delay:5     
  :OnLine:     
  :Finish:
 
;  __________________________________________________
;  Paradyne 2612 (Additional)
;  __________________________________________________
{Paradyne}
      ; Paradyne 2612

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 sec then raise DTR again
  :SendString:'I',0Dh
  :Delay:3
      ; initializing takes some time
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah       
  :SendString:'M',0Dh
      ; data mode
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :Finish:
      ;reset modem completed

[Wait_For_Call]
  :WaitStringReturn:
      ; WAIT FOR THE PHONE TO RING
  :IgnoreStringEndingWithCharacter:0Ah
  :SaveStringEndingWithCharacter:0Ah
      ; SAVE RING IN
  :CompareWithSavedString:'RING IN',0Dh,0Ah
  :JumpIfCompareNotEqual:8
  :IgnoreStringEndingWithCharacter:0Ah
  :Delay:1
  :SendString:'a'
      ; answer the call
  :Delay:1
  :SendString:','
  :Delay:1
 
  :SendString:'u 0',0Dh
      ; important ....here we don't send out
      ; in one chunk, as the modem cannot handle it
      ; same as a,u 0 in one line
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :SaveStringEndingWithCharacter:0Ah
      ; SAVE THE CONNECT
  :CompareWithSavedString:'CONNECT',0Dh,0Ah
  :JumpIfCompareNotEqual:2
  :IgnoreStringEndingWithCharacter:0Ah
      ; DISREGARD

  :OnLine:
  :Finish:

[Make_A_Call]
  :SendString:'d '
      ; sends D to initiate dialing
  :Delay:2
  :MapPhoneNumberAndDial:'P','W'
  :Delay:1
  :SendString:0Dh
      ; starts dialing process
  :Delay:2
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; ignore echo lines
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'RING',0Dh,0Ah
  :JumpIfCompareNotEqual:10
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'RING',0Dh,0Ah
  :JumpIfCompareNotEqual:7
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'RING',0Dh,0Ah
  :JumpIfCompareNotEqual:4
 
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'RING',0Dh,0Ah
  :JumpIfCompareNotEqual:1
      ; up to 4 rings
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'CONNECT',0Dh,0Ah
  :JumpIfCompareNotEqual:9
  :IgnoreStringEndingWithCharacter:0Ah
  :SendString:'u '
  :Delay:2
  :SendString:'0',0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :Delay:2
  :OnLine:
  :Finish:
 
;  __________________________________________________
;  RacalVadic 3451  (Additional)
;  __________________________________________________
{Vadic3451}
      ; RacalVadic 3451

[Reset_Modem]
  :DropAndRaiseDTR:2 
  :SendString:05,0Dh
      ; sends CntrlE CR to get attention
  :Delay:1
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'I',0Dh
      ; sends IDLE command to modem
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'LE',0Dh,0Ah

      ; look for response (IDLECR,LF)
  :Finish:

[Wait_For_Call]
  :WaitNoStringReturn:
  :OnLine:
  :Finish:

[Make_A_Call]
  :Delay:2
  :SendString:05,0Dh
      ; sends CntrlE, CR to get attention
  :Delay:1
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:'*'
  :SendString:'D',0Dh
      ; sends D to initiate dialing
  :IgnoreStringEndingWithCharacter:0Ah
      ; Ignore NUMBER?
 
  :MapPhoneNumberAndDial:'K'
      ; map telephone number    ; pause character is K
  :SendString:0Dh
  :IgnoreStringEndingWithCharacter:0Ah
      ; ignore echoed telephone number
  :SendString:0Dh
      ; invoke echoed number
  :SaveStringEndingWithCharacter:0Ah
      ; save DIALING:  ON LINE
      ; or   DIALING:  FAILED CALL
  :CompareWithSavedString:'LINE',0Dh,0Ah
      ; finally we are going to compare with
      ; ONLINE CR,LF
  :JumpIfCompareNotEqual:2
      ; if not equal then skip 2 commands
  :Delay:2
  :OnLine:
  :IgnoreStringEndingWithCharacter:'*'
      ; here we have to make the modem IDLE again
      ; as the modem is not connected
  :SendString:'I',0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :Finish:
 
;  __________________________________________________
;  RacalVadic VI1222 (Additional)
;  __________________________________________________
{VI1222}
      ; RacalVadic VI1222

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 sec then raise DTR again
  :Delay:1
  :Finish:
      ;reset modem completed

[Wait_For_Call]
  :WaitNoStringReturn:
      ; WAIT FOR THE PHONE TO RING
  :OnLine:
  :Delay:1

  :Finish:

[Make_A_Call]
  :SendString:82h
      ; get dialer ready
  :Delay:2
  :IgnoreStringEndingWithCharacter:0Ah
  :Delay:2
  :MapPhoneNumberAndDial:
      ; there is no pause character
  :Delay:2
  :SendString:83h
      ; starts dialing process
  :IgnoreStringEndingWithCharacter:03h
      ; ignore the 'Connect' response
  :Delay:2
  :OnLine:
  :Finish:
 
;  __________________________________________________
;  Rixon R212A  (Additional)
;  _________________________________________________
{Rixon}
      ; Rixon R212A

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drops DTR wait 2 sec then raise DTR again
  :SendString:'ATB10001000',0Dh
      ; reset the modem
  :IgnoreStringEndingWithCharacter:0Dh
  :Delay:2
  :SendString:'ATZ',0Dh
      ; reset the modem
  :Delay:2
      ; initializing takes some time
  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the 'OK' (0)
  :Delay:2
  :SendString:'ATS2=128',0Dh
      ; disable escape sequence so we can
      ; read data which might contain the
      ; escape sequence
  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the 'OK'
  :SendString:'ATS0=1',0Dh
      ; answer after 1 ring
  :IgnoreStringEndingWithCharacter:0Dh
  :SendString:'ATF1',0Dh
      ; set no echo in data mode
  :Delay:1
      ; initializing takes some time
  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the 'OK' (0)
  :Finish:
      ; reset modem completed

[Wait_For_Call]
  :WaitStringReturn:
      ; WAIT FOR THE PHONE TO RING

  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the first 'Ring' echo
  :Delay:3
  :IgnoreStringEndingWithCharacter:0Dh
      ; ignore the 'Connect' response
  :OnLine:
  :Finish:

[Make_A_Call]
  :SendString:'ATDT'
      ; initiate dialing
  :Delay:1
  :MapPhoneNumberAndDial:','
      ; the comma is the pause character
      ; there is no delay character
  :Delay:1
  :SendString:0Dh
      ; starts dialing process
  :Delay:2
  :SaveStringEndingWithCharacter:0Dh
      ; ignore the 'Connect' response
  :CompareWithSavedString:'1',0Dh
  :JumpIfCompareNotEqual:2
  :Delay:2
  :OnLine:
  :Finish:


;
;


;**************************** MODEM PROFILE HEADER *************************;
;*                                                                         *;
;*  MODEM:             TELiNDUS ASTER 3                                    *;
;*                                                                         *;
;*  CREATED:   Kris Van Bogaert                                            *;
;*             UNISYS BELGIUM CSE SUPPORT                                  *;
;*             Zaventem May 04, 1992                                       *;
;*                                                                         *;
;*                                                                         *;
;*  DESCRIPTION:                                                           *;
;*                                                                         *;
;*  TELiNDUS ASTER 3 modem with autodialler (Hayes commands)              *;
;*                                                                         *;
;*  This script supports the following modem features:                     *;
;*                                                                         *;
;*      automatic speed detection                                         *;
;*      compression and error correction                                  *;
;*      Callback with password exchange                                   *;
;*                                                                         *;
;*                                                                         *;
;*  WARNING                                                                *;
;*  Configuring the modem to use error correction and data compression     *;
;*  protocols (both MNP and V.42) may cause problems when attempting to    *;
;*  to establish a link with modems not supporting these protocols.        *;
;*                                                                         *;
;*  The Aster 3 modem does not support any ATcommands to disable          *;
;*  error correction and data compression temporarily.                     *;
;*                                                                         *;
;*                                                                         *;
;*  If the modem has been setup for callback with password exchange and    *;
;*  you call a non Aster3Aster4 modem you have to disable this feature    *;
;*  by appending a '?' to the number to dial.                              *;
;*                                                                         *;
;*                                                                         *;
;*                                                                         *;
;* HISTORY:                                                                *;
;*                                                                         *;
;* MMDDYY VVVVMM  PROGRAMMER     DESCRIPTION                           *;
;*                                                                         *;
;* 072693 5.2.07   K. Van Bogaert Include the above warning concerning  *;
;*                                   modems that do not support MNP and    *;
;*                                   V.42.                                 *;
;*                                                                         *;
;* 050492 5.1.0500 K. Van Bogaert Add Telindus Aster 3 modem profile    *;
;*                                                                         *;
;*                                                                         *;
;*                                                                         *;
;*********************** END OF MODEM PROFILE HEADER ***********************;

{Aster3}
;
  [Reset_Modem]

    :DropAndRaiseDTR:2
        ; drops DTR wait 2 sec then raise DTR again
    :Delay:2


    ;****************************************************************
    ;
    ;    Reset the modem:
    ;
    ;       ATZ = AT E1 Q0 V1 X0 S3=13 S4=10 S5=8 <CR>
    ;    
    ;       AT E1     : Echo enabled
    ;       AT Q0     : Enable result codes
    ;       AT V1     : Long form result codes (verbose)
    ;       AT X0     : Enable result codes 0 through 4
    ;                       (OK, CONNECT, RING, NO CARRIER, ERROR)
    ;       AT S3=13  : Carriage return character
    ;       AT S4=10  : Line feed character
    ;       AT S5=8   : Back space character
    ;
    ;****************************************************************

    :SendString:'ATZ',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
        ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;    Enable result codes.
    ;        (OK, CONNECT, RING, NO CARRIER, ERROR, CONNECT 1200,
    ;         NO DIALTONE, BUSY, CONNECT 600, CONNECT 2400,
    ;         CONNECT 4800, CONNECT 9600, CONNECT 19200,
    ;         CONNECT 120075, CONNECT 751200)
    ;
    ;****************************************************************

    :SendString:'ATX4',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
       ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;    Turn speaker on if placing a call and turn it off after
    ;    detection of the 2100 Hz answering tone.
    ;
    ;****************************************************************

    :SendString:'ATM1',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
       ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;   Disable escape sequence so we can read data which might
    ;    contain the escape sequence. (S2 = 128)
    ;
    ;   Answer after 1 ring. (S0 = 1)
    ;
    ;   Delay character (comma) causes a delay of 10 seconds. (S8 = 10)
    ;
    ;   Set loss of carrier delay to 10 seconds. (S10 = 100)
    ;
    ;****************************************************************

     :SendString:'ATS2=128 S0=1 S8=10 S10=100',0Dh
     :IgnoreStringEndingWithCharacter:0Ah
     :IgnoreStringEndingWithCharacter:0Ah
        ; Ignore the 'OK'

    :SetLineControl:2
    :Finish:
        ;reset modem completed


  [Wait_For_Call]

    :WaitForCarrier:
    :OnLine:
    :Finish:


  [Make_A_Call]

    :SendString:'ATD'
        ; initiate dialling

    :MapPhoneNumberAndDial:'@,'
        ; The @ is the pause character
        ; The comma is the delay character

    :SendString:0Dh
        ; starts dialling process

    :IgnoreStringEndingWithCharacter:0Ah
    :SaveStringEndingWithCharacter:0Ah
        ; Wait for modem response.


        ; If 'OK', then we will be called back by the remote modem.
    :CompareWithSavedString:'OK', 0Dh, 0Ah
    :JumpIfCompareNotEqual:2
        ; WAIT FOR THE PHONE TO RING
    :IgnoreStringEndingWithCharacter:0Ah
    :SaveStringEndingWithCharacter:0Ah



        ; If no dial tone, abort with erc 11274
    :CompareWithSavedString:'TONE', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'11274'

        ; If busy response, abort with erc 10570
    :CompareWithSavedString:'BUSY', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'10570'

        ; Check for a 'CONNECT 1200, 2400, etc...' response
    :CompareWithSavedString:'00', 0Dh, 0Ah
    :JumpIfCompareEqual:1
    :AbortWithErrorCode:'10572'

    :Delay:3
    :OnLine:
    :Finish:


;

;**************************** MODEM PROFILE HEADER *************************;
;*                                                                         *;
;*  MODEM:             TELiNDUS ASTER 4                                    *;
;*  CONTROL FIRMWARE:  rev T94000A05                                       *;
;*  DSP FIRMWARE:      rev       *48                                       *;
;*                                                                         *;
;*                                                                         *;
;*  CREATED:   Kris Van Bogaert                                            *;
;*             UNISYS BELGIUM CSE SUPPORT                                  *;
;*             Zaventem May 18, 1992                                       *;
;*                                                                         *;
;*                                                                         *;
;*  DESCRIPTION:                                                           *;
;*                                                                         *;
;*  TELiNDUS ASTER 4 modem with autodialler (Hayes commands)              *;
;*                                                                         *;
;*  This script supports the following modem features:                     *;
;*                                                                         *;
;*      automatic speed detection                                         *;
;*      compression and error correction                                  *;
;*                                                                         *;
;*      By inserting AT commands before a phone number, the modem may be  *;
;*       forced to use a specific PSTN speed, no compression andor no     *;
;*       error correction.  This is very useful when certain connections   *;
;*       fail due to the error correction negotiation or when connecting   *;
;*       to a modem whose speed is not recognized.                         *;
;*                                                                         *;
;*      Callback with password exchange                                   *;
;*                                                                         *;
;*                                                                         *;
;*  WARNING                                                                *;
;*  Configuring the modem to use error correction and data compression     *;
;*  protocols (both MNP and V.42) may cause problems when attempting to    *;
;*  to establish a link with modems not supporting these protocols.        *;
;*                                                                         *;
;*  The following guidelines will work with many older non MNP or V.42     *;
;*  modems.                                                                *;
;*                                                                         *;
;*  When CALLING a modem known to not support these protocols:             *;
;*     Add the following before the number to dial                         *;
;*                                                                         *;
;*         <bs>\N0C0D                                                     *;
;*                                                                         *;
;*         <bs> = backspace = 08h                                          *;
;*                                                                         *;
;*                                                                         *;
;*  Additionally, if the modem has been setup for callback with password   *;
;*  exchange you have to disable this feature by appending a '?' to the    *;
;*  number to dial.                                                        *;
;*                                                                         *;
;*                                                                         *;
;*                                                                         *;
;* HISTORY:                                                                *;
;*                                                                         *;
;* MMDDYY VVVVMM  PROGRAMMER     DESCRIPTION                           *;
;*                                                                         *;
;* 072693 5.2.07   K. Van Bogaert Include the above warning concerning  *;
;*                                   modems that do not support MNP and    *;
;*                                   V.42.                                 *;
;*                                                                         *;
;* 082892 5.1.0500 K. Van Bogaert Upgraded from Control Firmware        *;
;*                                   rev T94000A03 to T94000A05.           *;
;*                                                                         *;
;* 051892 5.1.0500 K. Van Bogaert Add Telindus Aster 4 modem profile    *;
;*                                                                         *;
;*                                                                         *;
;*                                                                         *;
;*********************** END OF MODEM PROFILE HEADER ***********************;

{Aster4}
;
;
  [Reset_Modem]

    :DropAndRaiseDTR:2
        ; drops DTR wait 2 sec then raise DTR again
    :Delay:2


    ;****************************************************************
    ;
    ;    Select the current user profile
    ;
    ;****************************************************************
    ;
    ; NOTES:  Below PROM level A05 the Aster 4 does not support the ATZ255
    ;          command (load the CURRENT USER PROFILE as setup thru the
    ;          modem's keyboard).
    ;
    ;         Below PROM level A04 the Aster 4 does not reply with 'OK' after
    ;          executing the ATZn command (where n is 1 or 2).
    ;
    ;          Therefore, the lines below must match the PROM level being used.
    ;
    ;
    ;          PROM rev T94000A03:
    ;          
    ;
    ;               :SendString:'ATZ1',0Dh
    ;               :Delay:5
    ;                   ; initializing takes some time
    ;               :IgnoreStringEndingWithCharacter:0Ah
    ;                   ; Ignore the 'OK'
    ;
    ;
    ;          PROM rev T94000A04:
    ;          
    ;
    ;               :SendString:'ATZ1',0Dh
    ;               :IgnoreStringEndingWithCharacter:0Ah
    ;               :IgnoreStringEndingWithCharacter:0Ah
    ;                   ; Ignore the 'OK'
    ;
    ;
    ;          PROM rev T94000A05:
    ;          
    ;
    ;               :SendString:'ATZ255',0Dh
    ;               :IgnoreStringEndingWithCharacter:0Ah
    ;               :IgnoreStringEndingWithCharacter:0Ah
    ;                   ; Ignore the 'OK'
    ;
    ;****************************************************************


    :SendString:'ATZ255',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
        ; Ignore the 'OK'



    ;****************************************************************
    ;
    ;    Reset the modem:
    ;
    ;       ATZ = AT Q0 V1 W0 X0 E1 S3=13 S4=10 S5=8 S6=* S8=* S10=* <CR>
    ;    
    ;       AT Q0     : Enable result codes
    ;       AT V1     : Long form result codes (verbose)
    ;       AT W0     : Modem returns CONNECT DTE speed
    ;       AT X0     : Enable result codes 0 through 4
    ;                       (OK, CONNECT, RING, NO CARRIER, ERROR)
    ;       AT E1     : Echo enabled
    ;       AT S3=13  : Carriage return character
    ;       AT S4=10  : Line feed character
    ;       AT S5=8   : Back space character
    ;       AT S6=*   : 'Wait for dial tone before blind dialling' delay
    ;       AT S8=*   : Pause time for comma dial modifier
    ;       AT S10=*  : Carrier disconnect time
    ;
    ;
    ;      (* = Country dependent)
    ;
    ;****************************************************************

    :SendString:'ATZ',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
        ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;   Enable result codes.
    ;        (OK, CONNECT, RING, NO CARRIER, ERROR, CONNECT 1200,
    ;         NO DIALTONE, BUSY, CONNECT 600, CONNECT 2400,
    ;         CONNECT 4800, CONNECT 9600, CONNECT 19200,
    ;         CONNECT 120075, CONNECT 751200)
    ;
    ;   Return 'CONNECT DCE speed' instead of 'CONNECT DTE speed'
    ;
    ;****************************************************************

    :SendString:'ATX4 W2',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
       ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;    Turn speaker on if placing a call and turn it off after
    ;    detection of the 2100 Hz answering tone.
    ;
    ;****************************************************************

    :SendString:'ATM1',0Dh
    :IgnoreStringEndingWithCharacter:0Ah
    :IgnoreStringEndingWithCharacter:0Ah
       ; Ignore the 'OK'


    ;****************************************************************
    ;
    ;   Disable escape sequence so we can read data which might
    ;    contain the escape sequence. (S2 = 128)
    ;
    ;   Answer after 1 ring. (S0 = 1)
    ;
    ;   Delay character (comma) causes a delay of 10 seconds. (S8 = 10)
    ;
    ;   Set loss of carrier delay to 10 seconds. (S10 = 100)
    ;
    ;****************************************************************

     :SendString:'ATS2=128 S0=1 S8=10 S10=100',0Dh
     :IgnoreStringEndingWithCharacter:0Ah
     :IgnoreStringEndingWithCharacter:0Ah
        ; Ignore the 'OK'

    :SetLineControl:2
    :Finish:
        ;reset modem completed


  [Wait_For_Call]

    :WaitForCarrier:
    :OnLine:
    :Finish:


  [Make_A_Call]

    :SendString:'ATD'
        ; initiate dialling

    :MapPhoneNumberAndDial:'$,'
        ; The $ is the pause character
        ; The comma is the delay character

    :SendString:0Dh
        ; starts dialling process

    :IgnoreStringEndingWithCharacter:0Ah
    :SaveStringEndingWithCharacter:0Ah
        ; Wait for modem response.



        ; If no dial tone, abort with erc 11274
    :CompareWithSavedString:'TONE', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'11274'

        ; If busy response, abort with erc 10570
    :CompareWithSavedString:'BUSY', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'10570'

        ; If 'ERROR', we exchanged a bad or no password.  So abort with erc 219
    :CompareWithSavedString:'ERROR', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'219'

        ; Check for a 'CONNECT 1200, 2400, etc...' response
    :CompareWithSavedString:'00', 0Dh, 0Ah
    :JumpIfCompareEqual:1
    :AbortWithErrorCode:'10572'  ; No anwser

        ; The DCE speed must be at least 1200 baud
    :CompareWithSavedString:'CONNECT 600', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'10299'


    :Delay:3
    :OnLine:
    :Finish:

;


 
;  __________________________________________________
;  Universal Data Systems 212AD   (Additional)
;  __________________________________________________
{UDS}
      ; Universal Data Systems 212AD

[Reset_Modem]
  :DropAndRaiseDTR:2
      ; drop DTR wait 2 seconds then raise DTR again
  :Delay:1
  :SendString:'E','N'
  :IgnoreStringEndingWithCharacter:':'
  :Finish:
      ; reset modem completed

[Wait_For_Call]
  :WaitNoStringReturn:
      ; WAIT FOR THE PHONE TO RING
  :OnLine:
  :Delay:1
  :Finish:

[Make_A_Call]
  :SendString:'D'
      ; get dialer ready
  :Delay:2
  :IgnoreStringEndingWithCharacter:20h
      ;modem responds with space character
  :Delay:2
  :MapPhoneNumberAndDial:'W','D'
      ;W is Tandem dialing character
      ;D is Delay character
  :Delay:2
  :SendString:0Dh
      ; starts dialing process
  :IgnoreStringEndingWithCharacter:''
  :IgnoreStringEndingWithCharacter:''
  :IgnoreStringEndingWithCharacter:20h

 
      ;Ignore modem response
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'C','O','M','P','L','E','T','E',0Dh,0Ah
  :JumpIfCompareNotEqual:2
  :Delay:3
  :Online:
  :Jump:1
  :IgnoreStringEndingWithCharacter:':'
  :Delay:2
  :Finish:
 
;  __________________________________________________
;  VenTel MDC2123L (with WECO option) (Additional)
;  __________________________________________________
{Ventel}
      ; VenTel MDC2123L (with WECO option)

[Reset_Modem]
  :DropAndRaiseDTR:2
  :SendString:0Dh
  :Delay:1
  :SendString:0Dh
  :Delay:1
  :IgnoreStringEndingWithCharacter:'$'
  :Finish:

[Wait_For_Call]
  :SendString:'Q'
      ; sends Q for QUIT
  :IgnoreStringEndingWithCharacter:'T'
      ; gets the response from modem back
  :WaitNoStringReturn:
  :OnLine:
  :Finish:

[Make_A_Call]
  :SendString:'<K'
  :MapPhoneNumberAndDial:''
  :SendString:0Dh,'>'
      ; dialing process by sending
      ; <K... phone number.., CR>
      ; e.g. <K95551212,CR>
 
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
      ; here we ignore response strings from
      ; the modem
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:'',0Dh,0Ah
      ; now we compare with ONLINE 
  :JumpIfCompareNotEqual:2
  :Delay:2
  :OnLine:
  :Finish:
 

;  __________________________________________________
;  VenTel MD212 PLUS II  (Additional)
;  __________________________________________________
{Ventel+2}
      ; VenTel MD212 Plus 2

[Reset_Modem]
  :DropAndRaiseDTR:2
  :SendString:0Dh
  :Delay:1
  :SendString:0Dh
  :Delay:1
  :SendString:'Q',0Dh
      ; here we retrain the modem
  :DropAndRaiseDTR:2
  :SendString:0Dh
  :Delay:1
  :SendString:0Dh
      ; send CR,CR
  :IgnoreStringEndingWithCharacter:'$'
  :Finish:

[Wait_For_Call]
  :SendString:'Q',0Dh
  :IgnoreStringEndingWithCharacter:'d'
      ; dialer terminated
  :WaitNoStringReturn:
      ; similar to cermetek
  :OnLine:
  :Finish:

[Make_A_Call]
  :SendString:'K',0Dh
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :MapPhoneNumberAndDial:''
 
  :SendString:0Dh
        ; sends phone number xxxx CR
  :IgnoreStringEndingWithCharacter:0Ah
  :IgnoreStringEndingWithCharacter:0Ah
  :SaveStringEndingWithCharacter:0Ah
  :CompareWithSavedString:07h,0Dh,0Ah
      ; compare bell,CR,LF
  :JumpIfCompareNotEqual:2
  :Delay:2
  :OnLine:
  :Finish:

tEqual:1
    :AbortWithErrorCode:'10570'

        ; If 'ERROR', we exchanged a bad or no password.  So abort with erc 219
    :CompareWithSavedString:'ERROR', 0Dh, 0Ah
    :JumpIfCompareNotEqual:1
    :AbortWithErrorCode:'219'

        ; Check for a 'CONNECT 1200, 2400, etc...' response
    :CompareWithSavedString:'00', 0Dh, 0Ah
    :JumpIfCompareEqual:1
    :AbortWithErrorCode:'10572'  ; No anwser

        ; The DCE spee