Google
 

Trailing-Edge - PDP-10 Archives - BB-D868D-BM - language-sources/syserb.mac
There are 15 other files named syserb.mac in the archive. Click here to see a list.
	TITLE	SYSERB -- SYSTEM ERROR FILE PROCESSOR -- MAINLINE CODE
	SUBTTL	VERSION 14(1267)	K. COYE/ RLD/ PJB/ ES/ TJW/ LWE/ SRL/ GSK





;COPYRIGHT (C) 1972,1975,1977,1978,1979 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

	SEARCH	SYRUNV
	SEARCH	SYRLOW	;LOW SEG DEFINITIONS


	.REQUIRE SYRLIB


	;DUMALL -- DUMMY MACRO LEVEL 3
	;SUBMACRO DUMXXX
	;ARGS
	;NONE USED TO HOUSE LEVEL 2 SUBMACRO DUMXXX
	;THOSE DEFINED HERE ARE THOSE FULLY PROCESSED BY
	;THIS SEGMENT. PART OF EDIT #120.

	DEFINE	DUMALL<
	DUM002
	DUM004
	DUM011
	DUM012
	DUM015
	DUM016	;[715]
	DUM021
	DUM042
	DUM050
>



	;EXTERNALS DEFINED HERE ARE IN SYRLIB.MAC, THE LIBRARY
	;OF COMMON ROUTINES FOR ALL PARTS OF THE SYSERR PACKAGE.

	EXTERNAL HEADRD,ABORT,CHRCHK,DATECK,FILERR,TOOBIG,MBCHAR
	EXTERNAL CNISUM,BADNAM,MASSVM,DEVCHK,ERRINT,SKIPIT,IDCHK
	EXTERNAL STRCHK,DETCHK,DMPENT,HDRLST,PAGXCD,DVCHAR,TMCHAR
	EXTERNAL SAYDAY,GETNBS,.OCTLE,.DECML,.ASCIE,.SIXBT
	EXTERNAL .HAFWD,.SPECL,.HTIME,.PPNWW,.ODECW,.UDATE,.TASCI,.PPNWT
	EXTERNAL .TDIRW,R5VSIX,MONVER,BADADD,TAB031,TYPAST,BLDPTR
	EXTERNAL ACLST,SAVE4P,RET4P,HWDUMP,TYPBCD,LSTEB,JFLOOP,CNIDCD
	EXTERNAL XORTAB,BITLST,.DVTAB,.MXBLK,.TRBLK,.SUBLK,.SECBK
	EXTERNAL WDCNT,COMPAR,SKPRTN,TYPNBS,TITLST,SKIPWD,ADVBFF
	EXTERNAL FIXBUF,STBUFF,INPWD,GOSUM,GETWD,FFPRNT,SLPRNT,CLPRNT
	EXTERNAL TBPRNT,CHROUT,TTYSIX,MDECHR,FIXNAM,ACREG,NOTRAN
	EXTERNAL DSERCD,BLKTRN,DRVTYP,HKSTRG,DUMPOS,DSKPOS,TAPPOS
	EXTERNAL FIXOFF,PTSTRG,RS4POS,.TDTTM


	;INTERNALS DEFINED HERE ARE FOR USE BY SYRLIB
	INTERNAL KONMSK,KLEDMP,MINERB,DEVDSP,MASLTH,ALLTBL
	INTERNAL NAMLTH,TYPMES,LINE,ALLLTH,NAMTBL,DUMDAY
	INTERNAL DEVTYP,ERINDX,PCSTBL,PDLPNT,BITCHK,ERRLTH
	INTERNAL MASNAM,ERRTBL,SUMUPD,MASLT2,MASNA2,MDE000
	INTERNAL FE$NAM,BLTTAB


	.JBVER==137
	LOC	.JBVER

	BYTE	(3)VWHO(9)VSYSER(6)VMINOR(18)VEDIT
	SALL


	TWOSEG
	RELOC	400000
	;DUMMY TO COMPILE PACKAGE
MASNA2:
FE$NAM:
MASLT2==0
MDECHA:
KLEDMP:	BLOCK	1		;GIVE IT SOME SPACE

	;PROCSA -- STANDARD ENTRY PROCESSOR #1
	;CALL	JRST PROCSB
	;
	;RETURN	JRST ABORT	WHEN ENTRY IS PROCESSED OR ABORTED
	;OPERATION IS CONTROLLED BY ENTRY IN CONTROL TABLE
	;ROUTINE GETS AOB POINTER TO DESIRED WORD IN BUFFER
	;IF THERE IS ONE PRESENT
	;THEN DISPATCHES TO WORD PROCESSOR LEVEL
	;VIA PUSHJ	P,SUBTAB(MODE)
	;PASSES BUFFER WORD IN P2 TO WORD PROCESSOR

PROCSB:	TRNE	F,F.BRF		;/BRIEF ?  -  EDIT [724]
	 JRST	NEWCMD##	;YES! - DO IT THAT WAY
	SETZM	OFFSET		;CLEAR WORD OFFSET COUNT
	MOVE	P1,(CTINDX)	;PICKUP FIRST WORD IN CONTROL TABLE
	JUMPE	P1,ABORT	;ABORT WHEN END OF CTL TABLE SEEN
	TLNE	P1,770000	;DO WE NEED TO GET AN AOB POINTER
	PUSHJ	P,GETAOB	;YES-WORD IS IN A RELOCATABLE SUBTABLE IN ENTRY
	LDB	T2,[POINT 6,P1,11]	;PICKUP WORD LOCATION IN ENTRY
	ADD	T2,OFFSET	;OFFSET CONTAINS AOB BLOCK STARTING LOCATION
	CAML	T2,ENTRWC	;[153]DONT TRY TO ACCESS WORDS OUTSIDE OF ENTRY
	AOJA	CTINDX,PROCSB	;GET NEXT WORD IN CTL TABLE
	CAILE	T2,WKSIZE	;MAKE SURE THE WORD ASKED FOR IS IN WORK BUFFER
	AOJA	CTINDX,PROCSB	;IGNORE AND GET NEXT WORD
	MOVE	P2,WKBUFF(T2)	;PICKUP DATA WORD IN WORK BUFF
	LDB	T3,[POINT 6,P1,17]	;PICKUP WORD PROCESSES MODE
	CAIG	T3,SUBMAX	;IS IT AND UNKNOWN MODE
	PUSHJ	P,SUBTAB(T3)	;ITS RECOGINIZED
	AOJA	CTINDX,PROCSB	;EITHER NOT KNOWN OR FALL HERE

GETAOB:	LDB	T2,[POINT 6,P1,5]	;PICKUP AOBJN POINTER ADDRESS IN ENTRY
					;AOB GIVEN IS WITH REF TO HEADER
	SKIPL	T2,WKBUFF(T2)	;PICKUP THE ACTUAL POINTER AND SKIP IF LEGAL
	JRST	AOBQIT		;AOBJN POINTER = 0 CLEAN UP PDL AND GO TO PROCSA
	SUB	T2,HEADWC	;CORRECT AOB POINTER FOR HEADER SIZE
	HRRZM	T2,OFFSET	;SAVE IT IN OFFSET
	MOVEM	T2,AOBPNT	;SAVE POINTER FOR SPECL ROUTINE USAGE
	POPJ	P,		;VAMOOSE



	;HERE WHEN AOBJN POINTER = POS IN LH
	;NORMALLY SHOULD NOT HAPPEN

AOBQIT:	POP	P,T2		;DUMMY POP TO FIX PDP
	AOJA	CTINDX,PROCSB	;BUMP CTINDX AND BACK TO START
	SUBTTL	DIALOG RELATED SUBROUTINES
	;HERE IS THE DUMMY PROCSB FOR THIS HIGH SEG
	;IT SAVES THE AC'S AND THEN CALLS OVRLAY FOR REPLACEMENT
	;WITH SYSERA.HGH

PROCSA:	MOVE	T1,[SIXBIT/SYSERA/]
	MOVEM	T1,OVRBLK+1	;INTO THE SPEC AREA
	SETZ	15,
	MOVEM	17,SAVEAC+17
	MOVEI	17,SAVEAC
	BLT	17,SAVEAC+16	;TUCK AWAY OUR AC'S
	JRST	OVRLAY		;NOW PLEASE OVERLAY US WITH PROCSA
PROCSN:	MOVE	T1,[SIXBIT/SYSERN/]
	MOVEM	T1,OVRBLK+1	;INTO THE SPEC AREA
	SETZ	15,
	MOVEM	17,SAVEAC+17
	MOVEI	17,SAVEAC
	BLT	17,SAVEAC+16	;TUCK AWAY OUR AC'S
	JRST	OVRLAY		;NOW PLEASE OVERLAY US WITH PROCSA

	;HERE IS THE DUMMY PROCSD FOR THIS HIGH SEG
	;IT SAVES THE AC'S AND THEN CALLS OVRLAY FOR REPLACEMENT
	;WITH SYSERD.HGH

PROCSD:	MOVE	T1,[SIXBIT/SYSERD/]
	MOVEM	T1,OVRBLK+1	;INTO THE SPEC AREA
	SETZ	15,
	MOVEM	17,SAVEAC+17
	MOVEI	17,SAVEAC
	BLT	17,SAVEAC+16	;TUCK AWAY OUR AC'S
	JRST	OVRLAY		;NOW PLEASE OVERLAY US WITH PROCSA


	;HERE IS THE DUMMY PROCSC FOR THIS HIGH SEG
	;IT SAVES THE AC'S AND THEN CALLS OVRLAY FOR REPLACEMENT
	;WITH SYSERC.HGH

PROCSC:	MOVE	T1,[SIXBIT/SYSERC/]
	MOVEM	T1,OVRBLK+1	;INTO THE SPEC AREA
	SETZ	15,
	MOVEM	17,SAVEAC+17
	MOVEI	17,SAVEAC
	BLT	17,SAVEAC+16	;TUCK AWAY OUR AC'S
	JRST	OVRLAY		;NOW PLEASE OVERLAY US WITH PROCSC



	;STARTB-- ROUTINE TO START AT WHEN OVERLAYED
	;TO CORRECTLY PROCESS CURRENT ENTRY.

STARTB:	MOVEI	T1,CHROUT	;OUR TYPO ROUTINE
	PUSHJ	P,.TYOCH##	;INIT SCAN
	MOVE	T1,ERTYPE	;CURRENT TYPE
	PUSHJ	P,ERRINT	;GET OUR INDEX VALUE
	MOVE	T1,ERTYPE	;CORRECT INDEX TO ENTCHR TABLE
	MOVE	T2,ENTCHR(T1)	;PICKUP ENTRY CHAR WORD
	TLZ	F,F.BTCK	;CLEAR EXAMINE ENTRY FLAG
	TRNN	F,F.ENT		;DOING /ENTRY?[752]
	 TRNE	F,F.SEQ
	  JRST	START1
	TLNN	T2,E.LALL!E.LNXM!E.LPAR!E.LPER!E.LSUM	;ANY LISTING DESIRED
	JRST	SKIPIT		;SKIP THIS ENTRY
	TLNE	T2,E.LNXM!E.LPAR!E.LPER!E.LSUM	;ANY REASON TO DO BIT CHECKING?
	TLO	F,F.BTCK	;YES-SET FLAG TO DO IT LATER
START1:	MOVE	T3,ERTYPE	;GET CORRECT INDEX
	AOS	ENTCHR(T3)	;NO- BUMP COUNTER
	SETZ	WKINDX,		;CLEAR INDEX INTO BUFFER
	SKIPG	T1,ENTRWC	;PICKUP ENTRY LENGTH AND CHECK FOR LEGALITY
	FATAL	<ENTRY WITH ZERO LENGTH BODY SPECIFIED>
	MOVE	P4,ERRIND
	TLNE	F,F.BTCK	;ANY TO DO?
	PUSHJ	P,@BITCHK(P4)	;GO DO IT
	TRNE	F,F.REM		;[417]/REMOTE?
	 PUSHJ	P,REMDAT##
	PUSHJ	P,HDRLST
	MOVE	T2,ALLIND
	HRRZ	T1,PCSTBL(T2)
	HLRZ	CTINDX,PCSTBL(T2)	;CONTROL TABLE ADDRESS
	JRST	(T1)
	SUBTTL	WORD LEVEL SUBROUTINES
	;SUBTAB -- SUBROUTINES TO OUTPUT ENTRY WORD IN DESIRED FORMAT
	;SETUP  P1=ADDRESS OF TEXT TO BE OUTPUT AS DESCRIPTOR
	;	FOR THIS DATA WORD.
	;	P2= WORD TO BE OUTPUT.
	;CALL	PUSHJ	P,SUBTAB(MODE)
	;
	;RETURN	CALL+1
	;DISPATCHES TO APPROPIATE ROUTINE INTERNALLY TO DO WORD CONVERSION AND OUTPUT
SUBTAB:	SINDEX	<OCTLE>
	SINDEX	<DECML>
	SINDEX	<ASCIE>
	SINDEX	<SIXBT>
	SINDEX	<HAFWD>
	SINDEX	<SPECL>
	SINDEX	<HTIME>
	SINDEX	<PPNWW>
	SINDEX	<TASCI>

	;NXMLST-- SPECIAL ROUTINE FOR KA/KI NXM LISTINGS
	;P2 HAS NXMKPG

NXMLST:	SETOM	KFLAG		;ASSUME K OF CORE
	TRNE	P2,1B35		;BUT CHECK
	 SETZM	KFLAG		;AND CHANGE IF NECESSARY
	TYPEIT	<
PHYSICAL MEMORY PLACED OFF-LINE:
>
	MOVE	P1,WKBUFF+NXMBEF	;GET PNTR TO FIRST TABLE
	PUSHJ	P,BLDPTR		;CORRECT IT
	MOVE	P2,P1			;SAVE IT
	MOVE	P1,WKBUFF+NXMAFT	;AFTER TABLE
	PUSHJ	P,BLDPTR
	PUSHJ	P,XORTAB	;FIND DIFFERENCES
	PUSHJ	P,BITLST	;LIST THOSE FOUND
	POPJ	P,0		;RETURN TO PROCSA
	;CSCLST-- ROUTINES TO DO CONFIG CHANGE ENTRIES
	;CALLED WITH CSCSTS IN P2 WITH PUSHJ P,CSCLST
	;COMPLETELY REVAMPED BY EDIT 1122 [TJW]


CSCLST:	PUSHJ	P,.TCRLF
	TYPEIT	<COMMAND:>
	LDB	T2,[POINT 6,P2,17]	;GET COMMAND TYPE BYTE
	CAIL	T2,0		;CODE MUST FALL INTO
	CAIL	T2,17		;RANGE OF 0 TO 17
	 JRST	CSCMER		;ELSE ERROR
	JRST	@CSCTAB(T2)	;OK NOW DISPATCH


CSCTAB:	0,,CSCCM0		;ATTACH CMD
	0,,CSCCM1		;DETACH CMD
	0,,CSCCM2		;EXCHANGE
	0,,CSCCM3		;DATE/TIME CHANGE
	0,,CSCCM4		;SET CPU OFFLINE
	0,,CSCCM5		;SET CPU ONLINE
	0,,CSCCM6		;NODE OFFLINE
	0,,CSCCM7		;NODE ONLINE
	0,,CSCC10		;SET MEMORY ONLINE
	0,,CSCC11		;SET MEMORY OFFLINE
	0,,CSCNUL
	0,,CSCNUL
	0,,CSCNUL
	0,,CSCNUL
	0,,CSCNUL
	0,,CSCNUL
	0,,CSCNUL

CSCNUL:	POPJ	P,0

CSCCM0:	TYPEIT	<ATTACH>
	PUSHJ	P,.TCRLF
	TYPEIT	<	DEVICE:>
	MOVE	T1,WKBUFF+CSCNAM	;GET SIXBIT DEVICE NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PJRST	.TCRLF

CSCCM1:	TYPEIT	<DETACH>
	PUSHJ	P,.TCRLF
	TYPEIT	<	DEVICE:>
	MOVE	T1,WKBUFF+CSCNAM	;GET SIXBIT DEVICE NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PJRST	.TCRLF

CSCCM2:	TYPEIT	<EXCHANGE>
	PUSHJ	P,.TCRLF
	TYPEIT	<	DEVICE:>
	MOVE	T1,WKBUFF+CSCNAM	;GET SIXBIT DEVICE NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PUSHJ	P,.TTABC
	TYPEIT	< WITH >
	MOVE	T1,WKBUFF+CSCNM2	;GET OTHER SIXBIT NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PJRST	.TCRLF

CSCCM3:	TYPEIT	<DATE/TIME CHANGE>
	PUSHJ	P,.TCRLF
	TYPEIT	<CHANGED FROM:>
	MOVE	T1,WKBUFF+CSCNM2	;GET THE CURRENT UDT
	PUSHJ	P,.TDTTM		;TYPE IT
	PUSHJ	P,.TCRLF
	TYPEIT	<	TO  :>
	MOVE	T1,WKBUFF+CSCNM2	;CURRENT UDT
	ADD	T1,WKBUFF+CSCNAM	;ADD DIFFERENCE TO IT
	PJRST	.TDTTM			;TYPE IT

CSCCM4:	TYPEIT	<SET CPU OFFLINE>
	PUSHJ	P,.TCRLF
	TYPEIT	<	DEVICE:>
	MOVE	T1,WKBUFF+CSCNAM	;GET SIXBIT NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PUSHJ	P,.TTABC
	TYPEIT	<PROCESSOR SERIAL #: >
	MOVE	T1,WKBUFF+CSCNM2	;GET PROCESSOR SERIAL#
	PUSHJ	P,.TDECW		;TYPE IT
	PJRST	.TCRLF

CSCCM5:	TYPEIT	<SET CPU ONLINE>
	PUSHJ	P,.TCRLF
	TYPEIT	<	DEVICE:>
	MOVE	T1,WKBUFF+CSCNAM	;GET SIXBIT NAME
	PUSHJ	P,.TSIXN		;TYPE IT
	PUSHJ	P,.TTABC
	TYPEIT	<PROCESSOR SERIAL #: >
	MOVE	T1,WKBUFF+CSCNM2	;GET PROCESSOR SERIAL#
	PUSHJ	P,.TDECW		;TYPE IT
	PJRST	.TCRLF

CSCCM6:	TYPEIT	<NODE OFFLINE>
	PUSHJ	P,.TCRLF
	TYPEIT	<	NODE NUMBER: >
	MOVE	T1,WKBUFF+CSCNAM	;GET NODE NUMBER
	PUSHJ	P,.TOCTW		;TYPE IT
	PJRST	.TCRLF

CSCCM7:	TYPEIT	<NODE ONLINE>
	PUSHJ	P,.TCRLF
	TYPEIT	<	NODE NUMBER: >
	MOVE	T1,WKBUFF+CSCNAM	;GET NODE NUMBER
	PUSHJ	P,.TOCTW		;TYPE IT
	PJRST	.TCRLF

CSCC10:	TYPEIT	<SET MEMORY ONLINE>
	PUSHJ	P,.TCRLF
	PUSHJ	P,.TTABC
	PJRST	CSCLS3

CSCLS3:	TRNN	P2,1B35		;1K PER BIT?
	 SETOM	KFLAG		;YES
	MOVE	P1,WKBUFF+CSCNAM	;GET PTR TO BEFORE NXMTAB
	PUSHJ	P,BLDPTR	;CORRECT IT
	MOVE	P2,P1
	MOVE	P1,WKBUFF+CSCNM2	;GET PTR TO AFTER NXMTAB
	PUSHJ	P,BLDPTR
	PUSHJ	P,XORTAB	;FIND DIFFERENCE
	PUSHJ	P,BITLST	;TYPE IT
	POPJ	P,0

CSCC11:	TYPEIT	<SET MEMORY OFFLINE>
	PUSHJ	P,.TCRLF
	PUSHJ	P,.TTABC
	PJRST	CSCLS3

CSCMER:	TYPEIT	<ILLEGAL COMMAND CODE, ABORTING ENTRY>
	JRST	ABORT


	;MSEJOB-- ROUTINE TO DUMP RESULT AND # JOBS
	;AFFECTED FOR CODE 2 ENTRIES

MSEJOB:	TYPEIT	<
	STOPCD NAME:	>
	HLLZ	T1,WKBUFF+MSESPC	;GET NAME BY ITSELF
	PUSHJ	P,.TSIXN		;IN SIXBIT
	MOVEI	T1,[ASCIZ/
	RESULT:		/]
	PUSHJ	P,.TSTRG	;OUTPUT MESSAGE
	MOVEI	T1,NDSTMP
	MOVEI	T2,NDSPER
	MOVE	T3,WKBUFF+MSENDS	;CURRENT COUNTS
	PUSHJ	P,COMPAR		;GO CHECK
	TLNN	F,F.CHNG		;DID IT CHANGE?
	JRST	MSEJB1			;NO-CHECK JOBS
	MOVEI	T1,[ASCIZ/CONTINUED SYSTEM/]
	PUSHJ	P,.TSTRG
MSEJB1:	MOVEI	T1,NJSTMP
	MOVEI	T2,NJSPER
	MOVE	T3,WKBUFF+MSENJS	;GET CURRENT
	PUSHJ	P,COMPAR		;GO CHECK
	TLNN	F,F.CHNG		;DID IT CHANGE?
	 POPJ	P,0			;GO BACK NOW
	MOVEI	T1,[ASCIZ/CRASHED JOB/]
	PUSHJ	P,.TSTRG	;GO SAY WHAT HAPPENED
	POPJ	P,0		;RETURN TO PROCSA	AND LIST
				;JOB INFORMATION FOR EITHER DEBUG
				;OR JOB STOPCD'S.


	;HERE CHECK FOR DETAIL SWITCH AND THEN DUMP CRASH AC'S ETC

MSEDET:	SETZ	P1,
	PUSHJ	P,DETCHK
	TYPEIT	<
	CONTENTS OF AC'S AT STOPCD:
>
	MOVEI	P1,MSEA00	;SETUP
	HRLI	P1,-20
	PUSHJ	P,ACLST		;[427]LIST
	TYPEIT	<

	PI STATUS:	>
	MOVE	T1,WKBUFF+MSEPIS	;GET THAT WORD
	PUSHJ	P,.TXWDW
	PUSHJ	P,TITLST		;START ON NEXT PAGE
	POPJ	P,0			;GO BACK
	;ROUTINES TO SPECL LISTING FOR CODE 50 ENTRIES
	;ER.DLE  DL10 HARDWARE ERRORS

DLELST:	TYPEIT	<
	UNIT:	>
	HLRZ	T1,WKBUFF+DLESTS
	CAILE	T1,7		;IN RANGE?
	 JRST	DLELS1		;OPPPS
	SKIPN	T1
	 JRST	DLELS1		;0?
	MOVE	T1,DLETYP(T1)
	PUSHJ	P,.TSTRG	;SAY TYPE FE

DLELS2:	TYPEIT	<
	DL10 PORT:	>
	HRRZ	T1,WKBUFF+DLEPRT
	PUSHJ	P,.TOCTW
	TYPEIT	<
	ERROR:	>
	MOVEI	T1,11		;MAGIC # FOR DL10 DATAI DLC
	MOVEM	T1,KONTYP
	MOVE	P1,WKBUFF+DLEDTI	;SETUP
	PUSHJ	P,CNIDCD
	PUSHJ	P,.TCRLF
	POPJ	P,0		;RETURN TO PROCSA

DLELS1:	TYPEIT	<UNKNOWN>
	JRST	DLELS2		;THAT'S EASY ENOUGH

DEVCOD:	;0	;ADD IT HERE

DLETYP:	0
	[ASCIZ/	DC76/]
	[ASCIZ/	DC44/]
	[ASCIZ/	DC44&DC76/]
	[ASCIZ/	DECSYNC DC75/]
	[ASCIZ/	DAS78/]
	[ASCIZ/	DC75-DDCMP/]
	[ASCIZ/ DAS85/]


	;HERE DECODE DL10 CONI AND DATAI
	;CONI IS ALREADY IN P2
DLEDCD:	TYPEIT	<
CONTROLLER INFORMATION:
	CONI DLC:	>
	MOVE	T1,P2
	PUSHJ	P,.TXWDW
	MOVEI	T1,10		;OFFSET FOR DL10 CONI
	MOVEM	T1,KONTYP
	TYPEIT	< = >
	MOVE	P1,P2	
	PUSHJ	P,CNIDCD	;GO TRANSLATE
	TYPEIT	<
	DATAI DLC:	>
	MOVEI	T1,11		;OFFSET FOR DATAI DLC
	MOVEM	T1,KONTYP
	MOVE	P1,WKBUFF+DLEDTI	;GET DATAI WD
	MOVE	T1,P1
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	PUSHJ	P,CNIDCD	;TRANSLATE
	POPJ	P,0		;TO PROCSA



	;HERE TO DUMP 11 BASED INFO IF DESIRED
