Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/genrgs.mac
There are no other files named genrgs.mac in the archive.
TITLE	GENRGS
SUBTTL	TABLES AND ROUTINES FOR GENERAL (DISK) REGISTER PRINTING

	SEARCH DEFINS
	INTERN EXRNAM,EXRSER
	EXTERN POCDEC,PNTHEX,PSDN,PNTBCD,TYPN,TYPA
	EXTERN TYPBIT,TSCAN
	RELOC

;THESE ROUTINES ARE THE SERVICE ROUTINES REQUIRED TO SUPPORT
;REGISTER PRINTING. THESE ARE CALLED FROM, AND ARE COMPATABLE
;WITH REGPNT ..... RP04,RP06,RP07(600 MB) AND RM03 ARE SUPPORTED.

 
;HERE IS THE SIXBIT NAME TABLE FOR THE EXTERNAL (DEVICE) REGISTERS
;THIS TABLE CAN BE INDEXED INTO BY BITS 0-5 OF THE DATAI WORD

EXRNAM:	SIXBIT	/DRCR/		;R0
	SIXBIT	/DRSR/		;R1
	SIXBIT	/DRER1/		;R2
	SIXBIT	/DRMR/		;R3
	SIXBIT	/DRATA/		;R4
	SIXBIT	/DRDA/		;R5
	SIXBIT	/DRDT/		;R6
	SIXBIT	/DRLA/		;R7
	SIXBIT	/DRSN/		;R10
	SIXBIT	/DROFST/	;R11
	SIXBIT	/DRDCY/		;R12
	SIXBIT	/DRRG13/	;R13
	SIXBIT	/DRRG14/	;R14
	SIXBIT	/DRRG15/	;R15
	SIXBIT	/DRECPS/	;R16
	SIXBIT	/DRECPT/	;R17
	SIXBIT	/DRR20/
	SIXBIT	/DRR21/
	SIXBIT	/DRR22/
	SIXBIT	/DRR23/
	SIXBIT	/DRR24/
	SIXBIT	/DRR25/
	SIXBIT	/DRR26/
	SIXBIT	/DRR27/
	SIXBIT	/DRR30/
	SIXBIT	/DRR31/
	SIXBIT	/DRR32/
	SIXBIT	/DRR33/
	SIXBIT	/DRR34/
	SIXBIT	/DRR35/
	SIXBIT	/DRR36/
	SIXBIT	/DRR37/
	PAGE

;HERE IS THE EXTERNAL REGISTER POINTER TABLE
;THIS CAN BE INDEXED INTO BY BITS 0-5 OF THE DATAI WORD
;LAYOUT:-  POINTER TO BYTE PRINT ROUTINE,,POINTER TO APPROPRIATE BIT TABLE

EXRSER:	R00SER,,R00TBL		;R0
	R01SER,,NULTBL		;R1
	[RTN],,R02TBL		;R2
	R03SER,,NULTBL		;R3
	[RTN],,R04TBL		;R4
	R05SER,,NULTBL		;R5
	R06SER,,NULTBL		;R6
	R07SER,,NULTBL		;R7
	R10SER,,NULTBL		;R10
	R11SER,,NULTBL		;R11
	R12SER,,NULTBL		;R12
	R13SER,,NULTBL		;R13
	R14SER,,NULTBL		;R14
	R15SER,,NULTBL		;R15
	R16SER,,R16TBL		;R16
	R17SER,,R17TBL		;R17
	[RTN],,R20TBL		;R20
	[RTN],,R21TBL		;R21
	[RTN],,R22TBL		;R22
	[RTN],,R23TBL		;R23
	[RTN],,R24TBL		;R24
	[RTN],,R25TBL		;R25
	[RTN],,R26TBL		;R26
	[RTN],,R27TBL		;R27
	[RTN],,R30TBL		;R30
	[RTN],,R31TBL		;R31
	[RTN],,R32TBL		;R32
	[RTN],,R33TBL		;R33
	[RTN],,R34TBL		;R34
	[RTN],,R35TBL		;R35
	[RTN],,R36TBL		;R36
	[RTN],,R37TBL		;R37
	PAGE


