.title CACHE -- 11/70 Cache status reporter .IDENT "V1.0" .nlist ME,BEX,CND .enabl lc .sbttl Author's Credits ; Author: Henry R. Tumblin ; Date: Nov. 21,1978 ; Version: 1.0 ; For: Systems/Diagnostics ; Module Name: CACHE ; Machine/System: PDP-11/70 IAS V2.0 ; Type/Language: Main/Assembler(MACRO-11) ; Residence: DB0:[1,20]CACHE.MAC ; Build File: CACHE.CMD ; Abstract: This program reports on the current status ; of the PDP-11/70 Control and Memory System ; Error(MSE) registers. This program is ; only intended to run on an 11/70 ; Edits: ; Date By Reason ; ---------- ----- -------------------------------------------- ; None .SBTTL Tell the assembler which libmacs to use .mcall qiow$,print,inh0,exit$s,C$C,DIR$,GTSK$ .MACRO MES,BIT,MES .PSECT BMES .MS.=. .BYTE LF,HT,40,40 .ASCII "MES" .BYTE CR .MSZ.=.-.MS. .PSECT BTAB .WORD ^B,.MS.,.MSZ. ; MASK,Message @,Message length .PSECT .ENDM MES C$C CTRLRG=177746 ; Address of control register ; on the external page MSEREG=177744 ; Address of Memory system ; error register on the ; external page .SBTTL Message table .PSECT BMES,D,RO,REL .PSECT BTAB,D,RO,REL BTBLE: .PSECT MES <0000000000000000>, MES <0000000000000001>, MES <0000000000000010>, MES <0000000000000100>, MES <0000000000001000>, MES <0000000000010000>, MES <0000000000100000>, CONREG: .BLKW 1 ; Buffer to store control register CTRMES: .ASCII "CACHE -- Control register contains " CTRVAL: .BLKB 6 .ASCII " Decode of this value reveals that the " .ASCII " processor is currently " CMESZ=.-CTRMES .EVEN .sbttl MSE Register error messages .PSECT BTAB BTBL2: .PSECT MES <0000000000000000>, MES <0000000000000001>,
MES <0000000000000010>,
MES <0000000000000100>,
MES <0000000000001000>,
MES <0000000000010000>,
MES <0000000000100000>,
MES <0000000001000000>, MES <0000000010000000>, MES <0000000100000000>, MES <0000001000000000>, MES <0000010000000000>, MES <0000100000000000>, MES <0001000000000000>, MES <0010000000000000>, MES <0100000000000000>, MES <1000000000000000>, MSEMES: .ASCII "CACHE -- " .ASCII "Memory System Error Register contains " MSEVAL: .BLKB 6 .ASCII " Decode of this value reveals that the " .ASCII " processor has detected " MSESZ=.-MSEMES .even MSER: .BLKW 1 ; Buffer to store Memory System ; Error Register .sbttl DPB's and other buffers WRITE: QIOW$ IO.WVB,1,2,50,,,<0,0,0> ; TT write DPB TSKBUF: .BLKW 16. ; Get task data buffer GTSK: GTSK$ TSKBUF ; Get task DPB BADUSR: .BYTE CR,LF,HT,BEL .ASCII " Sorry, only [1,*] users can use this utility" .BYTE CR,LF BDUSSZ=.-BADUSR .sbttl Start mainline code .PSECT CACCOD,I,RO,REL START: DIR$ #GTSK ; This is for priv. users only CMPB #1,TSKBUF+G.TSGC ; Are they within [1,*]? BEQ 5$ ; EQ - then go on PRINT #BADUSR,#BDUSSZ ; Else print bad user message JMP EXIT ; And exit gracefully(always) 5$: INH0 ; Inhibit task switching MOV @#CTRLRG,CONREG ; Get the contents of the control reg MOV @#MSEREG,MSER ; And the memory system error reg CALL ..ENB0 ; Enable task switching MOV #CTRVAL,R0 ; Set up for display MOV CONREG,R1 ; Set value to convert MOV #1,R2 ; No zero suppress CALL $CBOMG ; Convert to ASCII PRINT #CTRMES,#CMESZ ; Print message TST CONREG ; Any errors here? BNE 10$ ; NE - then something PRINT BTBLE+2,BTBLE+4 ; Print no error message BR EXIT ; and leave 10$: MOV #6,R1 ; Set count MOV #BTBLE+6,R0 ; Set pointer to message table CALL CHKR ; go test the status MOV #MSEVAL,R0 ; Set up for display MOV MSER,R1 ; Set value to convert MOV #1,R2 ; No zero suppress CALL $CBOMG ; Convert to ASCII PRINT #MSEMES,#MSESZ ; Print message TST MSER ; Any errors here?? BNE 40$ ; NE - then check errors PRINT BTBL2+2,BTBL2+4 ; Print all ok message BR EXIT ; And exit normally 40$: MOV #16.,R1 ; Set count MOV #BTBL2+6,R0 ; Set table pointer CALL CHKR ; And display EXIT: EXIT$S ; All thru, so exit .sbttl Mask test subroutine CHKR: BIT CONREG,(R0)+ ; Test to see if bit set BEQ 20$ ; EQ - then bit not set PRINT (R0),2(R0) ; Else print a message 20$: ADD #4,R0 ; Point to next entry SOB R1,CHKR ; Loop until thru RETURN .END START