;DLELEI:SETZ P1,
;	PUSHJ	P,DETCHK
;	TYPEIT	<
;11 BASED INFORMATION:
;>
;	HRRZ	P1,WKBUFF+DLESTS	;GET 11 PC WD
;	SKIPN	P1
;	 JRST	DLELE1			;DONT IF 0
;	TYPEIT	<	11 PC:	>
;	MOVE	T1,P1
;	PUSHJ	P,.TOCTW		;IN OCTAL
;	PUSHJ	P,.TCRLF
;DLELE1:	HRRZ	P1,WKBUFF+DLEERR	;GET FAILURE CODE
;	SKIPN	P1
;	 JRST	DLELE2			;AGAIN NOT IF 0
;	TYPEIT	<	11 FAILURE CODE:	>
;	MOVE	T1,P1
;	PUSHJ	P,.TOCTW
;	MOVEI	T1,34			;OFFSET FOR THIS CODE WORD
;	MOVEM	T1,KONTYP
;	TYPEIT	< = >
;	PUSHJ	P,CNIDCD		;TRANSLATE
;	PUSHJ	P,.TCRLF
;DLELE2:	HRRZ	P1,WKBUFF+DLERHS	;GET 11 DL10 STATUS
;	SKIPN	P1
;	 JRST	DLELE3
;	TYPEIT	<	11 STATUS FROM DL10:	>
;	MOVE	T1,P1
;	PUSHJ	P,.TOCTW
;	MOVEI	T1,35			;CORRECT OFFSET
;	MOVEM	T1,KONTYP
;	TYPEIT	< = >
;	PUSHJ	P,CNIDCD		;TRANSLATE THIS TOO
;	PUSHJ	P,.TCRLF
;DLELE3:	MOVE	P1,WKBUFF+DLECOD	;GET 11 STOPCD WORD
;	SKIPN	P1
;	 JRST	DLELE4
;	TYPEIT	<	11 STOPCD:	>
;	MOVE	T1,P1
;	PUSHJ	P,.TSIXN		;IN SIXBIT
;	PUSHJ	P,.TCRLF
;DLELE4:	HLRZ	P1,WKBUFF+DLEPER		;PERIPHERAL?
;	SKIPN	P1
;	 PJRST	TITLST			;START ON NEXT PG & RETURN
;					;TO PROCSA
;	TYPEIT	<	11 DEV:	>
;	MOVE	T1,DEVCOD(P1)		;ASCIZ ADDR
;	PUSHJ	P,.TSTRG
;	TYPEIT	<
;	11 DEV STATUS:	>
;	HRRZ	T1,WKBUFF+DLEPER	;GET DEV'S STATUS REGISTER
;	PUSHJ	P,.TOCTW		;IN OCTAL AND NO TRANSLATION
;	PJRST	TITLST			;THATS ALL-START ON NEXT PAGE 
					;THEN RETURN TO PROCSA
	;TMEA -- ROUTINE TO LIST ERROR CODE 20 ENTRIES.

	FUNMSK==17000	;LOCATION OF FUNCTION MASK IN CONI TMC.
	FUNSFT==11	;HOW FAR TO SHIFT IT.
	DENMSK==300	;MASK FOR DENSITY BITS.
	DENSFT==6	; SHIFTER.
	CORDMP==20000	; CORE DUMP BIT.
	PARTYP==40000	; PARITY BIT.
	STRK==4		;7 TRACK BIT.
	WLOCK==10	;WRITE LOCK BIT.



	;HERE ARE THE MESSAGES FOR THE FUNCTION DECODE
	;AND DENSITY MESSAGES.  INDEXED BY FUNCTION CODE.

FUNMSG:	[ASCIZ\	NO-OP\]

	[ASCIZ\	REWINDING\]
	[ASCIZ\	READ RECORD\]
	[ASCIZ\	READ-COMPARE RECORD\]	
	[ASCIZ\	WRITE\]
	[ASCIZ\	MARK END OF FILE\]
	[ASCIZ\ SPACE RECORDS FORWARD\]
	[ASCIZ\	SPACE RECORDS REVERSE\]
	[ASCIZ\ INTERRUPT WHEN UNIT READY\]
	[ASCIZ\	REWIND AND UNLOAD\]
	[ASCIZ\	READ MULTIRECORD\]
	[ASCIZ\	READ-COMPARE MULTIRECORD\]
	[ASCIZ\	ERASE AND WRITE\]
	[ASCIZ\	ERASE\]
	[ASCIZ\	SPACE FILE FORWARD\]
	[ASCIZ\	SPACE FILE REVERSE\]

DENMSG:	[ASCIZ\	200 BPI,\]
	[ASCIZ\	556 BPI,\]
	[ASCIZ\	800 BPI,\]
	[ASCIZ\	800 BPI,\]
	;EPELOR-- ROUTINE TO BUILD LOGICAL ANDS & ORS
	;OF PDP11 WORDS.  CAN HANDLE TWO SEPERATE WORDS PER CALL
	;SETUP	P1= WORDS TO BE ANDED & ORED
	;	P2=ADDRESS OF WHERE TO BUILD THE LOGICALS
	;	   LH=ADDRESS FOR ANDS
	;	   RH=ADDRESS FOR ORS. EITHER = 0 THEN CORRESPONDING
	;		HALF OF P1 IS LEFT ALONE
	;NOTE P2 IS LEFT UNTOUCHED TO FACILITATE REPEAT CALLS
	;CALL-- PUSHJ	P,EPELOR
	;RTN -- CALL+1
	;USES T1-T4

EPELOR:	HRRZ	T3,P2			;SETUP	INDEX FOR LH WORD
	HLRZ	T4,P2			;AND RH
	SKIPN	T3			;WORK ON LH?
	 JRST 	EPEL.1			;NO
	HLRZ	T1,P1			;LOG AND FIRST
	HLRZ	T2,0(T3)		;GET PREVIOUS RESULT
	AND	T2,T1			;DO IT
	HRLM	T2,0(T3)		;PUT AWAY NEW ANS
	HRRZ	T2,0(T3)
	IOR	T2,T1			;DO IT AGAIN
	HRRM	T2,0(T3)		;PUT AWAY NEW OR
	
EPEL.1:	SKIPN	T4			;WORK ON RH?
	 POPJ	P,0			;NO GO BACK
	HRRZ	T1,P1			;GET RH ALONE
	HLRZ	T2,0(T4)			;GET OLD ANS
	AND	T2,T1			;AGAIN
	HRLM	T2,0(T4)		;PUT IT BACK
	HRRZ	T2,0(T4)			;GET OLD OR
	IOR	T2,T1			; LAST TIME
	HRRM	T2,0(T4)		;PUT IT AWAY
	POPJ	P,0			;RETURN TO CALLER
	;MDELST--	ROUTINES TO DO MOST OF THE WORK TO LIST
	;CODE 11 ENTRIES, MASSBUS DEVICE ERRORS.
	;DEVICE TYPE WORD IS IN P2 WHEN WE GET HERE
	;CALLED VIA PUSHJ FROM PROCSA RETURNS POPJ SEVERAL
	;PAGES FROM HERE.

MDE000:	SIXBIT/RS04/
	SIXBIT/TU16/
	SIXBIT/RP04/
	SIXBIT/RP05/
	SIXBIT/RP06/
	SIXBIT/RM03/
	SIXBIT/RP07/			;[1107]

BLTTAB:	4,,RS4POS			;[1007]
	0,,DUMPOS
	5,,DSKPOS
	6,,DSKPOS
	7,,DSKPOS
	10,,DSKPOS
	11,,DSKPOS			;[1107]

;MOVED ROUTINE TO FIX UP MDEDTP TO LIB EDIT 1007

MDELST:	TYPEIT	<
	UNIT TYPE:	>
	MOVE T1,MDEDTP			;GET TYPE BACK
	MOVE	T1,MDE000(T1)		;GET IT IN SIXBIT
	PUSHJ	P,.TSIXN
	MOVE	P2,WKBUFF+MDEDSN	;GET SER # WORD
	SKIPN	P2			;ANYTHING THERE?
	JRST	MDE001			;GO AROUND
	TYPEIT	<
	UNIT SERIAL #:	>
	PUSHJ	P,DSERCD		;GO PUT OUT SERIAL NUMBER

MDE001:	TYPEIT	<
	MEDIA ID:	>
	MOVE	T1,WKBUFF+MDEMID		;THAT'S WHERE IT SHOULD BE
	PUSHJ	P,.TSIXN			;IN SIXBIT
;	MOVE	T1,MDEDTP			;IS THIS A MAGTAPE?
;	CAIN	T1,1
;	  JRST 	MDE002				;YES
	TYPEIT	<
	STR ID:		>
	MOVE 	T1,WKBUFF+MDESTR		;GO GET IT
	PUSHJ	P,.TSIXN
;	JRST	MDE003				;GO AROUND MAGTAPE
MDE002:	TYPEIT	<
	USER'S ID:	>
	MOVE	T1,WKBUFF+MDEUID		;
	PUSHJ	P,.TPPNW			;
	;HERE TO OUTPUT FAILURE LOCATION

;MDE003:	MOVE T1,MDEDTP				;GET DEV TYPE BACK
;	CAIN	T1,1				;MAGTAPE?
;	  JRST MDE007				;YUP
	
;HERE FOR LBN (RP04 OR RS04)
	TYPEIT	<
	LBN:		>
	MOVE 	T1,WKBUFF+MDELOC		;GET LBN
	PUSHJ	P,.TDECW			;TYPE IN DECIMAL
	TYPEIT	<.  =
	>
	MOVE T1,MDEDTP				;GET TYPE AGAIN
	SKIPN	T1	;RS04?
	  JRST	MDE004				;YES
	SETZ	P2,
	CAIN	T1,2		;RP04?
	 HRRZI	P2,5	;SAY SO
	CAIN	T1,3	;RP05?
	 HRRZI	P2,6		;SET INDEX TO POINT AT RP05
	CAIN	T1,4		;RP06?[310]
	 HRRZI	P2,7	;SAY SO
	CAIN	T1,5			;RMO3?
	 HRRZI	P2,10			;SAY SO
	CAIN	T1,6			;[1107]RP07?
	 HRRZI	P2,11
	MOVE	P3,WKBUFF+MDELOC
	;[1133]
	CAIN	P2,10	;RM03?
	 JRST	[	CAIGE	P3,^D123000	;REAL VALUE
			 JRST	MDE005		;OK
			SUBI	P3,^D123000
			JRST	.-1		;GO BACK AND CHECK AGAIN
			]
	;END [1133]
	CAMGE	P3,.MXBLK(P2)			;[144]1ST UNIT OF STR?
	 JRST	MDE005				;OK
	SUB	P3,.MXBLK(P2)			;- 1 UNITS WORTH
	JRST	.-3				;AND TRY AGAIN
MDE005:	TYPEIT	<CYL:   >
	;[1133]
	CAIN	P2,10			;RM03?
	 JRST	[	IDIVI	P3,^D150	;REAL VALUE FOR TOPS-10
			JRST	.+2		;JRST TO THE MOVE INST.
		]
	;END[1133]
	IDIV	P3,.TRBLK(P2)			;GET CYL #
	MOVE	T1,P3
	PUSHJ	P,.ODECW			;SAY IT IN DECIMAL
	MOVE	P3,P4				;REMAINDER
	TYPEIT	<	SURF:   >
	IDIV	P3,.SUBLK(P2)			;SURFACE #
	MOVE	T1,P3
	PUSHJ	P,.ODECW			;AGAIN WITH ".".
	TYPEIT	<	SECT:   >
	MOVE	P3,P4				;REMAINDER
	IMUL	P3,.SECBK(P2)			;X BLOCKS/SECTOR
	MOVE	T1,P3
	PUSHJ	P,.ODECW
	JRST	MDE010				;GO AROUND MAGTAPE
	;HERE FOR LBN FOR RS04

MDE004:	MOVE	P3,WKBUFF+MDELOC		;GET LBN
	CAMGE	P3,.MXBLK+4			;[144]1ST UNIT IN STR?
	 JRST	MDE006				;YES-OK
	SUB	P3,.MXBLK+4			;-1 UNITS WORTH
	JRST	.-3				;TRY AGAIN
MDE006:	TYPEIT	<TRACK:   >
	IDIV	P3,.TRBLK+4			;GET TRK #
	MOVE	T1,P3
	PUSHJ	P,.ODECW			;SAY IT WITH FLOWERS
	MOVE	P3,P4				;REMAINDER
	TYPEIT	<	SECT:   >
	IMUL	P3,.SECBK+4			;GET SECTOR #
	MOVE	T1,P3
	PUSHJ	P,.ODECW
	JRST	MDE010				;GO AROUND MAGTAPE

	;HERE FOR MAGTAPE FAILURE LOCATION
;MDE007:	TYPEIT	<	LOCATION:    RECORD  #  >
;	HLRZ	T1,WKBUFF+MDELOC
;	PUSHJ	P,.ODECW
;	TYPEIT	<    OF FILE #  >
;	HRRZ	T1,WKBUFF+MDELOC
;	PUSHJ	P,.ODECW
	
;HERE AFTER DUMPING FAILURE LOCATION - NOW TO DUMP
	;OPERATION ISSUED TO DEVICE
MDE010:	TYPEIT	<
	OPERATION AT ERROR:	>
	HRLZ	T1,WKBUFF+MDEICR	;GET ISSUED CONTROL REG.
	MOVE	T2,MDEDTP		;SETUPINDEX
	PUSHJ	P,@MDE011(T2)		; LET ROUTINE DO WORK

	;HERE TO DUMP USER'S INFORMATION
	TYPEIT	<
	USER'S ID:	>
	MOVE	T1,WKBUFF+MDEUID	;
	PUSHJ	P,.TPPNW
	MOVEI	P1,[ASCIZ/
	USER'S PGM:	/]
	MOVE	P2,WKBUFF+MDEPGM
	PUSHJ	P,.SIXBT
	MOVEI	T1,[ASCIZ/
	USER'S	FILE:	/]
	PUSHJ	P,.TSTRG
	MOVE	T1,WKBUFF+MDEFIL
	HLRZ	T2,WKBUFF+MDEEXT	;GET EXTENSION
	CAIN	T2,'UFD'		;UFD'S GET DIFFERENT TREATMENT
	 PUSHJ	P,[PUSHJ	P,.TPPNW
		   AOS		0(P)
		   POPJ		P,0]
	PUSHJ	P,.TSIXN
	MOVEI	P1,[ASCIZ/./]
	HLLZ	P2,WKBUFF+MDEEXT	;ONCE MORE
	PUSHJ	P,.SIXBT
	;HERE TO OUTPUT BASIC TRANSLATION OF CONI OR SOFTWARE ERROR
	;IF SOFTWARE ERROR (RIB ETC) S HAS BEEN SET UP AS A DUMMY
	;CONI WORD BY BIT CHECKING AND SUM ROUTINES.
	;MODIFIED BY EDIT 142 TO CHECK FOR SOFTWARE ERROR FIRST
	;AND DONT LIST MUCH IF IT WAS AS CONI,DATAI
	;ETC MAY BE MISLEADING(FROM PREVIOUS ERROR)
	;MODIFIED WITH EDIT 313 FOR RH20
	;ALSO MODIFIED WITH EDIT 1133 TO SUPPORT KS10&RH11

	TYPEIT	<
	ERROR:	>
	MOVE	P3,MASKON	;CONTROLLER OFFSET, 4=RH10,5=RH20,6=RH11
	CAIN	P3,6		;RH11?
	 MOVEI	P3,14		;THE CORRECT OFFSET FOR KONTYP,ETC.
	MOVEM	P3,KONTYP	;SAVE THE CORRECT VALUE
	MOVE	P2,WKBUFF+MDECNI	;GET CONI AT ERROR
	;[1133]
	CAIN	P3,14		;IF RH11,
	 HRRZ	P2,WKBUFF+MDECNI	;JUST GET CONTROL&STATUS1 TO RIGHTHALF
	;END[1133]
	MOVE	P4,KONMSK(P3)		;AND MASK
	TDNN	P2,P4			;ANY ERROR BITS ON?
	 JRST	MDE013			;NO-MUST BE SOFTWARE
	MOVE	P2,WKBUFF+MDETYP	;GET DEVICE TYPE
	TLNE	P2,ERRHRD		;HARD ERROR?
	 MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]
	TLNN	P2,ERRHRD		;TRY AGAIN
	 MOVEI	T1,[ASCIZ/RECOVERABLE /]	;NOW T1 IS SETUP FOR EITHER
	PUSHJ	P,.TSTRG		;SAY IT IN ASCIZ
	;[1133]
	MOVE	T1,MASKON		;GET CONTROLLER TYPE
	CAIN	T1,6			;IF RH11,
	 JRST	MDE12A			;GO DO RH11 TRANSLATIONS.
	;END[1133]
	HLRZ	T1,P2			;GET CONTROLLER TYPE
	TRNN	T1,10			;RH10?
	 JRST	MDE012			;NOPE
	MOVEI	P3,4			;YUP - SETUP RH10INDEX
	MOVEM	P3,KONTYP		;AND STORE IT
	MOVE	P2,WKBUFF+MDECNI	;GET CONI AT ERROR
	MOVE	P4,KONMSK(P3)		;AND MASK
	AND	P2,P4			;YES GET ERROR BITS ALONE
	LSH	P2,@MINERB(P3)		;MOVE THEM OVER
	HRRZI	P4,RH10DV		;FINISH SETUP
	PUSHJ	P,JFLOOP		;GO DO TRANSLATION
	JRST	MDE014			;GO AROUND RH20 & SOFTWARE

	;HERE TO TRANSLATE FOR RH20
MDE012:	MOVEI	P3,5		;SETUP
	MOVEM	P3,KONTYP		;STORE IT
	MOVE	P2,WKBUFF+MDECNI	;GET ERROR CONI
	MOVE	P4,KONMSK(P3)		;GET MASK
	AND	P2,P4			;ERROR BITS ALONE
	LSH	P2,@MINERB(P3)		;MOVE THEM OVER
	HRRZI	P4,RH20DV		; SETUP TABLE ADDR
	PUSHJ	P,JFLOOP		;HE'LL DOTHE WORK
	JRST	MDE014			;GO AROUND SOFTWARE


	;ADDED WITH [1133]
	;HERE TO TRANSLATE FOR RH11
MDE12A:	MOVEI	T1,15			;OFFSET FOR C&S2
	MOVEM	T1,KONTYP
	HLLZ	P1,WKBUFF+MDECNI	;GET THE VALUE
	PUSHJ	P,CNIDCD		;DO DECODE
	TYPEIT	< IN CONTROLLER STATUS 2,
		>
	MOVEI	T1,14		;PROPER OFFSET FOR KONTYP
	MOVEM	T1,KONTYP
	HRRZ	P1,WKBUFF+MDECNI	;GET C&S1 AT ERROR
	PUSHJ	P,CNIDCD	;GO DO DECODE
	TYPEIT	< IN CONTROLLER STATUS 1,
		>
	JRST	MDE14B		;NOW CHECK DEV ERROR REG.
	;END [1133]

	;HERE TO SCREAM ABOUT SOFTWARE DET ERROR
MDE013:	SKIPN	S		;ANY SOFTWARE DETECTED ERRORS?
	 JRST	MDE13C		;NO-CHECK FOR OFFLINE'S
	TYPEIT	< NON-RECOVERABLE SOFTWARE DETECTED  >
	MOVEI	T1,2			;SOFTWARE INDEX
	MOVEM	T1,KONTYP
	MOVE	P2,S			;DUMMY CONI WORD
	LSH	P2,@MINERB(T1)		;MOVE OVER
	MOVE	P4,DEVTYP(T1)		;TABLE ADDR
	PUSHJ	P,JFLOOP
	JRST	MDE14A		;


	;[152]
MD013A:	TYPEIT	<    ***** EITHER MOL OR DRY OR BOTH BITS ARE OFF
		IN DEVICE STATUS REG *****>
	JRST	MDE014			;KEEP ON LISTING
MDE13C:	HRRZ	P2,WKBUFF+MDEDSR	;[152]GET DEVICE STATUR REG
	TRNE	P2,1B23			;EITHER MOL OR DRY
	TRNN	P2,1B28
	 JRST	MD013A			;IS OFF
	JRST	MDE014		;NONE-CONTINUE
	;CODE ADDED WITH EDIT 122

MDE014:	;[1133]
	MOVE T1,MASKON	
	CAIN T1,6		;RH11?
	 JRST MDE14B		;YES
	;END [1133]
	TYPEIT	< IN CONTROLLER CONI
		>
MDE14B:	HRLZ	P1,WKBUFF+MDEDER	;GET DEV ERROR REG
	MOVE	T1,MDEDTP		;AND DEV TYPE
	MOVEI	T2,21		;ASSUME RP04,5,OR6
	SKIPN	T1		;BUT CHECK
	 MOVEI	T2,25		;FOR RS04
	;[1133]
	CAIN	T1,5		;CHECK FOR RM03
	 MOVEI	T2,21		;ALSO THE VALUE FOR THIS DEVICE
	;END[1133]
	MOVEM	T2,KONTYP	;FINISH SETUP
	PUSHJ	P,CNIDCD	;TRANSLATE DEV ERROR REGISTER TOO
	TYPEIT	< IN DEVICE ERROR REGISTER>
	;END [326]
MDE14A:	LDB	P1,[POINT 9,WKBUFF+MDECCT,17]	;GET BAT SLOTS
	TYPEIT	<
	REMAINING ENTRIES IN
	UNIT'S BAT BLOCK:	>
	MOVE	T1,P1
	CAIN	T1,777		;UNKNOWN?
	 JRST 	MDE13A		;YES
	PUSHJ	P,.ODECW	;SAY IT IN DECIMAL
	JRST	MDE13B		;GO AROUND
MDE13A:	TYPEIT	<UNKNOWN>

	;HERE TO DUMP RETRIES AND CONTROLLER INFORMATION
MDE13B:	TYPEIT	<
	RETRY COUNT:	>
	HRRZ	T1,WKBUFF+	MDETYP	;GET RETRY COUNT
	PUSHJ	P,.ODECW		;TYPE # & .
	PUSH	P,P1
	SETZ	P1,
	PUSHJ	P,DETCHK	;/DETAIL??
	POP	P,P1
	TYPEIT	<
CONTROLLER INFORMATION:
	CONTROLLER:	>
	MOVE	P4,MASKON		;[552]GET TYPE
	CAIN	P4,4			;RH10?
	 MOVEI	T1,[ASCIZ/ RH10/]	;YES
	CAIN	P4,5			;RH20?
	 MOVEI	T1,[ASCIZ/ RH20/]	;YES
	CAIN	P4,6			;RH11?
	 MOVEI	T1,[ASCIZ/ RH11/]	;YES
	PUSH	P,P4			;SAVE CONT. TYPE
	PUSHJ	P,.TSTRG		;TYPE EITHER
	TYPEIT	<  #>
	MOVE	P4,WKBUFF+MDETYP	;GET CONTROLLER TYPE,ETC
;[1103]	HLRZ	T1,P4
;[1103]	ANDI	T1,7			;GET CONTROLLER #
	LDB	T1,[POINT 7,P4,11]	;[1103] GET THE ADDR
	LSH	T1,2			;[1103]MOVE IT LEFT 2 PLACES
	PUSHJ	P,.TOCTW		;TYPE IT TOO
	;[1133]
	POP	P,T1			;GET BACK CONT. TYPE
	CAIN	T1,6			;IF RH11
	 JRST	MDE021			;GO DO PROPER TRANSLATIONS
	;END[1133]
	TYPEIT	<
	CONI AT ERROR:	>
	HRRZ	T1,WKBUFF+MDECNI	;GET ERROR CONI
	PUSHJ	P,.TXWDW		;IN HALF WORD
	TYPEIT	< = >
	TLNN	P4,10			;RH10?
	 MOVEI	T1,5			;NO
	TLNE	P4,10
	MOVEI 	T1,4			;YES
	MOVEM	T1,KONTYP
	MOVE	P1,WKBUFF+MDECNI
	TDNN	P1,KONMSK(T1)		;ANY ERROR BITS?
	 JRST	MDE015			;NO
	PUSHJ	P,CNIDCD		;YES GO TRANSLATE
	JRST	MDE016			;GO AROUND
MDE015:	TYPEIT	< NO ERROR BITS DETECTED>
MDE016:	TYPEIT	<
	CONI AT END:	>
	HRRZ	T1,WKBUFF+MDECNF
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVE	P1,WKBUFF+MDECNF
	MOVE	T2,KONTYP
	TDNN	P1,KONMSK(T2)		;ANY ERRORS
	 JRST	MDE017		;NO
	PUSHJ	P,CNIDCD
	JRST	MDE17A		;GO AROUND
MDE017:	TYPEIT	< NO ERROR BITS DETECTED>

	;HERE TO DUMP DATAI'S
MDE17A:	MOVE	T1,KONTYP	;GET KONTROLLER TYPE
	PUSH	P,T1		;SAVE KONTYP
	CAIN	T1,4		;RH20?
	 JRST 	MDE020	;NO, DON'T LIST CHN STATUS
	TYPEIT	<
	  CHN STATUS AT ERROR:	>
	HLLZ	T1,WKBUFF+MDECNI
	MOVE P1,T1
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVEI	T1,13		;OFFSET IN SYSERB TO RHSW VALUES
	MOVEM	T1, KONTYP
	PUSHJ	P,CNIDCD
	TYPEIT	<
	  CHN STATUS AT END:	>
	HLLZ	T1,WKBUFF+MDECNF
	MOVE P1,T1
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	PUSHJ	P,CNIDCD
MDE020:	POP	P,T1		;GET KONTYP BACK
	MOVEM 	T1,KONTYP
	TYPEIT	<
	DATAI >
	MOVE	P2,KONTYP		;GET CONTROLLER TYPE
	TRNE	P2,1			;RH10=4,RH20=5
	 MOVEI	P4,[ASCIZ/PTCR/]
	TRNN	P2,1
	 MOVEI	P4,[ASCIZ/RHCR/]
	MOVE	T1,P4
	PUSHJ	P,.TSTRG		;FINISH TYPING DATAI NAME
	TYPEIT	< AT ERROR:	>
	MOVE	T1,WKBUFF+MDEDTI
	PUSHJ	P,.TXWDW		;TYPE IN HALF WORD
	TYPEIT	<
	DATAI >
	MOVE	T1,P4			;WE SAVED IT BEFORE
	PUSHJ	P,.TSTRG
	TYPEIT	< AT END:	>
	MOVE	T1,WKBUFF+MDEDTF
	PUSHJ	P,.TXWDW
	TYPEIT	<
	DATAI >
	TRNE	P2,1			;WE SAVED THIS TOO
	 MOVEI	P4,[ASCIZ/PBAR/]	;FOR RH20
	TRNN	P2,1
	 MOVEI	P4,[ASCIZ/RHDB/]	;FOR RH10
	MOVE	T1,P4
	PUSHJ	P,.TSTRG
	TYPEIT	< AT ERROR:	>	;FINISH 
	MOVE	T1,WKBUFF+MDE2DT	;GET SECOND DATAI WORD
	PUSHJ	P,.TXWDW
	TYPEIT	<
	DATAI >
	MOVE	T1,P4			;GET REG NAME BACK
	PUSHJ	P,.TSTRG	
	TYPEIT	< AT END:	>
	MOVE	T1,WKBUFF+MDE2DF
	PUSHJ	P,.TXWDW
;SETUP AND CALL ROUTINES TO DUMP 16 DEVICE REGISTERS

;	HRRZ	T1,WKBUFF+MDECNI	;GET CONI EDIT 135
;	MOVEI	T2,4			;OFFSET FOR RH10
;	TDNN	T1,KONMSK(T2)		;IF NO ERROR BITS DON'T LIST 
;	SKIPE	S		;IF NON-ZERO-NO MORE LISTINGS
;	 POPJ	P,0			;DON'T LIST DEVICE REGS.
;	TLNN	F,F.DET			;EDIT 116-DID USER SAY /DETAIL?
;	 PJRST	TAPL11			;NO-DON'T DO ANY MORE.

MDE20A:	TYPEIT	<
DEVICE REGISTER INFORMATION:
		AT ERROR	AT END		DIFF.		TEXT
>
	MOVE	P1,[XWD 1,20]		;SETUP P1 FOR MODE 1 AND 20 ITEMS
				;STARTING ADDR OF TABLE
						;OF SIXBIT REG NAMES
	MOVE	T1,MDEDTP			;GET DEVICE TYPE
	MOVE	P2,MSCNTL(T1)		;SETUP P2
	MOVE	P3,[XWD MDEDCR,MDEDCR]	;WHERE TO FIND WORDS.
	PUSHJ	P,HWDUMP			;IF ALL GOES WELL
	PUSHJ	P,TITLST	;EDIT 116 START ON NEXT PAGE
	POPJ	P,0		;WE'RE DONE!



	;[1133]
	;HERE TO DO DECODE OF RH11 CONTROLLER VALUES

MDE021:	TYPEIT	<
	RH11 CONTROLLER STATUS 1 AT ERROR:	>
	HRRZ	T1,WKBUFF+MDECNI		;GET IT
	PUSH	P,T1				;SAVE IT
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	MOVEI	T1,14				;CS1 OFFSET
	MOVEM	T1,KONTYP
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 1 AT END:	>
	HRRZ	T1,WKBUFF+MDECNF		;GET IT
	PUSH	P,T1				;SAVE IT
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 2 AT ERROR:	>
	HLLZ	T1,WKBUFF+MDECNI		;GET IT
	PUSH	P,T1				;SAVE IT
	HLRZ	T1,T1				;MOVEI IT OVER
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	MOVEI	T1,15				;CS2 OFFSET
	MOVEM T1,KONTYP
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 2 AT END:	>
	HLLZ	T1,WKBUFF+MDECNF		;GET IT
	PUSH	P,T1				;SAVE IT
	HLRZ	T1,T1				;MOVE IT OVER
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	PUSHJ	P,CNIDCD
	TYPEIT	<
	UBA STATUS AT ERROR:	>
	MOVE	T1,WKBUFF+MDEDTI
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA STATUS AT END:	>
	MOVE	T1,WKBUFF+MDEDTF
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA MAP AT ERROR:	>
	MOVE	T1,WKBUFF+MDE2DT
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA MAP AT END:		>
	MOVE	T1,WKBUFF+MDE2DF
	PUSHJ	P,.TXWDW
	JRST MDE20A	;FOR NOW
	;SOME TABLES AND ROUTINES USED WITH MASBUSS ENTRIES
	;FIRST THE TABLE OF SIXBIT REGISTER NAMES
	;CHANGED TO FIT TRAINING'S REQUIREMENTS WITH VER 3C.
MASREG:	SIXBIT/CR(00)/
	SIXBIT/SR(01)/
	SIXBIT/ER(02)/
	SIXBIT/MR(03)/
	SIXBIT/AS(04)/
	SIXBIT/DA(05)/
	SIXBIT/DT(06)/
	SIXBIT/LA(07)/
	SIXBIT/SN(10)/
	SIXBIT/OF(11)/
	SIXBIT/DC(12)/
	SIXBIT/CC(13)/
	SIXBIT/E2(14)/
	SIXBIT/E3(15)/
	SIXBIT/EP(16)/
	SIXBIT/PL(17)/


RM03RG:	SIXBIT/CS1 00/		;CONTROL & STATUS #1
	SIXBIT/DS  01/		;DRIVE STATUS
	SIXBIT/ER1 02/		;ERROR REGISTER #1
	SIXBIT/MR1 03/		;MAINTENANCE REGISTER #1
	SIXBIT/AS  04/		;ATTENTION SUMMARY
	SIXBIT/DA  05/		;DESIRED SECTOR/TRACK ADDRESS
	SIXBIT/DT  06/		;DRIVE TYPE
	SIXBIT/LA  07/		;LOOK AHEAD
	SIXBIT/SN  10/		;SERIAL NUMBER
	SIXBIT/OF  11/		;OFFSET
	SIXBIT/DC  12/		;DESIRED CYLINDER
	SIXBIT/HR  13/		;**HOLDING REGISTER**
	SIXBIT/MR2 14/		;MAINTENANCE REGISTER #2
	SIXBIT/ER2 15/		;ERROR REGISTER #2
	SIXBIT/EC1 16/		;ECC POSITION REGISTER
	SIXBIT/EC2 17/		;ECC PATTERN REGISTER


	;NOW THE CONTROL TABLE ADDRESSES

MSCNTL:	XWD	MASREG,RS04CT
	XWD	TU6REG,TU16CT
	XWD	MASREG,RP04CT
	XWD	MASREG,RP05CT
	XWD	MASREG,RP05CT
	XWD	RM03RG,RM03CT		;[1107]RM03 
	XWD	MASREG,RP05CT		;[1107] RP07


	;SIXBIT REGISTER NAMES FOR TU16
TU6REG:	SIXBIT/CR(00)/
	SIXBIT/SR(01)/
	SIXBIT/ER(02)/
	SIXBIT/MR(03)/
	SIXBIT/AS(04)/
	SIXBIT/FC(05)/
	SIXBIT/DT(06)/
	SIXBIT/CK(07)/
	SIXBIT/SN(10)/
	SIXBIT/TC(11)/
	SUBTTL SUPPORT FOR CODE 12 ENTRIES-DX20/TOPS-10 


	;DXE000 ETC--	ROUTINES TO DO MOST OF THE WORK TO LIST
	;CODE 12 ENTRIES, DX20 DEVICE ERRORS.
	;DEVICE TYPE WORD IS IN P2 WHEN WE GET HERE
	;CALLED VIA PUSHJ FROM PROCSB RETURNS POPJ SEVERAL
	;PAGES FROM HERE.


	;SETUP FOR SUB-BLOCK INDEX POINTERS


DXE000:	HRRZ	T3,WKBUFF+DXEMBR	;MASBUSS REG SUB-BLOCK POINTER
	ADDI	T3,WKBUFF		;CREATE BUFFER POINTER
	MOVEM	T3,SUBLK1		;SAVE IT
	HRRZ	T4,WKBUFF+DXEDVL	;DEVICE VALUE SUB-BLOCK POINTER
	ADDI	T4,WKBUFF		;CREATE BUFFER POINTER
	MOVEM	T4,SUBLK2		;SAVE IT
	MOVEI	T3,5
	MOVEM	T3,MASKON

	;TYPE UNIT TYPE & S/N

	ADDI	T4,DTXSBB	;SETTING UP TO GET RIGHT INFO
	MOVE	T3,@T4		;GETTING RIGHT INFO
	LDB	T1,[POINT 4,T3,27]	;DEVICE NAME SENSE BYTE
	CAIN	T1,5	;TEST FOR TU70
	 JRST	TU70	;YES, ITS TU70
	CAIN	T1,14	;TEST FOR TU72
	 JRST	TU72	;YES, ITS TU72
	CAIN	T1,15	;TEST FOR TU73
	 JRST TU73	;YES, ITS TU73 OR NOTHING
	 JRST NOSUCH	;ITS NOTHING
TU70:	TYPEIT	<
	UNIT TYPE:	TU70>	
	POPJ	P,0
TU72:	TYPEIT	<
	UNIT TYPE:	TU72>
	JRST	DXE00A
TU73:	TYPEIT	<
	UNIT TYPE:	TU73>
	 JRST	DXE00A
NOSUCH:	TYPEIT	<
	UNIT TYPE:	UNKNOWN>
	POPJ	P,0

	;NOW FOR SERIAL #
DXE00A:	MOVE	T3,SUBLK2
	ADDI	T3,DTXSBE
	LDB	T1,[POINT 8,0(T3),9]	;LOW PART
	SUBI	T3,1
	LDB	T2,[POINT 8,0(T3),35]	;HIGH PART
	DPB	T2,[POINT 8,T1,27]	;COMBINE HIGH & LOW PARTS
	SKIPN	T1			;ANYTHING THERE?
	 JRST	DXE001
	PUSH	P,T1			;SAVE WHAT TO LIST
	TYPEIT	<
	UNIT SERIAL #:	>
	POP	P,T1			;RESTORE WHAT TO LIST
	PJRST	.ODECW			;OUTPUT IN DECIMAL
	POPJ	P,0

	;ROUTINE TO OUTPUT FAILURE LOCATION

DXE001:	TYPEIT	<
	LOCATION:    RECORD  #	>
	HRRZ	T1,WKBUFF+DXELOC	;GET LOCATION WORD
	PUSHJ	P,.ODECW		;OUTPUT IN DECIMAL
	TYPEIT	<    OF FILE #	>
	HLRZ	T1,WKBUFF+DXELOC	;GET FILE #  PART
	PUSHJ	P,.ODECW		;OUTPUT IN DECIMAL

	;NOW DUMP OPERATION ISSUED TO DEVICE

	TYPEIT	<
	OPERATION AT ERROR:	>
	HRRZ	P4,WKBUFF+DXEICR	;GET ISSUED CONTROL REGISTER
;	TRNN	P4,1B24		;AVAIL
;	 JRST	.+3		;NO
;	TYPEIT	<DEV. AVAIL>	;YES
	TRNN	P4,1B35		;GO ?
	 JRST	.+3		;NO
	TYPEIT	<GO>		;YES
	ANDI	P4,77		;GET FUNCTION
	LSH	P4,-1		;MOVE OVER
	HRRZ	T1,DX2FUN(P4)	;GET STRING ADDR
	PJRST	.TSTRG	;TYPE OUT
	;MORE EDIT [510]

	;ROUTINE TO TYPE OUT ERROR INFORMATION
	;ALSO OUTPUTS CONTROLLER CONI INFO IF /DETAIL  IS SET
	;CALLED WITH CONI RH IN P2


DXE002:	TYPEIT	<
	ERROR:	>
	MOVEI	T1,[ASCIZ/RECOVERABLE /]	;ASSUME LUCK
	MOVE	T2,WKBUFF+DXEFES	;GET STATUS WORD
	TLNE	T2,1B20			;HARD ERROR?
	 MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]	;OPPS
	PUSHJ	P,.TSTRG
	MOVE	T1,MASKON		;KONTROLLER TYPE  (RH20)
	MOVEM	T1,KONTYP
	MOVE	P1,P2			;FINISH SETUP
	PUSHJ	P,CNIDCD		;GO DECODE
	TYPEIT	< IN CONTROLLER CONI
		>
	MOVE	T3,SUBLK1		;GET SUB-BLOCK POINTER
	HRLZ	P1,DMXER(T3)		;GET DEVICE ERROR REGISTER
	MOVEI	T1,42			;BETTER BE TU70!!!
	MOVEM	T1,KONTYP		;FINISH SETUP
	PUSHJ	P,CNIDCD		;GO TRANSLATE
	TYPEIT	< IN DEVICE ERROR REGISTER>
	PUSHJ	P,.TCRLF
	PUSH	P,P1
	SETZ	P1,
	PUSHJ	P,DETCHK	;SAID /DETAIL?
	POP	P,P1
	TYPEIT	<CONTROLLER INFORMATION:
	CONTROLLER:	>
