Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/tgha.def
There are no other files named tgha.def in the archive.
%(

       TTTTT   GGGG  H	 H   AAA	  DDDD	 EEEEE	FFFFF
	 T    G	     H	 H  A	A	  D   D	 E	F
	 T    G	     HHHHH  AAAAA	  D   D	 EEEE	FFFF
	 T    G	  G  H	 H  A	A   ..	  D   D	 E	F
	 T     GGGG  H	 H  A	A   ..	  DDDD	 EEEEE	F
)%

STRUCTURE

	LST[I]=(.LST + .I);

BIND

	TRUE=1,			!UNIVERSAL TRUTH
	FALSE=0,		!UNIVERSAL FALSITY

CNTPNM = %O'100',		!CONTROLLER PAGE NUMBER
GRPPNM = %O'101',		!GROUP PAGE NUMBER
SM0PNM = %O'102',		!STORAGE MODULE 0 PAGE NUMBER
SM1PNM = %O'103',		!STORAGE MODULE 1 PAGE NUMBER
SM2PNM = %O'104',		!STORAGE MODULE 2 PAGE NUMBER
SM3PNM = %O'105',		!STORAGE MODULE 3 PAGE NUMBER
CNTBUF = %O'107',		!NON 0 JOB PAGE 0 BUFFER

MIN_CNTLR = %O'10',		!MINIMUM CONTROLLER ID
MAX_CNTLR = %O'17',		!MAXIMUM CONTROLLER ID

BUFSIZ = 20,
CTRL_L = %O'14',		!FORMFEED CHARACTER VALUE
NO_SM_DATA = %O'377',		!ALL 1'S RESPONSE TO NO SM PRESENT

PARITY_ERROR = 2,

CELL=1,				!KNOWN ERROR CODES
ROW=2,
COL=3,
MUX=4;

BUILTIN UUO;
BUILTIN MACHOP;

MACRO
	PAZ(TEXT) = UPLIT (%ASCIZ TEXT)%,
	PAZ_CRLF(TEXT) = UPLIT(%STRING(TEXT,%CHAR(13,10,0)))%,
	TEXT_CRLF(TEXT) = TEXT,%CHAR(13,10)%,
	CRLF = TOFIL(PAZ_CRLF(' '),%REF(.DMPID))%,
	FORM = TOFIL(%REF(CTRL_L^29),%REF(.DMPID))%,
	TAB = TOFIL(PAZ('	'),%REF(.DMPID))%,

TYPE(TEXT) = TOTTY( PAZ(TEXT))%,

TYPE_CRLF(TEXT) = TOTTY( PAZ_CRLF(TEXT))%,

!HALF WORD FIELDS

	LH=	18,18 %,		!LEFT HALF
	RH=	0,18 %,		!RIGHT HALF

!CHARACTER FIELDS

	C0=	0,8 %,		!FAKE CHARACTER
	C1=	29,7 %,		!CHARACTER 1
	C2=	22,7 %,		!CHARACTER 2
	C3=	15,7 %,		!CHARACTER 3
	C4=	8,7 %,		!CHARACTER 4
	C5=	1,7 %,		!CHARACTER 5

!SINGLE BIT FIELDS

	B0=	35,1 %,		!BIT 0
	B1=	34,1 %,		!BIT 1
	B2=	33,1 %,		!BIT 2
	B3=	32,1 %,		!BIT 3
	B4=	31,1 %,		!BIT 4
	B5=	30,1 %,		!BIT 5
	B6=	29,1 %,		!BIT 6
	B7=	28,1 %,		!BIT 7
	B8=	27,1 %,		!BIT 8
	B9=	26,1 %,		!BIT 9
	B10=	25,1 %,		!BIT 10
	B11=	24,1 %,		!BIT 11
	B12=	23,1 %,		!BIT 12
	B13=	22,1 %,		!BIT 13
	B14=	21,1 %,		!BIT 14
	B15=	20,1 %,		!BIT 15
	B16=	19,1 %,		!BIT 16
	B17=	18,1 %,		!BIT 17
	B18=	17,1 %,		!BIT 18
	B19=	16,1 %,		!BIT 19
	B20=	15,1 %,		!BIT 20
	B21=	14,1 %,		!BIT 21
	B22=	13,1 %,		!BIT 22
	B23=	12,1 %,		!BIT 23
	B24=	11,1 %,		!BIT 24
	B25=	10,1 %,		!BIT 25
	B26=	9,1 %,		!BIT 26
	B27=	8,1 %,		!BIT 27
	B28=	7,1 %,		!BIT 28
	B29=	6,1 %,		!BIT 29
	B30=	5,1 %,		!BIT 30
	B31=	4,1 %,		!BIT 31
	B32=	3,1 %,		!BIT 32
	B33=	2,1 %,		!BIT 33
	B34=	1,1 %,		!BIT 34
	B35=	0,1 %,		!BIT 35

