.TITLE PCDMT - PCACP DISMOUNT IMAGE  .IDENT /V02/  d;++ ; PCDMT - PAPER TAPE READER/PUNCH ACP DISMOUNT IMAGE ,; ; This program dismounts the paper tape reader/punch ACP ; by setting the dismount bit in the UCB, and awakening X; the ACP (which may be hibernating), by issuing an ; ACPCONTROL QIO. ; ; SIDE EFFECTS: ; ; PCACP (the paper tape ACP) will delete itself. L; ; PROGRAMMER: ; x; Vik Muiznieks -- JULY 1979 ; @;-- ; System macros for offsets and symbol definitions  $CCBDEF  $PSLDEF 4 $UCBDEF ; Local Storage ( CHAN: .BLKW 1 ; CHANNEL TO PCA1: PCAPE: .ASCID /PCA1:/ ; PAP. TAPE READER/PUNCH ; T ; ENTRY POINT INTO IMAGE ;  START: .WORD 0 $CMKRNL_S B^BEGIN ; CHANGE MODE TO KERNEL RET ; ALL DONE H BEGIN: .WORD 0 ; SAVE NO REGISTERS $ASSIGN_S CHAN=CHAN,DEVNAM=PCAPE,-; GET CHANNEL TO PCA1: ACMODE=#PSL$C_USER ; AT USER MODE FOR ; USE BY IOC$VERIFYCHAN  BLBS R0,10$ ; CHECK FOR SUCCESS t RET ; RETURN ERROR STATUS 10$: MOVZWL W^CHAN,R0 ; GET PCA1: CHANNEL # < JSB G^IOC$VERIFYCHAN ; VERIFY CHANNEL # AND  ; PUT CCB ADDRESS IN R1  ; (THIS ROUTINE DESTROYS  ; R0-R3; IT CHECKS FOR  ; CHANNEL ACCESSIBILITY  ; BY THE PREVIOUS MODE -  ; IN THIS CASE, USER)  BLBS R0,15$ ; CHECK FOR ERROR h RET ; IF ERROR, RETURN 15$: MOVL CCB$L_UCB(R1),R5 ; GET UCB ADDRESS 0 BBS #DEV$V_MNT,UCB$L_DEVCHAR(R5),20$; CHECK FOR ACP MOUNTED  $DASSGN_S CHAN=CHAN ; NO - FREE PCA1 CHAN.  MOVL #SS$_DEVNOTMOUNT,R0 ; INDICATE ERROR TYPE \ RET ; AND RETURN STATUS 20$: BISL #DEV$M_DMT,UCB$L_DEVCHAR(R5) ; MARK UCB FOR DISMOUNT  $QIOW_S CHAN=CHAN,FUNC=#IO$_ACPCONTROL ; CAUSE ACP TO CHECK TO  ; SEE IF IT SHOULD  ; DISMOUNT  $DASSGN_S CHAN=CHAN ; RELEASE PCA1 CHANNEL  MOVZWL #SS$_NORMAL,R0 ; RETURN SUCCESS CODE P RET ; FINISH UP  .END START