;	MOVE	T2,MASKON		;GET CONTROLLER TYPE
	MOVE	T1,[SIXBIT/RH20 #/]	;ASSUME RH20
	PUSHJ	P,.TSIXN
	PUSHJ	P,.TSPAC
	LDB	T1,[POINT 9,WKBUFF+DXETYP,17]
	PUSHJ	P,.TOCTW		;DUMP IN OCTAL
	TYPEIT	<  DX20 #:>
	LDB	T1,[POINT 9,DXETYP,8]
	PUSHJ	P,.TOCTW

	;START [716-RLD]
	HRRZ	T1,WKBUFF+DXEDVL	;GET PNTR
	MOVE	T2,WKBUFF+DTXSBC(T1)	;[721]GET SENSE BYTES 8-11
	MOVEI	T1,[ASCIZ/-TX02  	/]	;ASSUME TX02
	TLNN	T2,1B32			;[721]REALLY BIT 14 SB.-9,B4
	 MOVEI	T1,[ASCIZ/-TX01  	/]	;BETTER CHANGE
	PUSHJ	P,.TSTRG		;PRINT SOMETHING
	;END[716]
;	HRRZ	T1,WKBUFF+DX%UAD	;GET LOGICAL ADDRESS
;	PUSHJ	P,.TOCTW		;LIST IN OCTAL

	;START [716-RLD]
	TYPEIT	<
	DX20 U-CODE VERSION:	>
	LDB	T1,[POINT 6,WKBUFF+DXEVER,25]	;[720]GET VERSION #
	PUSHJ	P,.TOCTW
	TYPEIT	<(>
	LDB	T1,[POINT ^D10,WKBUFF+DXEVER,35]	;[720]AND EDIT #
	PUSHJ	P,.TOCTW
	TYPEIT	<)>
	;END [716-RLD]
	;NOW DO CONI'S
	TYPEIT	<
	CONI AT ERROR:	>
	MOVE	T1,MASKON		;GET CONTROLLER TYPE
	MOVEM	T1,KONTYP
	MOVE	T1,WKBUFF+DXECNI
	MOVE	P1,T1			;FINISH SETUP
	PUSHJ	P,.TXWDW		;IN HALF WORD FORMAT
	TYPEIT	< = >
	PUSHJ	P,CNIDCD	;GO DECODE
	TYPEIT	<
	CONI AT END:	>
	MOVE	T1,WKBUFF+DXECIF
	MOVE	P1,T1
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	PUSHJ	P,CNIDCD
	POPJ	P,0			;RETURN

	;END EDIT [510]
;HERE LIST CHANNEL STATUS,MASSBUS INFO AND A WHOLE
;LOT OF DEVICE INFO.

DXE003:	PUSHJ	P,CHNSTS	;LIST CHANNEL TYPE, ETC
	;NOW LIST MASSBUS REGISTER VALUES 
	TYPEIT	<
MASSBUS REGISTER INFORMATION:
		AT ERROR	AT END		DIFF.		TEXT
>
	MOVE P1,[XWD 1,7]	;MODE 1,7 ITEMS TO LIST
	MOVE	P2,[XWD DX2REG,DX20CT]	;TABLE OF REGISTER NAMES,,CONTROL
					;TABLE ADDRESSES
	HRRZ	P3,WKBUFF+DXEMBR	;GET OFFSET TO BLOCK OF DATA
	HRL	P3,P3			;AT END & AT ERROR ARE AT SAME PLACE
	PUSHJ	P,HWDUMP		;GO DO THE LISTING
	MOVE	P1,[XWD 1,17]		;NOW DO SECOND HALF[714]
	MOVE	P2,[XWD DX2RG1,DX20C1]	;ADJUSTED CONTROL TABLES
	HRRZ	P3,WKBUFF+DXEMBR	;WHERE TO START
	ADDI	P3,DMXSI		;ADJUSTED FOR THOSE WE DID
	HRL	P3,P3
	PUSHJ	P,HWDUMP		;LIST THE REST OF 'EM
	;NOW LIST THE DEVICE INFO, SENSE BYTES ETC
	;FIRST RE-PACKAGE THE BYTES IN PLACE

	HRRZ	P1,WKBUFF+DXEDVL	;GET THE OFFSET
	ADDI	P1,WKBUFF
	MOVEI	T1,24			;A PASS COUNTER
DXE03A:	LDB	T2,[POINT 8,@P1,9]	;EXTRACT A BYTE
	DPB	T2,[POINT 8,T3,7]	;REPLACE IT
	LDB	T2,[POINT 8,@P1,17]	;EXTRACT A BYTE
	DPB	T2,[POINT 8,T3,15]	;REPLACE IT
	LDB	T2,[POINT 8,@P1,27]	;EXTRACT A BYTE
	DPB	T2,[POINT 8,T3,23]	;REPLACE IT
	LDB	T2,[POINT 8,@P1,35]	;EXTRACT A BYTE
	DPB	T2,[POINT 8,T3,31]	;REPLACE IT
	MOVEM	T3,@P1			;REPLACE THE WORD
	AOS	P1			;BUMP THE POINTER
	SOJN	T1,DXE03A		;GET NEXT IF ANY

	;NOW USE HWDUMP TO LIST ALL THESE VALUES
	TYPEIT	<
DEVICE INFORMATION RECORDED AT TIME OF ERROR
	REGISTER  CONTENTS	TEXT
>
	MOVE	P1,[XWD 4,24]	;PRINT MODE 4,24 ITEMS
	MOVE	P2,[XWD DX2NAM,DX2CTL]
	HRLZ	P3,WKBUFF+DXEDVL	;OFFSET TO AT ERROR VALUES
	PUSHJ	P,HWDUMP
	POPJ	P,0


DXE004:	TYPEIT	<
	RETRIES PERFORMED:	>
	HRRZ	T1,P2			;MB%FEC / DX%FEC HAS RETRIES(?)
	PUSHJ	P,.ODECW
	POPJ	P,0
;CHNSTS--ROUTINE TO LIST CHANNEL STATUS
;P2 HOLDS FIRST WORD,  DEPENDS ON IDENTICAL OFFSETS TO
;INFO AS ARE USED IN SEC%MB ENTRY FORMAT

CHNSTS:	TYPEIT	<
CHANNEL INFORMATION:
	CHAN STATUS WD 0:	>
	MOVE	T1,P2
	PUSHJ	P,.TXWDW
	TYPEIT	<	CW1:  >
	MOVE	T1,WKBUFF+DXECC1	;1ST CCW
	PUSHJ	P,.TXWDW
	TYPEIT	<  CW2:  >
	MOVE	T1,WKBUFF+DXECC2	;2ND CCW
	PUSHJ	P,.TXWDW
	TYPEIT	<
	CHN STATUS WD 1:	>
	MOVE	T1,WKBUFF+DXECS1
	MOVE	P1,T1			;SAVE IT
	PUSHJ	P,.TXWDW
	MOVEI	T1,13			;CORRECT OFFSET
	MOVEM	T1,KONTYP		;FINISH SETUP
	TYPEIT	< = >
	PUSHJ	P,CNIDCD
	TYPEIT	<
	CHN STATUS WD 2:	>
	MOVE	T1,WKBUFF+DXECS2
	PUSHJ	P,.TXWDW
	POPJ	P,0	;RETURN TO CALLER
	;HERE ARE REGISTER NAMES AND CONTROL TABLES FOR HWDUMP
	;USED WITH DX20 ENTRIES

DX2REG:	SIXBIT/CR(00)/
	SIXBIT/SR(01)/
	SIXBIT/ER(02)/
	SIXBIT/MR(03)/
	SIXBIT/AS(04)/
	SIXBIT/SB(05)/
	SIXBIT/DT(06)/
DX2RG1:	SIXBIT/SI(20)/
	SIXBIT/DN(21)/
	SIXBIT/ES(22)/
	SIXBIT/TE(23)/
	SIXBIT/AY(24)/
;;;;;	SIXBIT/BC(25)/;;;;REMOVED BY EDIT 714[RLD]
	SIXBIT/E0(26)/
	SIXBIT/E1(27)/
	SIXBIT/IR(30)/
	SIXBIT/PC(31)/
	SIXBIT/AL(32)/
	SIXBIT/SD(33)/
	SIXBIT/FP(34)/
	SIXBIT/BW(35)/
	SIXBIT/IB(36)/
	SIXBIT/MA(37)/
	;NOW THE CONTROL TABLE FOR THE MASSBUS VALUES
DX20CT:	XWD -1,DX20CR
	XWD 40,DXSRDV
	XWD -1,DX20ER
	XWD 41,DXMRDV
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,DX20DT
DX20C1:	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	;NOW THE SECOND SET
DX2NAM:	SIXBIT/SB 0-3/
	SIXBIT/   4-7/
	SIXBIT/  8-11/
	SIXBIT/ 12-15/
	SIXBIT/ 16-19/
	SIXBIT/ 20-23/
	SIXBIT/  MCV /
	SIXBIT/  MRA /
	SIXBIT/  MRB /
	SIXBIT/  MRC /
	SIXBIT/  MRD /
	SIXBIT/  MRE /
	SIXBIT/  MRF /
	SIXBIT/  CB0 /
	SIXBIT/  CB1 /
	SIXBIT/  DP0 /
	SIXBIT/  DP1 /
	SIXBIT/  DP2 /
	SIXBIT/  DP3 /
	SIXBIT/  LAS /
	;NOW THE CONTROL TABLE
;FOR NOW ALL ARE "NOTRAN"
DX2CTL: XWD -1,T7SB0S
	XWD -1,DXSB4S
	XWD 36,SB81DV
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
	XWD -1,NOTRAN
DX2FUN:	[ASCIZ/ NO OPERATION(00)/]
	[ASCIZ/ REWIND & UNLOAD(02)/]
	[ASCIZ/ ILLEGAL(04)/]
	[ASCIZ/ REWIND(06)/]
	[ASCIZ/ DRIVE CLEAR(10)/]
	[ASCIZ/ SENSE RELEASE(12)/]
	[ASCIZ/ ILLEGAL(14)/]
	[ASCIZ/ ILLEGAL(16)/]
	[ASCIZ/ ILLEGAL(20)/]
	[ASCIZ/ ILLEGAL(22)/]
	[ASCIZ/ ERASE GAP(24)/]
	[ASCIZ/ WRITE TAPE MARK(26)/]
	[ASCIZ/ SPACE REC FORWARD(30)/]
	[ASCIZ/ SPACE REC BACK(32)/]
	[ASCIZ/ SPACE BLOCK FORWARD(34)/]
	[ASCIZ/ SPACE BLOCK BACK(36)/]
	[ASCIZ/ TEST I-O(40)/]
	[ASCIZ/ DATA SEC ERASE(42)/]
	[ASCIZ/ SENSE(44)/]
	[ASCIZ/ SENSE RESERVE(46)/]
	[ASCIZ/ ILLEGAL(50)/]
	[ASCIZ/ ILLEGAL(52)/]
	[ASCIZ/ ILLEGAL(54)/]
	[ASCIZ/ ILLEGAL(56)/]
	[ASCIZ/ WRITE DATA(60)/]
	[ASCIZ/ WRITE DIAGNOSTIC(62)/]
	[ASCIZ/ LOOP WRITE TO READ(64)/]
	[ASCIZ/ ILLEGAL(66)/]
	[ASCIZ/ READ DATA(70)/]
	[ASCIZ/ ILLEGAL(72)/]
	[ASCIZ/ READ EXTENDED STATUS(74)/]
	[ASCIZ/ READ REVERSE(76)/]
	;NOW THE SPECIAL DECODING ROUTINES CALLED FROM THE CONTROL TABLES
	;T1 HAS WORD TO TRANSLATE AND P1 MUST BE PRESERVED*****

DX20CR:	PUSH	P,P1		;SAVE P1
	HLRZ	P1,T1		;ONLY WORRY ABOUT 'AT ERROR' VALUE
	TRNN	P1,1B35		;GO?
	 JRST	.+3
	TYPEIT	< GO + >
	ANDI	P1,76		;GET FUNCTION BITS ALONE
	LSH	P1,-1		;RIGHT JUSTIF FOR AN INDEX
	HRRZ	T1,DX2FUN(P1)	;GET THE ADDR OF THE ASCIZ
	PUSHJ	P,.TSTRG
	POP	P,P1		;RESTORE P1
	POPJ	P,0

DX20ER:	PUSH	P,P1
	MOVE	P1,T1
	PUSH	P,P1		;NOW SAVE THE ERROR WORD
	MOVEI	T1,42		;OFFSET INTO TABLES
	MOVEM	T1,KONTYP
	PUSHJ	P,CNIDCD	;DO 1 FOR 1 X-LATION FIRST
	POP	P,P1		;RESTORE ERROR WORD
	TLNE	P1,1B28		;IF NOT SET, LEAVE NOW
	 JRST	.+3		;SET, MORE LISTING REQ'D
	POP	P,P1		;RESTORE P1
	POPJ	P,0		;AND LEAVE
	TYPEIT	<MPERR CLASS: >
	LDB	P2,[POINT 4,P1,9] ;GET CLASS CODE
	MOVE	T1,P2
	PUSHJ	P,.TOCTW
	TYPEIT	< ,SUB-CLASS: >
	LDB	P3,[POINT 4,P1,5]	;AND SUB-CLASS
	MOVE	T1,P3
	PUSHJ	P,.TOCTW
	PUSHJ	P,.TCRLF
	PUSHJ	P,.TTABC
	TYPEIT	< = >
	CAMLE	P2,MPCLS	;CHECK FOR MAX # OF CLASSES WE RECOGNIZE
	 JRST	DX2ER0		;OUT OF RANGE
	;NOW CHECK FOR SUB-CLASS RANGE
	MOVE T1,MPCLS(P2)	;T1 GETS BASE ADDR OF SUB-CLASS TABLE
	MOVE	T2,-1(T1)	;RANGE FOR THIS SUB-CLASS
	CAMLE	P3,T2		;OK?
	 JRST	DX2ER1		;NOPE
	ADD	T1,P3		;OK-GET ADDR OF ASCIZ TEXT
	MOVE	T1,0(T1)	;AND ADDRESS
	PUSHJ	P,.TSTRG
	POP	P,P1		;NOW RESTORE P1
	POPJ	P,0

DX2ER0:	TYPEIT	< UNKNOWN MPERR CLASS >
	POP	P,P1
	POPJ	P,0
DX2ER1:	TYPEIT	< UNKNOWN MPERR SUB-CLASS>
	POP	P,P1
	POPJ	P,0
;HERE ARE SUB TABLES AND TEXT ADDRS
;FIRST IS TABLE OF CLASSES,EACH ITEM POINTS TO SUB-CLASS TABLE

MPCLS:	^D8			;CURRENT # OF CLASSES RECOGNIZED
	XWD 0,MPCLS1
	XWD 0,MPCLS2
	XWD 0,MPCLS3
	XWD 0,MPCLS4
	XWD 0,MPCLS5
	XWD 0,MPCLS6
	XWD 0,MPCLS7
	XWD 0,MPCL10

	XWD 0,1			;CURRENT # OF SUB-CLASS ARGUEMENTS
MPCLS1:	[ASCIZ/ UNUSUAL DEVICE STATUS FROM FINAL STATUS SEQUENCE/]
	[ASCIZ/ UNUSUAL DEVICE STATUS FROM INITIAL STATUS SEQUENCE/]

	XWD 0,0			;CURRENT #
MPCLS2:	[ASCIZ/ SHORT RECORD/]

	XWD 0,0
MPCLS3:	[ASCIZ/ LONG RECORD/]

	XWD 0,0
MPCLS4:	[ASCIZ/ DRIVE SELECTION ERROR, NON-EXISTENT/]

	XWD 0,0
MPCLS5:	[ASCIZ/ RECOVERABLE ERROR-TAPE MOTION-  DATA PARITY ERROR/]

	XWD 0,2
MPCLS6:	[ASCIZ/ RECOVERABLE ERROR-NO TAPE MOTION- DRIVE ADDR. MISMATCH/]
	[ASCIZ/ RECOVERABLE ERROR-NO TAPE MOTION- BUS IN PAR ERR WHILE RECEIVING DRIVE ADDR/]
	[ASCIZ/ RECOVERABLE ERROR-NO TAPE MOTION- BUS IN PAR ERR WHILE RECEIVING INITIAL STATUS/]

	XWD 0,1
MPCLS7:	[ASCIZ/ NON-RECOVERABLE ERROR, DATA PATH DETECTED U-BUS PAR ERR/]
	[ASCIZ/ NON-RECOVERABLE ERROR, CHANNEL BUS DETECTED U-BUS PAR ERR/]

	XWD 0,2
MPCL10:	[ASCIZ/ FATAL ERROR, DRIVE TYPE MISMATCH/]
	[ASCIZ/ FATAL ERROR, PAR ERR RECEIVING DRIVE ADDR DURING C.U. INIT SEQ/]
	[ASCIZ/ FATAL ERROR, PAR ERR RECEIVING DRIVE STATUS DURING  C.U. INIT SEQ/]
	;HERE DECODE DX20 DRIVE TYPE REGISTER

DX20DT:	PUSH	P,P1
	MOVE	P1,T1		;SAVE WORD TO TRANSLATE
	TYPEIT	< DRIVE TYPE: >
	LDB	T1,[POINT 9,P1,17]	;EXTRACT DRIVE TYPE
	PUSHJ	P,.TOCTW
	;ADD CODE HERE TO TRANSLATE TO TYPE
	TYPEIT	<, HDWR VER: >
	LDB	T1,[POINT 7,P1,8]	;EXTRACT VERSION #
	PUSHJ	P,.TOCTW
	POP	P,P1
	POPJ	P,0
	SUBTTL	SUPPORT FOR 21 ENTRIES-MAGTAPE SYSTEM


	;TAPLst--routine to list code 21 entries.
	;	called with TAPtry in p2.

TAPLst:	HLRZ	P1,P2
	ANDI	P1,70	;GET CONTROLLER TYPE
	LSH	P1,-3	;MOVED OVER
	TLNE	P2,(1B11)	;[415]IS CONTROLLER AN RH20?
	 AOS	P1		;YES ADD ONE TO TYPE 4=RH10,5=RH20
	TLNE	P2,(1B10)	;[1133] RH11?
	 MOVEI	P1,6		;YES
	MOVEM	P1,TAPKON	;SAVE IT
	CAIGE	P1,3	;DX10OR TM02?
	 JRST	TAPL01	;NO-NO UNIT TYPE OR S/N
	CAIE	P1,3	;DX10?
	 JRST	TAPLSA	;TM02
	typeit	<
	UNIT TYPE:	>
	HRRZ	P2,WKBUFF+TAPIEP
	SUB	P2,HEADWC
	ADDI	P2,WKBUFF		;OFFSET TO ERROR BLOCK
	MOVE	P1,XS.S4(P2)		;SENSE BYTES 4-7
	MOVEI	T1,[ASCIZ/TU70/]
	LDB	P3,[POINT 4,P1,23]	;GET TU MODEL
	CAIN	P3,14			;TU72-E?
	 MOVEI	T1,[ASCIZ/TU72-E/]	;YES
	PUSHJ	P,.TSTRG
;NOW CHECK FOR S/N
	CAIE	P3,14			;TU72?
	 JRST	TAPL01			;NOPE
	TYPEIT	<
	UNIT SERIAL #:	>
	MOVE	P3,XS.S12(P2)		;GET HI UNIT S/N
	LDB	T2,[POINT ^D8,P3,31]
	MOVEI	P1,0
	DPB	T1,[POINT ^D8,P1,23]
	MOVE	P3,XS.S16(P2)		;GET LO UNIT S/N
	LDB	T1,[POINT ^D8,P3,7]
	DPB	T2,[POINT ^D8,T1,27]	;MOVE IN HIGH ORDER
	PUSHJ	P,.ODECW
	JRST	TAPL01			;NOW CONTINUE

	;HERE DUMP UNIT TYPE AND SERIAL NUMBER FOR TU16&TU45
TAPLSA:	HRRZ	P2,WKBUFF+TAPIEP	;GET POINTER TO AT ERROR BLOCK
	SUB	P2,HEADWC	;WORDS IN HEADER
	ADDI	P2,WKBUFF	;P2 IS A GOODINDEXPOINTER
	TYPEIT	<
	UNIT TYPE:	>
	HRRZ	T2,T2.DDT(P2)	;GET UNIT TYPE REG
	ANDI	T2,77		;STRIP OF UNNEEDED BITS
	MOVE	T1,[SIXBIT/TU16/]	;ASSUME TU16
	CAIN	T2,12	;BUT CHECK
	MOVE	T1,[SIXBIT/TU45/]
	PUSHJ	P,.TSIXN	;LIST EITHER
	TYPEIT	<
	UNIT SERIAL #:	>
	HRRZ	P1,T2.DSN(P2)	;GET UNIT SERIAL NUMBER
	HRRZ	T1,P1
	ANDI	T1,170000
	LSH	T1,-14		;MSD MOVED DOWN
	PUSHJ	P,.TDECW	;IN DECIMAL
	HRRZ	T1,P1
	ANDI	T1,7400
	LSH	T1,-10		;NEXT DIGIT MOVED DOWN
	PUSHJ	P,.TDECW
	HRRZ	T1,P1
	ANDI	T1,360
	LSH	T1,-4
	PUSHJ	P,.TDECW
	HRRZ	T1,P1
	ANDI	T1,17
	PUSHJ	P,.TDECW	;NOW DO LSD
	TYPEIT	<.>
	JRST	TAPL01	;THEN CONTINUE

TAPL01:	SKIPG	WKBUFF+TAPUID	;REAL UNIT ID ?  [746]
	 JRST	TAPL1A		;NO! - SKIP TESTS
	TYPEIT	<
	USER'S ID:	>	;[701-RLD]
	MOVE	T1,WKBUFF+TAPUID ;GET HIS/HER P,PN
	PUSHJ	P,.TPPNW	;LISTED[1113]
	TYPEIT	<
	USER'S PROGRAM:	>
	MOVE	T1,WKBUFF+TAPPGM ;AND PROGRAM NAME
	PUSHJ	P,.TSIXN	;IN SIXBIT
	;END [701-RLD]
TAPL1A:	TYPEIT	<
	MEDIA	ID:	>
	move	t1,wkbuff+TAPrid	;get reelid
	pushj	p,.tsixn
	typeit	<
	LOCATION
	 OF FAILURE:	RECORD:  >
	move	t1,WKBUFF+TAPrec
	pushj	p,.odecw
	typeit	<  OF FILE:  >
	move	t1,wkbuff+TAPfil
	ADDi	t1,1		;correct again
	pushj	p,.odecw
	TYPEIT	<
	POSITION
	BEFORE ERROR:   RECORD:  >
	HRRZ	T1,WKBUFF+TAPPBE	;# RECORDS
	PUSHJ	P,.ODECW
	TYPEIT	<  OF FILE:  >
	HLRZ	T1,WKBUFF+TAPPBE	;# FILES
	ADDI		T1,1		;CORRECT TO GET CURRENT FILE
	PUSHJ	P,.ODECW
	TYPEIT	<
	CHAR. INTO RECORD:  >
	MOVE	T1,WKBUFF+TAPCCR
	PUSHJ	P,.ODECW


	;here we decode last transfer command

	typeit	<
	OPERATION:	>
	MOVE	T1,TAPKON	;GET CONTROLLER
	CAIN	T1,2		;TC10?
	 JRST	TC1CMD		;YUP
	CAIE	T1,5		;TM02 ON R20?
	CAIN	T1,4		;TM02?
	 JRST	TM2CMD		;DECODE TM02 COMMAND,ETC
	CAIN	T1,6		;[1133]IF RH11
	 JRST	TM2CMD		;USE TM02 STUFF
	CAIE	T1,3		;DX10?
	 JRST	TM1CMD		;MUST BE TM10
	HRRZ	P2,WKBUFF+TAPIEP	;GET ERROR POINTER
	SUB	P2,HEADWC
	ADDI	P2,WKBUFF		;POINTER TO DX TERMINATION AREA
	move	p1,XS.CM1(P2)	;check last first
	tlne	p1,1b18			;bit 0=0?
	 jrst	TAPL02			;no try next
	tlnn	p1,1b19			;ok now bit 1
	 jrst	TAPL02			;nope
	jrst	TAPL06			;found it!!
TAPL02:	move	p1,XS.CMD(P2)
	tlne	p1,1b18
	 jrst	TAPL05
	tlnn	p1,1b19
	 jrst	TAPL05
	jrst	TAPL06
;unknown command
TAPL05:	typeit	<UNKNOWN,>
	jrst	TAPL07		;go around

;here when last cmd found, cmd in p1

TAPL06:	tlne	p1,1b20		;ignore length?
	 pushj	p,TAPLx1
	tlne	p1,1b21		;stat inh?
	 pushj	p,TAPLx2
	tlne	p1,1b22		;immediate
	 pushj	p,TAPLx3
	hlrz	t1,p1
	andi	t1,140000	;get data mode bits
	lsh	t1,-^d14	;moved over
	move	t1,TAPLx4(t1)	;asciz addr
	pushj	p,.tstrg
	TYPEIT	<  DEV.CMD.:   >	
	MOVEI	T2,[ASCIZ/ILLEGAL/]	;SET FOR DEFAULT
	move	t4,p1
	and	t4,[3770000]	;get device cmd
	lsh	t4,-^d12	;moved a bit
	skipn	t4
	 movei	t2,[asciz/TEST IO/]
	MOVE	T1,T4
	ANDI	T1,7		;SAVE ONLY LSD
	CAIE	T1,3		;END IN 3?
	 JRST	TAPL6A		;NO-GO AROUND
	MOVEI	T2,[ASCIZ/7 TRK MODE SET/]
	CAIL	T4,300	;T4<300?
	 MOVEI	T2,[ASCIZ/9TRK MODE SET/]	;T4 IS > 300
	CAIN	T4,03
	 movei	t2,[aSciz/NO OP/]
	cain	t4,13
	 movei	t2,[asciz/SET DIAG./]

;HERE START LOOKING FOR VALID COMMAND
;IF ALL COMPARES FAIL "ILLEGAL IS PRINTED
TAPL6A:	cain	t4,01
	 movei	t2,[asciz/WRITE/]
	cain	t4,02
	 movei	t2,[asciz/READ/]
	cain	t4,04
	 movei	t2,[asciz/SENSE/]
	cain	t4,33
	 movei	t2,[asciz/REQ.TRK.IN ERR/]
	cain	t4,14
	 movei	t2,[asciz/READ BACKWARD/]
	cain	t4,213
	 movei	t2,[asciz/LOOP WRITE TO READ/]
	cain	t4,324
	 movei	t2,[asciz/SENSE RELEASE/]
	cain	t4,364
	 movei	t2,[asciz/SENSE RESERVE/]
	cain	t4,07
	 movei	t2,[asciz/REWIND/]
	cain	t4,017
	 movei	t2,[asciz/UNLOAD/]
	cain	t4,27
	 movei	t2,[asciz/ERASE GAP/]
	cain	t4,37
	 movei	t2,[asciz/WRITE TAPE MARK/]
	cain	t4,47
	 movei	t2,[asciz/BACKSPACE BLOCK/]
	cain	t4,57
	 movei	t2,[asciz/BACKSPACE FILE/]
	cain	t4,67
	 movei	t2,[asciz/SPACE BLOCK/]
	cain	t4,77
	 movei	t2,[asciz/SPACE FILE/]
	cain	t4,227
	 movei	t2,[asciz/DATA SEC. ERASE/]
	move	t1,t2		;something is in t2
	pushj	p,.tstrg
	jrst	TAPL07		;to dump status

TAPLx1:	typeit	<ILE, >
	popj	p,0

TAPLx2:	typeit	<S.I., >
	popj	p,0

TAPLx3:	typeit	<IMM, >
	popj	p,0


TAPLx4:[asciz/CORE DUMP,/]
	[asciz/BYTE,/]
	[asciz/ASCII,/]
	[asciz/SIXBIT,/]



;	here talk about status etc

TAPL07:	typeit	<
	STATUS:  CU IS:  >
	hrrz	p4,wkbuff+TAPiep	;error pointer
	sub	p4,headwc
	addi	p4,wkbuff
	MOVEI	T1,[ASCIZ/TX01,/]
	MOVE	T2,XS.S8(P4)
	TLNE	T2,1B30			;TX01?
	 MOVEI	T1,[ASCIZ/TX02,/]
	PUSHJ	P,.TSTRG
	move	t3,xs.S12(p4)		;sense bytes 12-15 at error
	and	t3,[1400000000]		;c.u. features
	movss	,T3
	lsh		t3,-^d8
	setz	t1,
	cain	t3,00
	 movei	t1,[asciz/9TRK PE,/]
	cain	t3,01
	 movei	t1,[asciz/7TRK NRZI/]
	cain	t3,02
	 movei	t1,[asciz/9TRK NRZI/]
	cain	t3,03
	 movei	t1,[asciz/7 & 9 TRK NRZI/]
	pushj	p,.tstrg
	move	t3,xs.s0(p4)	;offset should still be it p4
	typeit	< DEVICE IS:   WRITE >
	move	t1,[sixbit/ENB/]
	tlne	t3,4		;better check
	 move	t1,[sixbit/LOCKED/]
	pushj	p,.tsixn
	MOVE	T1,XS.S8(P4)
	TLNN	T1,1B30		;TX02?
	 JRST	TAPL7A		;NO
	TYPEIT	<
	TX02 SERIAL #:	>
	MOVE	P3,XS.S12(P4)	;GET HI ORDER SN
	MOVEI	P1,0
	LDB	T1,[POINT ^D14,P3,23]
	PUSHJ	P,.ODECW

	;now for error

TAPL7A:	TYPEIT	<
	ERROR:	>
	MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]
	move	t2,wkbuff+TAPtry
	tlnn	t2,errhrd	;hard or soft?
	 movei	t1,[asciz/RECOVERABLE /]
	pushj	p,.tstrg
	movei	t1,6		;setup for dx10
	movem	t1,kontyp	;store it
	hrrz	p3,wkbuff+TAPiep	;start
	sub	p3,headwc
	addi	p3,wkbuff
	move	p1,xs.cni(p3)	;get error coni
	pushj	p,cnidcd	;"one-for-one" x-lation
	TYPEIT	< IN DX10 CONI, >
	movei	t1,30		;offset for icpc+1
	movem	t1,kontyp	;store
	hrrz	p3,wkbuff+TAPiep	;start
	sub	p3,headwc
	addi	p3,wkbuff
	move	p1,xs.st1(p3)	; GET ICPC+1
	pushj	p,cnidcd
	TYPEIT	< IN ICPC+1 >
	TYPEIT	<
	***AS OF DX10 MICROCODE VERSION 4(0), RECOVERABLE ERRORS
	ARE NOT REPORTED TO MONITOR IF DX10 MICROCODE ERROR
	RETRY IS ENABLED.***