!MULTIPLE BIT FIELDS

CONTROLLER = 31,5 %,
SER_YEAR = 28,4 %,
SER_WEEK = 22,6 %,
SER_SERIAL = 11,11 %,
SER_SS = 3,2%,

	TAND(A,B)=		((A) AND (B)) %,
	TOR(A,B)=		((A) OR (B)) %,
	TNAND(A,B)=		(NOT TAND(A,B)) %,
	TNOR(A,B)=		(NOT TOR(A,B)) %,
	TSTAND(A,B,C,D)=	((A EQL B) AND (C EQL D)) %,
	TSTRNG(A,B,C)=		((A GEQ B) AND (A LEQ C)) %,

	INC(A)=			(A=.A+1) %,
	DEC(A)=			(A=.A-1) %,
	PNTNXTC(P0,P1,P2)=	(IF (P0=.P0-P2) LSS 0 THEN (P0=36-P2;P1=.P1+1)) %,
	LOADLR(AC,VL,VR)=	(AC<LH>=VL;AC<RH>=VR) %,	!TEMP
	MHRRZI(AC,VAL)=		(AC<LH>=0;AC<RH>=VAL) %,	!TEMP
	MHRROI(AC,VAL)=		(AC<LH>=-1;AC<RH>=VAL) %,	!TEMP

!SBDIAG MACRO - ALLWAYS USES GAC1, TO CALL SBDIAG AND GAC2 TO RETURN DATA

SBDIAG = 
	UUO(0,%O'700',%O'12',GAC1)%,

APRID = 
UUO(0,%O'700', 0, GAC1)%;

BIND

!SBUS DIAG FUNCTION CODES

	SBDF00=	0,		!SBDIAG FUNCTION 00
	SBDF01=	1,		!SBDIAG FUNCTION 01
	SBDF02=	2,		!SBDIAG FUNCTION 02
	SBDF03=	3,		!SBDIAG FUNCTION 03
	SBDF04=	4,		!SBDIAG FUNCTION 04
	SBDF05=	5,		!SBDIAG FUNCTION 05
	SBDF06=	6,		!SBDIAG FUNCTION 06
	SBDF07=	7,		!SBDIAG FUNCTION 07
	SBDF10=	8,		!SBDIAG FUNCTION 10
	SBDF11=	9,		!SBDIAG FUNCTION 11
	SBDF12=	10,		!SBDIAG FUNCTION 12


!SBUS DIAG SINGLE BIT FIELDS OR FLAGS

!FUNCTION 00 TO MEMORY

	T00CLEAR=	1^30,	!CLEAR 0-5

!FUNCTION 00 FROM MEMORY

	F00CNTRE=	1^35,	!CONTROLLER ERROR
	F00CORRE=	1^34,	!CORRECTABLE ERROR
	F00INCCY=	1^33,	!INCOMPLETE CYCLE
	F00RDPE=	1^32,	!READ PARITY ERROR
	F00WRPD=	1^31,	!WRITE PARITY ERROR
	F00ADPE=	1^30,	!ADDRESS PARITY ERROR
	F00RD=		1^23,	!LAST TYPE - READ
	F00WR=		1^22,	!LAST TYPE - WRITE

!FUNCTION 01 TO MEMORY

	T01LOADE=	1^07,	!LOAD ENABLE 25-27
	T01SF1=		1^08,	!SOFTWARE FLAG 1
	T01SF2=		1^09,	!SOFTWARE FLAG 2
	T01DSABL=	1^10,	!DISABLED

!FUNCTION 01 FROM MEMORY

	F01SF1=		1^08,	!SOFTWARE FLAG 1
	F01SF2=		1^09,	!SOFTWARE FLAG 2
	F01DSABL=	1^10,	!DISABLED

!FUNCTION 07 TO MEMORY

	T07LOADE=	1^20,	!LOAD ENABLE 7-14
	T07PAR=		1^21,	!PARITY
	T07ICE=		1^22,	!IGNORE CORRECTABLE ERROR

!FUNCTION 07 FROM MEMORY

	F07PAR=		1^21,	!PARITY
	F07ICE=		1^22,	!IGNORE CORRECTABLE ERROR