;HERE IS THE NULL BIT TABLE THAT CAUSES TYPBIT TO DO NOTHING

NULTBL:	000000
	000000


;HERE ARE THE NULL BIT TABLES FOR UNIMPLEMENTED MASSBUS REGISTERS

R20TBL:
R21TBL:
R22TBL:
R23TBL:
R24TBL:
R25TBL:
R26TBL:
R27TBL:
R30TBL:
R31TBL:
R32TBL:
R33TBL:
R34TBL:
R35TBL:
R36TBL:
R37TBL:	000000
	177777
	PAGE

;REGISTER 00 PRINTER

R00SER:	PUT	0
	PUT	2
	TEXT	[ASCIZ/FNCTN(30-34)=/]
	MOVE	2,FNCT(X1)	;GET SIXBIT TABLE ADDR
	LDB	0,[POINT 5,1,34] ;GET FUNCT BITS
	ADD	2,0		;MAKE AN INDEX POINTER
	MOVE	0,(2)		;FETCH SIXBIT NAME
	PNTSIX			;PRINT IN SIXBIT
	TEXT	[ASCIZ/ GO-BIT=/]
	LDB	[POINT 1,1,35]
	PNT1
	GET	2
	GET	0
	RTN

;FUNCTION TABLE POINTERS FOR EACH DEVICE

FNCT:	RBFNCT			;RP04
	RBFNCT			;RP06
	NULTBL			;SPARE
	RAFNCT			;RP07(600 MB)
	RBFNCT			;RM03
	NULTBL			;SPARE
	NULTBL			;RP20 (TOPS10)
	NULTBL			;RP20 (TOPS20)

;HERE'S THE CONTROL REG FUNCTION TABLE
;WITHOUT THE GO BIT FOR THE RP07

RAFNCT:	SIXBIT	/NO-OP/
	SIXBIT	/UNLOAD/
	SIXBIT	/SEEK/
	SIXBIT	/RECAL/
	SIXBIT	/DRVCLR/
	SIXBIT	/RELSE/
	SIXBIT	/OFFSET/
	SIXBIT	/RTN-CL/
	SIXBIT	/READIN/
	SIXBIT	/PAKACK/
	SIXBIT	/ILF-24/
	SIXBIT	/ILF-26/
	SIXBIT	/SEARCH/
	SIXBIT	/ILF-32/
	SIXBIT	/DIAG/
	SIXBIT	/ILF-36/
	SIXBIT	/ILF-40/
	SIXBIT	/ILF-42/
	SIXBIT	/ILF-44/
	SIXBIT	/ILF-46/
	SIXBIT	/WTCKD/
	SIXBIT	/WTCKHD/
	SIXBIT	/ILF-54/
	SIXBIT	/ILF-56/
	SIXBIT	/WRITE/
	SIXBIT	/FORMAT/
	SIXBIT	/WRT-TD/
	SIXBIT	/ILF-66/
	SIXBIT	/READ/
	SIXBIT	/RD-H+D/
	SIXBIT	/RD-TD/
	SIXBIT	/ILF-76/

;HERE'S THE CONTROL REG FUNCTION TABLE
;WITHOUT THE GO BIT FOR THE RP04, RP06, RM03

RBFNCT:	SIXBIT	/NO-OP/
	SIXBIT	/UNLOAD/
	SIXBIT	/SEEK/
	SIXBIT	/RECAL/
	SIXBIT	/DRVCLR/
	SIXBIT	/RELSE/
	SIXBIT	/OFFSET/
	SIXBIT	/RTN-CL/
	SIXBIT	/READIN/
	SIXBIT	/PAKACK/
	SIXBIT	/ILF-24/
	SIXBIT	/ILF-26/
	SIXBIT	/SEARCH/
	SIXBIT	/ILF-32/
	SIXBIT	/ILF-34/
	SIXBIT	/ILF-36/
	SIXBIT	/ILF-40/
	SIXBIT	/ILF-42/
	SIXBIT	/ILF-44/
	SIXBIT	/ILF-46/
	SIXBIT	/WTCKD/
	SIXBIT	/WTCKHD/
	SIXBIT	/ILF-54/
	SIXBIT	/ILF-56/
	SIXBIT	/WRITE/
	SIXBIT	/WT-H+D/
	SIXBIT	/ILF-74/
	SIXBIT	/ILF-66/
	SIXBIT	/READ/
	SIXBIT	/RD-H+D/
	SIXBIT	/RD-TD/
	SIXBIT	/ILF-76/