>

	hrrz	p3,wkbuff+TAPiep	;start
	sub	p3,headwc
	addi	p3,wkbuff
	move	p1,xs.st1(p3)
	tlnn	p1,1b30		;seq error?
	 jrst	TAPL7B		;nope
	ANDI	p1,37400	;error code
	lsh	p1,-10
	typeit	<
		SEQ CODE:  >
	move	t1,seqmes(p1)
	pushj	p,.tstrg
	JRST	TAPL10	
TAPL7B:	MOVE	P1,XS.CNI(P3)	;GET CONI AT ERROR
	TRNE	P1,1B26		;MP ERROR?
	TLNE	P1,1B35		;MP RUNNING?
	 JRST	TAPL7E			;NOPE
;	HERE IF MPE IS TRUE AND IF NOT MP RUNNING
;	CODE FROM HERE ON MODIFIED WITH EDIT 550 TO HELP
;LARRY BURKE
	MOVE	T1,XS.MD(P3)	;GET CPMA AT ERROR
	LDB	T2,[POINT 12,T1,17]	;GET PC
	CAIN	T2,210		;VALID DIAG. FAILURE??
	 JRST	TAPL7C		;YES
	TYPEIT	<	INVALID DIAGNOSTIC FAILURE, CODE IS >
	JRST	TAPL7D		;NOW LIST THE CODE VALUE
TAPL7C:	TYPEIT	<
		DIAG. FAILURE CODE:	>
TAPL7D:	HRRZ	T2,XS.DAG(P3)		;GET INDEX
	ANDI	T2,77			;-100
	MOVE	T1,DXDMES(T2)		;GET PNTR
	PUSHJ	P,.TSTRG		;LIST THE MESSAGE
	JRST	TAPL10
;HERE TO CHECK FOR HUNG DEVICE
TAPL7E:	MOVE	P1,XS.CNI(P3)		;CONI AT ERROR
	TRNE	P1,1B26			;NOT MPE?
	 JRST	TAPL10	
	HRRZ	T1,XS.DAG(P3)		;YES,NOT MPE
	CAIE	T1,77			;HUNG DEVICE CODE #?
	 JRST	TAPL10			;NO
	TYPEIT	<	HUNG DEVICE, OCCURED AT CONTENTS OF CPMA >
	JRST	TAPL10

;	END OF EDIT 550 IN THIS SECTION

;now for retrys

TAPL10:
	TYPEIT	<
	RETRY COUNT:	>
	hrrz	t1,wkbuff+TAPtry
	pushj	p,.ODECW	
	TYPEIT	<  -->
	HRRZ	T1,WKBUFF+TAPFES	;FINAL ERROR STATUS
	MOVE	T1,TRYMES(T1)		;GET ASCIZ ADDR
	PUSHJ	P,.TSTRG
	TYPEIT	<-->
	SETZ	P1,
	PUSHJ	P,DETCHK
	TYPEIT	<
 CONTROLLER INFORMATION:>
	TYPEIT	<
	CONTROLLER:	>
	MOVE	T1,TAPKON	;GET CONTROLLER
	CAIN	T1,2		;TC10?
	 JRST	TC1CON		;YUP
	CAIE	T1,5		;TM02 ON R20?
	CAIN	T1,4	;TM02?
	 JRST	TM2CON	;GO DUMP TM02 REGISTERS ETC
	CAIN	T1,6		;RH11?[1133]
	 JRST	RH1KON		;YES
	CAIE	T1,3		;DX10?
	 JRST	TM1CON		;MUST BE TM10
	move	p1,wkbuff+TAPtry
	hlrz	t1,p1
	andi	t1,70	;get controller
	typeit	<DX10 #>	;modify if more than only dx10*****
	hlrz	t1,p1
	andi	t1,7	;controller #
	pushj	p,.toctw
	typeit	<
	CONI AT ERROR:	>
	movei	t1,6		;dx10
	movem	t1,kontyp
	hrrz	p3,wkbuff+TAPiep
	sub	p3,headwc
	addi	p3,wkbuff
	move	p1,xs.cni(p3)	;coni at error
	move	t1,p1
	pushj	p,.TXWDW
	TYPEIT	< = >
	pushj	p,cnidcd
	typeit	<
	CONI AT END:	>
	hrrz	p3,wkbuff+TAPfep
	sub	p3,headwc
	addi	p3,wkbuff
	move	p1,xs.cni(p3)
	move	t1,p1
	pushj	p,.TXWDW
	TYPEIT	< = >
	pushj	p,cnidcd
	TYPEIT	<
	ICPC+1 AT ERROR:	>
	hrrz	p3,wkbuff+TAPIEP
	sub	p3,headwc
	addi	p3,wkbuff
	PUSH	P,P3		;SAVE THE PNTR
	MOVE	P1,XS.ST1(P3)	;GET THE WORD AT ERROR
	MOVE	T1,P1
	PUSHJ	P,.TXWDW	;OCTAL HALF WORDS
	TYPEIT	< = >
	MOVEI	T1,30		;OFFSET
	MOVEM	T1,KONTYP	;STORED
	PUSHJ	P,CNIDCD
	TYPEIT	<
	ICPC+1 AT END:	>
	hrrz	p3,wkbuff+TAPFEP
	sub	p3,headwc
	addi	p3,wkbuff
	PUSH	P,P3		;SAVE THE PNTR
	MOVE	P1,XS.ST1(P3)	;GET THE WORD AT END
	MOVE	T1,P1
	PUSHJ	P,.TXWDW	;OCTAL HALF WORDS
	TYPEIT	< = >
	MOVEI	T1,30		;OFFSET
	MOVEM	T1,KONTYP	;STORED
	PUSHJ	P,CNIDCD
	POP	P,P2		;PNTR AT END
	POP	P,P3		;PNTR AT ERROR
	TYPEIT	<
	ICPC+2 AT ERROR:	>
	MOVE	T1,XS.ST2(P3)	;ICPC+2 AT ERROR
	PUSHJ	P,.TXWDW
	TYPEIT	<
	ICPC+2 AT END:		>
	MOVE	T1,XS.ST2(P2)	;ICPC+2 AT END
	PUSHJ	P,.TXWDW
	MOVE	T1,XS.CNI(P3)	;CONI AT ERROR
	TRNN	T1,1B27			;MEM PAR?
	 JRST	TAPL12			;NO
	TYPEIT	<
	DATA SEEN BY DX10 AT PARITY ERROR:	>
	MOVE	T1,XS.MR1(P3)		;DX REG 10&11
	PUSHJ	P,.TXWDW
	jrst	TAPL12

TAPL11:	typeit	<
=====REST OF INFORMATION AVAILABLE BY USING /DETAIL: SWITCH=====>
	POPJ	P,0	;GO BACK NOW

	;HERE DECODE TC10 OPERATION

TC1CMD:	MOVE	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T2,TC.CNI(T1)	;GET CONI MTC
	PUSH	P,T2		;SAVE IT
	ANDI	T2,76000	;FUNCTION CODE
	LSH	T2,-12
	MOVE 	T1,TC1MES(T2)
	PUSHJ	P,.TSTRG
	TYPEIT	<
	STATUS:  >
	POP	P,P1		;GET CONI BACK
	TLNN	P1,1B21		;WRITE LOCKED
	 JRST	TC1CM1
	TYPEIT	<WRITE-LOCKED, >
TC1CM1:	TRNN	P1,1B26
	 JRST	TC1CM2
	TYPEIT	<CORE DUMP, >
TC1CM2:	TRNN	P1,1B29
	 JRST	TC1CM3
	TYPEIT	<NRZI,>

	;NOW TO DO ERROR
TC1CM3:	TYPEIT	<
	ERROR:  >
	MOVE	T2,WKBUFF+TAPTRY
	MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]
	TLNN	T2,ERRHRD	;HARD OR SOFT?
	MOVEI	T1,[ASCIZ/RECOVERABLE /]
	PUSHJ	P,.TSTRG
	HLRZ	T2,P1
	ANDI	T2,14
	SKIPN	T2
	 JRST TC1CM4	;NOTHING THERE
	CAIN	T2,14
	 MOVEI	T1,[ASCIZ/NXM /]
	CAIN	T2,4
	 MOVEI	T1,[ASCIZ/MEM DATA PARITY ERR /]
	CAIN	T2,10
	 MOVEI	T1,[ASCIZ/CTL WD PARITY ERR /]
	PUSHJ	P,.TSTRG
TC1CM4:	MOVEI	T1,7
	MOVEM	T1,KONTYP	;SET FOR TC10
	PUSHJ	P,CNIDCD	;P1 STILL VALID
	JRST	TAPL10		;NOW GO TO RETRY

	;HERE DECODE TM10 OPERATION:

TM1CMD:	MOVE	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	PUSH	P,T1	;SAVE THAT OFFSET
	MOVE	T2,TM.CNC(T1)	;CONI MTC
	PUSH	P,T2	;SAVE IT ALSO
	ANDI	T2,FUNMSK
	LSH	T2,-FUNSFT
	MOVE	T1,FUNMSG(T2)
	PUSHJ	P,.TSTRG
	TYPEIT	<
	STATUS: >
	POP	P,P1	;GET CONI MTC BACK
	MOVE	T3,P1
	ANDI	T3,DENMSK
	LSH	T3,-DENSFT
	MOVE	T1,DENMSG(T3)
	PUSHJ	P,.TSTRG	;PUBLISH DENSITY
	TRNN	P1,PARTYP
	 JRST	TM1CM1
	TYPEIT	< ODD PARITY,>
	 JRST	TM1CM2
TM1CM1:	TYPEIT	< EVEN PARITY,>
TM1CM2:	TRNN	P1,CORDMP
	JRST	TM1CM3
	TYPEIT	<CORE DUMP,>
TM1CM3:	POP	P,T1	;GET INDX BACK
	MOVE	P1,TM.CNS(T1)	;CONI MTS
	TRNN	P1,STRK
	 JRST	TM1CM4
	TYPEIT	< 7 TRACK,>
	JRST	TM1CM5
TM1CM4:	TYPEIT	< 9 TRACK,>
TM1CM5:	TRNN	P1,WLOCK
	JRST	TM1CM6
	TYPEIT	< WRITE LOCKED
>
	JRST	TM1CM7
TM1CM6:	TYPEIT	< WRITE ENABLED
>

TM1CM7:	TYPEIT	<
	ERROR:  >
	MOVE	T2,WKBUFF+TAPTRY
	MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]
	TLNN	T2,ERRHRD
	 MOVEI	T1,[ASCIZ/RECOVERABLE /]
	PUSHJ	P,.TSTRG
	MOVEI	T1,3	;SET FOR TM10
	MOVEM	T1,KONTYP
	MOVE	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	P1,TM.CNS(T1)	;ERROR CONI MTS
	HLRZ	T2,WKBUFF+TAPTRY	;GET CONTROLLER TYPE
	TRNN	T2,1B32			;TM10A?
	 TDZ	P1,[7B13!1B27!1B31]	;CLR TM10B ONLY BITS
	PUSHJ	P,CNIDCD
	JRST	TAPL10		;GO DO RETRYS

	;HERE LIST LAST COMMAND TO TM02 AND ERROR DETECTED