!FUNCTION 10 TO MEMORY

	T10CORD=	1^09,	!CORRECTION DISABLED
	T10CDCB=	1^08,	!CLEAR DC BAD

!FUNCTION 10 FROM MEMORY

	F10CORD=	1^09,	!CORRECTION DISABLED
	F10DCB=		1^08,	!DC BAD

!FUNCTION 11 TO MEMORY

	T11LOADE=	1^15,	!LOAD ENABLE 21-30

!FUNCTION 12 TO MEMORY

	T12LOADE=	1^20,	!LOAD ENABLE 8-14
	T12DSEL=	1^21,	!BLOCK DESELECT
	T12PAR=		1^27,	!PARITY
	T12TYPE=	1^26,	!TYPE

!FUNCTION 12 FROM MEMORY

	F12DSEL=	1^21,	!BLOCK DESELECT
	F12PAR=		1^27,	!PARITY
	F12TYPE=	1^26;	!TYPE


MACRO

!SBUS DIAG MULTI-BIT FIELDS

!FUNCTION 00 FROM MEMORY

	F00ERR=		30,06 %,	!ERRORS
	F00ERRCTR=	33,03 %,	!CONTROLLER,CORRECTABLE,INCOMPLETE CYCLE ERRORS
	F00ERRPAR=	30,03 %,	!PARITY ERRORS
	F00TYPE=	22,02 %,	!LAST OPERATION TYPE
	F00ADR=		00,22 %,	!ADDRESS

!FUNCTION 01 TO MEMORY

	T01STAT=	08,03 %,	!CONTROLLER STATUS BITS

!FUNCTION 01 FROM MEMORY

	F01STAT=	08,03 %,	!CONTROLLER STATUS BITS
	F01TYPE=	24,04 %,	!MEM CONTROLLER TYPE
	F01SF=		8,2 %,		!SOFTWARE STATE FIELD


!FUNCTION 02 TO MEMORY

	T02PSEL=	23,04 %,	!SM PROM SELECT
	T02PNUM=	21,02 %,	!PROM WORD NUMBER

!FUNCTION 02 FROM MEMORY

	F02DATA=	21,08 %,	!PROM DATA

!FUNCTION 07 TO MEMORY

	T07DATA=	21,08 %,	!BIT SUB RAM DATA
	T07BNUM=	23,06 %,	!BIT NUMBER
	T07ADR=		08,07 %,	!RAM ADDRESS

!FUNCTION 07 FROM MEMORY

	F07DATA=	21,08 %,	!BIT SUB RAM DATA
	F07BNUM=	23,06 %,	!BIT NUMBER

!FUNCTION 11 TO MEMORY

	T11DATA=	08,07 %,	!TIMING RAM DATA
	T11ADR=		16,07 %,	!TIMING RAM ADDRESS

!FUNCTION 11 FROM MEMORY

	F11DATA=	08,07 %,	!TIMING RAM DATA
	F11ADR=		16,07 %,	!TIMING RAM ADDRESS

!FUNCTION 12 TO MEMORY

	T12DATA=	21,07 %,	!ADDRESS RESPONSE RAM DATA
	T12GNBK=	22,04 %,	!GROUP/BLOCK
	T12ADR=		08,08 %,	!RAM ADDRESS

!FUNCTION 12 FROM MEMORY

	F12DATA=	21,07 %,	!ADDRESS RESPONSE RAM DATA
	F12GNBK=	22,04 %;	!GROUP/BLOCK

!THIS TABLE IS BUILD FOR 2 TYPES OF ENTRY VECTORS:
!	1	SYNDROME TO GET BIFN, FIELD AND WORD BIT
!	2	BIFN^2 + FIELD TO GET WORD BIT
    MACRO
	BIFN = 24,6%,			!BIFN FROM FIELD_CRF TABLE

	BITPOS = 30,6%,			!BIT POSITION FROM FIELD_CRF TABLE

	FIELDPOS = 21,3%,		!FIELD POSITION FROM FIELD_CRF TABLE

	WORD_BIT = 12,6%,		!WORD BIT NUMBER INDEXED BY FIELD + BIFN^2

	SUB_MASK = %O'374'%,		!THE SPARE BIT VALUE FIELD

	FIELD_CRFS (BIF, FILD, BITNUM, WDBIT) =
 BITNUM^30 + BIF^24 + FILD^21 + WDBIT^12%;

    BIND
