OPA.MAC/-BF=OPA.VGN \ -2,2 .IDENT /V04.0/ -4,4 ; ; Ident: V04.0 ; -9, ; ; ;****************************************************************************** ; ; This software is provided on an "as is" basis only. Caterpillar Tractor Co., ; disclaims all warranties on the program, including without limitation, all ; implied warranties of merchantablity and fitness. ; ; Full permission and consent is hereby given to DECUS and to the DECUS ; special interest groups to reproduce, distribute, and publish and permit ; others to reproduce in whole or in part, in any form and without restriction ; this program and any information relating thereto ; ;****************************************************************************** ; ; Modified by: ; ; The following modifications were made by Rick Webster, Process ; Control Applications, MSDGO, Caterpillar Tractor Co. ; ; RAW001 9/14/81, increased buffer to map up to 14K words of pool ; instead of just 10K ; ; RAW002 4/11/83, Add code to map to a device's ACP when searching ; for all its FCB's. This allows identification of FCB's ; in pool that are pointed to by FCB's in the ACP's private ; pool. ; ; RAW003 4/11/83, Changed TCB display to allow for the increased size ; of TCB's in RSX11M V4.0. TCB's for V3.2 will still be the ; correct size. ; ; RAW004 4/11/83, Modified window block display so that window blocks ; for an index file will contain the device name and unit number ; in the display (if it will fit). Window blocks for files will ; contain the task name that has the file open in the display. ; If the additional info. will not fit then the window block ; display will just have '====='s. ; ; RAW005 4/11/83, Correct the display for VCB's and FCB's so that a two ; digit unit number is displayed instead of just 1. To do this, ; the "@" no longer appears in the FCB display. Also the length ; of VCB's was corrected. ; ; RAW006 Fixed up the output format a bit ; ; RAW007 Changed OPA to use the disable context switching feature ; of RSX11M ($CXDBL) instead of using $SWSTK. This allows ; the user instruction PAR's to be used instead of the ; kernel inst. PAR's. This also allows the use of ODT ; for debugging instead of XDT, reduces chances of crashing ; the system when debugging and allows use of system directives ; if needed. Yet no other task may run while context switching ; is disabled so all data structures remain intact. ; ; RAW008 This did not involve any code changes but had to be done ; because other code was added which made it necessary to ; use JMP instructions instead of the normal branching ; instructions ; ; % -22,,/;RAW002/ UISAR1 =177642 ; Define symbol for user inst. PAR 1 UISAR2 =177644 ; and PAR 2 SAVEM0: .BLKW 1 ; Space to save memory SAVEM1: .BLKW 1 ; management registers SAVEM2: .BLKW 1 ; PAR's 0,1, and 2 F11AP0: .BLKW 1 ; Space to keep PAR's F11AP1: .BLKW 1 ; to map F11ACP F11AP2: .BLKW 1 ; for volume in question ; -36,36,/;RAW007/ MOVB #1,$CXDBL ;Disable context switching to look at pool -74,74,/;RAW007/ CLRB $CXDBL ;Re-enable context switching JMP END -93,93,/;RAW003/ MOV #T.LGTH,R3 ;R3 has length of TCB SUB #100,R3 ;R3 has length over our base of 100 octal BLE 11$ ;Nothing more to add, branch ADD #3,R3 ;Set up to round to next 4 byte map area ASR R3 ;Divide by ASR R3 ; 4 1001$: MOVB #40,(R0)+ ;Expand appropriately with spaces SOB R3,1001$ ; " 11$: CALL GTTSKN ;COPY IN TASK NAME -213,213,/;RAW004/ MOV R2,-(SP) ;Save R2 CALL MRKWB ;GOOD ONE, GO MARK IT IN MAP MOV (SP)+,R2 ;Restore R2 -261,266,/;RAW008/ BNE 10$ ;Yes - branch JMP NXTDEV ;IF NOT, GO TRY FOR ANOTHER DEVICE 10$: BIT #DV.F11,U.CW1(R2) ;IS IT FILES-11? BNE 20$ ;Yes, branch JMP NXTDEV ;IF NO, TRY ANOTHER DEVICE 20$: BITB #US.MNT,U.STS(R2) ;OKAY, IS IT ACTUALLY MOUNTED BEQ 30$ ;Yes, branch JMP NXTUNT ;IF NO, CHECK THE NEXT UNIT 30$: MOV U.VCB(R2),R0 ;AHA!, GOT ONE. GET ADDRESS OF VCB -278,279,/;RAW005/ MOV R2,-(SP) ;Save R2 MOV R3,-(SP) ;Save R3 CLR R3 ;Prepare R3 for scratch area CLR R2 ;Prepare R2 to get units digit of unit number ASR R1 ;Now divide R1 ROL R3 ; by 8 to get ASR R1 ; high order of ROL R3 ; unit number and put ASR R1 ; remainder in R2 which will ROL R2 ; become the low order of the unit number ASR R3 ; " ROL R2 ; " ASR R3 ; " ROL R2 ; " ADD #'0,R1 ;Convert high order to ascii ADD #'0,R2 ;Convert low order to ascii MOVB R1,(R0)+ ;Insert high order MOVB R2,(R0)+ ; and low order in map MOV (SP)+,R3 ;Restore R3 MOV (SP)+,R2 ;Restore R2 -284,291,/;RAW002/ MOV R1,-(SP) ;Save R1 MOV R2,-(SP) ; and R2 MOV U.ACP(R2),R1 ;R1 points to TCB of ACP for device MOV T.PCB(R1),R1 ;R1 points to PCB for that ACP MOV P.REL(R1),R1 ;R1 has physical address of start of ACP MOV #F11AP0,R2 ;R2 has place to save PAR 0 of ACP MOV R1,(R2)+ ;Save ACP's PAR 0 ADD #200,R1 ;Bump to next 4K MOV R1,(R2)+ ;Save ACP's PAR 1 ADD #200,R1 ;Bump to next 4K MOV R1,(R2)+ ;Save ACP's PAR 2 MOV (SP)+,R2 ;Restore R2 MOV (SP)+,R1 ;Restore R1 MOV V.FCB(R1),R1 ;GET 1ST FCB CHKFCB: CMP R1,$EXSIZ ;IN POOL? BLOS 10$ ;Yes, branch MOV @#UISAR0,SAVEM0 ;Save memory management MOV @#UISAR1,SAVEM1 ; PAR'S 0 and 1 MOV @#UISAR2,SAVEM2 ; and PAR 2 MOV F11AP0,@#UISAR0 ;Remap to F11 ACP MOV F11AP1,@#UISAR1 ;These words have PAR's 0, 1 MOV F11AP2,@#UISAR2 ; and PAR 2 for up to 12 K F11ACP SUB #120000,R1 ;Subtract 120000 to use PAR's 0,1 and 2 MOV (R1),R1 ;Get next FCB MOV SAVEM0,@#UISAR0 ;Restore memory management registers MOV SAVEM1,@#UISAR1 ;Point PAR's 0, 1 MOV SAVEM2,@#UISAR2 ; and PAR 2 back to exec TST R1 ;Is there another FCB? BEQ GETWB ;No, go look for window blocks BR CHKFCB ;Yes, continue ; 10$: MOV R1,R0 ;COPY TO CONVERT TO MAP PTR CALL GTMOFF BCS GETWB ;Something is fishy, forget it MOV R1,-(SP) ;SAVE FCB FOR TRACING CHAIN MOV #FCBSTG,R1 ;MARK W/ '<12>/Number of free pool fragments: / POOLMS: .ASCIZ /Size of pool in words : / NFRMSG: .ASCIZ <15><12>/Total free words in pool : / SEGMSG: .ASCII <15><12>/Free Segment List/ .ASCIZ <15><12>/-----------------/<15><12> MAPMSG: .ASCIZ <14><15>/ Pool Map/<15><12> MAPMS2: .ASCII / 0-------40------100-----140-----200----/ .ASCIZ /-240-----300-----340-----/ -842,842,/;RAW005/ FCBSTG: .ASCIZ /