TM2CMD:	TYPEIT	<
	OPERATION AT ERROR:	>
	HRRZ	P3,WKBUFF+TAPIEP	;GET POINTER TO ERRR BLOCK
	SUB	P3,HEADWC
	ADDI	P3,WKBUFF		;INDEX VALUE BUILT INTO P3
	PUSH	P,P3		;SAVE IT
	HRLZ	T1,T2.ICR(P3)	;LAST COMMAND
	MOVEI	T2,1		;FINISH SEUP WITH OFFSET TO TU16CR
	PUSHJ	P,@MDE011(T2)	;USE CODE FROM ER.MDE
	POP	P,P3		;GET ERROR POINTER BACK
	;NOW LIST THE DETECTED ERROR
	TYPEIT	<
	ERROR:  >
	MOVE	T2,WKBUFF+TAPTRY
	MOVEI	T1,[ASCIZ/NON-RECOVERABLE /]
	TLNN	T2,ERRHRD
	 MOVEI	T1,[ASCIZ/RECOVERABLE /]
	PUSHJ	P,.TSTRG
	MOVE	T1,TAPKON	;GET CONTROLLER TYPE
	CAIN	T1,6		;[1133] RH11?
	 JRST	RH11TM		;YES
	MOVEM	T1,KONTYP
	MOVE	P1,T2.CNI(P3)	;ERROR CONI 
	PUSHJ	P,CNIDCD
	JRST	TAPL10		;GO DO RETRYS


	;HERE DECODE RH11 ERROR DETECTED
	;P3 HAS POINTER TO ERROR BLOCK
RH11TM:	MOVEI	T1,15		;OFFSET FOR C& S 2
	MOVEM	T1,KONTYP
	HLLZ	P1,T2.CNI(P3)	;C & S 2 AT ERROR
	PUSHJ	P,CNIDCD
	TYPEIT	< IN CONTROLLER STATUS 2,
	>
	MOVEI	T1,14		;CS1
	MOVEM	T1,KONTYP
	HRRZ	P1,T2.CNI(P3)	;GET CS1
	PUSHJ	P,CNIDCD
	TYPEIT	< IN CONTROLLER STATUS 1>
	JRST 	TAPL10

	;HERE DUMP CONIS & CONTROLLER TYPE FOR TC10

TC1CON:	TYPEIT	< TC10
	CONI AT ERROR: >
	MOVE	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T1,TC.CNI(T1)	;CONI TC10
	MOVE	P1,T1	;SAVE IT FOR LATER
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVEI	T1,7
	MOVEM	T1,KONTYP	;SET FOR TC10
	PUSHJ	P,CNIDCD
	TYPEIT	<
	CONI AT END: >
	MOVE	T1,WKBUFF+TAPFEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T1,TC.CNI(T1)	;ENDING CONI TC10
	MOVE	P1,T1	;SAVE IT FOR LATER
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVE	T1,P1
	MOVE	T2,KONTYP
	AND	T1,KONMSK(T2)
	SKIPN	T1
	 JRST	TC1CO1	;NONE SET
	PUSHJ	P,CNIDCD	;GO TRANSLATE
	POPJ	P,0		;GO HOME

TC1CO1:	TYPEIT	<NO ERROR BITS DETECTED>
	POPJ	P,0	;GO HOME
;HERE TO DO CONTROLLER & CONIS FOR TM10

TM1CON:	TYPEIT	< TM10>
	HLRZ	T2,WKBUFF+TAPTRY	;GET TYPE
	MOVEI	T1,[ASCIZ/-A/]		;SET FOR TM10A
	TRNE	T2,1B32			;BUT IF
	 MOVEI	T1,[ASCIZ/-B/]		;CHANGE TO TM10B
	PUSHJ	P,.TSTRG		;NOW SAY EITHER
	TYPEIT	<
	CONI AT ERROR: >
	MOVE	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T1,TM.CNS(T1)	;CONI ERROR MTS
	HLRZ	T2,WKBUFF+TAPTRY	;GET CONTROLLER TYPE
	TRNN	T2,1B32			;TM10A?
	 TDZ	T1,[7B13!1B27!1B31]	;CLR TM10B ONLY BITS
	MOVE	P1,T1		;SAVE IT
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVEI 	T1,3	;SET FOR TM10
	PUSHJ	P,CNIDCD	;P1 STILL VALID
	TYPEIT	<
	CONI AT END: >
	MOVE	T1,WKBUFF+TAPFEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T1,TM.CNS(T1)	;FINAL CONI MTS
	HLRZ	T2,WKBUFF+TAPTRY	;GET CONTROLLER TYPE
	TRNN	T2,1B32			;TM10A?
	 TDZ	T1,[7B13!1B27!1B31]	;CLR TM10B ONLY BITS
	MOVE	P1,T1
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	MOVE	T2,KONTYP
	AND	T1,KONMSK(T2)	;GET ERROR BITS
	SKIPN	T1		;ANY SET?
	 JRST	TM1CO1		;NOPE
	PUSHJ	P,CNIDCD	;GO DECODE
	POPJ	P,0		;GO HOME

TM1CO1:	TYPEIT	< NO ERROR BITS DETECTED>
	POPJ	P,0	;GO HOME
	;HERE LIST CONI'S,DATAI'S AND DEVICE REGISTERS FOR TM02
	;DETAIL SWITCH HAS ALREADY BEEN CHECKED
TM2CON:	TYPEIT	<  TM02>
	TYPEIT	<
	CONI AT ERROR:	>
	MOVE	P4,WKBUFF+TAPFEP	;GET FINAL POINTER
	SUB	P4,HEADWC
	ADDI	P4,WKBUFF	;FINAL POINTER IN P4
	PUSH	P,P4		;SAVE FOR LATER
	HRRZ	P3,WKBUFF+TAPIEP	;DI ERROR POINTER
	SUB	P3,HEADWC
	ADDI	P3,WKBUFF
	PUSH	P,P3	;FOR LATER
	MOVE	T1,T2.CNI(P3)	;CONI AT ERROR
	MOVE	P1,T1		;SAVE IT FOR CNIDCD
	PUSHJ	P,.TXWDW		;IN HALF WORD
	TYPEIT	< = >
	MOVE	T1,TAPKON	;GET CONTROLLER TYPE
	MOVEM	T1,KONTYP
	PUSHJ	P,CNIDCD		; GO TRANSLATE
	TYPEIT	<
	CONI AT END:	>
	MOVE	T1,T2.CNI(P4)	;GET CONI AT END
	MOVE	P1,T1		;SAVEIT
	PUSHJ	P,.TXWDW
	TYPEIT	< = >
	PUSHJ	P,CNIDCD

	;HERE TO DUMP DATAI'S
	TYPEIT	<
	DATAI >
	MOVE	P2,KONTYP		;GET CONTROLLER TYPE
	TRNE	P2,1			;RH10=4,RH20=5
	 MOVEI	P1,[ASCIZ/PBAR/]
	TRNN	P2,1
	 MOVEI	P1,[ASCIZ/RHCR/]
	MOVE	T1,P1
	PUSHJ	P,.TSTRG		;FINISH TYPING DATAI NAME
	TYPEIT	< AT ERROR:	>
	MOVE	T1,T2.DTI(P3)	;DATAI AT ERROR
	PUSHJ	P,.TXWDW		;TYPE IN HALF WORD
	TYPEIT	<
	DATAI >
	MOVE	T1,P1			;WE SAVED IT BEFORE
	PUSHJ	P,.TSTRG
	TYPEIT	< AT END:	>
	MOVE	T1,T2.DTI(P4)	;VALUE AT END
	PUSHJ	P,.TXWDW
	TYPEIT	<
	DATAI >
	TRNE	P2,1			;WE SAVED THIS TOO
	 MOVEI	P1,[ASCIZ/PTCR/]	;FOR RH20
	TRNN	P2,1
	 MOVEI	P1,[ASCIZ/RHDB/]	;FOR RH10
	MOVE	T1,P1
	PUSHJ	P,.TSTRG
	TYPEIT	< AT ERROR:	>	;FINISH 
	MOVE	T1,T2.2DT(P3)		;GET SECOND DATAI WORD
	PUSHJ	P,.TXWDW
	TYPEIT	<
	DATAI >
	MOVE	T1,P1			;GET REG NAME BACK
	PUSHJ	P,.TSTRG	
	TYPEIT	< AT END:	>
	MOVE	T1,T2.2DT(P4)	;VALUE AT END
	PUSHJ	P,.TXWDW
;SETUP AND CALL ROUTINES TO DUMP 16 DEVICE REGISTERS
;FIRST WE MUST PUT BOTH AT ERROR AND AT END VALUES INTO ONE LOCATION
TM2LST:	POP	P,P3	;GET P3 BACK
	POP	P,P4		;P4 TOO
	HRLZI	T1,-12		;# TO MOVE
	ADDI	P3,T2.DCR	;UPDATE AT ERROR POINTER TO FIRST
	ADDI	P4,T2.DCR	;AT END POINTER TOO
TM2CN1:	HRRZ	T2,(P4)	;NEXT AT END WORD TO T2
	HRLM	T2,(P3)	;MOVED  TO AT EROR LOCATION
	AOS	P3
	AOS	P4
	AOBJN	T1,TM2CN1	;GET NEXT PAIR OR...
	TYPEIT	<
DEVICE REGISTER INFORMATION:
		AT ERROR	AT END		DIFF.		TEXT
>
	MOVE	P1,[XWD 1,12]		;SETUP P1 FOR MODE 1 AND 12 ITEMS
	HRLZI	P2,TU6REG			;STARTING ADDR OF TABLE
						;OF SIXBIT REG NAMES
	MOVEI	T1,1			;GET DEVICE TYPE
	HRR	P2,MSCNTL(T1)		;SETUP P2
	HRRZ	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,T2.DCR	;WHERE TO FIND AT ERROR WORDS
	HRLZ	P3,T1		;SET UP LEFT HALF
	HRR	P3,T1		;AT END LOCATION TO RIGHT HALF
	PUSHJ	P,HWDUMP			;IF ALL GOES WELL
	PUSHJ	P,TITLST	;EDIT 116 START ON NEXT PAGE
	POPJ	P,0		;WE'RE DONE!


	;[1133]
	;HERE TO DO DECODE OF RH11 CONTROLLER VALUES
	;/DETAIL IS ON
RH1KON:	TYPEIT	< TM02-3 >
	MOVE	P4,WKBUFF+TAPFEP		;GET AT END PNTR
	ADDI	P4,WKBUFF
	SUB	P4,HEADWC
	PUSH	P,P4		;SAVE IT FOR LATER
	MOVE	P3,WKBUFF+TAPIEP	;GET AT ERROR PNTR
	ADDI	P3,WKBUFF
	SUB	P3,HEADWC
	PUSH	P,P3		;SAVE IT ALSO
	TYPEIT	<
	RH11 CONTROLLER STATUS 1 AT ERROR:	>
	HRRZ	T1,T2.CNI(P3)		;GET IT
	PUSH	P,T1				;SAVE IT
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	MOVEI	T1,14				;CS1 OFFSET
	MOVEM	T1,KONTYP
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 1 AT END:	>
	HRRZ	T1,T2.CNI(P4)		;GET IT
	PUSH	P,T1				;SAVE IT
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 2 AT ERROR:	>
	HLLZ	T1,T2.CNI(P3)		;GET IT
	PUSH	P,T1				;SAVE IT
	HLRZ	T1,T1				;MOVEI IT OVER
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	MOVEI	T1,15				;CS2 OFFSET
	MOVEM T1,KONTYP
	PUSHJ	P,CNIDCD
	TYPEIT	<
	RH11 CONTROLLER STATUS 2 AT END:	>
	HLLZ	T1,T2.CNI(P4)		;GET IT
	PUSH	P,T1				;SAVE IT
	HLRZ	T1,T1				;MOVE IT OVER
	PUSHJ	P,.TOCTW			;IN OCTAL
	TYPEIT	< = >
	POP	P,P1				;VALUE TO XLATE
	PUSHJ	P,CNIDCD
	TYPEIT	<
	UBA STATUS AT ERROR:	>
	MOVE	T1,T2.DTI(P3)
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA STATUS AT END:	>
	MOVE	T1,T2.DTI(P4)
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA MAP AT ERROR:	>
	MOVE	T1,T2.2DT(P3)
	PUSHJ	P,.TXWDW
	TYPEIT	<
	UBA MAP AT END:		>
	MOVE	T1,T2.2DT(P4)
	PUSHJ	P,.TXWDW
	JRST	TM2LST		;GO DECODE DEVICE REGISTERS

	;TC10 FUNCTION CODES

TC1MES:	[ASCIZ/ CLEAR/]
	[ASCIZ/ REWIND/]
	[ASCIZ/ RD FWD RECORD/]
	[ASCIZ/ R-C FWD RECORD/]
	[ASCIZ/ WRITE FWD/]
	[ASCIZ/ WRITE FILE MARK/]
	[ASCIZ/ SPACE FWD RECORD/]
	[ASCIZ/ SPACE REV RECORD/]
	[ASCIZ/ SET JD WHEN UNIT READY/]
	[ASCIZ/ UNLOAD/]
	[ASCIZ/ RD FWD TO EOF/]
	[ASCIZ/ R-C FWD TO EOF/]
	[ASCIZ/ WRITE W. LONG GAP/]
	[ASCIZ/ ERASE GAP/]
	[ASCIZ/ SPACE FWD TO EOF/]
	[ASCIZ/ SPACE REV TO EOF/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ READ REV RECORD/]
	[ASCIZ/ R-C REV RECORD/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ ILL/]
	[ASCIZ/ READ REV TO EOF/]
	[ASCIZ/ R-C REV TO EOF/]
TAPL12:	typeit	<
       REGISTER	AT ERROR	AT END		DIFF		TEXT
>
	move	p1,[xwd 3,4]	;full word octal,4items
	move	p2,[xwd dx1reg,dx1ctl]	;table addresses
	hrrz	t1,wkbuff+TAPiep	;offset to error words
	sub	t1,headwc
	hrlz	p3,t1			;fixed up
	move	t1,wkbuff+TAPfep	;offset to end words
	sub	t1,headwc
	hrr	p3,t1			;finish setup
	pushj	p,hwdump		;takes a while
	HRRZ	T1,WKBUFF+TAPIEP
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T2,XS.MD(T1)	;FIND THE RIGHT WORD
	PUSH	P,T1		;SAVE INDEX
	PUSH	P,T2		;SAVE WHAT TO DUMP
	TYPEIT	<	
	CPMA&MD:	>
	POP	P,T1		;WHAT TO DUMP
	PUSHJ	P,.TXWDW	;IN HALF WORD
	TYPEIT	<
	DR:	>
	POP	P,T1		;RETURN INDEX
	MOVE	T1,XS.DR(T1)	;WHAT TO DUMP
	PUSHJ	P,.TXWDW	;AGAIN IN HALF WORD

TAP12A:	typeit	<
DEVICE INFORMATION:  *IN OCTAL BYTES*
     SENSE BYTE	AT ERROR	AT END		DIFF		TEXT
>
	move	p1,[xwd 4,6]	;full word 8 BIT BYTES,6 items
	move	p2,[xwd t70reg,t70ctl]	;table addresses
	move	t1,wkbuff+TAPiep
	sub	t1,headwc
	addi	t1,4		;adjust for those we just typed
	hrlz	p3,t1
	move	t1,wkbuff+TAPfep
	sub	t1,headwc
	addi	t1,4
	hrr	p3,t1
	pushj	p,hwdump

	typeit	<
CHAN CMD LIST:
	CPC:	>
	MOVE	P3,WKBUFF+TAPIEP
	SUB	P3,HEADWC
	ADDI	P3,WKBUFF
	MOVE	T1,XS.CPC(P3)
	PUSHJ	P,.TXWDW
	PUSHJ	P,.TCRLF
	TYPEIT	<	CMDS:	>
	move	t1,XS.CMD(P3)
	pushj	p,.tXWDw
	pushj	p,.tcrlf
	pushj	p,.ttabc
	PUSHJ	P,.TTABC	;SOME MORE SPACE
	move	t1,XS.CM1(P3)
	pushj	p,.tXWDw
	pushj	p,.tcrlf
	pushj	p,titlst	;start on next page
	popj	p,0		;return
;now some tables etc for tu70 reporting