FIELD_CRF = UPLIT(FIELD_CRFS (1, 2, 42, 36),
FIELD_CRFS (0, 3, 41, 37),
FIELD_CRFS (0, 2, 40, 40),
FIELD_CRFS (2, 0, 0, 41),
FIELD_CRFS (1, 1, 39, 38),
FIELD_CRFS (2, 1, 1, 39),
FIELD_CRFS (3, 0, 2, 42),
FIELD_CRFS (3, 1, 3, 43),
FIELD_CRFS (1, 0, 38, 00),
FIELD_CRFS (4, 0, 4, 01),
FIELD_CRFS (4, 1, 5, 18),
FIELD_CRFS (5, 0, 6, 19),
FIELD_CRFS (5, 1, 7, 02),
FIELD_CRFS (6, 0, 8, 03),
FIELD_CRFS (6, 1, 9, 20),
FIELD_CRFS (7, 0, 10, 21),
FIELD_CRFS (0, 1, 37, 04),
FIELD_CRFS (7, 1, 11, 05),
FIELD_CRFS (8, 0, 12, 22),
FIELD_CRFS (8, 1, 13, 23),
FIELD_CRFS (9, 0, 14, 06),
FIELD_CRFS (9, 1, 15, 07),
FIELD_CRFS (10, 0, 16, 24),
FIELD_CRFS (10, 1, 17, 25),
FIELD_CRFS (2, 2, 18, 08),
FIELD_CRFS (2, 3, 19, 09),
FIELD_CRFS (3, 2, 20, 26),
FIELD_CRFS (3, 3, 21, 27),
FIELD_CRFS (4, 2, 22, 10),
FIELD_CRFS (4, 3, 23, 11),
FIELD_CRFS (5, 2, 24, 28),
FIELD_CRFS (5, 3, 25, 29),
FIELD_CRFS (0, 0, 36, 12),
FIELD_CRFS (6, 2, 26, 13),
FIELD_CRFS (6, 3, 27, 30),
FIELD_CRFS (7, 2, 28, 31),
FIELD_CRFS (7, 3, 29, 14),
FIELD_CRFS (8, 2, 30, 15),
FIELD_CRFS (8, 3, 31, 32),
FIELD_CRFS (9, 2, 32, 33),
FIELD_CRFS (9, 3, 33, 16),
FIELD_CRFS (10, 2, 34, 17),
FIELD_CRFS (10, 3, 35, 34),
FIELD_CRFS (0, 0, 0, 35) );
!THE FOLLOWING TABLE IS THE BEGINNING E # FOR EACH FIELD.
!THE SPECIFIC E # IS TABLE(BIFN) - (4 * WN) - BN
!THIS TABLE IS FOR 16K ARRAY MODULES

MACRO	BIFN_CRFS (MUX, ENUM) =
	MUX^18 + ENUM%;

!THE LEFT HALF CONTAINS THE MUX ENUMBER FOR THE FIELD.
!THE RIGHT HALF CONTAINS THE STARTING ENUMBER FOR THE RAMS FOR THE FIELD.

BIND
BIFN_CRF = UPLIT(BIFN_CRFS (2, 19),
BIFN_CRFS (20, 38),
BIFN_CRFS (40, 57),
BIFN_CRFS (59, 76),
BIFN_CRFS (79, 96),
BIFN_CRFS (98, 116),
BIFN_CRFS (131, 149),
BIFN_CRFS (169, 167),
BIFN_CRFS (171, 188),
BIFN_CRFS (205, 204),
BIFN_CRFS (207, 224));

!THE FOLLOWING TABLE CONTAINS THE MUX E # AND THE HIGHEST RAM
!CHIP E # OF THE 16 RAM CHIPS FOR EACH BIT IN THE FIELD.
!(ARRAY CHIPS FORM AN 11X16 MATRIX)
!THE SPECIFIC E # IS TABLE(BIFN) - (4 * WN) - BN
!THIS TABLE IS FOR 64K ARRAY MODULES

MACRO	BIFN_XRFS (MUX, ENUM) =
	MUX^18 + ENUM%;

!THE LEFT HALF CONTAINS THE MUX ENUMBER FOR THE FIELD.
!THE RIGHT HALF CONTAINS THE STARTING ENUMBER OF THE RAMS FOR
!EACH BIT IN THE FIELD.

BIND
BIFN_XRF = UPLIT(BIFN_XRFS (2, 19),
BIFN_XRFS (20, 38),
BIFN_XRFS (40, 57),
BIFN_XRFS (58, 75),
BIFN_XRFS (95, 92),
BIFN_XRFS (114, 112),
BIFN_XRFS (128, 146),
BIFN_XRFS (148, 165),
BIFN_XRFS (185, 183),
BIFN_XRFS (205, 202),
BIFN_XRFS (204, 221));