.TITLE CATINS - INSTALL COMMUNICATIONS TASK .IDENT /1.0/ .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: CATINS.MAC ; Author: Robin Miller ; Date: July 20, 1982 ; ; Description: ; ; This routine is called to check for a communications line and ; if found, install and start the communications line. ; ; ; Modification History: ; ;- .NLIST BEX ; Local storage: DIRDSW: .WORD DIRLEN,DIRDDS DIRDDS: .ASCII "[77,54]" DIRLEN = .-DIRDDS INSCMD: .ASCIZ "INS LB:[77,54]" INSCCP: .ASCII "CCP/TASK=" INSNAM: .ASCIZ "$$$CCP" .EVEN .SBTTL INSTAL -- INSTALL A REQUESTED COMMUNICATIONS TASK. ;+ ; ; This routine determines whether a communications task from LB:[77,54] ; should be installed and run. If the task exists, a check is made to ; see if the terminal is privileged. If it isn't privileged, it will ; be made privileged temporarily while the INStall commands are spawned ; to the terminal. The commands spawned are: ; ; INS LB:[77,54]xxx ! To INStall line task ; INS LB:[77,54]CCP/TASK=xxxCCP ! To INStall Communications task ; and ; xxx ! To start the line ; ; Note that these commands will not be echoed so the line startup ; looks transparent to the user. ; ;- INSTAL::MOV #COMENT,SAVTBL ; SETUP FOR COM TABLE ENTRY MOV SAVTBL,R5 ; COPY THE COMMAND ENTRY ADDRESS MOV #ASCNAM,(R5) ; SET ADDRESS OF THE KEYWORD TSTB RADNAM+2 ; TASK NAME > 3 CHARACTERS ? BNE 5$ ; IF NE, YES (NOT A COM LINE) MOV #CATFDB,R0 ; SCRATCH FDB. MOV #CATFNB,R1 ; DEFAULT FNB. MOV #DIRDSW,R2 ; DEFAULT DIRECTORY DESCRIPTOR. CALL .GTDIR ; INSERT DIRECTORY INFO IN FNB CALL .FIND ; DOES THE FILE EXIST ? BCC 10$ ; IF CC YES 5$: JMP FLYRUN ; NO, TRY FLYING RUN COMMAND ; SPAWN "INS LB:[77,54]xxx" where "xxx" is the line name. 10$: MOV #INSCMD,R0 ; SET TO MOVE "INS LB:[77,54]" CALL MOVE ; MOVE IT TO THE SPAWN BUFFER MOV R1,-(SP) ; SAVE END OF INS COMMAND MOV (R5),R0 ; COPY ADDRESS OF LINE NAME CALL MOVEC ; MOVE IN THE TASK NAME CALL 20$ ; SPAWN THE INSTALL ; SPAWN "INS LB:[77,54]CCP/TASK=xxxCCP" MOV (R5),R0 ; COPY ADDRESS OF LINE NAME MOV #INSNAM,R1 ; MOVE IT HERE MVZ R0,R1 ; CHANGE "$$$CCP" TO "xxxCCP" MOV #INSCCP,R0 ; SET TO MOVE "CCP/TASK=" MOV (SP)+,R1 ; POINT TO END OF UIC CALL MOVEC ; ADD THE CCP TASK NAME CALL 20$ ; SPAWN THE INSTALL ; SPAWN "xxx" to start up comunications line. MOV (R5),R0 ; COPY ADDRESS OF LINE NAME CALL MOVE ; MOVE LINE NAME TO SPAWN BUFFER MOV SCMD,R0 ; COPY THE COMMAND LINE ADDRESS CALL MOVEC ; AND MOVE IT TO SPAWN BUFFER BIC #B.MULT,O.STAT(R5) ; THIS IS THE LAST COMMAND CALL SPAWN ; FINALLY SPAWN THE TASK BR 30$ ; AND CONTINUE ... ; Subroutine to spawn the command line and check the exit status. 20$: CALL SPAWN ; SPAWN THE COMMAND LINE CMP R0,#EX$SUC ; WAS INSTALL SUCCESSFUL ? BNE 30$ ; IF NE, NO RETURN ; YES, CONTINUE ... ; Exit with status code in R0. 30$: JMP EXST ; AND EXIT WITH IT .END