seqmes:[asciz/0-CMD LST STR/]
	[ASCIZ/1-AI RUNAWAY/]
	[ASCIZ/2-BUS I IN PARITY/]
	[ASCIZ/3-GETSTS,ADR IN NOT SET/]
	[ASCIZ/4-GETSTS,ADRIN NOT RESET/]
	[ASCIZ/5-GETSTS,STATIN NOT SET/]
	[ASCIZ/6-GETSTS,STATIN NOT RESET/]
	[ASCIZ/7-GETSTS,OPRIN NOT RESET/]
	[ASCIZ/10-MEMRD,8R NOT READY/]
	[ASCIZ/11-MEMWR,8R NOT READY/]
	[ASCIZ/12-STPDEV,STATUS NOT SET/]
	[ASCIZ/13-SETSTP,STATUS NOT SET/]
	[ASCIZ/14-CMDST,SHORT BUSY ERROR/]
	[ASCIZ/15-CMDST,NO OPRIN OR SELIN/]
	[ASCIZ/16-CMDST,ADRIN NOT SET/]
	[ASCIZ/17-CMDST,ADRIN NOT RESET/]
	[ASCIZ/20-CMDST,STATUS NOT SET/]
	[ASCIZ/21-CMDST,STATUS NOT RESET/]
	[ASCIZ/22-CMDST,OPRIN NOT RESET/]
	[ASCIZ/23-CMDERR,OPRIN NOT RESET/]
	[ASCIZ/24-RDSEN,RSB NOT COMPLETE/]
	[ASCIZ/25-SILO NOT READY/]
	[ASCIZ/26-XFER NOT FOLLOW R-W CMD/]
	[ASCIZ/27-XFER CMD NOT WITHIN 10 WDS/]
	[ASCIZ/30-CMDBSY,STATUS NOT RESET/]
	[ASCIZ/31-STATUS DIDN'T PROPAGATE THRU SILO/]
	[ASCIZ/32-TMCHK2-BYTE AVAIL DIDNT RESET/]
	[ASCIZ/33-CMDST-TX01 ERROR/]
	[ASCIZ/34-WAIT-TX01 ERROR/]
	[ASCIZ/35-SILO NOT READY READING S.B./]
	[ASCIZ/36-RDSEN-NOT ALL BYTES/]
	[ASCIZ/37-TX01 ADR NOT COMPARE/]
	[ASCIZ/40-SPUR BLK DONE INT/]
	[ASCIZ/41-NO DEV ACTIVE/]
	[ASCIZ/42-ILLEGAL/]
	[ASCIZ/43-RDSEN-INIT. SEL. ERROR/]
	;HERE ARE THE FAILURE MESSAGES FOR THE DX10 MICROCODE
	;DIAGNOSTICS PERFORMED IN THE IDLE LOOP.

DXDMES:	[ASCIZ/100-LBO NOT CLR AC/]
	[ASCIZ/101-STM NOT CLR AC/]
	[ASCIZ/102-INT NOT CLR AC/]
	[ASCIZ/103-L8S NOT CLR AC/]
	[ASCIZ/104-LCB NOT CLR AC/]
	[ASCIZ/105-L8C NOT CLR AC/]
	[ASCIZ/106-L8B NOT CLR AC/]
	[ASCIZ/107-L8A NOT CLR AC/]
	[ASCIZ/110-8R BYTE A BAD/]
	[ASCIZ/111-8R BYTE B BAD/]
	[ASCIZ/112-8R BYTE C BAD/]
	[ASCIZ/113-8R2 SEL BAD/]
	[ASCIZ/114-8R1 SEL BAD/]
	[ASCIZ/115-8R0 SEL BAD/]
	[ASCIZ/116-WRAP SEL 8R3 BAD/]
	[ASCIZ/117-WRAP SEL 8R0 BAD/]
	[ASCIZ/120-INT NOT SEL 8R0/]
	[ASCIZ/121-SILO FAIL-DUMP/]
	[ASCIZ/122-SILO FAIL-DUMP-SLOW-CLOCK/]
	[ASCIZ/123-SILO FAIL-BYTE/]
	[ASCIZ/124-SILO FAIL-BYTE-SLOW-CLOCK/]
	[ASCIZ/125-SILO FAIL-ASCIZ/]
	[ASCIZ/126-SILO FAIL-ASCIZ-SLOW-CLOCK/]
	[ASCIZ/127-SILO FAIL-SIXBIT/]
	[ASCIZ/130-SILO FAIL-SIXBIT-SLOW-CLOCK/]
	[ASCIZ/131-TBD NOT SKIP/]
	[ASCIZ/132-NO INT ON OVERFLOW/]
	[ASCIZ/133-RESET OVERFLOW-INT DIDNT CLR/]
	[ASCIZ/134-CPC DATA TEST FAIL/]
	[ASCIZ/135-DAC DATA TEST FAIL/]
	[ASCIZ/136-C.U.-NO RESPONSE TO SEL SEQ/]
	[ASCIZ/137-C.U.-NO RESPONSE TO DEV ADDR 0/]
	[ASCIZ/140-ADDR IN-NO SET IN SEL SEQ/]
	[ASCIZ/141-PAR ERR IN BUS-ADDR PRESENTED/]
	[ASCIZ/142-ADDR NOT 0-SEL UNIT 0/]
	[ASCIZ/143-ADDR IN-NO DROP DURING SEL SEQ/]
	[ASCIZ/144-STATUS IN-NO SET DURING SEL SEQ/]
	[ASCIZ/145-PAR ERR ON BUS W STATUS BYTE/]
	[ASCIZ/146-NON 0 INIT STATUS BYTE/]
	[ASCIZ/147-STATUS IN-NO DROP W SERVICE OUT SET/]
	[ASCIZ/150-SRV IN NO SET/]
	[ASCIZ/151-PAR ERR ON BUS W SENSE BYTE/]
	[ASCIZ/152-SERVICE IN-NO DROP W SRV OUT/]
	[ASCIZ/153-STATUS IN-NO SET AFTER 24 BYTES/]
	[ASCIZ/154-PAR ERR IN STATUS BYTE AFTER SENSE/]
	[ASCIZ/155-STATUS IN-NO DROP AFTER ENDING STATUS/]
	[ASCIZ/156-OPER IN -NO DROP AFTER SENSE/]
	[ASCIZ/157-REQ IN NO SET AFTER SHORT BUSY SEQ/]
	[ASCIZ/160-ADDR IN NO SET AFTER CU INIT.SEQ/]
	[ASCIZ/161-PAR ERROR ON BUS W CU INIT SEQ/]
	[ASCIZ/162-NOT 0 ADDR W CU INIT SEQ/]
	[ASCIZ/163-ADDR IN NO DROP W CU INIT SEQ/]
	[ASCIZ/164-STATUS IN NO SET W CU INIT SEQ/]
	[ASCIZ/165-STATUS IN NO DROP W CU INIT SEQ/]
	[ASCIZ/166-OPR IN NO DROP W CU INIT SEQ/]
	[ASCIZ/167-SRV OUT NO SET W TESTS 13-23/]
	[ASCIZ/170-SRV OUT NO CLR W TESTS 13-23/]
DX1REG:	SIXBIT/ B CNT/
	SIXBIT/TAGBUS/
	SIXBIT/   DAC/
	SIXBIT/   REV/

T70REG:	SIXBIT/   0-3/
	SIXBIT/   4-7/
	SIXBIT/  8-11/
	SIXBIT/ 12-15/
	SIXBIT/ 16-19/
	SIXBIT/ 20-23/

DX1CTL:	XWD	-1,NOTRAN
	XWD	31,DXTAGB	;DX10 TAGS & BUS
	XWD	-1,NOTRAN
	XWD	-1,DX1FEA

T70CTL:	XWD	-1,T7SB0S	;TU70 SENSE BYTES 0-3
	XWD	-1,DXSB4S	;TU70 SENSE BYTES 4-7
	XWD	36,SB81DV
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN

	;TAPSER STATE CODES FOR ERROR RECOVERY

TRYMES:	0
	[ASCIZ/REPOSITION  TERM./]
	[ASCIZ/RETRY TERM./]
	[ASCIZ/ERASE GAP TERM./]
	[ASCIZ/TAPE CLEANER SEQ. BACKSPACE/]
	[ASCIZ/TAPE CLEANER SEQ. FOWARD/]

;NOW SOME ROUTINES FOR SPECIAL TRANSLATIONS

DX1FEA:	TYPEIT	<  ECO: >
	PUSH	P,P1		;SAVE INDEX
	LDB	P1,[POINT 7,P2,26]
	LSH	P1,4		;LEFT JUSTIFY
	PUSHJ	P,TYPBCD
	TYPEIT	<  DX10 S/N: >
	LDB	P1,[POINT 9,P2,35]
	LSH	P1,4
	PUSHJ	P,TYPBCD
	;START EDIT 550

	TYPEIT	<  U-CODE VER: >
	LDB	T1,[POINT 6,P2,5]	;GET VERSION #
	PUSHJ	P,.TOCTW
	TYPEIT	< EDIT: >
	LDB	T1,[POINT 9,P2,17]
	PUSHJ	P,.TOCTW
	;END 550
;	LDB	T1,[POINT 2,P2,5]
;	MOVE	T1,DXMES(T1)	;FUNCTION
;	PUSHJ	P,.TSIXN
;	TYPEIT	< = >
;	LDB	T1,[POINT 12,P2,18]
;	PUSHJ	P,.TOCTW
;ABOVE CODE OUT BECAUSE WE'RE NOT SURE WHERE THESE VALUES ARE IN THE
;ERROR FILE.
	POP	P,P1		;GET INDEX BACK
	POPJ	P,0		;AND GO BACK

DXMES:	SIXBIT/STATUS/
	SIXBIT/  MQ  /
	SIXBIT/  DATA/
	SIXBIT/  AC  /

T7SB0S:	PUSH	P,P1		;SAVE OUR INDEX
	MOVEI	T1,32		;OFFSET FOR SENSE BYTES 0-3
	MOVEM	T1,KONTYP
	MOVE	P1,P2		;WORD TO DECODE
	PUSH	P,P2
	PUSHJ	P,CNIDCD
	POP	P,P2		;RESTORE WORD TO TRANSLATE
	TYPEIT	< TIE = >
	LDB	P3,[POINT 8,P2,23] 	;TRACK IN ERROR
	SETZ	T1,
	TRNE	P3,1B28
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B29
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B30
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B31
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B32
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B33
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B34
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	SETZ	T1,
	TRNE	P3,1B35
	 MOVEI	T1,1
	PUSHJ	P,.TOCTW
	POP	P,P1		;GET INDEX BBACK
	POPJ	P,0		;GO HOME
;HERE SPECIAL DECODING FOR TU70/72 SENSE BYTES 4-7

DXSB4S:	PUSH	P,P1		;SAVE INDEX
	MOVEI	T1,33			;OFFSET TO TABLES
	MOVEM	T1,KONTYP
	MOVE	P1,P2		;WOD TO TRANSLATE
	PUSH	P,P2		;SAVE IT
	PUSHJ	P,CNIDCD		;TRANSLATE IT
	POP	P,P2		;GET WORD BACK
	LDB	P3,[POINT 3,P2,26]	;COLUMN FAILURES
	SKIPE	P3		;ANY THERE?
	 JRST	DXSB4A		;YES
	POP	P,P1
	POPJ	P,0
DXSB4A:	PUSHJ	P,.TSPAC
	MOVE	P2,P3
	ANDI	P3,3		;GET COL BITS ALONE
	CAIN	P3,1
	 MOVEI	T1,[ASCIZ/RIGHT/]
	CAIN	P3,2
	 MOVEI	T1,[ASCIZ/LEFT/]
	CAIN	P3,3
	MOVEI	T1,[ASCIZ/BOTH/]
	PUSHJ	P,.TSTRG
	TYPEIT	< COL.FAIL >
	MOVEI	T1,[ASCIZ/TOP/]
	TRNE	P2,4			;TOP OR BOTTOM?
	 MOVEI	T1,[ASCIZ/BOTTOM/]
	PUSHJ	P,.TSTRG
	POP	P,P1		;GET INDEX BACK
	POPJ	P,0
	;ROUTINES TO TRANSLATE MASSBUS DEVICE REG. AS SPECIAL ROUTINES
	;T1 HAS WORD TO TRANSLATE

MDE011:	XWD	0,RS04CR
	XWD	0,TU16CR
	XWD	0,RP04CR
	XWD	0,RP04CR
	XWD	0,RP04CR
	XWD	0,RP04CR
	XWD	0,RP04CR


RS04CR:	HLRZ	P4,T1		;SAVE ERROR WORD
	TRNN	P4,1B24		;AVAIL?
	 JRST	.+3		;NO
	TYPEIT	<DEV.AVAIL.,>
	TRNN	P4,1B35		;GO?
	 JRST	.+3		;NO
	TYPEIT	< GO + >
	ANDI	P4,70		;GET FUNCTION
	LSH	P4,-3		;MOVE IT OVER FOR INDEX
	HRRZ	T1,RS4FUN(P4)	;GET FUNCTION ASCIZ ADDR
	PJRST	.TSTRG		;DUMP IT
RP04CR:	HLRZ	P4,T1	;GET WORD
	TRNN	P4,1B24			;AVAIL?
	 JRST 	.+3			;NO
	TYPEIT	< DEV.AVAIL.,>
	TRNN	P4,1B35			;GO?
	 JRST	.+3
	TYPEIT	< GO + >
	ANDI	P4,76			;GET FUNCTION
	LSH	P4,-1			;STRIP GO BIT
	HRRZ	T1,RP4FUN(P4)		;SETUP FUNCT.ASCIZ ADDR
	PJRST	.TSTRG			;SAY IT
TU16CR:	HLRZ	P4,T1
	TRNN	P4,1B24		;AVAIL?
	 JRST	.+3		;NO
	TYPEIT	< DEV.AVAIL. >
	TRNN	P4,1B35		;GO?
	 JRST	.+3
	TYPEIT	< GO + >
	ANDI	P4,76		;GET FUNCTION
	LSH	P4,-1		;SETUP INDEX
	HRRZ	T1,TU6FUN(P4)	;USE IT
	PJRST	.TSTRG

	;SOME TABLES

	;SOME TABLES
RS4FUN:	[ASCIZ/ NO OPERATION(00)/]
	[ASCIZ/ DRIVE CLEAR(02)/]
	[ASCIZ/	ILLEGAL(04)/]
	[ASCIZ/ SEARCH(06)/]
	[ASCIZ/ ILLEGAL(10)/]
	[ASCIZ/ ILLEGAL(12)/]
	[ASCIZ/ WRITE(14)/]
	[ASCIZ/ READ(16)/]
RP4FUN:	[ASCIZ/ NO OPERATION(00)/]
	[ASCIZ/ STAND BY(02)/]
	[ASCIZ/ SEEK(04)/]
	[ASCIZ/ RECALIBRATE(06)/]
	[ASCIZ/ DRIVE CLEAR(10)/]
	[ASCIZ/ RELEASE(12)/]
	[ASCIZ/ OFFSET(14)/]
	[ASCIZ/ RETURN CENTERLINE(16)/]
	[ASCIZ/ READ-IN(20)/]
	[ASCIZ/ PACK ACK.(22)/]
	[ASCIZ/	ILLEGAL(24)/]
	[ASCIZ/ ILLEGAL(26)/]
	[ASCIZ/ SEARCH(30)/]
	[ASCIZ/ ILLEGAL(32)/]
	[ASCIZ/ ILLEGAL(34)/]
	[ASCIZ/ ILLEGAL(36)/]
	[ASCIZ/ ILLEGAL(40)/]
	[ASCIZ/ ILLEGAL(42)/]
	[ASCIZ/ ILLEGAL(44)/]
	[ASCIZ/ ILLEGAL(46)/]
	[ASCIZ/ WRITE CHECK DATA(50)/]
	[ASCIZ/ WRITE CHECK HEADER & DATA(52)/]
	[ASCIZ/ ILLEGAL(54)/]
	[ASCIZ/ ILLEGAL(56)/]
	[ASCIZ/ WRITE DATA(60)/]
	[ASCIZ/ WRITE HEADER & DATA(62)/]
	[ASCIZ/ ILLEGAL(64)/]
	[ASCIZ/ ILLEGAL(66)/]
	[ASCIZ/ READ DATA(70)/]
	[ASCIZ/ READ HEADER&DATA(72)/]
	[ASCIZ/ ILLEGAL(74)/]
	[ASCIZ/ ILLEGAL(76)/]
TU6FUN:	[ASCIZ/ NO OPERATION(00)/]
	[ASCIZ/ REWIND,OFFLINE(02)/]
	[ASCIZ/ ILLEGAL(04)/]
	[ASCIZ/ REWIND(06)/]
	[ASCIZ/ DRIVE CLEAR(10)/]
	[ASCIZ/ ILLEGAL(12)/]
	[ASCIZ/ ILLEGAL(14)/]
	[ASCIZ/ ILLEGAL(16)/]
	[ASCIZ/ READIN(20)/]
	[ASCIZ/ ILLEGAL(22)/]
	[ASCIZ/ ERASE(24)/]
	[ASCIZ/ WRITE FILEMARK(26)/]
	[ASCIZ/ SPACE FWD.(30)/]
	[ASCIZ/ SPACE REV.(32)/]
	[ASCIZ/ ILLEGAL(34)/]
	[ASCIZ/ ILLEGAL(36)/]
	[ASCIZ/ ILLEGAL(40)/]
	[ASCIZ/ ILLEGAL(42)/]
	[ASCIZ/ ILLEGAL(44)/]
	[ASCIZ/ ILLEGAL(46)/]
	[ASCIZ/ WRITE CHECK FWD.(50)/]
	[ASCIZ/ ILLEGAL(52)/]
	[ASCIZ/ ILLEGAL(54)/]
	[ASCIZ/ WRITE CHECK REV.(56)/]
	[ASCIZ/ WRITE FWD.(60)/]
	[ASCIZ/ ILLEGAL(62)/]
	[ASCIZ/ ILLEGAL(64)/]
	[ASCIZ/ ILLEGAL(66)/]
	[ASCIZ/ READ FWD.(70)/]
	[ASCIZ/ ILLEGAL(72)/]
	[ASCIZ/ ILLEGAL(74)/]
	[ASCIZ/ READ REV.(76)/]
	;SOME ROUTINES TO DUMP SOME PARTICULAR REGISTERS.
	;CALLED FROM HWDUMP  FIRST TO OUTPUT DESIRED
	;SECTOR/TRACK FOR RP04

RP04BA:	HLRZ	P4,T1		;GET ERROR WORD ALONE

	MOVE	P3,P4
	ANDI	P3,17400	;MASK TO GET TRACK ALONE
	LSH	P3,-^D8		;MOVE IT OVER
	TYPEIT	<D. TRK = >
	MOVE 	T1,P3
	PUSHJ	P,.TOCTW	;PRINT IT
	TYPEIT	<, D.SECT. = >
	ANDI	P4,37		;GET SECTOR
	MOVE 	T1,P4
	PJRST	.TOCTW	;DO IT
	;TO DUMP RM03 OFFSET REG.
RM03MO:	HRRZ	P4,T1
	TYPEIT	<AT END:>
	TRNE	P4,1B23		;FORMAT BIT ?
	 JRST [	TYPEIT	<FMT16,>
		JRST	.+1 ]
	TRNE	P4,1B24		;ECI ON?
	 PUSHJ	P,RPMO02
	TRNE	P4,1B25		;HCI?
	 PUSHJ	P,RPMO03
	TRNE	P4,1B28		;OFD ON?
	 JRST [	TYPEIT	<OFD>
		JRST	.+1 ]
	POPJ	P,0
	;TO DUMP RP04 OFFSET REG.
RP04MO:	HRRZ	P4,T1
	TYPEIT	<AT END:>
	TRNE	P4,1B20		;SIGN CHANGE?
	 PUSHJ	P,RPMO00	;YUP SAY SO
	TRNE	P4,1B23		;FORMAT BIT ?
	 PUSHJ	P,RPMO01
	TRNE	P4,1B24		;ECI ON?
	 PUSHJ	P,RPMO02
	TRNE	P4,1B25		;HCI?
	 PUSHJ	P,RPMO03
	TYPEIT	< OFFSET = >
	TRNE	P4,1B28		;NEGATIVE DIR.?
	 PUSHJ	P,RPMO04		;YES
	SETZ	P3,		;ZERO COUNTER
	TRNE	P4,1B30		;800?
	 ADDI	P3,^D800
	TRNE	P4,1B31		;400?
	 ADDI	P3,^D400
	TRNE	P4,1B32		;200?
	 ADDI	P3,^D200
	TRNE	P4,1B33		;100?
	 ADDI	P3,^D100
	TRNE	P4,1B34		;50?
	 ADDI	P3,^D50
	TRNE	P4,1B35		;25?
	 ADDI	P3,^D25
	MOVE	T1,P3		;TOTAL IN T1 NOW
	SKIPN	T1		;NO OFFSET?
	 PJRST	RP04M1		;YUP-NONE
	PUSHJ	P,.ODECW	;PRINT WITH A "."
	TYPEIT	< U IN.>
	POPJ	P,0		;GO HOME

RP04M1:	TYPEIT	<NONE>
	POPJ	P,0
RPMO00:	TYPEIT	<SIGN CHANGE,>
	POPJ	P,0
RPMO01:	TYPEIT	<FMT22,>
	POPJ	P,0
RPMO02:	TYPEIT	<ECI,>
	POPJ	P,0
RPMO03:	TYPEIT	<HCI,>
	POPJ	P,0
RPMO04:	TYPEIT	< - >
	POPJ	P,0
	;NOW FOR RP04 DESIRED OR CURRENT CYL

RP04DC:	HLRZ	T1,T1		;GET ERROR ALONE
	ANDI	T1,1777		;ONLY CYL BITS WANTED
	MOVE	T2,MDEDTP	;[310] GET DEVICE TYPE
	CAIE	T2,4		;RP06?
	 TRZ	T1,1000	;[505]NO-CLEAR EXTRA BITS
	PJRST	.ODECW
	;RS04 DESIRED SECTOR/TRACK ADDRESS
RS04BA:	HLRZ	P4,T1
	MOVE	P3,P4
	ANDI	P3,7700		;TRACK BITS ONLY
	LSH	P3,-6		;MOVE IT OVER
	TYPEIT	<D. TRK = >
	MOVE	T1,P3
	PUSHJ	P,.TOCTW
	TYPEIT	<, D.SECT = >
	ANDI	P4,77		;SECTOR BITS
	MOVE	T1,P4
	PJRST	.TOCTW


	;NOW FOR TU16 REGISTERS

TU16TC:	HLRZ	P4,T1
	TRNN	P4,1B20
	 JRST 	.+3
	TYPEIT	<ACCL,>
	TRNN	P4,1B21
	 JRST	.+3
	TYPEIT	<TCW,>
	TRNN	P4,1B22
	 JRST	.+3
	TYPEIT	< FCS,>
	TRNN	P4,1B23
	 JRST	.+3
	TYPEIT	< EAO/DTE,>
	MOVE	P3,P4
	ANDI	P3,3400		;GET DENSITY
	LSH	P3,-10
	MOVE	T1,TU6DEN(P3)
	PUSHJ	P,.TSTRG
	MOVE	P3,P4
	ANDI	P3,360		;GET FORMAT
	LSH	P3,-4
	MOVE	T1,TU6FOR(P3)
	PUSHJ	P,.TSTRG
	TRNN	P4,1B32
	 JRST	.+3
	TYPEIT	< EVEN PARITY>
	ANDI	P4,7		;GET SLAVE #
	TYPEIT	< SLAVE #>
	MOVE	T1,P4
	PJRST	.TOCTW

TU6DEN:	[ASCIZ/ 200BPI NRZ/]
	[ASCIZ/ 556BPI NRZ/]
	[ASCIZ/ 800BPI NRZ/]
	[ASCIZ/ 800BPI NRZ/]
	[ASCIZ/ 1600BPI PE/]
	[ASCIZ/ 1600BPI PE/]
	[ASCIZ/ 1600BPI PE/]
	[ASCIZ/ 1600BPI PE/]

TU6FOR:	[ASCIZ/ 10 CORE-DUMP/]
	[ASCIZ/ 10 7-TRACK/]
	[ASCIZ/	UNKNOWN/]
	[ASCIZ/ 10 COMPATIBLE/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]
	[ASCIZ/ UNKNOWN/]

	;CONTROL TABLES FOR USE WITH HWDUMP ROUTINE
	;LH = KONTYP TABLE INDEX FOR THIS REG IF SINGLE BIT
	; 	TRANSLATION OR -1 FOR SPECIAL ROUTINE
	;RH = ADDR TO ENGLISH BIT TABLES (XXXXDV) FOR JFLOOP
	; 	OR ADDR OF SPEC ROUTINE.

RP04CT:	XWD 	-1,RP04CR
	XWD	20,RP04SR
	XWD	21,RP04ER
	XWD	37,RPMRDV
	XWD	-1,NOTRAN
	XWD	-1,RP04BA
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,RP04MO
	XWD	-1,RP04DC
	XWD	-1,RP04DC
	XWD	22,RP04CB
	XWD	23,RP04DA
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
;TABLE USED FOR BOTH RP05&RP06
RP05CT:	XWD 	-1,RP04CR
	XWD	20,RP04SR
	XWD	21,RP04ER
	XWD	37,RPMRDV
	XWD	-1,NOTRAN
	XWD	-1,RP04BA
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,RP04MO
	XWD	-1,RP04DC
	XWD	-1,RP04DC
	XWD	34,RP05DV
	XWD	35,RP06DV
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN


RS04CT:	XWD	-1,RS04CR
	XWD	24,RS04SR
	XWD	25,RS04ER
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,RS04BA
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN


TU16CT:	XWD	-1,TU16CR
	XWD	26,TU16SR
	XWD	27,TU16ER
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,TU16TC
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN


RM03CT:	XWD 	-1,RP04CR		;  [601]
	XWD	20,RP04SR
	XWD	21,RP04ER
	XWD	43,RM3MR1
	XWD	-1,NOTRAN
	XWD	-1,RP04BA
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
	XWD	-1,RM03MO
	XWD	-1,RP04DC
	XWD	-1,NOTRAN
	XWD	44,RM3MR2
	XWD	45,RM3ER2
	XWD	-1,NOTRAN
	XWD	-1,NOTRAN
DEVTYP:0
	0
	SOFTDV
	TM10DV
	RH10DV
	RH20DV
	DX10DV
	TC10DV
	DL10DV
	DL11DV
	0
	RHSWDV
	RH11DV
	CS2DV
	CS3DV
	0
	RP04SR
	RP04ER
	RP04CB
	RP04DA
	RS04SR
	RS04ER
	TU16SR
	TU16ER
	ICPCX1
	DXTAGB
	DXSB03
	DXSB47
	RP05DV
	RP06DV
	SB81DV
	RPMRDV
	DXSRDV
	DXMRDV
	DXERDV
	RM3MR1
	RM3MR2
	RM3ER2


	;BLKIND-- SUBROUTINE TO FIND ADDRESS OF A SCRATCH BLOCK
	;IN THE LOW SEG FOR THIS DEVICE WHICH IS SPECIFIED TO
	;THIS SUBROUTINE IN SIXBIT.
	;CALL P3=SIXBIT DEVICE NAME TO BE SEARCHED FOR
	;	PUSHJ	P,BLKIND
	;RETURNS CALL+1 IFERROR,NAME ISNT INTABLE ORIS DUPLICATED
	;	CALL+2 IF GOOD AND P3 =ADDRESS OF SCRATCH BLOCK

BLKIND:	TRNE	P3,7777		;EDIT 132 FUNNY NAME?
	 PUSHJ	P,FIXNAM	;GO FIX
	MOVE	T1,[IOWD NAMLTH,NAMTBL];P3 ALREADYSETUP
	PUSHJ	P,.NAME		;LETSCANDO WORK
	  POPJ	P,		; LET CALLER HANDLE ERROR
	TLZ	T1,-1			;CLR LH
	SUBI	T1,NAMTBL	;T1 NOW = OFFSET
	MOVE	P3,BKLOC(T1)	;SETUP P3 TO RETURN
	AOS	(P)		;AND GIVESKIP
	POPJ	P,		;RETURN
	SUBTTL	OUTPUT LISTING RELATED ROUTINES
	;BCKXXX -- SUBROUTINES TO DETERMINE LISTING AND SUMMATION ELIGIBILITY
	;BASED ON BITS IN ENTCHR TABLE
	;CALL	PUSHJ	P,@BITCHK(ERROR CODE)
	;
	;RETURN	CALL+1 TO LIST
	;	JRST	ABORT TO GO TO NEXT ENTRY

BCK2:	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)	;PICKUP CHAR WORD
	TLNE	P2,E.LSUM	;SUMMARY DESIRED
	PUSHJ	P,SUM2
	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)
	TLNN	F,F.DEV
	 JRST	BC2.A
	MOVE	T1,[SIXBIT/CPU/]
	CAME	T1,DEV
	MOVE	T1,[SIXBIT/KLCPU/]
	CAME	T1,DEV
	 JRST	ABORT
	TLO	P2,E.LALL
BC2.A:	TLNE	P2,E.LALL	;WANT'S ALL?
	 POPJ	P,0		;YUP
	TLNE	P2,E.LPER	;WHAT ABOUT PERFORMANCE?
	 POPJ	P,0		;OK-DO IT
	JRST	ABORT		;THAT'S ALL


BCK4:	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)	;PICKUP CHAR WORD
	TLNE	P2,E.LSUM	;SUMMARY DESIRED
	PUSHJ	P,SUM4
	TLNN	F,F.DEV
	 JRST	BC4.A
	MOVE	T1,[SIXBIT/CPU/]
	CAME	T1,DEV
	MOVE	T1,[SIXBIT/KLCPU/]
	CAME	T1,DEV
	 JRST	ABORT
	TLO	P2,E.LALL
BC4.A:	TLNN	P2,E.LALL!E.LNXM
	JRST	ABORT		;LOSE
	POPJ	P,		;WIN LIST IT



BCK11:	;ADDED WITH [551]
	MOVE	P3,MASKON
	MOVEI T1,RH2HDR		;ASSUME AN RH20
	CAIN	P3,4		;IS IT RH10
	 MOVEI	T1,RH1HDR	;YES,CHANGE
	CAIN	P3,6		;RH11?
	 MOVEI	T1,R11HDR		;YES
	SETOM	@T1		;FLAG THAT WE SAW ONE OR THE OTHER
	;END [551]
	MOVE	P1,ERTYPE
	MOVE	P4,ENTCHR(P1)		;GET CHAR WORD
	PUSH	P,P4			;[434]SAVE ENTCHR FOR LATER
	TLNE	P4,E.LSUM		;SUMMARY?
	 PUSHJ	P,SUM11
	TLNN	F,F.TRY		;EDIT 126 SAID /RETRY?
	 JRST	BCK11A		;NO
	HRRZ	T1,WKBUFF+MDETYP	;GET # RETRIES
	CAMG	T1,RETRY	;ENTRY VALUE GREATER
	 JRST	ABORT		;NO-DON'T LIST
BCK11A:	TRNN	F,F.NDEV	;[325]/NDEV?
	JRST 	BC11A1		;NOPE
	MOVEI	P3,MDENAM
	PUSHJ	P,NDVCHK##
BC11A1:	TLNN	F,F.DEV		;SAID /DEV:?
	 JRST	BC11.1			;NO
	SETOM	T2,T2
	MOVE	T1,DEV
	CAMN	T1,[SIXBIT/RS04/]
	MOVEI	T2,0
	CAMN	T1,[SIXBIT/RP04/]
	MOVEI	T2,2
	CAMN	T1,[SIXBIT/RP05/]
	MOVEI	T2,3
	CAMN	T1,[SIXBIT/RP06/]
	MOVEI	T2,4
	CAMN	T1,[SIXBIT/RM03/]
	MOVEI	T2,5
	CAMN	T1,[SIXBIT/RP07/]
	MOVEI	T2,6
	CAMN	T2,MDEDTP
	 JRST	.+3
	MOVEI	P3,MDENAM
	PUSHJ	P,DEVCHK
	POP	P,P4		;[434]GET ENTCHR BACK
	TLNE	F,F.OSUM
	TLO	P4,E.LALL
	PUSH	P,P4		;BUT STILL SAVE IT
BC11.1:	TLNN	F,F.ID			;SAID /ID:?
	 JRST	BC11.2
	MOVEI	P3,MDEMID
	PUSHJ	P,IDCHK
BC11.2:	TLNN	F,F.STR		;SAID /STR:?
	 JRST	BC11.3
	MOVEI	P3,MDESTR
	PUSHJ	P,STRCHK
BC11.3:	POP	P,P4		;[434]GET ENTCHR BACK
	TLNE	P4,E.LALL		;WANTS ALL?
	 POPJ	P,0			;OK
	TLNN	P4,E.LNXM		;HOW ABOUT NXM
	 JRST	BC11.5			;NO-CHECK PARITY
	MOVE T1,MASKON			;GET KONTROLLER TYPE
	CAIN	T1,6			;RH11?
	 JRST	BC114A			;YES
	CAIN	T1,5			;RH20?
	 JRST	BC11.4			;YES
	;MUST BE AN RH10
	MOVE 	T2,WKBUFF+MDECNI	;YES-GET CONI WORD
	TLNE	T2,1B35			;NXM ON?
	 POPJ	P,0			;YES;LIST IT
	JRST	BC11.5			;NO-CHECK PARITY
BC11.4:	MOVE	T2,WKBUFF+MDECNI	;GET CONI
	TRNE	T2,1B22			;M-BOX ERROR COULD BE NXM?!!
	 POPJ	P,0			;LIST IT
	JRST	BC11.5			;NOLUCK CHECK PARITY
	;HERE CHECK RH11 FOR NXM'S
BC114A:	MOVE	T1,WKBUFF+MDECNI	;C&S 2 IS IN L.H.
	TLNE	T1,1B24			;CHECK FOR NXM
	 POPJ	P,0			;YES LIST IT
	JRST	BC11.5			;NO, CHECK FURTHER
BC11.5:	TLNN	P4,E.LPAR		;CARE ABOUT PARITY ERRORS?
	 JRST ABORT			;NO THAT'S ALL I COVER
	MOVE	T1,MDEDTP		;GET DEVICE TYPE
	SKIPN	T1			;RS04?
	JRST	BC11.7			;YUP
	CAIN	T1,2		;RP04?
	JRST	BC1111			;YUP
	CAIN T1,1		;TU16?
	JRST	BC1110			;MUST BE TU16
	CAIN	T1,3			;RP05?
	 JRST	BC1111
	CAIN	T1,4			;RP06?
	 JRST	BC1111	
	CAIN	T1,5			;RM03?
	 JRST	BC1111			;BITS ARE THE SAME AS RP06
	CAIN	T1,6			;RP07?
	 JRST	BC1111			;USE RP06 FOR NOW

BC11.7:	HRRZ	T1,WKBUFF+MDEDER	;ERROR REG
	TRNN	T1,1B32			;PARITY SET?
	 JRST	BC1112			;NO-CHECK CONTROLLER
	POPJ	P,0			;LIST	IT
BC1110:	HRRZ	T1,WKBUFF+MDEDER
	TRNN	T1,1B29!1B30!1B32	;THESE ARE POSSIBLE
	 JRST	BC1112			;NO
	POPJ	P,0
BC1111:	HRRZ	T1,WKBUFF+MDEDER
	TRNE	T1,1B20!1B29!1B32	;CHOICES
	 POPJ	P,0			;ONE SET AT LEAST
	HRRZ	T1,WKBUFF+MDEDCB	;ERROR REG #2
	TRNE	T1,1B21			;CHOICE
	 POPJ	P,0			;SET-LIST IT
			;OR FALL INTO

	;HERE TO CHECK PARITY ERRORS DET BY THE CONTROLLER
BC1112:	MOVE	T1,MASKON		;GET KONTROLLER TYPE
	CAIN	T1,5			;RH20?
	 JRST	BC1113			;YES
	CAIN	T1,6			;RH11?
	 JRST	BC1114			;YES
	;MUST BE RH10
	MOVE	T1,WKBUFF+MDECNI
	TDNE	T1,[1B15!1B16!1B18]	;CHOICES
	 POPJ	P,0			;LIST IT
	JRST	ABORT			;FORGET IT
BC1113:	MOVE	T1,WKBUFF+MDECNI
	TDNE	T1,[1B18!1B22]		;OTHER CHOICES
	 POPJ	P,0			;LIST
	JRST ABORT			;FORGET IT
