RDREG is  a  general purpose  program  to  read and  interpret  the  Massbus
registers in  a device  connected to  an RH20.   As such  it is  useful  for
debugging hardware and software problems related to such devices.

RDREG can be assembled to run  under both the TOPS-10 and TOPS-20  operating
systems based on  a parameter  in the  universal file  RDRREG.  The  program
itself is totally table driven based  on tables in the universal file  DEFS.
At present, universal files exist only for the DX20 (DX20.MAC).  This  file,
when assembled, creates DEFS.UNV that RDREG searches.

To build a program  that reads and interpretes  DX20 Massbus registers,  you
must assemble RDRMAC.MAC, DX20.MAC, and  RDREG.MAC in the following  manner.
First, insure that the parameter "TOPS"  in RDRMAC is correct for your  type
of operating system, i.e., 20 for TOPS-20 or 10 for TOPS-10.  Then  assemble
RDRMAC.MAC to produce the universal file RDRMAC.UNV.

Second, assemble the device specific  macro definitions file (in this  case,
DX20.MAC).  Note that the result from this assemble is DEFS.UNV; it does not
have the same name as the source file.

Finally,  assemble  RDREG.MAC.   RDREG  will  search  both  RDRMAC.UNV   and
DEFS.UNV.  The result (RDREG.REL)  should now be loaded  and saved with  the
name of  the type  of device  it was  assembled for,  e.g., DX20.EXE  for  a
program that interprets DX20 Massbus registers.

The program  must be  run with  WHEEL or  OPERATOR capabilities  enabled  on
TOPS-20 and TRPSET privileges on TOPS-10.  When the program is run, it  asks
for the  RH20 device  code  of the  RH20 that  controls  the device.   On  a
multi-processor TOPS-10 system, RDREG  will also ask for  the CPU number  to
which the DX20 is  connected.  You can  find out what  the answers to  these
questions should be by asking your  field service people.  RDREG then  reads
and interprets the Massbus registers for the specified device.

You should always  run this  program on  a hard  copy terminal  so that  the
output can be saved for future reference.  In addition, the output should be
annotated with the date and time and  the reason the program was run,  i.e.,
describe the symptoms that caused you to run the program.

An example of  the output produced  by this  program when run  on a  TOPS-20
system is as follows:

@ENABLE
$RUN DX20

RH20 device code: 560
	
	
Rg Name      Contents        Text
-- ----   -------------- ----------------------------------------
   CONI   000000,,002445 Chan rdy,MBE,AIE,PI=5
 0 CR     000600,,200006 Fnc=6
 1 SR     010600,,230000 Link present,MP run
 2 ER     020600,,210400 Error class=1,Sub-class=1
 3 MR     030600,,000004 MP start
 4 AS     040600,,200000 Attentions=0
 6 DT     060600,,250060 Drive type=60
20 GPR0   200600,,000023 Status index=23
21 GPR1   210600,,000013 Drive number=13,Drive mode=0,Data mode=0
22 GPR2   220600,,200120 Size of EST=120
23 GPR3   230600,,200000 TIE byte=0
24 GPR4   240600,,200000 Drive=0
25 GPR5   250600,,200000 Byte count=0
26 GPR6   260600,,203413 Extended status 0=3413
27 GPR7   270600,,200000 Extended status 1=0
30 DIA0   300600,,002011 Microcontroller instruction register=2011
31 DIA1   310600,,130035 IR enable,PC enable,PC auto increment,PC=35
32 DIA2   320600,,200401 ALU B input=1,ALU A input=1
33 DIA3   330600,,310220 Source ROM outputs=220,Destination ROM outputs=220
34 DIA4   340600,,205660 FROM7-FROM0=13,IR par,AC par,SMUX par,UBUS int=0
35 DIA5   350600,,201400 BALU7-BALU0=3,MEM7-MEM0=0
36 DIA6   360600,,200000 IMUX7-IMUX0=0,BR7-BR0=0
37 DIA7   370600,,200003 MA9-MA0=3
70 SBAR   700000,,172742 Byte count=5036
71 STCR   712200,,177761 Block count=1,Command=61
72 PBAR   720000,,172742 Byte count=5036
73 PTCR   732200,,177761 Block count=1,Command=61
74 IVIR   740000,,000023 EPT relative interrupt offset=23


An  example  of  the  output  produced  by  this  program  when  run  on   a
multi-processor TOPS-10 system is as follows:

.RUN DX20

RH20 device code: 554
CPU number: 1
	
	
Rg Name      Contents        Text
-- ----   -------------- ----------------------------------------
   CONI   000000,,002445 Chan rdy,MBE,AIE,PI=5
 0 CR     000600,,200006 Fnc=6
 1 SR     010600,,230000 Link present,MP run
 2 ER     020600,,210400 Error class=1,Sub-class=1
 3 MR     030600,,000004 MP start
 4 AS     040600,,200000 Attentions=0
 6 DT     060600,,250060 Drive type=60
20 GPR0   200600,,000023 Status index=23
21 GPR1   210600,,000013 Drive number=13,Drive mode=0,Data mode=0
22 GPR2   220600,,200120 Size of EST=120
23 GPR3   230600,,200000 TIE byte=0
24 GPR4   240600,,200000 Drive=0
25 GPR5   250600,,200000 Byte count=0
26 GPR6   260600,,203413 Extended status 0=3413
27 GPR7   270600,,200000 Extended status 1=0
30 DIA0   300600,,002011 Microcontroller instruction register=2011
31 DIA1   310600,,130035 IR enable,PC enable,PC auto increment,PC=35
32 DIA2   320600,,200401 ALU B input=1,ALU A input=1
33 DIA3   330600,,310220 Source ROM outputs=220,Destination ROM outputs=220
34 DIA4   340600,,205660 FROM7-FROM0=13,IR par,AC par,SMUX par,UBUS int=0
35 DIA5   350600,,201400 BALU7-BALU0=3,MEM7-MEM0=0
36 DIA6   360600,,200000 IMUX7-IMUX0=0,BR7-BR0=0
37 DIA7   370600,,200003 MA9-MA0=3
70 SBAR   700000,,172742 Byte count=5036
71 STCR   712200,,177761 Block count=1,Command=61
72 PBAR   720000,,172742 Byte count=5036
73 PTCR   732200,,177761 Block count=1,Command=61
74 IVIR   740000,,000023 EPT relative interrupt offset=23
