- XMMPAD ;IHS/NPO/FBD - ACP-50 X.25 PAD CONTROL LOGIC; [ 06/24/94 1:27 PM ]
- ;;7.1;Mailman;**1003**;OCT 27, 1998
- ;;3.27;;
- Q
- ;
- DIAL ;INITIATE CALL SEQUENCE
- S:XMPHONE'["*" XMPHONE=$P(XMPHONE,"p",1)_"*p"_$P(XMPHONE,"p",2)
- U IO W *13 D CLEAR
- U IO W *13 D CLEAR
- S ER=0 U IO W XMPHONE,*13
- S (NOMORE,XMMHIT)=0
- F %=1:1:3 D Q:XMMHIT Q:NOMORE
- .D READ
- .S:Y["com" XMMHIT=1
- I Y'["com" S Y=$S(Y="":"Timed out before receiving 'connect' msg from modem",1:"Received '"_Y_"' msg from modem"),ER=1
- K NOMORE,XMMHIT
- Q
- ;
- HANGUP ;DISCONNECT SEQUENCE
- S Y="Disconnected",ER=0
- Q
- ;
- STATUS ; "STATUS" CODE
- S Y=" status report",ER=0
- Q
- ;
- CLEAR ;FLUSH INPUT BUFFER
- U IO F %=1:1 R *Y:2 Q:'$T
- Q
- ;
- READ ;READ ONE LINE OF INPUT
- S Y="" U IO F %1=1:1 R C#1:20 Q:'$T Q:C=$C(10) S Y=Y_C
- I '$T,'$L(Y) S Y="NO RESPONSE FROM ACP-50",NOMORE=1
- Q
- XMMPAD ;IHS/NPO/FBD - ACP-50 X.25 PAD CONTROL LOGIC; [ 06/24/94 1:27 PM ]
- +1 ;;7.1;Mailman;**1003**;OCT 27, 1998
- +2 ;;3.27;;
- +3 QUIT
- +4 ;
- DIAL ;INITIATE CALL SEQUENCE
- +1 IF XMPHONE'["*"
- SET XMPHONE=$PIECE(XMPHONE,"p",1)_"*p"_$PIECE(XMPHONE,"p",2)
- +2 USE IO
- WRITE *13
- DO CLEAR
- +3 USE IO
- WRITE *13
- DO CLEAR
- +4 SET ER=0
- USE IO
- WRITE XMPHONE,*13
- +5 SET (NOMORE,XMMHIT)=0
- +6 FOR %=1:1:3
- Begin DoDot:1
- +7 DO READ
- +8 IF Y["com"
- SET XMMHIT=1
- End DoDot:1
- IF XMMHIT
- QUIT
- IF NOMORE
- QUIT
- +9 IF Y'["com"
- SET Y=$SELECT(Y="":"Timed out before receiving 'connect' msg from modem",1:"Received '"_Y_"' msg from modem")
- SET ER=1
- +10 KILL NOMORE,XMMHIT
- +11 QUIT
- +12 ;
- HANGUP ;DISCONNECT SEQUENCE
- +1 SET Y="Disconnected"
- SET ER=0
- +2 QUIT
- +3 ;
- STATUS ; "STATUS" CODE
- +1 SET Y=" status report"
- SET ER=0
- +2 QUIT
- +3 ;
- CLEAR ;FLUSH INPUT BUFFER
- +1 USE IO
- FOR %=1:1
- READ *Y:2
- IF '$TEST
- QUIT
- +2 QUIT
- +3 ;
- READ ;READ ONE LINE OF INPUT
- +1 SET Y=""
- USE IO
- FOR %1=1:1
- READ C#1:20
- IF '$TEST
- QUIT
- IF C=$CHAR(10)
- QUIT
- SET Y=Y_C
- +2 IF '$TEST
- IF '$LENGTH(Y)
- SET Y="NO RESPONSE FROM ACP-50"
- SET NOMORE=1
- +3 QUIT