BC1114:	HRRZ	T1,WKBUFF+MDECNI	;GET C&S 1
	TRNE	T1,1B20			;MCPE?
	 POPJ	P,0			;YES LIST
	HLRZ	T1,WKBUFF+MDECNI	;GET C&S 2
	TRNE	T1,1B22			;UNIBUS PARITY?
	 POPJ	P,0			;YES, LIST
	MOVE	T2,WKBUFF+MDEDTI	;GET UBA STATUS
	TRNE	T2,1B20		;BUS PARITY ERROR?
	 POPJ	P,0			;YES, LIST
	JRST 	ABORT			;SORRY, NO REASON TO LIST
BCK12:	MOVE	P1,ERTYPE	
	MOVE	P2,ENTCHR(P1)	;CHARACTERISTICS OF ENTRY
	PUSH	P,P2		;SAVE P2
	TLNE	P2,E.LSUM	;WANT SUMMARY?
	 PUSHJ	P,SUM12	;GO DO IT
	TLNN	F,F.TRY		;RETRY?			[510]
	 JRST	BC12A		;NO! - SKIP		[510]
	HRRZ	T1,WKBUFF+DXEFES;[707]GET # OF RETRIES	[510]
	CAMG	T1,RETRY	;ENTRY VALUE GREATER?	[510]
	 JRST	ABORT		;NO! - DON'T LIST	[510]
BC12A:	TLNN	F,F.DEV			;SAID /DEV:?
	 JRST	BK12B			;NO! - SKIP THIS SECTION
	MOVE	T1,DEV			;YES! - GET SPECIFIED NAME
	MOVE	T2,MDEDTP		;GET THIS ENTRIES DEVICE TYPE
	CAMN	T1,MDE000(T2)		;ARE THEY THE SAME?  [606]
	 JRST	.+3			;YES! - FORCE LISTING
	MOVEI	P3,DXENAM		;NO! - TRY GENERAL TYPE
	PUSHJ	P,DEVCHK
	POP	P,P4			;GET CHARACTERISTICS BACK
	TLNE	F,F.OSUM	;ANY TYPE SWITCH CALLED LIKE /MASALL?
	 TLO	P4,E.LALL	;NO-FORCE LISTING
	PUSH	P,P4		;SAVE CHARACTERISTICS
BK12B:	TRNN	F,F.NDEV	;/NDEV:?
	 JRST	BC12B		;NOPE
	MOVEI	P3,DXENAM
	PUSHJ	P,NDVCHK##	;GO CHECK
BC12B:	TLNN	F,F.ID			;SAID /ID:?
	 JRST	BC12C
	MOVEI	P3,DXEVID
	PUSHJ	P,IDCHK
BC12C:	POP	P,P2		;GET ENTCHR BACK
	TLNE	P2,E.LALL	;LIST ALL?
	 POPJ	P,0		;YES
	TLNE	P2,E.LPER	;LIST PERFORMANCE
	 POPJ	P,0		;YES
	JRST	ABORT		;THAT'S ALL TO CHECK
;SUPPORT FOR ER.SLM AND BIT CHECKING, CHECKS FOR /DEV AND/OR /ID
BCK16:	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)	;PICKUP CHAR WORD
	TLNE	P2,E.LSUM	;SUMMARY DESIRED
	PUSH	P,P2		;SAVE ENTCHR
	PUSHJ	P,SUM16
	TLNN	F,F.DEV		;USER SAY /DEV?
	JRST	BC16.1		;NO GO AROUND
	MOVEI	P3,SLMDEV	;SET UP
	PUSHJ	P,DEVCHK		;AND CHECK IT
	POP	P,P2		;RETURN ENTCHR
	TLNE	F,F.OSUM	;/DEV ALONE?
	 TLO	P2,E.LALL	;YES, FORCE /ALL
	PUSH	P,P2		;SAVE IT AGAIN
BC16.1:	TLNN	F,F.ID		;/ID? = "WHO"
	 JRST	BC16.2		;NO
	MOVEI	P3,SLMWHO	;SETUP 
	PUSHJ	P,IDCHK		;MAKE CHECK
BC16.2:	POP	P,P2		;GET ENTCHR BACK
	TLNN	P2,E.LALL!E.LPER	;WANT ALL OR PER?
	JRST	ABORT		;LOSE
	POPJ	P,0		;WIN


BCK15:	TLNN	F,F.DEV		;USER SAY /DEV?
	JRST	BC15.1		;NO GO AROUND
;	MOVEI	P3,CSCNAM	;SET UP[1147]
;	PUSHJ	P,DEVCHK	;AND CHECK IT[1147]
	JRST	ABORT		;YES WE DONT HANDLE IT[1147]
BC15.1:	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)	;GET CHARACTERISTICS
	TLNN	P2,E.LALL!E.LPER	;WANT ALL OR PER?
	JRST	ABORT		;LOSE
	POPJ	P,0		;WIN

BCK21:	MOVE	P1,ERTYPE
	MOVE	P4,ENTCHR(P1)
	TLNE	P4,E.LSUM
	 PUSHJ	P,SUM21
	TLNN	F,F.TRY	;EDIT 126 SAID /RETRY:?
	 JRST	BCK21A
	HRRZ	T1,WKBUFF+TAPTRY	;GET RETRIES
	CAMG	T1,RETRY		;ENTRY VALUE GREATER?
	 JRST	ABORT			;NO-DONT LIST IT
BCK21A:	TRNN	F,F.NDEV	;[325]
	 JRST	BC21AA
	MOVEI	P3,TAPNAM
	PUSHJ	P,NDVCHK
BC21AA:	TLNN	F,F.DEV	;/DEV?
	 JRST	BC21.1
	MOVEI	P3,TAPNAM
	PUSHJ	P,DEVCHK
BC21.1:	TLNN	F,F.ID		;/ID?
	 JRST	BC21.2
	MOVEI	P3,TAPRID
	PUSHJ	P,IDCHK
BC21.2:	TLNE	P4,E.LALL
	 POPJ	P,0
	TLNN	P4,E.LPAR
	 JRST 	ABORT
	HLRZ	T1,WKBUFF+TAPTRY	;GET CONTROLLER TYPE
	ANDI	T1,70
	CAIN	T1,30		;DX10?
	 JRST 	BC21.4		;YES
	CAIN	T1,40		;TM02?
	 JRST	BC21.5		;CHECK FOR PARITY ERRORS
	CAIE	T1,20		;TC10?
	 JRST	BC21.3		;NO-MUST BE TM10
	;[1133]
	MOVE	T1,TAPKON
	CAIN	T1,6		;RH11?
	 JRST 	BC21.6		;YES
	;END[1133]
	;MUST BE TM10
	MOVE	T1,WKBUFF+TAPIEP	;YES-GET CONI
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T2,TC.CNI(T1)	;GET CONI
	TDNE	T2,[1B9!1B10!1B15!1B14]	;COULD BE ANY
	 POPJ	P,0		;LIST IT
	JRST	ABORT		;NONE SET

	;HERE CHECK FOR PARITY ERRORS ON TM10
BC21.3:	MOVE	T1,WKBUFF+TAPIEP	;YES-GET CONI
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T2,TM.CNS(T1)	;GET CONI MTS
	TDNE	T2,[1B11!1B13!1B22]
	 POPJ	P,0		;LIST
	JRST	ABORT

	;HERE FOR DX10

BC21.4:	MOVE	T1,WKBUFF+TAPIEP	;YES-GET CONI
	SUB	T1,HEADWC
	ADDI	T1,WKBUFF
	MOVE	T2,XS.CNI(T1)
	TRNE	T2,1B27		;MEM PAR?
	 POPJ	P,0		;YES
	MOVE	T2,XS.ST1(T1)	;ICPC+1
	TLNE	T2,1B31		;DEV PAR ERR?
	 POPJ	P,0		;YES
	MOVE	T2,XS.S0(T1)	;SENSE BYTES 0-3
	TLNE	T2,1B22		;DATA CHECK?
	 POPJ	P,0		;YES
	JRST	ABORT		;THAT'S ALL FOLKS


	;HERE CHECK FOR PARITY ERRORS ASSOCIATED WITH RH10&TM02
BC21.5:	MOVE	P1,WKBUFF+TAPIEP	;GET WRROR POINTER
	SUB	P1,HEADWC
	ADDI	P1,WKBUFF
	MOVE	T1,T2.CNI(P1)	;CONI AT ERROR
	TDNE	T1,[1B15!1B16!1B18]	;RH10 ERROR BITS FOR PARITY
	 POPJ	P,0		;LIST ENTRY
	MOVE	T1,T2.DER(P1)	;GETDRIVE ERROR REG
	TDNE	T1,[1B20!1B25!1B28!1B29!1B30!1B31!1B32]
	POPJ	P,0		;LIST ENTRY
	JRST	ABORT		;NONE SET-DON'T LIST

	;HERE CHECK FOR ERRORS ON RH11
	;[1133]
BC21.6:	MOVE	P1,WKBUFF+TAPIEP
	SUB	P1,HEADWC
	ADDI	P1,WKBUFF	;PNTR TO AT ERROR BLOCK
	MOVE	T1,T2.CNI(P1)	;CS1 TO RH, CS2 TO LH
	TDNE	T1,[1B4!1B20]	;MCPE OR UNIBUS PARITY
	 POPJ	P,0
	MOVE	T1,T2.DTI(P1)	;UBA STATUS
	TRNE	T1,1B20		;BUS PARITY?
	 POPJ	P,0
	MOVE	T1,T2.DER(P1)	;DEVICE ERROR REG
	TDNE	T1,[1B20!1B25!37B32]
	 POPJ	P,0
	JRST	ABORT

	;END[1133]

BCK50:	TLNN	F,F.DEV	;SAID /DEV:?
	 JRST	BCK50A
	MOVE	T1,[SIXBIT/DL10/]	;YES
	CAME	T1,DEV		;SAID DEV:DL10?
	 JRST	ABORT		;NO
BCK50A:	MOVE	P1,ERTYPE
	MOVE	P4,ENTCHR(P1)
	TLNE	P4,E.LALL	;THIS IS ALL WE CHECK
	 POPJ	P,0		;YES,LIST IT
	JRST ABORT		;SORRY

BCK42:	MOVE	P1,ERTYPE
	MOVE	P4,ENTCHR(P1)
	TLNE	P4,E.LSUM
	 PUSHJ	P,SUM42
	TLNN	F,F.DEV		;DID USER SPECIFY DEV.
	JRST	BC42.1		;NO GO AROUND.
	MOVEI	P3,TPSNAM	;GET NAME FROM THIS ENTRY?
	PUSHJ	P,DEVCHK
BC42.1:	TRNN	F,F.NDEV	;[325]
	 JRST		BC42AA
	MOVEI	P3,TPSNAM
	PUSHJ	P,NDVCHK
BC42AA:	TLNN	F,F.ID		;/ID?
	JRST	BC42.2		;NO
	MOVEI	P3,TPSRID	;YES, SETUP
	PUSHJ	P,IDCHK
BC42.2:	MOVE	P1,ERTYPE
	MOVE	P2,ENTCHR(P1)	;GET CHAR WORD
	TLNE	P2,E.LALL	;WANTS ALL?
	JRST	BC42.3		;YES,BUT CHECK SRE&SWE
	TLNN	P2,E.LPER	;WANTS PERFORMANCE STATS?
	JRST 	ABORT		;NO, GOODBYE
BC42.3:	SKIPE	WKBUFF+TPSHRE	;YES, ANY HARD READ ERRORS?
	POPJ	P,0		;YES,LIST.
	SKIPE	WKBUFF+TPSHWE	;NO, WHAT ABOUT HARD WRITE ERRORS?
	POPJ	P,0		;YES.
	MOVE	T1,WKBUFF+TPSSRE	;GET # OF SOFT READ ERRORS
	CAML	T1,SRE		;ERRORS G.T. THRESHOLD?
	POPJ	P,0		;YES LIST
	MOVE	T1,WKBUFF+TPSSWE	;GET # OF SOFT WRITE ERRORS.
	CAML	T1,SWE		;ERRORS G.T. THRESHOLD?
	POPJ	P,0		;YES, LIST
	JRST	ABORT		;NO, FORGET IT.
SUM2:	HLRZ	T2,WKBUFF+MSESPC	;SAME AS SUM1 BASICALLY
	MOVEI	T1,MSEWHY		;INIT POINTER
MSEFND:	HLRZ	T3,(T1)			;GET POINTER TO NEXT
	JUMPE	T3,MSENEW		;EXIT IF NO REASON
	MOVEI	T1,(T3)			;SETUP POINTER
	CAME	T2,1(T1)		;IS THIS THE ENTRY?
	 JRST	MSEFND			;NO,GET NEXT
	AOS	T3,(T1)			;BUMP
	TRNN	T3,-1			;BUT
	  SOS	(T1)			;NOT TOO MUCH(OVERFLOW)
	POPJ	P,0
	
MSENEW:	AOS	T3,.JBFF##		;NEXT POSITION
	AOS	.JBFF##			;CLEAN HOUSE
	CAMG	T3,.JBREL##		;IS THERE ROOM?
	 JRST	MSEINS			;YES INSERT REASON
	MOVE	T4,T3			;DIFFERENT AC
	CORE	T4,			;GET MORE CORE
	 FATAL	<SYRNCA: NO CORE AVAILABLE>	;OPPS

MSEINS:	MOVEM	T2,(T3)			;SAVE REASON
	ADDI	T3,-1			;INITIAL COUNT AND ADDRESS
	HLRZM	T3,(T3)			;SET COUNT TO ONE
	HRLM	T3,(T1)		;POINT TO THIS BLOCK
	POPJ	P,0		;AND LEAVE



SUM4:	MOVEI	T1,TNETMP
	MOVEI	T2,TNEPER
	MOVE	T3,WKBUFF+NXMTNE	;PICKUP # HARD NXM
	PUSHJ	P,COMPAR	;LET SUBROUTINE DO UPDATING AS NECESSARY
	MOVEI	T1,SNETMP	
	MOVEI	T2,SNEPER
	MOVE	T3,WKBUFF+NXMSNE	;PICKUP # SOFT MEM NXM
	PUSHJ	P,COMPAR
	MOVEI	T1,NUETMP
	MOVEI	T2,NUEPER
	MOVE	T3,WKBUFF+NXMUEN	;PICKUP # USER-ENABLED NXM
	PUSHJ	P,COMPAR
	MOVEI	T1,NCSTMP
	MOVEI	T2,NCSPER
	MOVE	T3,WKBUFF+NXMNCS	;PICKUP # CHN NXM NOT DETECTED BY CPU
	PUSHJ	P,COMPAR
	POPJ	P,		;DONE WITH SUM4
SUM11:	SETOM	MASONE		;AT LEAST ONE ENTRY SEEN FOR SML10
	MOVE	T1,MASKON		;TYPE CONTROLLER STORED BY MDECHR
	;[1133]
	CAIN	T1,6
	 MOVEI	T1,16		;IF RH11, SUBSTITUTE OFFSET FOR COMBINED CS2&1
	;ADDED WITH [551]