R00TBL:	004000
	173700
	SIXBIT	/DVA/
	PAGE

;REGISTER 01 SERVICE

R01SER:	PUT	2		;SAVE AC
	MOVEI	2,R01TBA	;GET ADDR OF COMMON BIT TABLE
	GO	TYPBIT		;TYPE THE BITS
	MOVE	2,R01PTR(X1)	;ADDR OF SPECIFIC TABLES
	GO	TYPBIT		;PRINT BITS
	GET	2		;RESTORE TE AC
	RTN			;EXIT

;TABLE POINTERS TO DEVICE SPECIFIC TABLES

R01PTR:	R01TBB			;RP04
	R01TBC			;RP06
	NULTBL			;SPARE
	R01TBD			;RP07(600 MB)
	R01TBE			;RM03
	NULTBL			;SPARE
	NULTBL			;RP20 (TOPS10)
	NULTBL			;RP20 (TOPS20)

;THIS TABLE IS COMMON TO RP04, RP06, RP07, RM03

R01TBA:	177700
	000000
	SIXBIT	/ATA/
	SIXBIT	/ERR/
	SIXBIT	/PIP/
	SIXBIT	/MOL/
	SIXBIT	/WT-LOK/
	SIXBIT	/LBT/
	SIXBIT	/PGM/
	SIXBIT	/DPR/
	SIXBIT	/DRY/
	SIXBIT	/VV/

;SPECIFIC RP04 BITS

R01TBB:	000077
	000000
	SIXBIT	/DE1/
	SIXBIT	/DL64/
	SIXBIT	/GRV/
	SIXBIT	/DIGB/
	SIXBIT	/DF20/
	SIXBIT	/DF5/

;SPECIFIC RP06 BITS

R01TBC:	000000
	000077

;SPECIFICS FRO THE RP07

R01TBD:	000007
	000070
	SIXBIT	/ILV/
	SIXBIT	/EWN/
	SIXBIT	/OM/

;SPECIFICS FOR THE RM03

R01TBE:	000001
	000076
	SIXBIT	/OM/




;REGISTER 02 PRINTER

R02TBL:	177777
	000000
	SIXBIT	/DCK/
	SIXBIT	/UNS/
	SIXBIT	/OPI/
	SIXBIT	/DTE/
	SIXBIT	/WLE/
	SIXBIT	/IAE/
	SIXBIT	/AOE/
	SIXBIT	/HCRC/
	SIXBIT	/HCE/
	SIXBIT	/ECH/
	SIXBIT	/WCF/
	SIXBIT	/FER/
	SIXBIT	/PAR/
	SIXBIT	/RMR/
	SIXBIT	/ILR/
	SIXBIT	/ILF/
	PAGE

;REGISTER 03 PRINTER

R03SER:	PUT	0
	LDB	0,[POINT 16,1,35] ;GET 16 BITS OF DATA
	PNT6			;PRINT IN OCTAL
	GET	0		;RESTORE AC
	RTN			;EXIT




;REGISTER 04 PRINTER

R04TBL:	000377
	000000
	SIXBIT	/ATA-07/
	SIXBIT	/ATA-06/
	SIXBIT	/ATA-05/
	SIXBIT	/ATA-04/
	SIXBIT	/ATA-03/
	SIXBIT	/ATA-02/
	SIXBIT	/ATA-01/
	SIXBIT	/ATA-00/




;REGISTER 05 PRINTER

R05SER:	PUT	0
	TEXT	[ASCIZ/ SURFACE=/]
	LDB	[POINT 8,1,27]
	GO	POCDEC		;PRINT BOTH OCTAL AND DECIMAL
	TEXT	[ASCIZ/ SECTOR=/]
	LDB	[POINT 8,1,35]
	GO	POCDEC		;PRINT BOTH OCTAL AND DECIMAL
	GET	0
	RTN
	PAGE

