;----------------------------------------------------------------------------- ; ; Program: EXB ; ; Purpose: To connect to an Indirect Commandfile Processor, ; and to DISconnect TI: from BATCH Driver when ...AT. exits. ; ; Author: Han Lasance, Digital Equipment B.V., Utrecht, Holland ; for Neurophysiology Group, Organon Intern. B.V., Oss, Holland ; ; Date: Nov-81 ; ; Language: MACRO-11 ; ; Modified By: Name Date Ident. Version ; Jan H. Belgraver 31-Mar-89 JB01 V1.1 ; This Doc-header ; ; LUNs: Number Description ; 1 Assigned to BA: ; ; Event flags: Number Description ; 1 QIO's to BA: ; ; Assembly: MAC EXB=EXB ; Building: TKB @EXBBLD.CMD ; ; Description: EXB is used in conjuction with a private driver BADRV ; and the Indirect Commandfile Processor. ; For each terminal on this system (8 ports) BADRV store ; may one of three possible conditions: ; ; 0 = No batch (default) ; -1 = Batch, fill answerfile ; 1 = Batch, read answerfile ; ; in the following integer table: ; ; word 1 word 2 ; +----------+----------+ ; | status 1 | LUN 1 | ; +----------+----------+ ; | status 2 | LUN 2 | ; +----------+----------+ ; | . | . | ; | . | . | ; +----------+----------+ ; | status 8 | LUN 8 | ; +----------+----------+ ; ; where LUN values are in octal. ; ; The batch driver uses two maintenance tasks - INIBAT and EXB - ; to set and clear the status flags. This can only be done from ; from within a command procedure. INIBAT asks the user for the ; required mode and sets the corresponding flag, whereas EXB ; clears the flag as soon as IND completes a Create or Use ; mode session on that particular terminal. EXB is started ; by INIBAT. ; ; Following a Read Logical Block QIO BADRV returns the terminal ; number in word two of IBUF and the status in word one. ; Subsequently a test is performed if AT. is active for that ; particular terminal. If not EXB just exits, otherwise ; the IO.DIS function code will reset the driver to No-Batch ; for that terminal. ; ;----------------------------------------------------------------------------- .TITLE EXB ; ; .GLOBL EXB .MCALL QIO$S, EXIT$S, CNCT$S, STOP$S ; ; EXB: QIO$S #IO.RLB,#1,#1,,,,<#BUF,#4> ; Get unit number of TI: MOV BUF+2,R0 ; Save it ASL R0 ; Compute offset in array ASL R0 ; MOV #ATT,R1 ; Try to connect to AT.Txx ADD R0,R1 ; Calc. offset AT. table ; CNCT$S R1,,#AST ; Find active one for TI: TST $DSW ; If DSW lt 0, no AT.Txx active BGT STOP ; If gt connect was successful ; CNCT$S #ATTDOT,,#AST ; Try ...AT. TST $DSW ; If again not OK .... BLE ERROR ; Error ; ; STOP: STOP$S ; Stop for exit of IND EXIT$S ; It only gets here if ...EXB ; is unstopped, e.g. by ; "UNS EXB". ; ; ERROR: MOV $DSW,R0 ; Tell operator something TRAP ; went wrong. ; ; BUF: .BLKW 2 ATT: .RAD50 /AT.T0 / .RAD50 /AT.T1 / .RAD50 /AT.T2 / .RAD50 /AT.T3 / .RAD50 /AT.T4 / .RAD50 /AT.T5 / .RAD50 /AT.T6 / .RAD50 /AT.T7 / .RAD50 /AT.T10/ ATTDOT: .RAD50 /...AT./ ; ; AST: QIO$S #IO.DIS,#1 ; Here when IND exits ; So DISconnect TI: from BADRV EXIT$S ; and exit. .END EXB