;[1133]	MOVEI T2,RH2HDR		;ASSUME AN RH20
;[1133]	CAIE	T1,5		;IS IT??
;[1133]	 MOVEI	T2,RH1HDR	;NO,CHANGE
;[1133]	SETOM	@T2		;FLAG THAT WE SAW ONE OR THE OTHER
	;END [551]
	;END[1133]
	MOVEM	T1,KONTYP
	MOVEI	P2,MDETYP		;RETRY WORD OFFSET
	MOVEI	P3,MDECNI		;CONI WORD OFFSET
	PUSHJ	P,CNISUM		;LET IT WORK
	MOVE	P1,DVINDX
	HRRZ	P2,SOFDSP(P1)		;GET STARTING
	HLRZ	P1,SOFDSP(P1)		;ADDRESSES
	MOVEI	T1,ERRSAT(P1)
	MOVEI	T2,ERRSAT(P2)
	LDB	T3,[POINT 12,WKBUFF+MDESF1,11]	;PICKUP # SAT FAILS
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG	;DID COUNT CHANGE ON THIS ERROR
	TLO	S,S.SAT		;SAY SAT FAILURE
	MOVEI	T1,ERRRIB(P1)
	MOVEI	T2,ERRRIB(P2)
	LDB	T3,[POINT 12,WKBUFF+MDESF1,23]	;PICKUP # RIB ERRS
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.RIB
	MOVEI	T1,ERRCHK(P1)
	MOVEI	T2,ERRCHK(P2)
	LDB	T3,[POINT 12,WKBUFF+MDESF1,35]	;PICKUP # CHKSUM ERRS
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.CHK

	MOVEI	T1,ERRINC(P1)
	MOVEI	T2,ERRINC(P2)
	HRRZ	T3,WKBUFF+MDESF2	;[302PICKUP # SEEK INCOMP ERRORS
	PUSHJ	P,COMPAR
	MOVEI	T1,ERRHN1(P1)
	MOVEI	T2,ERRHN1(P2)
	LDB	T3,[POINT 9,WKBUFF+MDESF3,8]	;PICKUP # HARD HANGS
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.HNG1
	MOVEI	T1,ERRHN2(P1)
	MOVEI	T2,ERRHN2(P2)
	LDB	T3,[POINT 9,WKBUFF+MDESF3,17]	;PICKUP # SOFT HANG TYPE 1
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.HNG2
	MOVEI	T1,ERRHN3(P1)
	MOVEI	T2,ERRHN3(P2)
	LDB	T3,[POINT 9,WKBUFF+MDESF3,26]	;PICKUP # SOFT HANGS TYPE 2
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.HNG3
	MOVEI	T1,ERRHN4(P1)
	MOVE	T2,ERRHN4(P2)
	LDB	T3,[POINT 9,WKBUFF+MDESF3,35]	;PICKUP # SOFT HANGS TYPE 3
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.HNG4
	MOVEI	T1,ERRCWF(P1)
	MOVEI	T2,ERRCWF(P2)
	LDB	T3,[POINT 9,WKBUFF+MDECCT,35]	;# CCW TERM FAILURES
	PUSHJ	P,COMPAR
	TLNE	F,F.CHNG
	TLO	S,S.CWF
	;HERE TO START SUMMING DEVICE ERROR REGISTERS

;	MOVE	P3,WKBUFF+MDETYP	;SETUP P3 WITH RETRY WORD
;	HRRZ	T1,WKBUFF+MDEDDT	;GET DEVICE TYPE
;	ANDI	T1,77			;ALONE
	MOVE	T1,MDEDTP		;get device type
	CAIN	T1,0			;RS04?
	 PJRST	S11.2			;YES
	CAIN	T1,1			;TU16?
	 PJRST	S11.3			;MUST BE TU16 (BETTER BE OR...)
	CAIN	T1,2			;RP04,5,OR6
	 PJRST	S11.4			;YUP
	CAIN	T1,3			;RP04,5,OR6
	 PJRST	S11.4			;YUP
	CAIN	T1,4			;RP04,5,OR6
	 PJRST	S11.4			;YUP
	CAIN	T1,5			;RM03?
	 PJRST	S11.5			;YES
	PJRST	S11.3			;MUST BE TU16 (BETTER BE OR...)

	;HERE FOR RS04
S11.2:	MOVE	P1,MASIND		;GET OFFSET FOR THIS DEV
	MOVS	P2,MASDSP(P1)		;COUNTER ADDRESSES
	HRLZ	P1,WKBUFF+MDEDER	;WORD TO SUMMATE
	MOVEI	T1,25			;OFFSET FOR RS04 ERROR REG
	MOVEM	T1,KONTYP
	PJRST	MASSVM

	;HERE DO TU16
S11.3:	MOVE	P1,MASIND		;GET OFFSET FOR THIS DEV
	MOVS	P2,MASDSP(P1)		;COUNTER ADDRESSES
	HRLZ	P1,WKBUFF+MDEDER	;WORD TO SUMMATE
	MOVEI	T1,27			;OFFSET FOR TU16 ERROR REG
	MOVEM	T1,KONTYP
	PJRST	MASSVM


	;HERE DO RP04'S
S11.4:	MOVE	P1,MASIND		;GET OFFSET FOR THIS DEV
	MOVS	P2,MASDSP(P1)		;COUNTER ADDRESSES
	HRLZ	P1,WKBUFF+MDEDER	;WORD TO SUMMATE
	MOVEI	T1,21			;OFFSET FOR RP04 ERROR REG
	MOVEM	T1,KONTYP
	PUSHJ	P,MASSVM
	HLRZ	T1,P2
	ADDI	T1,NURP02		;INCREASE TO POINT AT 2ND
	HRL	P2,T1		;PUT IT BACK
	HRRZ	T1,P2			;RH
	ADDI	T1,NURP02
	HRR	P2,T1
	AOS	KONTYP			;KONTYP=22
	HRLZ	P1,WKBUFF+MDEDCB	;2ND WORD
	PUSHJ	P,MASSVM
	HLRZ	T1,P2		;INCREASE TO # 3
	ADDI	T1,NURP10
	HRL	P2,T1		;PUT IT BACK
	HRRZ	T1,P2
	ADDI	T1,NURP10
	HRR	P2,T1
	AOS	KONTYP		;=23
	HRLZ	P1,WKBUFF+MDEDDA	;3RD WORD
	PUSHJ	P,MASSVM
	SKIPN	HDVER1	;VERSION 1 HEADER OF ENTRY?
	POPJ	P,0
	 POPJ	P,0	;NO-LEAVE NOW
	LDB	T2,[POINT 9,WKBUFF+MDECCT,17]
	CAIL	T2,5	;<5-GIVE WARNING
	 POPJ	P,0	;ITS OK
	MOVE	T2,WKBUFF+MDESTR	;GET STR NAME
	PUSHJ	P,TTYSIX	;CONVERT AND DUMP ON USER'S TTY
	WARN	< STRUCTURE FOUND WITH LESS THAN 5 BAT BLOCK SLOTS LEFT>
	 ;GIVE WARN NOW AND GET FREE CRLF
	POPJ	P,0

	;HERE FOR RM03
S11.5:	MOVE	P1,MASIND		;GET OFFSET FOR THIS DEV
	MOVS	P2,MASDSP(P1)		;COUNTER ADDRESSES
	HRLZ	P1,WKBUFF+MDEDER	;WORD TO SUMMATE
	MOVEI	T1,21			;OFFSET FOR RM03 ERROR REG
	MOVEM	T1,KONTYP
	PUSHJ	P,MASSVM
	ADD	P2,[NURP02,,NURP02]	;ADVANCE POINTER FOR SECOND WORD
	MOVEI	T1,45			;OFFSET FOR RM03 ERROR REG#2
	MOVEM	T1,KONTYP
	HRLZ	P1,WKBUFF+MDEDDA	;RM03 ER#2 IS IN RP06'S ER#3 SLOT
	PUSHJ	P,MASSVM
	SKIPN	HDVER1	;VERSION 1 HEADER OF ENTRY?
	POPJ	P,0
	 POPJ	P,0	;NO-LEAVE NOW
	LDB	T2,[POINT 9,WKBUFF+MDECCT,17]
	CAIL	T2,5	;<5-GIVE WARNING
	 POPJ	P,0	;ITS OK
	MOVE	T2,WKBUFF+MDESTR	;GET STR NAME
	PUSHJ	P,TTYSIX	;CONVERT AND DUMP ON USER'S TTY
	WARN	< STRUCTURE FOUND WITH LESS THAN 5 BAT BLOCK SLOTS LEFT>
	 ;GIVE WARN NOW AND GET FREE CRLF
	POPJ	P,0
SUM12:	POPJ	P,0
SUM16:	MOVE	T2,WKBUFF+SLMWHO	;SAME AS SUM1 BASICALLY
	MOVEI	T1,WHOSLM		;INIT POINTER
WHOFND:	HLRZ	T3,(T1)			;GET POINTER TO NEXT
	JUMPE	T3,WHONEW		;EXIT IF NO REASON
	MOVEI	T1,(T3)			;SETUP POINTER
	CAME	T2,1(T1)		;IS THIS THE ENTRY?
	 JRST	WHOFND			;NO,GET NEXT
	AOS	T3,(T1)			;BUMP
	TRNN	T3,-1			;BUT
	  SOS	(T1)			;NOT TOO MUCH(OVERFLOW)
	PJRST	SUM16A
	
WHONEW:	AOS	T3,.JBFF##		;NEXT POSITION
	AOS	.JBFF##			;CLEAN HOUSE
	CAMG	T3,.JBREL##		;IS THERE ROOM?
	 JRST	WHOINS			;YES INSERT REASON
	MOVE	T4,T3			;DIFFERENT AC
	CORE	T4,			;GET MORE CORE
	 FATAL	<SYRNCA: NO CORE AVAILABLE>	;OPPS

WHOINS:	MOVEM	T2,(T3)			;SAVE REASON
	ADDI	T3,-1			;INITIAL COUNT AND ADDRESS
	HLRZM	T3,(T3)			;SET COUNT TO ONE
	HRLM	T3,(T1)		;POINT TO THIS BLOCK
	PJRST	SUM16A		;DO SECON HALF


SUM16A:	MOVE	T2,WKBUFF+SLMDEV	;SAME AS SUM1 BASICALLY
	MOVEI	T1,DEVWHY		;INIT POINTER
DEVFND:	HLRZ	T3,(T1)			;GET POINTER TO NEXT
	JUMPE	T3,DEVNEW		;EXIT IF NO REASON
	MOVEI	T1,(T3)			;SETUP POINTER
	CAME	T2,1(T1)		;IS THIS THE ENTRY?
	 JRST	DEVFND			;NO,GET NEXT
	AOS	T3,(T1)			;BUMP
	TRNN	T3,-1			;BUT
	  SOS	(T1)			;NOT TOO MUCH(OVERFLOW)
	POPJ	P,0
	
DEVNEW:	AOS	T3,.JBFF##		;NEXT POSITION
	AOS	.JBFF##			;CLEAN HOUSE
	CAMG	T3,.JBREL##		;IS THERE ROOM?
	 JRST	DEVINS			;YES INSERT REASON
	MOVE	T4,T3			;DIFFERENT AC
	CORE	T4,			;GET MORE CORE
	 FATAL	<SYRNCA: NO CORE AVAILABLE>	;OPPS

DEVINS:	MOVEM	T2,(T3)			;SAVE REASON
	ADDI	T3,-1			;INITIAL COUNT AND ADDRESS
	HLRZM	T3,(T3)			;SET COUNT TO ONE
	HRLM	T3,(T1)		;POINT TO THIS BLOCK
	POPJ	P,0		;AND LEAVE



SUM15:	POPJ	P,0	;FOR NOW
SUM30:	POPJ	P,0	;FOR NOW


SUM21:	PUSHJ	P,.SAVE4	;SAVE A FEW
	MOVE	P3,WKBUFF+TAPNAM
	TRNE	P3,7777		;EDIT 132 FUNNY NAME?
	 PUSHJ	P,FIXNAM	;GO FIX
	MOVE	T1,[IOWD NAMLTH,NAMTBL]
	PUSHJ	P,.NAME
	 JRST 	BADNAM
	TLZ	T1,-1
	SUBI	T1,NAMTBL
	MOVE	P1,DEVDSP(T1)	;GET HD & SF ADDRS
	MOVE	P2,WKBUFF+TAPIEP
	SUB	P2,HEADWC
	ADDI	P2,WKBUFF	;SETUP P2 FOR LATER
	HLRZ	T2,WKBUFF+TAPTRY
	HRRZ	P3,P1		;SET FOR SOFT BUT
	TRNE	T2,ERRHRD	;IF HARD
	 HLRZ	P3,P1		;CHANGE IT
	ANDI	T2,70		;CONTROLLER TYPE
	CAIE	T2,30		;DX10?
	 JRST	S21.1		;NO
	MOVE	T1,XS.CNI(P2)	;YES GET CONI
	TRNE	T1,1B27		;MEM PAR?
	 AOS	,1(P3)		;YUP-BUMP COUNT
	TRNE	T1,1B28		;NXM?
	 AOS	,2(P3)
	TRNE	T1,1B26		;MP ERR?
	 AOS	,5(P3)
	POPJ	P,0		;RETURN P1-P4 TOO

	;HERE FOR TC10 OR TM10
S21.1:	CAIE	T2,20		;TC10?
	 JRST	S21.2		;MUST BE TM10
	MOVE	T1,TC.CNI(P2)	;GETS CONI
	TLNE	T1,1B22		;UNIT HNG?
	 AOS	,4(P3)		;YUP
	TLNE	T1,1B31		;OVERRUN?
	 AOS	,3(P3)
	HLRZ	T1,T1
	ANDI	T1,14		;GET REAL BITS 14 &15 ALONE
	CAIN	T1,14		;NXM?
	 AOS	,2(P3)		;YUP
	CAIN	T1,10		;CTL PAR?
	 AOS	,0(P3)
	CAIN	T1,4		;MEM PAR?
	 AOS	,1(P3)
	POPJ	P,0		;DONT FORGET P1-P4 ALSO

	;HERE FOR TM10 OR TM02
S21.2:	CAIN	T2,40	;[550] TM02?
	 JRST	S21.3	;DO TM02
	MOVE	T1,TM.CNS(P2)	;CONI MTS
	HLRZ	T2,WKBUFF+TAPTRY	;GET CONTROLLER TYPE
	TRNN	T2,1B32			;TM10A?
	 TDZ	T1,[7B13!1B31]	;[550]CLR TM10B ONLY BITS
	TLNE	T1,1B29		;CTL PAR?
	 AOS	,0(P3)
	TLNE	T1,1B31		;MEM PAR?
	 AOS	,1(P3)
	TLNE	T1,1B30		;NXM?
	 AOS	,2(P3)
	TRNE	T1,1B18		;UNIT HNG?
	 AOS	,4(P3)
	TRNE	T1,1B27		;OVERRUN?
	 AOS	,3(P3)		;[757]
	POPJ	P,0		;P1-P4 TOO

	;HERE DO TM02 SUMMARY
S21.3:	;[1133]
	MOVE	T1,TAPKON
	CAIN	T1,6		;RH11?
	 JRST	S21.5		;YES
	;END[1133]
	MOVE	T1,T2.CNI(P2)	;CONI AT ERROR
	TRNE	T1,1B18		;CTL PAR?
	 AOS	,0(P3)
	TLNE	T1,1B33!1B34	;MEMPAR?
	 AOS	,1(P3)
	TRNE	T1,1B22!1B28	;OVERRUN?
	 AOS	,3(P3)
	TLNE	T1,1B35		;NXM?
	 AOS	,2(P3)
S21.4:	MOVE	T1,T2.DER(P2)	;GET DEVICE ERROR REG
	TDNE	T1,[1B20!1B25!1B28!1B29!1B30!1B31!1B32]	;ERROR BITS
	AOS	,6(P3)
	PUSH	P,T1		;SAVE THIS REGISTER CONTENTS
	;NOW SUMMATE DEVICE REGISTER
	MOVE	P3,WKBUFF+TAPNAM	;GET DEVICE NAME
	TRNE	P3,7777
	PUSHJ	P,FIXNAM
	MOVE	T1,[IOWD MASLTH,MASNAM]
	PUSHJ	P,.NAME
	 JRST	BADNAM
	TLZ	T1,-1
	SUBI	T1,MASNAM
	MOVE	P1,T1
	MOVS	P2,MASDSP(P1)
	POP	P,T1		;GET REGISTER CONTENTS BACK
	HRLZ	P3,T1		;FINISH SETUP WITH
	MOVEI	T1,27		;OFFSET TO TU16 ERROR REG
	MOVEM	T1,KONTYP
	PJRST	MASSVM	;GO DO SUMMARY


	;HERE SUMMATE RH11 STUFF
S21.5:	MOVE	T1,T2.CNI(P2)	;GET CS1 TO RH,CS2 TO LH
	TDNE	T1,[1B4!1B22]		;CTL PAR?
	 AOS	,0(P3)
	TLNE	T1,3B24
	 AOS	,2(P3)
	TLNE	T1,1B20
	 AOS	,3(P3)
	MOVE	T1,T2.DTI(P2)	;UBA STATUS
	TRNE	T1,1B20
	 AOS	,0(P3)
	JRST	S21.4		;GO DO DEVICE SUMMARY
SUM40:	POPJ	P,


SUM50:	POPJ	P,0	;NOTHING TO SUM


SUM42:	MOVE	P3,WKBUFF+TPSNAM
	TRNE	P3,7777		;EDIT 132 FUNNY NAME?
	 PUSHJ	P,FIXNAM	;GO FIX
	MOVE	T1,[IOWD NAMLTH,NAMTBL]
	PUSHJ	P,.NAME
	 PJRST	BADNAM
	TLZ	T1,-1
	SUBI	T1,NAMTBL
	HRRZ	P4,DEVDSP(T1)
	HLRZ	P3,DEVDSP(T1)	;SAVE BOTH HD &SF ADDRS
	MOVE	P1,WKBUFF+TPSWRC	;WORDS READ
	PUSHJ	P,WDCNT		;GO DO IT
	MOVE	T1,WKBUFF+TPSHRE
	ADDM	T1,6(P3)	;UPDATE HARD COUNTER
	MOVE	T1,WKBUFF+TPSSRE
	ADDM	T1,6(P4)	;SOFT COUNTER
	POPJ	P,0	;GO BACK TO BCK41

	;SUMUPD -- SUBROUTINE TO AUTOMATICALLY UPDATE ALL PERMANENT
	;SUMMARY COUNTERS PRIOR TO SUMMARY LISTING
	;A DUMMY MACRO DUMFLG IS USED TO GENERATE
	;THE NECESSARY CODE AS FOLLOWS
	;SKIPE	T1,XXXTMP	;PICKUP TEMP COUNTER
	;ADDM	T1,XXXPER	;INCREMENT PERM COUNTER
	;DO NEXT COUNTER SAME.......
	;modified by edit #110
	DEFINE	TBLFLG(A)<
	setz	t1,
	exch	t1,a'TMP
	ADDM	T1,A'PER
>

	;NOW THE ACTUAL CODE GENERATION

;	XLIST
SUMUPD:	DUMFLG
	LIST


;NOW GENERATE THE SOFTWARE SUMMARY COUNTERS UPDATE
;also modified by edit #110
	DEFINE	DUMDV(A)<
	ZZ==0
REPEAT NUMSFB,<
	setz	t1,
	exch	t1,a'ST+zz
	ADDM	T1,A'SP+ZZ
	ZZ==ZZ+1
>>
;	XLIST
;	DUMDP
;	DUMFH
;	DUMRP
	LIST
	XLIST
	DUMDP
	DUMFH
	DUMRP
	LIST

	POPJ	P,		;RETURN
	SUBTTL	STORAGE LOCATIONS
DUMDAY:	121165		;DUMMY NBS DAY FOR USE BY SCAN
KONMSK:	0			;MASK FOR ERROR BITS IN RC10 TYPE DEVICE
	0			;MASK FOR ERROR BIT IN A RP10 TYPE DEVICE
	SFMASK			;SOFTWARE DETECTED ERROR MASK
	TMMASK
	RHMASK
	RH20SK
	DXMASK
	TCMASK
	DL1MSK
	DL2MSK
	KLAMSK
	RHSWSK
	RH11SK
	CS2MSK
	CS3MSK
	0
	P4SRSK
	P4ERSK
	P4CBSK
	P4DASK
	S4SRSK
	S4ERSK
	T6SRSK
	T6ERSK
	ICPCSK
	DXTBSK
	SB03SK
	SB47SK
	RP05SK
	RP06SK
	SB81SK
	RPMRSK
	DXSRSK
	DXMRSK
	DXERSK
	RMM1SK
	RMM2SK
	RME2SK

MINERB:	0
	0
	MINSFB
	MINTMB
	MINRHB
	 MINRH2
	MINDXB
	MINTCB
	MINDL1
	MINDL2
	MINKLA
	MIRHSW
	MINR11
	MINCS2
	MINCS3
	0
	MIRP01
	MIRP02
	MIRP10
	MIRP15
	MIRS01
	MIRS02
	MIT601
	MIT602
	MIICPC
	MIDXTB
	MISB03
	MISB47
	MIRP05
	MIRP06
	MISB81
	MIRPMR
	MIDXSR
	MIDXMR
	MIDXER
	MINMR1
	MINMR2
	MINER2


ERINDX:	0
	0
	SFINDX
	TMINDX
	RHINDX
	RH20DX
	DXINDX
	TCINDX
	DL1IND
	DL2IND
	0
	RHSWDX
	RH11DX
	CS2DX
	CS3DX
	0
	RP01DX
	RP02DX
	RP10DX
	RP15DX
	RS01DX
	RS02DX
	T601DX
	T602DX
	ICPCDX
	DXTBDX
	SB03DX
	SB47DX
	RP05DX
	RP06DX
	SB81DX
	RPMRDX
	DXSRDX
	DXMRDX
	DXERDX
	RMR1DX
	RMR2DX
	RME2DX
IDVFLT:	SIXBIT/SYS/		;DEFAULT FILE SPECIFICATIONS
IFLFLT:	SIXBIT/ERROR/
IEXFLT:	SIXBIT/SYS/
ODVFLT:	SIXBIT/DSK/
OFLFLT:	SIXBIT/ERROR/
OEXFLT:	SIXBIT/LST/

PDLPNT:	IOWD	LPDL,PDLST
	SUBTTL	DUMMY MACRO EXPANSION AREA


	;THE FOLLOWING MACRO CODE UTILIZES THE PRINCIPLE OF THE DUMMY
	;MACRO USED EARLIER AND REDEFINES TBLENT TO GENERATE VAIOUS
	;NECESSARY DISPATCH TABLES

	;MACRO TO CREATE A TABLE CONTAINING OFFSET INTO OTHER TABLES
	;WHICH WERE PREVIOUSLY INDEXED BY ERROR TYPE(VER 3 & EARLIER). ALLOWS
	;HOLES TO BE IN SEQUENCE OF ERROR TYPES WHICH ARE USED.

	;THIS FIRST TABLE CONTAINS ALL THE ERROR  TYPES
	;KNOWN TO ALL SYSERR PARTS. THE SECOND IS THE TABLE
	;OF TYPES PROCESSED BY THE SEGMENT.
	;EDIT #120.
	SALL
	DEFINE	TBLENT(A,B,C,D,E)<
	XWD  0,A
	>

ALLTBL:	DUMENT

	ALLLTH=<.-1>-ALLTBL+1		;LENGTH OF ERROR INDEX TABLE

	;TABLE OF ERRORS PROCESSED BY THIS ENTRY AND,
	; BRIEF PROCESS TABLE POINTERS  -  EDIT [724]
DEFINE	TBLENT(A,B,C,D,E,F)<
	IFIDN<D><PROCSB><
		XWD  F,A
	>
>

ERRTBL:	0		;FIRST FOUND MUST NOT BE 0
	DUMENT

	ERRLTH=<.-1>-ERRTBL+1		;LENGTH OF ERROR INDEX TABLE


	;THE ENTRY PROCESSING TABLE
	;THIS TABLE MUST BE INDEXED BY THE CONTENTS OF ERTYPE

	DEFINE	TBLENT(A,B,C,D,E)<
	IFIDN<D><PROCSB><
	XWD	C,D
	TYPMAX==A>
	IFDIF<D><PROCSB><
	XWD	0,D
	TYPMAX==A>
	>
PCSTBL:	DUMENT


	;GENERATE THE VARIOUS ASCIZ MESSAGES TO BE USED FOR HEADER
	;ENTRY TYPE IDENTIFICATION
	;FORMAT WILL BE MESS(#) WHERE MESS IS THE ENTRY TYPE
	;DESCRIPTION AND # IS THE ERROR TYPE

	DEFINE	TBLENT(A,B,C,D,E)<
	IFIDN<D><PROCSB><
	[ASCIZ/B/]
	>>


	;GENERATE THE TEXT


TYPMES:	0
	DUMENT
	LIST

	;END OF ENTRY DESCRIPTOR GENERATOR


	;GENERATE THE DISPATCH TABLE TO ENTRY SUMMATION AND BIT CHECK ROUTINES
	;ALL WILL RETRN VIA POPJ	P,
	;TABLE IS INDEXED BY ERROR TYPE CODE

	DEFINE	TBLENT(A,B,C,D,E)<
	IFIDN<D><PROCSB><
	IFDIF<B><UNKNOWN TYPE>,<	XWD	0,BCK'A>
	IFIDN<B><UNKNOWN TYPE>,<	XWD	0,[POPJ	P,]>
	>>
	;GENERATE THE TABLE

BITCHK:	0
	DUMENT


	;GENERATE THE TABLE OF LINE COUNTS FOR OUTPUT LISTING

	DEFINE	TBLENT(A,B,C,D,E)<
	IFIDN<D><PROCSB><
	XWD	0,E
	>>

	RADIX	10

LINE:	0
	DUMENT

	RADIX	8

	;GENERATE THE VARIOUS ENTRY CONTROL TABLES USING THE MACRO TBLWRD
	;TO GENERATE TABLES

	DEFINE	TBLWRD(A,B,C,D,E,F)<
	IFDIF<D><SPECL>,<	BYTE	(6)B,C,D(18)T'A'E>
	IFIDN<D><SPECL>,<	BYTE	(6)B,C,D(18)F>

>

.BR002:	BRF002
.CT002:	DUM002
	Z
.BR004:	BRF004
.CT004:	DUM004
	Z
.BR011:	BRF011
.CT011:	DUM011
	Z
.BR012: BRF012
.CT012: DUM012
	Z
.BR015:	BRF015
.CT015:	DUM015
	Z
.BR016:	BRF016
.CT016:	DUM016
	Z
.BR021:	BRF021
.CT021:	DUM021
	Z
.BR042:	BRF042
.CT042:	DUM042
	Z
.BR050:	BRF050
.CT050:	DUM050
	Z


	;END OF ENTRY TABLE GENERATION
	;GENERATE THE NECESSARY ASCIZ TEXT FOR NON-SPECIAL ROUTINES

	DEFINE	TBLWRD(A,B,C,D,E,F)<
	IFDIF	<D><SPECL>,<
T'A'E:	ASCIZ/
F/
>>


	;WHAT IS XLISTED IS THE DUMALL CALL AND FOLOWING CODE.
	XLIST
	DUMALL
	LIST




	;END OF ASCIZ TEXT MACRO EXPANSION
	;SWITCH TABLES
	;THE FOLLOWING TABLES WILL BE GENERATED VIA THE DUMMY MACRO
	;DUMCH1
	;THE FIRST IS A DISPATCH TABLE TO BYTES REPRESENTING BITS TO SET
	;IN THE ENTCHR TABLE
	;NEXT IS THE ACTUAL BYTES THEMSELVES

	;TABLE FOR DISPATCH TO THE BYTE OPERANDS

	DEFINE	TBLCH1(A,B,C,D,E,F,G)<
	XWD	0,BYT'G
>

	;MAKE DISPATCH TABLE

BYTDSP:	DUMCH1
	;NOW THE BYTES THEMSELVES


	DEFINE	TBLCH1(A,B,C,D,E,F,G)<
BYT'G:	BYTE (6) B,77,C,77,D,77,E,77,F,77
>


	DUMCH1
	;SWITCH MACRO EXPANSION NEXT


	;DEFINE THE SWITCHES WE RECOGNIZE

	DEFINE	TBLCH1(A,B,C,D,E,F,G)<
	SS	(A,A,0)
>
	DEFINE	TBLCH2(A,B,C)<
	SP	(A,A,B,C)
>

	;CALL MACRO TO SETUP DEFAULTS

	DEFVAL


	;NOW MAKE SWTCHS MACRO FOR USE WITH DOSCAN LATER

	DEFINE	SWTCHS<
	DUMCH1
	DUMCH2
>

	DOSCAN(SWTAB)


	SALL
	;GENERATE THE CONI BIT TEXT AND ADDRESS DISPATCHER
	RADIX	10		;****** NOTE WELL *****


	DEFINE	TBLDEV(A,B)<
	[ASCIZ\B',\]
>

	SOFTDV:	DUMSF1


	DEFINE	TBLDEV(A,B)<
	[ASCIZ\B',\]
>
	TM10DV:	DUMTM1
	DEFINE	TBLDEV(A,B)<
	[ASCIZ\B',\]
>
	RH10DV:	DUMRH1

	DEFINE	TBLDEV(A,B)<
	[ASCIZ\B',\]
>
	RP04SR:	DURP01
	RP04ER:	DURP02
	RP04CB:	DURP10
	RP04DA:	DURP15
	RS04SR:	DURS01
	RS04ER:	DURS02
	TU16SR:	DUT601
	TU16ER:	DUT602
	ICPCX1:	DUICPC
	DX10DV:	DUMDX1
	DXTAGB:	DUDXTB
	DXSB03:	DUSB03
	DXSB47:	DUSB47
	TC10DV:	DUMTC1
	DL10DV:	DUMDL1
	DL11DV:	DUMDL2
	RH20DV:	DUMRH2
	RP05DV:	DURP05
	RP06DV:	DURP06
	SB81DV:	DUSB81
	RPMRDV:	DURPMR
	RHSWDV:	DURHSW
	DXMRDV:	DUDXMR
	DXSRDV:	DUDXSR
	DXERDV:	DUDXER
	RH11DV:	DUMR11
	CS2DV:	DUMCS2
	RM3MR1: DURMR1
	RM3MR2: DURMR2
	RM3ER2:	DURER2
	CS3DV:	DUMCS3
	;NOW GENERATE THE ERROR BIT VS INDEX BIT TABLES
	;THIS ALLOWS NON-CONTIGUOUS ERROR BITS IN CONI WORD
	;TO BE COUNTED IN CONTIGUOUS COUNTERS



	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	SB81DX+A-MISB81
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
SB81DX:	REPEAT	36-MISB81,<0>
	LIST
	ZZ==0
	DUSB81

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DXSRDX+A-MIDXSR
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DXSRDX:	REPEAT	36-MIDXSR,<0>
	LIST
	ZZ==0
	DUDXSR

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DXMRDX+A-MIDXMR
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DXMRDX:	REPEAT	36-MIDXMR,<0>
	LIST
	ZZ==0
	DUDXMR

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DXERDX+A-MIDXER
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DXERDX:	REPEAT	36-MIDXER,<0>
	LIST
	ZZ==0
	DUDXER

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RPMRDX+A-MIRPMR
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RPMRDX:	REPEAT	36-MIRPMR,<0>
	LIST
	ZZ==0
	DURPMR

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	TCINDX+A-MINTCB
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
TCINDX:	REPEAT	36-MINTCB,<0>
	LIST
	ZZ==0
	DUMTC1


	DEFINE 	TBLDEV(A,B)<
	ZZP==.
	RELOC	TMINDX+A-MINTMB
	ZZ
	ZZ=ZZ+1
	RELOC	ZZP
>
;	XLIST
TMINDX:	REPEAT	36-MINTMB,<0>
	LIST
	ZZ==0
	DUMTM1

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	SFINDX+A-MINSFB
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
SFINDX:	REPEAT	36-MINSFB,<0>
	LIST
	ZZ==0
	DUMSF1
	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RHINDX+A-MINRHB
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RHINDX:	REPEAT	36-MINRHB,<0>
	LIST
	ZZ==0
	DUMRH1

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RP01DX+A-MIRP01
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RP01DX:	REPEAT	36-MIRP01,<0>
	LIST
	ZZ==0
	DURP01
	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RP02DX+A-MIRP02
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RP02DX:	REPEAT	36-MIRP02,<0>
	LIST
	ZZ==0
	DURP02

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RP10DX+A-MIRP10
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RP10DX:	REPEAT	36-MIRP10,<0>
	LIST
	ZZ==0
	DURP10

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RP15DX+A-MIRP15
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RP15DX:	REPEAT	36-MIRP15,<0>
	LIST
	ZZ==0
	DURP15

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RS01DX+A-MIRS01
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RS01DX:	REPEAT	36-MIRS01,<0>
	LIST
	ZZ==0
	DURS01

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	RS02DX+A-MIRS02
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
RS02DX:	REPEAT	36-MIRS02,<0>
	LIST
	ZZ==0
	DURS02

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	T601DX+A-MIT601
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
T601DX:	REPEAT	36-MIT601,<0>
	LIST
	ZZ==0
	DUT601

	DEFINE TBLDEV(A,B)<
	ZZP==.
	RELOC	T602DX+A-MIT602
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>
;	XLIST
T602DX:	REPEAT	36-MIT602,<0>
	LIST
	ZZ==0
	DUT602
	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DXINDX+A-MINDXB
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DXINDX:	REPEAT	36-MINDXB,<0>
	LIST
	ZZ==0
	DUMDX1
	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	ICPCDX+A-MIICPC
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
ICPCDX:	REPEAT	36-MIICPC,<0>
	LIST
	ZZ==0
	DUICPC

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DXTBDX+A-MIDXTB
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DXTBDX:	REPEAT	36-MIDXTB,<0>
	LIST
	ZZ==0
	DUDXTB

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	SB03DX+A-MISB03
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
SB03DX:	REPEAT	36-MISB03,<0>
	LIST
	ZZ==0
	DUSB03

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	SB47DX+A-MISB47
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
SB47DX:	REPEAT	36-MISB47,<0>
	LIST
	ZZ==0
	DUSB47



	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DL1IND+A-MINDL1
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DL1IND:	REPEAT	36-MINDL1,<0>
	LIST
	ZZ==0
	DUMDL1

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	DL2IND+A-MINDL2
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
DL2IND:	REPEAT	36-MINDL2,<0>
	LIST
	ZZ==0
	DUMDL2


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RH20DX+A-MINRH2
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RH20DX:	REPEAT	36-MINRH2,<0>
	LIST
	ZZ==0
	DUMRH2
	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RP05DX+A-MIRP05
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RP05DX:	REPEAT	36-MIRP05,<0>
	LIST
	ZZ==0
	DURP05

	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RP06DX+A-MIRP06
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RP06DX:	REPEAT	36-MIRP06,<0>
	LIST
	ZZ==0
	DURP06


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RHSWDX+A-MIRHSW
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RHSWDX:	REPEAT	36-MIRHSW,<0>
	LIST
	ZZ==0
	DURHSW


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	CS2DX+A-MINCS2
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
CS2DX:	REPEAT	36-MINCS2,<0>
	LIST
	ZZ==0
	DUMCS2


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	CS3DX+A-MINCS3
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
CS3DX:	REPEAT	36-MINCS3,<0>
	LIST
	ZZ==0
	DUMCS3


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RH11DX+A-MINR11
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RH11DX:	REPEAT	36-MINR11,<0>
	LIST
	ZZ==0
	DUMR11



	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RMR1DX+A-MINMR1
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RMR1DX:	REPEAT	36-MINMR1,<0>
	LIST
	ZZ==0
	DURMR1


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RMR2DX+A-MINMR2
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RMR2DX:	REPEAT	36-MINMR2,<0>
	LIST
	ZZ==0
	DURMR2


	DEFINE	TBLDEV(A,B)<
	ZZP==.
	RELOC	RME2DX+A-MINER2
	ZZ
	ZZ==ZZ+1
	RELOC	ZZP
>

;	XLIST
RME2DX:	REPEAT	36-MINER2,<0>
	LIST
	ZZ==0
	DURER2






	RADIX	8		;	***** DONE WITH RADIX 10 *****

	;GENERATE SIXBIT TABLE OF DEVICE NAMES

	DEFINE	DUMDV(A)<
	SIXBIT/A/
>
NAMTBL:	DUMDVA
NAMLTH=<.-1>-NAMTBL+1	;LENGTH OF TABLE OF SIXBIT NAMES
	
;USING SAME DEFINITION OF MACRO NOW GENERATE
	;LIST OF ONLY MASSBUS DEVICE NAMES
	;EDIT 305 ADDED DUMTM
MASNAM:	DUMFS
	DUMRP
	DUMTM
	MASLTH=<.-1>-MASNAM+1	;LENGTH OF THIS TABLE

	;GENERATE LIST OF POINTERS TO 5 WORD SCRATCH BLOCKS

	;FOR ALL DEVICES ON THE SYSTEM
	
DEFINE	DUMDV	(A)<
	XWD	0,A'BK
	>
BKLOC:	DUMDVA

	;GENERATE CONI BIT ERROR DISPATCHER
	;RH = SOFT ERROR POINTER
	;LH = HARD ERROR POINTER

	DEFINE	DUMDV(A)<
	XWD	A'HD,A'SF
>

DEVDS2::
DEVDSP:	DUMDVA



	DEFINE	DUMDV(A)<
	XWD	A'ST,A'SP
>
	;ST=STORAGE TEMP,SP=PERM.
SOFDSP:	DUMDVA
	;NOW THE DISPATCHER FOR MASSBUS ERROR REGS
	;EDIT 305 ADDED DUMTM
	DEFINE	DUMDV (A)<
	XWD	A'DS, A'DH
	>
MASDSP:	DUMFS
	DUMRP
	DUMTM



	END	STARTB