.TITLE PHOACT - PHONE ACTION ROUTINES .IDENT /1.1/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: PHOACT.MAC ; Author: Robin Miller ; Date: August 19, 1982 ; ; Description: ; ; Action routines for the PHONE utility. ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL ALUN$S, STOP$S ;********************************************************************** ; Answer the phone. ANSWER::CALL CHKWAT ; CHECK FOR SOMEONE WAITING BCS 20$ ; IF CS, NO ONE IS WAITING ; The terminal number is set up when we receive the WAITing message. ALUN$S #TOLUN,#"TT,TOTBL+O.TNUM ; ASSIGN A LUN TO IT CALL CHKDIR ; ELSE REPORT THE ERROR BCS 20$ ; IF CS, FAILURE ; Answer the phone. CALL SNDANS ; SEND THE ANSWER MESSAGE BCS 20$ ; IF CS, NOBODY TO ANSWER ? STOP$S ; STOP UNTIL WE GET 'GO' RETURN 20$: ADD #2,(SP) ; ELSE RETURN FAILURE RETURN ;********************************************************************** ; Output the contents of a file (FACSIMILE). FACSIM::JMP UNSCMD ; CURRENTLY UNSUPPORTED ;********************************************************************** ; Hang up a person. HANGUP::JMP UNSCMD ; CURRENTLY UNSUPPORTED ;********************************************************************** ; Put a person on HOLD. HOLD:: JMP UNSCMD ; CURRENTLY UNSUPPORTED ;********************************************************************** ; Send a person some mail. MAIL:: JMP UNSCMD ; CURRENLY UNSUPPORTED ;********************************************************************** ; Change the switch hook character. SWITCH::JMP UNSCMD ; CURRENLY UNSUPPORTED ;********************************************************************** ; Save the new view port size. SVIEW:: MOV .PNUMB,R0 ; COPY THE SIZE SPECIFIED CMP R0,#2 ; IS IT TOO SMALL ? BLT 20$ ; IF LT, YES CMP R0,#8. ; IS IT TOO BIG ? BGT 20$ ; IF GT, YES BIT #B.ANS,STATUS ; ARE WE TALKING TO ANYONE ? BEQ 10$ ; IF EQ, NO MOV #FF,R0 ; SETUP A FORMFEED CALL DOTTYS ; TO CLEAR SCREENS 10$: CALL AVIEW ; ADJUST THE VIEW PORT SIZE RETURN ; Illegal view port size specified. 20$: ADD #2,(SP) ; RETURN FAILURE RETURN ; Adjust the view port size. AVIEW: MOV R3,-(SP) ; SAVE R3 DEC R0 ; ADJUST VIEW PORT SIZE MOV #TITBL,R3 ; SET LOCAL TABLE ADDRESS CALL 10$ ; AND ADJUST THE PORT SIZE MOV #TOTBL,R3 ; NOW DO THE SECOND TABLE CALL 10$ ; AND ADJUST THE PORT SIZE MOV (SP)+,R3 ; RESTORE R3 RETURN 10$: MOV O.INIT(R3),O.LINE(R3) ; START AT THE TOP LINE NOW MOV #1,O.COL(R3) ; AND COLUMN 1 MOV O.INIT(R3),O.MAX(R3) ; COPY THE TOP LINE NUMBER ADD R0,O.MAX(R3) ; SETUP NEW VIEW PORT SIZE RETURN ;********************************************************************** ; Disable scroll mode... this enables wraparound mode. NOSCR:: BIC #B.SCR,STATUS ; DISABLE SCROLL MODE RETURN ;********************************************************************** ; See if it's OK to reject this phone call. REJECT::CALL CHKWAT ; CHECK FOR SOMEONE WAITING ? BCS 10$ ; IF CS, NO ONE IS WAITING CALL SNDREJ ; YES, REJECT THE PHONE CALL RETURN 10$: ADD #2,(SP) ; RETURN FAILURE RETURN ;********************************************************************** ; Unhold a person. UNHOLD::BR UNSCMD ; NOT SUPPORTED YET ;********************************************************************** ; Command not currently supported. UNSCMD: ERRMSG UNSUPM, ADD #2,(SP) ; RETURN FAILURE RETURN ;+ ; ; CHKWAT - Check for someone waiting for us to answer. ; ; This routine checks to see if someone has sent us a waiting message. ; If not, we delay for up to 3 seconds to allow the wait message to arrive ; (it is being sent every 1 second from the other phoner). ; ; Inputs: ; None. ; ; Outputs: ; C bit clear/set = waiting/not waiting. ; ; All registers are preserved. ; ;- .ENABL LSB CHKWAT::JSR R2,$SAVVR ; SAVE R0 - R2 BIT #B.WAIT,STATUS ; IS SOMEONE WAITING FOR US ? BNE 100$ ; IF NE, YES ; TST MCRFLG ; DID COMMAND COME FROM MCR ? ; BEQ 10$ ; IF EQ, NO (DON'T DELAY) MOV #3,R0 ; SET UP TO DELAY 3 SECONDS CALL DELAY ; AND GO DO IT BIT #B.WAIT,STATUS ; IS SOMEONE WAITING NOW ? BNE 100$ ; IF NE, YES 10$: ERRMSG NOONE, SEC ; SHOW FAILURE RETURN 100$: CLC ; SHOW SUCCESS RETURN .DSABL LSB .END