;REGISTER 06 PRINTERS

R06SER:	PUT	0		;SAVE AC'S
	PUT	1
	PUT	2
	LDB	2,[POINT 16,1,35] ;GET THE DRIVE TYPE
	MOVEI	1,TYPN		;ADDR OF TABLE OF TYPES
	GO	TSCAN		;DO A LOOK UP
	JRST	R6NF		;NOT FOUND
	TEXT	@TYPA(1)	;FOUND... PRINT TYPE
	JRST	R06X		;TO EXIT CODE
R6NF:	TEXT	[ASCIZ/ UNKNOUN DRIVE TYPE = /]
	MOVE	0,2		;GET TYPE
	PNT6			;PRINT IT
R06X:	GET	2		;RESTORE AC'S
	GET	1
	GET	0
	RTN			;EXIT




;REGISTER 07 PRINTERS

R07SER:	PUT	0
	TEXT	[ASCIZ/ SECTOR=/]
	LDB	[POINT	10,1,29]
	GO	POCDEC		;PRINT BOTH OCTAL AND DECIMAL
	GET	0
	RTN




;REGISTER 10 PRINTER

R10SER:	PUT	0
	TEXT	[ASCIZ/ DRIVE SER. NO.=/]
	LDB	[POINT 16,1,35]	;GET LOW ORDER 16 BITS
	GO	PNTBCD		;PRINT AS 4 BCD DIGITS
	GET	0
	RTN
	PAGE

;REGISTER 11 PRINTER

R11SER:	PUT	2		;SAVE AC
	MOVE	2,R11PTR(X1)	;GET ADDR OF PROPER BIT PRINTER
	GO	TYPBIT		;PRINT
	GO	@R11SPT(X1)	;TO PROPER SERVICE ROUTINE
	GET	2		;RESTORE
	RTN			;EXIT

;POINTERS TO DEVICE SPECIFIC BIT TABLES

R11PTR:	R11TBA			;RP04
	R11TBA			;RP06
	NULTBL			;SPARE
	R11TBB			;RP07(600 MB)
	R11TBC			;RM03
	NULTBL			;SPARE
	NULTBL			;RP20 (TOPS10)
	NULTBL			;RP20 (TOPS20)

;POINTERS TO DEVICE SPECIFIC SERVICE ROUTINES

R11SPT:	R11SA			;RP04
	R11SB			;RP06
	[RTN]			;SPARE
	[RTN]			;RP07(600 MB)
	R11SC			;RM03
	[RTN]			;SPARE
	[RTN]			;RP20 (TOPS10)
	[RTN]			;RP20 (TOPS20)

;RP04, RP06 SPECIFIC SERVICE

R11SA:	PUT	0
	LDB	0,[POINT 7,1,35] ;GET THE MAGNITUDE
	JUMPE	0,R11SAX	;JUMP IF NO OFFSET
	TEXT	[ASCIZ/ OFFSET(U-IN.)=/]
	IMULI	0,^D50		;50 U-IN PER CNT
	TRNE	1,1B28		;ESTABLISH DIRECTION
	MOVNS
	GO	PSDN		;PRINT IN DECIMAL
R11SAX:	GET	0
	RTN

R11SB:	PUT	0
	LDB	0,[POINT 7,1,35] ;GET THE MAGNITUDE
	JUMPE	0,R11SBX	;JUMP IF NO OFFSET
	TEXT	[ASCIZ/ OFFSET(U-IN.)=/]
	IMULI	0,^D25		;25 U-IN PER CNT
	TRNE	1,1B28		;ESTABLISH DIRECTION
	MOVNS
	GO	PSDN		;PRINT IN DECIMAL
R11SBX:	GET	0
	RTN

;RM03 SPECIFIC SERVICE

R11SC:	PUT	2		;SAVE THE AC
	TEXT	[ASCIZ/ OFFSET DIRECTION IS /]
	LDB	2,[POINT 1,1,28] ;GET THE DIRECTION BIT
	TEXT	@R11SCT(2)	;PROPER SIGN
	MOVEI	2,R11CTB	;BIT TABLE ADDRESS
	GO	TYPBIT		;PRINT BITS
	GET	2		;RESTORE AC
	RTN			;EXIT

