.MCALL .ENTER .LIBRARY /UTL.MLB/ .MCALL $UTL $UTL .INCLUDE /GOPSTA.INC/ .INCLUDE /WSSL.INC/ .PSECT G$$COD,I,RW,LCL,REL,CON G$TV:: ASL R0 ; Word addressing, not byte addressing. ADD #WSSBVC-2,R0 ; Pointer to the subroutine vector list. MOV @R0,R0 ; Get the start address of the vector table. RTS PC ; Return. G$GWSL::DEC R0 ; Convert (1 - N) to (0 - N-1) ASL R0 ; Word addressing. ADD #WSSL,R0 ; R0 <-- List of worstation pointers. MOV (R0),R0 ; R0 <-- The request workstation pointer. RTS PC ; Return. ;************************************************************************ ;* G$GIOC - Get I/O channel * ;* * ;* Enter with FORTRAN LUN in R1 and a pointer to the workstation * ;* state list in R2 * ;* Exit with RT-11 channel # in R0 * ;* * ;************************************************************************ G$GIOC::PUSH R1,R2 ; Save the address of the WSSL MOV R1,R0 ; If yes, get the desired channel #. 10$: ADD #WS$CID,R2 MOV R1,@R2 ; Store the requested FORTRAN LUN. CALL ILUN,R2 ; Get the RT channel number that corresponds ; to the given Fortran channel number. CMP #-1,R0 ; Is the channel open? BNE 80$ ; Branch if it is. 20$: CALL IGETC ; Get a free channel. MOV (SP),R2 MOV R0,WS$CID(R2) ; Save the channel number in the table. MOV #^R1 ,R2 ; Channel # to add in. MOV 2(SP),R1 ; Get the requested LUN. CLR R0 ; 30$: SUB #10.,R1 ;\ BMI 40$ ; \ ; > Construct the tens place. ADD R2,R0 ; / BR 30$ ;/ 40$: ADD #10,R1 TST R0 ; Change quantity to add? BEQ 50$ ; Branch if not. MOV #^R 1 ,R2 ; Yes. 50$: DEC R1 ;\ BMI 60$ ; \ ; > Construct the ones place. ADD R2,R0 ; / BR 50$ ;/ 60$: MOV R0,DDEV ; Store the device name. MOV (SP),R2 ; Restore the WSSL pointer. .ENTER #AREA,WS$CID(R2),#DBLK,#0 BCC 70$ HALT 70$: MOV (SP),R2 ; Restore the WSSL pointer. MOV WS$CID(R2),R0 80$: POP R2,R1 ; Restore active registers. RTS PC ; Return. DBLK: DDEV: .RAD50 / / DNAME: .RAD50 /GKSDAT/ DEXT: .RAD50 /DAT/ AREA: .BLKW 10 .END