.TITLE ALLOCTAPE ALLOCATE MTA0 TO THE NULL PROCESS $UCBDEF ;DEFINE UCB OFFSETS $CCBDEF ;DEFINE CCB OFFSETS START:: .WORD 0 $ASSIGN_S DEVNAM=DEVICE,CHAN=CHANNEL BLBC R0,NOGO ;JUNK IT IF ASSIGN FAILS $CMKRNL_S GET_UCB ;CHANGE MODE TO KERNAL $DASSGN_S CHAN=CHANNEL ;DEASSIGN THE CHANNEL $CMKRNL_S ALL_UCB ;ALLOCATE THE MAG TAPE NOGO: RET ;ALL DONE GET_UCB: .WORD ^M JSB @#IOC$VERIFYCHAN ;GET THE CCB IN R1 MOVL CCB$L_UCB(R1),UCBADR ;MOVE THE UCB TO STORAGE RET ;GO BACK IN USER MODE ALL_UCB: .WORD 0 MOVL UCBADR,R0 DSBINT #31 ;DISABLE ALL INTERRUPTS BISL #DEV$M_ALL,UCB$L_DEVCHAR(R0) ;SET DEVICE AS ALLOCATED MOVL #^X10000,UCB$L_PID(R0) ;SET OWNER TO NULL PROCESS ENBINT ;RE ENABLE INTERRUPTS RET ;THAT IS ALL ; CHANNEL: .LONG 0 DEVICE: .LONG DEVE-DEV .LONG DEV DEV: .ASCII /_MTA0:/ DEVE: UCBADR: .LONG 0 .END START