R11SCT:	[ASCIZ/(-)/]
	[ASCIZ/(+)/]

R11CTB:	000000
	000177

;BIT TABLES FOR RP04, RP06

R11TBA:	116000
	061400
	SIXBIT	/SGNCHG/
	SIXBIT	/FMT-16/
	SIXBIT	/ECI/
	SIXBIT	/HCI/

;BIT TABLES FOR THE RP07

R11TBB:	156000
	021777
	SIXBIT	/CMD/
	SIXBIT	/MTD/
	SIXBIT	/FMT-16/
	SIXBIT	/ECI/
	SIXBIT	/HCI/

;BIT TABLES FOR THE RM03

R11TBC:	016000
	161577
	SIXBIT	/FMT-16/
	SIXBIT	/ECH/
	SIXBIT	/HCI/
	PAGE

;REGISTER 12 PRINTER

R12SER:	PUT	0
	TEXT	[ASCIZ/ DESIRED CYLINDER=/]
	LDB	[POINT 16,1,35]
	GO	POCDEC		;PRINT BOTH OCTAL AND DECIMAL
	GET	0
	RTN





;REGISTER 13 PRINTER

R13SER:	PUT	0		;SAVE TE AC
	LDB	0,[POINT 16,1,35] ;GET THE DATA
	PNT6			;PRINT IN OCTAL
	GET	0		;RESTORE
	RTN			;EXIT
	PAGE

;REGISTER 14 PRINTER

R14SER:	PUT	2		;SAVE THE AC
	MOVE	2,R14TPT(X1)	;GET BIT TABLE ADDR
	GO	TYPBIT		;PRINT THE BITS
	GO	@R14SPT(X1)	;TO PROPER SERVICE ROUTINE
	GET	2		;RESTORE AC
	RTN			;EXIT

;POINTERS TO SPECIFIC BIT TABLES

R14TPT:	R14TBA			;RP04
	R14TBB			;RP06
	NULTBL			;SPARE
	R14TBC			;RP07(600 MB)
	R14TBD			;RM03
	NULTBL			;SPARE
	NULTBL			;RP20 (TOPS10)
	NULTBL			;RP20 (TOPS20)

;POINTERS TO SPECIFIC SERVICE ROUTINES

R14SPT:	[RTN]			;RP04
	[RTN]			;RP06
	[RTN]			;SPARE
	R14SC			;RP07(600 MB)
	R14SD			;RM03
	[RTN]			;SPARE
	[RTN]			;RP20 (TOPS10)
	[RTN]			;RP20 (TOPS20)

;SPECIFIC SERVICE FOR RP07

R14SC:	PUT	0
	LDB	0,[POINT 8,1,35] ;GET ERROR CODE
	JUMPE	0,R14X		;JUMP IF NO ERROR CODE
	TEXT	[ASCIZ/ ERROR CODE(HEX)=/]
	GO	PNTHEX		;PRINT IN HEX
R14X:	GET	0
	RTN

;SPECIFIC SERVICE FOR RM03

R14SD:	PUT	0		;SAVE AC0
	TEXT	[ASCIZ/ BUS BITS=/]
	LDB	0,[POINT 10,1,35] ;GET THE DATA
	PNT6			;PRINT
	GET	0		;RESTORE
	RTN			;AND EXIT

;BIT TABLE FOR RP04 SPECIFIC

R14TBA:	137777
	040000
	SIXBIT	/ACUNS/
	SIXBIT	/PLU/
	SIXBIT	/30V/
	SIXBIT	/IXE/
	SIXBIT	/NHS/
	SIXBIT	/MHS/
	SIXBIT	/WRU/
	SIXBIT	/FEN/
	SIXBIT	/TUF/
	SIXBIT	/TDF/
	SIXBIT	/MSE/
	SIXBIT	/CSU/
	SIXBIT	/WSU/
	SIXBIT	/CSF/
	SIXBIT	/WCU/

;SPICIFIC BITS FOR RP06

R14TBB:	027777
	150000
	SIXBIT	/PLO/
	SIXBIT	/IXE/
	SIXBIT	/NHS/
	SIXBIT	/MHS/
	SIXBIT	/WRU/
	SIXBIT	/ABS/
	SIXBIT	/TUF/
	SIXBIT	/TDF/
	SIXBIT	/RAW/
	SIXBIT	/CSU/
	SIXBIT	/WSU/
	SIXBIT	/CSF/
	SIXBIT	/WCU/

R14TBC:	177400
	000000
	SIXBIT	/PGE/
	SIXBIT	/CPE/
	SIXBIT	/CPU/
	SIXBIT	/RWU3/
	SIXBIT	/RWU2/
	SIXBIT	/RWU1/
	SIXBIT	/WOR/
	SIXBIT	/WRU/

;SPECIFIC BITS FOR RM03

R14TBD:	176000
	000000
	SIXBIT	/REQ-A/
	SIXBIT	/REQ-B/
	SIXBIT	/TAG/
	SIXBIT	/TSTBIT/
	SIXBIT	/CNTCYL/
	SIXBIT	/CNTHD/
	PAGE

;REGISTER 15 PRINTER

R15SER:	PUT	2		;SAVE THE AC
	MOVE	2,R15TBP(X1)	;GET POINTER TO CORRECT TBL
	GO	TYPBIT
	GET	2		;RESTORE
	RTN			;EXIT

;POINTERS TO SPECIFIC BIT TABLES

R15TBP:	R15TBA			;RP04
	R15TBB			;RP06
	NULTBL			;SPARE
	R15TBC			;RP07(600 MB)
	R15TBD			;RM03
	NULTBL			;SPARE
	NULTBL			;RP20 (TOPS10)
	NULTBL			;RP20 (TOPS20)

;SPECIFIC BITS FOR RP04

R15TBA:	140173
	037604
	SIXBIT	/OCYL/
	SIXBIT	/SKI/
	SIXBIT	/ACL/
	SIXBIT	/DCL/
	SIXBIT	/DISERR/
	SIXBIT	/UNSXRW/
	SIXBIT	/VUF/
	SIXBIT	/PSU/

;SPECIFIC BITS FOR THE RP06

R15TBB:	160163
	017614
	SIXBIT	/OCYL/
	SIXBIT	/SKI/
	SIXBIT	/OPE/
	SIXBIT	/DCL/
	SIXBIT	/ACL/
	SIXBIT	/35F/
	SIXBIT	/WAO/
	SIXBIT	/DCU/

;SPECIFIC BITS FOR THE RP07

R15TBC:	177777
	000000
	SIXBIT	/BSE/
	SIXBIT	/SKI/
	SIXBIT	/DSE/
	SIXBIT	/WSF/
	SIXBIT	/CLF/
	SIXBIT	/LBC/
	SIXBIT	/LCE/
	SIXBIT	/PHF/
	SIXBIT	/DVC/
	SIXBIT	/IXU/
	SIXBIT	/DCU/
	SIXBIT	/SDF/
	SIXBIT	/DPE/
	SIXBIT	/SBE/
	SIXBIT	/SCF/
	SIXBIT	/RTO/

;SPECIFIC BITS FOR RM03

R15TBD:	176210
	001567
	SIXBIT	/BSE/
	SIXBIT	/SKI/
	SIXBIT	/OPE/
	SIXBIT	/IVC/
	SIXBIT	/LSC/
	SIXBIT	/LBC/
	SIXBIT	/DVC/
	SIXBIT	/DPE/




;REGISTER 16 PRINTERS

R16SER:	PUT	0
	TEXT	[ASCIZ/ ECC POSITION=/]
	LDB	[POINT 16,1,35]
	GO	POCDEC		;PRINT BOTH OCTAL AND DECIMAL
	GET	0
	RTN

R16TBL:	000000
	160000

;REGISTER 17 PRINTER

R17SER:	PUT	0
	TEXT	[ASCIZ/ ECC PATTERN=/]
	LDB	[POINT	11,1,35]
	PNT4
	GET	0
	RTN

R17TBL:	000000
	174000

	END