Google
 

Trailing-Edge - PDP-10 Archives - AP-4178E-RM - swskit-sources/klinit.lis
There are no other files named klinit.lis in the archive.
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41
TABLE OF CONTENTS

   12- 388	GLOBAL DATA STORAGE
   17- 652	$START	-- MAIN PROGRAM FLOW CONTROL
   18- 716	-- DTE20 REGISTER READ/WRITE SUBROUTINES
   19- 748	$RSAVE	-- SAVE REGISTERS FOR ROUTINES
   19- 761	$ASCII	-- TRANSFER ASCII STRING
   20- 780	$TRACK	-- SPECIAL TRACK ROUTINE
   25- 997	$DELETE	-- DELETE A FILE
   26-1027	$SETFN	-- SET FILE NAME IN FILE NAME BLOCK
   28-1104	$LOOKUP	-- LOOK UP AN EXISTING FILE
   30-1191	$ENTER	-- ENTER A NEW FILE
   32-1279	$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES
   34-1361	$PURGE	-- PURGE FILES CURRENTLY OPEN
   36-1423	$READC	-- START READING A RECORD
   36-1447	$READS	-- SKIP THE CURRENT RECORD
   37-1469	$READW	-- READ A WORD
   37-1498	$READB	-- READ A BYTE
   38-1524	$READ	-- READ NEXT VIRTUAL BLOCK
   40-1591	$WRITC	-- START WRITING A RECORD
   40-1615	$WRITS	-- ZERO REMAINDER OF CURRENT BLOCK
   41-1641	$WRITW	-- WRITE A WORD
   41-1671	$WRITB	-- WRITE A BYTE
   42-1694	$WRITE	-- WRITE NEXT VIRTUAL BLOCK
   44-1764	$IOERR	-- REPORT I/O ERROR
   47-1909	$INIT	-- PROGRAM INITIALIZATION
   49-2008	$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED
   53-2160	$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED
   54-2194	LQCCM	-- ASK WHICH CACHES TO CONFIGURE
   56-2284	$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY
   57-2325	$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER
   58-2381	LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)
   61-2509	$DLGIL	-- ASK HOW EXTERNAL MEMORY CAN BE INTERLEAVED
   64-2626	$DLGBT	-- ASK IF LOADING VBOOT IS REQUIRED
   66-2694	$DLGEX	-- ASK WHERE TO EXIT
   68-2764	$GETCA	-- SET CACHE CONFIGURATION TABLES
   70-2859	$GETMM	-- SET UP MEMORY CONFIGURATION TABLES
   72-3016	$FILE	-- WRITE THE CONFIGURATION FILE
   76-3238	$MCBLD	-- LOAD THE RAMS
   83-3549	$WCRAM	-- WRITE C-RAM WORD
   84-3618	$RCRAM	-- READ C-RAM WORD
   85-3717	$ACRAM	-- ADDRESS C-RAM WORD
   87-3789	$WDRAM	-- WRITE D-RAM WORD
   88-3842	$RDRAM	-- READ D-RAM WORD
   89-3898	$ADRAM	-- ADDRESS D-RAM WORD
   91-4006	$SETCA	-- CONFIGURE CACHE
   93-4140	$SWEEP	-- SWEEP AND INVALIDATE THE CACHE
   95-4212	$EXBLD	-- LOAD THE BOOT
   99-4420	$TENST	-- START KL BOOT
  101-4559	$POWER	-- POWER FAILURE RESTART
  105-4722	$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE
  107-4872	$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY
  112-5189	$SETLT	-- SET UP LOGICAL TABLE
  117-5490	$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY
  122-5724	$SETMM	-- SET THE CALCULATED CONFIGURATION
  124-5918	$REPPT	-- REPORT PHYSICAL CONFIGURATION
  126-6038	$REPXT	-- REPORT EXTERNAL MEMORY RESPONSE
  128-6157	$REPLT	-- REPORT LOGICAL CONFIGURATION
  134-6381	$EXCT	-- EXECUTE KL INSTRUCTION
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41
TABLE OF CONTENTS

  135-6409	$STRKL	-- START THE KL PROCESSOR
  136-6458	$WTKL	-- WAIT FOR KL PROGRAM TO HALT
  137-6483	$LDAR	-- LOAD THE AR REGISTER
  138-6505	STPKL	-- HALT THE KL CPU
  139-6554	$MBPHS	-- PHASE THE KL CLOCKS
  140-6599	$BURST	-- BURST THE M-BOX CLOCK
  142-6686	$DFRD	-- DIAGNOSTIC READ FUNCTION
  144-6759	$DFWR	-- DIAGNOSTIC WRITE FUNCTION
  147-6852	$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION
  149-6927	$DPOS	-- DEPOSIT KL MEMORY ROUTINE
  150-6955	$EXAM	-- EXAMINE KL MEMORY ROUTINE
  154-7083	$KLMR	-- DO A MASTER RESET ON THE KL
  154-7138	$KLSR	-- SOFT RESET FOR RAM LOADERS
  156-7192	$SBDG	-- DO SBUS DIAGNOSTIC FUNCTIONS
  157-7237	$SBMR	-- RESET ALL MEMORY CONTROLLERS
  159-7286	$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII
  160-7323	$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD
  162-7386	$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII
  163-7428	$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD
  165-7495	$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD
  166-7541	$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII
  168-7633	$TENAD	-- DISPLAY KL ADDRESS/16K
  169-7676	$WRD18	-- DISPLAY 18 BIT KL WORD
  169-7693	$WRD22	-- DISPLAY 22 BIT KL WORD
  169-7711	$WRD36	-- DISPLAY 36 BIT KL WORD
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 1


      1						.TITLE	KLINIT - KL CPU INITIALIZATION PROGRAM
      2						.IDENT	/006070/
      3						.ENABL	AMA
      4						.LIST	MEB
      5						.NLIST	CND
      6
      7					;
      8					;                             COPYRIGHT (C) 1975, 1978 BY
      9					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     10					;
     11					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     12					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     13					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     14					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     15					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     16					;
     17					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     18					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     19					;       CORPORATION.
     20					;
     21					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     22					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     23
     24
     25					;
     26					; VERSION 06-07
     27					;
     28					; ALAN D. PECKHAM  29-MAR-77
     29					;
     30					; MODIFIED BY:
     31					;
     32					;	R. BELANGER	10-SEP-77	CHANGE VERSION TO 6
     33					;					INCLUDE INTERNAL AND EXTERNAL
     34					;					MEMORY CONFIGURATORS
     35					; THIS MODULE CONTAINS SYMBOLS AND MACROS USED GENERALLY BY ALL KLINIT
     36					;  MODULES.
     37					;
     38					;	SET VERSION OF KLINIT HERE
     39					;
     40		000006 			KLI$$V	=	6		; VERSION 6
     41		000007 			KLI$$E	=	7		; EDIT 7
     42					;
     43					; THIS KLINIT IS RELEASED
     44					;
     45		000126 			KLI$$K	=	'V		; KEY FOR RELEASE.
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 2


     47					;+
     48					; NOW SET THE SWITCHES WHICH WILL DETERMINE WHAT KLINIT WILL
     49					; INTERFACE TO.
     50					;
     51					;	C.ACHE	IF DEFINED WILL ALLOW KLINIT TO HANDLE CACHES
     52					;
     53					;	M.A20	IF DEFINED WILL ALLOW KLINIT TO HANDLE MA20 INTERNAL MEMORY
     54					;	M.B20	IF DEFINED WILL ALLOW KLINIT TO HANDLE MB20 INTERNAL MEMORY
     55					;	M.F20	IF DEFINED WILL ALLOW KLINIT TO HANDLE MF20 INTERNAL MEMORY
     56					;	D.MA20	IF DEFINED WILL ALLOW KLINIT TO HANDLE DMA20 EXTERNAL MEMORY
     57					;
     58					;	F.TRCK	IF DEFINED WILL INCLUDE CODING TO ALLOW TRACKING OF FUNCTIONS
     59					;		BEING DONE ON THE KL CPU
     60					;	F.PTCH	IF DEFINED WILL INCLUDE A FREE AREA LABELED "PATCH" IN WHICH
     61					;		TO INSERT CODING PATCHES DURING PROGRAM DEBUGGING
     62					;
     63					; DEFINITIONS MADE HERE:
     64					;-
     65
     76		000102 			KLI$$F	=	'B		; TOPS20 FORM OF KLINIT.
     81
     82		000000 			D.MA20	=	0		; SYSTEM HAS DMA20
     83		000000 			M.A20	=	0		; SYSTEM HAS MA20
     84		000000 			M.B20	=	0		; SYSTEM HAS MB20
     85
     86		000000 			C.ACHE	=	0		; SYSTEM HAS CACHE
     87
     88		000000 			F.TRCK	=	0		; INCLUDE FUNCTION TRACK
     89
     94		000000 			I.MEM	=	0		; SYSTEM HAS INTERNAL MEMORY
     97		000000 			X.MEM	=	0		; SYSTEM HAS EXTERNAL MEMORY
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 3


    100					;
    101					; GLOBAL MACROS
    102					;
    103						.MCALL	$DEF,DIR$
    104	000000					$DEF
    105
    106					;+
    107					; MACRO TO SET IDENT FOR KLINIT MODULES.
    108					; FORMAT OF CALL IS:
    109					;	IDENT$	VERSION,EDIT
    110					; OR
    111					;	IDENT$	VERSION,EDIT,KLI$$F
    112					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    113					;-
    114
    115						.MACRO	IDENT$ VER,EDT,FRM,XA,XB,XC,NUM
    116						.IF	B,NUM
    117						.IF	B,FRM
    118						IDENT$	\VER,\EDT,0,,,,0
    119						.IFF
    120						.IF	EQ,<FRM-'A>
    121						IDENT$	\VER,\EDT,A,,,,0
    122						.IFF
    123						.IF	EQ,<FRM-'B>
    124						IDENT$	\VER,\EDT,B,,,,0
    125						.IFF
    126						IDENT$	\VER,\EDT,C,,,,0
    127						.ENDC
    128						.ENDC
    129						.ENDC
    130						.MEXIT
    131						.IFF
    132						.IF	GE,VER-10
    133						.IF	GE,EDT-10
    134						.LIST
    135						.IDENT	/'FRM'VER'EDT'0/
    136						.NLIST
    137						.IFF
    138						.LIST
    139						.IDENT	/'FRM'VER'0'EDT'0/
    140						.NLIST
    141						.ENDC
    142						.IFF
    143						.IF	GE,EDT-10
    144						.LIST
    145						.IDENT	/'FRM'0'VER'EDT'0/
    146						.NLIST
    147						.IFF
    148						.LIST
    149						.IDENT	/'FRM'0'VER'0'EDT'0/
    150						.NLIST
    151						.ENDC
    152						.ENDC
    153						.ENDC
    154						.ENDM	IDENT$
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 4


    156						.MACRO	CALL	X,Y
    157						.NTYPE	$$,X
    158						.IF	EQ,$$&70
    159						 JSR	X,Y
    160						.IFF
    161						 JSR	PC,X
    162						.ENDC
    163						.ENDM	CALL
    164
    165						.MACRO	CALLR	X
    166						 JMP	X
    167						.ENDM	CALLR
    168
    169						.MACRO	RETURN	X
    170						.IF	NB,<X>
    171						 RTS	X
    172						.IFF
    173						 RTS	PC
    174						.ENDC
    175						.ENDM	RETURN
    176
    177						.MACRO	PUSH	LOCS
    178						.IRP	L,<LOCS>
    179						 MOV	L,-(SP)
    180						.ENDR
    181						.ENDM	PUSH
    182
    183						.MACRO	POP	LOCS
    184						.IRP	L,<LOCS>
    185						 MOV	(SP)+,L
    186						.ENDR
    187						.ENDM	POP
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 5


    189					;
    190					; SHIFT MACROS
    191					;
    192						.MACRO	SL	R,N
    193						.IF	GT,N-7
    194						 SWAB	R
    195						.REPT	N-10
    196						 ASL	R
    197						.ENDR
    198						.IFF
    199						.REPT	N
    200						 ASL	R
    201						.ENDR
    202						.ENDC
    203						.ENDM	SL
    204
    205						.MACRO	SR	R,N
    206						.IF	GT,N-7
    207						 SWAB	R
    208						.REPT	N-10
    209						 ASR	R
    210						.ENDR
    211						.IFF
    212						.REPT	N
    213						 ASR	R
    214						.ENDR
    215						.ENDC
    216						.ENDM	SR
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 6


    218					;
    219					; KL INSTRUCTION AND DATA CREATION MACROS
    220					;
    221		000005 			I.10L	=	5		; KL INSTRUCTIONS TAKE 5 -11 BYTES !!!!
    222		000005 			W.10L	=	5		; KL WORDS TAKE 5 BYTES ALSO.
    223
    224						.MACRO	I10$	OP,AC,I,AD,XR
    225						 BY$$0=0
    226						 BY$$1=0
    227						 BY$$2=0
    228						.IRPC	AD1,AD
    229						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    230						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    231						 BY$$0=<BY$$0*10&370>+<AD1>
    232						.ENDM
    233						 BY$$2=<AC+0&1*200>+<I+0&1*100>+<XR+0&17*4>+BY$$2
    234						 BY$$3=<OP&37*10>+<AC+0/2&7>
    235						 BY$$4=<OP/40>
    236						 .BYTE	BY$$0,BY$$1,BY$$2
    237						 .BYTE	BY$$3,BY$$4
    238						.ENDM	I10$
    239
    240						.MACRO	IO10$	OP,DV,I,AD,XR
    241						 BY$$0=0
    242						 BY$$1=0
    243						 BY$$2=0
    244						.IRPC	AD1,AD
    245						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    246						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    247						 BY$$0=<BY$$0*10&370>+<AD1>
    248						.ENDM
    249						 BY$$2=<OP&1*200>+<I+0&1*100>+<XR+0&17+0*4>+BY$$2
    250						 BY$$3=<DV&374>+<OP/2&3>
    251						 BY$$4=16+<DV/400&1>
    252						 .BYTE	BY$$0,BY$$1,BY$$2
    253						 .BYTE	BY$$3,BY$$4
    254						.ENDM	IO10$
    255
    256						.MACRO	WD22$	AD
    257						 BY$$0=0
    258						 BY$$1=0
    259						 BY$$2=0
    260						.IRPC	AD1,AD
    261						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    262						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    263						 BY$$0=<BY$$0*10&370>+<AD1>
    264						.ENDM
    265						 .BYTE	BY$$0,BY$$1,BY$$2
    266						.ENDM	WD22$
    267
    268						.MACRO	WD36$	LH,RH
    269						 BY$$0=0
    270						 BY$$1=0
    271						 BY$$2=0
    272						 BY$$3=0
    273						 BY$$4=0
    274						.IRPC	AD1,LH
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 6-1


    275						 BY$$4=<BY$$4*10&010>+<BY$$3/40&007>
    276						 BY$$3=<BY$$3*10&370>+<BY$$2/40&007>
    277						 BY$$2=<BY$$2*10&340>+<AD1*4>
    278						.ENDM
    279						.IRPC	AD1,RH
    280						 BY$$2=<BY$$2&374>+<BY$$1/40&003>
    281						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    282						 BY$$0=<BY$$0*10&370>+<AD1>
    283						.ENDM
    284						 .BYTE	BY$$0,BY$$1,BY$$2
    285						 .BYTE	BY$$3,BY$$4
    286						.ENDM	WD36$
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 7


    288					;
    289					; MESSAGE FORMATING AND PRINT MACROS
    290					;
    291						.MACRO	MESSAGE	MSG
    292						 .ASCIZ	\'MSG'\
    293						.ENDM	MESSAGE
    294
    295						.MACRO	WARNING	MSG
    296						 .ASCIZ	\% 'MSG'\
    297						.ENDM	WARNING
    298
    299						.MACRO	ERROR	MSG
    300						 .ASCIZ	\? 'MSG'\
    301						.ENDM	ERROR
    302
    303						.MACRO	PRINT	ADR
    304						.IF	NB,<ADR>
    305						 MOV	ADR,R0
    306						.ENDC
    307						 JSR	PC,$TTMSG
    308						.ENDM	PRINT
    309
    310					;---	SPECIAL TRACK MACRO
    311
    312						.MACRO	TRACK	FN,ADR1,ADR2,?A1
    313						.IF	DF,F.TRCK
    314						 JSR	R0,A1
    315						 .WORD	"FN
    316						 .WORD	ADR1
    317						 .WORD	ADR2
    318					A1:	 JSR	PC,$TRACK
    319						 MOV	(SP)+,R0
    320						.ENDC
    321						.ENDM	TRACK
KLINIT - KL CPU INITIALIZATION 	MACRO M1108  13-JAN-78 10:41  PAGE 8


    323					;
    324					; EQUATED SYMBOLS
    325					;
    326		000200 			ED.PHY	=	200
    327		000001 			TTILUN	=	1		; TT: INPUT LOGICAL UNIT
    328		000002 			TTOLUN	=	2		; TT: OUTPUT LOGICAL UNIT
    329		000003 			LPOLUN	=	3		; LP: OUTPUT LOGICAL UNIT
    330		000004 			SYILUN	=	4		; SY: INPUT LOGICAL UNIT
    331		000005 			SYOLUN	=	5		; SY: OUTPUT LOGICAL UNIT
    332		000006 			SYFLUN	=	6		; SY: GENERAL FUNCTION LOGICAL UNIT
    333		000040 			CTLS	=	40		; MAXIMUM NUMBER OF CONTROLLERS.
    334		000037 			LCTL	=	CTLS-1		; LAST CONTROLLER NUMBER.
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 9


    336						.TITLE	KLIRT -- ROOT SECTION
    337	000000					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
    338					;
    339					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
    340					;
    341					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
    342					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
    343					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
    344					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
    345					;
    346					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
    347					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
    348					; EQUIPMENT CORPORATION.
    349					;
    350					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
    351					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
    352					;
    353					; VERSION 05-00
    354					;
    355					; ALAN D. PECKHAM  15-APR-77
    356					;
    357					; MODIFIED BY:
    358					;
    359					; FUNCTION: THE ROOT SECTION CONTAINS ALL THE GLOBAL DATA ITEMS
    360					;  AND THE MAIN-LINE OVERLAY CONTROL CODE.
    361					;
    362					; EQUATED SYMBOLS
    363					;
    364		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
    365		000012 			LF	=	12		; LINE FEED CHARACTER.
    366		000040 			SPC	=	40		; SPACE CHARACTER.
    367		000011 			TAB	=	11		; TAB CHARACTER.
    368					;
    369					; LOCAL MACROS
    370					;
    371						.MCALL	QIOW$,EXIT$S
    372					;
    373					; LOCAL DATA
    374					;
    376	000000					.PSECT	DATA,D
    377	000000				DRTWLB:	QIOW$	IO.WLB,LPOLUN,1,,DRTSTA,,<DRTBUF,0,0>
	000000	   003 	   011 			.BYTE	3,$$$ARG
	000002	000000G				.WORD	IO.WLB
	000004	000003 				.WORD	LPOLUN
	000006	   001 	   000 			.BYTE	1,
	000010	000022'				.WORD	DRTSTA
	000012	000000 				.WORD
	000014	000026'				.WORD	DRTBUF
	000016	000000 				.WORD	0
	000020	000000 				.WORD	0
    378	000022	000000 	000000 		DRTSTA:	.WORD	0,0		; I/O STATUS.
    379	000026				DRTBUF:	.BLKB	72.		; TRACK OUTPUT BUFFER.
    380	000136				DRTBF:	WD36$	0 0		; BIT BUCKET.
	000136	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000141	   000 	   000 			 .BYTE	BY$$3,BY$$4
    381						.EVEN
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 9-1


    383	000000					.PSECT	TEXT,D
    384	000000				TRTMMF:	ERROR	<MEMORY CONFIGURATION FAILED>
	000000	   077 	   040 	   115 		 .ASCIZ	\? MEMORY CONFIGURATION FAILED\
	000003	   105 	   115 	   117
	000006	   122 	   131 	   040
	000011	   103 	   117 	   116
	000014	   106 	   111 	   107
	000017	   125 	   122 	   101
	000022	   124 	   111 	   117
	000025	   116 	   040 	   106
	000030	   101 	   111 	   114
	000033	   105 	   104 	   000
    385	000036				TRTBTF:	ERROR	<BOOTSTRAP LOAD FAILED>
	000036	   077 	   040 	   102 		 .ASCIZ	\? BOOTSTRAP LOAD FAILED\
	000041	   117 	   117 	   124
	000044	   123 	   124 	   122
	000047	   101 	   120 	   040
	000052	   114 	   117 	   101
	000055	   104 	   040 	   106
	000060	   101 	   111 	   114
	000063	   105 	   104 	   000
    386	000000					.PSECT
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 10
GLOBAL DATA STORAGE

    388						.SBTTL	GLOBAL DATA STORAGE
    389	000000					.PSECT	GLBL,D,GBL
    390
    391					;+
    392					; WORK AND STORAGE AREA
    393					;-
    394
    395	000000	000000 	000000 	000000 	.ZERO::	.WORD	0,0,0		; SOURCE OF 36-BIT ZERO
    396	000006	000000 	000000 	000000 		.WORD	0,0,0		; PLUS EXTRAS FOR C-RAM ZERO.
    397	000014	000000 	000000 	000000 	.WORK::	.WORD	0,0,0		; COMMON WORK AREA
    398
    399					;+
    400					; INFORMATION AND CONTROL SWITCHES.
    401					;-
    402
    403	000022	   000 			.DLGSW::.BYTE	0		; DIALOG CONTROL SWITCH.
    404	000023	   000 			.UFNSW::.BYTE	0		; USER FILE SPECIFIED.
    405	000024	   000 			.DRSW::	.BYTE	0		; RAM DIALOG CONTROL.
    407	000025	   000 			.DCSW::	.BYTE	0		; CACHE DIALOG CONTROL.
    409	000026	   000 			.DMSW::	.BYTE	0		; MEMORY DIALOG CONTROL.
    410	000027	   000 			.DBSW::	.BYTE	0		; BOOT DIALOG CONTROL.
    412	000030	   000 			.TRKSW::.BYTE	0		; TRACK CONTROL SWITCH.
    414	000031	   000 			.CKSW::	.BYTE	0		; CLOCK RUNNING FLAG.
    415	000032	   000 			.DESW::	.BYTE	0		; CLOCK RUNNING FOR EXAMINE/DEPOSIT.
    417	000033	   000 			.CASW::	.BYTE	0		; CACHE INDICATOR.
    419	000034	   000 			.EASW::	.BYTE	0		; EXTENDED ADDRESSING INDICATOR.
    420						.EVEN
    421
    422					;+
    423					;	.KLIWD DEFINITIONS:
    424					;	KL.LRM		LOAD RAMS
    426					;	KL.LCA		CONFIGURE CACHE
    428					;	KL.CFM		CONFIGURE MEMORY
    429					;	KL.LVB		LOAD BOOT
    430					;	KL.SPF		RESTART FOR KL POWER FAIL
    434					;	KL.CFL		CONFIGURE ALL
    435					;			INSTEAD OF FROM CONFIGURATION FILE
    436					;	KL.VBN		BOOT - NO PROMPT
    437					;	KL.VBD		BOOT - DUMP MONITOR
    438					;
    439					;	ALL BITS ZERO IMPLIES TO ENTER DIALOG
    440					;-
    441
    442	000036	000000 			.KLISV::.WORD	0		; =.KLIWD
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 11
GLOBAL DATA STORAGE

    445					;+
    446					; CACHE TABLES
    447					;-
    448
    449	000040	   377 			.NCACH::.BYTE	-1		; NUMBER OF CACHES TO USE.
    450	000041				.CACHN::.BLKB	4		; CACHE MODULES TO USE.
    451						.EVEN
    452
    454					;+
    455					; TABLES FOR MEMORY CONFIGURATION
    456					; THE TYPE TABLE INDICATES WHETHER WE SUPPORT THE CONTROLLER TYPE.
    457					;-
    458
    459	000046	   377 			.TYPTB::.BYTE	-1		; NO TYPE 0 CONTROLLERS
    461	000047	   000 				.BYTE	0		; MA20 CONTROLLERS
    466	000050	   000 				.BYTE	0		; DMA20 CONTROLLER
    471	000051	   000 				.BYTE	0		; MB20 CONTROLLERS
    475	000052	   377 				.BYTE	-1		; NO TYPE 4 CONTROLLERS
    479	000053	   377 				.BYTE	-1		; NO MF20 CONTROLLERS
    481		000005 			T.YPL	==	.-.TYPTB-1	; MAXIMUM TYPE SUPPORTED.
    482
    484	000054	   000 			.MINT::.BYTE	0		; INTERNAL CONTROLLERS AVAILABLE FOR CONFIGURATION.
    485	000055	   003 			.ILMAX::.BYTE	3		; MAXIMUM INTERLEAVE FOR LOGICAL CONFIGURATION.
    486	000056	   001 			.ILMIN::.BYTE	1		; MINIMUM INTERLEAVE FOR LOGICAL CONFIGURATION.
    489	000057	   000 			.LTBEX::.BYTE	0		; WORK COUNT OF EXTERNAL MEMORY CONTROLLERS.
    492	000060	   000 			.LTBIN::.BYTE	0		; WORK COUNT OF INTERNAL MEMORY CONTROLLERS.
    494
    495					;+
    496					; CONTROLLER TABLES.
    497					; THESE TABLES ARE USED AS FOLLOWS:
    498					;	CTLTYP	- THIS TABLE CONTAINS THE MEMORY TYPE FOR EACH CONTROLLER.
    499					;	CTLMOD	- THIS CONTAINS THE MODULE MAP FOR INTERNAL MEMORY TYPES.
    500					;	CTLUSE	- MODULES TO USE FOR THE LOGICAL CONFIGURATION.
    501					;	CTLSW	- CONTROLLER USE SWITCH:
    502					;		  <0	CONTROL NOT TO BE USED
    503					;		   0	CONTROLLER AVAILABLE
    504					;		  +1	CONTROLLER ALLOCATED
    505					;-
    506
    507	000061				.CTLTP::.BLKB	CTLS		; CONTROLLER TYPE FOR EACH ADDRESS.
    508	000121				.CTLMD::.BLKB	CTLS		; MAP OF MODULES FOR EACH INTERNAL CONTROLLER.
    509	000161				.CTLUS::.BLKB	CTLS		; CONTROLLER MODULES TO USE IN CONFIGURATION.
    510	000221				.CTLSW::.BLKB	CTLS		; CONFIGURATION CONTROL SWITCHES.
    511						.EVEN
    512
    514					;+
    515					; DMA20 (EXTERNAL MEMORY) TABLES
    516					;-
    517
    518		000020 			D.MAL	==	16.		; MAXIMUM OF 16. ENTRIES.
    519	000262	000000 			.DMASZ::.WORD	0		; NUMBER OF CONTIGUOUS BLOCKS
    520	000264				.DMATB::.BLKW	D.MAL*2		; DMA20 ADDRESS AND LENGTH TABLE (ADDR/16K)
    521
    523					;+
    524					; THE CONFIGURATION GAP TABLE
    525					; THIS IS A LIST OF GAPS IN MEMORY LEFT IN THE LOGICAL CONFIGURATION
    526					;-
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 11-1
GLOBAL DATA STORAGE

    527
    528		000020 			G.APL	==	16.		; MAXIMUM OF 16. ENTRIES.
    529	000364	000000 			.GAPSZ::.WORD	0		; NUMBER OF GAPS
    530	000366				.GAPTB::.BLKW	G.APL*2		; GAP ADDRESS AND LENGTH TABLE (ADDR/16K).
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 12
GLOBAL DATA STORAGE

    532					;+
    533					; LOGICAL CONFIGURATION TABLE
    534					;
    535					; TABLE ENTRY FORMAT:	01IIQQQQ00SSSSLLLLUUUU10CCCCCCCC
    536					; BYTE DISPLACEMENT:	33333333222222221111111100000000
    537					;
    538					; MEANINGS:
    539					;
    540					; 0,1 - OBVIOUS
    541					;   I - INTERLEAVE MODE
    542					;   Q - SBUS RQ EN 0123
    543					;   S - "SECTION" NUMBER
    544					;   L - LOWER BOUND
    545					;   U - UPPER BOUND
    546					;   C - ALTERNATE CONTROLLER NUMBER
    547					;-
    548
    549	000466				.CATTB::.BLKB	CTLS*4		; LOGICAL CONFIGURATION TABLE
    550
    551	000666	   100 	   120 	   140 	.CATIF::.BYTE	100,120,140,160	; RESET CTRL 0-5, INTERLEAVE
	000671	   160
    552						.EVEN
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 13
GLOBAL DATA STORAGE

    554					;+
    555					; DPB FOR READ/WRITE DTE20 REGS
    556					;-
    557
    558	000672	002411 			.KLREG::.WORD	2411
    559	000674	   017 	   000 			.BYTE	17,0
    560	000676	000730'				.WORD	.DTEDT
    561	000700	000720'				.WORD	.DREG
    562	000702	000000 				.WORD	0
    563
    564	000704				.DFBLK::			; EBSIN
    565	000704	000000 	000000 	000000 	.DFWBK::.WORD	0,0,0		; 3 WORDS TO BE WRITTEN TO EBUS
    566	000712	000000 	000000 	000000 	.DFRBK::.WORD	0,0,0		; 3 WORDS TO BE READ FROM EBUS
    567	000720				.DREG::
    568	000720	000000 			.DFRG1::.WORD	0		; DTE20 DIAG
    569	000722	000000 			.DFRG2::.WORD	0		; DTE20 DIAG2
    570	000724	000000 			.DFSTA::.WORD	0		; DTE20 STATUS WORD
    571	000726	000000 			.DFRG3::.WORD	0		; DTE20 DIAG3
    572
    573	000730	000000 			.DTEDT::.WORD	0		; DTE TRANSFER AREA
    574
    575					;+
    576					; TTY BUFFERS
    577					;-
    578
    579		000040 			T.TIL	==	32.		; (MAXIMUM IS 80. CHARACTERS)
    580	000732				.TTIBF::.BLKB	T.TIL		; CTY INPUT BUFFER.
    581		000111 			T.TOL	==	73.
    582	000772				.TTOBF::.BLKB	T.TOL		; CTY OUTPUT BUFFER.
    583						.EVEN
    584
    585					;+
    586					; MISC.
    587					;-
    588
    589	001104	000000 	000000 	000000 	.USRFN::.WORD	0,0,0,0		; FILE NAME ENTERED BY OPERATOR
	001112	000000
    590	001114	000000 				.WORD	0		; VERSION NUMBER (LAST VERSION).
    591	001116	   005 	   005 			.BYTE	5,5		; DIRECTORY UIC.
    592	001120	054523 	000000 			.WORD	"SY,0		; DEVICE AND UNIT NUMBER.
    593	001124	000000 	000000 	000000 	.BTADR::.WORD	0,0,0		; KL BOOT ADDRESS.
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 14
GLOBAL DATA STORAGE

    595					;+
    596					; SYSTEM DEVICE WORK AREAS
    597					;-
    598
    599	001132	000000 	000000 		.SYSTA::.WORD	0,0		; OPERATION STATUS.
    600	001136	   000 			.SYISW::.BYTE	0		; INPUT FILE OPEN SWITCH.
    601	001137	   000 			.SYOSW::.BYTE	0		; OUTPUT FILE OPEN SWITCH.
    602
    603		001000 			S.YIL	==	1000
    604	001140	000000 			.SYIRC::.WORD	0		; RECORD COUNT.
    605	001142	001172'			.SYIBA::.WORD	.SYIBF		; BUFFER POSITION.
    606	001144	001000 			.SYIBC::.WORD	S.YIL		; BYTES LEFT IN BUFFER.
    607	001146	000000 	000000 	000000 	.SYIFN::.WORD	0,0,0,0,0	; INPUT FILE NAME.
	001154	000000 	000000
    608	001160	   005 	   005 			.BYTE	5,5
    609	001162	054523 	000000 			.WORD	"SY,0
    610	001166	000000 	000000 		.SYIVB::.WORD	0,0		; CURRENT INPUT BLOCK NUMBER.
    611	001172				.SYIBF::.BLKW	S.YIL/2		; SYSTEM DEVICE INPUT BUFFER.
    612
    613		001000 			S.YOL	==	1000
    614	002172	000000 			.SYORC::.WORD	0		; RECORD COUNT.
    615	002174	001172'			.SYOBA::.WORD	.SYIBF		; BUFFER POSITION.
    616	002176	001000 			.SYOBC::.WORD	S.YIL		; BYTES LEFT IN BUFFER.
    617	002200	000000 	000000 	000000 	.SYOFN::.WORD	0,0,0,0,0	; OUTPUT FILE NAME.
	002206	000000 	000000
    618	002212	   005 	   005 			.BYTE	5,5
    619	002214	054523 	000000 			.WORD	"SY,0
    620	002220	000000 	000000 		.SYOVB::.WORD	0,0		; CURRENT OUTPUT BLOCK NUMBER.
    621	002224				.SYOBF::.BLKW	S.YOL/2		; SYSTEM DEVICE OUTPUT BUFFER.
    622
    623					;+
    624					; FILE NAME BLOCK (SET UP TO GET DIRECTORY)
    625					;-
    626
    627	003224	000000 	000000 	000000 	.SYFNB::.WORD	0,0,0		; N.FID
    628	003232	140123 	140123 	000000 		.RAD50	/005005   /	; N.FNAM
    629	003240	015172 				.RAD50	/DIR/		; N.FTYP
    630	003242	000000 				.WORD	0		; N.FVER
    631	003244	000000 				.WORD	0		; N.STAT
    632	003246	000000 				.WORD	0		; N.NEXT
    633	003250	177777 	177777 			.WORD	-1,-1		; DIRECTORY FID.
    634	003254	   005 	   005 			.BYTE	5,5		; OWNER
    635		003224'			.SYFID	==	.SYFNB		; FILE ID IS IN FIRST TWO WORDS OF FNB
    636		003232'			.SYFNM	==	.SYFNB+6	; FILENAME.
    637
    638					;+
    639					; THESE ARE THE USER FILE ATTRIBUTES FOR THE CURRENTLY
    640					; OPEN OUTPUT FILE.
    641					;-
    642
    643	003256	   002 			.SYATT::.BYTE	2		; VARIABLE LENGTH RECORDS.
    644	003257	   000 				.BYTE	0		; NO RECORD ATTRIBUTES.
    645	003260	000000 				.WORD	0		; LARGEST RECORD IN FILE.
    646	003262	000000 	000000 			.WORD	0,0		; HIGHEST VIRTUAL BLOCK ALLOCATED.
    647	003266	000000 	000000 			.WORD	0,0		; HIGHEST VIRTUAL BLOCK USED.
    648	003272	000000 				.WORD	0		; TO NEXT FREE BYTE IN LAST BLOCK.
    649
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 14-1
GLOBAL DATA STORAGE

    650						.EVEN
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 15
$START	-- MAIN PROGRAM FLOW CONTROL

    652						.SBTTL	$START	-- MAIN PROGRAM FLOW CONTROL
    653	000000					.PSECT
    654
    655	000000				$START::CALL	$INIT		; DO INITIALIZATION
	000000	004737 	003024'			 JSR	PC,$INIT
    656	000004	000137 	003350'			JMP	$DLGEN		; AND ENTER DIALOG
    657	000010				$CFGRM::CALL	$MCBLD		; LOAD RAMS
	000010	004737 	007330'			 JSR	PC,$MCBLD
    658	000014	103512 				BCS	$ERROR
    660	000016	000137 	004016'			JMP	$DLGCA		; ENTER CACHE DIALOG.
    661	000022	105737 	000025'		$CFGCA::TSTB	.DCSW		; IF CONFIGURATION INFO
    662	000026	003003 				BGT	10$		; NOT SET UP, THEN
    663	000030					CALL	$GETCA		; GET IT.
	000030	004737 	006032'			 JSR	PC,$GETCA
    664	000034	103502 				BCS	$ERROR
    665	000036				10$:	CALL	$SETCA		; CONFIGURE THE CACHE.
	000036	004737 	012122'			 JSR	PC,$SETCA
    666	000042	103477 				BCS	$ERROR
    668	000044	000137 	004352'			JMP	$DLGMM		; ENTER MEMORY DIALOG.
    669	000050				$DSPPT::CALL	$SETPT		; GET PHYSICAL CONFIGURATION AND
	000050	004737 	013762'			 JSR	PC,$SETPT
    670	000054	103472 				BCS	$ERROR
    671	000056					CALL	$REPPT		; DISPLAY THE MEMORY LAYOUT.
	000056	004737 	017074'			 JSR	PC,$REPPT
    673	000062	000137 	004540'			JMP	$DLGCT		; ENTER CONTROLLER DIALOG.
    677	000066	105737 	000026'		$CFGMM::TSTB	.DMSW		; IF CONFIGURATION INFO
    678	000072	003006 				BGT	10$		; NOT SET UP, THEN
    679	000074					CALL	$SETPT		; GET PHYSICAL CONFIGURATION AND
	000074	004737 	013762'			 JSR	PC,$SETPT
    680	000100	103460 				BCS	$ERROR
    681	000102					CALL	$GETMM		; GO SET IT.
	000102	004737 	006232'			 JSR	PC,$GETMM
    682	000106	103455 				BCS	$ERROR
    683	000110				10$:	CALL	$SETLT		; SET UP LOGICAL TABLE
	000110	004737 	015232'			 JSR	PC,$SETLT
    684	000114	103407 				BCS	20$
    685	000116					CALL	$REPLT		; REPORT LOGICAL CONFIGURATION
	000116	004737 	017522'			 JSR	PC,$REPLT
    686	000122					CALL	$SETMM		; AND SET REQUESTED CONFIGURATION.
	000122	004737 	016472'			 JSR	PC,$SETMM
    687	000126	103402 				BCS	20$
    688	000130	000137 	005536'			JMP	$DLGBT		; ENTER BOOT DIALOG.
    689	000134				20$:	PRINT	#TRTMMF		; MEMORY CONFIGURATION FAILED
	000134	012700 	000000'			 MOV	#TRTMMF,R0
	000140	004737 	000000G			 JSR	PC,$TTMSG
    690	000144	000137 	000242'			JMP	$ERROR
    691	000150	105737 	000033'		$CFGBT::TSTB	.CASW		; IF NO CACHE, THEN
    692	000154	002414 				BLT	10$		; LOAD THE BOOT.
    693	000156	105737 	000040'			TSTB	.NCACH		; OTHERWISE CHECK IF
    694	000162	002011 				BGE	10$		; CACHE HAS BEEN CONFIGURED
    695	000164					CALL	$GETCA		; IF NOT, GET LAST CONFIGURATION
	000164	004737 	006032'			 JSR	PC,$GETCA
    696	000170	103424 				BCS	$ERROR		; AND
    697	000172	105737 	000040'			TSTB	.NCACH		; IF WE HAVE TO SET IT
    698	000176	001403 				BEQ	10$
    699	000200					CALL	$SETCA		; THEN DO SO.
	000200	004737 	012122'			 JSR	PC,$SETCA
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 15-1
$START	-- MAIN PROGRAM FLOW CONTROL

    700	000204	103416 				BCS	$ERROR
    701	000206				10$:	CALL	$EXBLD		; LOAD & START BOOT.
	000206	004737 	012674'			 JSR	PC,$EXBLD
    702	000212	103405 				BCS	20$
    703	000214	105737 	000022'			TSTB	.DLGSW		; INTERNAL PATH ?
    704	000220	002014 				BGE	$EXIT
    705	000222	000137 	005712'			JMP	$DLGEX		; YES, TEST FOR RESTART.
    706	000226				20$:	CALL	$PURGE		; PURGE BOOT FILE
	000226	004737 	001472'			 JSR	PC,$PURGE
    707	000232					PRINT	#TRTBTF
	000232	012700 	000036'			 MOV	#TRTBTF,R0
	000236	004737 	000000G			 JSR	PC,$TTMSG
    708
    709	000242	105037 	000022'		$ERROR::CLRB	.DLGSW		; ALLOW DIALOG
    710	000246	000137 	003350'			JMP	$DLGEN		; AND ENTER IT.
    711
    712	000252				$EXIT::	CALL	$FILE		; CHANGE CONFIGURATION FILE AND
	000252	004737 	006572'			 JSR	PC,$FILE
    713	000256	103771 				BCS	$ERROR
    714	000260					EXIT$S			; EXIT FROM KLINIT
	000260	012746 				MOV	(PC)+,-(SP)
	000262	   063 	   001 			.BYTE	51.,1
	000264	104375 				EMT	375
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 16
-- DTE20 REGISTER READ/WRITE SUBROUTINES

    716						.SBTTL	 	-- DTE20 REGISTER READ/WRITE SUBROUTINES
    717					;+
    718					; THESE ROUTINES WILL READ OR WRITE  A DTE-20 REGISTER ACCORDING TO
    719					; WHICH ROUTINE IS CALLED.
    720					;
    721					;	DTRWD1 -- READ OR WRITE DTE-20 DIAG WORD 1
    722					;	DTRWD2 -- READ OR WRITE DTE-20 DIAG WORD 2
    723					;	DTRWST -- READ OR WRITE DTE-20 STATUS
    724					;	DTRWD3 -- READ OR WRITE DTE-20 DIAG WORD 3
    725					;
    726					; IF LOCATION "DTETMP" IS .NE. 0, IT IS TAKEN A A POINTER TO THE
    727					; DATA TO BE WRITTEN INTO THE REGISTER. IF "DTETMP" IS .EQ. 0, THEN
    728					; A READ OF THE REGISTER IS PERFORMED. ON EITHER A READ OR A WRITE
    729					; THE RESULT OF THE OPERATION IS RETURNED IN R0 AND IS SAVED IN
    730					; LOCATION "DREG", AND LOCATION "DTETMP" IS CLEARED.
    731					;-
    732
    733	000266	105037 	000675'		$DTRW1::CLRB	.KLREG+3	; DIAG 1 OFFSET = 0
    734	000272	000413 				BR	DRTDTE		; DO COMMON CODE
    735	000274	112737 	000002 	000675'	$DTRW2::MOVB	#2,.KLREG+3	; DIAG 2 OFFSET = 2
    736	000302	000407 				BR	DRTDTE		; DO COMMON CODE
    737	000304	112737 	000004 	000675'	$DTRWS::MOVB	#4,.KLREG+3	; STATUS OFFSET = 4
    738	000312	000403 				BR	DRTDTE		; DO COMMON CODE
    739	000314	112737 	000006 	000675'	$DTRW3::MOVB	#6,.KLREG+3	; DIAG 3 OFFSET = 6
    740	000322	012737 	000730'	000676'	DRTDTE:	MOV	#.DTEDT,.KLREG+4 ; SET THE BUFFER POINTER FOR WRITE DATA
    741	000330	005037 	000720'			CLR	.DREG		; CLEAR RETURN DATA BUFFER
    742	000334					DIR$	#.KLREG		; DO THE READ OR WRITE
	000334	012746 	000672'			MOV	#.KLREG,-(SP)
	000340	104375 				EMT	375
    743	000342	103404 				BCS	10$
    744	000344	005037 	000730'			CLR	.DTEDT		; RESET THE DATA POINTER TO 0 (READ)
    745	000350	013700 	000720'			MOV	.DREG,R0	; COPY THE REGISTER TO R0
    746	000354				10$:	RETURN
	000354	000207 				 RTS	PC
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 17
$RSAVE	-- SAVE REGISTERS FOR ROUTINES

    748						.SBTTL	$RSAVE	-- SAVE REGISTERS FOR ROUTINES
    749					;+
    750					; THIS ROUTINE SAVES ALL REGISTERS ON THE STACK AND PUSHES
    751					; A RETURN ROUTINE ADDRESS ALSO, SO THAT WHEN THE USER RETURNS
    752					; THE REGISTERS ARE AUTOMATICALLY RESTORED. THE RETURNED
    753					; REGISTERS CAN BE MODIFIED: 2(SP)=R0, 4(SP)=R1, ETC.
    754					;-
    755
    756	000356				$RSAVE::PUSH	<R4,R3,R2,R1,R0>
	000356	010446 				 MOV	R4,-(SP)
	000360	010346 				 MOV	R3,-(SP)
	000362	010246 				 MOV	R2,-(SP)
	000364	010146 				 MOV	R1,-(SP)
	000366	010046 				 MOV	R0,-(SP)
    757	000370	004715 				JSR	PC,(R5)
    758	000372					POP	<R0,R1,R2,R3,R4,R5>
	000372	012600 				 MOV	(SP)+,R0
	000374	012601 				 MOV	(SP)+,R1
	000376	012602 				 MOV	(SP)+,R2
	000400	012603 				 MOV	(SP)+,R3
	000402	012604 				 MOV	(SP)+,R4
	000404	012605 				 MOV	(SP)+,R5
    759	000406	000207 				RTS	PC
    760
    761						.SBTTL	$ASCII	-- TRANSFER ASCII STRING
    762					;+
    763					; SET AN ASCII STRING INTO AN OUTPUT BUFFER POINTED TO BY R5.
    764					; THE INPUT STRING IS POINTED TO BY R0 AND MUST BE TERMINATED
    765					; BY A NULL BYTE. ON EXIT, R0 POINTS PAST THE NULL BYTE, AND
    766					; R5 POINTS PAST THE INSERTED STRING (NULL BYTE IS NOT INSERTED).
    767					; EMBEDDED NEGATIVE BYTES ARE NOT COPIED.
    768					;-
    769
    770						.ENABL	LSB
    771	000410	005305 			10$:	DEC	R5
    772	000412	112025 			$ASCIZ::MOVB	(R0)+,(R5)+
    773	000414	003376 				BGT	$ASCIZ
    774	000416	002774 				BLT	10$
    775	000420	005305 				DEC	R5
    776	000422	000207 				RTS	PC
    777						.DSABL	LSB
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 18
$TRACK	-- SPECIAL TRACK ROUTINE

    780						.SBTTL	$TRACK	-- SPECIAL TRACK ROUTINE
    781					;+
    782					; THIS ROUTINE IS CALLED TO PROVIDE A VISUAL TRACE OF KLINIT'S
    783					; ACTION. IT REPORTS WITH A 2-CHARACTER IDENTIFICATION, A FUNCTION
    784					; CODE/OR ADDRESS, AND A SECONDARY ADDRESS (36-BIT ADDRESSES).
    785					; AN ARGUEMENT BLOCK IS PASSED IN R0:
    786					;	.WORD	"FN		;2-CHAR IDENTIFICATION
    787					;	.WORD	ADR1		;ADDR OF FIRST 36-BIT OR FNC CODE
    788					;	.WORD	ADR2		;ADDR OF SECOND 36-BIT
    789					; ADR1 AND ADR2 MAY BE ZERO, IN WHICH CASE THE ARGS ARE NOT PRINTED.
    790					;-
    791
    792	000424	004537 	000356'		$TRACK::JSR	R5,$RSAVE
    793	000430	006046 				ROR	-(SP)		; SAVE THE CARRY.
    794	000432	105737 	000030'			TSTB	.TRKSW		; IF TRACK IS OFF,
    795	000436	001476 				BEQ	70$		; IGNORE REQUEST.
    796	000440	012705 	000026'			MOV	#DRTBUF,R5	; SET UP OUT BUF ADDRESS
    797	000444	010004 				MOV	R0,R4		; AND ARG POINTER.
    798	000446	112725 	000011 			MOVB	#TAB,(R5)+
    799	000452	112425 				MOVB	(R4)+,(R5)+	; GET IDENT.
    800	000454	112425 				MOVB	(R4)+,(R5)+
    801	000456	112725 	000040 			MOVB	#SPC,(R5)+
    802	000462	122737 	000106 	000027'		CMPB	#'F,DRTBUF+1	; IS IT A DIAG FUNCTION ?
    803	000470	001006 				BNE	10$
    804	000472	005000 				CLR	R0
    805	000474	153400 				BISB	@(R4)+,R0	; YES, GET NUMBER
    806	000476	006200 				ASR	R0
    807	000500					CALL	$TRB2O		; AND PRINT IT.
	000500	004737 	023130'			 JSR	PC,$TRB2O
    808	000504	000416 				BR	30$
    809	000506	012401 			10$:	MOV	(R4)+,R1	; FIRST ADDRESS ?
    810	000510	001414 				BEQ	30$		; NO, SKIP IT.
    811	000512	012702 	000136'			MOV	#DRTBF,R2
    812	000516	012703 	000005 			MOV	#5,R3		; TRANSFER 5 BYTES
    813	000522	010200 				MOV	R2,R0		; TO WORK AREA
    814	000524	112122 			20$:	MOVB	(R1)+,(R2)+
    815	000526	077302 				SOB	R3,20$
    816	000530	042762 	177760 	177777 		BIC	#^C17,-1(R2)	; TRIM TO 36 BITS,
    817	000536					CALL	$WRD22		; AND PRINT.
	000536	004737 	024070'			 JSR	PC,$WRD22
    818	000542	011401 			30$:	MOV	(R4),R1		; SECOND WORD ?
    819	000544	001420 				BEQ	60$		; NO, IGNORE IT.
    820	000546	012702 	000136'			MOV	#DRTBF,R2
    821	000552	012703 	000005 			MOV	#5,R3		; SAME AS BEFORE...
    822	000556	010200 				MOV	R2,R0
    823	000560	112122 			40$:	MOVB	(R1)+,(R2)+
    824	000562	077302 				SOB	R3,40$
    825	000564	042762 	177760 	177777 		BIC	#^C17,-1(R2)
    826	000572	005744 				TST	-(R4)
    827	000574	001402 				BEQ	50$
    828	000576	112725 	000057 			MOVB	#'/,(R5)+	; EXCEPT FOR SEPERATOR.
    829	000602				50$:	CALL	$WRD36
	000602	004737 	024152'			 JSR	PC,$WRD36
    830	000606	112725 	000015 		60$:	MOVB	#CR,(R5)+	; TERMINATE LINE
    831	000612	112725 	000012 			MOVB	#LF,(R5)+	; AND
    832	000616	162705 	000026'			SUB	#DRTBUF,R5	; (LENGTH OF LINE)
    833	000622	010537 	000016'			MOV	R5,DRTWLB+Q.IOPL+2 ; PUT IN DPB
KLIRT -- ROOT SECTION	MACRO M1108  13-JAN-78 10:41  PAGE 18-1
$TRACK	-- SPECIAL TRACK ROUTINE

    834	000626					DIR$	#DRTWLB		; AND SEND IT.
	000626	012746 	000000'			MOV	#DRTWLB,-(SP)
	000632	104375 				EMT	375
    835	000634	006126 			70$:	ROL	(SP)+		; RESTORE THE CARRY.
    836	000636					RETURN
	000636	000207 				 RTS	PC
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 19
$TRACK	-- SPECIAL TRACK ROUTINE

    839						.TITLE	KLIDD -- DELETE A FILE
    840	000640					IDENT$	5,0
						.IDENT	/005000/
    841					;
    842					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
    843					;
    844					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
    845					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
    846					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
    847					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
    848					;
    849					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
    850					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
    851					; EQUIPMENT CORPORATION.
    852					;
    853					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
    854					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
    855					;
    856					; VERSION 05-00
    857					;
    858					; ALAN D. PECKHAM  15-APR-77
    859					;
    860					; MODIFIED BY:
    861					;
    862					; FUNCTION: THIS ROUTINE DELETES THE FILE SPECIFIED BY THE FILE NAME
    863					;  POINTED TO BY R0.
    864					;
    865					; LOCAL MACROS
    866					;
    867						.MCALL	QIOW$
    868					;
    869					; LOCAL DATA
    870					;
    871	000144					.PSECT	DATA,D
    872	000144				DDDFNA:	QIOW$	IO.FNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000144	   003 	   014 			.BYTE	3,$$$ARG
	000146	000000G				.WORD	IO.FNA
	000150	000006 				.WORD	SYFLUN
	000152	   001 	   000 			.BYTE	1,
	000154	001132'				.WORD	.SYSTA
	000156	000000 				.WORD
	000160	000000 				.WORD
	000162	000000 				.WORD
	000164	000000 				.WORD
	000166	000000 				.WORD
	000170	000000 				.WORD
	000172	003224'				.WORD	.SYFNB
    873	000174				DDDDEL:	QIOW$	IO.DEL,SYFLUN,1,,.SYSTA,,<.SYFID>
	000174	   003 	   007 			.BYTE	3,$$$ARG
	000176	000000G				.WORD	IO.DEL
	000200	000006 				.WORD	SYFLUN
	000202	   001 	   000 			.BYTE	1,
	000204	001132'				.WORD	.SYSTA
	000206	000000 				.WORD
	000210	003224'				.WORD	.SYFID
    874	000212				DDDRNA:	QIOW$	IO.RNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000212	   003 	   014 			.BYTE	3,$$$ARG
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 19-1
$TRACK	-- SPECIAL TRACK ROUTINE

	000214	000000G				.WORD	IO.RNA
	000216	000006 				.WORD	SYFLUN
	000220	   001 	   000 			.BYTE	1,
	000222	001132'				.WORD	.SYSTA
	000224	000000 				.WORD
	000226	000000 				.WORD
	000230	000000 				.WORD
	000232	000000 				.WORD
	000234	000000 				.WORD
	000236	000000 				.WORD
	000240	003224'				.WORD	.SYFNB
    875	000640					.PSECT
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 20
$TRACK	-- SPECIAL TRACK ROUTINE

    877					;+
    878					; THIS PROGRAM USES THE RSX FILE PRIMITIVES TO DO ITS I/O
    879					; IN ORDER TO AVOID THE INCLUSION OF THE FILES-11 PACKAGE WHICH IS
    880					; SOME 2K IN SIZE, AND NOT OVERLAYABLE. THIS HAS A RISK IN THAT
    881					; THE FILE PRIMITIVES ARE NOT DOCUMENTED, BUT THE INFORMATION IS
    882					; AVAILABLE TO THOSE WHO WANT TO WADE THROUGH THE LISTINGS. THE
    883					; FOLLOWING INFORMATION HOPEFULLY WILL BE OF AID TO THE READER
    884					; OF THIS LISTING.
    885					;
    886					; FILES UNDER RSX ARE ACCESSED BY AN INTERNAL 'FILE ID' (FID) WHICH
    887					; IS ASSOCIATED WITH THE USER'S FILE NAME THROUGH THE DIRECTORY.
    888					; THUS, UNDER RSX, ACCESSING A FILE NAME IS SEPERATE FROM ACCESSING
    889					; THE ACTUAL FILE. THE 3 PRIMITIVES IO.FNA, IO.RNA, IO.ENA ARE
    890					; PROVIDED FOR FINDING, REMOVING, AND ENTERING A FILE NAME. THESE
    891					; USE THE FILE NAME BLOCK (FNB) ONLY. IN ACCESSING THE DIRECTORY,
    892					; THE FID OF THE DIRECTORY MUST BE FIRST FOUND WITHIN THE MASTER
    893					; FILE DIRECTORY, WHICH HAS A FID OF -1,-1.
    894					;
    895					; ONCE THE DESIRED FID HAS BEEN FOUND, THE FILE CAN BE ACCESSED
    896					; FOR THE TYPE OF I/O TO BE DONE: IO.ACR TO READ, IO.ACW TO
    897					; READ/WRITE, IO.ACE TO READ/WRITE/EXTEND. THE FILE CAN THEN BE
    898					; WORKED ON THROUGH IO.RVB AND IO.WVB (VIRTUAL BLOCKS START AT 1).
    899					; WHEN FINISHED, THE USER SHOULD DO AN IO.DAC TO CLOSE THE FILE.
    900					; THE PRIMITIVES IO.ACR,ACW,ACE USE THE FID AND ACCESS PARAMETERS,
    901					; WHILE IO.DAC USES THE FID AND MAY SET THE FILE ATTRIBUTES IF
    902					; ACCESS INCLUDES WRITING.
    903					;
    904					; FILES ARE MANIPULATED BY IO.CRE, IO.EXT, IO.DEL WHICH CREATE,
    905					; EXTEND, OR DELETE A FILE. A DELETE WITH AN EXTEND PARAMETER WILL
    906					; TRUNCATE A FILE.
    907					;
    908					; THE ATTRIBUTES MAY BE ACCESSED ON AN ACCESSED FILE THROUGH
    909					; IO.RAT TO READ THE ATTRIBUTES AND IO.WAT TO WRITE.
    910					;
    911					; CARE MUST BE TAKEN NOT TO LOSE A FILE BY CREATING AND NOT HAVING
    912					; IT IN SOME DIRECTORY.
    913					;-
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 21
$TRACK	-- SPECIAL TRACK ROUTINE

    915					;+
    916					; THE QIO PARAMETER BLOCK IS ORGANIZED AS FOLLOWS:
    917					;
    918					;	.WORD	0		;ADDRESS OF FID BLOCK.
    919					;	.WORD	0		;ADDRESS OF ATTRIBUTE CONTROL LIST.
    920					;	.WORD	0,0		;EXTEND PARAMETERS.
    921					;	.WORD	0		;ACCESS PARAMETERS.
    922					;	.WORD	0		;ADDRESS OF FILE NAME BLOCK.
    923					;
    924					; ANY UNUSED UNUSED PARAMETERS ARE TO BE ZERO.
    925					;
    926					; THE PARAMETERS THAT MAY BE USED FOR PRIMITIVES ARE:
    927					;
    928					;	FUNC.		FID	ACL	EXT	ACC	FNB
    929					;	IO.FNA		-	-	-	-	M
    930					;	IO.RNA		-	-	-	-	M
    931					;	IO.ENA		-	-	-	-	M
    932					;	IO.ACR		M	OR	-	M	-
    933					;	IO.ACW		M	OR	-	M	-
    934					;	IO.ACE		M	OR	-	M	-
    935					;	IO.DAC		O	OW	-	-	-
    936					;	IO.EXT		O	-	M	-	-
    937					;	IO.CRE		M	OW	O	-	-
    938					;	IO.DEL		O	-	OT	-	-
    939					;	IO.RAT		O	OR	-	-	-
    940					;	IO.WAT		O	OW	-	-	-
    941					;
    942					;	M - MANDATORY  O - OPTIONAL  '-' - MUST BE ZERO
    943					;	R - READ ATTRIBUTES  W - WRITE ATTRIBUTES  T - TRUNCATE FILE
    944					;-
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 22
$TRACK	-- SPECIAL TRACK ROUTINE

    946					;+
    947					; THE FILE ID BLOCK IS A TWO WORD HOLDING AREA AND IS USUALLY
    948					; THE FIRST TWO WORDS OF THE FNB, AS THAT IS WHERE THE FID IS
    949					; RETURNED FROM A DIRECTORY OPERATION.
    950					;
    951					; THE FILE ATTRIBUTES ARE ACCESSED IN PIECES THROUGH A CONTROL
    952					; LIST. ENTRIES IN THIS LIST ARE TWO WORDS LONG AND ARE TERMINATED
    953					; BY A NULL BYTE:
    954					;	.BYTE	0		;ATTRIBUTE # - POSITIVE TO WRITE ATTRIBUTE
    955					;				;	       NEGATIVE TO READ ATTRIBUTE.
    956					;	.BYTE	0		;LENGTH IN BYTES TO TRANSFER - IF ZERO
    957					;				;THEN 1000 BYTES IS IMPLIED. THIS MUST
    958					;				;BE <=MXLN (THE MAXIMUM LENGTH).
    959					;	.WORD	0		;ADDRESS OF SENDING/RECIEVING AREA.
    960					;
    961					;	ATTR#	MXLN	DESCRIPTION
    962					;	1	5	OWNERS UIC (MAY INCL 2&3)
    963					;	2	3	FILE PROTECTION (MAY INCL 3)
    964					;	3	1	USER CONTROLLED FILE CHARACTERISTICS
    965					;	4	40	USER FILE ATTRIBUTES
    966					;	5	12	FILE NAME (MAY INCL 6&7)
    967					;	6	4	FILE TYPE (MAY INCL 7)
    968					;	7	2	FILE VERSION
    969					;	10	7	EXPIRATION DATE
    970					;	11	12	STATISTICS BLOCK (READ ONLY)
    971					;	12	0	COMPLETE FILE HEADER (READ ONLY)
    972					;
    973					; THE USER FILE ATTRIBUTES ARE DESCRIBED IN THE RSX-11 I/O
    974					; OPERATIONS MANUAL IN APPENDIX A AS THE FIRST 20 BYTES OF
    975					; THE FDB. THE STATISTICS BLOCK IS DESCRIBED IN APPENDIX H.
    976					; THE FULL HEADER BLOCK IS DESCRIBED IN APPENDIX F.
    977					;
    978					; THE EXTEND PARAMETER IS A TWO WORD INDICATOR OF THE SIZE OF THE
    979					; EXTEND:
    980					;	.BYTE	0		;EXTENSION SIZE HIGH
    981					;	.BYTE	400		;EXTENSION PARAMETER ENABLE. IF 410
    982					;				;THEN EXTEND BY SYSTEM DEFAULT.
    983					;	.WORD	0		;EXTENSION SIZE LOW.
    984					; THE EXTENSION HIGH & LOW COMBINED PROVIDE A 24 BIT NUMBER OF
    985					; BLOCKS TO EXTEND THE FILE BY. IF USED IN IO.DEL, ALL 31 BITS
    986					; EXCLUDING THE ENABLE BIT (SIGN BIT) PARTICIPATE IN A FILE SIZE
    987					; TO TRUNCATE TO.
    988					;
    989					; THE ACCESS PARAMETER SPECIFIES THE FILE WINDOW SIZE:
    990					;	.BYTE	0		;WINDOW SIZE (NORMALLY ZERO)
    991					;	.BYTE	400		;ACCESS PARAMETER ENABLE.
    992					;
    993					; THE FILE NAME BLOCK IS DESCRIBED IN THE RSX-11 I/O OPERATIONS
    994					; REFERENCE MANUAL APPENDIX B. THE LAST FOUR BYTES ARE NOT USED.
    995					;-
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 23
$DELETE	-- DELETE A FILE

    997						.SBTTL	$DELETE	-- DELETE A FILE
    998					;+
    999					; DELETE THE GIVEN FILE FROM THE SYSTEM DEVICE
   1000					;
   1001					; INPUTS:
   1002					;	R0	- POINTER TO FILE NAME.
   1003					;
   1004					; OUTPUTS:
   1005					;	CARRY IS SET IF DELETE FAILED AND MESSAGE IS TYPED.
   1006					;	R0 IS DESTROYED IF ERROR OCCURS.
   1007					;-
   1008
   1009	000640				$DELETE::CALL	$SETFN		; GET FILE NAME.
	000640	004737 	000730'			 JSR	PC,$SETFN
   1010	000644					DIR$	#DDDFNA		; FIND FILE IN DIRECTORY
	000644	012746 	000144'			MOV	#DDDFNA,-(SP)
	000650	104375 				EMT	375
   1011	000652	103424 				BCS	10$
   1012	000654	105737 	001132'			TSTB	.SYSTA
   1013	000660	002421 				BLT	10$
   1014	000662					DIR$	#DDDDEL		; MARK IT FOR DELETION
	000662	012746 	000174'			MOV	#DDDDEL,-(SP)
	000666	104375 				EMT	375
   1015	000670	103415 				BCS	10$
   1016	000672	105737 	001132'			TSTB	.SYSTA
   1017	000676	002412 				BLT	10$
   1018	000700					CALL	$SETFN		; RESET FNB AND
	000700	004737 	000730'			 JSR	PC,$SETFN
   1019	000704					DIR$	#DDDRNA		; REMOVE NAME FROM DIRECTORY.
	000704	012746 	000212'			MOV	#DDDRNA,-(SP)
	000710	104375 				EMT	375
   1020	000712	103404 				BCS	10$
   1021	000714	105737 	001132'			TSTB	.SYSTA
   1022	000720	002401 				BLT	10$
   1023	000722					RETURN
	000722	000207 				 RTS	PC
   1024
   1025	000724				10$:	CALLR	$IOERR		; DELETE FAILED.
	000724	000137 	002610'			 JMP	$IOERR
KLIDD -- DELETE A FILE	MACRO M1108  13-JAN-78 10:41  PAGE 24
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

   1027						.SBTTL	$SETFN	-- SET FILE NAME IN FILE NAME BLOCK
   1028					;+
   1029					; PUT FILE NAME IN FILE NAME BLOCK AND SET UP
   1030					; DPB TO FIND THE FILE. THE FILENAME IS POINTED TO BY R0.
   1031					;
   1032					; INPUTS:
   1033					;	R0	- ADDRESS OF FILE NAME TO USE:
   1034					;		  .RAD50	/FILENAME /	;(THREE WORDS)
   1035					;		  .RAD50	/TYP/		;(ONE WORD)
   1036					;		  .WORD		VERSION
   1037					;		  .WORD		UIC
   1038					;		  .ASCII	/DEVICE/	;(ONE WORD)
   1039					;		  .WORD		UNIT
   1040					;
   1041					; OUTPUTS:
   1042					;	.SYFNB	- IS SET UP FOR USE WITH THE GIVEN FILE NAME.
   1043					;-
   1044
   1045	000730				$SETFN::PUSH	<R1,R0>
	000730	010146 				 MOV	R1,-(SP)
	000732	010046 				 MOV	R0,-(SP)
   1046	000734	012701 	003224'			MOV	#.SYFNB,R1	; GET FNB ADDRESS
   1047	000740	005021 				CLR	(R1)+		; AND CLEAR FID
   1048	000742	005021 				CLR	(R1)+
   1049	000744	005021 				CLR	(R1)+
   1050	000746	012021 				MOV	(R0)+,(R1)+	; MOVE IN FILENAME
   1051	000750	012021 				MOV	(R0)+,(R1)+
   1052	000752	012021 				MOV	(R0)+,(R1)+
   1053	000754	012021 				MOV	(R0)+,(R1)+	; FILE TYPE
   1054	000756	011021 				MOV	(R0),(R1)+	; VERSION
   1055	000760	005021 				CLR	(R1)+		; STATUS AND
   1056	000762	005011 				CLR	(R1)		; NEXT POINTER.
   1057	000764					POP	<R0,R1>
	000764	012600 				 MOV	(SP)+,R0
	000766	012601 				 MOV	(SP)+,R1
   1058	000770					RETURN
	000770	000207 				 RTS	PC
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1108  13-JAN-78 10:41  PAGE 25
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

   1060						.TITLE	KLIDL -- LOOKUP AN EXISTING FILE FOR INPUT
   1061	000772					IDENT$	5,0
						.IDENT	/005000/
   1062					;
   1063					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1064					;
   1065					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1066					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1067					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1068					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1069					;
   1070					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1071					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1072					; EQUIPMENT CORPORATION.
   1073					;
   1074					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1075					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1076					;
   1077					; VERSION 05-00
   1078					;
   1079					; ALAN D. PECKHAM  15-APR-77
   1080					;
   1081					; MODIFIED BY:
   1082					;
   1083					; FUNCTION: THIS ROUTINE FINDS THE FILE WITH THE NAME POINTED TO BY R0
   1084					;  AND ACCESSES IT FOR READ.
   1085					;
   1086					; LOCAL MACROS
   1087					;
   1088						.MCALL	GLUN$,QIOW$
   1089					;
   1090					; LOCAL DATA
   1091					;
   1092	000242					.PSECT	DATA,D
   1093	000242				DDLGLN:	GLUN$	SYILUN,.SYIBF
	000242	   005 	   003 			.BYTE	5,3
	000244	000004 				.WORD	SYILUN
	000246	001172'				.WORD	.SYIBF
   1094	000250				DDLFNA:	QIOW$	IO.FNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000250	   003 	   014 			.BYTE	3,$$$ARG
	000252	000000G				.WORD	IO.FNA
	000254	000006 				.WORD	SYFLUN
	000256	   001 	   000 			.BYTE	1,
	000260	001132'				.WORD	.SYSTA
	000262	000000 				.WORD
	000264	000000 				.WORD
	000266	000000 				.WORD
	000270	000000 				.WORD
	000272	000000 				.WORD
	000274	000000 				.WORD
	000276	003224'				.WORD	.SYFNB
   1095	000300				DDLACR:	QIOW$	IO.ACR,SYILUN,1,,.SYSTA,,<.SYFID,DDLRAT,,,BIT15>
	000300	   003 	   013 			.BYTE	3,$$$ARG
	000302	000000G				.WORD	IO.ACR
	000304	000004 				.WORD	SYILUN
	000306	   001 	   000 			.BYTE	1,
	000310	001132'				.WORD	.SYSTA
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1108  13-JAN-78 10:41  PAGE 25-1
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

	000312	000000 				.WORD
	000314	003224'				.WORD	.SYFID
	000316	000356'				.WORD	DDLRAT
	000320	000000 				.WORD
	000322	000000 				.WORD
	000324	100000 				.WORD	BIT15
   1096	000326				DDLRNA:	QIOW$	IO.RNA,SYFLUN,1,,,,<,,,,,.SYFNB>
	000326	   003 	   014 			.BYTE	3,$$$ARG
	000330	000000G				.WORD	IO.RNA
	000332	000006 				.WORD	SYFLUN
	000334	   001 	   000 			.BYTE	1,
	000336	000000 				.WORD
	000340	000000 				.WORD
	000342	000000 				.WORD
	000344	000000 				.WORD
	000346	000000 				.WORD
	000350	000000 				.WORD
	000352	000000 				.WORD
	000354	003224'				.WORD	.SYFNB
   1097	000356	   373 	   012 		DDLRAT:	.BYTE	-5,12		; READ FILE NAME
   1098	000360	001146'				.WORD	.SYIFN+00
   1099	000362	   377 	   002 			.BYTE	-1,2		; READ OWNER'S UIC
   1100	000364	001160'				.WORD	.SYIFN+12
   1101	000366	   000 	   000 			.BYTE	0,0		; END OF CONTROL LIST.
   1102	000772					.PSECT
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1108  13-JAN-78 10:41  PAGE 26
$LOOKUP	-- LOOK UP AN EXISTING FILE

   1104						.SBTTL	$LOOKUP	-- LOOK UP AN EXISTING FILE
   1105					;+
   1106					; FIND AN EXISTING FILE ON THE SYSTEM DEVICE AND OPEN IT FOR INPUT.
   1107					; IF THE FILE NAME IS IN THE DIRECTORY BUT THERE IS NO FILE, THE FILE
   1108					; NAME IS DELETED.
   1109					;
   1110					; INPUTS:
   1111					;	R0	- POINTER TO FILE NAME.
   1112					;
   1113					; OUTPUTS:
   1114					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   1115					;-
   1116
   1117	000772				$LOOKUP::CALL	$SETFN		; TRANSFER FILE NAME AND
	000772	004737 	000730'			 JSR	PC,$SETFN
   1118	000776					DIR$	#DDLGLN		; GET DEVICE NAME
	000776	012746 	000242'			MOV	#DDLGLN,-(SP)
	001002	104375 				EMT	375
   1119	001004	103455 				BCS	30$		; AND
   1120	001006	013737 	001172'	001162'		MOV	.SYIBF+0,.SYIFN+14 ; PUT IN OUR
   1121	001014	113737 	001174'	001164'		MOVB	.SYIBF+2,.SYIFN+16 ; FILENAME BLOCK.
   1122	001022					DIR$	#DDLFNA		; FIND FILE IN DIRECTORY.
	001022	012746 	000250'			MOV	#DDLFNA,-(SP)
	001026	104375 				EMT	375
   1123	001030	103443 				BCS	30$
   1124	001032	105737 	001132'			TSTB	.SYSTA
   1125	001036	002432 				BLT	20$
   1126	001040					DIR$	#DDLACR		; ACCESS FILE TO READ.
	001040	012746 	000300'			MOV	#DDLACR,-(SP)
	001044	104375 				EMT	375
   1127	001046	103434 				BCS	30$
   1128	001050	105737 	001132'			TSTB	.SYSTA
   1129	001054	002412 				BLT	10$		; FILE CAN'T BE READ
   1130	001056	105237 	001136'			INCB	.SYISW		; INPUT FILE IS NOW OPEN.
   1131	001062	005037 	001170'			CLR	.SYIVB+2	; NO BLOCK OR
   1132	001066	005037 	001166'			CLR	.SYIVB
   1133	001072	005037 	001140'			CLR	.SYIRC		; RECORD READ YET.
   1134	001076					CALLR	$READ		; READ FIRST BLOCK.
	001076	000137 	002042'			 JMP	$READ
   1135	001102	122737 	000000G	001132'	10$:	CMPB	#IE.NSF,.SYSTA	; IF FILENAME EXISTS BUT
   1136	001110	001013 				BNE	30$		; FILE DOESN'T, THEN
   1137	001112					CALL	$SETFN		; RESET FILE NAME BLOCK AND
	001112	004737 	000730'			 JSR	PC,$SETFN
   1138	001116					DIR$	#DDLRNA		; DELETE FILE NAME FROM DIRECTORY.
	001116	012746 	000326'			MOV	#DDLRNA,-(SP)
	001122	104375 				EMT	375
   1139	001124	122737 	000000G	001132'	20$:	CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND,
   1140	001132	001002 				BNE	30$		; LEAVE ERROR REPORT
   1141	001134	000261 				SEC			; TO CALLER.
   1142	001136					RETURN
	001136	000207 				 RTS	PC
   1143
   1144	001140				30$:	CALLR	$IOERR		; LOOKUP FAILED.
	001140	000137 	002610'			 JMP	$IOERR
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1108  13-JAN-78 10:41  PAGE 27
$LOOKUP	-- LOOK UP AN EXISTING FILE

   1146						.TITLE	KLIDN -- ENTER A FILE FOR OUTPUT
   1147	001144					IDENT$	5,0
						.IDENT	/005000/
   1148					;
   1149					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1150					;
   1151					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1152					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1153					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1154					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1155					;
   1156					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1157					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1158					; EQUIPMENT CORPORATION.
   1159					;
   1160					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1161					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1162					;
   1163					; VERSION 05-00
   1164					;
   1165					; ALAN D. PECKHAM  15-APR-77
   1166					;
   1167					; MODIFIED BY:
   1168					;
   1169					; FUNCTION: THIS ROUTINE CREATES A FILE AND ACCESSES IT FOR EXTENDING.
   1170					;  THE FILE IS ALLOCATED 1 BLOCK INITIALLY.
   1171					;
   1172					; LOCAL MACROS
   1173					;
   1174						.MCALL	GLUN$,QIOW$
   1175					;
   1176					; LOCAL DATA
   1177					;
   1178	000370					.PSECT	DATA,D
   1179	000370				DDNGLN:	GLUN$	SYOLUN,.SYOBF
	000370	   005 	   003 			.BYTE	5,3
	000372	000005 				.WORD	SYOLUN
	000374	002224'				.WORD	.SYOBF
   1180	000376				DDNCRE:	QIOW$	IO.CRE,SYFLUN,1,,.SYSTA,,<.SYFID,,BIT15,1>
	000376	   003 	   012 			.BYTE	3,$$$ARG
	000400	000000G				.WORD	IO.CRE
	000402	000006 				.WORD	SYFLUN
	000404	   001 	   000 			.BYTE	1,
	000406	001132'				.WORD	.SYSTA
	000410	000000 				.WORD
	000412	003224'				.WORD	.SYFID
	000414	000000 				.WORD
	000416	100000 				.WORD	BIT15
	000420	000001 				.WORD	1
   1181	000422				DDNENA:	QIOW$	IO.ENA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000422	   003 	   014 			.BYTE	3,$$$ARG
	000424	000000G				.WORD	IO.ENA
	000426	000006 				.WORD	SYFLUN
	000430	   001 	   000 			.BYTE	1,
	000432	001132'				.WORD	.SYSTA
	000434	000000 				.WORD
	000436	000000 				.WORD
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1108  13-JAN-78 10:41  PAGE 27-1
$LOOKUP	-- LOOK UP AN EXISTING FILE

	000440	000000 				.WORD
	000442	000000 				.WORD
	000444	000000 				.WORD
	000446	000000 				.WORD
	000450	003224'				.WORD	.SYFNB
   1182	000452				DDNACE:	QIOW$	IO.ACE,SYOLUN,1,,.SYSTA,,<.SYFID,DDNRAT,,,BIT15>
	000452	   003 	   013 			.BYTE	3,$$$ARG
	000454	000000G				.WORD	IO.ACE
	000456	000005 				.WORD	SYOLUN
	000460	   001 	   000 			.BYTE	1,
	000462	001132'				.WORD	.SYSTA
	000464	000000 				.WORD
	000466	003224'				.WORD	.SYFID
	000470	000514'				.WORD	DDNRAT
	000472	000000 				.WORD
	000474	000000 				.WORD
	000476	100000 				.WORD	BIT15
   1183	000500				DDNDEL:	QIOW$	IO.DEL,SYOLUN,1
	000500	   003 	   006 			.BYTE	3,$$$ARG
	000502	000000G				.WORD	IO.DEL
	000504	000005 				.WORD	SYOLUN
	000506	   001 	   000 			.BYTE	1,
	000510	000000 				.WORD
	000512	000000 				.WORD
   1184	000514	   373 	   012 		DDNRAT:	.BYTE	-5,12		; READ FILE NAME
   1185	000516	002200'				.WORD	.SYOFN+00
   1186	000520	   377 	   002 			.BYTE	-1,2		; AND OWNER'S UIC
   1187	000522	002212'				.WORD	.SYOFN+12
   1188	000524	   000 	   000 			.BYTE	0,0		; END OF CONTROL LIST.
   1189	001144					.PSECT
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1108  13-JAN-78 10:41  PAGE 28
$ENTER	-- ENTER A NEW FILE

   1191						.SBTTL	$ENTER	-- ENTER A NEW FILE
   1192					;+
   1193					; ENTER A NEW FILE ONTO THE SYSTEM DEVICE AND OPEN IT FOR OUTPUT.
   1194					;
   1195					; INPUTS:
   1196					;	R0	- POINTER TO FILE NAME.
   1197					;
   1198					; OUTPUTS:
   1199					;	CARRY IS SET IF FILE WAS NOT CREATED AND MESSAGE IS DISPLAYED.
   1200					;	R0 IS DESTROYED IF ERROR OCCURS.
   1201					;-
   1202
   1203	001144				$ENTER::CALL	$SETFN		; TRANSFER FILE NAME.
	001144	004737 	000730'			 JSR	PC,$SETFN
   1204	001150					DIR$	#DDNGLN		; GET DEVICE NAME
	001150	012746 	000370'			MOV	#DDNGLN,-(SP)
	001154	104375 				EMT	375
   1205	001156	103464 				BCS	20$		; AND
   1206	001160	013737 	002224'	002214'		MOV	.SYOBF+0,.SYOFN+14 ; INSERT IT INTO
   1207	001166	113737 	002226'	002216'		MOVB	.SYOBF+2,.SYOFN+16 ; OUR OWN FILENAME BLOCK.
   1208	001174					DIR$	#DDNCRE		; CREATE NEW FILE AND ALLOCATE ONE BLOCK.
	001174	012746 	000376'			MOV	#DDNCRE,-(SP)
	001200	104375 				EMT	375
   1209	001202	103452 				BCS	20$		; IF SUCCESSFUL
   1210	001204	105737 	001132'			TSTB	.SYSTA
   1211	001210	002447 				BLT	20$
   1212	001212					DIR$	#DDNENA		; ENTER NAME IN DIRECTORY.
	001212	012746 	000422'			MOV	#DDNENA,-(SP)
	001216	104375 				EMT	375
   1213	001220	103434 				BCS	10$		; IF DIRECTORY OPERATION FAILED
   1214	001222	105737 	001132'			TSTB	.SYSTA		; WE MUST
   1215	001226	002431 				BLT	10$		; RELEASE THE FILE.
   1216	001230					DIR$	#DDNACE		; ACCESS THE FILE FOR EXTEND.
	001230	012746 	000452'			MOV	#DDNACE,-(SP)
	001234	104375 				EMT	375
   1217	001236	103434 				BCS	20$
   1218	001240	105737 	001132'			TSTB	.SYSTA
   1219	001244	002431 				BLT	20$
   1220	001246	105237 	001137'			INCB	.SYOSW		; OUTPUT FILE IS NOW OPEN.
   1221	001252	012737 	000001 	002222'		MOV	#1,.SYOVB+2	; WORKING ON FIRST BLOCK.
   1222	001260	005037 	002220'			CLR	.SYOVB
   1223	001264	012737 	002224'	002174'		MOV	#.SYOBF,.SYOBA	; INITIALIZE BLOCK
   1224	001272	012737 	001000 	002176'		MOV	#S.YOL,.SYOBC
   1225	001300	005037 	002172'			CLR	.SYORC		; AND RECORD COUNTS,
   1226	001304	005037 	003260'			CLR	.SYATT+2	; PLUS LARGEST RECORD SIZE.
   1227	001310					RETURN
	001310	000207 				 RTS	PC
   1228
   1229	001312				10$:	PUSH	$DSW
	001312	013746 	000000G			 MOV	$DSW,-(SP)
   1230	001316					DIR$	#DDNDEL		; DELETE FILE (NOT IN DIRECTORY).
	001316	012746 	000500'			MOV	#DDNDEL,-(SP)
	001322	104375 				EMT	375
   1231	001324					POP	$DSW
	001324	012637 	000000G			 MOV	(SP)+,$DSW
   1232	001330				20$:	CALLR	$IOERR		; ENTER FAILED.
	001330	000137 	002610'			 JMP	$IOERR
KLIDC -- FILE CLOSE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 29
$ENTER	-- ENTER A NEW FILE

   1234						.TITLE	KLIDC -- FILE CLOSE ROUTINE
   1235	001334					IDENT$	5,0
						.IDENT	/005000/
   1236					;
   1237					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1238					;
   1239					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1240					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1241					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1242					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1243					;
   1244					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1245					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1246					; EQUIPMENT CORPORATION.
   1247					;
   1248					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1249					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1250					;
   1251					; VERSION 05-00
   1252					;
   1253					; ALAN D. PECKHAM  15-APR-77
   1254					;
   1255					; MODIFIED BY:
   1256					;
   1257					; FUNCTION: THIS ROUTINE CLOSES THE FILE CURRENTLY OPEN. IF IT IS
   1258					;  AND OUTPUT FILE, THE LAST BLOCK IS WRITTEN OUT AND
   1259					;  THE ATTRIBUTES ARE WRITTEN.
   1260					;
   1261					; LOCAL MACROS
   1262					;
   1263						.MCALL	QIOW$
   1264					;
   1265					; LOCAL DATA
   1266					;
   1267	000526					.PSECT	DATA,D
   1268	000526				DDCDAI:	QIOW$	IO.DAC,SYILUN,1,,.SYSTA
	000526	   003 	   006 			.BYTE	3,$$$ARG
	000530	000000G				.WORD	IO.DAC
	000532	000004 				.WORD	SYILUN
	000534	   001 	   000 			.BYTE	1,
	000536	001132'				.WORD	.SYSTA
	000540	000000 				.WORD
   1269	000542				DDCDAO:	QIOW$	IO.DAC,SYOLUN,1,,.SYSTA,,<,DDCWAT>
	000542	   003 	   010 			.BYTE	3,$$$ARG
	000544	000000G				.WORD	IO.DAC
	000546	000005 				.WORD	SYOLUN
	000550	   001 	   000 			.BYTE	1,
	000552	001132'				.WORD	.SYSTA
	000554	000000 				.WORD
	000556	000000 				.WORD
	000560	000562'				.WORD	DDCWAT
   1270	000562	   004 	   016 		DDCWAT:	.BYTE	4,16		; ATTRIBUTES INFO
   1271	000564	003256'				.WORD	.SYATT
   1272	000566	   005 	   012 			.BYTE	5,12		; FILENAME INFO
   1273	000570	002200'				.WORD	.SYOFN+00
   1274	000572	   001 	   002 			.BYTE	1,2		; AND OWNER'S UIC
   1275	000574	002212'				.WORD	.SYOFN+12
KLIDC -- FILE CLOSE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 29-1
$ENTER	-- ENTER A NEW FILE

   1276	000576	   000 	   000 			.BYTE	0,0		; END OF CONTROL WORDS.
   1277	001334					.PSECT
KLIDC -- FILE CLOSE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 30
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   1279						.SBTTL	$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES
   1280					;+
   1281					; CLOSE THE INPUT AND OUTPUT FILES.
   1282					;
   1283					; NO INPUTS
   1284					;
   1285					; OUTPUTS:
   1286					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   1287					;	R0 IS DESTROYED IF ERROR.
   1288					;-
   1289
   1290	001334	105737 	001136'		$CLOSE::TSTB	.SYISW		; IF INPUT FILE NOT OPEN
   1291	001340	001411 				BEQ	10$		; LEAVE IT ALONE.
   1292	001342					DIR$	#DDCDAI		; DE-ACCESS THE INPUT FILE.
	001342	012746 	000526'			MOV	#DDCDAI,-(SP)
	001346	104375 				EMT	375
   1293	001350	103441 				BCS	30$
   1294	001352	105737 	001132'			TSTB	.SYSTA
   1295	001356	002436 				BLT	30$
   1296	001360	105037 	001136'			CLRB	.SYISW		; INPUT FILE NOW CLOSED.
   1297	001364	105737 	001137'		10$:	TSTB	.SYOSW		; IF OUTPUT FILE NO OPEN
   1298	001370	001430 				BEQ	20$		; LEAVE IT ALONE.
   1299
   1300					; COLLECT OUT STATISTICS
   1301
   1302	001372	013737 	002220'	003266'		MOV	.SYOVB,.SYATT+10 ; RECORD TOP
   1303	001400	013737 	002222'	003270'		MOV	.SYOVB+2,.SYATT+12 ; BLOCK USED AND
   1304	001406	013737 	002174'	003272'		MOV	.SYOBA,.SYATT+14 ; DISPLACEMENT TO
   1305	001414	162737 	002224'	003272'		SUB	#.SYOBF,.SYATT+14 ; NEXT AVAILABLE BYTE.
   1306	001422					CALL	$WRITS		; WRITE OUT REST OF
	001422	004737 	002234'			 JSR	PC,$WRITS
   1307	001426	103411 				BCS	20$		; THE CURRENT BLOCK.
   1308	001430					DIR$	#DDCDAO		; DE-ACCESS THE OUTPUT FILE.
	001430	012746 	000542'			MOV	#DDCDAO,-(SP)
	001434	104375 				EMT	375
   1309	001436	103411 				BCS	40$
   1310	001440	105737 	001132'			TSTB	.SYSTA
   1311	001444	002406 				BLT	40$
   1312	001446	105037 	001137'			CLRB	.SYOSW		; OUTPUT FILE NOW CLOSED.
   1313	001452				20$:	RETURN
	001452	000207 				 RTS	PC
   1314
   1315	001454	012700 	001146'		30$:	MOV	#.SYIFN,R0	; CLOSE FAILED.
   1316	001460	000402 				BR	50$
   1317	001462	012700 	002200'		40$:	MOV	#.SYOFN,R0
   1318	001466				50$:	CALLR	$IOERR
	001466	000137 	002610'			 JMP	$IOERR
KLIDP -- FILE PURGE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 31
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   1320						.TITLE	KLIDP -- FILE PURGE ROUTINE
   1321	001472					IDENT$	5,0
						.IDENT	/005000/
   1322					;
   1323					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1324					;
   1325					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1326					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1327					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1328					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1329					;
   1330					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1331					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1332					; EQUIPMENT CORPORATION.
   1333					;
   1334					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1335					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1336					;
   1337					; VERSION 05-00
   1338					;
   1339					; ALAN D. PECKHAM  15-APR-77
   1340					;
   1341					; MODIFIED BY:
   1342					;
   1343					; FUNCTION: THIS ROUTINE PURGES THE FILE CURRENTLY OPEN. THE
   1344					;  OUTPUT FILE IS MARKED FOR DELETION AND ITS FILE NAME
   1345					;  IS REMOVED FROM THE DIRECTORY.
   1346					;
   1347					; LOCAL MACROS
   1348					;
   1349						.MCALL	QIOW$
   1350					;
   1351					; LOCAL DATA
   1352					;
   1353	000600					.PSECT	DATA,D
   1354	000600				DDPDAI:	QIOW$	IO.DAC,SYILUN,1	; DE-ACCESS INPUT FILE.
	000600	   003 	   006 			.BYTE	3,$$$ARG
	000602	000000G				.WORD	IO.DAC
	000604	000004 				.WORD	SYILUN
	000606	   001 	   000 			.BYTE	1,
	000610	000000 				.WORD
	000612	000000 				.WORD
   1355	000614				DDPDEL:	QIOW$	IO.DEL,SYOLUN,1	; MARK OUTPUT FILE FOR DELETE.
	000614	   003 	   006 			.BYTE	3,$$$ARG
	000616	000000G				.WORD	IO.DEL
	000620	000005 				.WORD	SYOLUN
	000622	   001 	   000 			.BYTE	1,
	000624	000000 				.WORD
	000626	000000 				.WORD
   1356	000630				DDPDAO:	QIOW$	IO.DAC,SYOLUN,1	; DE-ACCESS OUTPUT FILE.
	000630	   003 	   006 			.BYTE	3,$$$ARG
	000632	000000G				.WORD	IO.DAC
	000634	000005 				.WORD	SYOLUN
	000636	   001 	   000 			.BYTE	1,
	000640	000000 				.WORD
	000642	000000 				.WORD
   1357	000644				DDPRNA:	QIOW$	IO.RNA,SYFLUN,1,,,,<,,,,,.SYFNB>
KLIDP -- FILE PURGE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 31-1
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

	000644	   003 	   014 			.BYTE	3,$$$ARG
	000646	000000G				.WORD	IO.RNA
	000650	000006 				.WORD	SYFLUN
	000652	   001 	   000 			.BYTE	1,
	000654	000000 				.WORD
	000656	000000 				.WORD
	000660	000000 				.WORD
	000662	000000 				.WORD
	000664	000000 				.WORD
	000666	000000 				.WORD
	000670	000000 				.WORD
	000672	003224'				.WORD	.SYFNB
   1358									; REMOVE OUTPUT FILENAME FROM DIRECTORY.
   1359	001472					.PSECT
KLIDP -- FILE PURGE ROUTINE	MACRO M1108  13-JAN-78 10:41  PAGE 32
$PURGE	-- PURGE FILES CURRENTLY OPEN

   1361						.SBTTL	$PURGE	-- PURGE FILES CURRENTLY OPEN
   1362					;+
   1363					; CLOSE THE INPUT FILE AND DELETE THE CURRENT OUTPUT FILE.
   1364					; ALL ERRORS ARE IGNORED AND THE LUNS ARE ASSUMED FREED.
   1365					;
   1366					; NO INPUTS OR OUTPUTS
   1367					;-
   1368
   1369	001472	105737 	001136'		$PURGE::TSTB	.SYISW		; IF INPUT FILE NOT OPEN
   1370	001476	001405 				BEQ	10$		; LEAVE IT ALONE.
   1371	001500					DIR$	#DDPDAI		; DE-ACCESS THE INPUT FILE.
	001500	012746 	000600'			MOV	#DDPDAI,-(SP)
	001504	104375 				EMT	375
   1372	001506	105037 	001136'			CLRB	.SYISW		; INPUT FILE NOW CLOSED.
   1373	001512	105737 	001137'		10$:	TSTB	.SYOSW		; IF OUTPUT FILE NO OPEN
   1374	001516	001421 				BEQ	20$		; LEAVE IT ALONE.
   1375	001520					DIR$	#DDPDEL		; MARK FOR DELETION AND
	001520	012746 	000614'			MOV	#DDPDEL,-(SP)
	001524	104375 				EMT	375
   1376	001526					DIR$	#DDPDAO		; DE-ACCESS THE OUTPUT FILE.
	001526	012746 	000630'			MOV	#DDPDAO,-(SP)
	001532	104375 				EMT	375
   1377	001534					PUSH	R0
	001534	010046 				 MOV	R0,-(SP)
   1378	001536	012700 	002200'			MOV	#.SYOFN,R0	; GET THE FILE NAME
   1379	001542					CALL	$SETFN		; AND
	001542	004737 	000730'			 JSR	PC,$SETFN
   1380	001546					POP	R0
	001546	012600 				 MOV	(SP)+,R0
   1381	001550					DIR$	#DDPRNA		; REMOVE FROM THE DIRECTORY.
	001550	012746 	000644'			MOV	#DDPRNA,-(SP)
	001554	104375 				EMT	375
   1382	001556	105037 	001137'			CLRB	.SYOSW		; OUTPUT FILE NOW CLOSED.
   1383	001562				20$:	RETURN
	001562	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 33
$PURGE	-- PURGE FILES CURRENTLY OPEN

   1385						.TITLE	KLIDR -- RECORD READ ROUTINES
   1386	001564					IDENT$	5,0
						.IDENT	/005000/
   1387					;
   1388					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1389					;
   1390					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1391					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1392					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1393					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1394					;
   1395					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1396					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1397					; EQUIPMENT CORPORATION.
   1398					;
   1399					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1400					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1401					;
   1402					; VERSION 05-00
   1403					;
   1404					; ALAN D. PECKHAM  15-APR-77
   1405					;
   1406					; MODIFIED BY:
   1407					;
   1408					; FUNCTION: THIS MODULE CONTAINS ROUTINES WHICH FACILITATE THE
   1409					;  READING OF RSX-BINARY RECORDS FROM THE CURRENTLY
   1410					;  OPEN FILE.
   1411					;
   1412					; LOCAL MACROS
   1413					;
   1414						.MCALL	QIOW$S
   1415					;
   1416					; LOCAL DATA
   1417					;
   1418	000066					.PSECT	TEXT,D
   1419	000066				TDRRDE:	ERROR	<READ ERROR>
	000066	   077 	   040 	   122 		 .ASCIZ	\? READ ERROR\
	000071	   105 	   101 	   104
	000074	   040 	   105 	   122
	000077	   122 	   117 	   122
	000102	   000
   1420	000103				TDRRLE:	ERROR	<INPUT RECORD LENGTH ERROR>
	000103	   077 	   040 	   111 		 .ASCIZ	\? INPUT RECORD LENGTH ERROR\
	000106	   116 	   120 	   125
	000111	   124 	   040 	   122
	000114	   105 	   103 	   117
	000117	   122 	   104 	   040
	000122	   114 	   105 	   116
	000125	   107 	   124 	   110
	000130	   040 	   105 	   122
	000133	   122 	   117 	   122
	000136	   000
   1421	001564					.PSECT
KLIDR -- RECORD READ ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 34
$READC	-- START READING A RECORD

   1423						.SBTTL	$READC	-- START READING A RECORD
   1424					;+
   1425					; READ THE RECORD TYPE FOR THE NEXT RECORD. IF THE PREVIOUS RECORD
   1426					; HAS NOT BEEN TOTALLY READ IN, SIGNAL ERROR. SAVE THE BYTE COUNT
   1427					; TO KEEP TRACK OF HOW MANY BYTES OF THE RECORD HAVE BEEN READ.
   1428					;
   1429					; NO INPUTS:
   1430					;
   1431					; OUTPUTS:
   1432					;	R0	- TYPE CODE OF NEW RECORD.
   1433					;	.SYIRC	- COUNT OF BYTES REMAINING IN RECORD.
   1434					;	CARRY IS SET IF LENGTH OR READ ERROR AND MESSAGE IS DISPLAYED.
   1435					;-
   1436
   1437	001564	005737 	001140'		$READC::TST	.SYIRC		; IF LAST RECORD IS NOT FINISHED,
   1438	001570	001116 				BNE	LDRER		; THEN ERROR.
   1439	001572	012737 	000003 	001140'	10$:	MOV	#3,.SYIRC	; SET UP DUMMY COUNT AND
   1440	001600					CALL	$READW		; READ IN BYTE COUNT FOR NEXT RECORD.
	001600	004737 	001672'			 JSR	PC,$READW
   1441	001604	103405 				BCS	20$
   1442	001606	010037 	001140'			MOV	R0,.SYIRC	; STORE BYTE COUNT AND
   1443	001612	001767 				BEQ	10$		; (NULL RECORD)
   1444	001614					CALLR	$READW		; READ IN NEXT WORD.
	001614	000137 	001672'			 JMP	$READW
   1445	001620				20$:	RETURN
	001620	000207 				 RTS	PC
   1446
   1447						.SBTTL	$READS	-- SKIP THE CURRENT RECORD
   1448					;+
   1449					; SKIP OVER THE REST OF THE CURRENT AND POSITION TO THE NEXT RECORD.
   1450					; IF NO RECORD IS BEING PROCESSED (RECORD COUNT=0), NO ACTION IS TAKEN.
   1451					;
   1452					; NO INPUTS
   1453					;
   1454					; OUTPUTS:
   1455					;	CARRY IS SET IF ERROR DURING READ AND MESSAGE IS DISPLAYED.
   1456					;-
   1457
   1458	001622	023737 	001140'	001144'	$READS::CMP	.SYIRC,.SYIBC	; IF RECORD IS WITHIN BLOCK
   1459	001630	003407 				BLE	10$		; THEN GO PAST IT,
   1460	001632	163737 	001144'	001140'		SUB	.SYIBC,.SYIRC	; OTHERWISE PASS PART OF THE RECORD,
   1461	001640					CALL	$READ		; GET NEXT BLOCK,
	001640	004737 	002042'			 JSR	PC,$READ
   1462	001644	103366 				BCC	$READS		; AND SEE IF RECORD IS DEPLETED.
   1463	001646					RETURN
	001646	000207 				 RTS	PC
   1464	001650	063737 	001140'	001142'	10$:	ADD	.SYIRC,.SYIBA	; PUSH POINTERS PAST RECORD.
   1465	001656	163737 	001140'	001144'		SUB	.SYIRC,.SYIBC
   1466	001664	005037 	001140'			CLR	.SYIRC		; NO MORE RECORD !
   1467	001670					RETURN
	001670	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 35
$READW	-- READ A WORD

   1469						.SBTTL	$READW	-- READ A WORD
   1470					;+
   1471					; READ THE NEXT WORD FROM THE CURRENT RECORD. IF CURRENTLY ON
   1472					; AN ODD BOUNDRY, SKIP OVER THE CURRENT BYTE TO MAKE IT EVEN.
   1473					;
   1474					; NO INPUTS
   1475					;
   1476					; OUTPUTS:
   1477					;	R0	- THE WORD READ.
   1478					;	CARRY IS SET ON RECORD OVERRUN OR READ ERROR AND MESSAGE IS DISPLAYED.
   1479					;-
   1480
   1481	001672	032737 	000001 	001142'	$READW::BIT	#1,.SYIBA	; MAKE SURE WE ARE
   1482	001700	001406 				BEQ	10$		; ON A WORD BOUNDRY.
   1483	001702	005337 	001140'			DEC	.SYIRC
   1484	001706	005237 	001142'			INC	.SYIBA
   1485	001712	005337 	001144'			DEC	.SYIBC
   1486	001716	162737 	000002 	001140'	10$:	SUB	#2,.SYIRC	; UPDATE RECORD COUNT AND
   1487	001724	002440 				BLT	LDRER		; IF IT BOTTOMS, ERROR.
   1488	001726	005737 	001144'			TST	.SYIBC		; IF WE ARE AT THE END
   1489	001732	003003 				BGT	20$		; OF THE BUFFER
   1490	001734					CALL	$READ		; THEN READ ANOTHER ONE.
	001734	004737 	002042'			 JSR	PC,$READ
   1491	001740	103411 				BCS	30$
   1492	001742	017700 	001142'		20$:	MOV	@.SYIBA,R0	; PICK UP WORD
   1493	001746	062737 	000002 	001142'		ADD	#2,.SYIBA	; BUMP ADDRESS
   1494	001754	162737 	000002 	001144'		SUB	#2,.SYIBC	; AND BYTE COUNT.
   1495	001762	000241 				CLC
   1496	001764				30$:	RETURN
	001764	000207 				 RTS	PC
   1497
   1498						.SBTTL	$READB	-- READ A BYTE
   1499					;+
   1500					; READ THE NEXT BYTE FROM THE CURRENT RECORD.
   1501					;
   1502					; NO INPUTS
   1503					;
   1504					; OUTPUTS:
   1505					;	R0	- THE BYTE READ.
   1506					;	CARRY IS SET ON RECORD OVERRUN OR READ ERROR AND A MESSAGE IS DISPLAYED.
   1507					;-
   1508
   1509	001766	005337 	001140'		$READB::DEC	.SYIRC		; UPDATE RECORD COUNT AND
   1510	001772	002415 				BLT	LDRER		; IF IT BOTTOMS, ERROR.
   1511	001774	005737 	001144'			TST	.SYIBC		; IF WE ARE AT THE END
   1512	002000	003003 				BGT	10$		; OF THE BUFFER
   1513	002002					CALL	$READ		; THEN READ ANOTHER ONE.
	002002	004737 	002042'			 JSR	PC,$READ
   1514	002006	103406 				BCS	20$
   1515	002010	117700 	001142'		10$:	MOVB	@.SYIBA,R0	; PICK UP BYTE
   1516	002014	005237 	001142'			INC	.SYIBA		; BUMP ADDRESS
   1517	002020	005337 	001144'			DEC	.SYIBC		; AND BYTE COUNT.
   1518	002024				20$:	RETURN
	002024	000207 				 RTS	PC
   1519
   1520	002026				LDRER:	PRINT	#TDRRLE		; RECORD OVERRUN OR UNDERRUN.
	002026	012700 	000103'			 MOV	#TDRRLE,R0
KLIDR -- RECORD READ ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 35-1
$READB	-- READ A BYTE

	002032	004737 	000000G			 JSR	PC,$TTMSG
   1521	002036	000261 				SEC
   1522	002040					RETURN
	002040	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 36
$READ	-- READ NEXT VIRTUAL BLOCK

   1524						.SBTTL	$READ	-- READ NEXT VIRTUAL BLOCK
   1525					;+
   1526					; READ THE NEXT BLOCK FROM THE SYSTEM DEVICE AND RESET BUFFER PARAMETERS.
   1527					;
   1528					; NO INPUTS
   1529					;
   1530					; OUTPUTS:
   1531					;	.SYIBA	- POINTS TO THE BEGINING OF THE BUFFER READ.
   1532					;	.SYIBC	- COUNT OF BYTES READ.
   1533					;	CARRY IS SET ON READ ERROR AND MESSAGE IS DISPLAYED.
   1534					;-
   1535
   1536	002042	062737 	000001 	001170'	$READ::	ADD	#1,.SYIVB+2	; GET NEXT BLOCK.
   1537	002050	005537 	001166'			ADC	.SYIVB
   1538
   1539					;	READ VIRTUAL BLOCK
   1540
   1541	002054					QIOW$S	#IO.RVB,#SYILUN,#1,,#.SYSTA,,<#.SYIBF,#S.YIL,,.SYIVB,.SYIVB+2>
	002054	013746 	001170'			MOV	.SYIVB+2,-(SP)
	002060	013746 	001166'			MOV	.SYIVB,-(SP)
	002064	005046 				CLR	-(SP)
	002066	012746 	001000 			MOV	#S.YIL,-(SP)
	002072	012746 	001172'			MOV	#.SYIBF,-(SP)
	002076	005046 				CLR	-(SP)
	002100	012746 	001132'			MOV	#.SYSTA,-(SP)
	002104	005046 				CLR	-(SP)
	002106	112716 	000001 			MOVB	#1,(SP)
	002112	012746 	000004 			MOV	#SYILUN,-(SP)
	002116	012746 	000000G			MOV	#IO.RVB,-(SP)
	002122	012746 				MOV	(PC)+,-(SP)
	002124	   003 	   013 			.BYTE	3,$$$T1
	002126	104375 				EMT	375
   1542	002130	103412 				BCS	10$
   1543	002132	105737 	001132'			TSTB	.SYSTA
   1544	002136	002407 				BLT	10$		; READ FAILED.
   1545	002140	012737 	001172'	001142'		MOV	#.SYIBF,.SYIBA	; SAVE BUFFER ADR
   1546	002146	013737 	001134'	001144'		MOV	.SYSTA+2,.SYIBC	; AND BYTE COUNT
   1547	002154					RETURN
	002154	000207 				 RTS	PC
   1548
   1549	002156				10$:	PRINT	#TDRRDE		; PRINT ERROR MESSAGE.
	002156	012700 	000066'			 MOV	#TDRRDE,R0
	002162	004737 	000000G			 JSR	PC,$TTMSG
   1550	002166	000261 				SEC
   1551	002170					RETURN
	002170	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 37
$READ	-- READ NEXT VIRTUAL BLOCK

   1553						.TITLE	KLIDW -- RECORD WRITE ROUTINES
   1554	002172					IDENT$	5,0
						.IDENT	/005000/
   1555					;
   1556					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1557					;
   1558					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1559					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1560					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1561					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1562					;
   1563					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1564					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1565					; EQUIPMENT CORPORATION.
   1566					;
   1567					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1568					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1569					;
   1570					; VERSION 05-00
   1571					;
   1572					; ALAN D. PECKHAM  15-APR-77
   1573					;
   1574					; MODIFIED BY:
   1575					;
   1576					; FUNCTION: THIS MODULE CONTAINS ROUTINES WHICH FACILITATE THE
   1577					;  WRITING OF RSX-BINARY RECORDS TO THE CURRENTLY
   1578					;  OPEN FILE.
   1579					;
   1580					; LOCAL MACROS
   1581					;
   1582						.MCALL	QIOW$S
   1583					;
   1584					; LOCAL DATA
   1585					;
   1586	000137					.PSECT	TEXT,D
   1587	000137				TDWWRE:	ERROR	<WRITE ERROR>
	000137	   077 	   040 	   127 		 .ASCIZ	\? WRITE ERROR\
	000142	   122 	   111 	   124
	000145	   105 	   040 	   105
	000150	   122 	   122 	   117
	000153	   122 	   000
   1588	000155				TDWRLE:	ERROR	<OUTPUT RECORD LENGTH ERROR>
	000155	   077 	   040 	   117 		 .ASCIZ	\? OUTPUT RECORD LENGTH ERROR\
	000160	   125 	   124 	   120
	000163	   125 	   124 	   040
	000166	   122 	   105 	   103
	000171	   117 	   122 	   104
	000174	   040 	   114 	   105
	000177	   116 	   107 	   124
	000202	   110 	   040 	   105
	000205	   122 	   122 	   117
	000210	   122 	   000
   1589	002172					.PSECT
KLIDW -- RECORD WRITE ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 38
$WRITC	-- START WRITING A RECORD

   1591						.SBTTL	$WRITC	-- START WRITING A RECORD
   1592					;+
   1593					; START WRITING A RECORD OF GIVEN LENGTH. IF PREVIOUS RECORD UNFINISHED
   1594					; THE SIGNAL ERROR.
   1595					;
   1596					; INPUTS:
   1597					;	R0	- LENGTH OF RECORD TO BE WRITTEN.
   1598					;
   1599					; OUTPUTS:
   1600					;	CARRY SET IF LAST RECORD UNFINISHED OR WRITE ERROR AND MESSAGE
   1601					;	IS DISPLAYED.
   1602					;-
   1603
   1604	002172	005737 	002172'		$WRITC::TST	.SYORC		; IF LAST RECORD NOT FINISHED
   1605	002176	001034 				BNE	LDWER		; SIGNAL ERROR.
   1606	002200	020037 	003260'			CMP	R0,.SYATT+2	; CHECK IF LARGEST RECORD WRITTEN
   1607	002204	101402 				BLOS	10$		; AND
   1608	002206	010037 	003260'			MOV	R0,.SYATT+2	; RECORD IF LARGER.
   1609	002212	012737 	000003 	002172'	10$:	MOV	#3,.SYORC	; SET UP DUMMY COUNT,
   1610	002220					CALL	$WRITW		; WRITE IN BYTE COUNT FOR NEXT RECORD,
	002220	004737 	002304'			 JSR	PC,$WRITW
   1611	002224	103402 				BCS	20$
   1612	002226	010037 	002172'			MOV	R0,.SYORC	; AND SAVE FOR RECORD COUNT.
   1613	002232				20$:	RETURN
	002232	000207 				 RTS	PC
   1614
   1615						.SBTTL	$WRITS	-- ZERO REMAINDER OF CURRENT BLOCK
   1616					;+
   1617					; CLEAR OUT THE REST OF THE CURRENT BLOCK AND WRITE IT. THIS ROUTINE IS
   1618					; USED TO WRITE OUT THE LAST RECORD INTO THE OUTPUT FILE.
   1619					;
   1620					; NO INPUTS
   1621					;
   1622					; OUTPUTS:
   1623					;	CARRY IS SET IF LAST RECORD IS UNFINISHED OR WRITE ERROR AND
   1624					;	MESSAGE IS DISPLAYED.
   1625					;-
   1626
   1627	002234	005737 	002172'		$WRITS::TST	.SYORC		; IF RECORD NOT FINISHED
   1628	002240	001013 				BNE	LDWER		; THEN THERE IS PROBLEM.
   1629	002242	022737 	000777 	002176'	10$:	CMP	#S.YOL-1,.SYOBC	; ARE WE AT NEW PAGE ?
   1630	002250	003406 				BLE	20$		; YES, QUIT (CARRY IS CLEAR)
   1631	002252	005237 	002172'			INC	.SYORC		; SET UP DUMMY COUNT
   1632	002256	005000 				CLR	R0		; AND WRITE A ZERO
   1633	002260					CALL	$WRITB
	002260	004737 	002400'			 JSR	PC,$WRITB
   1634	002264	103366 				BCC	10$		; AND CHECK AGAIN.
   1635	002266				20$:	RETURN
	002266	000207 				 RTS	PC
   1636
   1637	002270				LDWER:	PRINT	#TDWRLE		; RECORD OVERRUN OR UNDERRUN.
	002270	012700 	000155'			 MOV	#TDWRLE,R0
	002274	004737 	000000G			 JSR	PC,$TTMSG
   1638	002300	000261 				SEC
   1639	002302					RETURN
	002302	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 39
$WRITW	-- WRITE A WORD

   1641						.SBTTL	$WRITW	-- WRITE A WORD
   1642					;+
   1643					; WRITE THE NEXT WORD INTO THE OUTPUT RECORD. IF ON AN ODD BOUNDRY
   1644					; THE SKIP A BYTE TO WRITE THE WORD ON AN EVEN WORD. SIGNAL ERROR
   1645					; IF RECORD OVERFLOW.
   1646					;
   1647					; INPUTS:
   1648					;	R0	- THE WORD TO WRITE.
   1649					;
   1650					; OUTPUTS:
   1651					;	CARRY IS SET IF WRITE ERROR AND MESSAGE IS DISPLAYED.
   1652					;-
   1653
   1654	002304	032737 	000001 	002174'	$WRITW::BIT	#1,.SYOBA	; MAKE SURE WE ARE
   1655	002312	001406 				BEQ	10$		; ON A WORD BOUNDRY.
   1656	002314	005337 	002172'			DEC	.SYORC
   1657	002320	005237 	002174'			INC	.SYOBA
   1658	002324	005337 	002176'			DEC	.SYOBC
   1659	002330	162737 	000002 	002172'	10$:	SUB	#2,.SYORC	; UPDATE RECORD COUNT AND
   1660	002336	002754 				BLT	LDWER		; IF IT BOTTOMS, ERROR.
   1661	002340	005737 	002176'			TST	.SYOBC		; IF WE ARE AT THE END
   1662	002344	003003 				BGT	20$		; OF THE BUFFER
   1663	002346					CALL	$WRITE		; THEN WRITE IT.
	002346	004737 	002440'			 JSR	PC,$WRITE
   1664	002352	103411 				BCS	30$
   1665	002354	010077 	002174'		20$:	MOV	R0,@.SYOBA	; STICK IN WORD
   1666	002360	062737 	000002 	002174'		ADD	#2,.SYOBA	; BUMP ADDRESS
   1667	002366	162737 	000002 	002176'		SUB	#2,.SYOBC	; AND BYTE COUNT.
   1668	002374	000241 				CLC
   1669	002376				30$:	RETURN
	002376	000207 				 RTS	PC
   1670
   1671						.SBTTL	$WRITB	-- WRITE A BYTE
   1672					;+
   1673					; WRITE A BYTE INTO THE CURRENT RECORD. SIGNAL ERROR IF RECORD OVERFLOW.
   1674					;
   1675					; INPUTS:
   1676					;	R0	- BYTE TO WRITE.
   1677					;
   1678					; OUTPUTS:
   1679					;	CARRY IS SET IF RECORD OVERFLOW OR WRITE ERROR AND MESSAGE
   1680					;	IS DISPLAYED.
   1681					;-
   1682
   1683	002400	005337 	002172'		$WRITB::DEC	.SYORC		; UPDATE RECORD COUNT AND
   1684	002404	002731 				BLT	LDWER		; IF IT BOTTOMS, ERROR.
   1685	002406	005737 	002176'			TST	.SYOBC		; IF WE ARE AT THE END
   1686	002412	003003 				BGT	10$		; OF THE BUFFER
   1687	002414					CALL	$WRITE		; THEN WRITE IT.
	002414	004737 	002440'			 JSR	PC,$WRITE
   1688	002420	103406 				BCS	20$
   1689	002422	110077 	002174'		10$:	MOVB	R0,@.SYOBA	; STICK IN BYTE
   1690	002426	005237 	002174'			INC	.SYOBA		; BUMP ADDRESS
   1691	002432	005337 	002176'			DEC	.SYOBC		; AND BYTE COUNT.
   1692	002436				20$:	RETURN
	002436	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 40
$WRITE	-- WRITE NEXT VIRTUAL BLOCK

   1694						.SBTTL	$WRITE	-- WRITE NEXT VIRTUAL BLOCK
   1695					;+
   1696					; WRITE THE NEXT BLOCK TO THE OUTPUT FILE. IF END-OF-FILE, THEN
   1697					; EXTEND THE FILE AND TRY TO WRITE THE BLOCK AGAIN.
   1698					;
   1699					; INPUTS:
   1700					;	.SYOBF	- BLOCK OF "S.YOL" BYTES TO WRITE.
   1701					;
   1702					; OUTPUTS:
   1703					;	.SYOBA	- ADDRESS OF NEW BUFFER TO FILL
   1704					;	.SYOBC	- SIZE OF BUFFER IN BYTES.
   1705					;	CARRY IS SET ON WRITE OR EXTEND ERROR AND MESSAGE IS DISPLAYED.
   1706					;-
   1707
   1708	002440				$WRITE::QIOW$S	#IO.WVB,#SYOLUN,#1,,#.SYSTA,,<#.SYOBF,#S.YOL,,.SYOVB,.SYOVB+2>
	002440	013746 	002222'			MOV	.SYOVB+2,-(SP)
	002444	013746 	002220'			MOV	.SYOVB,-(SP)
	002450	005046 				CLR	-(SP)
	002452	012746 	001000 			MOV	#S.YOL,-(SP)
	002456	012746 	002224'			MOV	#.SYOBF,-(SP)
	002462	005046 				CLR	-(SP)
	002464	012746 	001132'			MOV	#.SYSTA,-(SP)
	002470	005046 				CLR	-(SP)
	002472	112716 	000001 			MOVB	#1,(SP)
	002476	012746 	000005 			MOV	#SYOLUN,-(SP)
	002502	012746 	000000G			MOV	#IO.WVB,-(SP)
	002506	012746 				MOV	(PC)+,-(SP)
	002510	   003 	   013 			.BYTE	3,$$$T1
	002512	104375 				EMT	375
   1709	002514	103427 				BCS	20$
   1710	002516	105737 	001132'			TSTB	.SYSTA
   1711	002522	002414 				BLT	10$		; WRITE FAILED.
   1712	002524	062737 	000001 	002222'		ADD	#1,.SYOVB+2	; SET UP FOR NEXT BLOCK.
   1713	002532	005537 	002220'			ADC	.SYOVB		; (CARRY SHOULD BE CLEAR)
   1714	002536	012737 	002224'	002174'		MOV	#.SYOBF,.SYOBA	; RESET BUFFER ADDRESS
   1715	002544	012737 	001000 	002176'		MOV	#S.YOL,.SYOBC	; AND BYTE COUNT.
   1716	002552					RETURN
	002552	000207 				 RTS	PC
   1717
   1718	002554	122737 	000000G	001132'	10$:	CMPB	#IE.EOF,.SYSTA	; IS THE FILE TOO SMALL ?
   1719	002562	001004 				BNE	20$		; NO, THIS IS TRULY AN ERROR.
   1720	002564					CALL	$EXTEND		; OTHERWISE EXTEND THE FILE
	002564	004737 	000000G			 JSR	PC,$EXTEND
   1721	002570	103323 				BCC	$WRITE		; AND WRITE THE BLOCK AGAIN.
   1722	002572					RETURN
	002572	000207 				 RTS	PC
   1723
   1724	002574				20$:	PRINT	#TDWWRE		; PRINT IT.
	002574	012700 	000137'			 MOV	#TDWWRE,R0
	002600	004737 	000000G			 JSR	PC,$TTMSG
   1725	002604	000261 				SEC
   1726	002606					RETURN
	002606	000207 				 RTS	PC
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1108  13-JAN-78 10:41  PAGE 41
$WRITE	-- WRITE NEXT VIRTUAL BLOCK

   1728						.TITLE	KLIDE -- PRINT I/O ERROR MESSAGE
   1729	002610					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   1730					;
   1731					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1732					;
   1733					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1734					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1735					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1736					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1737					;
   1738					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1739					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1740					; EQUIPMENT CORPORATION.
   1741					;
   1742					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1743					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1744					;
   1745					; VERSION 05-01									; ADP01
   1746					;
   1747					; ALAN D. PECKHAM  15-APR-77
   1748					;
   1749					; MODIFIED BY:
   1750					;
   1751					; FUNCTION: THIS ROUTINE IS CALLED TO PRINT OUT THE ERROR CODE
   1752					;  IN CASE OF I/O ERROR. IT ALSO PRINTS THE DEVICE AND
   1753					;  FILE NAME ASSOCIATED TO THE ERROR.
   1754					;
   1755					; LOCAL DATA
   1756					;
   1757	000212					.PSECT	TEXT,D
   1758	000212				TDEDR:	ERROR	<DIRECTIVE ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'>	; ADP01
	000212	   077 	   040 	   104 		 .ASCIZ	\? DIRECTIVE ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'\
	000215	   111 	   122 	   105
	000220	   103 	   124 	   111
	000223	   126 	   105 	   040
	000226	   105 	   122 	   122
	000231	   117 	   122 	   040
	000234	   055 	   130 	   130
	000237	   130 	   040 	   117
	000242	   116 	   040 	   106
	000245	   111 	   114 	   105
	000250	   040 	   047 	   130
	000253	   130 	   130 	   072
	000256	   130 	   130 	   130
	000261	   130 	   130 	   130
	000264	   130 	   130 	   130
	000267	   056 	   130 	   130
	000272	   130 	   073 	   130
	000275	   130 	   130 	   130
	000300	   130 	   130 	   047
	000303	   000
   1759	000304				TDEIO:	ERROR	<I/O ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'>		; ADP01
	000304	   077 	   040 	   111 		 .ASCIZ	\? I/O ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'\
	000307	   057 	   117 	   040
	000312	   105 	   122 	   122
	000315	   117 	   122 	   040
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1108  13-JAN-78 10:41  PAGE 41-1
$WRITE	-- WRITE NEXT VIRTUAL BLOCK

	000320	   055 	   130 	   130
	000323	   130 	   040 	   117
	000326	   116 	   040 	   106
	000331	   111 	   114 	   105
	000334	   040 	   047 	   130
	000337	   130 	   130 	   072
	000342	   130 	   130 	   130
	000345	   130 	   130 	   130
	000350	   130 	   130 	   130
	000353	   056 	   130 	   130
	000356	   130 	   073 	   130
	000361	   130 	   130 	   130
	000364	   130 	   130 	   047
	000367	   000
   1760	000370				TDENSF:	ERROR	<FILE 'XXX:XXXXXXXXX.XXX;XXXXXX' NOT FOUND>			; ADP01
	000370	   077 	   040 	   106 		 .ASCIZ	\? FILE 'XXX:XXXXXXXXX.XXX;XXXXXX' NOT FOUND\
	000373	   111 	   114 	   105
	000376	   040 	   047 	   130
	000401	   130 	   130 	   072
	000404	   130 	   130 	   130
	000407	   130 	   130 	   130
	000412	   130 	   130 	   130
	000415	   056 	   130 	   130
	000420	   130 	   073 	   130
	000423	   130 	   130 	   130
	000426	   130 	   130 	   047
	000431	   040 	   116 	   117
	000434	   124 	   040 	   106
	000437	   117 	   125 	   116
	000442	   104 	   000
   1761	000444				TDEDFU:	ERROR	<DEVICE 'XXX:' FULL>
	000444	   077 	   040 	   104 		 .ASCIZ	\? DEVICE 'XXX:' FULL\
	000447	   105 	   126 	   111
	000452	   103 	   105 	   040
	000455	   047 	   130 	   130
	000460	   130 	   072 	   047
	000463	   040 	   106 	   125
	000466	   114 	   114 	   000
   1762	002610					.PSECT
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1108  13-JAN-78 10:41  PAGE 42
$IOERR	-- REPORT I/O ERROR

   1764						.SBTTL	$IOERR	-- REPORT I/O ERROR
   1765					;+
   1766					; DISPLAY AN ERROR MESSAGE ACCORDING TO THE CODES FROM THE LAST
   1767					; I/O OPERATION AND RETURN WITH THE CARRY SET.
   1768					;
   1769					; INPUTS:
   1770					;	$DSW	- DIRECTIVE ERROR CODE OR SUCCESS CODE.
   1771					;	.SYSTA	- I/O OPERATION ERROR CODE.
   1772					;
   1773					; OUTPUT:
   1774					;	THE CARRY IS SET.
   1775					;-
   1776
   1777	002610	004537 	000356'		$IOERR::JSR	R5,$RSAVE
   1778	002614	010002 				MOV	R0,R2		; SAVE FILE NAME.
   1779	002616	012701 	000212'			MOV	#TDEDR,R1	; DIRECTIVE ERROR
   1780	002622	010105 				MOV	R1,R5
   1781	002624	113700 	000000G			MOVB	$DSW,R0
   1782	002630	100421 				BMI	10$		; OR
   1783	002632	113700 	001132'			MOVB	.SYSTA,R0
   1784	002636	012701 	000370'			MOV	#TDENSF,R1	; FILE NOT FOUND
   1785	002642	010105 				MOV	R1,R5
   1786	002644	122700 	000000G			CMPB	#IE.NSF,R0
   1787	002650	001425 				BEQ	30$		; OR
   1788	002652	012701 	000444'			MOV	#TDEDFU,R1	; DEVICE FULL
   1789	002656	010105 				MOV	R1,R5
   1790	002660	122700 	000000G			CMPB	#IE.DFU,R0
   1791	002664	001433 				BEQ	50$		; OR
   1792	002666	012701 	000304'			MOV	#TDEIO,R1	; OPERATION ERROR.
   1793	002672	010105 				MOV	R1,R5
   1794	002674	122725 	000055 		10$:	CMPB	#'-,(R5)+	; FIND POSITION FOR
   1795	002700	001375 				BNE	10$		; ERROR CODE
   1796	002702	005400 				NEG	R0		; AND
   1797	002704					CALL	$TRB2O		; INSERT IN OCTAL.
	002704	004737 	023130'			 JSR	PC,$TRB2O
   1798	002710	122715 	000040 		20$:	CMPB	#' ,(R5)	; ZAP REST OF FIELD.
   1799	002714	001403 				BEQ	30$
   1800	002716	112725 	177777 			MOVB	#-1,(R5)+
   1801	002722	000772 				BR	20$
   1802	002724	122725 	000047 		30$:	CMPB	#'',(R5)+	; NOW FIND
   1803	002730	001375 				BNE	30$		; FILENAME POSITION,
   1804	002732	010200 				MOV	R2,R0		; GET FILENAME BLOCK,				; ADP01
   1805	002734					CALL	$TRB2F		; AND INSERT FILE NAME.				; ADP01
	002734	004737 	000000G			 JSR	PC,$TRB2F
   1806	002740	122725 	000047 		40$:	CMPB	#'',(R5)+	; ZAP REST OF FIELD.
   1807	002744	001410 				BEQ	80$
   1808	002746	111765 	177777 			MOVB	(PC),-1(R5)
   1809	002752	000772 				BR	40$
   1810	002754	122725 	000047 		50$:	CMPB	#'',(R5)+
   1811	002760	001375 				BNE	50$
   1812	002762					CALL	LDEIDV
	002762	004737 	003000'			 JSR	PC,LDEIDV
   1813	002766				80$:	PRINT	R1		; DISPLAY MESSAGE
	002766	010100 				 MOV	R1,R0
	002770	004737 	000000G			 JSR	PC,$TTMSG
   1814	002774	000261 				SEC			; AND RETURN WITH SHAME.
   1815	002776					RETURN
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1108  13-JAN-78 10:41  PAGE 42-1
$IOERR	-- REPORT I/O ERROR

	002776	000207 				 RTS	PC
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1108  13-JAN-78 10:41  PAGE 43
$IOERR	-- REPORT I/O ERROR

   1817					;+
   1818					; INSERT DEVICE NAME AT AREA POINTED TO BY R5.
   1819					;
   1820					; INPUTS:
   1821					;	R5	- POINTER TO BYTES TO RECIEVE STRING.
   1822					;	R2	- POINTER TO FILE NAME.
   1823					;
   1824					; OUTPUTS:
   1825					;	A 3 CHARACTER STRING IS INSERTED AND R5 IS ADVANCED BY 4 TO
   1826					;	PASS BY THE ":".
   1827					;-
   1828
   1829	003000	116225 	000014 		LDEIDV:	MOVB	14(R2),(R5)+	; INSERT DEVICE NAME
   1830	003004	116225 	000015 			MOVB	15(R2),(R5)+
   1831	003010	116215 	000016 			MOVB	16(R2),(R5)	; DEVICE UNIT
   1832	003014	152725 	000060 			BISB	#'0,(R5)+
   1833	003020	005205 				INC	R5
   1834	003022					RETURN
	003022	000207 				 RTS	PC
KLINI -- PROGRAM INITIALIZATION	MACRO M1108  13-JAN-78 10:41  PAGE 44
$IOERR	-- REPORT I/O ERROR

   1836						.TITLE	KLINI -- PROGRAM INITIALIZATION
   1837	003024					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   1838					;
   1839					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1840					;
   1841					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1842					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1843					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1844					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1845					;
   1846					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1847					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1848					; EQUIPMENT CORPORATION.
   1849					;
   1850					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1851					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1852					;
   1853					; VERSION 05-00
   1854					;
   1855					; ALAN D. PECKHAM  14-APR-77
   1856					;
   1857					; MODIFIED BY:
   1858					;
   1859					; FUNCTION: THIS MODULE ASSIGNS NEEDED I/O DEVICES, LOCATES THE SYSTEM
   1860					;  DIRECTORY, AND SETS DATA TO INDICATE INTERNAL
   1861					;  REQUESTS AND KL CONDITIONS.
   1862					;
   1863					; LOCAL MACROS
   1864					;
   1865						.MCALL	ALUN$,QIOW$S,EXIT$S,CLEF$S
   1866						.MACRO	KLIVR$ KEY,FRM,VER,EDT,NUM
   1867						.IF	B,NUM
   1868						.IF	NB,FRM
   1869						KLIVR$	\KEY,\FRM,\VER,\EDT,0
   1870						.IFF
   1871						KLIVR$	\KEY,200,\VER,\EDT,0
   1872						.ENDC
   1873						.MEXIT
   1874						.IFF
   1875						.IF	GE,VER-10
   1876						.IF	GE,EDT-10
   1877						MESSAGE	<VERSION \<KEY><FRM>\'VER'-'EDT'\<200>\ RUNNING>
   1878						.IFF
   1879						MESSAGE	<VERSION \<KEY><FRM>\'VER'-0'EDT'\<200>\ RUNNING>
   1880						.ENDC
   1881						.IFF
   1882						.IF	GE,EDT-10
   1883						MESSAGE	<VERSION \<KEY><FRM>\0'VER'-'EDT'\<200>\ RUNNING>
   1884						.IFF
   1885						MESSAGE	<VERSION \<KEY><FRM>\0'VER'-0'EDT'\<200>\ RUNNING>
   1886						.ENDC
   1887						.ENDC
   1888						.ENDC
   1889						.ENDM	KLIVR$
   1890					;
   1891					; LOCAL DATA
KLINI -- PROGRAM INITIALIZATION	MACRO M1108  13-JAN-78 10:41  PAGE 44-1
$IOERR	-- REPORT I/O ERROR

   1892					;
   1893	000674					.PSECT	DATA,D
   1894	000674				DNITTI:	ALUN$	TTILUN,TT,0
	000674	   007 	   004 			.BYTE	7,4
	000676	000001 				.WORD	TTILUN
	000700	   124 				.ASCII	/T/
	000701	   124 				.ASCII	/T/
	000702	000000 				.WORD	0
   1895	000704				DNITTO:	ALUN$	TTOLUN,TT,0
	000704	   007 	   004 			.BYTE	7,4
	000706	000002 				.WORD	TTOLUN
	000710	   124 				.ASCII	/T/
	000711	   124 				.ASCII	/T/
	000712	000000 				.WORD	0
   1897	000714				DNILPO:	ALUN$	LPOLUN,TT,0
	000714	   007 	   004 			.BYTE	7,4
	000716	000003 				.WORD	LPOLUN
	000720	   124 				.ASCII	/T/
	000721	   124 				.ASCII	/T/
	000722	000000 				.WORD	0
   1899	000724				DNISYI:	ALUN$	SYILUN,SY,0
	000724	   007 	   004 			.BYTE	7,4
	000726	000004 				.WORD	SYILUN
	000730	   123 				.ASCII	/S/
	000731	   131 				.ASCII	/Y/
	000732	000000 				.WORD	0
   1900	000734				DNISYO:	ALUN$	SYOLUN,SY,0
	000734	   007 	   004 			.BYTE	7,4
	000736	000005 				.WORD	SYOLUN
	000740	   123 				.ASCII	/S/
	000741	   131 				.ASCII	/Y/
	000742	000000 				.WORD	0
   1901	000744				DNISYF:	ALUN$	SYFLUN,SY,0
	000744	   007 	   004 			.BYTE	7,4
	000746	000006 				.WORD	SYFLUN
	000750	   123 				.ASCII	/S/
	000751	   131 				.ASCII	/Y/
	000752	000000 				.WORD	0
   1902	000471					.PSECT	TEXT,D
   1903	000471				TNINDV:	ERROR	<CANNOT GET DEVICES>
	000471	   077 	   040 	   103 		 .ASCIZ	\? CANNOT GET DEVICES\
	000474	   101 	   116 	   116
	000477	   117 	   124 	   040
	000502	   107 	   105 	   124
	000505	   040 	   104 	   105
	000510	   126 	   111 	   103
	000513	   105 	   123 	   000
   1904	000516				TNIN55:	ERROR	<CANNOT FIND [5,5] DIRECTORY>
	000516	   077 	   040 	   103 		 .ASCIZ	\? CANNOT FIND [5,5] DIRECTORY\
	000521	   101 	   116 	   116
	000524	   117 	   124 	   040
	000527	   106 	   111 	   116
	000532	   104 	   040 	   133
	000535	   065 	   054 	   065
	000540	   135 	   040 	   104
	000543	   111 	   122 	   105
	000546	   103 	   124 	   117
KLINI -- PROGRAM INITIALIZATION	MACRO M1108  13-JAN-78 10:41  PAGE 44-2
$IOERR	-- REPORT I/O ERROR

	000551	   122 	   131 	   000
   1905	000554				TNIPRI:	ERROR	<CANNOT RUN KLINIT WHILE KL IS IN PRIMARY PROTOCOL>
	000554	   077 	   040 	   103 		 .ASCIZ	\? CANNOT RUN KLINIT WHILE KL IS IN PRIMARY PROTOCOL\
	000557	   101 	   116 	   116
	000562	   117 	   124 	   040
	000565	   122 	   125 	   116
	000570	   040 	   113 	   114
	000573	   111 	   116 	   111
	000576	   124 	   040 	   127
	000601	   110 	   111 	   114
	000604	   105 	   040 	   113
	000607	   114 	   040 	   111
	000612	   123 	   040 	   111
	000615	   116 	   040 	   120
	000620	   122 	   111 	   115
	000623	   101 	   122 	   131
	000626	   040 	   120 	   122
	000631	   117 	   124 	   117
	000634	   103 	   117 	   114
	000637	   000
   1906	000640				TNIVER:	KLIVR$	KLI$$K,KLI$$F,KLI$$V,KLI$$E
	000640	   126 	   105 	   122 		 .ASCIZ	\VERSION \<126><102>\06-07\<200>\ RUNNING\
	000643	   123 	   111 	   117
	000646	   116 	   040 	   126
	000651	   102 	   060 	   066
	000654	   055 	   060 	   067
	000657	   200 	   040 	   122
	000662	   125 	   116 	   116
	000665	   111 	   116 	   107
	000670	   000
   1907	003024					.PSECT
KLINI -- PROGRAM INITIALIZATION	MACRO M1108  13-JAN-78 10:41  PAGE 45
$INIT	-- PROGRAM INITIALIZATION

   1909						.SBTTL	$INIT	-- PROGRAM INITIALIZATION
   1910					;+
   1911					;	GET KL FUNCTION WORD
   1912					;-
   1913	003024	105037 	000022'		$INIT::	CLRB	.DLGSW		; CLEAR DIALOG SWITCH.
   1914	003030	013737 	000000G	000036'		MOV	.KLIWD,.KLISV	; SAVE .KLIWD
   1915	003036	001003 				BNE	10$
   1916	003040	005037 	000000G			CLR	.DATE3		; CLEAR .DATE3 IF .KLIWD=0
   1917	003044	000404 				BR	20$
   1918	003046	005037 	000000G		10$:	CLR	.KLIWD		; CLEAR .KLIWD TO AVOID DOING THIS AGAIN
   1919	003052	105337 	000022'			DECB	.DLGSW		; AND INDICATE INTERNAL PATH TO BE TAKEN.
   1920					;+
   1921					;	ASSIGN LOGICAL UNIT NUMBERS (LUN) TO DEVICES
   1922					;-
   1923	003056				20$:	DIR$	#DNITTI		; SET TTILUN AS TT0:
	003056	012746 	000674'			MOV	#DNITTI,-(SP)
	003062	104375 				EMT	375
   1924	003064	103424 				BCS	30$
   1925	003066					DIR$	#DNITTO		; SET TTOLUN AS TT0:
	003066	012746 	000704'			MOV	#DNITTO,-(SP)
	003072	104375 				EMT	375
   1926	003074	103420 				BCS	30$
   1928	003076					DIR$	#DNILPO		; SET LPOLUN AS LP0:
	003076	012746 	000714'			MOV	#DNILPO,-(SP)
	003102	104375 				EMT	375
   1929	003104	103414 				BCS	30$
   1931	003106					DIR$	#DNISYI		; SET SYILUN AS SY0:
	003106	012746 	000724'			MOV	#DNISYI,-(SP)
	003112	104375 				EMT	375
   1932	003114	103410 				BCS	30$
   1933	003116					DIR$	#DNISYO		; SET SYOLUN AS SY0:
	003116	012746 	000734'			MOV	#DNISYO,-(SP)
	003122	104375 				EMT	375
   1934	003124	103404 				BCS	30$
   1935	003126					DIR$	#DNISYF		; SET SYFLUN AS SY0:
	003126	012746 	000744'			MOV	#DNISYF,-(SP)
	003132	104375 				EMT	375
   1936	003134	103007 				BCC	40$
   1937	003136				30$:	PRINT	#TNINDV		; CAN'T GET DEVICES
	003136	012700 	000471'			 MOV	#TNINDV,R0
	003142	004737 	000000G			 JSR	PC,$TTMSG
   1938	003146					EXIT$S			; WE'RE THROUGH.
	003146	012746 				MOV	(PC)+,-(SP)
	003150	   063 	   001 			.BYTE	51.,1
	003152	104375 				EMT	375
   1939					;+
   1940					;	FIND DIRECTORY FILE FROM MASTER FILE DIRECTORY
   1941					;-
   1942	003154				40$:	QIOW$S	#IO.FNA,#SYILUN,#1,,#.SYSTA,,<,,,,,#.SYFNB>
	003154	012746 	003224'			MOV	#.SYFNB,-(SP)
	003160	005046 				CLR	-(SP)
	003162	005046 				CLR	-(SP)
	003164	005046 				CLR	-(SP)
	003166	005046 				CLR	-(SP)
	003170	005046 				CLR	-(SP)
	003172	005046 				CLR	-(SP)
	003174	012746 	001132'			MOV	#.SYSTA,-(SP)
KLINI -- PROGRAM INITIALIZATION	MACRO M1108  13-JAN-78 10:41  PAGE 45-1
$INIT	-- PROGRAM INITIALIZATION

	003200	005046 				CLR	-(SP)
	003202	112716 	000001 			MOVB	#1,(SP)
	003206	012746 	000004 			MOV	#SYILUN,-(SP)
	003212	012746 	000000G			MOV	#IO.FNA,-(SP)
	003216	012746 				MOV	(PC)+,-(SP)
	003220	   003 	   014 			.BYTE	3,$$$T1
	003222	104375 				EMT	375
   1943	003224	103403 				BCS	50$
   1944	003226	105737 	001132'			TSTB	.SYSTA
   1945	003232	002007 				BGE	60$
   1946	003234				50$:	PRINT	#TNIN55		; NO DIRECTORY...
	003234	012700 	000516'			 MOV	#TNIN55,R0
	003240	004737 	000000G			 JSR	PC,$TTMSG
   1947	003244					EXIT$S
	003244	012746 				MOV	(PC)+,-(SP)
	003246	   063 	   001 			.BYTE	51.,1
	003250	104375 				EMT	375
   1948	003252	013737 	003224'	003250'	60$:	MOV	.SYFNB+0,.SYFNB+24 ; MOVE UP DIRECTORY FID.
   1949	003260	013737 	003226'	003252'		MOV	.SYFNB+2,.SYFNB+26
   1950	003266	013737 	003230'	003254'		MOV	.SYFNB+4,.SYFNB+30
   1951					;+
   1952					;	MAKE SURE SECONDARY PROTOCOL IS RUNNING
   1953					;-
   1954	003274	105737 	000022'			TSTB	.DLGSW		; IF NOT INTERNAL REQUEST
   1955	003300	002416 				BLT	70$
   1956	003302	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ; CHECK CURRENT PROTOCOL.
   1957	003310	001412 				BEQ	70$		; IF PRIMARY,
   1958	003312	032737 	000006 	000000G		BIT	#6,.FEMOD	; AND CONSOLE IS IN
   1959	003320	001006 				BNE	70$		; OPERATOR MODE, THEN
   1960	003322					PRINT	#TNIPRI		; REPRIMAND OPERATOR
	003322	012700 	000554'			 MOV	#TNIPRI,R0
	003326	004737 	000000G			 JSR	PC,$TTMSG
   1961	003332	000137 	000252'			JMP	$EXIT		; AND DIE.
   1962	003336				70$:	PRINT	#TNIVER		; HELLO, OPERATOR !
	003336	012700 	000640'			 MOV	#TNIVER,R0
	003342	004737 	000000G			 JSR	PC,$TTMSG
   1963	003346					RETURN
	003346	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 46
$INIT	-- PROGRAM INITIALIZATION

   1965						.TITLE	KLIQS -- DIALOG ENTRANCE QUESTION
   1966	003350					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   1967
   1968					;
   1969					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1970					;
   1971					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1972					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1973					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1974					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1975					;
   1976					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1977					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1978					; EQUIPMENT CORPORATION.
   1979					;
   1980					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1981					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1982					;
   1983					; VERSION 05-01									; ADP01
   1984
   1985					;
   1986					; ALAN D. PECKHAM  14-APR-77
   1987					;
   1988					; MODIFIED BY:
   1989					;
   1990					; FUNCTION: THIS DIALOG QUESTION DETERMINES IF THE OPERATOR
   1991					;  WANTS TO GO THROUGH THE DIALOG QUESTIONS OR FOLLOW
   1992					;  THE DEFAULT PATH BY ASSUMING THE DEFAULT ANSWER TO
   1993					;  ALL QUESTIONS.
   1994					;
   1995					; LOCAL VARIABLES
   1996					;
   1997	000754					.PSECT	DATA,D
   1998	000754	000000 	000000 	000000 	DQSCBF:	.WORD	0,0,0,0,0,0	;HOLDING AREA FOR C-RAM WORD ZERO.
	000762	000000 	000000 	000000
   1999	000770	000000 	000460 	000000 	DQSCF3:	.WORD	0,460,0,0,0,0	;C-RAM WORD WITH COND FIELD = 3.
	000776	000000 	000000 	000000
   2000	001004				DQSAPR:	WD36$	0 0		;HOLDING AREA FOR RH(APRID)
	001004	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001007	   000 	   000 			 .BYTE	BY$$3,BY$$4
   2001	001011	   377 			DQSFLG:	.BYTE	-1		;AVOID RECHECKING HARDWARE OPTIONS.
   2002						.EVEN
   2003	000671					.PSECT	TEXT,D
   2004	000671				TQSDLG:	MESSAGE	<ENTER DIALOG [NO,YES,EXIT,BOOT]?>
	000671	   105 	   116 	   124 		 .ASCIZ	\ENTER DIALOG [NO,YES,EXIT,BOOT]?\
	000674	   105 	   122 	   040
	000677	   104 	   111 	   101
	000702	   114 	   117 	   107
	000705	   040 	   133 	   116
	000710	   117 	   054 	   131
	000713	   105 	   123 	   054
	000716	   105 	   130 	   111
	000721	   124 	   054 	   102
	000724	   117 	   117 	   124
	000727	   135 	   077 	   000
   2005	000732				TQSSYN:	MESSAGE	<COMMAND SYNTAX ERROR>
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 46-1
$INIT	-- PROGRAM INITIALIZATION

	000732	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	000735	   115 	   101 	   116
	000740	   104 	   040 	   123
	000743	   131 	   116 	   124
	000746	   101 	   130 	   040
	000751	   105 	   122 	   122
	000754	   117 	   122 	   000
   2006	003350					.PSECT
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 47
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2008						.SBTTL	$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED
   2009
   2010	003350	105737 	000022'		$DLGEN::TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   2011	003354	002437 				BLT	30$		; TAKE INTERNAL PATH.
   2012	003356	105037 	000022'			CLRB	.DLGSW		; RESET CONTROL SWITCH.
   2013	003362				10$:	PRINT	#TQSDLG		; ASK QUESTION.
	003362	012700 	000671'			 MOV	#TQSDLG,R0
	003366	004737 	000000G			 JSR	PC,$TTMSG
   2014	003372					CALL	$TTRD		; READ ANSWER
	003372	004737 	000000G			 JSR	PC,$TTRD
   2015	003376	012705 	000732'			MOV	#.TTIBF,R5
   2016	003402	105715 				TSTB	(R5)		;  CR ?
   2017	003404	001421 				BEQ	20$		; YES, TREAT AS DEFAULT
   2018	003406	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   2019	003412	001416 				BEQ	20$		; TAKE DEFAULT DIALOG PATH.
   2020	003414	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   2021	003420	001415 				BEQ	30$		; ASK NEXT QUESTION.
   2022	003422	022715 	054105 			CMP	#"EX,(R5)	;  [EXIT] ?
   2023	003426	001446 				BEQ	90$		; EXIT FROM KLINIT.
   2024	003430	022715 	047502 			CMP	#"BO,(R5)	;  [BOOT] ?
   2025	003434	001413 				BEQ	40$		; LOAD AND START BOOT.
   2026	003436				80$:	PRINT	#TQSSYN		; SOME MISTAKE....
	003436	012700 	000732'			 MOV	#TQSSYN,R0
	003442	004737 	000000G			 JSR	PC,$TTMSG
   2027	003446	000745 				BR	10$		; ASK QUESTION AGAIN.
   2028	003450	105237 	000022'		20$:	INCB	.DLGSW		; INDICATE DEFAULT PATH
   2029	003454				30$:	CALL	LQSHDW		; GET HARDWARE OPTIONS
	003454	004737 	003574'			 JSR	PC,LQSHDW
   2030	003460	000137 	000000G			JMP	$DLGRM		; AND START IT.
   2031	003464	105037 	000027'		40$:	CLRB	.DBSW
   2032	003470	105037 	000023'			CLRB	.UFNSW		; USE DEFAULT FILE				; ADP01
   2033	003474					CALL	LQSBPS		; IF OPERAND FOLLOWS
	003474	004737 	003550'			 JSR	PC,LQSBPS
   2034	003500	001415 				BEQ	50$		; THEN
   2035	003502	012700 	001104'			MOV	#.USRFN,R0	; GET FILENAME BLOCK
   2036	003506	012701 				MOV	(PC)+,R1
   2037	003510	021402 				.RAD50	/EXB/		; SET DEFAULT EXTENSION
   2038	003512	010160 	000006 			MOV	R1,6(R0)
   2039	003516					CALL	$TRF2B		; AND PARSE OUT FILE NAME.
	003516	004737 	000000G			 JSR	PC,$TRF2B
   2040	003522	103745 				BCS	80$
   2041	003524	105715 				TSTB	(R5)		; IF NOT TERMINATED PROPERLY
   2042	003526	001343 				BNE	80$		; TELL HIM SO.
   2043	003530	105237 	000023'			INCB	.UFNSW		; INDICATED FILE NAME SPECIFIED.
   2044	003534				50$:	CALL	LQSHDW		; GET HARDWARE OPTIONS
	003534	004737 	003574'			 JSR	PC,LQSHDW
   2045	003540	000137 	000150'			JMP	$CFGBT		; AND GO LOAD BOOT.
   2046	003544	000137 	000252'		90$:	JMP	$EXIT		; EXIT FROM KLINIT.
   2047
   2048					;+
   2049					; BYPASS CHARACTERS TO END OF LINE OR PAST CONTIGUOUS SET OF SPACES.
   2050					;-
   2051
   2052	003550	105715 			LQSBPS:	TSTB	(R5)		; IF END OF LINE
   2053	003552	001407 				BEQ	90$		; THEN QUIT
   2054	003554	122725 	000040 			CMPB	#' ,(R5)+	; OTHERWISE LOOK
   2055	003560	001373 				BNE	LQSBPS		; FOR A SPACE.
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 47-1
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2056	003562	122725 	000040 		10$:	CMPB	#' ,(R5)+	; THEN BYPASS
   2057	003566	001775 				BEQ	10$		; ANY MORE THAT FOLLOW.
   2058	003570	105745 				TSTB	-(R5)		; TEST FOR END OF LINE.
   2059	003572				90$:	RETURN
	003572	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 48
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2061					;+
   2062					; THIS SUBROUTINE CLEARS PROTOCOL, HALTS THE KL, AND DETERMINES THE
   2063					; HARDWARE FEATURES OF THE KL FOR LATER REFERENCE.
   2064					;-
   2065
   2066	003574	105237 	001011'		LQSHDW:	INCB	DQSFLG		; IF WE HAVE BEEN HERE BEFORE
   2067	003600	003043 				BGT	20$		; THEN JUST RETURN.
   2068	003602	012737 	000401 	000000G		MOV	#401,.NOERR	; TELL RSX20F NOT TO INTERRUPT
   2069	003610					CALL	..DTSP		; AND TURN OFF PROTOCOLS.
	003610	004737 	000000G			 JSR	PC,..DTSP
   2070	003614	012700 	010000 			MOV	#.CLRUN,R0	; HALT THE KL IF RUNNING
   2071	003620					CALL	$DFXC
	003620	004737 	022006'			 JSR	PC,$DFXC
   2072	003624	103431 				BCS	20$
   2073	003626	012700 	001004'			MOV	#DQSAPR,R0	; GET HARDWARE OPTIONS BY
   2074	003632					CALL	LQSHWO		; OBTAINING RH(APRID)
	003632	004737 	003712'			 JSR	PC,LQSHWO
   2075	003636	103424 				BCS	20$
   2076	003640	105337 	000033'			DECB	.CASW		; ASSUME NO CACHE
   2077	003644	132737 	000001 	001006'		BITB	#BIT0,DQSAPR+2	; AND IF THERE IS
   2078	003652	001402 				BEQ	10$
   2079	003654	105437 	000033'			NEGB	.CASW		; THEN RECORD IT.
   2080	003660	132737 	000040 	001005'	10$:	BITB	#BIT5,DQSAPR+1	; CHECK CPU TYPE ENCODING..
   2081	003666	001010 				BNE	20$		; ABORT IF ERRONEOUS.
   2082	003670	105337 	000034'			DECB	.EASW		; ASSUME A MODEL A CPU
   2083	003674	132737 	000100 	001005'		BITB	#BIT6,DQSAPR+1	; AND IF MODEL B
   2084	003702	001402 				BEQ	20$		; THEN
   2085	003704	105437 	000034'			NEGB	.EASW		; THERE IS EXTENDED ADDRESSING.
   2086	003710				20$:	RETURN
	003710	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1108  13-JAN-78 10:41  PAGE 49
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2088					;+
   2089					; SPECIAL ROUTINE TO GET LOWER HARDWARE HALF OF APRID WITHOUT
   2090					; DESTROYING REGISTERS. THIS ROUTINE IS HAIRY BECAUSE IT MODIFIES
   2091					; C-RAM LOCATION ZERO FOR A SHORT TIME AND THEN RESTORES IT TO ITS
   2092					; ORIGINAL CONTENTS.
   2093					;
   2094					; INPUTS:
   2095					;	R0	- ADDRESS OF 36 BIT BUFFER.
   2096					;
   2097					; OUTPUT:
   2098					;	(R0)	- RECIEVES RH(APRID) WORD.
   2099					;	CARRY IS SET IF ERROR OCCURS.
   2100					;-
   2101
   2102	003712	010002 			LQSHWO:	MOV	R0,R2
   2103	003714					CALL	$KLMR		; CLEAR THE WORLD.
	003714	004737 	022452'			 JSR	PC,$KLMR
   2104	003720	103435 				BCS	90$
   2105	003722	012701 	000754'			MOV	#DQSCBF,R1	; HOLDING AREA FOR CONTENTS OF C-RAM 0
   2106	003726	005000 				CLR	R0		; READ C-RAM LOCATION ZERO.
   2107	003730					CALL	$RCRAM
	003730	004737 	010630'			 JSR	PC,$RCRAM
   2108	003734	103427 				BCS	90$
   2109	003736	012701 	000770'			MOV	#DQSCF3,R1	; NOW WRITE WORD WITH COND FIELD = 3
   2110	003742					CALL	$WCRAM
	003742	004737 	010350'			 JSR	PC,$WCRAM
   2111	003746	103415 				BCS	80$
   2112	003750	012700 	003000 			MOV	#.SECLK,R0	; STEP THE EBOX TWICE.
   2113	003754					CALL	$DFXC
	003754	004737 	022006'			 JSR	PC,$DFXC
   2114	003760	103410 				BCS	80$
   2115	003762					CALL	$DFXC
	003762	004737 	022006'			 JSR	PC,$DFXC
   2116	003766	103405 				BCS	80$
   2117	003770	010201 				MOV	R2,R1		; NOW READ THE AR.
   2118	003772	012700 	120000 			MOV	#<120*1000>,R0
   2119	003776					CALL	$DFRD
	003776	004737 	021502'			 JSR	PC,$DFRD
   2120	004002	012701 	000754'		80$:	MOV	#DQSCBF,R1	; RESTORE C-RAM LOCATION ZERO.
   2121	004006	005000 				CLR	R0
   2122	004010					CALLR	$WCRAM
	004010	000137 	010350'			 JMP	$WCRAM
   2123	004014				90$:	RETURN
	004014	000207 				 RTS	PC
KLIQC -- ASK CACHE QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 50
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2125						.TITLE	KLIQC -- ASK CACHE QUESTIONS
   2126	004016					IDENT$	5,0
						.IDENT	/005000/
   2127					;
   2128					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2129					;
   2130					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2131					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2132					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2133					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2134					;
   2135					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2136					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2137					; EQUIPMENT CORPORATION.
   2138					;
   2139					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2140					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2141					;
   2142					; VERSION 05-00
   2143					;
   2144					; ALAN D. PECKHAM  14-APR-77
   2145					;
   2146					; MODIFIED BY:
   2147					;
   2148					; FUNCTION: IF THERE IS CACHE, THIS MODULE DETERMINES HOW IT IS TO BE
   2149					;  LOADED AND WHETHER IT IS TO BE ENABLED.
   2150					;
   2152					; LOCAL DATA
   2153					;
   2154	000757					.PSECT	TEXT,D
   2155	000757				TQCACH:	MESSAGE	<RECONFIGURE CACHE [FILE,ALL,YES,NO]?>
	000757	   122 	   105 	   103 		 .ASCIZ	\RECONFIGURE CACHE [FILE,ALL,YES,NO]?\
	000762	   117 	   116 	   106
	000765	   111 	   107 	   125
	000770	   122 	   105 	   040
	000773	   103 	   101 	   103
	000776	   110 	   105 	   040
	001001	   133 	   106 	   111
	001004	   114 	   105 	   054
	001007	   101 	   114 	   114
	001012	   054 	   131 	   105
	001015	   123 	   054 	   116
	001020	   117 	   135 	   077
	001023	   000
   2156	001024				TQCCEN:	MESSAGE	<ENABLE WHICH CACHES [ALL,NONE,0-3]?>
	001024	   105 	   116 	   101 		 .ASCIZ	\ENABLE WHICH CACHES [ALL,NONE,0-3]?\
	001027	   102 	   114 	   105
	001032	   040 	   127 	   110
	001035	   111 	   103 	   110
	001040	   040 	   103 	   101
	001043	   103 	   110 	   105
	001046	   123 	   040 	   133
	001051	   101 	   114 	   114
	001054	   054 	   116 	   117
	001057	   116 	   105 	   054
	001062	   060 	   055 	   063
	001065	   135 	   077 	   000
KLIQC -- ASK CACHE QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 50-1
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   2157	001070				TQCSYN:	MESSAGE	<COMMAND SYNTAX ERROR>
	001070	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	001073	   115 	   101 	   116
	001076	   104 	   040 	   123
	001101	   131 	   116 	   124
	001104	   101 	   130 	   040
	001107	   105 	   122 	   122
	001112	   117 	   122 	   000
   2158	004016					.PSECT
KLIQC -- ASK CACHE QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 51
$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED

   2160						.SBTTL	$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED
   2161
   2162	004016	105737 	000033'		$DLGCA::TSTB	.CASW		; IF THERE IS NO CACHE
   2163	004022	002452 				BLT	40$		; THEN GO ON TO NEXT QUESTION.
   2164	004024	105037 	000025'			CLRB	.DCSW		; RESET CACHE CONTROL SWITCH.
   2165	004030	105737 	000022'			TSTB	.DLGSW		; DEFAULT PATH TO BE TAKEN ?
   2166	004034	003055 				BGT	70$		; YES, RECONFIGURE CACHE.
   2167	004036	002440 				BLT	30$		; INTERNAL PATH TO BE TAKEN.
   2168	004040				10$:	PRINT	#TQCACH		; ASK IF CACHE IS TO BE CONFIGURED
	004040	012700 	000757'			 MOV	#TQCACH,R0
	004044	004737 	000000G			 JSR	PC,$TTMSG
   2169	004050					CALL	$TTRD		; AND READ ANSWER.
	004050	004737 	000000G			 JSR	PC,$TTRD
   2170	004054	012705 	000732'			MOV	#.TTIBF,R5
   2171	004060	105715 				TSTB	(R5)		;  CR ?
   2172	004062	001442 				BEQ	70$		; GIVE HIM LAST CONFIGURATION.
   2173	004064	022715 	044506 			CMP	#"FI,(R5)	;  [FILE] ?
   2174	004070	001437 				BEQ	70$		; GIVE HIM LAST CONFIGURATION.
   2175	004072	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   2176	004076	001432 				BEQ	60$		; GIVE HIM ALL CACHE.
   2177	004100	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   2178	004104	001433 				BEQ	LQCCM		; GO ON TO NEXT QUESTION.
   2179	004106	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   2180	004112	001416 				BEQ	40$		; IGNORE CACHE.
   2181	004114	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   2182	004120	001405 				BEQ	20$		; GO TO RAM QUESTION.
   2183	004122					PRINT	#TQCSYN		; MUST BE SOME MISTAKE...
	004122	012700 	001070'			 MOV	#TQCSYN,R0
	004126	004737 	000000G			 JSR	PC,$TTMSG
   2184	004132	000742 				BR	10$		; ASK QUESTION AGAIN.
   2185	004134	000137 	000000G		20$:	JMP	$DLGRM		; BACK UP TO RAM QUESTION.
   2186	004140	032737 	000000G	000036'	30$:	BIT	#KL.LCA,.KLISV	; INTERNAL REQUEST MADE ?
   2187	004146	001002 				BNE	50$		; YES, RECONFIGURE CACHE.
   2188	004150	000137 	004352'		40$:	JMP	$DLGMM		; BYPASS CACHE CONFIGURATION.
   2189	004154	032737 	000000G	000036'	50$:	BIT	#KL.CFL,.KLISV	; IF NOT TO GET FROM FILE
   2190	004162	001402 				BEQ	70$		; THEN
   2191	004164	105337 	000025'		60$:	DECB	.DCSW		; INDICATE TO USE ALL CACHES AND
   2192	004170	000137 	000022'		70$:	JMP	$CFGCA		; GO TO CONFIGURE CACHE.
KLIQC -- ASK CACHE QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 52
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

   2194						.SBTTL	LQCCM	-- ASK WHICH CACHES TO CONFIGURE
   2195
   2196	004174				LQCCM:	PRINT	#TQCCEN		;ASK WHICH CACHES HE WANTS
	004174	012700 	001024'			 MOV	#TQCCEN,R0
	004200	004737 	000000G			 JSR	PC,$TTMSG
   2197	004204					CALL	$TTRD		;AND GET HIS ANSWER.
	004204	004737 	000000G			 JSR	PC,$TTRD
   2198	004210	012705 	000732'			MOV	#.TTIBF,R5
   2199	004214	005004 				CLR	R4		;INITIALIZE CACHE COUNTER.
   2200	004216	105715 				TSTB	(R5)		; CR ?
   2201	004220	001443 				BEQ	7$		;GIVE HIM ALL CACHES.
   2202	004222	022715 	046101 			CMP	#"AL,(R5)	; [ALL] ?
   2203	004226	001440 				BEQ	7$		;GIVE HIM ALL CACHES.
   2204	004230	022715 	047516 			CMP	#"NO,(R5)	; [NONE] ?
   2205	004234	001427 				BEQ	6$		;DON'T TOUCH THE CACHE.
   2206	004236	022715 	040502 			CMP	#"BA,(R5)	; [BACKUP] ?
   2207	004242	001665 				BEQ	$DLGCA		;ASK LAST QUESTION.
   2208	004244				3$:	CALL	$TRI2B		;GET A NUMBER -
	004244	004737 	023362'			 JSR	PC,$TRI2B
   2209	004250	103433 				BCS	9$		;IS IT
   2210	004252	022700 	000004 			CMP	#4,R0		;WITHIN RANGE ?
   2211	004256	003430 				BLE	9$
   2212	004260	012701 	000041'			MOV	#.CACHN,R1	;YES, CHECK MODULE TABLE
   2213	004264	110403 				MOVB	R4,R3		;TO SEE IF GIVEN BEFORE.
   2214	004266	001403 				BEQ	5$		;OKAY - EMPTY TABLE.
   2215	004270	120021 			4$:	CMPB	R0,(R1)+
   2216	004272	001422 				BEQ	9$
   2217	004274	077303 				SOB	R3,4$
   2218	004276	105204 			5$:	INCB	R4		;ONE MORE MODULE -
   2219	004300	110011 				MOVB	R0,(R1)		;PUT IN TABLE.
   2220	004302	122725 	000054 			CMPB	#',,(R5)+	;LEGAL SEPERATOR ?
   2221	004306	001756 				BEQ	3$		;YES, GET ANOTHER NUMBER.
   2222	004310	105745 				TSTB	-(R5)		;END OF LINE ?
   2223	004312	001012 				BNE	9$		;NO, ASK QUESTION AGAIN.
   2224	004314	110437 	000040'		6$:	MOVB	R4,.NCACH	;SET NUMBER OF CACHES,
   2225	004320	105237 	000025'			INCB	.DCSW		;INDICATE CONFIGURATION SET AND
   2226	004324	000137 	000022'			JMP	$CFGCA		;GO TO CONFIGURE CACHE.
   2227	004330	105337 	000025'		7$:	DECB	.DCSW		;INDICATE TO USE ALL CACHES AND
   2228	004334	000137 	000022'			JMP	$CFGCA		;GO TO CONFIGURE CACHE.
   2229	004340				9$:	PRINT	#TQCSYN		;MUST HAVE MIS-TYPED...
	004340	012700 	001070'			 MOV	#TQCSYN,R0
	004344	004737 	000000G			 JSR	PC,$TTMSG
   2230	004350	000711 				BR	LQCCM		;ASK QUESTION AGAIN.
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 53
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

   2233						.TITLE	KLIQM -- ASK MEMORY QUESTIONS
   2234	004352					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   2235					;
   2236					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2237					;
   2238					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2239					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2240					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2241					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2242					;
   2243					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2244					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2245					; EQUIPMENT CORPORATION.
   2246					;
   2247					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2248					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2249					;
   2250					; VERSION 05-00
   2251					;
   2252					; ALAN D. PECKHAM  12-APR-77
   2253					;
   2254					; MODIFIED BY:
   2255					;
   2256					; FUNCTION: IF REQUESTED, THIS MODULE GETS ALL INFORMATION NECESSARY TO
   2257					;  CONFIGURE THE KL MEMORY.
   2258					;
   2259					; LOCAL DATA
   2260					;
   2261	001012					.PSECT	DATA,D
   2262	001012				DQMORD:	.BLKB	CTLS+1		; CONTROLLER ORDER TABLE.
   2263						.EVEN
   2264	001115					.PSECT	TEXT,D
   2265	001115				TQMCFG:	MESSAGE	<CONFIGURE KL MEMORY [FILE,ALL,YES,NO]?>
	001115	   103 	   117 	   116 		 .ASCIZ	\CONFIGURE KL MEMORY [FILE,ALL,YES,NO]?\
	001120	   106 	   111 	   107
	001123	   125 	   122 	   105
	001126	   040 	   113 	   114
	001131	   040 	   115 	   105
	001134	   115 	   117 	   122
	001137	   131 	   040 	   133
	001142	   106 	   111 	   114
	001145	   105 	   054 	   101
	001150	   114 	   114 	   054
	001153	   131 	   105 	   123
	001156	   054 	   116 	   117
	001161	   135 	   077 	   000
   2266	001164				TQMSYN:	MESSAGE	<COMMAND SYNTAX ERROR>
	001164	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	001167	   115 	   101 	   116
	001172	   104 	   040 	   123
	001175	   131 	   116 	   124
	001200	   101 	   130 	   040
	001203	   105 	   122 	   122
	001206	   117 	   122 	   000
   2268	001211				TQMCTN:	MESSAGE	<CONTROLLER NUMBER [ALL,0 - 3,EXTERNAL]?>
	001211	   103 	   117 	   116 		 .ASCIZ	\CONTROLLER NUMBER [ALL,0 - 3,EXTERNAL]?\
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 53-1
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

	001214	   124 	   122 	   117
	001217	   114 	   114 	   105
	001222	   122 	   040 	   116
	001225	   125 	   115 	   102
	001230	   105 	   122 	   040
	001233	   133 	   101 	   114
	001236	   114 	   054 	   060
	001241	   040 	   055 	   040
	001244	   063 	   054 	   105
	001247	   130 	   124 	   105
	001252	   122 	   116 	   101
	001255	   114 	   135 	   077
	001260	   000
   2272	001261				TQMCTE:	MESSAGE	<NONEXISTANT OR DUPLICATE CONTROLLER SPECIFIED>
	001261	   116 	   117 	   116 		 .ASCIZ	\NONEXISTANT OR DUPLICATE CONTROLLER SPECIFIED\
	001264	   105 	   130 	   111
	001267	   123 	   124 	   101
	001272	   116 	   124 	   040
	001275	   117 	   122 	   040
	001300	   104 	   125 	   120
	001303	   114 	   111 	   103
	001306	   101 	   124 	   105
	001311	   040 	   103 	   117
	001314	   116 	   124 	   122
	001317	   117 	   114 	   114
	001322	   105 	   122 	   040
	001325	   123 	   120 	   105
	001330	   103 	   111 	   106
	001333	   111 	   105 	   104
	001336	   000
   2274	001337				TQMNEM:	MESSAGE	<NO EXTERNAL MEMORY AVAILABLE>
	001337	   116 	   117 	   040 		 .ASCIZ	\NO EXTERNAL MEMORY AVAILABLE\
	001342	   105 	   130 	   124
	001345	   105 	   122 	   116
	001350	   101 	   114 	   040
	001353	   115 	   105 	   115
	001356	   117 	   122 	   131
	001361	   040 	   101 	   126
	001364	   101 	   111 	   114
	001367	   101 	   102 	   114
	001372	   105 	   000
   2276	001374				TQMMOD:	MESSAGE	<MEMORY MODULE [ALL,0 - 7(PER CONTROLLER)]?>
	001374	   115 	   105 	   115 		 .ASCIZ	\MEMORY MODULE [ALL,0 - 7(PER CONTROLLER)]?\
	001377	   117 	   122 	   131
	001402	   040 	   115 	   117
	001405	   104 	   125 	   114
	001410	   105 	   040 	   133
	001413	   101 	   114 	   114
	001416	   054 	   060 	   040
	001421	   055 	   040 	   067
	001424	   050 	   120 	   105
	001427	   122 	   040 	   103
	001432	   117 	   116 	   124
	001435	   122 	   117 	   114
	001440	   114 	   105 	   122
	001443	   051 	   135 	   077
	001446	   000
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 53-2
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

   2277	001447				TQMMDE:	MESSAGE	<NONEXISTANT OR DUPLICATE MODULE SPECIFIED>
	001447	   116 	   117 	   116 		 .ASCIZ	\NONEXISTANT OR DUPLICATE MODULE SPECIFIED\
	001452	   105 	   130 	   111
	001455	   123 	   124 	   101
	001460	   116 	   124 	   040
	001463	   117 	   122 	   040
	001466	   104 	   125 	   120
	001471	   114 	   111 	   103
	001474	   101 	   124 	   105
	001477	   040 	   115 	   117
	001502	   104 	   125 	   114
	001505	   105 	   040 	   123
	001510	   120 	   105 	   103
	001513	   111 	   106 	   111
	001516	   105 	   104 	   000
   2278	001521				TQMMCE:	MESSAGE	<MODULES DO NOT MATCH CONTROLLERS SPECIFIED>
	001521	   115 	   117 	   104 		 .ASCIZ	\MODULES DO NOT MATCH CONTROLLERS SPECIFIED\
	001524	   125 	   114 	   105
	001527	   123 	   040 	   104
	001532	   117 	   040 	   116
	001535	   117 	   124 	   040
	001540	   115 	   101 	   124
	001543	   103 	   110 	   040
	001546	   103 	   117 	   116
	001551	   124 	   122 	   117
	001554	   114 	   114 	   105
	001557	   122 	   123 	   040
	001562	   123 	   120 	   105
	001565	   103 	   111 	   106
	001570	   111 	   105 	   104
	001573	   000
   2280	001574				TQMI2H:	MESSAGE	<INTERLEAVE TOO HIGH FOR SWITCH SETTINGS>
	001574	   111 	   116 	   124 		 .ASCIZ	\INTERLEAVE TOO HIGH FOR SWITCH SETTINGS\
	001577	   105 	   122 	   114
	001602	   105 	   101 	   126
	001605	   105 	   040 	   124
	001610	   117 	   117 	   040
	001613	   110 	   111 	   107
	001616	   110 	   040 	   106
	001621	   117 	   122 	   040
	001624	   123 	   127 	   111
	001627	   124 	   103 	   110
	001632	   040 	   123 	   105
	001635	   124 	   124 	   111
	001640	   116 	   107 	   123
	001643	   000
   2282	004352					.PSECT
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 54
$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY

   2284						.SBTTL	$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY
   2285
   2286	004352	105037 	000026'		$DLGMM::CLRB	.DMSW		; CLEAR MEMORY CONTROL.
   2287	004356	105737 	000022'			TSTB	.DLGSW		; TEST CONFIGURATION SWITCH.
   2288	004362	003064 				BGT	90$		; USE LAST CONFIGURATION.
   2289	004364	002445 				BLT	40$		; TAKE INTERNAL PATH.
   2290	004366				10$:	PRINT	#TQMCFG		; ASK HIS OPINION.
	004366	012700 	001115'			 MOV	#TQMCFG,R0
	004372	004737 	000000G			 JSR	PC,$TTMSG
   2291	004376					CALL	$TTRD		; READ ANSWER.
	004376	004737 	000000G			 JSR	PC,$TTRD
   2292	004402	012705 	000732'			MOV	#.TTIBF,R5
   2293	004406	105715 				TSTB	(R5)		;  CR ?
   2294	004410	001451 				BEQ	90$		; USE LAST CONFIGURATION.
   2295	004412	022715 	044506 			CMP	#"FI,(R5)	;  [FILE] ?
   2296	004416	001446 				BEQ	90$		; USE LAST CONFIGURATION.
   2297	004420	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   2298	004424	001441 				BEQ	80$		; CONFIGURE ALL MEMORY.
   2299	004426	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   2300	004432	001430 				BEQ	60$		; GO ON TO NEXT QUESTION.
   2301	004434	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   2302	004440	001423 				BEQ	50$		; SKIP MEMORY CONFIGURATION.
   2303	004442	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   2304	004446	001405 				BEQ	20$		; ASK PREVIOUS QUESTION.
   2305	004450					PRINT	#TQMSYN		; UNCOORDINATED FINGERS...
	004450	012700 	001164'			 MOV	#TQMSYN,R0
	004454	004737 	000000G			 JSR	PC,$TTMSG
   2306	004460	000742 				BR	10$		; ASK QUESTION AGAIN.
   2308	004462	105737 	000033'		20$:	TSTB	.CASW		; IS CACHE AVAILABLE ?
   2309	004466	002402 				BLT	30$		; NO, GO TO RAM QUESTION.
   2310	004470	000137 	004016'			JMP	$DLGCA		; YES, ASK ABOUT CACHE.
   2311	004474	000137 	000000G		30$:	JMP	$DLGRM		; NO, GO TO RAM QUESTION.
   2315	004500	032737 	000000G	000036'	40$:	BIT	#KL.CFM,.KLISV	; INTERNAL REQUEST MADE ?
   2316	004506	001004 				BNE	70$		; YES, ANALYZE FURTHER...
   2317	004510	000137 	005536'		50$:	JMP	$DLGBT		; ASK TO LOAD BOOT.
   2318	004514	000137 	000050'		60$:	JMP	$DSPPT		; DISPLAY THE PHYSICAL CONFIGURATION.
   2319	004520	032737 	000000G	000036'	70$:	BIT	#KL.CFL,.KLISV	; IF NOT TO GET FROM FILE,
   2320	004526	001402 				BEQ	90$		; THEN
   2321	004530	105337 	000026'		80$:	DECB	.DMSW		; INDICATE TO USE ALL AND
   2322	004534	000137 	000066'		90$:	JMP	$CFGMM		; GO TO CONFIGURE MEMORY.
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 55
$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER

   2325						.SBTTL	$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER
   2326
   2327	004540				$DLGCT::CALL	LQMSAT		; SET UP ALLOCATION TABLE.
	004540	004737 	005314'			 JSR	PC,LQMSAT
   2328	004544					PRINT	#TQMCTN		; ASK QUESTION
	004544	012700 	001211'			 MOV	#TQMCTN,R0
	004550	004737 	000000G			 JSR	PC,$TTMSG
   2329	004554					CALL	$TTRD		; READ ANSWER
	004554	004737 	000000G			 JSR	PC,$TTRD
   2330	004560	012705 	000732'			MOV	#.TTIBF,R5
   2331	004564	105715 				TSTB	(R5)		;  CR ?
   2332	004566	001456 				BEQ	40$		; USE ALL CONTROLLERS.
   2333	004570	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   2334	004574	001453 				BEQ	40$		; USE ALL CONTROLLERS.
   2336	004576	022715 	054105 			CMP	#"EX,(R5)	;  [EXTERNAL] ?
   2337	004602	001436 				BEQ	30$		; USE EXTERNAL MEMORY.
   2339	004604	022715 	040502 			CMP	#"BA,(R5)	;  [BACK] ?
   2340	004610	001002 				BNE	10$		; NO
   2341	004612	000137 	004352'			JMP	$DLGMM		; YES, ASK PREVIOUS QUESTION
   2342	004616	012704 	001012'		10$:	MOV	#DQMORD,R4	; POINT TO ORDER TABLE.
   2343	004622				20$:	CALL	$TRI2B		; GET A CONTROLLER NUMBER.
	004622	004737 	023362'			 JSR	PC,$TRI2B
   2344	004626	103442 				BCS	50$		; OVERFLOW.
   2345	004630	022700 	000037 			CMP	#LCTL,R0	; WITHIN RANGE ?
   2346	004634	002437 				BLT	50$		; NO...
   2347	004636	105760 	000221'			TSTB	.CTLSW(R0)	; IS IT AVAILABLE ?
   2348	004642	001041 				BNE	60$		; NOT AVAILABLE OR ALREADY SPECIFIED.
   2349	004644	105260 	000221'			INCB	.CTLSW(R0)	; INDICATE HE WANTS IT
   2350	004650	110024 				MOVB	R0,(R4)+	; AND STICK IN ORDER TABLE.
   2351	004652	122725 	000054 			CMPB	#',,(R5)+	; IF THERE IS ANOTHER ONE
   2352	004656	001761 				BEQ	20$		; GO GET IT
   2353	004660	105745 				TSTB	-(R5)		; OTHERWISE CHECK FOR
   2354	004662	001024 				BNE	50$		; PROPER TERMINATION.
   2355	004664	112714 	177777 			MOVB	#-1,(R4)	; TERMINATE ORDER TABLE.
   2356	004670					CALL	LQMADJ		; ADJUST CONTROLLER USE INDICATORS.
	004670	004737 	004772'			 JSR	PC,LQMADJ
   2357	004674	000137 	005006'			JMP	LQMMD		; ASK ABOUT MODULE USAGE.
   2359	004700	122737 	000002 	000065'	30$:	CMPB	#2,.CTLTP+4	; IS CONTROLLER #4 A DMA20 ?
   2360	004706	001024 				BNE	70$		; NO, ASK AGAIN.
   2361	004710	105237 	000225'			INCB	.CTLSW+4	; INDICATE WE WANT IT AND
   2362	004714					CALL	LQMADJ		; ADJUST USE INDICATORS.
	004714	004737 	004772'			 JSR	PC,LQMADJ
   2363	004720	000137 	005374'			JMP	$DLGIL		; ASK ABOUT INTERLEAVING.
   2365	004724	105337 	000026'		40$:	DECB	.DMSW		; SET INDICATOR TO
   2366	004730	000137 	000066'			JMP	$CFGMM		; CONFIGURE ALL MEMORY.
   2367	004734				50$:	PRINT	#TQMSYN		; FUMBLE FINGERS...
	004734	012700 	001164'			 MOV	#TQMSYN,R0
	004740	004737 	000000G			 JSR	PC,$TTMSG
   2368	004744	000675 				BR	$DLGCT		; ASK QUESTION AGAIN.
   2369	004746				60$:	PRINT	#TQMCTE		; INVALID CONTROLLER
	004746	012700 	001261'			 MOV	#TQMCTE,R0
	004752	004737 	000000G			 JSR	PC,$TTMSG
   2370	004756	000670 				BR	$DLGCT		; ASK QUESTION AGAIN.
   2372	004760				70$:	PRINT	#TQMNEM		; NO EXTERNAL MEMORY
	004760	012700 	001337'			 MOV	#TQMNEM,R0
	004764	004737 	000000G			 JSR	PC,$TTMSG
   2373	004770	000663 				BR	$DLGCT		; ASK QUESTION AGAIN.
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 55-1
$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER

   2375
   2376	004772	012701 	000040 		LQMADJ:	MOV	#CTLS,R1
   2377	004776	105361 	000220'		10$:	DECB	.CTLSW-1(R1)	; ADJUST USE INDICATORS.
   2378	005002	077103 				SOB	R1,10$
   2379	005004					RETURN
	005004	000207 				 RTS	PC
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 56
LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)

   2381						.SBTTL	LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)
   2382
   2383	005006				LQMMD:	PRINT	#TQMMOD		; ASK QUESTION
	005006	012700 	001374'			 MOV	#TQMMOD,R0
	005012	004737 	000000G			 JSR	PC,$TTMSG
   2384	005016					CALL	$TTRD		; READ ANSWER
	005016	004737 	000000G			 JSR	PC,$TTRD
   2385	005022	012705 	000732'			MOV	#.TTIBF,R5
   2386	005026	105715 				TSTB	(R5)		;  CR ?
   2387	005030	001501 				BEQ	90$		; USE ALL MODULES.
   2388	005032	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   2389	005036	001476 				BEQ	90$		; USE ALL MODULES.
   2390	005040	022715 	040502 			CMP	#"BA,(R5)	;  [BACK] ?
   2391	005044	001002 				BNE	10$		; NO, MUST BE MODULE NUMBERS.
   2392	005046	000137 	004540'			JMP	$DLGCT		; ASK ABOUT CONTROLLERS.
   2393	005052	012704 	001012'		10$:	MOV	#DQMORD,R4	; POINT TO ORDER TABLE
   2394	005056	112403 			20$:	MOVB	(R4)+,R3	; AND GET NEXT CONTROLLER.
   2395	005060	100503 				BMI	120$		; OPERATOR ERROR.
   2396	005062	105063 	000161'			CLRB	.CTLUS(R3)	; CLEAR USE BITS
   2397	005066	112500 			30$:	MOVB	(R5)+,R0	; AND GET A MODULE NUMBER.
   2399	005070	122763 	000002 	000061'		CMPB	#2,.CTLTP(R3)	; IF IT IS A DMA20
   2400	005076	001020 				BNE	50$
   2401	005100	162700 	000060 			SUB	#'0,R0		; IT MUST BE THE INTERLEAVE FACTOR.
   2402	005104	003457 				BLE	100$		; REJECT INVALID VALUES.
   2403	005106	022700 	000003 			CMP	#3,R0
   2404	005112	003004 				BGT	40$
   2405	005114	022700 	000004 			CMP	#4,R0
   2406	005120	001051 				BNE	100$
   2407	005122	005300 				DEC	R0		; ADJUST FOR 4-WAY.
   2408	005124	126300 	000121'		40$:	CMPB	.CTLMD(R3),R0	; IS IT TOO HIGH ?
   2409	005130	002464 				BLT	130$		; IF SO, REJECT IT.
   2410	005132	110063 	000161'			MOVB	R0,.CTLUS(R3)	; SAVE INTERLEAVE MODE.
   2411	005136	000427 				BR	80$
   2413	005140	012701 	000001 		50$:	MOV	#1,R1		; FIND CONTROLLER BIT.
   2414	005144	162700 	000060 			SUB	#'0,R0
   2415	005150	100435 				BMI	100$
   2416	005152	001405 				BEQ	70$		; BIT 0
   2417	005154	022700 	000007 			CMP	#7,R0
   2418	005160	002431 				BLT	100$
   2419	005162	106301 			60$:	ASLB	R1		; OR LARGER.
   2420	005164	077002 				SOB	R0,60$
   2421	005166	130163 	000121'		70$:	BITB	R1,.CTLMD(R3)	; IS IT AVAILABLE ?
   2422	005172	001431 				BEQ	110$		; NO...
   2423	005174	130163 	000161'			BITB	R1,.CTLUS(R3)	; ALREADY SPECIFIED ?
   2424	005200	001026 				BNE	110$		; YES...
   2425	005202	150163 	000161'			BISB	R1,.CTLUS(R3)	; USE THIS MODULE.
   2426	005206	122725 	000054 			CMPB	#',,(R5)+	; IF THERE ARE MORE MODULES
   2427	005212	001725 				BEQ	30$		; THEN GO GET THEM.
   2428	005214	005305 				DEC	R5
   2429	005216	122725 	000073 		80$:	CMPB	#'; ,(R5)+	; IF THERE ARE MORE CONTROLLERS
   2430	005222	001715 				BEQ	20$		; THEN GET ANOTHER.
   2431	005224	105745 				TSTB	-(R5)		; END OF LINE ?
   2432	005226	001006 				BNE	100$		; KLUTZ...
   2433	005230	105714 				TSTB	(R4)		; CHECK IF HE FORGOT A CONTROLLER.
   2434	005232	100016 				BPL	120$		; HE'S NOT AWAKE.
   2435	005234	105237 	000026'		90$:	INCB	.DMSW		; INDICATE TABLES SET UP AND
   2436	005240	000137 	000066'			JMP	$CFGMM		; CONFIGURE THE MEMORY.
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 56-1
LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)

   2437	005244				100$:	PRINT	#TQMSYN		; CHAMPION TYPIST
	005244	012700 	001164'			 MOV	#TQMSYN,R0
	005250	004737 	000000G			 JSR	PC,$TTMSG
   2438	005254	000654 				BR	LQMMD		; ASK QUESTION AGAIN.
   2439	005256				110$:	PRINT	#TQMMCE		; MODULE SPECIFICATION ERROR
	005256	012700 	001521'			 MOV	#TQMMCE,R0
	005262	004737 	000000G			 JSR	PC,$TTMSG
   2440	005266	000647 				BR	LQMMD		; ASK QUESTION AGAIN.
   2441	005270				120$:	PRINT	#TQMMDE		; CONTROLLER COUNT ERROR
	005270	012700 	001447'			 MOV	#TQMMDE,R0
	005274	004737 	000000G			 JSR	PC,$TTMSG
   2442	005300	000642 				BR	LQMMD		; ASK QUESTION AGAIN.
   2444	005302				130$:	PRINT	#TQMI2H		; INTERLEAVE TOO HIGH
	005302	012700 	001574'			 MOV	#TQMI2H,R0
	005306	004737 	000000G			 JSR	PC,$TTMSG
   2445	005312	000635 				BR	LQMMD
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 57
LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)

   2449					;+
   2450					; SET UP ALLOCATION TABLES FOR DEFAULTS
   2451					;-
   2452
   2453	005314	012701 	000037 		LQMSAT:	MOV	#LCTL,R1
   2454	005320	105061 	000221'		10$:	CLRB	.CTLSW(R1)	; DEFAULT CONTROLLER TO USEFUL.
   2455	005324	116100 	000061'			MOVB	.CTLTP(R1),R0
   2456	005330	003412 				BLE	20$		; INVALID CONTROLLER.
   2457	005332	022700 	000005 			CMP	#T.YPL,R0
   2458	005336	002407 				BLT	20$		; INVALID CONTROLLER.
   2459	005340	105760 	000046'			TSTB	.TYPTB(R0)
   2460	005344	002404 				BLT	20$		; INVALID CONTROLLER.
   2461	005346	116161 	000121'	000161'		MOVB	.CTLMD(R1),.CTLUS(R1) ; GET MODULES OR INTERLEAVE MODE
   2462	005354	000404 				BR	30$		; AND GO TO NEXT CONTROLLER.
   2463	005356	105361 	000221'		20$:	DECB	.CTLSW(R1)	; BAD CONTROLLER WITH
   2464	005362	105061 	000161'			CLRB	.CTLUS(R1)	; NO MODULES.
   2465	005366	005301 			30$:	DEC	R1		; STEP DOWN TO
   2466	005370	002353 				BGE	10$		; CONTROLLER ZERO.
   2467	005372					RETURN
	005372	000207 				 RTS	PC
KLIQX -- ASK EXTERNAL MEMORY QU	MACRO M1108  13-JAN-78 10:41  PAGE 58
LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)

   2469						.TITLE	KLIQX -- ASK EXTERNAL MEMORY QUESTIONS
   2470	005374					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   2471					;
   2472					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2473					;
   2474					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2475					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2476					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2477					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2478					;
   2479					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2480					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2481					; EQUIPMENT CORPORATION.
   2482					;
   2483					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2484					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2485					;
   2486					; VERSION 05-00
   2487					;
   2488					; ALAN D. PECKHAM  12-APR-77
   2489					;
   2490					; FUNCTION: IF EXTERNAL MEMORY WAS EXPLICITLY SPECIFIED, THIS MODULE
   2491					;  DETERMINES HOW IT IS TO BE CONFIGURED.
   2492					;
   2494					; LOCAL DATA
   2495					;
   2496	001644					.PSECT	TEXT,D
   2498	001644				TQXINT:	MESSAGE	<INTERLEAVE KL MEMORY [4,2,1]?>
	001644	   111 	   116 	   124 		 .ASCIZ	\INTERLEAVE KL MEMORY [4,2,1]?\
	001647	   105 	   122 	   114
	001652	   105 	   101 	   126
	001655	   105 	   040 	   113
	001660	   114 	   040 	   115
	001663	   105 	   115 	   117
	001666	   122 	   131 	   040
	001671	   133 	   064 	   054
	001674	   062 	   054 	   061
	001677	   135 	   077 	   000
   2502	001702				TQXSYN:	MESSAGE	<COMMAND SYNTAX ERROR>
	001702	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	001705	   115 	   101 	   116
	001710	   104 	   040 	   123
	001713	   131 	   116 	   124
	001716	   101 	   130 	   040
	001721	   105 	   122 	   122
	001724	   117 	   122 	   000
   2503	001727				TQXI2H:	MESSAGE	<INTERLEAVE TOO HIGH FOR SWITCH SETTINGS>
	001727	   111 	   116 	   124 		 .ASCIZ	\INTERLEAVE TOO HIGH FOR SWITCH SETTINGS\
	001732	   105 	   122 	   114
	001735	   105 	   101 	   126
	001740	   105 	   040 	   124
	001743	   117 	   117 	   040
	001746	   110 	   111 	   107
	001751	   110 	   040 	   106
	001754	   117 	   122 	   040
	001757	   123 	   127 	   111
KLIQX -- ASK EXTERNAL MEMORY QU	MACRO M1108  13-JAN-78 10:41  PAGE 58-1
LQMMD	-- ASK FOR MEMORY STORAGE MODULE NUMBER(INTERNAL MEMORY)

	001762	   124 	   103 	   110
	001765	   040 	   123 	   105
	001770	   124 	   124 	   111
	001773	   116 	   107 	   123
	001776	   000
   2507	005374					.PSECT
KLIQX -- ASK EXTERNAL MEMORY QU	MACRO M1108  13-JAN-78 10:41  PAGE 59
$DLGIL	-- ASK HOW EXTERNAL MEMORY CAN BE INTERLEAVED

   2509						.SBTTL	$DLGIL	-- ASK HOW EXTERNAL MEMORY CAN BE INTERLEAVED
   2510
   2512	005374				$DLGIL::			; ASK FOR DMA20 INTERLEAVE.
   2520	005374				10$:	PRINT	#TQXINT		; ASK QUESTION
	005374	012700 	001644'			 MOV	#TQXINT,R0
	005400	004737 	000000G			 JSR	PC,$TTMSG
   2521	005404					CALL	$TTRD		; READ ANSWER
	005404	004737 	000000G			 JSR	PC,$TTRD
   2522	005410	012705 	000732'			MOV	#.TTIBF,R5
   2524	005414	012700 	000003 			MOV	#3,R0		; (DEFAULT BUS MODE)
   2528	005420	105715 				TSTB	(R5)		;  CR ?
   2534	005422	001422 				BEQ	30$		; SET FOR 4-WAY INTERLEAVE.
   2536	005424	022715 	040502 			CMP	#"BA,(R5)	;  [BACK] ?
   2537	005430	001002 				BNE	20$		; NO
   2541	005432	000137 	004540'			JMP	$DLGCT		; GO TO PREVIOUS QUESTION.
   2543	005436	112500 			20$:	MOVB	(R5)+,R0	; GET CONTROLLER NUMBER.
   2544	005440	105715 				TSTB	(R5)		;  END OF LINE ?
   2545	005442	001023 				BNE	50$		; NO, SOMETHING WRONG.
   2546	005444	162700 	000060 			SUB	#'0,R0		; IS IT A NUMBER ?
   2547	005450	003420 				BLE	50$		; NO, SOMETHING WRONG
   2548	005452	022700 	000003 			CMP	#3,R0
   2549	005456	003004 				BGT	30$
   2550	005460	022700 	000004 			CMP	#4,R0		; IF 4-WAY
   2551	005464	001012 				BNE	50$
   2552	005466	005300 				DEC	R0		; ADJUST VALUE.
   2553	005470	123700 	000125'		30$:	CMPB	.CTLMD+4,R0	; IF REQUESTED INTERLEAVE TOO HIGH
   2554	005474	002413 				BLT	60$		; REPRIMAND OPERATOR.
   2555	005476	110037 	000165'		40$:	MOVB	R0,.CTLUS+4	; SAVE HOW MEMORY IS INTERLEAVED
   2556	005502	105237 	000026'			INCB	.DMSW		; INDICATE TABLES SET UP AND
   2557	005506	000137 	000066'			JMP	$CFGMM		; DO MEMORY CONFIGURATION
   2558	005512				50$:	PRINT	#TQXSYN		; ALL THUMBS...
	005512	012700 	001702'			 MOV	#TQXSYN,R0
	005516	004737 	000000G			 JSR	PC,$TTMSG
   2559	005522	000724 				BR	10$		; ASK QUESTION AGAIN.
   2560	005524				60$:	PRINT	#TQXI2H		; PAY ATTENTION !
	005524	012700 	001727'			 MOV	#TQXI2H,R0
	005530	004737 	000000G			 JSR	PC,$TTMSG
   2561	005534	000717 				BR	10$		; ASK QUESTION AGAIN.
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1108  13-JAN-78 10:41  PAGE 61
$DLGIL	-- ASK HOW EXTERNAL MEMORY CAN BE INTERLEAVED

   2593						.TITLE	KLIQB -- ASK BOOT LOAD QUESTIONS
   2594	005536					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   2595					;
   2596					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2597					;
   2598					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2599					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2600					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2601					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2602					;
   2603					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2604					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2605					; EQUIPMENT CORPORATION.
   2606					;
   2607					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2608					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2609					;
   2610					; VERSION 05-01									; ADP01
   2611					;
   2612					; ALAN D. PECKHAM  12-APR-77
   2613					;
   2614					; MODIFIED BY:
   2615					;
   2616					; FUNCTION: THIS MODULE DETERMINES WHETHER THE BOOT IS TO BE LOADED
   2617					;  AND WHAT BOOT IS TO BE USED.
   2618					;
   2619					; LOCAL DATA
   2620					;
   2621	001777					.PSECT	TEXT,D
   2622	001777				TQBOOT:	MESSAGE	<LOAD KL BOOTSTRAP [YES,NO,FILENAME]?>
	001777	   114 	   117 	   101 		 .ASCIZ	\LOAD KL BOOTSTRAP [YES,NO,FILENAME]?\
	002002	   104 	   040 	   113
	002005	   114 	   040 	   102
	002010	   117 	   117 	   124
	002013	   123 	   124 	   122
	002016	   101 	   120 	   040
	002021	   133 	   131 	   105
	002024	   123 	   054 	   116
	002027	   117 	   054 	   106
	002032	   111 	   114 	   105
	002035	   116 	   101 	   115
	002040	   105 	   135 	   077
	002043	   000
   2623	002044				TQBSYN:	MESSAGE	<COMMAND SYNTAX ERROR>
	002044	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	002047	   115 	   101 	   116
	002052	   104 	   040 	   123
	002055	   131 	   116 	   124
	002060	   101 	   130 	   040
	002063	   105 	   122 	   122
	002066	   117 	   122 	   000
   2624	005536					.PSECT
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1108  13-JAN-78 10:41  PAGE 62
$DLGBT	-- ASK IF LOADING VBOOT IS REQUIRED

   2626						.SBTTL	$DLGBT	-- ASK IF LOADING VBOOT IS REQUIRED
   2627
   2628	005536	105037 	000027'		$DLGBT::CLRB	.DBSW		; RESET FILE SOURCE
   2629	005542	105037 	000023'			CLRB	.UFNSW		; AND FILENAME SWITCH.
   2630	005546	105737 	000022'			TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   2631	005552	003050 				BGT	8$		; LOAD DEFAULT FILE.
   2632	005554	002425 				BLT	3$		; TAKE INTERNAL PATH.
   2633	005556				1$:	PRINT	#TQBOOT		; ASK QUESTION
	005556	012700 	001777'			 MOV	#TQBOOT,R0
	005562	004737 	000000G			 JSR	PC,$TTMSG
   2634	005566					CALL	$TTRD		; READ ANSWER
	005566	004737 	000000G			 JSR	PC,$TTRD
   2635	005572	012705 	000732'			MOV	#.TTIBF,R5
   2636	005576	105715 				TSTB	(R5)		;  CR ?
   2637	005600	001435 				BEQ	8$		; LOAD DEFAULT FILE.
   2638	005602	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   2639	005606	001432 				BEQ	8$		; LOAD DEFAULT FILE.
   2640	005610	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   2641	005614	001411 				BEQ	4$		; ASK NEXT QUESTION.
   2642	005616	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   2643	005622	001010 				BNE	5$		; NO, MUST BE FILENAME...
   2644	005624	000137 	004352'			JMP	$DLGMM		; ASK TO CONFIGURE MEMORY.
   2645	005630	032737 	000000G	000036'	3$:	BIT	#KL.LVB,.KLISV	; INTERNAL REQUEST MADE ?
   2646	005636	001016 				BNE	8$		; LOAD DEFAULT FILE.
   2647	005640	000137 	005712'		4$:	JMP	$DLGEX		; ASK NEXT QUESTION.
   2648	005644	012700 	001104'		5$:	MOV	#.USRFN,R0	; GET FILENAME BLOCK,				; ADP01
   2649	005650	012701 				MOV	(PC)+,R1
   2650	005652	021402 				.RAD50	/EXB/		; SET DEFAULT EXTENSION,
   2651	005654	010160 	000006 			MOV	R1,6(R0)
   2652	005660					CALL	$TRF2B		; AND GET FILE NAME.
	005660	004737 	000000G			 JSR	PC,$TRF2B
   2653	005664	105715 				TSTB	(R5)		; IF NOT PROPERLY TERMINATED
   2654	005666	001004 				BNE	9$		; THEN INFORM THE OPERATOR.
   2655	005670	105237 	000023'			INCB	.UFNSW		; INDICATE FILE SPECIFIED.
   2656	005674	000137 	000150'		8$:	JMP	$CFGBT		; TREAT AS DEFAULT.
   2657	005700				9$:	PRINT	#TQBSYN		; ALL THUMBS...
	005700	012700 	002044'			 MOV	#TQBSYN,R0
	005704	004737 	000000G			 JSR	PC,$TTMSG
   2658	005710	000722 				BR	1$
KLIQE --  ASK EXIT QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 63
$DLGBT	-- ASK IF LOADING VBOOT IS REQUIRED

   2660						.TITLE	KLIQE --  ASK EXIT QUESTIONS
   2661	005712					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   2662					;
   2663					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2664					;
   2665					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2666					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2667					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2668					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2669					;
   2670					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2671					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2672					; EQUIPMENT CORPORATION.
   2673					;
   2674					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2675					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2676					;
   2677					; VERSION 05-00
   2678					;
   2679					; ALAN D. PECKHAM  12-APR-77
   2680					;
   2681					; MODIFIED BY:
   2682					;
   2683					; FUNCTION: THIS MODULE ALLOWS THE OPERATOR TO RESTART THE DIALOG
   2684					;  OR EXIT FROM KLINIT. IT ALSO DISPATHES INTERNAL REQUESTS FOR
   2685					;  SPECIAL KL RESTARTS SUCH AS POWER FAIL.
   2686					;
   2687					; LOCAL DATA
   2688					;
   2689	002071					.PSECT	TEXT,D
   2690	002071				TQEXIT:	MESSAGE	<EXIT [YES,RESTART]?>
	002071	   105 	   130 	   111 		 .ASCIZ	\EXIT [YES,RESTART]?\
	002074	   124 	   040 	   133
	002077	   131 	   105 	   123
	002102	   054 	   122 	   105
	002105	   123 	   124 	   101
	002110	   122 	   124 	   135
	002113	   077 	   000
   2691	002115				TQESYN:	MESSAGE	<COMMAND SYNTAX ERROR>
	002115	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	002120	   115 	   101 	   116
	002123	   104 	   040 	   123
	002126	   131 	   116 	   124
	002131	   101 	   130 	   040
	002134	   105 	   122 	   122
	002137	   117 	   122 	   000
   2692	005712					.PSECT
KLIQE --  ASK EXIT QUESTIONS	MACRO M1108  13-JAN-78 10:41  PAGE 64
$DLGEX	-- ASK WHERE TO EXIT

   2694						.SBTTL	$DLGEX	-- ASK WHERE TO EXIT
   2695
   2696	005712	105737 	000022'		$DLGEX::TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   2697	005716	003041 				BGT	50$		; NORMAL EXIT.
   2698	005720	002434 				BLT	40$		; TAKE INTERNAL PATH.
   2699	005722				10$:	PRINT	#TQEXIT		; ASK QUESTION
	005722	012700 	002071'			 MOV	#TQEXIT,R0
	005726	004737 	000000G			 JSR	PC,$TTMSG
   2700	005732					CALL	$TTRD		; READ ANSWER
	005732	004737 	000000G			 JSR	PC,$TTRD
   2701	005736	012705 	000732'			MOV	#.TTIBF,R5
   2702	005742	105715 				TSTB	(R5)		;  CR ?
   2703	005744	001426 				BEQ	50$		; NORMAL EXIT.
   2704	005746	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   2705	005752	001423 				BEQ	50$		; NORMAL EXIT.
   2706	005754	022715 	042522 			CMP	#"RE,(R5)	;  [RESTART] ?
   2707	005760	001412 				BEQ	30$		; GO TO FIRST QUESTION.
   2708	005762	022715 	040502 			CMP	#"BA,(R5)	;  [BACK] ?
   2709	005766	001405 				BEQ	20$		; ASK PREVIOUS QUESTION.
   2710	005770					PRINT	#TQESYN		; FUMBLE FINGERS...
	005770	012700 	002115'			 MOV	#TQESYN,R0
	005774	004737 	000000G			 JSR	PC,$TTMSG
   2711	006000	000750 				BR	10$		; ASK QUESTION AGAIN.
   2712	006002	000137 	005536'		20$:	JMP	$DLGBT		; ASK TO LOAD BOOT.
   2713	006006	000137 	003350'		30$:	JMP	$DLGEN		; ASK IF DIALOG NECESSARY.
   2714	006012	032737 	000000G	000036'	40$:	BIT	#KL.SPF,.KLISV	; INTERNAL REQUEST ?
   2715	006020	001002 				BNE	60$		; START KL ON POWER FAIL.
   2720	006022	000137 	000252'		50$:	JMP	$EXIT		; NORMAL EXIT FROM KLINIT
   2721	006026	000137 	013574'		60$:	JMP	$POWER		; START KL ON POWER FAIL.
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1108  13-JAN-78 10:41  PAGE 65
$DLGEX	-- ASK WHERE TO EXIT

   2726						.TITLE	KLIGC -- SET CACHE CONFIGURATION TABLES
   2727	006032					IDENT$	5,0
						.IDENT	/005000/
   2728					;
   2729					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2730					;
   2731					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2732					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2733					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2734					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2735					;
   2736					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2737					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2738					; EQUIPMENT CORPORATION.
   2739					;
   2740					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2741					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2742					;
   2743					; VERSION 05-00
   2744					;
   2745					; ALAN D. PECKHAM  12-APR-77
   2746					;
   2747					; MODIFIED BY:
   2748					;
   2749					; FUNCTION: THIS MODULE SETS UP THE CACHE CONFIGURATION TABLES
   2750					;  EITHER FROM THE CONFIGURATION FILE OR FOR ALL CACHES.
   2751					;
   2753					; LOCAL DATA
   2754					;
   2755	001054					.PSECT	DATA,D
   2756	001054	043240 	000000 	000000 	DGCFNM:	.RAD50	/KL       CFG/	; CONFIGURATION FILE NAME.
	001062	011667
   2757	001064	000000 				.WORD	0		; GET LATEST VERSION.
   2758	001066	   005 	   005 			.BYTE	5,5
   2759	001070	054523 	000000 			.WORD	"SY,0
   2760	002142					.PSECT	TEXT,D
   2761	002142				TGCNFL:	WARNING	<NO FILE - ALL CACHE BEING CONFIGURED>
	002142	   045 	   040 	   116 		 .ASCIZ	\% NO FILE - ALL CACHE BEING CONFIGURED\
	002145	   117 	   040 	   106
	002150	   111 	   114 	   105
	002153	   040 	   055 	   040
	002156	   101 	   114 	   114
	002161	   040 	   103 	   101
	002164	   103 	   110 	   105
	002167	   040 	   102 	   105
	002172	   111 	   116 	   107
	002175	   040 	   103 	   117
	002200	   116 	   106 	   111
	002203	   107 	   125 	   122
	002206	   105 	   104 	   000
   2762	006032					.PSECT
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1108  13-JAN-78 10:41  PAGE 66
$GETCA	-- SET CACHE CONFIGURATION TABLES

   2764						.SBTTL	$GETCA	-- SET CACHE CONFIGURATION TABLES
   2765					;+
   2766					; GET CACHES TO BE ENABLED FROM FILE OR SET TO CONFIGURE ALL CACHE.
   2767					;
   2768					; INPUTS:
   2769					;	.DCSW	- IF NON-NEGATIVE THEN USE LAST CONFIGURATION, OTHERWISE
   2770					;		  SET FOR ALL CACHE.
   2771					;
   2772					; OUTPUTS:
   2773					;	.NCACH	- NUMBER OF CACHES TO USE.
   2774					;	.CACHN	- NUMBERS OF THE CACHES TO BE USED.
   2775					;-
   2776
   2777	006032	105737 	000025'		$GETCA::TSTB	.DCSW		; IF LAST CONFIGURATION INDICATED
   2778	006036	002417 				BLT	20$
   2779	006040	012700 	001054'			MOV	#DGCFNM,R0	; THEN FIND CONFIGURATION FILE.
   2780	006044					CALL	$LOOKUP
	006044	004737 	000772'			 JSR	PC,$LOOKUP
   2781	006050	103030 				BCC	50$
   2782	006052	122737 	000000G	001132'		CMPB	#IE.NSF,.SYSTA	; IF NO FILE
   2783	006060	001060 				BNE	90$
   2784	006062					PRINT	#TGCNFL		; (NO FILE, OPERATOR !)
	006062	012700 	002142'			 MOV	#TGCNFL,R0
	006066	004737 	000000G			 JSR	PC,$TTMSG
   2785	006072	105237 	000025'		10$:	INCB	.DCSW		; THEN CONFIGURE ALL 4.
   2786	006076	012701 	000041'		20$:	MOV	#.CACHN,R1	; FIX TABLES
   2787	006102	005004 				CLR	R4
   2788	006104	110421 			30$:	MOVB	R4,(R1)+
   2789	006106	005204 				INC	R4
   2790	006110	022704 	000004 			CMP	#4,R4		; FOR FOUR CACHES.
   2791	006114	001373 				BNE	30$
   2792	006116	110437 	000040'			MOVB	R4,.NCACH
   2793	006122					RETURN
	006122	000207 				 RTS	PC
   2794	006124				40$:	CALL	$READS
	006124	004737 	001622'			 JSR	PC,$READS
   2795	006130	103434 				BCS	90$
   2796	006132				50$:	CALL	$READC		; GET A RECORD
	006132	004737 	001564'			 JSR	PC,$READC
   2797	006136	103431 				BCS	90$
   2798	006140	022700 	000002 			CMP	#2,R0		; IF IT IS THE CACHE RECORD,
   2799	006144	001405 				BEQ	60$		; THEN PROCESS IT.
   2800	006146	005700 				TST	R0		; IF NOT END-OF-FILE
   2801	006150	001365 				BNE	40$		; THEN GET NEW RECORD.
   2802	006152					CALL	$CLOSE		; OTHERWISE CLOSE FILE
	006152	004737 	001334'			 JSR	PC,$CLOSE
   2803	006156	000745 				BR	10$		; AND USE ALL CACHES.
   2804	006160				60$:	CALL	$READB		; PICK UP
	006160	004737 	001766'			 JSR	PC,$READB
   2805	006164	103416 				BCS	90$
   2806	006166	110004 				MOVB	R0,R4		; NUMBER OF CACHES
   2807	006170	001410 				BEQ	80$
   2808	006172	010002 				MOV	R0,R2		; AND
   2809	006174	012701 	000041'			MOV	#.CACHN,R1
   2810	006200				70$:	CALL	$READB
	006200	004737 	001766'			 JSR	PC,$READB
   2811	006204	103406 				BCS	90$
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1108  13-JAN-78 10:41  PAGE 66-1
$GETCA	-- SET CACHE CONFIGURATION TABLES

   2812	006206	110021 				MOVB	R0,(R1)+	; AND CACHE NUMBERS.
   2813	006210	077205 				SOB	R2,70$
   2814	006212	110437 	000040'		80$:	MOVB	R4,.NCACH	; SET THE NUMBER OF CACHES
   2815	006216					CALLR	$CLOSE		; AND ALL FINISHED.
	006216	000137 	001334'			 JMP	$CLOSE
   2816	006222				90$:	CALL	$PURGE		; ERROR EXIT.
	006222	004737 	001472'			 JSR	PC,$PURGE
   2817	006226	000261 				SEC
   2818	006230					RETURN
	006230	000207 				 RTS	PC
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1108  13-JAN-78 10:41  PAGE 67
$GETCA	-- SET CACHE CONFIGURATION TABLES

   2821						.TITLE	KLIGM -- SET UP MEMORY CONFIGURATION TABLES
   2822	006232					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   2823					;
   2824					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2825					;
   2826					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2827					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2828					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2829					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2830					;
   2831					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2832					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2833					; EQUIPMENT CORPORATION.
   2834					;
   2835					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2836					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2837					;
   2838					; VERSION 05-00
   2839					;
   2840					; ALAN D. PECKHAM  12-APR-77
   2841					;
   2842					; MODIFIED BY:
   2843					;
   2844					; FUNCTION: THIS MODULE SETS UP THE MEMORY CONFIGURATION TABLES TO REFLECT
   2845					;  THE LAST MEMORY CONFIGURATION OR TO USE ALL MEMORY AVAILABLE.
   2846					;
   2847					; LOCAL DATA
   2848					;
   2849	001074					.PSECT	DATA,D
   2850	001074	043240 	000000 	000000 	DGMFNM:	.RAD50	/KL       CFG/	; CONFIGURATION FILE NAME.
	001102	011667
   2851	001104	000000 				.WORD	0		; GET LATEST VERSION.
   2852	001106	   005 	   005 			.BYTE	5,5
   2853	001110	054523 	000000 			.WORD	"SY,0
   2854	002211					.PSECT	TEXT,D
   2855	002211				TGMNFL:	WARNING	<NO FILE - ALL MEMORY BEING CONFIGURED>
	002211	   045 	   040 	   116 		 .ASCIZ	\% NO FILE - ALL MEMORY BEING CONFIGURED\
	002214	   117 	   040 	   106
	002217	   111 	   114 	   105
	002222	   040 	   055 	   040
	002225	   101 	   114 	   114
	002230	   040 	   115 	   105
	002233	   115 	   117 	   122
	002236	   131 	   040 	   102
	002241	   105 	   111 	   116
	002244	   107 	   040 	   103
	002247	   117 	   116 	   106
	002252	   111 	   107 	   125
	002255	   122 	   105 	   104
	002260	   000
   2856	002261				TGMBFL:	ERROR	<FILE DOES NOT FIT PHYSICAL CONFIGURATION>
	002261	   077 	   040 	   106 		 .ASCIZ	\? FILE DOES NOT FIT PHYSICAL CONFIGURATION\
	002264	   111 	   114 	   105
	002267	   040 	   104 	   117
	002272	   105 	   123 	   040
	002275	   116 	   117 	   124
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1108  13-JAN-78 10:41  PAGE 67-1
$GETCA	-- SET CACHE CONFIGURATION TABLES

	002300	   040 	   106 	   111
	002303	   124 	   040 	   120
	002306	   110 	   131 	   123
	002311	   111 	   103 	   101
	002314	   114 	   040 	   103
	002317	   117 	   116 	   106
	002322	   111 	   107 	   125
	002325	   122 	   101 	   124
	002330	   111 	   117 	   116
	002333	   000
   2857	006232					.PSECT
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1108  13-JAN-78 10:41  PAGE 68
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

   2859						.SBTTL	$GETMM	-- SET UP MEMORY CONFIGURATION TABLES
   2860					;+
   2861					; GET THE LAST CONFIGURATION FROM THE CONFIGURATION FILE. IF THERE IS NO
   2862					; FILE, THEN CONFIGURE FOR ALL MEMORY.
   2863					;
   2864					; INPUTS:
   2865					;	.DMSW	- IF NEGATIVE, CONFIGURE ALL MEMORY, OTHERWISE GET FROM FILE.
   2866					;	.CTLTP	- TABLE OF CONTROLLER TYPES FOUND ON SBUS.
   2867					;	.CTLMD	- TABLE OF MODULE OR INTERLEAVE COMPLEMENT FOR EACH CONTROLLER.
   2868					;
   2869					; OUTPUTS:
   2870					;	.DMSW	- MADE POSITIVE IF ALL MEMORY WAS CONFIGURED (NO FILE).
   2871					;	.CTLSW	- IF NON-NEGATIVE, CONTROLLER IS TO BE USED.
   2872					;	.CTLUS	- MODULES OR INTERLEAVE TO USE.
   2873					;-
   2874
   2875	006232	012701 	000037 		$GETMM::MOV	#LCTL,R1
   2876	006236	105061 	000221'		10$:	CLRB	.CTLSW(R1)	; DEFAULT CONTROLLER TO USEFUL.
   2877	006242	116100 	000061'			MOVB	.CTLTP(R1),R0
   2878	006246	003412 				BLE	20$		; INVALID CONTROLLER.
   2879	006250	022700 	000005 			CMP	#T.YPL,R0
   2880	006254	002407 				BLT	20$		; INVALID CONTROLLER.
   2881	006256	105760 	000046'			TSTB	.TYPTB(R0)
   2882	006262	100404 				BMI	20$		; INVALID CONTROLLER.
   2883	006264	116161 	000121'	000161'		MOVB	.CTLMD(R1),.CTLUS(R1) ; GET MODULES OR INTERLEAVE MODE
   2884	006272	000404 				BR	30$		; AND GO TO NEXT CONTROLLER.
   2885	006274	105361 	000221'		20$:	DECB	.CTLSW(R1)	; BAD CONTROLLER WITH
   2886	006300	105061 	000161'			CLRB	.CTLUS(R1)	; NO MODULES.
   2887	006304	005301 			30$:	DEC	R1		; STEP DOWN TO
   2888	006306	002353 				BGE	10$		; CONTROLLER ZERO.
   2889	006310	105737 	000026'			TSTB	.DMSW		; IF ALL INDICATED,
   2890	006314	002417 				BLT	50$		; THEN WE ARE DONE.
   2891	006316	012700 	001074'			MOV	#DGMFNM,R0	; OTHERWISE LOOK FOR CONFIGURATION FILE
   2892	006322					CALL	$LOOKUP
	006322	004737 	000772'			 JSR	PC,$LOOKUP
   2893	006326	103016 				BCC	70$
   2894	006330	122737 	000000G	001132'		CMPB	#IE.NSF,.SYSTA	; IF NO FILE
   2895	006336	001111 				BNE	150$
   2896	006340					PRINT	#TGMNFL		; (NO FILE, OPERATOR !)
	006340	012700 	002211'			 MOV	#TGMNFL,R0
	006344	004737 	000000G			 JSR	PC,$TTMSG
   2897	006350	105237 	000026'		40$:	INCB	.DMSW		; THEN USE ALL MEMORY.
   2898	006354				50$:	RETURN
	006354	000207 				 RTS	PC
   2899	006356				60$:	CALL	$READS
	006356	004737 	001622'			 JSR	PC,$READS
   2900	006362	103477 				BCS	150$
   2901	006364				70$:	CALL	$READC		; GET A RECORD.
	006364	004737 	001564'			 JSR	PC,$READC
   2902	006370	103474 				BCS	150$
   2903	006372	022700 	000001 			CMP	#1,R0		; IF IT A CONTROLLER RECORD
   2904	006376	001404 				BEQ	80$		; THEN PROCESS, OTHERWISE
   2905	006400	002766 				BLT	60$		; IF NOT END OF FILE, GET ANOTHER.
   2906	006402					CALL	$CLOSE		; IF NO CONTROLLER RECORDS
	006402	004737 	001334'			 JSR	PC,$CLOSE
   2907	006406	000760 				BR	40$		; THEN USE ALL MEMORY.
   2908	006410				80$:	CALL	$READB		; GET A RECORD.
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1108  13-JAN-78 10:41  PAGE 68-1
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

	006410	004737 	001766'			 JSR	PC,$READB
   2909	006414	103462 				BCS	150$
   2910	006416	010001 				MOV	R0,R1
   2911	006420	105761 	000221'			TSTB	.CTLSW(R1)	; IF A BAD CONTROLLER,
   2912	006424	001052 				BNE	140$		; THEN A BAD FILE.
   2913	006426					CALL	$READB		; GET CONTROLLER TYPE.
	006426	004737 	001766'			 JSR	PC,$READB
   2914	006432	103453 				BCS	150$
   2915	006434	126100 	000061'			CMPB	.CTLTP(R1),R0	; IF WRONG TYPE,
   2916	006440	001044 				BNE	140$		; THEN A WRONG FILE.
   2917	006442					CALL	$READB		; GET MODULES OR INTERLEAVE.
	006442	004737 	001766'			 JSR	PC,$READB
   2918	006446	103445 				BCS	150$
   2919	006450	116102 	000161'			MOVB	.CTLUS(R1),R2	; GET BEST SETTING
   2920	006454	110061 	000161'			MOVB	R0,.CTLUS(R1)	; AND INSERT THIS ONE.
   2921	006460	122761 	000002 	000061'		CMPB	#2,.CTLTP(R1)	; IF A DMA20
   2924	006466	001003 				BNE	90$
   2928	006470	120002 				CMPB	R0,R2		; AND BUS MODE WITHIN INTERLEAVE
   2930	006472	003403 				BLE	100$		; THEN REQUEST IS OKAY.
   2931	006474	000426 				BR	140$
   2939	006476	040200 			90$:	BIC	R2,R0		; OTHERWISE CHECK MODULE REQUESTS
   2940	006500	001024 				BNE	140$		; AND REJECT IF A MODULE IS NONEXISTANT.
   2942	006502	105261 	000221'		100$:	INCB	.CTLSW(R1)	; THIS CONTROLLER ACCEPTED.
   2943	006506	000403 				BR	120$
   2944	006510				110$:	CALL	$READS		; BYPASS RECORD.
	006510	004737 	001622'			 JSR	PC,$READS
   2945	006514	103422 				BCS	150$
   2946	006516				120$:	CALL	$READC		; GET ANOTHER RECORD
	006516	004737 	001564'			 JSR	PC,$READC
   2947	006522	103417 				BCS	150$		; AND
   2948	006524	022700 	000001 			CMP	#1,R0		; IF A CONTROLLER RECORD
   2949	006530	001727 				BEQ	80$		; THEN PROCESS, OTHERWISE
   2950	006532	002766 				BLT	110$		; REJECT RECORDS UNTIL EOF.
   2951	006534	012700 	000040 			MOV	#CTLS,R0	; NOW ADJUST ALL REQUEST SWITCHES
   2952	006540	105360 	000220'		130$:	DECB	.CTLSW-1(R0)
   2953	006544	077003 				SOB	R0,130$
   2954	006546					CALLR	$CLOSE		; CLOSE FILE AND RETURN.
	006546	000137 	001334'			 JMP	$CLOSE
   2955	006552				140$:	PRINT	#TGMBFL		; FILE DOES NOT REFLECT MACHINE
	006552	012700 	002261'			 MOV	#TGMBFL,R0
	006556	004737 	000000G			 JSR	PC,$TTMSG
   2956	006562				150$:	CALL	$PURGE
	006562	004737 	001472'			 JSR	PC,$PURGE
   2957	006566	000261 				SEC			; SO RETURN WITH ERROR.
   2958	006570					RETURN
	006570	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 69
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

   2960						.TITLE	KLICF -- CREATE NEW CONFIGURATION IN FILE
   2961	006572					IDENT$	5,0
						.IDENT	/005000/
   2962					;
   2963					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2964					;
   2965					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2966					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2967					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2968					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2969					;
   2970					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2971					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2972					; EQUIPMENT CORPORATION.
   2973					;
   2974					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2975					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2976					;
   2977					; VERSION 05-00
   2978					;
   2979					; ALAN D. PECKHAM  11-APR-77
   2980					;
   2981					; MODIFIED BY:
   2982					;
   2983					; FUNCTION: THIS MODULE WRITES OUT THE NEW CONFIGURATION TO
   2984					;  KL.CFG IF THE CONFIGURATION HAS BEEN CHANGED.
   2985					;
   2986					; EQUATED SYMBOLS
   2987					;
   2988		000002 			MXTYP	=	2		; LARGEST RECORD TYPE WE HANDLE.
   2989					;
   2990					; LOCAL DATA
   2991					;
   2992	001114					.PSECT	DATA,D
   2993	001114	043240 	000000 	000000 	DCFCFN:	.RAD50	/KL       CFG/	;CONFIGURATION FILE NAME.
	001122	011667
   2994	001124	000000 				.WORD	0		;CREATE NEXT VERSION.
   2995	001126	   005 	   005 			.BYTE	5,5
   2996	001130	054523 	000000 			.WORD	"SY,0
   2997	001134	043240 	000000 	000000 	DCFLFN:	.RAD50	/KL       CFG/	;CONFIGURATION FILE NAME.
	001142	011667
   2998	001144	177777 				.WORD	-1		;DELETE LOWEST VERSION.
   2999	001146	   005 	   005 			.BYTE	5,5
   3000	001150	054523 	000000 			.WORD	"SY,0
   3001	001154	006774'			DCFRJT:	.WORD	LCFREF		; 0 - EOF RECORD
   3002	001156	006676'				.WORD	LCFRMM		; 1 - CONTROLLER RECORD
   3004	001160	006756'				.WORD	LCFRCA		; 2 - CACHE RECORD
   3011	002334					.PSECT	TEXT,D
   3012	002334				TCFCFA:	MESSAGE	<CONFIGURATION FILE ALTERED>
	002334	   103 	   117 	   116 		 .ASCIZ	\CONFIGURATION FILE ALTERED\
	002337	   106 	   111 	   107
	002342	   125 	   122 	   101
	002345	   124 	   111 	   117
	002350	   116 	   040 	   106
	002353	   111 	   114 	   105
	002356	   040 	   101 	   114
	002361	   124 	   105 	   122
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 69-1
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

	002364	   105 	   104 	   000
   3013	002367				TCFCFE:	ERROR	<CONFIGURATION FILE NOT CHANGED>
	002367	   077 	   040 	   103 		 .ASCIZ	\? CONFIGURATION FILE NOT CHANGED\
	002372	   117 	   116 	   106
	002375	   111 	   107 	   125
	002400	   122 	   101 	   124
	002403	   111 	   117 	   116
	002406	   040 	   106 	   111
	002411	   114 	   105 	   040
	002414	   116 	   117 	   124
	002417	   040 	   103 	   110
	002422	   101 	   116 	   107
	002425	   105 	   104 	   000
   3014	006572					.PSECT
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 70
$FILE	-- WRITE THE CONFIGURATION FILE

   3016						.SBTTL	$FILE	-- WRITE THE CONFIGURATION FILE
   3017
   3019	006572	105737 	000025'		$FILE::	TSTB	.DCSW		; IF NO CACHE OR
   3020	006576	001003 				BNE	10$
   3021	006600	105737 	000026'			TSTB	.DMSW		; MEMORY MODIFICATION,
   3025	006604	001533 				BEQ	LCFRTN		; LEAVE THE FILE ALONE.
   3026	006606	005004 			10$:	CLR	R4		; SET INPUT FILE SWITCH.
   3027	006610	012700 	001114'			MOV	#DCFCFN,R0	; FIRST, FIND OLD FILE
   3028	006614					CALL	$LOOKUP
	006614	004737 	000772'			 JSR	PC,$LOOKUP
   3029	006620	103005 				BCC	20$
   3030	006622	122737 	000000G	001132'		CMPB	#IE.NSF,.SYSTA	; IF NOT THERE
   3031	006630	001124 				BNE	LCFERR
   3032	006632	005304 				DEC	R4		; SET INDICATOR.
   3033	006634	012700 	001114'		20$:	MOV	#DCFCFN,R0	; OPEN 'KL.CFG'
   3034	006640					CALL	$ENTER		; FOR OUTPUT.
	006640	004737 	001144'			 JSR	PC,$ENTER
   3035	006644	103516 				BCS	LCFERR
   3036	006646	005704 				TST	R4		; IF NO INPUT FILE
   3037	006650	002451 				BLT	LCFREF		; THEN DON'T READ IT.
   3038	006652				LCFNXT:	CALL	$READC		; READ NEXT RECORD
	006652	004737 	001564'			 JSR	PC,$READC
   3039	006656	103507 				BCS	LCFPRG
   3040	006660	010001 				MOV	R0,R1		; AND SAVE ID.
   3041	006662	022701 	000002 			CMP	#MXTYP,R1	; IS IT MY RECORD ?
   3042	006666	002406 				BLT	LCFCPY		; NO, JUST TRANSFER.
   3043	006670	006300 				ASL	R0
   3044	006672	000170 	001154'			JMP	@DCFRJT(R0)	; PROCESS THE RECORD.
   3045	006676	105737 	000026'		LCFRMM:	TSTB	.DMSW		; IF MEMORY CONFIGURATION IS CHANGED
   3046	006702	001030 				BNE	LCFSKP		; THEN SKIP RECORD, OTHERWISE
   3047	006704	013700 	001140'		LCFCPY:	MOV	.SYIRC,R0	; TRANSFER RECORD TO OUTPUT FILE.
   3048	006710	062700 	000002 			ADD	#2,R0
   3049	006714					CALL	$WRITC		; (BYTE COUNT)
	006714	004737 	002172'			 JSR	PC,$WRITC
   3050	006720	103466 				BCS	LCFPRG
   3051	006722	010100 				MOV	R1,R0
   3052	006724					CALL	$WRITW		; (ID #)
	006724	004737 	002304'			 JSR	PC,$WRITW
   3053	006730	103462 				BCS	LCFPRG
   3054	006732	005737 	001140'		10$:	TST	.SYIRC		; ANY MORE STUFF ?
   3055	006736	003745 				BLE	LCFNXT		; NO, WE ARE FINISHED.
   3056	006740					CALL	$READB
	006740	004737 	001766'			 JSR	PC,$READB
   3057	006744	103454 				BCS	LCFPRG
   3058	006746					CALL	$WRITB
	006746	004737 	002400'			 JSR	PC,$WRITB
   3059	006752	103451 				BCS	LCFPRG
   3060	006754	000766 				BR	10$		; LOOP UNTIL WE RUN OUT OF BYTES.
   3062	006756	105737 	000025'		LCFRCA:	TSTB	.DCSW		; IF CACHE IS NOT CHANGED
   3063	006762	001750 				BEQ	LCFCPY		; THEN COPY CACHE RECORD, OTHERWISE
   3065	006764				LCFSKP:	CALL	$READS		; SKIP THIS RECORD.
	006764	004737 	001622'			 JSR	PC,$READS
   3066	006770	103442 				BCS	LCFPRG
   3067	006772	000727 				BR	LCFNXT		; GET A NEW RECORD.
   3069	006774	105737 	000025'		LCFREF:	TSTB	.DCSW		; IF CACHE WAS CHANGED
   3070	007000	001403 				BEQ	10$
   3071	007002					CALL	LCFWCA		; THEN WRITE THE CACHE RECORD.
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 70-1
$FILE	-- WRITE THE CONFIGURATION FILE

	007002	004737 	007242'			 JSR	PC,LCFWCA
   3072	007006	103433 				BCS	LCFPRG
   3073	007010	105737 	000026'		10$:	TSTB	.DMSW		; IF THE MEMORY CONFIGURATION
   3077	007014	001403 				BEQ	20$		; WAS CHANGED, THEN
   3078	007016					CALL	LCFWMM		; WRITE THE CONTROLLER RECORDS.
	007016	004737 	007140'			 JSR	PC,LCFWMM
   3079	007022	103425 				BCS	LCFPRG
   3080	007024				20$:	CALL	LCFWEF		; NOW WRITE END OF FILE.
	007024	004737 	007116'			 JSR	PC,LCFWEF
   3081	007030	103422 				BCS	LCFPRG
   3082	007032					CALL	$CLOSE		; CLOSE THE FILE AND
	007032	004737 	001334'			 JSR	PC,$CLOSE
   3083	007036	103417 				BCS	LCFPRG
   3084	007040	005704 				TST	R4		; DELETE THE OLD VERSION
   3085	007042	002404 				BLT	90$		; IF THERE IS ONE.
   3086	007044	012700 	001134'			MOV	#DCFLFN,R0
   3087	007050					CALL	$DELETE
	007050	004737 	000640'			 JSR	PC,$DELETE
   3088	007054				90$:	PRINT	#TCFCFA		; INFORM THE OPERATOR.
	007054	012700 	002334'			 MOV	#TCFCFA,R0
	007060	004737 	000000G			 JSR	PC,$TTMSG
   3090	007064	105037 	000025'			CLRB	.DCSW
   3092	007070	105037 	000026'			CLRB	.DMSW		; FILE NOW CORRESPONDS
   3093	007074				LCFRTN:	RETURN			; TO NEW CONFIGURATION.
	007074	000207 				 RTS	PC
   3094
   3095	007076				LCFPRG:	CALL	$PURGE		; ERROR !  PURGE FILE
	007076	004737 	001472'			 JSR	PC,$PURGE
   3096	007102				LCFERR:	PRINT	#TCFCFE		; TELL OPERATOR
	007102	012700 	002367'			 MOV	#TCFCFE,R0
	007106	004737 	000000G			 JSR	PC,$TTMSG
   3097	007112	000261 				SEC
   3098	007114					RETURN			; AND GO AWAY.
	007114	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 71
$FILE	-- WRITE THE CONFIGURATION FILE

   3100					;+
   3101					; ROUTINES TO WRITE THE INDIVIDUAL RECORDS
   3102					;-
   3103
   3104	007116	012700 	000002 		LCFWEF:	MOV	#2,R0		; WRITE EOF RECORD.
   3105	007122					CALL	$WRITC
	007122	004737 	002172'			 JSR	PC,$WRITC
   3106	007126	103403 				BCS	10$
   3107	007130	005000 				CLR	R0
   3108	007132					CALLR	$WRITW
	007132	000137 	002304'			 JMP	$WRITW
   3109	007136				10$:	RETURN
	007136	000207 				 RTS	PC
   3110
   3111	007140	005002 			LCFWMM:	CLR	R2		; WRITE OUT MEMORY RECORDS.
   3112	007142	105762 	000221'		10$:	TSTB	.CTLSW(R2)	; CHECK IF CONTROLLER USED.
   3113	007146	002430 				BLT	20$
   3114	007150	012700 	000005 			MOV	#5,R0		; OK - INCLUDE IN FILE.
   3115	007154					CALL	$WRITC		; (LENGTH)
	007154	004737 	002172'			 JSR	PC,$WRITC
   3116	007160	103427 				BCS	30$
   3117	007162	012700 	000001 			MOV	#1,R0
   3118	007166					CALL	$WRITW		; (ID #)
	007166	004737 	002304'			 JSR	PC,$WRITW
   3119	007172	103422 				BCS	30$
   3120	007174	010200 				MOV	R2,R0
   3121	007176					CALL	$WRITB		; (CONTROLLER #)
	007176	004737 	002400'			 JSR	PC,$WRITB
   3122	007202	103416 				BCS	30$
   3123	007204	116200 	000061'			MOVB	.CTLTP(R2),R0
   3124	007210					CALL	$WRITB		; (TYPE)
	007210	004737 	002400'			 JSR	PC,$WRITB
   3125	007214	103411 				BCS	30$
   3126	007216	116200 	000161'			MOVB	.CTLUS(R2),R0
   3127	007222					CALL	$WRITB		; (MODULES/INTERLEAVE)
	007222	004737 	002400'			 JSR	PC,$WRITB
   3128	007226	103404 				BCS	30$
   3129	007230	005202 			20$:	INC	R2		; CHECK ALL CONTROLLERS.
   3130	007232	022702 	000040 			CMP	#CTLS,R2
   3131	007236	003341 				BGT	10$
   3132	007240				30$:	RETURN
	007240	000207 				 RTS	PC
   3134
   3135	007242	113700 	000040'		LCFWCA:	MOVB	.NCACH,R0	; WRITE OUT CACHE RECORD.
   3136	007246	010001 				MOV	R0,R1
   3137	007250	062700 	000003 			ADD	#3,R0
   3138	007254					CALL	$WRITC		; (LENGTH)
	007254	004737 	002172'			 JSR	PC,$WRITC
   3139	007260	103422 				BCS	20$
   3140	007262	012700 	000002 			MOV	#2,R0
   3141	007266					CALL	$WRITW		; (ID #)
	007266	004737 	002304'			 JSR	PC,$WRITW
   3142	007272	103415 				BCS	20$
   3143	007274	110100 				MOVB	R1,R0
   3144	007276					CALL	$WRITB		; (# CACHES)
	007276	004737 	002400'			 JSR	PC,$WRITB
   3145	007302	103411 				BCS	20$
KLICF -- CREATE NEW CONFIGURATI	MACRO M1108  13-JAN-78 10:41  PAGE 71-1
$FILE	-- WRITE THE CONFIGURATION FILE

   3146	007304	005701 				TST	R1
   3147	007306	001407 				BEQ	20$
   3148	007310	012702 	000041'			MOV	#.CACHN,R2
   3149	007314	112200 			10$:	MOVB	(R2)+,R0
   3150	007316					CALL	$WRITB		; (CACHE #S)
	007316	004737 	002400'			 JSR	PC,$WRITB
   3151	007322	103401 				BCS	20$
   3152	007324	077105 				SOB	R1,10$
   3153	007326				20$:	RETURN
	007326	000207 				 RTS	PC
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 72
$FILE	-- WRITE THE CONFIGURATION FILE

   3156						.TITLE	KLICB -- LOAD THE MICROCODE
   3157	007330					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   3158					;
   3159					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   3160					;
   3161					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   3162					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   3163					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   3164					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   3165					;
   3166					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   3167					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   3168					; EQUIPMENT CORPORATION.
   3169					;
   3170					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   3171					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3172					;
   3173					; VERSION 05-00
   3174					;
   3175					; ALAN D. PECKHAM  11-APR-77
   3176					;
   3177					; MODIFICATIONS:
   3178					;
   3179					;	NO.	DATE		PROGRAMMER	REASON
   3180					;	---	----		----------	------
   3181					;
   3182					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES WHICH LOAD THE KL
   3183					;  MICROCODE FROM THE FILE 'KL.MCB'.
   3184					;
   3185					; EQUATED SYMBOLS
   3186					;
   3187		000000 			APR	=	0		; KL DEVICE.
   3188		000000 			BLKI	=	0		; KL I/O SUBFUNCTION CODE.
   3189					;
   3190					; LOCAL DATA
   3191					;
   3192	001162					.PSECT	DATA,D
   3193	001162	043240 	000000 	000000 	DCBFNM:	.RAD50	/KL       MCB/	; MICROCODE FILE NAME.
	001170	050672
   3194	001172	000000 				.WORD	0		; GET LATEST VERSION.
   3195	001174	   005 	   005 			.BYTE	5,5
   3196	001176	054523 	000000 			.WORD	"SY,0
   3197	001202	000000 			DCBADR:	.WORD	0		; RAM ADDRESS FROM RECORD.
   3198	001204	000000 	000000 	000000 	DCBDAT:	.WORD	0,0,0,0,0,0	; RAM DATA WORK AREA.
	001212	000000 	000000 	000000
   3199	001220	000000 			DCBCNT:	.WORD	0		; VERIFY DIFFERENCE COUNT.
   3200	001222	000000 	000000 	000000 	DCBCBF:	.WORD	0,0,0,0,0,0	; HOLDING AREA FOR C-RAM WORD.
	001230	000000 	000000 	000000
   3201	001236	000000 	000000 	000000 	DCBDBF:	.WORD	0,0,0		; D-RAM WORD HOLDING AREA.
   3202						.EVEN			; DCBBF MUST BE ON A WORD BOUNDRY.
   3203	001244				DCBBF:	WD36$	0 0		; APRID RESULT.
	001244	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001247	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3204	001251				DCBA17:	WD22$	17		; AC17 ADDRESS.
	001251	   017 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   3205	001254				DCBAPR:	IO10$	BLKI APR,,17	; APRID INSTRUCTION.
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 72-1
$FILE	-- WRITE THE CONFIGURATION FILE

	001254	   017 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001257	   000 	   016 			 .BYTE	BY$$3,BY$$4
   3206						.EVEN
   3207	002430					.PSECT	TEXT,D
   3208	002430				TCBDCW:	ERROR	<C-RAM DIFFERS AT XXXXXX>
	002430	   077 	   040 	   103 		 .ASCIZ	\? C-RAM DIFFERS AT XXXXXX\
	002433	   055 	   122 	   101
	002436	   115 	   040 	   104
	002441	   111 	   106 	   106
	002444	   105 	   122 	   123
	002447	   040 	   101 	   124
	002452	   040 	   130 	   130
	002455	   130 	   130 	   130
	002460	   130 	   000
   3209	002462				TCBDDW:	ERROR	<D-RAM DIFFERS AT XXXXXX>
	002462	   077 	   040 	   104 		 .ASCIZ	\? D-RAM DIFFERS AT XXXXXX\
	002465	   055 	   122 	   101
	002470	   115 	   040 	   104
	002473	   111 	   106 	   106
	002476	   105 	   122 	   123
	002501	   040 	   101 	   124
	002504	   040 	   130 	   130
	002507	   130 	   130 	   130
	002512	   130 	   000
   3210	002514				TCBMLF:	ERROR	<MICROCODE LOAD FAILED>
	002514	   077 	   040 	   115 		 .ASCIZ	\? MICROCODE LOAD FAILED\
	002517	   111 	   103 	   122
	002522	   117 	   103 	   117
	002525	   104 	   105 	   040
	002530	   114 	   117 	   101
	002533	   104 	   040 	   106
	002536	   101 	   111 	   114
	002541	   105 	   104 	   000
   3211	002544				TCBMVF:	ERROR	<MICROCODE VERIFY FAILED>
	002544	   077 	   040 	   115 		 .ASCIZ	\? MICROCODE VERIFY FAILED\
	002547	   111 	   103 	   122
	002552	   117 	   103 	   117
	002555	   104 	   105 	   040
	002560	   126 	   105 	   122
	002563	   111 	   106 	   131
	002566	   040 	   106 	   101
	002571	   111 	   114 	   105
	002574	   104 	   000
   3212	002576				TCBMVL:	MESSAGE	<MICROCODE VERSION XXX LOADED>
	002576	   115 	   111 	   103 		 .ASCIZ	\MICROCODE VERSION XXX LOADED\
	002601	   122 	   117 	   103
	002604	   117 	   104 	   105
	002607	   040 	   126 	   105
	002612	   122 	   123 	   111
	002615	   117 	   116 	   040
	002620	   130 	   130 	   130
	002623	   040 	   114 	   117
	002626	   101 	   104 	   105
	002631	   104 	   000
   3213	002633				TCBMVV:	MESSAGE	<MICROCODE VERSION XXX VERIFIED>
	002633	   115 	   111 	   103 		 .ASCIZ	\MICROCODE VERSION XXX VERIFIED\
	002636	   122 	   117 	   103
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 72-2
$FILE	-- WRITE THE CONFIGURATION FILE

	002641	   117 	   104 	   105
	002644	   040 	   126 	   105
	002647	   122 	   123 	   111
	002652	   117 	   116 	   040
	002655	   130 	   130 	   130
	002660	   040 	   126 	   105
	002663	   122 	   111 	   106
	002666	   111 	   105 	   104
	002671	   000
   3214	007330					.PSECT
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 73
$FILE	-- WRITE THE CONFIGURATION FILE

   3216					;+
   3217					; LOAD THE BINARY RAM FILE INTO THE KL OR USE THE FILE TO
   3218					; VERIFY THE RAM CODE.
   3219					; THE RAM BINARY FILE HAS THREE RECORD TYPES.
   3220					;	*D-RAM RECORDS:
   3221					;	.WORD	2+<6*N>		; BYTE COUNT RECORD LENGTH.
   3222					;	.WORD	ADR		; D-RAM ADDRESS (SHOULD BE EVEN).
   3223					;	.BLKW	3*N		; D-RAM CODE WORDS.
   3224					;	*C-RAM RECORDS:
   3225					;	.WORD	2+<14*N>	; BYTE COUNT RECORD LENGTH.
   3226					;	.WORD	100000+ADR	; C-RAM ADDRESS.
   3227					;	.BLKW	6*N		; C-RAM CODE WORDS.
   3228					;	*END OF FILE:
   3229					;	.WORD	2		; BYTE COUNT RECORD LENGTH.
   3230					;	.WORD	100000!ADR	; C-RAM STARTING ADDRESS
   3231					;				; (NORMALLY ZERO).
   3232					;
   3233					; THE C-RAM RECORDS MUST BE SORTED IN ASCENDING ORDER BY ADDRESS
   3234					; SO THAT UNUSED WORDS MAY BE CLEARED WITHOUT HAVING TO CLEAR ALL
   3235					; THE C-RAM LOCATIONS.
   3236					;-
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 74
$MCBLD	-- LOAD THE RAMS

   3238						.SBTTL	$MCBLD	-- LOAD THE RAMS
   3239					;+
   3240					; LOAD OR VERIFY THE C&D-RAMS AND REPORT THE VERSION.
   3241					;
   3242					; INPUTS:
   3243					;	.DRSW	- IF NON-ZERO, LOAD RAMS, OTHERWISE VERIFY.
   3244					;
   3245					; OUTPUTS:
   3246					;	CARRY SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   3247					;+
   3248					; GET THE FILE AND INITIALIZE THE KL FOR MICROCODE OPERATIONS.
   3249					;-
   3250
   3251	007330	012700 	001162'		$MCBLD::MOV	#DCBFNM,R0	; GET UCODE FILE NAME AND
   3252	007334	012710 				MOV	(PC)+,(R0)	; ASSUME MODEL A MICROCODE
   3256	007336	043241 				.RAD50	/KLA/		; FOR MODEL A CPU.
   3258	007340	105737 	000034'			TSTB	.EASW		; IF
   3259	007344	003402 				BLE	10$		; MODEL B THEN
   3260	007346	012710 				MOV	(PC)+,(R0)	; CHOOSE
   3264	007350	043270 				.RAD50	/KLX/		; MODEL B MICROCODE
   3266	007352	105737 	000023'		10$:	TSTB	.UFNSW		; IF FILE NAME SPECIFIED
   3267	007356	003402 				BLE	20$		; BY OPERATOR
   3268	007360	012700 	001104'			MOV	#.USRFN,R0	; THEN USE HIS.
   3269	007364				20$:	CALL	$LOOKUP		; AND OPEN IT.
	007364	004737 	000772'			 JSR	PC,$LOOKUP
   3270	007370	103411 				BCS	40$
   3271	007372	005037 	001220'			CLR	DCBCNT		; INITIALIZE RAM DIFFERENCE COUNT.
   3272	007376	012703 	001204'			MOV	#DCBDAT,R3	; DATA AREA AND
   3273	007402	005002 				CLR	R2		; NEXT C-RAM ADDRESS TO DEPOSIT.
   3274	007404					CALL	$KLMR		; RESET THE WORLD.
	007404	004737 	022452'			 JSR	PC,$KLMR
   3275	007410	103025 				BCC	LCBRC
   3276	007412				30$:	RETURN
	007412	000207 				 RTS	PC
   3277
   3278	007414	122737 	000000G	001132'	40$:	CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND
   3279	007422	001373 				BNE	30$
   3280	007424					CALL	$IOERR		; DECLARE THE ERROR.
	007424	004737 	002610'			 JSR	PC,$IOERR
   3281	007430	000137 	010142'			JMP	LCBFL		; REPORT OPERATION FAILED.
   3282
   3283					;+
   3284					; READ 3 OR 6 WORDS FROM THE MICROCODE FILE.
   3285					;
   3286					; INPUTS:
   3287					;	R3	- POINTER TO AREA TO RECIEVE DATA.
   3288					;
   3289					; OUTPUTS:
   3290					;	CARRY SET IF ERROR. R0, R4 & R5 ARE DESTROYED.
   3291					;-
   3292
   3293						.ENABL	LSB
   3294	007434	012705 	000003 		LCB3W:	MOV	#3,R5		; GET 3 WORDS.
   3295	007440	000402 				BR	10$
   3296	007442	012705 	000006 		LCB6W:	MOV	#6,R5		; GET 6 WORDS.
   3297	007446	010304 			10$:	MOV	R3,R4
   3298	007450				20$:	CALL	$READW
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 74-1
$MCBLD	-- LOAD THE RAMS

	007450	004737 	001672'			 JSR	PC,$READW
   3299	007454	103402 				BCS	30$
   3300	007456	010024 				MOV	R0,(R4)+
   3301	007460	077505 				SOB	R5,20$
   3302	007462				30$:	RETURN
	007462	000207 				 RTS	PC
   3303						.DSABL	LSB
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 75
$MCBLD	-- LOAD THE RAMS

   3305					;+
   3306					; IDENTIFY A RECORD AND DISPATCH ON RECORD TYPE.
   3307					; END-OF-FILE IS HANDLED HERE - THE C-RAM STARTING ADDRESS IS
   3308					; USED TO START THE MICROCODE, THE FILE IS CLOSED, AND WE GO
   3309					; TO IDENTIFY THE MICROCODE VERSION.
   3310					;
   3311					; NECESSARY EVILS:
   3312					;	.SYIRC	- THE NUMBER OF BYTES LEFT IN THE CURRENT RECORD.
   3313					;-
   3314
   3315	007464				LCBRC:	CALL	$READC		; GET ADDRESS.
	007464	004737 	001564'			 JSR	PC,$READC
   3316	007470	103431 				BCS	10$
   3317	007472	010037 	001202'			MOV	R0,DCBADR
   3318	007476	100115 				BPL	LCBDRM		; D-RAM RECORD OR
   3319	007500	042737 	100000 	001202'		BIC	#BIT15,DCBADR	; (REMOVE FLAG)
   3320	007506	005737 	001140'			TST	.SYIRC
   3321	007512	003022 				BGT	LCBCRM		; C-RAM RECORD OR
   3322	007514	013700 	001202'			MOV	DCBADR,R0	; C-RAM START ADDRESS.
   3323	007520	005737 	001220'			TST	DCBCNT		; IF VERIFY AND DIFFERENCE FOUND
   3324	007524	001013 				BNE	10$		; SIGNAL ERROR.
   3325	007526					CALL	$ACRAM		; SET C-RAM STARTING ADDRESS
	007526	004737 	011232'			 JSR	PC,$ACRAM
   3326	007532	103410 				BCS	10$		; AND
   3327	007534	012700 	001000 			MOV	#.STRCL,R0
   3328	007540					CALL	$DFXC		; START THE CLOCK.
	007540	004737 	022006'			 JSR	PC,$DFXC
   3329	007544					CALL	$CLOSE		; CLOSE THE FILE
	007544	004737 	001334'			 JSR	PC,$CLOSE
   3330	007550	000137 	010174'			JMP	LCBVR		; IDENTIFY RAM VERSION.
   3331	007554	000137 	010142'		10$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 76
$MCBLD	-- LOAD THE RAMS

   3333					;+
   3334					; PROCESS C-RAM RECORD.
   3335					;
   3336					; NECESSARY EVILS:
   3337					;	R3	- POINTS TO THE CURRENT C-RAM WORD FROM THE FILE.
   3338					;	R2	- CONTAINS THE NEXT EXPECTED C-RAM ADDRESS TO BE
   3339					;		  WRITTEN.
   3340					;	DCBADR	- CONTAINS THE ADDRESS FOR THE C-RAM WORD READ
   3341					;		  FROM THE FILE.
   3342					;	.DRSW	- IF NON-ZERO, THEN VERIFY.
   3343					;	.SYIRC	- COUNT OF BYTES LEFT IN CURRENT RECORD.
   3344					;-
   3345
   3346	007560	105737 	000024'		LCBCRM:	TSTB	.DRSW		; TEST FUNCTION...
   3347	007564	001013 				BNE	20$		; IF WE ARE LOADING,
   3348	007566	020237 	001202'		10$:	CMP	R2,DCBADR	; AND WORDS ARE BEING SKIPPED
   3349	007572	001412 				BEQ	30$
   3350	007574	012701 	000000'			MOV	#.ZERO,R1	; THEN ZERO THE WORDS OUT.
   3351	007600	010200 				MOV	R2,R0
   3352	007602					CALL	$WCRAM
	007602	004737 	010350'			 JSR	PC,$WCRAM
   3353	007606	103447 				BCS	80$
   3354	007610	005202 				INC	R2
   3355	007612	000765 				BR	10$
   3356	007614	013702 	001202'		20$:	MOV	DCBADR,R2
   3357	007620				30$:	CALL	LCB6W		; GET THE C-RAM WORD AND
	007620	004737 	007442'			 JSR	PC,LCB6W
   3358	007624	103440 				BCS	80$
   3359	007626	010200 				MOV	R2,R0		; SET UP POINTER.
   3360	007630	105737 	000024'			TSTB	.DRSW		; IF WE VERIFY,
   3361	007634	001414 				BEQ	50$
   3362	007636	012701 	001222'			MOV	#DCBCBF,R1	; GET HOLDING AREA,
   3363	007642					CALL	$RCRAM		; READ IT IN
	007642	004737 	010630'			 JSR	PC,$RCRAM
   3364	007646	103427 				BCS	80$
   3365	007650	012705 	000006 			MOV	#6,R5		; AND COMPARE 6 WORDS
   3366	007654	010300 				MOV	R3,R0
   3367	007656	022021 			40$:	CMP	(R0)+,(R1)+
   3368	007660	001014 				BNE	70$
   3369	007662	077503 				SOB	R5,40$
   3370	007664	000404 				BR	60$		; OTHERWISE
   3371	007666	010301 			50$:	MOV	R3,R1		; GET THE WORD ADDRESS
   3372	007670					CALL	$WCRAM		; AND WRITE INTO THE RAM.
	007670	004737 	010350'			 JSR	PC,$WCRAM
   3373	007674	103414 				BCS	80$
   3374	007676	005202 			60$:	INC	R2		; BUMP C-RAM ADDRESS AND
   3375	007700	005737 	001140'			TST	.SYIRC		; IF MORE DATA, THEN
   3376	007704	001345 				BNE	30$		; GET NEXT WORD OR
   3377	007706	000137 	007464'			JMP	LCBRC		; GET NEW RECORD.
   3378	007712	010200 			70$:	MOV	R2,R0		; ERROR - PUT ADDRESS
   3379	007714	012701 	002430'			MOV	#TCBDCW,R1	; INTO ERROR MESSAGE
   3380	007720					CALL	LCBRME		; AND INFORM OPERATOR.
	007720	004737 	010066'			 JSR	PC,LCBRME
   3381	007724	103364 				BCC	60$		; TRY SOME MORE.
   3382	007726	000137 	010142'		80$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 77
$MCBLD	-- LOAD THE RAMS

   3384					;+
   3385					; PROCESS D-RAM RECORD.
   3386					;
   3387					; NECESSARY EVILS:
   3388					;	R3	- POINTS TO D-RAM WORD READ FROM FILE.
   3389					;	DCBADR	- ADDRESS FOR D-RAM WORD FROM FILE.
   3390					;	.DRSW	- IF NON-ZERO, THEN VERIFY.
   3391					;-
   3392
   3393	007732				LCBDRM:	CALL	LCB3W		; READ D-RAM WORD AND
	007732	004737 	007434'			 JSR	PC,LCB3W
   3394	007736	103451 				BCS	40$
   3395	007740	013700 	001202'			MOV	DCBADR,R0	; SET UP POINTERS.
   3396	007744	105737 	000024'			TSTB	.DRSW		; TEST FUNCTION...
   3397	007750	001005 				BNE	10$
   3398	007752	010301 				MOV	R3,R1		; GET THE WORD AND
   3399	007754					CALL	$WDRAM		; WRITE IT OUT.
	007754	004737 	011360'			 JSR	PC,$WDRAM
   3400	007760	103021 				BCC	20$
   3401	007762	000437 				BR	40$
   3402	007764	012701 	001236'		10$:	MOV	#DCBDBF,R1	; GET A HOLDING AREA
   3403	007770					CALL	$RDRAM		; AND READ IT IN
	007770	004737 	011540'			 JSR	PC,$RDRAM
   3404	007774	103432 				BCS	40$
   3405	007776	010300 				MOV	R3,R0
   3406	010000	042711 	000020 			BIC	#20,(R1)	; CLEAR PARITY BITS
   3407	010004	022120 				CMP	(R1)+,(R0)+	; AND COMPARE.
   3408	010006	001016 				BNE	30$
   3409	010010	042711 	000020 			BIC	#20,(R1)
   3410	010014	022120 				CMP	(R1)+,(R0)+
   3411	010016	001012 				BNE	30$
   3412	010020	021110 				CMP	(R1),(R0)
   3413	010022	001010 				BNE	30$
   3414	010024	062737 	000002 	001202'	20$:	ADD	#2,DCBADR	; SUCCESSFUL, BUMP D-RAM ADDRESS.
   3415	010032	005737 	001140'			TST	.SYIRC		; END OF RECORD ?
   3416	010036	001335 				BNE	LCBDRM		; NO, STILL GOING,
   3417	010040	000137 	007464'			JMP	LCBRC		; OTHERWISE GET NEW RECORD.
   3418	010044	013700 	001202'		30$:	MOV	DCBADR,R0	; ERROR - PUT ADDRESS
   3419	010050	012701 	002462'			MOV	#TCBDDW,R1	; IN ERROR MESSAGE
   3420	010054					CALL	LCBRME		; AND INFORM OPERATOR.
	010054	004737 	010066'			 JSR	PC,LCBRME
   3421	010060	103361 				BCC	20$		; TRY SOME MORE.
   3422	010062	000137 	010142'		40$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 78
$MCBLD	-- LOAD THE RAMS

   3424					;+
   3425					; INSERT RAM ADDRESS IN ERROR MESSAGE AND PRINT IT. BUMP ERROR COUNT
   3426					; AND IF TOO HIGH, SO INDICATE.
   3427					;
   3428					; INPUTS:
   3429					;	R1	- ADDRESS OF MESSAGE TO DISPLAY.
   3430					;	R0	- RAM ADDRESS TO DISPLAY IN OCTAL AFTER "AT ".
   3431					;
   3432					; OUTPUT:
   3433					;	CARRY SET IF TOO MANY ERRORS.
   3434					;-
   3435
   3436	010066	004537 	000356'		LCBRME:	JSR	R5,$RSAVE
   3437	010072	010105 				MOV	R1,R5		; GET MESSAGE ADDRESS
   3438	010074	122725 	000101 		10$:	CMPB	#'A,(R5)+	; AND LOOK FOR "AT"
   3439	010100	001375 				BNE	10$
   3440	010102	122725 	000124 			CMPB	#'T,(R5)+
   3441	010106	001372 				BNE	10$
   3442	010110	005205 				INC	R5		; PASS BY SPACE
   3443	010112					CALL	$TRB2O		; AND INSERT RAM ADDRESS.
	010112	004737 	023130'			 JSR	PC,$TRB2O
   3444	010116	105015 				CLRB	(R5)		; THIS IS THE END OF THE MESSAGE.
   3445	010120					PRINT	R1		; TYPE OUT OFFENDING ADDRESS.
	010120	010100 				 MOV	R1,R0
	010122	004737 	000000G			 JSR	PC,$TTMSG
   3446	010126	005237 	001220'			INC	DCBCNT		; ONE MORE DIFFERENCE.
   3447	010132	022737 	000005 	001220'		CMP	#5,DCBCNT	; LAST STRAW ?
   3448	010140					RETURN			; SETS CARRY IF MCBCNT>5.
	010140	000207 				 RTS	PC
   3449
   3450					;+
   3451					; OPERATION FAILED - NOTIFY OPERATOR.
   3452					;-
   3453
   3454	010142	012700 	002514'		LCBFL:	MOV	#TCBMLF,R0	; ASSUME LOAD
   3455	010146	105737 	000024'			TSTB	.DRSW		; AND IF VERIFY,
   3456	010152	001402 				BEQ	10$
   3457	010154	012700 	002544'			MOV	#TCBMVF,R0	; GET VERIFY MESSAGE.
   3458	010160				10$:	PRINT
	010160	004737 	000000G			 JSR	PC,$TTMSG
   3459	010164					CALL	$PURGE
	010164	004737 	001472'			 JSR	PC,$PURGE
   3460	010170	000261 				SEC
   3461	010172					RETURN
	010172	000207 				 RTS	PC
KLICB -- LOAD THE MICROCODE	MACRO M1108  13-JAN-78 10:41  PAGE 79
$MCBLD	-- LOAD THE RAMS

   3463					;+
   3464					; IDENTIFY THE MICROCODE VERSION NUMBER.
   3465					;-
   3466
   3467	010174	105737 	000024'		LCBVR: TSTB	.DRSW		; GET MESSAGE:
   3468	010200	001003 				BNE	10$
   3469	010202	012702 	002576'			MOV	#TCBMVL,R2	; MICROCODE LOADED OR
   3470	010206	000402 				BR	20$
   3471	010210	012702 	002633'		10$:	MOV	#TCBMVV,R2	; MICROCODE VERIFIED.
   3472	010214	010205 			20$:	MOV	R2,R5		; GET POSITION TO INSERT
   3473	010216	122725 	000117 		30$:	CMPB	#'O,(R5)+	; MICROCODE VERSION.
   3474	010222	001375 				BNE	30$
   3475	010224	122725 	000116 			CMPB	#'N,(R5)+
   3476	010230	001372 				BNE	30$
   3477	010232	005205 				INC	R5
   3478	010234	012700 	001254'			MOV	#DCBAPR,R0
   3479	010240					CALL	$EXCT		; DO AN APRID
	010240	004737 	020344'			 JSR	PC,$EXCT
   3480	010244	103425 				BCS	50$
   3481	010246	012701 	001244'			MOV	#DCBBF,R1	; AND GET RESULT
   3482	010252	012700 	001251'			MOV	#DCBA17,R0	; FROM AC17.
   3483	010256					CALL	$EXAM
	010256	004737 	022240'			 JSR	PC,$EXAM
   3484	010262	103416 				BCS	50$
   3485	010264	016100 	000002 			MOV	2(R1),R0	; EXTRACT MICROCODE VERSION
   3486	010270					SR	R0,2		; FROM BITS 9-17
	010270	006200 				 ASR	R0
	010272	006200 				 ASR	R0
   3487	010274	042700 	177000 			BIC	#^C777,R0	; AND ONLY THESE BITS.
   3488	010300					CALL	$TRB2O
	010300	004737 	023130'			 JSR	PC,$TRB2O
   3489	010304	122715 	000040 		40$:	CMPB	#' ,(R5)	; ZAP OUT REST OF FIELD.
   3490	010310	001410 				BEQ	60$
   3491	010312	112725 	177777 			MOVB	#-1,(R5)+
   3492	010316	000772 				BR	40$
   3493	010320	112715 	000077 		50$:	MOVB	#'?,(R5)	; VERSION UNKNOWN.
   3494	010324	112515 				MOVB	(R5)+,(R5)
   3495	010326	112525 				MOVB	(R5)+,(R5)+
   3496	010330	005005 				CLR	R5		; INDICATE LOAD WAS A FLOP.
   3497	010332				60$:	PRINT	R2		; PRINT THE MESSAGE.
	010332	010200 				 MOV	R2,R0
	010334	004737 	000000G			 JSR	PC,$TTMSG
   3498	010340	005705 				TST	R5		; HOW DID IT TURN OUT ?
   3499	010342	001001 				BNE	70$
   3500	010344	000261 				SEC			; BADLY.....
   3501	010346				70$:	RETURN
	010346	000207 				 RTS	PC
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 80
$MCBLD	-- LOAD THE RAMS

   3503						.TITLE	KLIFC -- C-RAM READ/WRITE
   3504	010350					IDENT$	5,0
						.IDENT	/005000/
   3505					;
   3506					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   3507					;
   3508					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   3509					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   3510					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   3511					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   3512					;
   3513					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   3514					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   3515					; EQUIPMENT CORPORATION.
   3516					;
   3517					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   3518					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3519					;
   3520					; VERSION 05-00
   3521					;
   3522					; ALAN D. PECKHAM  11-APR-77
   3523					;
   3524					; MODIFIED BY:
   3525					;
   3526					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO WORK ON THE C-RAMS.
   3527					;  THE C-RAM DATA IS WORKED WITH IN 6-WORD COMPRESSED FORMAT, AS
   3528					;  SPECIFIED IN THE KLDCP DOCUMENTATION.
   3529					;
   3530					; LOCAL DATA
   3531					;
   3532	001262					.PSECT	DATA,D
   3533	001262	147000 			DFCRFL:	.WORD	.RCRM1		; READ C-RAM BITS 0-19
   3534	001264	146000 				.WORD	.RCRM2		; READ C-RAM BITS 20-39
   3535	001266	145000 				.WORD	.RCRM3		; READ C-RAM BITS 40-59
   3536	001270	144000 				.WORD	.RCRM4		; READ C-RAM BITS 60-79
   3537	001272	057000 			DFCWFL:	.WORD	.LCRM1		; C-RAM WRITE FUNCTION LIST.
   3538	001274	056000 				.WORD	.LCRM2
   3539	001276	055000 				.WORD	.LCRM3
   3540	001300	054000 				.WORD	.LCRM4
   3541						.EVEN			; DFCBF MUST BE ON A WORD BOUNDRY.
   3542	001302				DFCBF:	WD36$	0 0		; DATA BUFFER.
	001302	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001305	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3543	001307	   000 			DFCFL2:	.BYTE	0
   3544	001310	   000 			DFCFL3:	.BYTE	0
   3545	001311				DFCABF:	WD36$	0 0		; WORK AREA.
	001311	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001314	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3546						.EVEN
   3547	010350					.PSECT
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 81
$WCRAM	-- WRITE C-RAM WORD

   3549						.SBTTL	$WCRAM	-- WRITE C-RAM WORD
   3550					;+
   3551					; WRITE COMPRESSED C-RAM WORD POINTED TO BY R1 TO C-RAM LOCATION
   3552					; ADDRESSED BY R0.
   3553					;
   3554					; INPUTS:
   3555					;	R1	- POINTER TO 6 WORDS OF DATA TO WRITE.
   3556					;	R0	- C-RAM ADDRESS TO WRITE TO.
   3557					;
   3558					; OUTPUT:
   3559					;	CARRY IS SET IF ERROR OCCURS.
   3560					;-
   3561
   3562	010350	004537 	000356'		$WCRAM::JSR	R5,$RSAVE
   3563	010354					TRACK	CW
	010354	004037 	010366'			 JSR	R0,64$
	010360	053503 				 .WORD	"CW
	010362	000000 				 .WORD
	010364	000000 				 .WORD
	010366	004737 	000424'		64$:	 JSR	PC,$TRACK
	010372	012600 				 MOV	(SP)+,R0
   3564	010374	010102 				MOV	R1,R2		; GET DATA ADDRESS
   3565	010376					CALL	$ACRAM		; WRITE C-RAM ADDRESS
	010376	004737 	011232'			 JSR	PC,$ACRAM
   3566	010402	103511 				BCS	70$		; RAM ERROR
   3567	010404	012704 	000006 			MOV	#6,R4		; 4 LOOPS PER C-RAM WORD
   3568	010410	005003 				CLR	R3		; CLEAR BOUNDRY FLAG
   3569	010412	012701 	001302'		10$:	MOV	#DFCBF,R1	; SET UP WORK AREA
   3570	010416	112221 				MOVB	(R2)+,(R1)+	; REAL DATA TO WORK AREA
   3571	010420	112221 				MOVB	(R2)+,(R1)+
   3572	010422	111221 				MOVB	@R2,(R1)+
   3573	010424	005703 				TST	R3		; SEE IF BITS ON WORD BOUNDARY
   3574	010426	001411 				BEQ	30$		; YES
   3575	010430	005202 				INC	R2		; INCREASE DTA ADR PTR
   3576	010432	012705 	000004 			MOV	#4,R5		; # OF SHIFTS REQUIRED
   3577	010436	012701 	001305'		20$:	MOV	#DFCBF+3,R1	; POINT TO TOP OF WORK AREA
   3578	010442	106041 				RORB	-(R1)		; RIGHT SHIFT ONE BYTE
   3579	010444	106041 				RORB	-(R1)
   3580	010446	106041 				RORB	-(R1)
   3581	010450	077506 				SOB	R5,20$		; LOOP BACK IF NOT DONE
   3582	010452	005103 			30$:	COM	R3		; CHANGE BOUNDARY FLAG
   3583	010454	042737 	177760 	001304'		BIC	#177760,DFCBF+2	; ONLY FOUR BITS COUNT
   3584	010462	013700 	001302'			MOV	DFCBF,R0	; GET UNPACED DATA
   3585	010466	113737 	001304'	001305'		MOVB	DFCBF+2,DFCBF+3	; PUT C-RAM 0-3 BITS INTO CORRECT CORE
   3586	010474	005001 				CLR	R1		; INIT R1
   3587	010476	000261 				SEC			; C-BIT IS SET AS A FLAG
   3588	010500	012705 	000005 		40$:	MOV	#5,R5		; 4 SHIFTS BETWEEN BALNKS
   3589	010504	006001 			50$:	ROR	R1		; NEW DATA LEFT END OF DESTINATION
   3590	010506	103406 				BCS	60$		; IF FLAG FALLS OUT, DONE
   3591	010510	006000 				ROR	R0		; ROTATE SOURCE BITS RIGHT
   3592	010512	077504 				SOB	R5,50$		; SHIFT 4 TIMES?
   3593	010514	006100 				ROL	R0		; REPAIR ANY DAMAGE
   3594	010516	000241 				CLC			; CLEAR C-BIT AS FLAG
   3595	010520	006001 				ROR	R1		; AND ROLL ZEROES
   3596	010522	000766 				BR	40$		; CONTINUE
   3597	010524	000241 			60$:	CLC			; CLEAR C-BIT AS FLAG
   3598	010526	006100 				ROL	R0		; BITS 4-7
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 81-1
$WCRAM	-- WRITE C-RAM WORD

   3599	010530	006100 				ROL	R0		; MUST BE CORRECTED
   3600	010532	010137 	001302'			MOV	R1,DFCBF	; BITS 8-19 INTO CORE
   3601	010536	110037 	001304'			MOVB	R0,DFCBF+2	; BITS 4-7 INTO CORE
   3602	010542	016400 	001272'			MOV	DFCWFL(R4),R0	; GET WRITE FUNCTION LIST
   3603	010546	012701 	001302'			MOV	#DFCBF,R1	; ADDRESS OF DATA
   3604	010552					CALL	$DFWR		; WRITE TO C-RAM
	010552	004737 	021610'			 JSR	PC,$DFWR
   3605	010556	103423 				BCS	70$		; TIME OUT ERROR
   3606	010560	162704 	000002 			SUB	#2,R4		; ENTIRE RAM WORD DONE?
   3607	010564	002312 				BGE	10$		; NOT YET
   3608	010566	111237 	001306'			MOVB	@R2,DFCBF+4	; GET DATA FOR DEPOSIT
   3609	010572	106237 	001306'			ASRB	DFCBF+4		; SHIFT DATA
   3610	010576	106037 	001305'			RORB	DFCBF+3		; TO EBUS BITS
   3611	010602	106237 	001306'			ASRB	DFCBF+4
   3612	010606	106037 	001305'			RORB	DFCBF+3
   3613	010612	012701 	001302'			MOV	#DFCBF,R1	; DATA ADDRESS IN R1
   3614	010616	012700 	053000 			MOV	#.LCRM5,R0	; DISP 00-04
   3615	010622					CALLR	$DFWR
	010622	000137 	021610'			 JMP	$DFWR
   3616	010626				70$:	RETURN
	010626	000207 				 RTS	PC
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 82
$RCRAM	-- READ C-RAM WORD

   3618						.SBTTL	$RCRAM	-- READ C-RAM WORD
   3619					;+
   3620					; READ C-RAM WORD ADDRESSED BY R0 AND COMPRESS IT INTO AREA POINTED
   3621					; TO BY R1.
   3622					;
   3623					; INPUTS:
   3624					;	R1	- 6 WORD BUFFER TO RECIEVE COMPRESSED C-RAM WORD.
   3625					;	R0	- C-RAM ADDRESS OF WORD TO READ.
   3626					;
   3627					; OUTPUT:
   3628					;	CARRY SET IF ERROR OCCURS.
   3629					;-
   3630
   3631	010630	004537 	000356'		$RCRAM::JSR	R5,$RSAVE
   3632	010634					TRACK	CR
	010634	004037 	010646'			 JSR	R0,64$
	010640	051103 				 .WORD	"CR
	010642	000000 				 .WORD
	010644	000000 				 .WORD
	010646	004737 	000424'		64$:	 JSR	PC,$TRACK
	010652	012600 				 MOV	(SP)+,R0
   3633	010654					CALL	$ACRAM		; SET EBOX TO C-RAM ADDRESS ZERO.
	010654	004737 	011232'			 JSR	PC,$ACRAM
   3634	010660	103421 				BCS	30$		; ERROR
   3635	010662	012700 	003000 			MOV	#.SECLK,R0	; SINGLE STEP EBUS CLOCK
   3636	010666					CALL	$DFXC
	010666	004737 	022006'			 JSR	PC,$DFXC
   3637	010672	103414 				BCS	30$		; ERROR
   3638	010674	016603 	000004 		10$:	MOV	4(SP),R3	; GET BUF ADR FOR C-RAM CONTENTS
   3639	010700	062703 	000012 			ADD	#12,R3		; POINT TO END.
   3640	010704	012704 	001262'			MOV	#DFCRFL,R4
   3641	010710	012400 			20$:	MOV	(R4)+,R0	; DIAG FUNCTIONS
   3642	010712	012701 	001302'			MOV	#DFCBF,R1	; DATA HOLDING AREA
   3643	010716					CALL	$DFRD		; READ DATA
	010716	004737 	021502'			 JSR	PC,$DFRD
   3644	010722	103002 				BCC	40$		; OK
   3645	010724	000137 	011230'		30$:	JMP	140$		; READ ERORR
   3646	010730	013701 	001302'		40$:	MOV	DFCBF,R1	; GET STRETCHED BITS 8-19
   3647	010734	013702 	001304'			MOV	DFCBF+2,R2	; GET STRETCHED BITS 0-7
   3648	010740	005000 				CLR	R0		; USE R0  AS WORK REG
   3649	010742	000261 				SEC			; SET C-BIT AS DONE BIT
   3650	010744	006000 				ROR	R0		; AND ROLL IT INTO R0
   3651	010746	012705 	000004 		50$:	MOV	#4,R5		; FOUR BITS PER GROUP
   3652	010752	005305 			60$:	DEC	R5		; DONE A GROUP?
   3653	010754	002405 				BLT	70$		; NO
   3654	010756	006202 				ASR	R2		; ROTATE SOURCE BITS RIGHT 1 PLACE
   3655	010760	006001 				ROR	R1		; ALL 20 OF THEM
   3656	010762	006000 				ROR	R0		; BEGIN WITH 1ST FLAG INTO R0
   3657	010764	103406 				BCS	80$		; IF C-BIT DETECTED, DONE
   3658	010766	000771 				BR	60$
   3659	010770	006202 			70$:	ASR	R2		; HERE TO SHIFT AWAY
   3660	010772	006001 				ROR	R1		; THE PAIR
   3661	010774	006202 				ASR	R2		; OF BLANKS HIDDEN
   3662	010776	006001 				ROR	R1		; AMIDST THE REAL DATA
   3663	011000	000762 				BR	50$		; AND CONTINUE
   3664	011002	006201 			80$:	ASR	R1		; MAKE LAST BLANKS TO GO AWAY
   3665	011004	006201 				ASR	R1
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 82-1
$RCRAM	-- READ C-RAM WORD

   3666	011006	010037 	001302'			MOV	R0,DFCBF
   3667	011012	010137 	001304'			MOV	R1,DFCBF+2	; STORE RESULTS IN CORE
   3668	011016	012700 	001305'			MOV	#DFCBF+3,R0	; ADDRESS OF DATA JUST READ
   3669	011022	114043 				MOVB	-(R0),-(R3)	; BITS 16-19 TO BUFFER
   3670	011024	105737 	001307'			TSTB	DFCFL2		; CHECK IF BOUNDARY IS RIGHT
   3671	011030	001005 				BNE	100$		; YES, GO FIX BOUNDARY
   3672	011032	114043 			90$:	MOVB	-(R0),-(R3)	; BITS 20-27 TO WORK AREA
   3673	011034	114043 				MOVB	-(R0),-(R3)	; BITS 28-35 TO WORK AREA
   3674	011036	105137 	001307'			COMB	DFCFL2		; CHANGE SIGNAL
   3675	011042	000722 				BR	20$		; GET MORE DATA
   3676	011044	106313 			100$:	ASLB	@R3		; FIX A HALF-BYTE
   3677	011046	106313 				ASLB	@R3
   3678	011050	106313 				ASLB	@R3
   3679	011052	106313 				ASLB	@R3
   3680	011054	012705 	000004 			MOV	#4,R5
   3681	011060	010302 			110$:	MOV	R3,R2		; ADDR OF DATA TO R2
   3682	011062	106122 				ROLB	(R2)+		; SHIFT INCLUDING C-BIT
   3683	011064	106122 				ROLB	(R2)+
   3684	011066	106122 				ROLB	(R2)+
   3685	011070	106122 				ROLB	(R2)+
   3686	011072	077506 				SOB	R5,110$		; ASSEMBLED COMPLETE HALF-BYTE
   3687	011074	105723 				TSTB	(R3)+		; FIX HOLDING AREA ADR
   3688	011076	105737 	001310'			TSTB	DFCFL3		; CHECK SIGNAL
   3689	011102	001003 				BNE	120$		; DONE IF MINUS
   3690	011104	105137 	001310'			COMB	DFCFL3
   3691	011110	000750 				BR	90$		; CONTINUE
   3692	011112	113743 	001303'		120$:	MOVB	DFCBF+1,-(R3)	; ENDING UP
   3693	011116	113743 	001302'			MOVB	DFCBF,-(R3)	; C-RAM BITS 0-15 TO BUFFER
   3694	011122	105037 	001310'			CLRB	DFCFL3		; RESET DFCFL3 TO ZERO
   3695	011126	105037 	001307'			CLRB	DFCFL2		; SAME TO DFCFL2
   3696	011132	012700 	141000 			MOV	#.RCSPF,R0	; READ SPEC FIELD FUNC
   3697	011136	012701 	001302'			MOV	#DFCBF,R1
   3698	011142					CALL	$DFRD		; READ DATA
	011142	004737 	021502'			 JSR	PC,$DFRD
   3699	011146	103430 				BCS	140$
   3700	011150	016100 	000004 			MOV	4(R1),R0	; GET DISP 00-02 - DEXWD1
   3701	011154	016101 	000002 			MOV	2(R1),R1	; GET DISP 03-04 - DEXWD2
   3702	011160	006101 				ROL	R1
   3703	011162	006100 				ROL	R0
   3704	011164	006101 				ROL	R1
   3705	011166	006100 				ROL	R0		; JUSTIFY IN R0
   3706	011170	042700 	177700 			BIC	#^C77,R0	; CLEAR TRASH
   3707	011174	105737 	000034'			TSTB	.EASW		; AND IF MODEL A CPU,
   3708	011200	003002 				BGT	130$
   3709	011202	042700 	177740 			BIC	#^C37,R0	; CLEAR MORE TRASH.
   3710	011206	016601 	000004 		130$:	MOV	4(SP),R1	; GET RECIEVING ADDRESS BACK.
   3711	011212	110061 	000012 			MOVB	R0,12(R1)	; SAVE IN BUFFER
   3712	011216	042721 	052525 			BIC	#052525,(R1)+	; CLEAR PARITY BITS
   3713	011222	042711 	000005 			BIC	#000005,(R1)
   3714	011226	000241 				CLC
   3715	011230				140$:	RETURN
	011230	000207 				 RTS	PC
KLIFC -- C-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 83
$ACRAM	-- ADDRESS C-RAM WORD

   3717						.SBTTL	$ACRAM	-- ADDRESS C-RAM WORD
   3718					;+
   3719					; SET THE M-BOX TO THE C-RAM ADDRESS SPECIFIED BY R0.
   3720					;
   3721					; INPUT:
   3722					;	R0	- ADDRESS OF C-RAM WORD TO ACCESS.
   3723					;
   3724					; OUTPUT:
   3725					;	CARRY SET IF ERROR OCCURS.
   3726					;-
   3727
   3728	011232				$ACRAM::PUSH	<R1,R0>
	011232	010146 				 MOV	R1,-(SP)
	011234	010046 				 MOV	R0,-(SP)
   3729	011236					TRACK	CA
	011236	004037 	011250'			 JSR	R0,64$
	011242	040503 				 .WORD	"CA
	011244	000000 				 .WORD
	011246	000000 				 .WORD
	011250	004737 	000424'		64$:	 JSR	PC,$TRACK
	011254	012600 				 MOV	(SP)+,R0
   3730	011256					CALL	$KLSR		; DO A SOFT RESET
	011256	004737 	022674'			 JSR	PC,$KLSR
   3731	011262	103423 				BCS	9$		; ERROR
   3732	011264	012701 	001311'			MOV	#DFCABF,R1
   3733	011270					CALL	LFCSAB		; LOAD EBUS BITS 00-05
	011270	004737 	011340'			 JSR	PC,LFCSAB
   3734	011274	012700 	052000 			MOV	#.LCRDL,R0	; CRAM DIAG ADR 00-04
   3735	011300					CALL	$DFWR		; DO A WRITE
	011300	004737 	021610'			 JSR	PC,$DFWR
   3736	011304	011600 				MOV	(SP),R0		; RESTORE C-RAM ADR
   3737	011306	103411 				BCS	9$		; ERROR
   3738	011310	000300 				SWAB	R0		; GET BITS 00-04
   3739	011312	006200 				ASR	R0		; TO LOW-ORDER BITS OF R0
   3740	011314	006200 				ASR	R0
   3741	011316					CALL	LFCSAB		; LOAD EBUS BITS 00-05
	011316	004737 	011340'			 JSR	PC,LFCSAB
   3742	011322	012700 	051000 			MOV	#.LCRDR,R0	; CRAM DIAG ADR 05-10
   3743	011326					CALL	$DFWR		; DO ANOTHER WRITE
	011326	004737 	021610'			 JSR	PC,$DFWR
   3744	011332				9$:	POP	<R0,R1>
	011332	012600 				 MOV	(SP)+,R0
	011334	012601 				 MOV	(SP)+,R1
   3745	011336					RETURN
	011336	000207 				 RTS	PC
   3746
   3747	011340	042700 	000077 		LFCSAB:	BIC	#77,R0		; DEAL ONLY WITH 6 BITS
   3748	011344	110037 	001314'			MOVB	R0,DFCABF+3	; TO EBUS BITS 4 & 5
   3749	011350	000300 				SWAB	R0
   3750	011352	110037 	001315'			MOVB	R0,DFCABF+4	; TO EBUS BITS 0,1,2, AND 3
   3751	011356					RETURN
	011356	000207 				 RTS	PC
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 84
$ACRAM	-- ADDRESS C-RAM WORD

   3753						.TITLE	KLIFD -- D-RAM READ/WRITE
   3754	011360					IDENT$	5,0
						.IDENT	/005000/
   3755					;
   3756					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   3757					;
   3758					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   3759					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   3760					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   3761					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   3762					;
   3763					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   3764					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   3765					; EQUIPMENT CORPORATION.
   3766					;
   3767					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   3768					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3769					;
   3770					; VERSION 05-00
   3771					;
   3772					; ALAN D. PECKHAM  11-APR-77
   3773					;
   3774					; MODIFIED BY:
   3775					;
   3776					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO WORK WITH THE D-RAMS.
   3777					;  THE D-RAM DATA IS PASSED IN THE 3-WORD COMPRESSED FORMAT SPECIFIED
   3778					;  IN THE DOCUMENTATION FOR KLDCP.
   3779					;
   3780					; LOCAL DATA
   3781					;
   3782	001316					.PSECT	DATA,D
   3783						.EVEN			; DFDDBF MUST BE ON AN EVEN BOUNDRY.
   3784	001316				DFDDBF:	WD36$	0 0		; DATA WORK AREA.
	001316	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001321	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3785	001323				DFDABF:	WD36$	0 0		; ADDRESS WORK AREA.
	001323	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001326	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3786						.EVEN
   3787	011360					.PSECT
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 85
$WDRAM	-- WRITE D-RAM WORD

   3789						.SBTTL	$WDRAM	-- WRITE D-RAM WORD
   3790					;+
   3791					; WRITE THE COMPRESSED D-RAM WORD POINTED TO BY R1 INTO THE D-RAM ADDRESS
   3792					; POINTED TO BY R0.
   3793					;
   3794					; INPUTS:
   3795					;	R1	- POINTER TO COMPRESSED D-RAM DATA WORD
   3796					;	R0	- D-RAM ADDRESS TO WRITE DATA INTO.
   3797					;
   3798					; OUTPUTS:
   3799					;	CARRY IS SET IF ERROR OCCURS.
   3800					;-
   3801
   3802	011360	004537 	000356'		$WDRAM::JSR	R5,$RSAVE
   3803	011364					TRACK	DW
	011364	004037 	011376'			 JSR	R0,64$
	011370	053504 				 .WORD	"DW
	011372	000000 				 .WORD
	011374	000000 				 .WORD
	011376	004737 	000424'		64$:	 JSR	PC,$TRACK
	011402	012600 				 MOV	(SP)+,R0
   3804	011404	006000 				ROR	R0		; CHECK IF EVEN OR ODD
   3805	011406	103423 				BCS	10$		; C-BIT NOT SET MEANS EVEN
   3806	011410	006100 				ROL	R0		; RESTORE ADR
   3807	011412	010104 				MOV	R1,R4		; SAVE DATA POINTER
   3808	011414					CALL	$ADRAM		; WRITE D-RAM ADDRESS
	011414	004737 	011750'			 JSR	PC,$ADRAM
   3809	011420	103416 				BCS	10$		; ERROR
   3810	011422	012401 				MOV	(R4)+,R1
   3811	011424					CALL	30$		; WRITE EVEN DATA
	011424	004737 	011472'			 JSR	PC,30$
   3812	011430	103412 				BCS	10$
   3813	011432	012401 				MOV	(R4)+,R1	; MORE DATA TO R1
   3814	011434					CALL	20$		; WRITE ODD DATA
	011434	004737 	011460'			 JSR	PC,20$
   3815	011440	103406 				BCS	10$
   3816	011442	011401 				MOV	(R4),R1
   3817					;
   3818					;	COMMON PART OF LOADING OF THE D-RAM
   3819					;
   3820	011444	012700 	062000 			MOV	#.LDRM3,R0	; COMMON J01-04
   3821	011450	006301 				ASL	R1
   3822	011452	006301 				ASL	R1		; JUSTIFY DATA FOR EBUS
   3823	011454	000423 				BR	LFDWFN
   3824	011456				10$:	RETURN
	011456	000207 				 RTS	PC
   3825	011460	012703 	061000 		20$:	MOV	#.LDRM2,R3	; DRAM FUNC FOR J-FIELD A & B
   3826	011464	012700 	064000 			MOV	#.LDRJD,R0	; J-FIELD ODD
   3827	011470	000404 				BR	40$
   3828	011472	012703 	060000 		30$:	MOV	#.LDRM1,R3	; DRAM FUNC FOR J-FILED
   3829	011476	012700 	063000 			MOV	#.LDRJV,R0	; J-FILED EVEN
   3830	011502	006301 			40$:	ASL	R1		; JUSTIFY J-FIELD DATA
   3831	011504	006301 				ASL	R1
   3832	011506					PUSH	R1
	011506	010146 				 MOV	R1,-(SP)
   3833	011510					CALL	LFDWFN		; WRITE J-DATA
	011510	004737 	011524'			 JSR	PC,LFDWFN
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 85-1
$WDRAM	-- WRITE D-RAM WORD

   3834	011514					POP	R1
	011514	012601 				 MOV	(SP)+,R1
   3835	011516	103757 				BCS	10$		; ERROR
   3836	011520	000301 				SWAB	R1		; GOT A & B
   3837	011522	010300 				MOV	R3,R0		; GOT CORRECT DIAG FUNC & WRITE
   3838	011524	110137 	001320'		LFDWFN:	MOVB	R1,DFDDBF+2	; R1 HAS THE DATA
   3839	011530	012701 	001316'			MOV	#DFDDBF,R1	; DATA ADR
   3840	011534					CALLR	$DFWR		; WRITE IT
	011534	000137 	021610'			 JMP	$DFWR
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 86
$RDRAM	-- READ D-RAM WORD

   3842						.SBTTL	$RDRAM	-- READ D-RAM WORD
   3843					;+
   3844					; READ THE D-RAM WORD ADDRESSED BY R0 INTO THE DATA BUFFER POINTED TO
   3845					; BY R1. THE DATA IS COMPRESSED DURING THE READ.
   3846					;
   3847					; INPUTS:
   3848					;	R1	- POINTER TO BUFFER TO RECIEVE D-RAM WORD.
   3849					;	R0	- D-RAM ADDRESS TO READ DATA FROM.
   3850					;
   3851					; OUTPUTS:
   3852					;	CARRY IS SET IF ERROR OCCURS.
   3853					;-
   3854
   3855	011540	004537 	000356'		$RDRAM::JSR	R5,$RSAVE
   3856	011544					TRACK	DR
	011544	004037 	011556'			 JSR	R0,64$
	011550	051104 				 .WORD	"DR
	011552	000000 				 .WORD
	011554	000000 				 .WORD
	011556	004737 	000424'		64$:	 JSR	PC,$TRACK
	011562	012600 				 MOV	(SP)+,R0
   3857	011564	010104 				MOV	R1,R4		; SAVE RECIEVING ADDRESS.
   3858	011566	010103 				MOV	R1,R3
   3859	011570	005002 				CLR	R2		; CLEAR LOOP SWITCH.
   3860	011572				10$:	CALL	$ADRAM		; WRITE D-RAM ADR
	011572	004737 	011750'			 JSR	PC,$ADRAM
   3861	011576	103463 				BCS	30$
   3862	011600	012700 	015000 			MOV	#.DRLTC,R0	; UNLATCH THE DRAM REG
   3863	011604					CALL	$DFXC
	011604	004737 	022006'			 JSR	PC,$DFXC
   3864	011610	103456 				BCS	30$
   3865	011612	012701 	001316'			MOV	#DFDDBF,R1
   3866	011616	012700 	135000 			MOV	#.RDJ71,R0	; FUNC TO READ J07-10
   3867	011622					CALL	$DFRD		; READ DATA
	011622	004737 	021502'			 JSR	PC,$DFRD
   3868	011626	103447 				BCS	30$		; TIMEOUT ERROR
   3869	011630	016100 	000002 			MOV	2(R1),R0	; GET DATA J07-10 - DEXWD2
   3870	011634	006200 				ASR	R0
   3871	011636	006200 				ASR	R0		; RIGHT JUSTIFIED J-DATA
   3872	011640	042700 	177700 			BIC	#^C77,R0	; CLEAR TRASH
   3873	011644	110023 				MOVB	R0,(R3)+	; SAVE IT IN CORE
   3874	011646	012700 	133000 			MOV	#.RDMAB,R0	; FUNC TO READ A & B FIELD
   3875	011652					CALL	$DFRD		; READ DATA
	011652	004737 	021502'			 JSR	PC,$DFRD
   3876	011656	103433 				BCS	30$
   3877	011660	016100 	000002 			MOV	2(R1),R0	; GET A & B DATA - DEXWD2
   3878	011664	006200 				ASR	R0
   3879	011666	006200 				ASR	R0		; RIGHT JUSTIFIED DATA
   3880	011670	042700 	177700 			BIC	#^C77,R0	; CLEAR EXTRA
   3881	011674	110023 				MOVB	R0,(R3)+	; SAVE IT IN CORE
   3882	011676	005102 				COM	R2		; IS THIS THE SECOND TIME ?
   3883	011700	001404 				BEQ	20$		; GET OUT IF YES
   3884	011702	016600 	000002 			MOV	2(SP),R0	; GET DRAM ADR
   3885	011706	005200 				INC	R0		; GET ODD HALF OF EVEN/ODD PAIR
   3886	011710	000730 				BR	10$		; LOOP AGAIN
   3887	011712	012700 	134000 		20$:	MOV	#.RDJ14,R0	; FUNC TO READ J01-04
   3888	011716					CALL	$DFRD		; READ DATA
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 86-1
$RDRAM	-- READ D-RAM WORD

	011716	004737 	021502'			 JSR	PC,$DFRD
   3889	011722	103411 				BCS	30$
   3890	011724	016100 	000002 			MOV	2(R1),R0	; GET J01-04 DATA - DEXWD2
   3891	011730	006200 				ASR	R0
   3892	011732	006200 				ASR	R0		; RIGHT JUSTIFIED DATA
   3893	011734	042700 	177760 			BIC	#^C17,R0	; CLEAR EXTRA
   3894	011740	110064 	000004 			MOVB	R0,4(R4)	; BIT SET TO CORE
   3895	011744	000241 				CLC
   3896	011746				30$:	RETURN
	011746	000207 				 RTS	PC
KLIFD -- D-RAM READ/WRITE	MACRO M1108  13-JAN-78 10:41  PAGE 87
$ADRAM	-- ADDRESS D-RAM WORD

   3898						.SBTTL	$ADRAM	-- ADDRESS D-RAM WORD
   3899					;+
   3900					; SET E-BOX TO SPECIFIED D-RAM ADDRESS FOR WRITTING OR READING.
   3901					;
   3902					; INPUT:
   3903					;	R0	- ADDRESS TO ACCESS.
   3904					;
   3905					; OUTPUT:
   3906					;	CARRY IS SET IF ERROR OCCURS.
   3907					;-
   3908
   3909	011750	004537 	000356'		$ADRAM::JSR	R5,$RSAVE
   3910	011754					TRACK	DA
	011754	004037 	011766'			 JSR	R0,64$
	011760	040504 				 .WORD	"DA
	011762	000000 				 .WORD
	011764	000000 				 .WORD
	011766	004737 	000424'		64$:	 JSR	PC,$TRACK
	011772	012600 				 MOV	(SP)+,R0
   3911	011774	012704 	001325'			MOV	#DFDABF+2,R4
   3912	012000	012703 	001323'			MOV	#DFDABF,R3	;GET ADR OF EBUS DATA
   3913	012004	010002 				MOV	R0,R2		;DRAM ADR IN R2
   3914	012006	005100 				COM	R0		;READY TO TEST ADR BITS 0-2
   3915	012010	032700 	000700 			BIT	#700,R0		;TESTING!
   3916	012014	001410 				BEQ	10$		;BR IF ADR IS 7XX
   3917	012016	006302 				ASL	R2
   3918	012020	006302 				ASL	R2
   3919	012022	006302 				ASL	R2		;LEFT SHIFT 3 POSITIONS
   3920	012024	105024 				CLRB	(R4)+		;INCREMENT TO DFDABF+3
   3921	012026	110224 				MOVB	R2,(R4)+	;MOVE ADR BITS 4-8 TO EBUS DATA
   3922	012030	000302 				SWAB	R2
   3923	012032	110214 				MOVB	R2,@R4		;MOVE ADR BITS 0-3 TO EBUS DATA
   3924	012034	000413 				BR	40$
   3925	012036	006002 			10$:	ROR	R2		;BIT1 TO C-BIT
   3926	012040	103402 				BCS	20$		;C BIT SET MEANS IR BIT 12 MUST BE 1
   3927	012042	105024 				CLRB	(R4)+		;NO C-BIT MEANS IR BIT 12 MUST BE 0
   3928	012044	000402 				BR	30$		;MOVE ADR TO EBUS DATA
   3929	012046	112724 	000200 		20$:	MOVB	#200,(R4)+	;SET IR BIT 12=1
   3930	012052	042702 	000340 		30$:	BIC	#340,R2
   3931	012056	110224 				MOVB	R2,(R4)+	;MOVE D-RAM ADR TO EBUS BIT POSITION 7-11
   3932	012060	112714 	000016 			MOVB	#16,@R4		;SET THE 7 FROM 7XX IN EBUS DATA
   3933	012064				40$:	CALL	$KLSR		;DO A SOFT RESET
	012064	004737 	022674'			 JSR	PC,$KLSR
   3934	012070	103413 				BCS	50$
   3935	012072	012701 	001323'			MOV	#DFDABF,R1	;EBUS DATA ADR
   3936	012076	012700 	077000 			MOV	#.LDAR,R0	;LOAD THE AR FROM EBUS 0-35
   3937	012102					CALL	$DFWR		;DO THE ACTUAL WRITE
	012102	004737 	021610'			 JSR	PC,$DFWR
   3938	012106	103404 				BCS	50$
   3939	012110	012700 	014000 			MOV	#.IRLTC,R0	;UNLATCH IR AND LOAD IT FROM AD
   3940	012114					CALLR	$DFXC		;EXECUTE IT
	012114	000137 	022006'			 JMP	$DFXC
   3941	012120				50$:	RETURN
	012120	000207 				 RTS	PC
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 88
$ADRAM	-- ADDRESS D-RAM WORD

   3943						.TITLE	KLICA -- LOAD CACHE REFILL RAM
   3944	012122					IDENT$	5,1
						.IDENT	/005010/
   3945					;
   3946					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   3947					;
   3948					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   3949					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   3950					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   3951					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   3952					;
   3953					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   3954					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   3955					; EQUIPMENT CORPORATION.
   3956					;
   3957					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   3958					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3959					;
   3960					; VERSION 05-01
   3961					;
   3962					; ALAN D. PECKHAM  8-APR-77
   3963					;
   3964					; MODIFIED BY:
   3965					;
   3966					; FUNCTION: COMPUTE THE REFILL ALGORITHM FOR THE GIVEN CACHE CONFIGURATION
   3967					;  AND WRITE IT TO THE CACHE REFILL RAM.
   3968					;
   3970					; EQUATED SYMBOLS
   3971					;
   3972		000000 			APR	=	0		; KL DEVICE.
   3973		000002 			BLKO	=	2		; KL I/O SUBFUNCTION CODE.
   3974		000014 			CCA	=	14		; KL DEVICE.
   3975		000004 			CONO	=	4		; KL I/O SUBFUNCTION CODE.
   3976		000001 			DATAI	=	1		; KL I/O SUBFUNCTION CODE.
   3977		000540 			HRR	=	540		; KL INSTRUCTION CODE.
   3978		000254 			JRST	=	254		; KL INSTRUCTION CODE.
   3979		000322 			JUMPE	=	322		; KL INSTRUCTION CODE.
   3980		000010 			PAG	=	10		; KL DEVICE.
   3981		000400 			SETZ	=	400		; KL INSTRUCTION CODE.
   3982					;
   3983					; LOCAL DATA
   3984					;
   3985	001330					.PSECT	DATA,D
   3986						.ODD			; DCAWRF MUST BE ON EVEN BOUNDRY.
   3987	001331	   000 	   000 	   010 	DCAPGM:	.BYTE	0,0,10		; LOAD AC0-AC7 OF AC SET 0.
   3988	001334					WD36$	0 0		; AC0
	001334	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001337	   000 	   000 			 .BYTE	BY$$3,BY$$4
   3989	001341				DCASIA:	IO10$	DATAI CCA,,0	; AC1 - A SWPIA INSTRUCTION.
	001341	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	001344	   014 	   016 			 .BYTE	BY$$3,BY$$4
   3990	001346				DCARCA:	IO10$	CONO PAG,,0	; AC2 - RESET CACHE & PAGING STATUS.
	001346	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001351	   012 	   016 			 .BYTE	BY$$3,BY$$4
   3991	001353					I10$	JUMPE 0,,3	; AC3
	001353	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001356	   220 	   006 			 .BYTE	BY$$3,BY$$4
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 88-1
$ADRAM	-- ADDRESS D-RAM WORD

   3992	001360					I10$	HRR 6,,0	; AC4
	001360	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001363	   003 	   013 			 .BYTE	BY$$3,BY$$4
   3993	001365					I10$	SETZ 0,,0	; AC5
	001365	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001370	   000 	   010 			 .BYTE	BY$$3,BY$$4
   3994	001372				DCAWRF:	IO10$	BLKO APR,,0	; AC6 - WRFIL INSTRUCTION.
	001372	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001375	   001 	   016 			 .BYTE	BY$$3,BY$$4
   3995	001377					I10$	JRST 0,,3	; AC7
	001377	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001402	   140 	   005 			 .BYTE	BY$$3,BY$$4
   3996	001404	   000 	   001 	   377 		.BYTE	0,1,-1		; START AT AC1 OF AC SET 0.
   3997	001407				DCARFL:	.BLKB	5		; WORK TABLE.
   3998						.EVEN
   3999	002672					.PSECT	TEXT,D
   4000	002672				TCACEF:	ERROR	<CACHE ENABLE FAILED>
	002672	   077 	   040 	   103 		 .ASCIZ	\? CACHE ENABLE FAILED\
	002675	   101 	   103 	   110
	002700	   105 	   040 	   105
	002703	   116 	   101 	   102
	002706	   114 	   105 	   040
	002711	   106 	   101 	   111
	002714	   114 	   105 	   104
	002717	   000
   4001	002720				TCAACE:	MESSAGE	<ALL CACHES ENABLED>
	002720	   101 	   114 	   114 		 .ASCIZ	\ALL CACHES ENABLED\
	002723	   040 	   103 	   101
	002726	   103 	   110 	   105
	002731	   123 	   040 	   105
	002734	   116 	   101 	   102
	002737	   114 	   105 	   104
	002742	   000
   4002	002743				TCASCE:	MESSAGE	<CACHES X,X,X, ENABLED>
	002743	   103 	   101 	   103 		 .ASCIZ	\CACHES X,X,X, ENABLED\
	002746	   110 	   105 	   123
	002751	   040 	   130 	   054
	002754	   130 	   054 	   130
	002757	   054 	   040 	   105
	002762	   116 	   101 	   102
	002765	   114 	   105 	   104
	002770	   000
   4003	002771				TCAACD:	MESSAGE	<CACHES DISABLED>
	002771	   103 	   101 	   103 		 .ASCIZ	\CACHES DISABLED\
	002774	   110 	   105 	   123
	002777	   040 	   104 	   111
	003002	   123 	   101 	   102
	003005	   114 	   105 	   104
	003010	   000
   4004	012122					.PSECT
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 89
$SETCA	-- CONFIGURE CACHE

   4006						.SBTTL	$SETCA	-- CONFIGURE CACHE
   4007					;+
   4008					; INITIALIZE THE CACHE REFILL RAM IF CACHE IS TO BE TURNED ON AND
   4009					; REPORT THE CACHE STATUS.
   4010					;
   4011					; INPUTS:
   4012					;	.NCACH	- NUMBER OF CACHES TO BE USED.
   4013					;	.CACHN	- NUMBERS OF THE CACHES TO BE USED.
   4014					;
   4015					; OUTPUTS:
   4016					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   4017					;-
   4018
   4019	012122	012700 	001331'		$SETCA::MOV	#DCAPGM,R0	; GET OUR KL PROGRAM
   4020	012126					CALL	$LDNGO		; LOAD AND START IT.
	012126	004737 	000000G			 JSR	PC,$LDNGO
   4021	012132	103564 				BCS	200$
   4022	012134	105737 	000040'			TSTB	.NCACH		; IF NO CACHES WERE REQUESTED
   4023	012140	003557 				BLE	190$		; THEN NO ACTION NECESSARY.
   4024	012142	012701 	001374'			MOV	#DCAWRF+2,R1	; GET DATA AREA AND
   4025	012146	042711 	000003 			BIC	#3,(R1)		; CLEAR IT OUT.
   4026	012152	005041 				CLR	-(R1)
   4027	012154	005005 				CLR	R5		; +++001 R5 >MUST< INITIALLY BE CLEAR!!!
   4028	012156	113700 	000041'			MOVB	.CACHN,R0	; SET LRU IN CASE OF SINGLE CACHE.
   4029	012162	006200 				ASR	R0		; SHIFT LOW ORDER BIT
   4030	012164	103002 				BCC	20$		; INTO KL INSTRUCTION -
   4031	012166	052711 	100000 			BIS	#100000,(R1)	; (KIND OF A HACK....)
   4032	012172	050061 	000002 		20$:	BIS	R0,2(R1)	; INSTALL REST.
   4033									; INITIALIZE COUNTERS:
   4034	012176	105003 				CLRB	R3		; NEW CACHE NUMBER.
   4035	012200	105004 			30$:	CLRB	R4		; MRU CACHE.
   4036	012202	105005 			40$:	CLRB	R5		; LRU CACHE
   4037	012204	122737 	000001 	000040'	50$:	CMPB	#1,.NCACH	; ONLY ONE CACHE ?
   4038	012212	001504 				BEQ	180$		; YES, BYPASS THIS STUFF.
   4039	012214	042721 	100000 			BIC	#100000,(R1)+	; CLEAR OUT DATA BITS.
   4040	012220	042711 	000003 			BIC	#000003,(R1)
   4041	012224	012702 	001407'			MOV	#DCARFL,R2	; INITIALIZE TABLE.
   4042	012230	110522 				MOVB	R5,(R2)+	; LRU CACHE
   4043	012232	005000 				CLR	R0		; FIND LOW CACHE NUMBER
   4044	012234	000401 				BR	70$
   4045	012236	005200 			60$:	INC	R0
   4046	012240	120005 			70$:	CMPB	R0,R5
   4047	012242	001775 				BEQ	60$
   4048	012244	120004 				CMPB	R0,R4
   4049	012246	001773 				BEQ	60$
   4050	012250	012701 	000003 			MOV	#3,R1		; AND HIGH CACHE NUMBER
   4051	012254	000401 				BR	90$
   4052	012256	005301 			80$:	DEC	R1
   4053	012260	120105 			90$:	CMPB	R1,R5
   4054	012262	001775 				BEQ	80$
   4055	012264	120104 				CMPB	R1,R4
   4056	012266	001773 				BEQ	80$
   4057	012270	005705 				TST	R5		; AND INSTALL IN TABLE
   4058	012272	100003 				BPL	100$		; AS INTERMEDIATE CACHES.
   4059	012274	110022 				MOVB	R0,(R2)+
   4060	012276	110122 				MOVB	R1,(R2)+
   4061	012300	000402 				BR	110$
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 89-1
$SETCA	-- CONFIGURE CACHE

   4062	012302	110122 			100$:	MOVB	R1,(R2)+
   4063	012304	110022 				MOVB	R0,(R2)+
   4064	012306	110422 			110$:	MOVB	R4,(R2)+	; MRU CACHE
   4065	012310	110312 				MOVB	R3,(R2)		; NEW CACHE.
   4066	012312	120342 			120$:	CMPB	R3,-(R2)	; ADJUST LIST TO REFLECT
   4067	012314	001376 				BNE	120$		; NEW CACHE IN USE.
   4068	012316	022702 	001407'			CMP	#DCARFL,R2
   4069	012322	003402 				BLE	130$
   4070	012324	012702 	001407'			MOV	#DCARFL,R2
   4071	012330	116222 	000001 		130$:	MOVB	1(R2),(R2)+
   4072	012334	022702 	001413'			CMP	#DCARFL+4,R2
   4073	012340	003373 				BGT	130$
   4074	012342	012702 	001407'			MOV	#DCARFL,R2	; NOW, SCREEN OUT
   4075	012346	012701 	000041'		140$:	MOV	#.CACHN,R1	; UNWANTED LRUS.
   4076	012352	113700 	000040'			MOVB	.NCACH,R0
   4077	012356	122112 			150$:	CMPB	(R1)+,(R2)
   4078	012360	001403 				BEQ	160$
   4079	012362	077003 				SOB	R0,150$
   4080	012364	005202 				INC	R2
   4081	012366	000767 				BR	140$
   4082	012370	012701 	001372'		160$:	MOV	#DCAWRF,R1
   4083	012374	112200 				MOVB	(R2)+,R0	; GET LRU AND
   4084	012376	006200 				ASR	R0		; SHIFT LOW ORDER BIT
   4085	012400	103002 				BCC	170$		; INTO KL INSTRUCTION -
   4086	012402	052711 	100000 			BIS	#100000,(R1)	; (KIND OF A HACK....)
   4087	012406	050061 	000002 		170$:	BIS	R0,2(R1)	; INSTALL REST OF LRU.
   4088	012412	122212 				CMPB	(R2)+,(R2)	; CHECK ORDER AND
   4089	012414	003003 				BGT	180$
   4090	012416	052761 	000002 	000002 		BIS	#000002,2(R1)	; AND INSTALL IT.
   4091	012424	012700 	000000'		180$:	MOV	#.ZERO,R0	; GIVE THE DATA TO THE AC PROGRAM
   4092	012430					CALL	$DPOS		; TO STORE IN THE REFILL RAM.
	012430	004737 	022136'			 JSR	PC,$DPOS
   4093	012434	103423 				BCS	200$
   4094	012436	062711 	000004 			ADD	#4,(R1)		; INCREMENT THE COUNTS
   4095	012442	105205 				INCB	R5
   4096	012444	122705 	000003 			CMPB	#3,R5
   4097	012450	002255 				BGE	50$		; TO LOOP.
   4098	012452	105105 				COMB	R5
   4099	012454	005105 				COM	R5
   4100	012456	100651 				BMI	40$
   4101	012460	105204 				INCB	R4
   4102	012462	122704 	000003 			CMPB	#3,R4
   4103	012466	002245 				BGE	40$
   4104	012470	105203 				INCB	R3
   4105	012472	122703 	000003 			CMPB	#3,R3
   4106	012476	002240 				BGE	30$
   4107	012500				190$:	CALLR	LCARPT		; REPORT WHAT CACHES ENABLED.
	012500	000137 	012520'			 JMP	LCARPT
   4108	012504				200$:	PRINT	#TCACEF		; CACHE ENABLE FAILED.
	012504	012700 	002672'			 MOV	#TCACEF,R0
	012510	004737 	000000G			 JSR	PC,$TTMSG
   4109	012514	000261 				SEC
   4110	012516					RETURN
	012516	000207 				 RTS	PC
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 90
$SETCA	-- CONFIGURE CACHE

   4112					;+
   4113					; REPORT THE CACHE CONFIGURATION
   4114					;-
   4115
   4116	012520	012701 	002771'		LCARPT:	MOV	#TCAACD,R1	; GET MESSAGE FOR NO CACHE
   4117	012524	113702 	000040'			MOVB	.NCACH,R2	; AND IF NONE,
   4118	012530	003433 				BLE	80$		; PRINT THE MESSAGE.
   4119	012532	012701 	002720'			MOV	#TCAACE,R1	; USE ALL CACHE MESSAGE IF
   4120	012536	022702 	000004 			CMP	#4,R2		; ALL CACHES ARE BEING USED.
   4121	012542	003426 				BLE	80$
   4122	012544	012701 	002743'			MOV	#TCASCE,R1	; MUST BE A PARTIAL CONFIGURATION.
   4123	012550	010105 				MOV	R1,R5
   4124	012552	122725 	000123 		10$:	CMPB	#'S,(R5)+	; LOOK FOR PLACE TO
   4125	012556	001375 				BNE	10$
   4126	012560	122725 	000040 			CMPB	#' ,(R5)+	; INSERT CACHE NUMBERS.
   4127	012564	001372 				BNE	10$
   4128	012566	012703 	000041'			MOV	#.CACHN,R3
   4129	012572	112315 			20$:	MOVB	(R3)+,(R5)	; GET NEXT NUMBER
   4130	012574	152725 	000060 			BISB	#'0,(R5)+	; AND MAKE PRINTABLE.
   4131	012600	112725 	000054 			MOVB	#',,(R5)+
   4132	012604	077206 				SOB	R2,20$		; DO FOR ALL NUMBERS.
   4133	012606	111765 	177777 		30$:	MOVB	(PC),-1(R5)	; NOW CLEAN UP
   4134	012612	122725 	000040 			CMPB	#' ,(R5)+
   4135	012616	001373 				BNE	30$
   4136	012620				80$:	PRINT	R1
	012620	010100 				 MOV	R1,R0
	012622	004737 	000000G			 JSR	PC,$TTMSG
   4137	012626	000241 				CLC
   4138	012630				90$:	RETURN
	012630	000207 				 RTS	PC
KLICA -- LOAD CACHE REFILL RAM	MACRO M1108  13-JAN-78 10:41  PAGE 91
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

   4140						.SBTTL	$SWEEP	-- SWEEP AND INVALIDATE THE CACHE
   4141					;+
   4142					; SWEEP THE CACHE OUT AND TURN IT OFF.
   4143					;
   4144					; INPUTS:
   4145					;	.NCACH	- NUMBER OF CACHES CONFIGURED.
   4146					;	.CACHN	- NUMBERS OF THE CACHES ENABLED.
   4147					;
   4148					; NO OUTPUTS
   4149					;-
   4150
   4151	012632	105737 	000033'		$SWEEP::TSTB	.CASW		; CHECK CACHE CONDITION AND
   4152	012636	003415 				BLE	90$		; RETURN IF NO CACHE.
   4153	012640					PUSH	<R1,R0>
	012640	010146 				 MOV	R1,-(SP)
	012642	010046 				 MOV	R0,-(SP)
   4154	012644	012700 	001341'			MOV	#DCASIA,R0	; FIRST, INVALIDATE THE CACHE
   4155	012650					CALL	$EXCT		; WITH A SWPIA.
	012650	004737 	020344'			 JSR	PC,$EXCT
   4156	012654	103404 				BCS	80$
   4157	012656	012700 	001346'			MOV	#DCARCA,R0	; THEN TURN OFF CACHE LOOK & LOAD
   4158	012662					CALL	$EXCT		; WITH A CONO PAG,,0.
	012662	004737 	020344'			 JSR	PC,$EXCT
   4159	012666				80$:	POP	<R0,R1>
	012666	012600 				 MOV	(SP)+,R0
	012670	012601 				 MOV	(SP)+,R1
   4160	012672				90$:	RETURN
	012672	000207 				 RTS	PC
   4161
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 92
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

   4164						.TITLE	KLIXB -- LOAD THE KL BOOT
   4165	012674					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   4166					;
   4167					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4168					;
   4169					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4170					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4171					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4172					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4173					;
   4174					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4175					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4176					; EQUIPMENT CORPORATION.
   4177					;
   4178					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4179					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4180					;
   4181					; VERSION 05-01									; ADP01
   4182					;
   4183					; ALAN D. PECKHAM  8-APR-77
   4184					;
   4185					; MODIFIED BY:
   4186					;
   4187					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES WHICH LOAD THE KL BOOT
   4188					;  FROM THE FILE 'BOOT.EXB' OR AN OPERATOR SPECIFIED FILE.
   4189					;
   4190					; EQUATED SYMBOLS
   4191					;
   4192		000000 			APR	=	0		; KL DEVICE.
   4193		000004 			CONO	=	4		; KL I/O SUBFUNCTION CODE.
   4194		001000 			PAGE	=	1000		; PAGE SIZE (POWER OF 2).
   4195		000777 			PGBTS	=	PAGE-1		; PAGE BITS USED IN MASK.
   4196					;
   4197					; LOCAL DATA
   4198					;
   4199	001414					.PSECT	DATA,D
   4200	001414	007347 	076400 	000000 	DXBFNM:	.RAD50	/BOOT     EXB/	; BOOT DEFAULT FILE NAME.
	001422	021402
   4201	001424	000000 				.WORD	0		; GET LATEST VERSION.
   4202	001426	   005 	   005 			.BYTE	5,5
   4203	001430	054523 	000000 			.WORD	"SY,0
   4204	001434	000000 	000000 		DXBADR:	.WORD	0,0		; CURRENT DEPOSIT ADDRESS.
   4205	001440	000000 	000000 	000000 	DXBDAT:	.WORD	0,0,0		; DATA WORD TO DEPOSIT.
   4206	001446				DXBCNM:	IO10$	CONO APR,,22000	; TO CLEAR THE NXM BIT.
	001446	   000 	   044 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001451	   002 	   016 			 .BYTE	BY$$3,BY$$4
   4207						.EVEN
   4208	003011					.PSECT	TEXT,D
   4209	003011				TXBIMM:	ERROR	<INSUFFICIENT MEMORY FOR BOOTSTRAP>
	003011	   077 	   040 	   111 		 .ASCIZ	\? INSUFFICIENT MEMORY FOR BOOTSTRAP\
	003014	   116 	   123 	   125
	003017	   106 	   106 	   111
	003022	   103 	   111 	   105
	003025	   116 	   124 	   040
	003030	   115 	   105 	   115
	003033	   117 	   122 	   131
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 92-1
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

	003036	   040 	   106 	   117
	003041	   122 	   040 	   102
	003044	   117 	   117 	   124
	003047	   123 	   124 	   122
	003052	   101 	   120 	   000
   4210	012674					.PSECT
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 93
$EXBLD	-- LOAD THE BOOT

   4212						.SBTTL	$EXBLD	-- LOAD THE BOOT
   4213					;+
   4214					; PROCESS THE KL BOOTSTRAP FILE (.EXB)
   4215					; THIS ROUTINE READS IN A FILE OF BINARY RECORDS.
   4216					; *DATA RECORDS:
   4217					; 	.WORD	4+<5*N>		; BYTE COUNT.
   4218					; 	.BLKW	2		; KL ADDRESS.
   4219					; 	.BLKB	5*N		; KL WORDS.
   4220					; THE KL WORDS WHICH ARE PLACED IN THE FIRST 36 BITS OF 5 -11 BYTES
   4221					; ARE STORED SEQUENTIALLY STARTING AT THE GIVEN ADDRESS.
   4222					; *END OF FILE:
   4223					; 	.WORD	4		; BYTE COUNT.
   4224					; 	.BLKW	2		; KL ADDRESS.
   4225					; THE ADDRESS IS THE START ADDRESS OF THE BOOTSTRAP PROGRAM.
   4226					; THE DATA RECORDS ARE ASSUMED TO BE SORTED BY ADDRESS,
   4227					; SO THAT PAGE CLEARING IS DONE PROPERLY.
   4228					;
   4229					; THE PAGE CLEARING FEATURE REQUIRES THAT ANY PAGES WHICH RECIEVE
   4230					; DATA SHOULD BE CLEARED BEFORE ANY DATA IS STORED. THE PRESENT
   4231					; ALGORITHM AVOIDS WRITING TWICE TO ANY LOCATION (CLEAR & DEPOSIT).
   4232					; A POINTER IS KEPT OF WHERE THE NEXT KL WORD WOULD BE DEPOSITED,
   4233					; AND IS USED TO DETECT GAPS IN DATA/INSTRUCTION STORAGE SO THAT
   4234					; INTERVENING WORDS MAY BE CLEARED.
   4235					;
   4236					; A CHECK IS ALSO MADE TO SEE IF ANY OF THE BOOT IS LOADED INTO
   4237					; NON-EXISTANT MEMORY BY TURNING OFF THE NXM INDICTOR BEFORE THE
   4238					; LOAD AND TESTING IT AFTER THE LOAD TO SEE IF A NXM OCCURRED.
   4239					;
   4240					; INPUTS:
   4241					;	.DBSW	- IF <>0 THEN USE USER FILE NAME.
   4242					;	.DBFNM	- POINTER TO 5 WORD USER FILE NAME.
   4243					;
   4244					; OUTPUTS:
   4245					;	CARRY IS SET IF ERROR OCCURS, OTHERWISE BOOT IS STARTED AND
   4246					;	RETURN IS TO "$EXIT".
   4247					;-
   4248
   4250	012674				$EXBLD::CALL	$SWEEP		; CLEAR CACHE.
	012674	004737 	012632'			 JSR	PC,$SWEEP
   4251	012700	103425 				BCS	90$
   4252	012702	012700 	001414'			MOV	#DXBFNM,R0	; FILE NAME: BOOT.EXB
   4256	012706	105737 	000023'			TSTB	.UFNSW		; OR
   4257	012712	003402 				BLE	10$
   4258	012714	012700 	001104'			MOV	#.USRFN,R0	; USER FILE NAME.				; ADP01
   4259	012720				10$:	CALL	$LOOKUP		; FIND THE FILE.
	012720	004737 	000772'			 JSR	PC,$LOOKUP
   4260	012724	103414 				BCS	80$
   4261	012726	012703 	001440'			MOV	#DXBDAT,R3	; INITIALIZE DATA WORD POINTER
   4262	012732	012702 	001436'			MOV	#DXBADR+2,R2	; AND NEXT WORD POINTER.
   4263	012736	005012 				CLR	(R2)		; SET TO ZERO.
   4264	012740	005042 				CLR	-(R2)
   4265	012742	012700 	001446'			MOV	#DXBCNM,R0	; NOW TURN OFF THE NXM BIT BY
   4266	012746					CALL	$EXCT		; DOING A CONO APR,,22000.
	012746	004737 	020344'			 JSR	PC,$EXCT
   4267	012752	103020 				BCC	LXBRC
   4268	012754				90$:	RETURN
	012754	000207 				 RTS	PC
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 93-1
$EXBLD	-- LOAD THE BOOT

   4269
   4270	012756	122737 	000000G	001132'	80$:	CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND
   4271	012764	001373 				BNE	90$
   4272	012766					CALLR	$IOERR		; DECLARE THE ERROR.
	012766	000137 	002610'			 JMP	$IOERR
   4273
   4274					;+
   4275					; READ 5 BYTES INTO THE AREA POINTED TO BY R3.
   4276					; R5, R4 AND R0 GET DESTROYED.
   4277					;-
   4278
   4279	012772	012705 	000005 		LXB5B:	MOV	#5,R5
   4280	012776	010304 				MOV	R3,R4
   4281	013000				10$:	CALL	$READB		; READ A BYTE AND
	013000	004737 	001766'			 JSR	PC,$READB
   4282	013004	103402 				BCS	90$
   4283	013006	110024 				MOVB	R0,(R4)+	; STICK IN ASSEMBLED WORD.
   4284	013010	077505 				SOB	R5,10$
   4285	013012				90$:	RETURN
	013012	000207 				 RTS	PC
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 94
$EXBLD	-- LOAD THE BOOT

   4287					;+
   4288					; READ RECORD FROM FILE.
   4289					;-
   4290
   4291	013014				LXBRC:	CALL	$READC		; GET ADDRESS.
	013014	004737 	001564'			 JSR	PC,$READC
   4292	013020	103532 				BCS	90$
   4293	013022	010037 	001124'			MOV	R0,.BTADR
   4294	013026					CALL	$READW
	013026	004737 	001672'			 JSR	PC,$READW
   4295	013032	103525 				BCS	90$
   4296	013034	010037 	001126'			MOV	R0,.BTADR+2
   4297	013040	005737 	001140'			TST	.SYIRC		; IF MORE BYTES IN RECORD
   4298	013044	003070 				BGT	60$		; GO TO LOAD DATA INTO KL.
   4299
   4300					;+
   4301					; END OF FILE REACHED. CLEAR THE REST OF THE PAGE,
   4302					; DE-ACCESS THE FILE, AND START THE BOOT.
   4303					;-
   4304
   4305	013046	032712 	000777 		10$:	BIT	#PGBTS,(R2)	; MUST CLEAR REST OF PAGE.
   4306	013052	001413 				BEQ	20$
   4307	013054	012701 	000000'			MOV	#.ZERO,R1	; IF NOT AT BOUNDRY
   4308	013060	010200 				MOV	R2,R0
   4309	013062					CALL	$DPOS		; CLEAR WORD,
	013062	004737 	022136'			 JSR	PC,$DPOS
   4310	013066	103507 				BCS	90$
   4311	013070	062712 	000001 			ADD	#1,(R2)		; BUMP POINTER,
   4312	013074	005562 	000002 			ADC	2(R2)
   4313	013100	000762 				BR	10$		; AND GO FOR MORE.
   4314	013102	010301 			20$:	MOV	R3,R1
   4315	013104	012700 	110000 			MOV	#<110*1000>,R0	; GET 'APR NXM ER IN'
   4316	013110					CALL	$DFRD
	013110	004737 	021502'			 JSR	PC,$DFRD
   4317	013114	103474 				BCS	90$
   4318	013116	132761 	000020 	000003 		BITB	#20,3(R1)	; TO TEST FOR NXM.
   4319	013124	001004 				BNE	30$
   4320	013126					CALL	$CLOSE		; CLOSE BOOT FILE.
	013126	004737 	001334'			 JSR	PC,$CLOSE
   4321	013132	000137 	013310'			JMP	$TENST		; GO TO START THE BOOT.
   4322	013136				30$:	PRINT	#TXBIMM		; BOOT LOADED IN NONEXISTANT MEMORY !
	013136	012700 	003011'			 MOV	#TXBIMM,R0
	013142	004737 	000000G			 JSR	PC,$TTMSG
   4323	013146	000261 				SEC
   4324	013150					RETURN
	013150	000207 				 RTS	PC
KLIXB -- LOAD THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 95
$EXBLD	-- LOAD THE BOOT

   4326					;+
   4327					; PROCESS DATA RECORD.
   4328					;-
   4329
   4330	013152	032712 	000777 		40$:	BIT	#PGBTS,(R2)	; IF ON A NEW PAGE
   4331	013156	001011 				BNE	50$
   4332	013160	013722 	001124'			MOV	.BTADR,(R2)+	; PUT US ON THE PAGE
   4333	013164	013712 	001126'			MOV	.BTADR+2,(R2)	; OF THE TARGET ADDRESS
   4334	013170	042742 	000777 			BIC	#PGBTS,-(R2)	; AT THE TOP.
   4335	013174	023712 	001124'			CMP	.BTADR,(R2)
   4336	013200	001421 				BEQ	70$
   4337	013202	012701 	000000'		50$:	MOV	#.ZERO,R1	; STORE A ZERO
   4338	013206	010200 				MOV	R2,R0
   4339	013210					CALL	$DPOS
	013210	004737 	022136'			 JSR	PC,$DPOS
   4340	013214	103434 				BCS	90$
   4341	013216	062712 	000001 			ADD	#1,(R2)		; AND BUMP ADDRESS.
   4342	013222	005562 	000002 			ADC	2(R2)
   4343	013226	023712 	001124'		60$:	CMP	.BTADR,(R2)	; WE MUST CLEAR
   4344	013232	001347 				BNE	40$		; UP TO THE
   4345	013234	023762 	001126'	000002 		CMP	.BTADR+2,2(R2)	; RECORD ADDRESS.
   4346	013242	001343 				BNE	40$
   4347	013244				70$:	CALL	LXB5B
	013244	004737 	012772'			 JSR	PC,LXB5B
   4348	013250	103416 				BCS	90$
   4349	013252	010301 				MOV	R3,R1
   4350	013254	010200 				MOV	R2,R0
   4351	013256					CALL	$DPOS		; STICK IT IN
	013256	004737 	022136'			 JSR	PC,$DPOS
   4352	013262	103411 				BCS	90$
   4353	013264	062712 	000001 			ADD	#1,(R2)		; BUMP ADDRESS AND
   4354	013270	005562 	000002 			ADC	2(R2)
   4355	013274	005737 	001140'			TST	.SYIRC
   4356	013300	001361 				BNE	70$
   4357	013302	000137 	013014'			JMP	LXBRC		; GO TO PICK UP NEW RECORD.
   4358	013306				90$:	RETURN
	013306	000207 				 RTS	PC
KLIST -- START THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 96
$EXBLD	-- LOAD THE BOOT

   4360						.TITLE	KLIST -- START THE KL BOOT
   4361	013310					IDENT$	5,0
						.IDENT	/005000/
   4362					;
   4363					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4364					;
   4365					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4366					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4367					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4368					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4369					;
   4370					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4371					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4372					; EQUIPMENT CORPORATION.
   4373					;
   4374					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4375					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4376					;
   4377					; VERSION 05-00
   4378					;
   4379					; ALAN D. PECKHAM  7-APR-77
   4380					;
   4381					; MODIFIED BY:
   4382					;
   4383					; FUNCTION: THIS ROUTINE CLEANS UP THE CPU AND STARTS UP THE BOOT
   4384					;  WITH SPECIFIED FUNCTIONS IN AC0.
   4385					;
   4386					; EQUATED SYMBOLS
   4387					;
   4388		000020 			AAX	=	BIT4		; AR/ARX PARITY ENABLE BIT.
   4389		000000 			APR	=	0		; KL DEVICE.
   4390		000004 			CONO	=	4		; KL I/O SUB-FUNCTION CODE.
   4391		000004 			CM	=	BIT2		; CRAM PARITY ENABLE BIT.
   4392		000003 			DATAO	=	3		; KL I/O SUB-FUNCTION CODE.
   4393		000002 			DM	=	BIT1		; DRAM PARITY ENABLE BIT.
   4394		000010 			FM	=	BIT3		; FM PARITY ENABLE BIT.
   4395		000001 			FS	=	BIT0		; FS PARITY ENABLE BIT.
   4396		000010 			PAG	=	10		; KL DEVICE.
   4397		000004 			PI	=	4		; KL DEVICE.
   4398					;
   4399					; LOCAL DATA
   4400					;
   4401	001454					.PSECT	DATA,D
   4402	001454				DSTRT:	IO10$ CONO APR,,267760	;RESET APR
	001454	   360 	   157 	   001 		 .BYTE	BY$$0,BY$$1,BY$$2
	001457	   002 	   016 			 .BYTE	BY$$3,BY$$4
   4403	001461					IO10$ CONO PI,,10000	;RESET PI SYSTEM
	001461	   000 	   020 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001464	   006 	   016 			 .BYTE	BY$$3,BY$$4
   4404	001466					IO10$ CONO PAG,,0	;PAGING SYSTEM CLEAR
	001466	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001471	   012 	   016 			 .BYTE	BY$$3,BY$$4
   4405	001473					IO10$ DATAO PAG,,0	;USER BASE CLEAR
	001473	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	001476	   011 	   016 			 .BYTE	BY$$3,BY$$4
   4406		000004 			DSTRTL=.-DSTRT/I.10L
   4408	001500				DSTCEN:	IO10$	CONO PAG,,600000
KLIST -- START THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 96-1
$EXBLD	-- LOAD THE BOOT

	001500	   000 	   000 	   003 		 .BYTE	BY$$0,BY$$1,BY$$2
	001503	   012 	   016 			 .BYTE	BY$$3,BY$$4
   4410	001505				DST1B0:	WD36$	400000 0	;1B0
	001505	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001510	   000 	   010 			 .BYTE	BY$$3,BY$$4
   4411	001512				DST1B1:	WD36$	200000 0	;1B1
	001512	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001515	   000 	   004 			 .BYTE	BY$$3,BY$$4
   4412	001517				DST3B1:	WD36$	600000 0	;3B1
	001517	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001522	   000 	   014 			 .BYTE	BY$$3,BY$$4
   4413						.EVEN			; DSTBF NUST START ON EVEN BOUNDRY.
   4414	001524				DSTBF:	WD36$	0 0		; GENERAL BIT BUCKET.
	001524	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001527	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4415						.EVEN
   4416	003055					.PSECT	TEXT,D
   4417	003055				TSTBSM:	MESSAGE	<BOOTSTRAP LOADED AND STARTED>
	003055	   102 	   117 	   117 		 .ASCIZ	\BOOTSTRAP LOADED AND STARTED\
	003060	   124 	   123 	   124
	003063	   122 	   101 	   120
	003066	   040 	   114 	   117
	003071	   101 	   104 	   105
	003074	   104 	   040 	   101
	003077	   116 	   104 	   040
	003102	   123 	   124 	   101
	003105	   122 	   124 	   105
	003110	   104 	   000
   4418	013310					.PSECT
KLIST -- START THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 97
$TENST	-- START KL BOOT

   4420						.SBTTL	$TENST	-- START KL BOOT
   4421					;+
   4422					; UPDATE THE CONFIGURATION FILE AND START UP THE KL BOOTSTRAP.
   4423					; TRANSFER DUMP AND PROMPT BITS FROM .KLIWD TO AC0 FOR KL BOOT.
   4424					; 	1B0	INDICATES NO PROMPTING
   4425					; 	1B1	INDICATES TO DUMP KL
   4426					; BEGIN EXECUTION AT START+1 TO INFORM THE BOOT THAT THESE
   4427					; SWITCHES ARE SET.
   4428					;
   4429					; INPUTS:
   4430					;	.BTADR	- THE BOOT STARTING ADDRESS.
   4431					;
   4432					; NO OUTPUTS
   4433					; THE RETURN IS TO $ERROR IF UNSUCCESSFUL.
   4434					;-
   4435
   4436
   4437	013310				$TENST::CALL	$FILE		; CHANGE CONFIGURATION FILE FIRST.
	013310	004737 	006572'			 JSR	PC,$FILE
   4438	013314	103524 				BCS	80$
   4439	013316					CALL	$ZERAC		; CLEAR THE AC'S.
	013316	004737 	000000G			 JSR	PC,$ZERAC
   4440	013322	103520 				BCS	90$
   4441	013324	012701 	000004 			MOV	#DSTRTL,R1
   4442	013330	012700 	001454'			MOV	#DSTRT,R0
   4443	013334				10$:	CALL	$EXCT		; RESET APR,PI,CLEAR PAGING,USER BASE
	013334	004737 	020344'			 JSR	PC,$EXCT
   4444	013340	103511 				BCS	90$
   4445	013342	062700 	000005 			ADD	#I.10L,R0
   4446	013346	077106 				SOB	R1,10$
   4448	013350	105737 	000033'			TSTB	.CASW		; IF CACHE IS THERE
   4449	013354	003406 				BLE	20$
   4450	013356	105737 	000040'			TSTB	.NCACH		; AND IS TO BE USED
   4451	013362	003403 				BLE	20$
   4452	013364					CALL	$EXCT		; THEN TURN IT ON.
	013364	004737 	020344'			 JSR	PC,$EXCT
   4453	013370	103475 				BCS	90$
   4455	013372	013700 	000036'		20$:	MOV	.KLISV,R0	; .KLIWD INTO R0.
   4456	013376	032700 	000000G			BIT	#KL.VBN,R0	; TEST .KLIWD BITS
   4457	013402	001411 				BEQ	40$		; AND PICK APPROPRIATE
   4458	013404	032700 	000000G			BIT	#KL.VBD,R0	; WORD TO INSERT
   4459	013410	001003 				BNE	30$		; IN AC0.
   4460	013412	012701 	001505'			MOV	#DST1B0,R1
   4461	013416	000413 				BR	60$
   4462	013420	012701 	001517'		30$:	MOV	#DST3B1,R1
   4463	013424	000410 				BR	60$
   4464	013426	032700 	000000G		40$:	BIT	#KL.VBD,R0
   4465	013432	001003 				BNE	50$
   4466	013434	012701 	000000'			MOV	#.ZERO,R1
   4467	013440	000402 				BR	60$
   4468	013442	012701 	001512'		50$:	MOV	#DST1B1,R1
   4469	013446	012700 	000000'		60$:	MOV	#.ZERO,R0
   4470	013452					CALL	$DPOS		; PUT IT IN.
	013452	004737 	022136'			 JSR	PC,$DPOS
   4471	013456	103442 				BCS	90$
   4472	013460	012701 	001524'			MOV	#DSTBF,R1
   4473	013464	012711 	000003 			MOV	#3,(R1)		; CHECK AR/ARX PARITY AND CAUSE
KLIST -- START THE KL BOOT	MACRO M1108  13-JAN-78 10:41  PAGE 97-1
$TENST	-- START KL BOOT

   4474	013470	012700 	047000 			MOV	#.LDCK2,R0	; PAGE FAIL UCODE TRAP IF ERROR
   4475	013474					CALL	$DFWR		; BIT34 IN .LDCK2
	013474	004737 	021610'			 JSR	PC,$DFWR
   4476	013500	103431 				BCS	90$
   4477	013502	012711 	000016 			MOV	#FM!CM!DM,(R1)	; ENABLE CRAM,DRAM,FS,AR/ARX PARITY
   4478	013506	012700 	046000 			MOV	#.LDCK1,R0
   4479	013512					CALL	$DFWR		; LOAD CONDITION ENABLE REG
	013512	004737 	021610'			 JSR	PC,$DFWR
   4480	013516	103422 				BCS	90$
   4481	013520	012700 	001124'			MOV	#.BTADR,R0	; GET BOOT ADDRESS AND
   4482	013524	062710 	000001 			ADD	#1,(R0)		; INCREMENT.
   4483	013530	005560 	000002 			ADC	2(R0)
   4484	013534					CALL	$STRKL
	013534	004737 	020434'			 JSR	PC,$STRKL
   4485	013540	103411 				BCS	90$		; IF SUCCESSFUL,
   4486	013542	005037 	000000G			CLR	.NOERR		; ALLOW ERRORS AND
   4487	013546					PRINT	#TSTBSM		; ANNOUNCE THE GOOD NEWS
	013546	012700 	003055'			 MOV	#TSTBSM,R0
	013552	004737 	000000G			 JSR	PC,$TTMSG
   4488	013556					CALL	..DTP2		; START SECONDARY PROTOCOL.
	013556	004737 	000000G			 JSR	PC,..DTP2
   4489	013562	000241 				CLC
   4490	013564				90$:	RETURN
	013564	000207 				 RTS	PC
   4491	013566	005726 			80$:	TST	(SP)+		; CONFIGURATION WAS NOT SAVED.
   4492	013570	000137 	000242'			JMP	$ERROR
KLIRS -- SPECIAL KL RESTARTS	MACRO M1108  13-JAN-78 10:41  PAGE 98
$TENST	-- START KL BOOT

   4494						.TITLE	KLIRS -- SPECIAL KL RESTARTS
   4495	013574					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   4496					;
   4497					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4498					;
   4499					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4500					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4501					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4502					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4503					;
   4504					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4505					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4506					; EQUIPMENT CORPORATION.
   4507					;
   4508					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4509					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4510					;
   4511					; VERSION 05-00
   4512					;
   4513					; ALAN D. PECKHAM  7-APR-77
   4514					;
   4515					; MODIFICATIONS:
   4516					;
   4517					;	NO.	DATE		PROGRAMMER		REASON
   4518					;	---	----		----------		------
   4519					;
   4520					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES FOR SPECIAL KL RESTARTS:
   4521					;  POWER FAIL RESTART AT 70.
   4525					;
   4526					; EQUATED SYMBOLS
   4527					;
   4528		000004 			CONO	=	4		; KL I/O SUB-FUNCTION CODE.
   4529		000010 			PAG	=	10		; KL DEVICE.
   4530					;
   4531					; LOCAL MACROS
   4532					;
   4533						.MCALL	MRKT$S,WTSE$S,WSIG$S
   4534					;
   4535					; LOCAL DATA
   4536					;
   4537	001532					.PSECT	DATA,D
   4539	001532				DRSCEN:	IO10$	CONO PAG,,600000 ; ENABLE CACHE
	001532	   000 	   000 	   003 		 .BYTE	BY$$0,BY$$1,BY$$2
	001535	   012 	   016 			 .BYTE	BY$$3,BY$$4
   4541	001537				DRSPLD:	WD36$	0 3		; LOAD AR/ARX WITH
	001537	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001542	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4542	001544				DRSPEN:	WD36$	0 16		; C-RAM, D-RAM, AND FS PARITIES
	001544	   016 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001547	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4543	001551				DRSPFR:	WD22$	70		; KL POWER FAIL RESTART ADDRESS.
	001551	   070 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   4547						.EVEN
   4548	003112					.PSECT	TEXT,D
   4549	003112				TRSPRF:	ERROR	<POWER-FAIL RESTART FAILED>
	003112	   077 	   040 	   120 		 .ASCIZ	\? POWER-FAIL RESTART FAILED\
KLIRS -- SPECIAL KL RESTARTS	MACRO M1108  13-JAN-78 10:41  PAGE 98-1
$TENST	-- START KL BOOT

	003115	   117 	   127 	   105
	003120	   122 	   055 	   106
	003123	   101 	   111 	   114
	003126	   040 	   122 	   105
	003131	   123 	   124 	   101
	003134	   122 	   124 	   040
	003137	   106 	   101 	   111
	003142	   114 	   105 	   104
	003145	   000
   4556	003146				TRSRSM:	MESSAGE	<KL RESTARTED>
	003146	   113 	   114 	   040 		 .ASCIZ	\KL RESTARTED\
	003151	   122 	   105 	   123
	003154	   124 	   101 	   122
	003157	   124 	   105 	   104
	003162	   000
   4557	013574					.PSECT
KLIRS -- SPECIAL KL RESTARTS	MACRO M1108  13-JAN-78 10:41  PAGE 99
$POWER	-- POWER FAILURE RESTART

   4559						.SBTTL	$POWER	-- POWER FAILURE RESTART
   4560					;+
   4561					; UPDATE THE CONFIGURATION FILE, INITIALIZE THE KL FOR EXECUTION,
   4562					; AND START THE KL CPU AT 70 FOR POWER FAIL RESTART.
   4563					;
   4564					; NO INPUTS OR OUTPUTS
   4565					;
   4566					; EXIT IS EITHER TO $EXIT IS SUCCESSFUL OR $ERROR IF RESTART FAILED.
   4567					;-
   4568
   4569	013574				$POWER::CALL	$FILE		; WRITE CONFIGURATION FILE FIRST.
	013574	004737 	006572'			 JSR	PC,$FILE
   4570	013600	103427 				BCS	80$
   4571	013602					CALL	$ZERAC		; CLEAR THE ACS.
	013602	004737 	000000G			 JSR	PC,$ZERAC
   4572	013606					CALL	LRSTKL		; ENABLE KL FOR NORMAL OPERATION
	013606	004737 	013664'			 JSR	PC,LRSTKL
   4573	013612	012700 	001551'			MOV	#DRSPFR,R0	; START KL AT 70.
   4574	013616					CALL	$STRKL
	013616	004737 	020434'			 JSR	PC,$STRKL
   4575	013622	103412 				BCS	70$
   4576	013624	005037 	000000G			CLR	.NOERR		; ALLOW KL ERROR INTERCEPTION
   4577	013630					PRINT	#TRSRSM		; EVERYTHING OKAY.
	013630	012700 	003146'			 MOV	#TRSRSM,R0
	013634	004737 	000000G			 JSR	PC,$TTMSG
   4578	013640					CALL	..DTP2		; START SECONDARY PROTOCOL.
	013640	004737 	000000G			 JSR	PC,..DTP2
   4579	013644	000137 	000252'			JMP	$EXIT		; JUST EXIT FROM KLINIT
   4580	013650				70$:	PRINT	#TRSPRF		; INDICATE POWER FAILURE RESTART FAILED
	013650	012700 	003112'			 MOV	#TRSPRF,R0
	013654	004737 	000000G			 JSR	PC,$TTMSG
   4581	013660	000137 	000242'		80$:	JMP	$ERROR		; CONFIGURATION WAS NOT SAVED.
KLIRS -- SPECIAL KL RESTARTS	MACRO M1108  13-JAN-78 10:41  PAGE 101
$POWER	-- POWER FAILURE RESTART

   4640					;+
   4641					; RESET THE KL CPU, ENABLE THE PARITY STOPS, AND TURN ON CACHE IF NECESSARY.
   4642					;
   4643					; NO INPUTS
   4644					;
   4645					; OUTPUTS:
   4646					;	CARRY SET IF ERROR OCCURRS.
   4647					;-
   4648
   4649	013664				LRSTKL:	CALL	$KLMR		; FORCE E-BOX INTO OBEDIENCE
	013664	004737 	022452'			 JSR	PC,$KLMR
   4651	013670	103433 				BCS	90$
   4652	013672	105737 	000033'			TSTB	.CASW		; IF CACHE IS THERE
   4653	013676	003410 				BLE	10$
   4654	013700	105737 	000040'			TSTB	.NCACH		; AND IS TO BE USED
   4655	013704	003405 				BLE	10$
   4656	013706	012700 	001532'			MOV	#DRSCEN,R0	; THEN
   4657	013712					CALL	$EXCT		; TURN IT ON
	013712	004737 	020344'			 JSR	PC,$EXCT
   4659	013716	103420 				BCS	90$
   4660	013720	012701 	001537'		10$:	MOV	#DRSPLD,R1	; DO STUFF TO
   4661	013724	012700 	047000 			MOV	#.LDCK2,R0
   4662	013730					CALL	$DFWR
	013730	004737 	021610'			 JSR	PC,$DFWR
   4663	013734	012701 	001544'			MOV	#DRSPEN,R1	; SET THE PARITIES
   4664	013740	012700 	046000 			MOV	#.LDCK1,R0
   4665	013744					CALL	$DFWR
	013744	004737 	021610'			 JSR	PC,$DFWR
   4666	013750	012700 	001000 			MOV	#.STRCL,R0	; START THE CLOCK
   4667	013754					CALLR	$DFXC
	013754	000137 	022006'			 JMP	$DFXC
   4668	013760				90$:	RETURN
	013760	000207 				 RTS	PC
KLIPT -- DETERMINE PHYSICAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 102
$POWER	-- POWER FAILURE RESTART

   4670						.TITLE	KLIPT -- DETERMINE PHYSICAL MEMORY CONFIGURATION
   4671	013762					IDENT$	5,1,KLI$$F							; ADP01
						.IDENT	/B05010/
   4672					;
   4673					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4674					;
   4675					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4676					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4677					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4678					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4679					;
   4680					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4681					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4682					; EQUIPMENT CORPORATION.
   4683					;
   4684					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4685					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4686					;
   4687					; VERSION 05-01									; ADP01
   4688					;
   4689					; ALAN D. PECKHAM  7-APR-77
   4690					;
   4691					; MODIFIED BY:
   4692					;
   4693					; FUNCTION: THIS ROUTINE POLLS THE MEMORY CONTROLLERS FOR TYPE AND
   4694					;  MODULES AND RECORDS THE ANSWERS IN THE PHYSICAL
   4695					;  DEVICE TABLES.
   4696					;
   4697					; EQUATED SYMBOLS
   4698					;
   4699		000270 			ADD	=	270		; KL INSTRUCTION CODE.
   4700		000002 			BLKO	=	2		; KL I/O SUBFUNCTION CODE.
   4701		000254 			JRST	=	254		; KL INSTRUCTION CODE.
   4702		000202 			MOVEM	=	202		; KL INSTRUCTION CODE.				; ADP01
   4703		000004 			PI	=	4		; KL DEVICE.
   4704					;
   4705					; LOCAL DATA
   4706					;
   4707	001554					.PSECT	DATA,D
   4708	001554	   000 	   001 	   007 	DPTPGM:	.BYTE	0,1,7		; LOAD AC1-AC7 OF AC BLOCK 0.			; ADP01
   4709	001557				DPTBF:	WD36$	0 0		; AC1 - (ALSO USED AS EXAMINE BUFFER)		; ADP01
	001557	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001562	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4710	001564				DPTAC1:	WD36$	0 1		; AC2 - (ALSO USED AS AC1 ADDRESS)		; ADP01
	001564	   001 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001567	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4711	001571					WD36$	20000 0		; AC3						; ADP01
	001571	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001574	   200 	   000 			 .BYTE	BY$$3,BY$$4
   4712	001576					I10$	ADD 2,,3	; AC4						; ADP01
	001576	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001601	   301 	   005 			 .BYTE	BY$$3,BY$$4
   4713	001603					I10$	MOVEM 2,,0	; AC5						; ADP01
	001603	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001606	   021 	   004 			 .BYTE	BY$$3,BY$$4
   4714	001610					IO10$	BLKO PI,,0	; AC6						; ADP01
	001610	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
KLIPT -- DETERMINE PHYSICAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 102-1
$POWER	-- POWER FAILURE RESTART

	001613	   005 	   016 			 .BYTE	BY$$3,BY$$4
   4715	001615					I10$	JRST 4,,4	; AC7						; ADP01
	001615	   004 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001620	   142 	   005 			 .BYTE	BY$$3,BY$$4
   4716	001622	   000 	   005 	   377 		.BYTE	0,5,-1		; START AT AC5 OF AC BLOCK 0.			; ADP01
   4717						.EVEN
   4718	003163					.PSECT	TEXT,D
   4719	003163				TPTNPC:	ERROR	<CANNOT DETERMINE PHYSICAL CONFIGURATION>
	003163	   077 	   040 	   103 		 .ASCIZ	\? CANNOT DETERMINE PHYSICAL CONFIGURATION\
	003166	   101 	   116 	   116
	003171	   117 	   124 	   040
	003174	   104 	   105 	   124
	003177	   105 	   122 	   115
	003202	   111 	   116 	   105
	003205	   040 	   120 	   110
	003210	   131 	   123 	   111
	003213	   103 	   101 	   114
	003216	   040 	   103 	   117
	003221	   116 	   106 	   111
	003224	   107 	   125 	   122
	003227	   101 	   124 	   111
	003232	   117 	   116 	   000
   4720	013762					.PSECT
KLIPT -- DETERMINE PHYSICAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 103
$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE

   4722						.SBTTL	$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE
   4723					;+
   4724					; FIND OUT ALL CONTROLLER TYPES AND MODULE COMPLEMENTS OR INTERLEAVE
   4725					; FOR THE PHYSICAL TABLES AND TYPE COUNTS.
   4726					;
   4727					; NO INPUTS
   4728					;
   4729					; OUTPUTS:
   4730					;	.CTLTP	- CONTROLLER TYPES INDEXED BY CONTROLLER NUMBER.
   4731					;	.CTLMD	- CONTROLLER MODULE COMPLEMENT IF INTERNAL, OR
   4732					;		  PRESENT INTERLEAVE IF EXTERNAL.
   4733					;	.MINT	- NUMBER OF INTERNAL CONTROLLERS.
   4734					;	CARRY IS SET IF ERROR OCCURRED DURING DETERMINATION AND
   4735					;	MESSAGE IS DISPLAYED.
   4736					;	IF A DMA20 IS FOUND, THE ROUTINE $SETXT IS CALLED TO DETERMINE
   4737					;	THE MEMORY COMPLEMENT.
   4738					;	REGISTERS R0-R5 ARE DESTROYED.
   4739					;-
   4740
   4741	013762				$SETPT::CALL	$SBMR		; ALL MEMORY CONTROLLERS.
	013762	004737 	023074'			 JSR	PC,$SBMR
   4742	013766	103505 				BCS	70$
   4743	013770	012700 	001554'			MOV	#DPTPGM,R0	; GET OUR KL PROGRAM
   4744	013774					CALL	$LDNGO		; LOAD AND START IT IN THE ACS.
	013774	004737 	000000G			 JSR	PC,$LDNGO
   4745	014000	103500 				BCS	70$
   4746	014002	012701 	000040 			MOV	#CTLS,R1	; CLEAR OUT
   4747	014006	105061 	000060'		10$:	CLRB	.CTLTP-1(R1)	; CONTROLLER TYPES,
   4748	014012	105061 	000120'			CLRB	.CTLMD-1(R1)	; AND MODULE BITS.
   4749	014016	077105 				SOB	R1,10$
   4751	014020	105037 	000054'			CLRB	.MINT		; NO INTERNAL CONTROLLERS.
   4753	014024	005002 				CLR	R2		; START WITH CONTROLLER ZERO.
   4754	014026	012701 	001557'		20$:	MOV	#DPTBF,R1	; GET SBUS RESULT
   4755	014032	012700 	001564'			MOV	#DPTAC1,R0	; THAT THE AC PROGRAM HAS
   4756	014036					CALL	$EXAM		; FROM AC1.
	014036	004737 	022240'			 JSR	PC,$EXAM
   4757	014042	103457 				BCS	70$
   4758	014044	012700 	012000 			MOV	#.CONBT,R0	; LET THE PROGRAM CONTINUE			; ADP01
   4759	014050					CALL	$DFXC		; SO THAT IT					; ADP01
	014050	004737 	022006'			 JSR	PC,$DFXC
   4760	014054	103452 				BCS	70$		; CAN GET NEXT ONE.
   4761	014056	005004 				CLR	R4		; INITIALIZE MODULES TO ZERO.
   4762	014060	113703 	001562'			MOVB	DPTBF+3,R3	; EXTRACT TYPE
   4763	014064	042703 	177760 			BIC	#^C17,R3
   4764	014070	110362 	000061'			MOVB	R3,.CTLTP(R2)	; AND RECORD.
   4766	014074	001413 				BEQ	30$		; WEED OUT UNDEFINED CONTROLLER TYPES.
   4770	014076	022703 	000005 			CMP	#T.YPL,R3
   4772	014102	002410 				BLT	30$
   4776	014104	105763 	000046'			TSTB	.TYPTB(R3)
   4778	014110	002405 				BLT	30$
   4783	014112	022703 	000002 			CMP	#2,R3		; IF IT IS A DMA20, THEN
   4784	014116	001413 				BEQ	50$		; GET INTERLEAVE.
   4787	014120	105237 	000054'			INCB	.MINT		; ONE MORE INTERNAL CONTROLLER.
   4788	014124	113704 	001563'		30$:	MOVB	DPTBF+4,R4	; EXTRACT
   4789	014130	113700 	001562'			MOVB	DPTBF+3,R0	; STORAGE MODULE BITS.
   4790	014134	012705 	000004 			MOV	#4,R5
   4791	014140	106100 			40$:	ROLB	R0
KLIPT -- DETERMINE PHYSICAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 103-1
$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE

   4792	014142	106104 				ROLB	R4
   4793	014144	077503 				SOB	R5,40$
   4795	014146	110462 	000121'		50$:	MOVB	R4,.CTLMD(R2)	; STORE MODULES/BUS MODE,
   4796	014152	005202 				INC	R2		; THEN GO ON TO
   4797	014154	022702 	000037 			CMP	#LCTL,R2	; NEXT CONTROLLER.
   4798	014160	002322 				BGE	20$
   4800	014162	122737 	000002 	000065'		CMPB	#2,.CTLTP+4	; IS THERE A DMA20 ?
   4801	014170	001002 				BNE	60$		; IF SO, THEN
   4802	014172					CALLR	$SETXT		; GET EXTERNAL MEMORY CORE MAP.
	014172	000137 	014216'			 JMP	$SETXT
   4804	014176	000241 			60$:	CLC
   4805	014200					RETURN
	014200	000207 				 RTS	PC
   4806
   4807	014202				70$:	PRINT	#TPTNPC		; PHYSICAL CONFIGURATION WAS
	014202	012700 	003163'			 MOV	#TPTNPC,R0
	014206	004737 	000000G			 JSR	PC,$TTMSG
   4808	014212	000261 				SEC			; INDETERMINATE.
   4809	014214					RETURN
	014214	000207 				 RTS	PC
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 104
$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE

   4811						.TITLE	KLIXT -- DETERMINE EXTERNAL MEMORY CONFIGURATION
   4812	014216					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   4813					;
   4814					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4815					;
   4816					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4817					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4818					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4819					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4820					;
   4821					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4822					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4823					; EQUIPMENT CORPORATION.
   4824					;
   4825					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4826					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4827					;
   4828					; VERSION 05-00
   4829					;
   4830					; ALAN D. PECKHAM  7-APR-77
   4831					;
   4832					; MODIFIED BY:
   4833					;
   4834					; FUNCTION: THIS ROUTINE DETERMINES THE MEMORY COMPLEMENT OF A DMA20
   4835					;  IF PRESENT ON THE SYSTEM AND DETERMINES THE MAXIMUM
   4836					;  SBUS MODE THAT CAN BE GIVEN FOR THE INTERLEAVE SETTINGS.
   4837					;
   4839					; EQUATED SYMBOLS
   4840					;
   4841		000000 			APR	=	0		; KL APR DEVICE.
   4842		000004 			CONO	=	4		; KL I/O SUB-FUNCTION CODE.
   4843		000254 			JRST	=	254		; KL INSTRUCTION.
   4844		000200 			MOVE	=	200		; KL INSTRUCTION.
   4845		000202 			MOVEM	=	202		; KL INSTRUCTION.
   4846		000106 			SXCT	=	106		; KL INSTRUCTION.
   4847					;
   4848					; LOCAL DATA
   4849					;
   4850	001626					.PSECT	DATA,D
   4851	001626				DXTJRS:	I10$	JRST 0,,0	; TO CLEAR THE PC.
	001626	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001631	   140 	   005 			 .BYTE	BY$$3,BY$$4
   4852	001633				DXTSX2:	I10$	SXCT 0,,2	; EXECUTE AN INSTRUCTION IN SECTION 0.
	001633	   002 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001636	   060 	   002 			 .BYTE	BY$$3,BY$$4
   4853	001640				DXTEX0:	I10$	MOVE 0,,0,1	; MOVE WORD ADDRESSED BY AC1 TO AC0.
	001640	   000 	   000 	   004 		 .BYTE	BY$$0,BY$$1,BY$$2
	001643	   000 	   004 			 .BYTE	BY$$3,BY$$4
   4854	001645				DXTDP0:	I10$	MOVEM 0,,0,1	; MOVE AC0 TO WORD ADDRESSED BY AC1.
	001645	   000 	   000 	   004 		 .BYTE	BY$$0,BY$$1,BY$$2
	001650	   020 	   004 			 .BYTE	BY$$3,BY$$4
   4855	001652				DXTRNM:	IO10$	CONO APR,,27700	; TURN OFF NXM BIT.
	001652	   300 	   057 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001655	   002 	   016 			 .BYTE	BY$$3,BY$$4
   4856	001657				DXTAC1:	WD22$	1		; AC1 ADDRESS.
	001657	   001 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 104-1
$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE

   4857	001662				DXTAC2:	WD22$	2		; AC2 ADDRESS.
	001662	   002 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   4858	001665				DXTSI1:	WD36$	12040 0		; SET 1-BUS MODE.
	001665	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	001670	   120 	   000 			 .BYTE	BY$$3,BY$$4
   4859	001672				DXTSI:	WD36$	40 0		; SBUS WORD TO SET INTERLEAVE.
	001672	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	001675	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4860	001677				DXTBF:	WD36$	0 0		; EXAMINE AREA.
	001677	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001702	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4861	001704				DXTFLG:	WD36$	0 0		; APR FLAGS AREA.
	001704	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001707	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4862						.EVEN			; DXTAD MUST BE ON EVEN BOUNDRY.
   4863	001712				DXTAD:	WD36$	0 0		; HOLDING AREA FOR ADDRESS.
	001712	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001715	   000 	   000 			 .BYTE	BY$$3,BY$$4
   4864	001717	   000 			DXTPSW:	.BYTE	0		; PARITY RETRY SWITCH.
   4865						.EVEN
   4866	003235					.PSECT	TEXT,D
   4867	003235				TXT2MG:	ERROR	<DMA20 HAS TOO MANY GAPS>
	003235	   077 	   040 	   104 		 .ASCIZ	\? DMA20 HAS TOO MANY GAPS\
	003240	   115 	   101 	   062
	003243	   060 	   040 	   110
	003246	   101 	   123 	   040
	003251	   124 	   117 	   117
	003254	   040 	   115 	   101
	003257	   116 	   131 	   040
	003262	   107 	   101 	   120
	003265	   123 	   000
   4868	003267				TXTPER:	WARNING	<DMA20 PARITY ERROR AT XXXXXXXX = XXXXXX XXXXXX BEING REWRITTEN>
	003267	   045 	   040 	   104 		 .ASCIZ	\% DMA20 PARITY ERROR AT XXXXXXXX = XXXXXX XXXXXX BEING REWRITTEN\
	003272	   115 	   101 	   062
	003275	   060 	   040 	   120
	003300	   101 	   122 	   111
	003303	   124 	   131 	   040
	003306	   105 	   122 	   122
	003311	   117 	   122 	   040
	003314	   101 	   124 	   040
	003317	   130 	   130 	   130
	003322	   130 	   130 	   130
	003325	   130 	   130 	   040
	003330	   075 	   040 	   130
	003333	   130 	   130 	   130
	003336	   130 	   130 	   040
	003341	   130 	   130 	   130
	003344	   130 	   130 	   130
	003347	   040 	   102 	   105
	003352	   111 	   116 	   107
	003355	   040 	   122 	   105
	003360	   127 	   122 	   111
	003363	   124 	   124 	   105
	003366	   116 	   000
   4869	003370				TXTPRF:	ERROR	<DMA20 PARITY ERROR RETRY FAILED AT XXXXXXXX = XXXXXX XXXXXX>
	003370	   077 	   040 	   104 		 .ASCIZ	\? DMA20 PARITY ERROR RETRY FAILED AT XXXXXXXX = XXXXXX XXXXXX\
	003373	   115 	   101 	   062
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 104-2
$SETPT	-- SET UP PHYSICAL CONFIGURATION TABLE

	003376	   060 	   040 	   120
	003401	   101 	   122 	   111
	003404	   124 	   131 	   040
	003407	   105 	   122 	   122
	003412	   117 	   122 	   040
	003415	   122 	   105 	   124
	003420	   122 	   131 	   040
	003423	   106 	   101 	   111
	003426	   114 	   105 	   104
	003431	   040 	   101 	   124
	003434	   040 	   130 	   130
	003437	   130 	   130 	   130
	003442	   130 	   130 	   130
	003445	   040 	   075 	   040
	003450	   130 	   130 	   130
	003453	   130 	   130 	   130
	003456	   040 	   130 	   130
	003461	   130 	   130 	   130
	003464	   130 	   000
   4870	014216					.PSECT
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 105
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   4872						.SBTTL	$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY
   4873					;+
   4874					; MAP OUT THE DMA MEMORY GAPS AND GET THE MAXIMUM SBUS MODE.
   4875					;
   4876					; NO INPUTS
   4877					;
   4878					; OUTPUTS:
   4879					;	.DMATB,.DMASZ	- TABLE OF EXISTENT DMA MEMORY BLOCKS.
   4880					;	.CTLMD+4	- MAXIMUM SBUS MODE USABLE WITH INDICATED BLOCKS.
   4881					;	CARRY IS SET IF ERROR OCCURRS DURING NXM TESTING.
   4882					;	IF BLOCK TABLE OVERFLOWS CARRY IS SET AND MESSAGE IS DISPLAYED.
   4883					;	REGISTERS R0-R5 ARE DESTROYED.
   4884					;-
   4885
   4886	014216	012701 	001665'		$SETXT::MOV	#DXTSI1,R1	; SET THE BUS MODE TO 1
   4887	014222	012700 	000004 			MOV	#4,R0		; ON THE DMA20.
   4888	014226					CALL	$SBDG
	014226	004737 	022754'			 JSR	PC,$SBDG
   4889	014232	103436 				BCS	90$
   4890	014234	012700 	001652'			MOV	#DXTRNM,R0	; THEN INITIALIZE NXM BIT
   4891	014240					CALL	$EXCT		; TO ZERO.
	014240	004737 	020344'			 JSR	PC,$EXCT
   4892	014244	103431 				BCS	90$
   4893	014246	112737 	000003 	000125'		MOVB	#3,.CTLMD+4	; INITIALIZE INTERLEAVE TO 4.
   4894	014254	012705 	000264'			MOV	#.DMATB,R5	; GET MAP AREA POINTER
   4895	014260	005037 	000262'			CLR	.DMASZ		; AND CLEAR BLOCK COUNT.
   4896	014264	012704 	001714'			MOV	#DXTAD+2,R4	; GET ADDRESS TO TEST
   4897	014270	105014 				CLRB	(R4)		; AND INITIALIZE
   4898	014272	012744 	000020 			MOV	#20,-(R4)	; TO ADDRESS ABOVE ACS.
   4899	014276	005003 				CLR	R3		; ALSO 16K BLOCK NUMBER.
   4900	014300					CALL	LXTMT		; CHECK THE BLOCK.
	014300	004737 	014540'			 JSR	PC,LXTMT
   4901	014304	103411 				BCS	90$
   4902	014306	001041 				BNE	70$		; IF WE FIND A BLOCK
   4903	014310	022737 	000020 	000262'	20$:	CMP	#D.MAL,.DMASZ	; IF WE STILL HAVE ROOM
   4904	014316	003010 				BGT	30$		; THEN RECORD THE BLOCK.
   4905	014320					PRINT	#TXT2MG		; IT'S ALL TOO MUCH...
	014320	012700 	003235'			 MOV	#TXT2MG,R0
	014324	004737 	000000G			 JSR	PC,$TTMSG
   4906	014330	005037 	000262'		90$:	CLR	.DMASZ		; NO ACCESSABLE MEMORY ON DMA20...
   4907	014334	000261 				SEC
   4908	014336					RETURN
	014336	000207 				 RTS	PC
   4909	014340	010325 			30$:	MOV	R3,(R5)+	; RECORD START OF BLOCK.
   4910	014342				40$:	CALL	LXTMI		; GET THE INTERLEAVE
	014342	004737 	014430'			 JSR	PC,LXTMI
   4911	014346	103770 				BCS	90$		; AND
   4912	014350	120237 	000125'			CMPB	R2,.CTLMD+4	; IF LESS THAN CURRENT MODE,
   4913	014354	002002 				BGE	50$		; THEN
   4914	014356	110237 	000125'			MOVB	R2,.CTLMD+4	; WE MUST USE LOWER SETTING.
   4915	014362				50$:	CALL	LXTMN		; SEARCH FOR
	014362	004737 	014512'			 JSR	PC,LXTMN
   4916	014366	103760 				BCS	90$		; THE END OF THIS BLOCK.
   4917	014370	001764 				BEQ	40$
   4918	014372	010315 			60$:	MOV	R3,(R5)		; RECORD UPPER BOUND AND
   4919	014374	166525 	177776 			SUB	-2(R5),(R5)+	; TURN INTO SIZE.
   4920	014400	005237 	000262'			INC	.DMASZ		; INDICATE ONE MORE BLOCK.
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 105-1
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   4921	014404	022703 	000400 			CMP	#400,R3		; IF AT END OF CORE
   4922	014410	003405 				BLE	80$		; THEN WE ARE FINISHED.
   4923	014412				70$:	CALL	LXTMN		; CHECK THE NEXT BLOCK
	014412	004737 	014512'			 JSR	PC,LXTMN
   4924	014416	103744 				BCS	90$
   4925	014420	001733 				BEQ	20$		; AH ! SOME MORE MEMORY !
   4926	014422	102373 				BVC	70$		; KEEP SEARCHING.
   4927	014424	000241 			80$:	CLC			; FINISHED !
   4928	014426					RETURN
	014426	000207 				 RTS	PC
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 106
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   4930					;+
   4931					; SUBROUTINE TO DETERMINE INTERLEAVE FOR GIVEN BLOCK OF DMA20 MEMORY.
   4932					;
   4933					; INPUTS:
   4934					;	R4	- POINTER TO 22 BIT KL ADDRESS.
   4935					;		  (MUST BE ON A QUAD-WORD BOUNDRY)
   4936					; OUTPUTS:
   4937					;	R2	- HIGHEST SBUS MODE WHICH ALLOWS ACCESS TO BLOCK.
   4938					;		= 3  4 BUS MODE
   4939					;		= 2  2 BUS MODE
   4940					;		= 1  1 BUS MODE
   4941					;		= 0  MEMORY LOCATION DOES NOT RESPOND
   4942					;	CARRY IS SET ON ANY SUB-FUNCTION ERROR
   4943					;	THE CONTENTS OF R0 & R1 ARE DESTROYED.
   4944					;-
   4945
   4946	014430	012702 	000003 		LXTMI:	MOV	#3,R2		; START WITH 4 BUS MODE.
   4947	014434	012701 	001672'		10$:	MOV	#DXTSI,R1	; GET SBUS DIAG WORD
   4948	014440	116261 	000666'	000003 		MOVB	.CATIF(R2),3(R1) ; AND SET MODE
   4949	014446	012700 	000004 			MOV	#4,R0		; FOR DMA20.
   4950	014452					CALL	$SBDG
	014452	004737 	022754'			 JSR	PC,$SBDG
   4951	014456	103412 				BCS	80$
   4952	014460	105214 			20$:	INCB	(R4)		; TRY NEXT WORD.
   4953	014462	132714 	000003 			BITB	#3,(R4)		; FINISHED ?
   4954	014466	001406 				BEQ	80$		; YES - WE HAVE THE MODE.
   4955	014470					CALL	LXTMT		; TEST THE WORD
	014470	004737 	014540'			 JSR	PC,LXTMT
   4956	014474	103403 				BCS	80$
   4957	014476	001770 				BEQ	20$		; GOOD - WORD IS ACCESSABLE.
   4958	014500	105314 				DECB	(R4)		; NXM - BACK UP AND
   4959	014502	077224 				SOB	R2,10$		; TRY LOWER MODE.
   4960	014504	142714 	000007 		80$:	BICB	#7,(R4)		; MODE FOUND, RESET ADDRESS.
   4961	014510					RETURN
	014510	000207 				 RTS	PC
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 107
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   4963					;+
   4964					; UPDATE BLOCK NUMBER AND ADDRESS TO NEXT 16K BLOCK AND IF WITHTIN
   4965					; BOUNDS CHECK THE BLOCK FOR EXISTENCE.
   4966					;
   4967					; INPUTS:
   4968					;	R4	- POINTER TO WORD ALIGNED 36 BIT ADDRESS.
   4969					;	R3	- CORRESPONDING 16K BLOCK NUMBER.
   4970					;
   4971					; OUTPUTS:
   4972					;	CARRY SET INDICATES ERROR IN TESTING BLOCK.
   4973					;	OVERFLOW SET INDICATES 22 BIT ADDRESS HAS OVERFLOWED.
   4974					;	ZERO SET INDICATES NO MEMORY DETECTED AT THE ADDRESS.
   4975					;	REGISTERS R0 & R1 ARE DESTROYED.
   4976					;-
   4977
   4978	014512	062714 	040000 		LXTMN:	ADD	#40000,(R4)	; INCREMENT TO
   4979	014516	105564 	000002 			ADCB	2(R4)		; NEXT 16K BLOCK.
   4980	014522	005203 				INC	R3
   4981	014524	022703 	000400 			CMP	#400,R3		; IF ADDRESS HAS OVERFLOWED
   4982	014530	003003 				BGT	LXTMT		; THEN EXAMINE NEXT BLOCK.
   4983	014532	005707 				TST	PC		; INDICATE NXM AND
   4984	014534	000262 				SEV			; RETURN OVERFLOW.
   4985	014536					RETURN
	014536	000207 				 RTS	PC
   4986
   4987					;+
   4988					; TEST GIVEN KL MEMORY ADDRESS TO SEE IF MEMORY WORD EXISTS.
   4989					; IF THE WORD CONTAINS A PARITY ERROR, AN ATTEMPT IS MADE TO
   4990					; REWRITE THE WORD. A HARD ERROR OCCURS IF THE PARITY ERROR OCCURRS
   4991					; A SECOND TIME. A MESSAGE IS DISPLAYED IN BOTH CASES.
   4992					;
   4993					; INPUTS:
   4994					;	R4	- POINTER TO 36 BIT KL ADDRESS
   4995					;	THE KL NXM BIT MUST BE TURNED OFF !!
   4996					;
   4997					; OUTPUTS:
   4998					;	CARRY SET INDICATES ERROR IN TESTING BLOCK.
   4999					;	ZERO SET INDICATES NO MEMORY DETECTED AT THE ADDRESS.
   5000					;	REGISTERS R0 & R1 ARE DESTROYED.
   5001					;-
   5002
   5003	014540	112737 	177777 	001717'	LXTMT:	MOVB	#-1,DXTPSW	; RESET PARITY RETRY SWITCH.
   5004	014546	012701 	001677'		LXTMTR:	MOV	#DXTBF,R1	; TRY TO EXAMINE
   5005	014552	010400 				MOV	R4,R0		; THE SPECIFIED ADDRESS
   5009	014554					CALL	LXTSEX
	014554	004737 	015014'			 JSR	PC,LXTSEX
   5011	014560	103433 				BCS	90$
   5012	014562	012701 	001704'			MOV	#DXTFLG,R1	; AND THEN
   5013	014566	012700 	110000 			MOV	#<110*1000>,R0	; GET THE
   5014	014572					CALL	$DFRD		; APR FLAGS.
	014572	004737 	021502'			 JSR	PC,$DFRD
   5015	014576	103424 				BCS	90$
   5016	014600	012701 	001677'			MOV	#DXTBF,R1
   5017	014604	132737 	000020 	001707'		BITB	#020,DXTFLG+3	; IF NXM, THEN GO TO
   5018	014612	001010 				BNE	80$		; TURN IT OFF, OTHERWISE
   5019	014614	132737 	000004 	001707'		BITB	#004,DXTFLG+3	; IF A PARITY ERROR, THEN
   5020	014622	001013 				BNE	LXTMTP		; RECORD AND RETRY.
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 107-1
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   5021	014624	132737 	000060 	001707'		BITB	#060,DXTFLG+3	; CHECK SBUS ERR AND NXM.
   5022	014632	001406 				BEQ	90$		; (MEMORY EXISTS & NO OVERFLOW)
   5023	014634	012700 	001652'		80$:	MOV	#DXTRNM,R0	; IF ON,
   5024	014640					CALL	$EXCT		; TURN THEM OFF
	014640	004737 	020344'			 JSR	PC,$EXCT
   5025	014644	103401 				BCS	90$		; AND RETURN
   5026	014646	005707 				TST	PC		; NON-ZERO AS FLAG.
   5027	014650				90$:	RETURN
	014650	000207 				 RTS	PC
   5028
   5029					;+
   5030					; PARITY RETRY ROUTINE. ON THE FIRST TIME THROUGH, THE ERROR IS
   5031					; REPORTED AND THE WORD READ IS REWRITTEN INTO THE ADDRESS. THE WORD
   5032					; IS THEN READ AGAIN. IF THE SECOND ATTEMPT FAILS, IT IS AGAIN REPORTED
   5033					; AND THE MEMORY EXISTENCE TEST FAILS.
   5034					;
   5035					; INPUTS:
   5036					;	R4	- POINTER TO KL ADDRESS OF WORD IN QUESTION.
   5037					;	R1	- POINTER TO DATA READ FROM WORD.
   5038					;
   5039					; OUTPUTS:
   5040					;	CARRY IS SET IF SECOND PARITY ERROR, OTHERWISE THIS ROUTINE
   5041					;	RETURNS CONTROL TO THE ROUTINE "LXTMT" AT "LXTMTR".
   5042					;	REGISTERS R0 & R1 ARE DESTROYED.
   5043					;-
   5044
   5045	014652	105237 	001717'		LXTMTP:	INCB	DXTPSW		; SECOND TIME THROUGH ?
   5046	014656	003016 				BGT	10$		; YES - LAST GASP...
   5047	014660	012700 	003267'			MOV	#TXTPER,R0	; GET OUR MESSAGE
   5048	014664					CALL	LXTDPM		; AND DISPLAY IT.
	014664	004737 	014740'			 JSR	PC,LXTDPM
   5049	014670	010400 				MOV	R4,R0		; NOW RE-WRITE THE LOCATION
   5053	014672					CALL	LXTSDP
	014672	004737 	015126'			 JSR	PC,LXTSDP
   5055	014676	103417 				BCS	90$
   5056	014700	012700 	001652'			MOV	#DXTRNM,R0	; CLEAR THE ERROR
   5057	014704					CALL	$EXCT
	014704	004737 	020344'			 JSR	PC,$EXCT
   5058	014710	000137 	014546'			JMP	LXTMTR		; AND RETRY THE READ.
   5059	014714	012700 	003370'		10$:	MOV	#TXTPRF,R0	; SEND THE DYING MESSAGE
   5060	014720					CALL	LXTDPM
	014720	004737 	014740'			 JSR	PC,LXTDPM
   5061	014724	012700 	001652'			MOV	#DXTRNM,R0	; AND CLEAR THE CONDITION.
   5062	014730					CALL	$EXCT
	014730	004737 	020344'			 JSR	PC,$EXCT
   5063	014734	000261 				SEC
   5064	014736				90$:	RETURN
	014736	000207 				 RTS	PC
   5065
   5066	014740	010546 			LXTDPM:	MOV	R5,-(SP)	; SAVE REGISTERS
   5067	014742	010046 				MOV	R0,-(SP)
   5068	014744	010005 				MOV	R0,R5		; COPY THE MESSAGE POINTER
   5069	014746	122725 	000124 		10$:	CMPB	#'T,(R5)+	; AND SEARCH
   5070	014752	001375 				BNE	10$
   5071	014754	122725 	000040 			CMPB	#' ,(R5)+	; FOR "T ".
   5072	014760	001372 				BNE	10$
   5073	014762	010400 				MOV	R4,R0		; INSERT ADDRESS.
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 107-2
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   5074	014764					CALL	$WRD22
	014764	004737 	024070'			 JSR	PC,$WRD22
   5075	014770	062705 	000003 			ADD	#3,R5		; SKIP TO NEXT FIELD
   5076	014774	010100 				MOV	R1,R0		; AND WRITE CONTENTS
   5077	014776					CALL	$WRD36		; OF LOCATION.
	014776	004737 	024152'			 JSR	PC,$WRD36
   5078	015002					PRINT	(SP)+
	015002	012600 				 MOV	(SP)+,R0
	015004	004737 	000000G			 JSR	PC,$TTMSG
   5079	015010	012605 				MOV	(SP)+,R5
   5080	015012					RETURN
	015012	000207 				 RTS	PC
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 108
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   5083					;+
   5084					; SPECIAL EXAMINE AND DEPOSIT FOR MODEL A MACHINES WITHOUT ECO WHICH
   5085					; ALLOWS EXAMINES/DEPOSITS ABOVE 256K. THE SPECIAL ROUTINES REQUIRE
   5086					; THAT THE KL MICROCODE HAVE THE 'SXCT' SPECIAL EXECUTE INSTRUCTION.
   5087					;
   5088					; INPUTS:
   5089					;	R1	- 36 BIT HOLDING AREA TO RECIEVE CONTENTS OF WORD.
   5090					;	R0	- POINTER TO 36 BIT ADDRESS TO EXAMINE.
   5091					;
   5092					; OUTPUTS:
   5093					;	THE SPECIFIED WORD IS READ INTO THE BUFFER POINTED TO BY R1.
   5094					;	CARRY IS SET IF ERROR OCCURRED. IF MODEL A MACHINE,
   5095					;	AC0-AC2 ARE DESTROYED.
   5096					;-
   5097						.ENABL	LSB
   5098
   5099	015014	105737 	000034'		LXTSEX:	TSTB	.EASW		; IF A MODEL B MACHINE,
   5100	015020	003402 				BLE	10$		; THEN
   5101	015022					CALLR	$EXAM		; ECO IS PRESENT.
	015022	000137 	022240'			 JMP	$EXAM
   5102	015026				10$:	PUSH	<R0,R1>		; SAVE ADDRESS AND RECIEVING AREA.
	015026	010046 				 MOV	R0,-(SP)
	015030	010146 				 MOV	R1,-(SP)
   5103	015032	012701 	001640'			MOV	#DXTEX0,R1	; STORE EXTENDED MOVE INSTRUCTION
   5104	015036	012700 	001662'			MOV	#DXTAC2,R0
   5105	015042					CALL	$DPOS
	015042	004737 	022136'			 JSR	PC,$DPOS
   5106	015046	103466 				BCS	90$
   5107	015050	016601 	000002 			MOV	2(SP),R1	; NOW STORE ADDRESS.
   5108	015054	012700 	001657'			MOV	#DXTAC1,R0
   5109	015060					CALL	$DPOS
	015060	004737 	022136'			 JSR	PC,$DPOS
   5110	015064	103457 				BCS	90$
   5111	015066	012700 	001626'			MOV	#DXTJRS,R0	; CLEAR THE PC BECAUSE
   5112	015072					CALL	$EXCT		; SXCT ADVANCES IT AND
	015072	004737 	020344'			 JSR	PC,$EXCT
   5113	015076	103452 				BCS	90$		; PRE-FETCH COULD FAIL ON NXM.
   5114	015100	012700 	001633'			MOV	#DXTSX2,R0	; NOW DO SXCT.
   5115	015104					CALL	$EXCT
	015104	004737 	020344'			 JSR	PC,$EXCT
   5116	015110	103445 				BCS	90$
   5117	015112	011601 				MOV	(SP),R1		; READ BACK RESULT.
   5118	015114	012700 	000000'			MOV	#.ZERO,R0
   5119	015120					CALL	$EXAM
	015120	004737 	022240'			 JSR	PC,$EXAM
   5120	015124	000437 				BR	90$
   5121
   5122	015126	105737 	000034'		LXTSDP:	TSTB	.EASW		; IF MODEL B MACHINE,
   5123	015132	003402 				BLE	20$		; THEN
   5124	015134					CALLR	$DPOS		; ECO IS PRESENT.
	015134	000137 	022136'			 JMP	$DPOS
   5125	015140				20$:	PUSH	<R0,R1>		; SAVE ADDRESS AND SENDING AREA.
	015140	010046 				 MOV	R0,-(SP)
	015142	010146 				 MOV	R1,-(SP)
   5126	015144	012701 	001645'			MOV	#DXTDP0,R1	; STORE EXTENDED MOVE INSTRUCTION
   5127	015150	012700 	001662'			MOV	#DXTAC2,R0
   5128	015154					CALL	$DPOS
KLIXT -- DETERMINE EXTERNAL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 108-1
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

	015154	004737 	022136'			 JSR	PC,$DPOS
   5129	015160	103421 				BCS	90$
   5130	015162	016601 	000002 			MOV	2(SP),R1	; STORE THE ADDRESS
   5131	015166	012700 	001657'			MOV	#DXTAC1,R0
   5132	015172					CALL	$DPOS
	015172	004737 	022136'			 JSR	PC,$DPOS
   5133	015176	103412 				BCS	90$
   5134	015200	011601 				MOV	(SP),R1		; GET THE WORD TO DEPOSIT
   5135	015202	012700 	000000'			MOV	#.ZERO,R0
   5136	015206					CALL	$DPOS
	015206	004737 	022136'			 JSR	PC,$DPOS
   5137	015212	103404 				BCS	90$
   5138	015214	012700 	001633'			MOV	#DXTSX2,R0	; DO THE MOVE.
   5139	015220					CALL	$EXCT
	015220	004737 	020344'			 JSR	PC,$EXCT
   5140	015224				90$:	POP	<R1,R0>
	015224	012601 				 MOV	(SP)+,R1
	015226	012600 				 MOV	(SP)+,R0
   5141	015230					RETURN
	015230	000207 				 RTS	PC
   5142
   5143						.DSABL	LSB
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 109
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   5147						.TITLE	KLILT -- DETERMINE BEST LOGICAL CONFIGURATION
   5148	015232					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   5149					;
   5150					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5151					;
   5152					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5153					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5154					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5155					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5156					;
   5157					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5158					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5159					; EQUIPMENT CORPORATION.
   5160					;
   5161					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5162					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5163					;
   5164					; VERSION 05-00
   5165					;
   5166					; ALAN D. PECKHAM  6-APR-77
   5167					;
   5168					; MODIFIED BY:
   5169					;
   5170					; FUNCTION: THIS MODULE DETERMINES THE BEST WAY TO CONFIGURE THE
   5171					;  RELOCATEABLE INTERNAL MEMORY CONTROLLERS TO OBTAIN
   5172					;  THE LARGEST CONTIGUOUS BLOCK OF MEMORY STARTING AT
   5173					;  PHYSICAL LOCATION ZERO.
   5174					;
   5175					; LOCAL DATA
   5176					;
   5177	001720					.PSECT	DATA,D
   5178	001720	000000 			DLTNXB:	.WORD	0		; END OF NXM BLOCK.
   5179	003466					.PSECT	TEXT,D
   5181	003466				TLTIDM:	ERROR	<ILLEGAL DMA20 IN CONFIGURATION>
	003466	   077 	   040 	   111 		 .ASCIZ	\? ILLEGAL DMA20 IN CONFIGURATION\
	003471	   114 	   114 	   105
	003474	   107 	   101 	   114
	003477	   040 	   104 	   115
	003502	   101 	   062 	   060
	003505	   040 	   111 	   116
	003510	   040 	   103 	   117
	003513	   116 	   106 	   111
	003516	   107 	   125 	   122
	003521	   101 	   124 	   111
	003524	   117 	   116 	   000
   5183	003527				TLTNM0:	ERROR	<NO MEMORY AT LOCATION ZERO>
	003527	   077 	   040 	   116 		 .ASCIZ	\? NO MEMORY AT LOCATION ZERO\
	003532	   117 	   040 	   115
	003535	   105 	   115 	   117
	003540	   122 	   131 	   040
	003543	   101 	   124 	   040
	003546	   114 	   117 	   103
	003551	   101 	   124 	   111
	003554	   117 	   116 	   040
	003557	   132 	   105 	   122
	003562	   117 	   000
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 109-1
$SETXT	-- DETERMINE LOGICAL LAYOUT OF EXTERNAL MEMORY

   5184	003564				TLT2MG:	ERROR	<MEMORY HAS TOO MANY GAPS>
	003564	   077 	   040 	   115 		 .ASCIZ	\? MEMORY HAS TOO MANY GAPS\
	003567	   105 	   115 	   117
	003572	   122 	   131 	   040
	003575	   110 	   101 	   123
	003600	   040 	   124 	   117
	003603	   117 	   040 	   115
	003606	   101 	   116 	   131
	003611	   040 	   107 	   101
	003614	   120 	   123 	   000
   5185	003274					.PSECT	GLBL,D,GBL
   5186	003274	000000 	000000 		.HOLE::	.WORD	0,0		; MEMORY HOLE TO FILL.
   5187	015232					.PSECT
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 110
$SETLT	-- SET UP LOGICAL TABLE

   5189						.SBTTL	$SETLT	-- SET UP LOGICAL TABLE
   5190					;+
   5191					; THIS ROUTINE SETS UP THE LOGICAL TABLE FOR CONTROLLER ALLOCATION.
   5192					; THE INTERNAL MEMORY IS ASSIGNED TO FILL ANY HOLES IN EXTERNAL
   5193					; MEMORY TO PRODUCE THE LARGEST CONTIGUOUS BLOCK OF MEMORY AS POSSIBLE
   5194					; STARTING AT PHYSICAL LOCATION ZERO.
   5195					;
   5196					; INPUTS:
   5197					;	.CTLSW	- CONTROLLER USE SWITCHES.
   5198					;	.CTLTP	- CONTROLLER TYPES.
   5199					;	.CTLUS	- CONTROLLER USE VALUES.
   5200					;	.DMATB,.DMASZ	- DMA TABLES IF DMA EXISTS.
   5201					;
   5202					; OUTPUTS:
   5203					;	.CATTB	- CONTROLLER CONFIGURATION TABLE.
   5204					;	.GAPTB,.GAPSZ	- GAP TABLE OF UNFILLED MEMORY HOLES.
   5205					;	CARRY IS SET IF CONFIGURATION IS UNSATISFACTORY, AND MESSAGE
   5206					;	IS DISPLAYED.
   5207					;-
   5208
   5210	015232	105037 	000057'		$SETLT::CLRB	.LTBEX		; COUNT EXTERNAL AND
   5212	015236	105037 	000060'			CLRB	.LTBIN		; INTERNAL MEMORY CONTROLLERS.
   5217	015242	012701 	000040 			MOV	#CTLS,R1
   5218	015246	105761 	000220'		10$:	TSTB	.CTLSW-1(R1)
   5219	015252	002410 				BLT	30$
   5220	015254	122761 	000002 	000060'		CMPB	#2,.CTLTP-1(R1)
   5223	015262	001002 				BNE	20$
   5227	015264	105237 	000057'			INCB	.LTBEX		; EXTERNAL MEMORY CONTROLLER.
   5235	015270	105237 	000060'		20$:	INCB	.LTBIN		; INTERNAL MEMORY CONTROLLER.
   5237	015274	077114 			30$:	SOB	R1,10$
   5238	015276	005037 	000364'			CLR	.GAPSZ		; CLEAR GAP TABLE
   5239	015302	005037 	003274'			CLR	.HOLE+0		; AND INITIAL HOLE STARTING ADDRESS.
   5240	015306	012705 	000366'			MOV	#.GAPTB,R5	; GAP TABLE POINTER.
   5241	015312	012715 	000400 			MOV	#400,(R5)	; (PROVISIONAL FIRST GAP ADDRESS)
   5243	015316	105337 	000057'			DECB	.LTBEX		; ANY EXTERNAL CONTROLLERS ?
   5244	015322	002440 				BLT	60$		; NO, TRY SOMETHING ELSE.
   5245	015324	003051 				BGT	80$		; TOO MANY !!!
   5246	015326	105737 	000225'			TSTB	.CTLSW+4	; IS IT THE PROPER CONTROLLER ?
   5247	015332	002446 				BLT	80$		; THIS IS A NEW ONE ON US...
   5248	015334	012704 	000264'			MOV	#.DMATB,R4	; GET DMA20 MAP LIST
   5249	015340	013703 	000262'			MOV	.DMASZ,R3	; AND NUMBER OF ENTRIES.
   5250	015344	001427 				BEQ	60$		; NO MEMORY IN THE DMA20 !
   5251	015346	105237 	000225'			INCB	.CTLSW+4	; INDICATE THAT IT IS ALLOCATED
   5252	015352	012700 	000506'			MOV	#.CATTB+<4*4>,R0
   5253	015356	105020 				CLRB	(R0)+		; AND SET ITS CONFIGURATION ENTRY.
   5254	015360	105020 				CLRB	(R0)+
   5255	015362	105020 				CLRB	(R0)+
   5256	015364	113701 	000165'			MOVB	.CTLUS+4,R1	; GET BUS MODE AND
   5257	015370	116110 	000666'			MOVB	.CATIF(R1),(R0)	; INSERT IN ENTRY.
   5258	015374	005714 				TST	(R4)		; FIRST BLOCK START AT ZERO ?
   5259	015376	001405 				BEQ	50$		; YES, PUT GAP AT END OF BLOCK,
   5261	015400	011437 	001720'		40$:	MOV	(R4),DLTNXB	; OTHERWISE FILL GAP BEFORE THIS BLOCK.
   5262	015404					CALL	LLTFHL
	015404	004737 	015500'			 JSR	PC,LLTFHL
   5267	015410	103416 				BCS	70$
   5268	015412	012437 	003274'		50$:	MOV	(R4)+,.HOLE+0	; NOW START NEXT GAP AT END
   5269	015416	062437 	003274'			ADD	(R4)+,.HOLE+0	; OF THIS BLOCK.
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 110-1
$SETLT	-- SET UP LOGICAL TABLE

   5270	015422	077312 				SOB	R3,40$		; IF MORE BLOCKS, FILL TO NEXT.
   5273	015424	012737 	000400 	001720'	60$:	MOV	#400,DLTNXB	; OTHERWISE TO END OF ADDRESS SPACE.
   5274	015432					CALL	LLTFHL
	015432	004737 	015500'			 JSR	PC,LLTFHL
   5279	015436	103403 				BCS	70$
   5280	015440	005737 	000366'			TST	.GAPTB		; IS THERE A GAP AT ZERO ?
   5281	015444	001407 				BEQ	90$		; YES, TELL OPERATOR.
   5282	015446				70$:	RETURN
	015446	000207 				 RTS	PC
   5283
   5285	015450				80$:	PRINT	#TLTIDM		; WE HAVE A BOGUS DMA20.
	015450	012700 	003466'			 MOV	#TLTIDM,R0
	015454	004737 	000000G			 JSR	PC,$TTMSG
   5286	015460	000261 				SEC
   5287	015462					RETURN
	015462	000207 				 RTS	PC
   5289	015464				90$:	PRINT	#TLTNM0		; NO MEMORY AT LOCATION ZERO.
	015464	012700 	003527'			 MOV	#TLTNM0,R0
	015470	004737 	000000G			 JSR	PC,$TTMSG
   5290	015474	000261 				SEC
   5291	015476					RETURN
	015476	000207 				 RTS	PC
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 111
$SETLT	-- SET UP LOGICAL TABLE

   5294					;+
   5295					; FILL A CRUDELY LARGE HOLE IN MEMORY. IF IT EXTENDS OVER A SECTION
   5296					; BOUNDRY, BREAK IT UP INTO ONE-SECTION CHUNKS FOR THE HOLE FILL ROUTINE.
   5297					; IF THE HOLE CANNOT BE FILLED BY MEMORY, IT IS FILLED WITH A
   5298					; GAP TABLE ENTRY.
   5299					;
   5300					; INPUTS:
   5301					;	.LTBIN	- COUNT OF INTERNAL CONTROLLERS LEFT TO CONFIGURE.
   5302					;	.HOLE+0	- START OF NXM HOLE TO FILL.
   5303					;	DLTNXB	- END OF NXM HOLE TO FILL +1.
   5304					;
   5305					; OUTPUTS:
   5306					;	INTERNAL MEMORY IS ALLOCATED TO FILL THE HOLE OR THE REMAINING
   5307					;	UNFILLED AREA IS ENTERED INTO THE GAP TABLE. IF THE GAP TABLE
   5308					;	OVERFLOWS, CARRY IS SET.
   5309					;-
   5310
   5311	015500	105737 	000060'		LLTFHL:	TSTB	.LTBIN		; ANY INTERNAL CONTROLLERS LEFT ?
   5312	015504	003435 				BLE	40$		; NO, PILE THIS INTO A GAP.
   5313	015506	013700 	003274'			MOV	.HOLE+0,R0	; CALCULATE THE NEXT SECTION BOUNDRY
   5314	015512	062700 	000020 			ADD	#20,R0
   5315	015516	042700 	000017 			BIC	#17,R0
   5316	015522	023700 	001720'			CMP	DLTNXB,R0	; AND IF HOLE ENDS BEFORE THE SECTION ENDS
   5317	015526	002002 				BGE	10$		; THEN
   5318	015530	013700 	001720'			MOV	DLTNXB,R0	; USE THE HOLE END ADDRESS.
   5319	015534	010037 	003276'		10$:	MOV	R0,.HOLE+2
   5320	015540					CALL	$FILHL		; FILL THE HOLE WITH GOOD INTENTIONS.
	015540	004737 	015732'			 JSR	PC,$FILHL
   5321	015544	103010 				BCC	20$
   5322	015546	013737 	003274'	003276'		MOV	.HOLE+0,.HOLE+2	; NO TAKERS...
   5323	015554	005237 	003276'			INC	.HOLE+2		; ADD A 16K GAP.
   5324	015560					CALL	LLTFGP
	015560	004737 	015606'			 JSR	PC,LLTFGP
   5325	015564	103404 				BCS	30$
   5326	015566	023737 	003276'	001720'	20$:	CMP	.HOLE+2,DLTNXB	; IS THERE MORE TO FILL ?
   5327	015574	002741 				BLT	LLTFHL		; YES, GO GET SOME MORE.
   5328	015576				30$:	RETURN
	015576	000207 				 RTS	PC
   5329	015600	013737 	001720'	003276'	40$:	MOV	DLTNXB,.HOLE+2	; PUT THIS HOLE IN
   5330					;	CALLR	LLTFGP		; THE GAP TABLE.
KLILT -- DETERMINE BEST LOGICAL	MACRO M1108  13-JAN-78 10:41  PAGE 112
$SETLT	-- SET UP LOGICAL TABLE

   5333					;+
   5334					; A HOLE WHICH CANNOT BE FILLED WITH INTERNAL MEMORY BECOMES A
   5335					; GAP AND IS DULY RECORDED IN THE GAP TABLE. ADJACENT GAPS
   5336					; ARE COLLAPSED INTO SINGLE GAP ENTRIES. GAPS MUST BE RECIEVED
   5337					; IN ORDER OF INCREASING ADDRESS.
   5338					;
   5339					; INPUTS:
   5340					;	R5	- ADDRESS OF NEXT AVAILABLE GAP ENTRY.
   5341					;	.GAPSZ	- NUMBER OF GAPS ALLOCATED TO THIS POINT.
   5342					;	.HOLE+0	- START OF GAP (ADDRESS/16K).
   5343					;	.HOLE+2	- END OF GAP +1 (ADDRESS/16K).
   5344					;
   5345					; OUTPUTS:
   5346					;	R5	- UPDATED IF NEW ENTRY IS CREATED.
   5347					;	.HOLE+2	- UPDATED TO INDICATE THAT HOLE WAS FILLED WITH GAP.
   5348					;	CARRY IS SET AND MESSAGE IS DISPLAYED IF GAP TABLE OVERFLOWS.
   5349					;-
   5350
   5351	015606	005737 	000364'		LLTFGP:	TST	.GAPSZ		;IF THIS IS THE FIRST GAP
   5352	015612	001413 				BEQ	10$		;THEN INSTALL IT,
   5353	015614	011500 				MOV	(R5),R0		;OTHERWISE CHECK TO SEE IF
   5354	015616	066500 	000002 			ADD	2(R5),R0	;THIS HOLE BELONGS TO THE LAST GAP.
   5355	015622	023700 	003274'			CMP	.HOLE+0,R0
   5356	015626	001413 				BEQ	20$		;YES, INCREASE SIZE OF LAST GAP.
   5357	015630	022737 	000020 	000364'		CMP	#G.APL,.GAPSZ	;CAN WE ADD ANOTHER GAP ?
   5358	015636	003427 				BLE	40$		;NO, I CAN'T TAKE IT ANYMORE...
   5359	015640	022525 				CMP	(R5)+,(R5)+
   5360	015642	005237 	000364'		10$:	INC	.GAPSZ		;ONE MORE GAP
   5361	015646	013715 	003274'			MOV	.HOLE+0,(R5)	;WITH THIS ADDRESS
   5362	015652	005065 	000002 			CLR	2(R5)		;AND INITIAL LENGTH ZERO.
   5363	015656	013700 	003276'		20$:	MOV	.HOLE+2,R0	;GET END OF HOLE AND
   5364	015662	022700 	000400 			CMP	#400,R0		;IF THIS IS LAST HOLE,
   5365	015666	001410 				BEQ	30$		;DELETE IT.
   5366	015670	163700 	003274'			SUB	.HOLE+0,R0	;COMPUTE GAP LENGTH AND
   5367	015674	060065 	000002 			ADD	R0,2(R5)	;ADD TO CURRENT GAP ENTRY.
   5368	015700	013737 	003276'	003274'		MOV	.HOLE+2,.HOLE+0	;THE HOLE IS FILLED.
   5369	015706					RETURN
	015706	000207 				 RTS	PC
   5370	015710	005337 	000364'		30$:	DEC	.GAPSZ		;IGNORE HOLE AT 400.
   5371	015714					RETURN
	015714	000207 				 RTS	PC
   5372	015716				40$:	PRINT	#TLT2MG		;THE OPERATOR HAS PLAYED A JOKE ON US.
	015716	012700 	003564'			 MOV	#TLT2MG,R0
	015722	004737 	000000G			 JSR	PC,$TTMSG
   5373	015726	000261 				SEC
   5374	015730					RETURN
	015730	000207 				 RTS	PC
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 113
$SETLT	-- SET UP LOGICAL TABLE

   5376						.TITLE	KLILR -- CONTROLLER ALLOCATION RULES
   5377	015732					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   5378					;
   5379					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5380					;
   5381					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5382					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5383					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5384					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5385					;
   5386					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5387					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5388					; EQUIPMENT CORPORATION.
   5389					;
   5390					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5391					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5392					;
   5393					; VERSION 05-00
   5394					;
   5395					; ALAN D. PECKHAM  5-APR-77
   5396					;
   5397					; MODIFIED BY:
   5398					;
   5399					; FUNCTION: THIS ROUTINE  TRIES TO FILL A GIVEN HOLE IN PHYSICAL MEMORY
   5400					;  WITH MEMORY FROM THE POOL OF AVAILABLE INTERNAL MEMORY  CONTROLLERS.
   5401					;
   5403					; EQUATED SYMBOLS
   5404					;
   5405		000005 			RULNG	=	5		;LENGTH OF RULE TABLE ENTRY.
   5406					;
   5407					; LOCAL MACROS
   5408					;
   5409						.MACRO	RULE	MCT,SM,INTRLV,PAS,PASM
   5410						.IF	IDN,<MCT>,<MB20>
   5411						 .BYTE	3,SM,INTRLV,PAS,17-PASM
   5412						.IFF
   5413						 .BYTE	1,SM,INTRLV,PAS,17-PASM
   5414						.ENDC
   5415						.ENDM
   5416					;
   5417					; LOCAL DATA
   5418					;
   5419	001722					.PSECT	DATA,D
   5420	001722	000000 			DLRCT:	.WORD	0		; NUMBERS OF
   5421		001722'			DLRCT0	=	DLRCT+0		; CONTROLLER OR
   5422		001723'			DLRCT1	=	DLRCT+1		; CONTROLLER PAIR TO ALLOCATE.
   5423					;
   5424					; OFFSET INTO RULE TABLE FOR GIVEN HOLE SIZE (SPEEDS UP SEARCHES).
   5425					;
   5426	001724				DLROFT:	.IRP	X,<16,32,48,64,64,96,96,128,128,128,128,192,192,192,192,256>
   5427						 .BYTE	DLR'X'-DLR256
   5428						.ENDM
	001724	   322 				 .BYTE	DLR16-DLR256
	001725	   233 				 .BYTE	DLR32-DLR256
	001726	   221 				 .BYTE	DLR48-DLR256
	001727	   120 				 .BYTE	DLR64-DLR256
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 113-1
$SETLT	-- SET UP LOGICAL TABLE

	001730	   120 				 .BYTE	DLR64-DLR256
	001731	   074 				 .BYTE	DLR96-DLR256
	001732	   074 				 .BYTE	DLR96-DLR256
	001733	   024 				 .BYTE	DLR128-DLR256
	001734	   024 				 .BYTE	DLR128-DLR256
	001735	   024 				 .BYTE	DLR128-DLR256
	001736	   024 				 .BYTE	DLR128-DLR256
	001737	   012 				 .BYTE	DLR192-DLR256
	001740	   012 				 .BYTE	DLR192-DLR256
	001741	   012 				 .BYTE	DLR192-DLR256
	001742	   012 				 .BYTE	DLR192-DLR256
	001743	   000 				 .BYTE	DLR256-DLR256
   5429					;
   5430					; TABLE TO CONVERT MODULE MASK TO LEGAL MODULE SET WHICH HAS ONE
   5431					; CONTIGUOUS SET OF MODULES.
   5432					;
   5433	001744	   000 	   001 	   002 	DLRLGL:	.BYTE	0,1,2,3,4,1,6,7,10,1,2,3,14,14,16,17
	001747	   003 	   004 	   001
	001752	   006 	   007 	   010
	001755	   001 	   002 	   003
	001760	   014 	   014 	   016
	001763	   017
   5434					;
   5435					; TABLE TO GET COUNT OF MODULES FROM MODULE MASK.
   5436					;
   5437	001764	   000 	   001 	   001 	DLRBTC:	.BYTE	0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4
	001767	   002 	   001 	   002
	001772	   002 	   003 	   001
	001775	   002 	   002 	   003
	002000	   002 	   003 	   003
	002003	   004
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 114
$SETLT	-- SET UP LOGICAL TABLE

   5439					;---	THE RULE TABLE
   5440
   5441	002004				DLR256:	RULE	MB20,17,3,00,17	; PAIR OF MB20		(4-WAY)
	002004	   003 	   017 	   003 		 .BYTE	3,17,3,00,17-17
	002007	   000 	   000
   5442	002011					RULE	MB20,17,2,00,17	;			(2-WAY)
	002011	   003 	   017 	   002 		 .BYTE	3,17,2,00,17-17
	002014	   000 	   000
   5443	002016				DLR192:	RULE	MB20,07,2,00,17	; PAIR OF 3/4 MB20
	002016	   003 	   007 	   002 		 .BYTE	3,07,2,00,17-17
	002021	   000 	   000
   5444	002023					RULE	MB20,16,2,04,17
	002023	   003 	   016 	   002 		 .BYTE	3,16,2,04,17-17
	002026	   004 	   000
   5445	002030				DLR128:	RULE	MA20,17,3,00,07	; PAIR OF MA20		(4-WAY)
	002030	   001 	   017 	   003 		 .BYTE	1,17,3,00,17-07
	002033	   000 	   010
   5446	002035					RULE	MA20,17,2,00,07	;			(2-WAY)
	002035	   001 	   017 	   002 		 .BYTE	1,17,2,00,17-07
	002040	   000 	   010
   5447	002042					RULE	MB20,03,3,00,17	; PAIR OF 1/2 MB20	(4-WAY)
	002042	   003 	   003 	   003 		 .BYTE	3,03,3,00,17-17
	002045	   000 	   000
   5448	002047					RULE	MB20,14,3,10,17
	002047	   003 	   014 	   003 		 .BYTE	3,14,3,10,17-17
	002052	   010 	   000
   5449	002054					RULE	MB20,03,2,00,17	;			(2-WAY)
	002054	   003 	   003 	   002 		 .BYTE	3,03,2,00,17-17
	002057	   000 	   000
   5450	002061					RULE	MB20,06,2,04,17
	002061	   003 	   006 	   002 		 .BYTE	3,06,2,04,17-17
	002064	   004 	   000
   5451	002066					RULE	MB20,14,2,10,17
	002066	   003 	   014 	   002 		 .BYTE	3,14,2,10,17-17
	002071	   010 	   000
   5452	002073					RULE	MB20,17,1,00,07	; SINGLE MB20		(1-WAY)
	002073	   003 	   017 	   001 		 .BYTE	3,17,1,00,17-07
	002076	   000 	   010
   5453	002100				DLR96:	RULE	MA20,07,2,00,07	; PAIR OF 3/4 MA20	(2-WAY)
	002100	   001 	   007 	   002 		 .BYTE	1,07,2,00,17-07
	002103	   000 	   010
   5454	002105					RULE	MA20,16,2,02,07
	002105	   001 	   016 	   002 		 .BYTE	1,16,2,02,17-07
	002110	   002 	   010
   5455	002112					RULE	MB20,07,1,00,07	; SINGLE 3/4 MB20	(1-WAY)
	002112	   003 	   007 	   001 		 .BYTE	3,07,1,00,17-07
	002115	   000 	   010
   5456	002117					RULE	MB20,16,1,02,07
	002117	   003 	   016 	   001 		 .BYTE	3,16,1,02,17-07
	002122	   002 	   010
   5457	002124				DLR64:	RULE	MA20,03,3,00,07	; PAIR OF 1/2 MA20	(4-WAY)
	002124	   001 	   003 	   003 		 .BYTE	1,03,3,00,17-07
	002127	   000 	   010
   5458	002131					RULE	MA20,14,3,04,07
	002131	   001 	   014 	   003 		 .BYTE	1,14,3,04,17-07
	002134	   004 	   010
   5459	002136					RULE	MA20,03,2,00,07	;			(2-WAY)
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 114-1
$SETLT	-- SET UP LOGICAL TABLE

	002136	   001 	   003 	   002 		 .BYTE	1,03,2,00,17-07
	002141	   000 	   010
   5460	002143					RULE	MA20,06,2,02,07
	002143	   001 	   006 	   002 		 .BYTE	1,06,2,02,17-07
	002146	   002 	   010
   5461	002150					RULE	MA20,14,2,04,07
	002150	   001 	   014 	   002 		 .BYTE	1,14,2,04,17-07
	002153	   004 	   010
   5462	002155					RULE	MB20,01,2,00,17	; PAIR OF 1/4 MB20
	002155	   003 	   001 	   002 		 .BYTE	3,01,2,00,17-17
	002160	   000 	   000
   5463	002162					RULE	MB20,02,2,04,17
	002162	   003 	   002 	   002 		 .BYTE	3,02,2,04,17-17
	002165	   004 	   000
   5464	002167					RULE	MB20,04,2,10,17
	002167	   003 	   004 	   002 		 .BYTE	3,04,2,10,17-17
	002172	   010 	   000
   5465	002174					RULE	MB20,10,2,14,17
	002174	   003 	   010 	   002 		 .BYTE	3,10,2,14,17-17
	002177	   014 	   000
   5466	002201					RULE	MA20,17,1,00,03	; SINGLE MA20		(1-WAY)
	002201	   001 	   017 	   001 		 .BYTE	1,17,1,00,17-03
	002204	   000 	   014
   5467	002206					RULE	MB20,03,1,00,07	; SINGLE 1/2 MB20
	002206	   003 	   003 	   001 		 .BYTE	3,03,1,00,17-07
	002211	   000 	   010
   5468	002213					RULE	MB20,06,1,02,07
	002213	   003 	   006 	   001 		 .BYTE	3,06,1,02,17-07
	002216	   002 	   010
   5469	002220					RULE	MB20,14,1,04,07
	002220	   003 	   014 	   001 		 .BYTE	3,14,1,04,17-07
	002223	   004 	   010
   5470	002225				DLR48:	RULE	MA20,07,1,00,03	; SINGLE 3/4 MA20
	002225	   001 	   007 	   001 		 .BYTE	1,07,1,00,17-03
	002230	   000 	   014
   5471	002232					RULE	MA20,16,1,01,03
	002232	   001 	   016 	   001 		 .BYTE	1,16,1,01,17-03
	002235	   001 	   014
   5472	002237				DLR32:	RULE	MA20,01,2,00,07	; PAIR 1/4 MA20		(2-WAY)
	002237	   001 	   001 	   002 		 .BYTE	1,01,2,00,17-07
	002242	   000 	   010
   5473	002244					RULE	MA20,02,2,02,07
	002244	   001 	   002 	   002 		 .BYTE	1,02,2,02,17-07
	002247	   002 	   010
   5474	002251					RULE	MA20,04,2,04,07
	002251	   001 	   004 	   002 		 .BYTE	1,04,2,04,17-07
	002254	   004 	   010
   5475	002256					RULE	MA20,10,2,06,07
	002256	   001 	   010 	   002 		 .BYTE	1,10,2,06,17-07
	002261	   006 	   010
   5476	002263					RULE	MA20,03,1,00,03	; SINGLE 1/2 MA20	(1-WAY)
	002263	   001 	   003 	   001 		 .BYTE	1,03,1,00,17-03
	002266	   000 	   014
   5477	002270					RULE	MA20,06,1,01,03
	002270	   001 	   006 	   001 		 .BYTE	1,06,1,01,17-03
	002273	   001 	   014
   5478	002275					RULE	MA20,14,1,02,03
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 114-2
$SETLT	-- SET UP LOGICAL TABLE

	002275	   001 	   014 	   001 		 .BYTE	1,14,1,02,17-03
	002300	   002 	   014
   5479	002302					RULE	MB20,01,1,00,07	; SINGLE 1/4 MB20
	002302	   003 	   001 	   001 		 .BYTE	3,01,1,00,17-07
	002305	   000 	   010
   5480	002307					RULE	MB20,02,1,02,07
	002307	   003 	   002 	   001 		 .BYTE	3,02,1,02,17-07
	002312	   002 	   010
   5481	002314					RULE	MB20,04,1,04,07
	002314	   003 	   004 	   001 		 .BYTE	3,04,1,04,17-07
	002317	   004 	   010
   5482	002321					RULE	MB20,10,1,06,07
	002321	   003 	   010 	   001 		 .BYTE	3,10,1,06,17-07
	002324	   006 	   010
   5483	002326				DLR16:	RULE	MA20,01,1,00,03	; SINGLE 1/4 MA20
	002326	   001 	   001 	   001 		 .BYTE	1,01,1,00,17-03
	002331	   000 	   014
   5484	002333					RULE	MA20,02,1,01,03
	002333	   001 	   002 	   001 		 .BYTE	1,02,1,01,17-03
	002336	   001 	   014
   5485	002340					RULE	MA20,04,1,02,03
	002340	   001 	   004 	   001 		 .BYTE	1,04,1,02,17-03
	002343	   002 	   014
   5486	002345					RULE	MA20,10,1,03,03
	002345	   001 	   010 	   001 		 .BYTE	1,10,1,03,17-03
	002350	   003 	   014
   5487	002352				DLR0:	.EVEN			; END OF TABLE.
   5488	015732					.PSECT
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 115
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5490						.SBTTL	$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY
   5491					;+
   5492					; ALLOCATE INTERNAL MEMORY TO FILL A HOLE DELIMITED BY .HOLE+0 AND .HOLE+2.
   5493					;
   5494					; BASIC OPERATION IS AS FOLLOWS:
   5495					; THE FIRST RULE TO TRY IS DETERMINED BY THE HOLE SIZE. IF THE
   5496					; RULE CANNOT BE SATISFIED THEN THE NEXT RULE IS TRIED, ETC. IF
   5497					; A RULE IS SATISFIED, THE MEMORY IS ALLOCATED, HOLE SIZE IS
   5498					; REDUCED, AND IF THE SIZE IS STILL NON-ZERO, IT TRIES TO FILL
   5499					; THE REST.
   5500					; INPUTS:
   5501					;	.HOLE+0 MUST CONTAIN THE STARTING ADDRESS OF THE HOLE
   5502					;	AND .HOLE+2 MUST CONTAIN THE ADDRESS OF THE NEXT WORD AFTER THE HOLE.
   5503					;	BOTH ADDRESSES MUST BE IN THE SAME SECTION.
   5504					;
   5505					; OUTPUTS:
   5506					;	THE .CATTB ARRAY IS UPDATED FOR THE ALLOCATED CONTROLLERS AND
   5507					;	.HOLE+0 POINTS TO THE 16K BLOCK FOLLOWING THE LAST ALLOCATED
   5508					;	CONTROLLER. THE ".LTB" COUNTERS ARE UPDATED TO REMOVE THE
   5509					;	ALLOCATED CONTROLLERS. CARRY IS SET IF HOLE COULD NOT BE FILLED.
   5510					;-
   5511
   5512	015732	004537 	000356'		$FILHL::JSR	R5,$RSAVE	; SAVE THE REGISTERS.
   5513	015736	013700 	003276'		LLRNXH:	MOV	.HOLE+2,R0
   5514	015742	163700 	003274'			SUB	.HOLE+0,R0	; CALCULATE THE HOLE SIZE
   5515	015746	003001 				BGT	10$		; AND IF NEGLIGIBLE,
   5516	015750					RETURN			; GO HOME.
	015750	000207 				 RTS	PC
   5517	015752	005005 			10$:	CLR	R5
   5518	015754	156005 	001723'			BISB	DLROFT-1(R0),R5	; GET DISPLACEMENT TO FIRST RULE
   5519	015760	062705 	002004'			ADD	#DLR256,R5	; ADD BASE ADDRESS AND GO.
   5520					;	BR	LLRULE
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 116
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5522					;+
   5523					; THE RULE IS REJECTED IF:
   5524					; 1) PAS.NE.(HOLESTART(18-21).AND.PASM) (I.E. BOUNDRY CND NOT OK)
   5525					; 2) PROPER CONTROLLER TYPE/SM GROUP CANNOT BE FOUND
   5526					; 3) MCT=MB20.AND.HOLESTART(21)=1 (I.E. MB20 ON 16K BOUNDRY)
   5527					; 4) INTERLEAVE MODE IS NOT WITHIN ACCEPTABLE LIMITS.
   5528					;
   5529					; NOTE:
   5530					; 1) SMO=00 IMPLIES SINGLE CONTROLLER, ODD OR EVEN, WITH ONE WAY
   5531					;    INTERLEAVE.
   5532					; 2) NO HOLE WILL CROSS A 256K ADDRESS BOUNDRY.
   5533					;-
   5534
   5535	015764	126537 	000002 	000055'	LLRULE:	CMPB	2(R5),.ILMAX	; REJECT 4.
   5536	015772	003027 				BGT	80$
   5537	015774	126537 	000002 	000056'		CMPB	2(R5),.ILMIN
   5538	016002	002423 				BLT	80$
   5539	016004	013700 	003274'		10$:	MOV	.HOLE+0,R0	; REJECT 1.
   5540	016010	146500 	000004 			BICB	4(R5),R0
   5541	016014	042700 	177760 			BIC	#^C17,R0
   5542	016020	126500 	000003 			CMPB	3(R5),R0
   5543	016024	001012 				BNE	80$
   5544	016026	122715 	000003 			CMPB	#3,(R5)		; REJECT 3.
   5545	016032	001004 				BNE	20$
   5546	016034	032737 	000001 	003274'		BIT	#1,.HOLE+0
   5547	016042	001003 				BNE	80$
   5548	016044				20$:	CALL	LLRFND		; REJECT 2.
	016044	004737 	016324'			 JSR	PC,LLRFND
   5549	016050	103007 				BCC	LLRALC		; ONE FOUND - ALLOCATE IT.
   5550	016052	062705 	000005 		80$:	ADD	#RULNG,R5	; SKIP OVER THIS RULE.
   5551	016056	022705 	002352'			CMP	#DLR0,R5	; ANY MORE RULES ?
   5552	016062	003340 				BGT	LLRULE
   5553	016064	000261 				SEC			; NO - WE'RE A FAILURE.
   5554	016066					RETURN
	016066	000207 				 RTS	PC
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 117
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5556					;+
   5557					; ALLOCATE A CONTROLLER TO FILL THE HOLE. WE SET THE ALLOCATED
   5558					; INDICATOR AND FILL IN THE CATTAB ENTRY. THE HOLE STARTING ADDRESS
   5559					; IS ALSO UPDATED TO THE ADDRESS FOLLOWING THE ALLOCATION.
   5560					;
   5561					; INPUTS:
   5562					;	R5	- POINTER TO THE CURRENT RULE.
   5563					;	DLRCT	- CONTROLLER NUMBERS TO ALLOCATE.
   5564					;	.HOLE+0	- ADDRESS TO CONFIGURE THE CONTROLLERS TO.
   5565					;
   5566					; OUTPUTS:
   5567					;	.CTLSW	- MODIFIED TO INDICATE THE CONTROLLERS ALLOCATED.
   5568					;	.CATTB	- ALLOCATION PARAMETERS FOR THE CONTROLLERS USED.
   5569					;-
   5570
   5571					;+
   5572					; CALCULATE MEMORY SIZE AND UPPER BOUND
   5573					;-
   5574	016070	116502 	000001 		LLRALC:	MOVB	1(R5),R2	; GET SM MODULE COUNT.
   5575	016074	116201 	001764'			MOVB	DLRBTC(R2),R1
   5576	016100	126527 	000002 	000001 		CMPB	2(R5),#1	; IF IT IS NOT 1-WAY
   5577	016106	001401 				BEQ	10$		; THEN IT MUST BE TWO CONTROLLERS
   5578	016110	006301 				ASL	R1		; SO DOUBLE THE SIZE.
   5579	016112	122715 	000003 		10$:	CMPB	#3,(R5)		; IF IT IS A MB20
   5580	016116	001001 				BNE	20$
   5581	016120	006301 				ASL	R1		; THEN DOUBLE AGAIN.
   5582	016122	013702 	003274'		20$:	MOV	.HOLE+0,R2	; NOW GET UPPER BOUND
   5583	016126	060201 				ADD	R2,R1
   5584	016130	010137 	003274'			MOV	R1,.HOLE+0	; AND UPDATE HOLE BOUNDRY.
   5585	016134	005301 				DEC	R1		; BACKUP ONE
   5586	016136					SL	R1,14		; AND POSITION FOR UPPER BOUND.
	016136	000301 				 SWAB	R1
	016140	006301 				 ASL	R1
	016142	006301 				 ASL	R1
	016144	006301 				 ASL	R1
	016146	006301 				 ASL	R1
   5587	016150	042701 	007777 			BIC	#^C170000,R1	; CLEAR OUT OTHER BITS
   5588	016154	006202 				ASR	R2		; AND CONCATENATE
   5589	016156	006001 				ROR	R1		; LOWER BOUND.
   5590	016160	006202 				ASR	R2
   5591	016162	006001 				ROR	R1
   5592	016164	052701 	001000 			BIS	#1000,R1	; SET LOAD BOUND BIT.
   5593	016170	000301 				SWAB	R1
   5594	016172	042702 	177700 			BIC	#^C77,R2	; CLEAR OUT BITS
   5595	016176	000302 				SWAB	R2		; AND
   5596	016200	116503 	000002 			MOVB	2(R5),R3
   5597	016204	156302 	000666'			BISB	.CATIF(R3),R2	; PUT IN INTERLEAVE
   5598	016210	000302 				SWAB	R2
   5599					;+
   5600					; NOW TAKE ACTION ON CONTROLLERS.
   5601					;-
   5602	016212	113700 	001722'			MOVB	DLRCT0,R0	; GET FIRST CONTROLLER
   5603	016216	105260 	000221'			INCB	.CTLSW(R0)	; AND INDICATE ALLOCATION.
   5604	016222	105337 	000060'			DECB	.LTBIN
   5605	016226					SL	R0,2		; GET CATTAB ENTRY
	016226	006300 				 ASL	R0
	016230	006300 				 ASL	R0
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 117-1
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5606	016232	062700 	000466'			ADD	#.CATTB,R0
   5607	016236	113720 	001723'			MOVB	DLRCT1,(R0)+	; SET ALTERNATE CONTROLLER NUMBER,
   5608	016242	110120 				MOVB	R1,(R0)+	; NOW INSTALL BYTES.
   5609	016244	010210 				MOV	R2,(R0)
   5610	016246	052710 	005000 			BIS	#5000,(R0)	; SET REQ EN 0,2.
   5611	016252	105737 	001723'			TSTB	DLRCT1		; IF THERE IS AN ALTERNATE CONTROLLER
   5612	016256	002416 				BLT	30$
   5613	016260	113700 	001723'			MOVB	DLRCT1,R0	; THEN ALLOCATE IT.
   5614	016264	105260 	000221'			INCB	.CTLSW(R0)
   5615	016270	105337 	000060'			DECB	.LTBIN
   5616	016274					SL	R0,2
	016274	006300 				 ASL	R0
	016276	006300 				 ASL	R0
   5617	016300	062700 	000466'			ADD	#.CATTB,R0
   5618	016304	113720 	001722'			MOVB	DLRCT0,(R0)+	; (ALTERNATE CONTROLLER)
   5619	016310	110120 				MOVB	R1,(R0)+
   5620	016312	010210 				MOV	R2,(R0)
   5621	016314	052710 	002400 		30$:	BIS	#2400,(R0)	; SET REQ EN 1,3
   5622	016320	000137 	015736'		40$:	JMP	LLRNXH		; NOW GO BACK TO CHECK IF HOLE FILLED.
KLILR -- CONTROLLER ALLOCATION 	MACRO M1108  13-JAN-78 10:41  PAGE 118
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5624					;+
   5625					; THIS ROUTINE SEARCHES THE PHYSICAL TABLE FOR A CONTROLLER WHICH
   5626					; FITS THE CURRENT RULE.
   5627					;
   5628					; INPUTS:
   5629					;	R5	- POINTER TO RULE TO USE.
   5630					;	.CTLSW	- INDICATES UNALLOCATED CONTROLLERS.
   5631					;	.CTLUS	- CONTAINS MODULES AVAILABLE ON CONTROLLER.
   5632					;	.CTLTP	- CONTROLLER TYPE.
   5633					;	.ILMIN,.ILMAX	- MIN & MAX INTERLEAVE TO USE.
   5634					;
   5635					; OUTPUTS:
   5636					;	DLRCT	- CONTROLLERS WHICH FIT THE RULE AND MAY BE ALLOCATED.
   5637					;-
   5638
   5639	016324	012737 	177777 	001722'	LLRFND:	MOV	#-1,DLRCT	; INITIALIZE CONTROLLERS TO ILLEGAL.
   5640	016332	012702 	000001 			MOV	#1,R2		; MAGICAL CONSTANT.
   5641	016336	005000 				CLR	R0		; FIRST CONTROLLER.
   5642	016340	105760 	000221'		10$:	TSTB	.CTLSW(R0)	; CONTROLLER AVAILABLE ?
   5643	016344	001044 				BNE	60$		; NO.
   5644	016346	126015 	000061'			CMPB	.CTLTP(R0),(R5)	; RIGHT TYPE ?
   5645	016352	001041 				BNE	60$		; NO, IGNORE.
   5646	016354	116003 	000161'			MOVB	.CTLUS(R0),R3	; GET MODULE BITS
   5647	016360	126365 	001744'	000001 		CMPB	DLRLGL(R3),1(R5) ; AND CHECK IF LEGAL.
   5648	016366	001033 				BNE	60$
   5649	016370	110037 	001722'			MOVB	R0,DLRCT0	; USE THIS CONTROLLER.
   5650	016374	010001 				MOV	R0,R1
   5651	016376	074201 				XOR	R2,R1		; GET ALTERNATE CONTROLLER
   5652	016400	105761 	000221'			TSTB	.CTLSW(R1)	; IF NOT AVAILABLE,
   5653	016404	001006 				BNE	20$		; RULE MUST BE 1-WAY.
   5654	016406	116103 	000161'			MOVB	.CTLUS(R1),R3	; AND ITS MODULE BITS
   5655	016412	126365 	001744'	000001 		CMPB	DLRLGL(R3),1(R5) ; TO CHECK IF LEGAL.
   5656	016420	001404 				BEQ	30$		; A MATCH !
   5657	016422	120265 	000002 		20$:	CMPB	R2,2(R5)	; IF RULE IS 1-WAY
   5658	016426	001013 				BNE	60$
   5659	016430					RETURN			; THEN WE CAN USE THEM.
	016430	000207 				 RTS	PC
   5660	016432	120265 	000002 		30$:	CMPB	R2,2(R5)	; IF RULE IS NOT 1-WAY
   5661	016436	001404 				BEQ	50$		; TRY TO KEEP PAIR TOGETHER.
   5662	016440	110137 	001723'			MOVB	R1,DLRCT1	; SAVE SECOND CONTROLLER
   5663	016444	000241 			40$:	CLC			; AND EXIT.
   5664	016446					RETURN
	016446	000207 				 RTS	PC
   5665	016450	120237 	000055'		50$:	CMPB	R2,.ILMAX	; FORCE 1-WAY INTERLEAVE ?
   5666	016454	001773 				BEQ	40$		; YES, TOO BAD WE HAVE TO...
   5667	016456	005200 			60$:	INC	R0		; TRY NEXT CONTROLLER
   5668	016460	022700 	000037 			CMP	#LCTL,R0	; IF THERE IS ONE.
   5669	016464	002325 				BGE	10$
   5670	016466	000261 				SEC			; NO LUCK...
   5671	016470					RETURN
	016470	000207 				 RTS	PC
KLISM -- SET MEMORY TO LOGICAL 	MACRO M1108  13-JAN-78 10:41  PAGE 119
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5674						.TITLE	KLISM -- SET MEMORY TO LOGICAL CONFIGURATION
   5675	016472					IDENT$	5,2,KLI$$F							; ADP02
						.IDENT	/B05020/
   5676					;
   5677					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5678					;
   5679					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5680					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5681					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5682					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5683					;
   5684					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5685					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5686					; EQUIPMENT CORPORATION.
   5687					;
   5688					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5689					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5690					;
   5691					; VERSION 05-02									; ADP02
   5692					;
   5693					; ALAN D. PECKHAM  5-APR-77
   5694					;
   5695					; MODIFIED BY:
   5696					;
   5697					; FUNCTION: THIS ROUTINE USES THE LOGICAL CONFIGURATION  TABLE
   5698					;  TO SET THE PHYSICAL MEMORY CONTROLLERS.
   5699					;
   5700					; EQUATED SYMBOLS
   5701					;
   5702		000002 			BLKO	=	2		; KL I/O SUBFUNCTION CODE.
   5703		000254 			JRST	=	254		; KL INSTRUCTION CODE.
   5704		000004 			PI	=	4		; KL DEVICE.
   5705					;
   5706					; LOCAL DATA
   5707					;
   5708	002352					.PSECT	DATA,D
   5709	002352	   000 	   000 	   004 	DSMPGM:	.BYTE	0,0,4		; LOAD AC0-AC3 OF AC BLOCK 0.
   5710	002355				DSMSD0:	WD36$	40 0		; AC0 - (FOR SBUS DIAG 0)
	002355	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	002360	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5711	002362				DSMSD1:	WD36$	0 1		; AC1 - (FOR SBUS DIAG 1)
	002362	   001 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002365	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5712	002367					IO10$	BLKO PI,,0	; AC2
	002367	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002372	   005 	   016 			 .BYTE	BY$$3,BY$$4
   5713	002374					I10$	JRST 4,,2	; AC3
	002374	   002 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002377	   142 	   005 			 .BYTE	BY$$3,BY$$4
   5714	002401	   000 	   003 	   377 		.BYTE	0,3,-1		; START AT AC3 OF AC BLOCK 0.
   5715	002404				DSMBF:	WD36$	0 0		; BIT BUCKET.
	002404	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002407	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5716	002411				DSMAC1:	WD22$	1		; ADDRESS OF AC1.
	002411	   001 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   5717						.EVEN
   5719	003617					.PSECT	TEXT,D
KLISM -- SET MEMORY TO LOGICAL 	MACRO M1108  13-JAN-78 10:41  PAGE 119-1
$FILHL	-- RULES FOR ALLOCATION FOR INTERNAL MEMORY

   5720	003617				TSMMI1:	WARNING	<INT. MEMORY HAS SOME 1-WAY INTERLEAVED>
	003617	   045 	   040 	   111 		 .ASCIZ	\% INT. MEMORY HAS SOME 1-WAY INTERLEAVED\
	003622	   116 	   124 	   056
	003625	   040 	   115 	   105
	003630	   115 	   117 	   122
	003633	   131 	   040 	   110
	003636	   101 	   123 	   040
	003641	   123 	   117 	   115
	003644	   105 	   040 	   061
	003647	   055 	   127 	   101
	003652	   131 	   040 	   111
	003655	   116 	   124 	   105
	003660	   122 	   114 	   105
	003663	   101 	   126 	   105
	003666	   104 	   000
   5722	016472					.PSECT
KLISM -- SET MEMORY TO LOGICAL 	MACRO M1108  13-JAN-78 10:41  PAGE 120
$SETMM	-- SET THE CALCULATED CONFIGURATION

   5724						.SBTTL	$SETMM	-- SET THE CALCULATED CONFIGURATION
   5725					;+
   5726					; TAKE THE INFORMATION IN THE LOGICAL CONFIGURATION TABLE AND
   5727					; THE CONTROLLER USE SWITCHES TO CONFIGURE THE MEMORY.
   5728					; ALL REGISTERS ARE DESTROYED.
   5729					;-
   5730
   5732	016472				$SETMM::CALL	$SWEEP		; CLEAR CACHE.
	016472	004737 	012632'			 JSR	PC,$SWEEP
   5733	016476	103532 				BCS	90$
   5734	016500					CALL	$SBMR		; RESET THE CONTROLLERS AND
	016500	004737 	023074'			 JSR	PC,$SBMR
   5738	016504	103527 				BCS	90$
   5739	016506	012700 	002352'			MOV	#DSMPGM,R0	; GET KL PROGRAM				; ADP01
   5740	016512					CALL	$LDNGO		; LOAD AND START IN ACS.
	016512	004737 	000000G			 JSR	PC,$LDNGO
   5741	016516	103522 				BCS	90$
   5743	016520	005005 				CLR	R5		; A 1-WAY INTERLEAVE INDICATOR.
   5745	016522	005002 				CLR	R2		; START AT CONTROLLER ZERO.
   5746	016524	105762 	000221'		10$:	TSTB	.CTLSW(R2)	; IS CONTROLLER ALLOCATED ?
   5747	016530	003501 				BLE	60$		; NO, IGNORE IGNORE !
   5748	016532	010203 				MOV	R2,R3		; GET CONFIGURE ENTRY
   5749	016534					SL	R3,2
	016534	006303 				 ASL	R3
	016536	006303 				 ASL	R3
   5750	016540	062703 	000467'			ADD	#.CATTB+1,R3
   5751	016544	112337 	002363'			MOVB	(R3)+,DSMSD1+1	; INTO SBUS WORDS.
   5752	016550	112337 	002364'			MOVB	(R3)+,DSMSD1+2
   5753	016554	111337 	002360'			MOVB	(R3),DSMSD0+3
   5754	016560	012701 	002355'			MOV	#DSMSD0,R1	; DO SBUS DIAG 0
   5755	016564	010200 				MOV	R2,R0		; TO CONTROLLER.
   5756	016566					CALL	LSMSBD		; THIS SETS INTERLEAVE
	016566	004737 	016766'			 JSR	PC,LSMSBD
   5757	016572	103474 				BCS	90$		; AND REQUEST ENABLES.
   5758	016574	142737 	177717 	002360'		BICB	#^C60,DSMSD0+3	; CHECK TO SEE IF
   5759	016602	001407 				BEQ	20$		; (NO INTERLEAVE)
   5760	016604	142761 	177717 	000003 		BICB	#^C60,3(R1)	; INTERLEAVE TOOK HOLD.				; ADP01
   5761	016612	123761 	002360'	000003 		CMPB	DSMSD0+3,3(R1)							; ADP01
   5762	016620	001060 				BNE	80$
   5763	016622	012701 	002362'		20$:	MOV	#DSMSD1,R1	; NOW DO SBUS DIAG 1
   5764	016626	010200 				MOV	R2,R0		; TO CONTROLLER.
   5765	016630					CALL	LSMSBD		; THIS SETS BOUNDS AND
	016630	004737 	016766'			 JSR	PC,LSMSBD
   5766	016634	103453 				BCS	90$		; CLEARS LOOPBACK MODE.
   5768	016636	122762 	000002 	000061'		CMPB	#2,.CTLTP(R2)	; IF CONTROLLER IS DMA20
   5769	016644	001433 				BEQ	60$		; WE ARE FINISHED.
   5771	016646	142737 	177700 	002364'		BICB	#^C77,DSMSD1+2	; VERIFY IF LOWER AND
   5772	016654	142761 	177700 	000002 		BICB	#^C77,2(R1)							; ADP01
   5773	016662	123761 	002364'	000002 		CMPB	DSMSD1+2,2(R1)							; ADP01
   5774	016670	001034 				BNE	80$
   5775	016672	142737 	177403 	002363'		BICB	#^C374,DSMSD1+1	; UPPER BOUNDS
   5776	016700	142761 	177403 	000001 		BICB	#^C374,1(R1)	; TOOK HOLD.					; ADP01
   5777	016706	123761 	002363'	000001 		CMPB	DSMSD1+1,1(R1)							; ADP01
   5778	016714	001022 				BNE	80$
   5780	016716	111301 				MOVB	(R3),R1		; CHECK FOR
   5781	016720	042701 	177717 			BIC	#^C60,R1	; AND RECORD IF
   5782	016724	022701 	000020 			CMP	#20,R1		; 1-WAY INTERLEAVE.
KLISM -- SET MEMORY TO LOGICAL 	MACRO M1108  13-JAN-78 10:41  PAGE 120-1
$SETMM	-- SET THE CALCULATED CONFIGURATION

   5783	016730	001001 				BNE	60$
   5784	016732	005205 				INC	R5
   5786	016734	005202 			60$:	INC	R2		; FOR ALL CONTROLLERS
   5787	016736	022702 	000037 			CMP	#LCTL,R2	; TO LAST ONE.
   5788	016742	002270 				BGE	10$
   5790	016744	005705 				TST	R5		; IF SOME 1-WAY
   5791	016746	001404 				BEQ	70$		; INTERLEAVING
   5792	016750					PRINT	#TSMMI1		; TELL OPERATOR.
	016750	012700 	003617'			 MOV	#TSMMI1,R0
	016754	004737 	000000G			 JSR	PC,$TTMSG
   5794	016760	005727 			70$:	TST	(PC)+		; (CLEAR CARRY)
   5795	016762	000261 			80$:	SEC
   5796	016764				90$:	RETURN
	016764	000207 				 RTS	PC
   5797
   5798					;+
   5799					; PERFORM SBUS DIAGNOSTIC USING AC PROGRAM.
   5800					;
   5801					; INPUTS:
   5802					;	R1	- ADDRESS OF DIAGNOSTIC WORD
   5803					;	R0	- CONTROLLER NUMBER.
   5804					;
   5805					; OUTPUTS:
   5806					;	R0	- POINTER TO RETURN SBUS WORD.
   5807					;	CARRY SET IF ERROR OCCURS.
   5808					;-
   5809
   5810	016766	142761 	000017 	000004 	LSMSBD:	BICB	#17,4(R1)	; CLEAR CONTROLLER FIELD.
   5811	016774	142761 	000200 	000003 		BICB	#200,3(R1)
   5812	017002	006200 				ASR	R0		; ALL EXCEPT BIT 0
   5813	017004	150061 	000004 			BISB	R0,4(R1)	; IN TOP BYTE.
   5814	017010	103003 				BCC	10$
   5815	017012	152761 	000200 	000003 		BISB	#200,3(R1)	; SET BIT 0.
   5816	017020	012700 	000000'		10$:	MOV	#.ZERO,R0	; STORE THE SBUS WORD
   5817	017024					CALL	$DPOS
	017024	004737 	022136'			 JSR	PC,$DPOS
   5818	017030	103420 				BCS	90$
   5819	017032	012700 	012000 			MOV	#.CONBT,R0	; AND LET THE KL RUN.
   5820	017036					CALL	$DFXC
	017036	004737 	022006'			 JSR	PC,$DFXC
   5821	017042	103413 				BCS	90$
   5822	017044	012700 	001750 			MOV	#1000.,R0	; NOW WAIT FOR RESULT.
   5823	017050					CALL	$WTKL
	017050	004737 	020624'			 JSR	PC,$WTKL
   5824	017054	103406 				BCS	90$
   5825	017056	012701 	002404'			MOV	#DSMBF,R1	; GET IT INTO
   5826	017062	012700 	002411'			MOV	#DSMAC1,R0	; OUR BUFFER.
   5827	017066					CALLR	$EXAM
	017066	000137 	022240'			 JMP	$EXAM
   5828	017072				90$:	RETURN
	017072	000207 				 RTS	PC
KLIPD -- DISPLAY THE PHYSICAL C	MACRO M1108  13-JAN-78 10:41  PAGE 121
$SETMM	-- SET THE CALCULATED CONFIGURATION

   5830						.TITLE	KLIPD -- DISPLAY THE PHYSICAL CONFIGURATION
   5831	017074					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   5832					;
   5833					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5834					;
   5835					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5836					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5837					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5838					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5839					;
   5840					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5841					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5842					; EQUIPMENT CORPORATION.
   5843					;
   5844					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5845					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5846					;
   5847					; VERSION 05-00
   5848					;
   5849					; ALAN D. PECKHAM  5-APR-77
   5850					;
   5851					; MODIFIED BY:
   5852					;
   5853					; FUNCTION: THIS ROUTINE DISPLAYS THE INFORMATION GATHERED IN THE
   5854					;  PHYSICAL CONFIGURATION TABLES.
   5855					;
   5856					; EQUATED SYMBOLS
   5857					;
   5858		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
   5859		000012 			LF	=	12		; LINE FEED CHARACTER.
   5860		000040 			SPC	=	40		; SPACE CHARACTER.
   5861		000011 			TAB	=	11		; TAB CHARACTER.
   5862					;
   5863					; LOCAL DATA
   5864					;
   5865	002414					.PSECT	DATA,D
   5866	002414	004005'			DPDTYP:	.WORD	TPDNTP
   5868	002416	004031'				.WORD	TPDT01
   5873	002420	004043'				.WORD	TPDT02
   5878	002422	004061'				.WORD	TPDT03
   5882	002424	004005'				.WORD	TPDNTP
   5886	002426	004005'				.WORD	TPDNTP
   5895	003670					.PSECT	TEXT,D
   5896	003670	   120 	   110 	   131 	TPDHD:	.ASCII	/PHYSICAL MEMORY:/<CR><LF>
	003673	   123 	   111 	   103
	003676	   101 	   114 	   040
	003701	   115 	   105 	   115
	003704	   117 	   122 	   131
	003707	   072 	   015 	   012
   5897	003712	   103 	   117 	   116 		.ASCII	/CONTROLLER ADDRESS  TYPE    STORAGE/<CR><LF>
	003715	   124 	   122 	   117
	003720	   114 	   114 	   105
	003723	   122 	   040 	   101
	003726	   104 	   104 	   122
	003731	   105 	   123 	   123
	003734	   040 	   040 	   124
KLIPD -- DISPLAY THE PHYSICAL C	MACRO M1108  13-JAN-78 10:41  PAGE 121-1
$SETMM	-- SET THE CALCULATED CONFIGURATION

	003737	   131 	   120 	   105
	003742	   040 	   040 	   040
	003745	   040 	   123 	   124
	003750	   117 	   122 	   101
	003753	   107 	   105 	   015
	003756	   012
   5898		000067 			TPDHL1	=	.-TPDHD
   5900	003757	   011 	   011 	   011 		.ASCII	/			  7 6 5 4 3 2 1 0/<CR><LF>
	003762	   040 	   040 	   067
	003765	   040 	   066 	   040
	003770	   065 	   040 	   064
	003773	   040 	   063 	   040
	003776	   062 	   040 	   061
	004001	   040 	   060 	   015
	004004	   012
   5901		000115 			TPDHL2	=	.-TPDHD
   5903	004005	   040 	   040 	   040 	TPDNTP:	.ASCIZ	/    UNDEFINED TYPE /
	004010	   040 	   125 	   116
	004013	   104 	   105 	   106
	004016	   111 	   116 	   105
	004021	   104 	   040 	   124
	004024	   131 	   120 	   105
	004027	   040 	   000
   5905	004031	   040 	   040 	   040 	TPDT01:	.ASCIZ	/    MA20 /
	004034	   040 	   115 	   101
	004037	   062 	   060 	   040
	004042	   000
   5908	004043	   040 	   040 	   040 	TPDT02:	.ASCIZ	/    DMA20    /
	004046	   040 	   104 	   115
	004051	   101 	   062 	   060
	004054	   040 	   040 	   040
	004057	   040 	   000
   5911	004061	   040 	   040 	   040 	TPDT03:	.ASCIZ	/    MB20 /
	004064	   040 	   115 	   102
	004067	   062 	   060 	   040
	004072	   000
   5916	017074					.PSECT
KLIPD -- DISPLAY THE PHYSICAL C	MACRO M1108  13-JAN-78 10:41  PAGE 122
$REPPT	-- REPORT PHYSICAL CONFIGURATION

   5918						.SBTTL	$REPPT	-- REPORT PHYSICAL CONFIGURATION
   5919					;+
   5920					; DISPLAY INFORMATION ON THE MEMORY CONTROLLERS WHICH HAVE RESPONDED.
   5921					;-
   5922
   5923	017074	004537 	000356'		$REPPT::JSR	R5,$RSAVE	; SAVE REGISTERS.
   5924	017100	012700 	003670'			MOV	#TPDHD,R0	; PRINT HEADING.
   5925	017104	012701 	000067 			MOV	#TPDHL1,R1
   5927	017110	105737 	000054'			TSTB	.MINT		; ANY INTERNAL MEMORY ?
   5928	017114	001402 				BEQ	10$
   5929	017116	012701 	000115 			MOV	#TPDHL2,R1	; YES, INCLUDE SUB-HEADING.
   5931	017122				10$:	CALL	$TTWR
	017122	004737 	000000G			 JSR	PC,$TTWR
   5932	017126	005004 				CLR	R4
   5933	017130	116401 	000061'		20$:	MOVB	.CTLTP(R4),R1	; GET TYPE.
   5934	017134	001003 				BNE	30$		; IF ZERO
   5935	017136	105764 	000121'			TSTB	.CTLMD(R4)	; AND NO MODULES,
   5936	017142	001505 				BEQ	100$		; IGNORE.
   5937	017144	012705 	000772'		30$:	MOV	#.TTOBF,R5	; SET BUFFER POINTER.
   5938	017150	112725 	000011 			MOVB	#TAB,(R5)+
   5939	017154	010400 				MOV	R4,R0
   5940	017156					CALL	$TRB2O		; INSERT CONTROL ADDRESS.
	017156	004737 	023130'			 JSR	PC,$TRB2O
   5941	017162	112725 	000011 			MOVB	#TAB,(R5)+
   5942	017166	122701 	000005 			CMPB	#T.YPL,R1	; IF TYPE UNDEFINED
   5943	017172	002001 				BGE	40$
   5944	017174	005001 				CLR	R1		; THEN SAY SO.
   5945	017176	006301 			40$:	ASL	R1
   5946	017200	016100 	002414'			MOV	DPDTYP(R1),R0
   5947	017204					CALL	$ASCIZ		; MOVE IN MEMORY TYPE.
	017204	004737 	000412'			 JSR	PC,$ASCIZ
   5948	017210	006201 				ASR	R1		; IF TYPE UNDEFINED
   5949	017212	105761 	000046'			TSTB	.TYPTB(R1)
   5950	017216	002441 				BLT	80$		; TYPE OUT WHAT WE GOT.
   5952	017220	022701 	000002 			CMP	#2,R1		; IS IT A DMA20 ?
   5954	017224	001022 				BNE	60$
   5958	017226	013702 	000262'			MOV	.DMASZ,R2	; YES, ANYTHING IN IT ?
   5959	017232	001437 				BEQ	90$
   5960	017234	012701 	000264'			MOV	#.DMATB,R1	; YES, ADD UP TABLE
   5961	017240	005000 				CLR	R0		; OF MEMORY SIZES.
   5962	017242	005721 			50$:	TST	(R1)+
   5963	017244	062100 				ADD	(R1)+,R0
   5964	017246	077203 				SOB	R2,50$
   5965	017250					SL	R0,4		; SET TO NUMBER OF K
	017250	006300 				 ASL	R0
	017252	006300 				 ASL	R0
	017254	006300 				 ASL	R0
	017256	006300 				 ASL	R0
   5966	017260					CALL	$TRB2I		; AND MAKE PRINTABLE.
	017260	004737 	023266'			 JSR	PC,$TRB2I
   5967	017264	112725 	000113 			MOVB	#'K,(R5)+
   5968	017270	000420 				BR	90$
   5971	017272	116400 	000121'		60$:	MOVB	.CTLMD(R4),R0	; IT IS MA20 OR MB20,
   5972	017276	012702 	000010 			MOV	#10,R2		; DISPLAY MODULE MAP.
   5973	017302	112725 	000040 		70$:	MOVB	#SPC,(R5)+
   5974	017306	112715 	000030 			MOVB	#'0/2,(R5)
   5975	017312	106100 				ROLB	R0
KLIPD -- DISPLAY THE PHYSICAL C	MACRO M1108  13-JAN-78 10:41  PAGE 122-1
$REPPT	-- REPORT PHYSICAL CONFIGURATION

   5976	017314	106125 				ROLB	(R5)+		; ROLL THE BITS IN.
   5977	017316	077207 				SOB	R2,70$
   5978	017320	000404 				BR	90$
   5980	017322	116400 	000061'		80$:	MOVB	.CTLTP(R4),R0	; PRINT OUT UNDEFINED
   5981	017326					CALL	$TRB2O		; CONTROLLER TYPE.
	017326	004737 	023130'			 JSR	PC,$TRB2O
   5982	017332	112725 	000015 		90$:	MOVB	#CR,(R5)+	; TERMINATE LINE
   5983	017336	112725 	000012 			MOVB	#LF,(R5)+	; WITH CR,LF.
   5984	017342	010501 				MOV	R5,R1		; FIGURE LINE LENGTH AND
   5985	017344	012700 	000772'			MOV	#.TTOBF,R0
   5986	017350	160001 				SUB	R0,R1
   5987	017352					CALL	$TTWR		; PRINT IT.
	017352	004737 	000000G			 JSR	PC,$TTWR
   5988	017356	005204 			100$:	INC	R4		; GO FOR MORE ?
   5989	017360	022704 	000040 			CMP	#CTLS,R4
   5990	017364	003261 				BGT	20$		; GO GO GO ...
   5992	017366					CALLR	$REPXT
	017366	000137 	017372'			 JMP	$REPXT
KLIXD -- DISPLAY THE EXTERNAL M	MACRO M1108  13-JAN-78 10:41  PAGE 123
$REPPT	-- REPORT PHYSICAL CONFIGURATION

   5997						.TITLE	KLIXD -- DISPLAY THE EXTERNAL MEMORY COMPLEMENT
   5998	017372					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   5999					;
   6000					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6001					;
   6002					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6003					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6004					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6005					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6006					;
   6007					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6008					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6009					; EQUIPMENT CORPORATION.
   6010					;
   6011					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6012					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6013					;
   6014					; VERSION 05-00
   6015					;
   6016					; ALAN D. PECKHAM  4-APR-77
   6017					;
   6018					; MODIFIED BY:
   6019					;
   6020					; FUNCTION:  THIS ROUTINE DISPLAYS ON THE CONSOLE THE MEMORY THAT
   6021					;  IS AVAILABLE ON THE EXTERNAL MEMORY CONTROLLER, IF THERE IS ONE.
   6022					;
   6024					; EQUATED SYMBOLS
   6025					;
   6026		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
   6027		000012 			LF	=	12		; LINE FEED CHARACTER.
   6028		000040 			SPC	=	40		; SPACE CHARACTER.
   6029					;
   6030					; LOCAL DATA
   6031					;
   6032	004073					.PSECT	TEXT,D
   6033	004073	   105 	   130 	   124 	TXDHD:	.ASCII	/EXTERNAL MEMORY RESPONSE/<CR><LF>
	004076	   105 	   122 	   116
	004101	   101 	   114 	   040
	004104	   115 	   105 	   115
	004107	   117 	   122 	   131
	004112	   040 	   122 	   105
	004115	   123 	   120 	   117
	004120	   116 	   123 	   105
	004123	   015 	   012
   6034	004125	   101 	   104 	   104 		.ASCII	/ADDRESS	  SIZE/<CR><LF>
	004130	   122 	   105 	   123
	004133	   123 	   011 	   040
	004136	   040 	   123 	   111
	004141	   132 	   105 	   015
	004144	   012
   6035		000052 			TXDHL	=	.-TXDHD
   6036	017372					.PSECT
KLIXD -- DISPLAY THE EXTERNAL M	MACRO M1108  13-JAN-78 10:41  PAGE 124
$REPXT	-- REPORT EXTERNAL MEMORY RESPONSE

   6038						.SBTTL	$REPXT	-- REPORT EXTERNAL MEMORY RESPONSE
   6039					;+
   6040					; DISPLAY THE EXISTENT MEMORY SEGMENTS WITHIN THE DMA20 MEMORY SYSTEM.
   6041					;-
   6042
   6043	017372	122737 	000002 	000065'	$REPXT::CMPB	#2,.CTLTP+4	; IF DMA20 NOT PRESENT
   6044	017400	001047 				BNE	90$		; FORGET IT,
   6045	017402	012700 	004073'			MOV	#TXDHD,R0	; OTHERWISE PRINT HEADER.
   6046	017406	012701 	000052 			MOV	#TXDHL,R1
   6047	017412					CALL	$TTWR
	017412	004737 	000000G			 JSR	PC,$TTWR
   6048	017416	012703 	000264'			MOV	#.DMATB,R3
   6049	017422	013702 	000262'			MOV	.DMASZ,R2	; HOW MANY ?
   6050	017426	001434 				BEQ	90$		; (HUH?)
   6051	017430	012705 	000772'		10$:	MOV	#.TTOBF,R5	; SET BUFFER POINTER.
   6052	017434	012300 				MOV	(R3)+,R0	; PICK UP AN ADDRESS
   6053	017436					CALL	$TENAD
	017436	004737 	023742'			 JSR	PC,$TENAD
   6054	017442	012300 				MOV	(R3)+,R0	; THEN ITS SIZE
   6055	017444					SL	R0,4
	017444	006300 				 ASL	R0
	017446	006300 				 ASL	R0
	017450	006300 				 ASL	R0
	017452	006300 				 ASL	R0
   6056	017454	112715 	000040 			MOVB	#SPC,(R5)
   6057	017460	112525 				MOVB	(R5)+,(R5)+
   6058	017462					CALL	$TRB2I
	017462	004737 	023266'			 JSR	PC,$TRB2I
   6059	017466	112725 	000113 			MOVB	#'K,(R5)+	; IN K.
   6060	017472	112725 	000015 			MOVB	#CR,(R5)+	; TERMINATE LINE
   6061	017476	112725 	000012 			MOVB	#LF,(R5)+	; WITH CR,LF.
   6062	017502	010501 				MOV	R5,R1		; FIGURE LINE LENGTH AND
   6063	017504	012700 	000772'			MOV	#.TTOBF,R0
   6064	017510	160001 				SUB	R0,R1
   6065	017512					CALL	$TTWR		; PRINT IT.
	017512	004737 	000000G			 JSR	PC,$TTWR
   6066	017516	077234 				SOB	R2,10$		; DO FOR ALL.
   6067	017520				90$:	RETURN
	017520	000207 				 RTS	PC
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 125
$REPXT	-- REPORT EXTERNAL MEMORY RESPONSE

   6070						.TITLE	KLILD -- DISPLAY LOGICAL CONFIGURATION
   6071	017522					IDENT$	5,1,KLI$$F
						.IDENT	/B05010/
   6072					;
   6073					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6074					;
   6075					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6076					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6077					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6078					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6079					;
   6080					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6081					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6082					; EQUIPMENT CORPORATION.
   6083					;
   6084					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6085					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6086					;
   6087					; VERSION 05-01
   6088					;
   6089					; ALAN D. PECKHAM  5-APR-77
   6090					;
   6091					; MODIFIED BY: R. BELANGER	10-AUG-77
   6092					;		FIX BUG IN LOGICAL MEMORY REPORT
   6093					;
   6094					; FUNCTION: THIS ROUTINE DISPLAYS ON THE CONSOLE THE COMPUTED  LOGICAL
   6095					;  CONFIGURATION.
   6096					;
   6097					; EQUATED SYMBOLS
   6098					;
   6099		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
   6100		000012 			LF	=	12		; LINE FEED CHARACTER.
   6101		000040 			SPC	=	40		; SPACE CHARACTER.
   6102		000011 			TAB	=	11		; TAB CHARACTER.
   6103					;
   6104					; LOCAL DATA
   6105					;
   6106	002430					.PSECT	DATA,D
   6107		002426'			DLDTYP	=	.-2
   6109	002430	004340'				.WORD	TLDT01
   6114	002432	004353'				.WORD	TLDT02
   6119	002434	004366'				.WORD	TLDT03
   6123	002436	004325'				.WORD	TLDNTP
   6127	002440	004325'				.WORD	TLDNTP
   6136	004145					.PSECT	TEXT,D
   6137	004145	   114 	   117 	   107 	TLDHD:	.ASCII	/LOGICAL MEMORY CONFIGURATION:/<CR><LF>
	004150	   111 	   103 	   101
	004153	   114 	   040 	   115
	004156	   105 	   115 	   117
	004161	   122 	   131 	   040
	004164	   103 	   117 	   116
	004167	   106 	   111 	   107
	004172	   125 	   122 	   101
	004175	   124 	   111 	   117
	004200	   116 	   072 	   015
	004203	   012
   6138	004204	   011 	   011 	   040 		.ASCII	/		  CONTROLLER/<CR><LF>
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 125-1
$REPXT	-- REPORT EXTERNAL MEMORY RESPONSE

	004207	   040 	   103 	   117
	004212	   116 	   124 	   122
	004215	   117 	   114 	   114
	004220	   105 	   122 	   015
	004223	   012
   6139	004224	   101 	   104 	   104 		.ASCII	/ADDRESS   SIZE  RQ0 RQ1 RQ2 RQ3  CONTYPE INT/<CR><LF>
	004227	   122 	   105 	   123
	004232	   123 	   040 	   040
	004235	   040 	   123 	   111
	004240	   132 	   105 	   040
	004243	   040 	   122 	   121
	004246	   060 	   040 	   122
	004251	   121 	   061 	   040
	004254	   122 	   121 	   062
	004257	   040 	   122 	   121
	004262	   063 	   040 	   040
	004265	   103 	   117 	   116
	004270	   124 	   131 	   120
	004273	   105 	   040 	   111
	004276	   116 	   124 	   015
	004301	   012
   6140		000135 			TLDHDL	=	.-TLDHD
   6141	004302	   116 	   117 	   116 	TLDNME:	.ASCIZ	/NONEXISTANT MEMORY/
	004305	   105 	   130 	   111
	004310	   123 	   124 	   101
	004313	   116 	   124 	   040
	004316	   115 	   105 	   115
	004321	   117 	   122 	   131
	004324	   000
   6142	004325	   040 	   040 	   125 	TLDNTP:	.ASCIZ	/  UNKNOWN /
	004330	   116 	   113 	   116
	004333	   117 	   127 	   116
	004336	   040 	   000
   6144	004340	   040 	   040 	   115 	TLDT01:	.ASCIZ	/  MA20    /
	004343	   101 	   062 	   060
	004346	   040 	   040 	   040
	004351	   040 	   000
   6147	004353	   040 	   040 	   104 	TLDT02:	.ASCIZ	/  DMA20   /
	004356	   115 	   101 	   062
	004361	   060 	   040 	   040
	004364	   040 	   000
   6150	004366	   040 	   040 	   115 	TLDT03:	.ASCIZ	/  MB20    /
	004371	   102 	   062 	   060
	004374	   040 	   040 	   040
	004377	   040 	   000
   6155	017522					.PSECT
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 126
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6157						.SBTTL	$REPLT	-- REPORT LOGICAL CONFIGURATION
   6158
   6159	017522	012700 	004145'		$REPLT::MOV	#TLDHD,R0	; PRINT HEADING.
   6160	017526	012701 	000135 			MOV	#TLDHDL,R1
   6161	017532					CALL	$TTWR
	017532	004737 	000000G			 JSR	PC,$TTWR
   6162	017536	005004 				CLR	R4
   6163	017540	012705 	000772'		LLDLP:	MOV	#.TTOBF,R5	; SET BUFFER POINTER.
   6165	017544	012702 	000264'			MOV	#.DMATB,R2	; CHECK IF IT IS A DMA20 BLOCK.
   6166	017550	013701 	000262'			MOV	.DMASZ,R1
   6168	017554	001404 				BEQ	20$		; (NO DMA20)
   6172	017556	021204 			10$:	CMP	(R2),R4
   6173	017560	001447 				BEQ	LLDEX		; A MATCH !
   6174	017562	022222 				CMP	(R2)+,(R2)+
   6175	017564	077104 				SOB	R1,10$
   6178	017566	005002 			20$:	CLR	R2		; CHECK IF INTERNAL.
   6179	017570	105762 	000221'		30$:	TSTB	.CTLSW(R2)	; IF IT IS ALLOCATED
   6180	017574	003423 				BLE	40$
   6182	017576	122762 	000002 	000061'		CMPB	#2,.CTLTP(R2)	; AND NOT A DMA20
   6183	017604	001417 				BEQ	40$
   6185	017606	010203 				MOV	R2,R3		; GET LOGICAL TABLE ENTRY.
   6186	017610					SL	R3,2
	017610	006303 				 ASL	R3
	017612	006303 				 ASL	R3
   6187	017614	062703 	000466'			ADD	#.CATTB,R3
   6188	017620	116301 	000001 			MOVB	1(R3),R1	; EXTRACT LOWER BOUND.
   6189	017624	116300 	000002 			MOVB	2(R3),R0
   6190	017630	106101 				ROLB	R1
   6191	017632	006100 				ROL	R0
   6192	017634	106101 				ROLB	R1
   6193	017636	006100 				ROL	R0
   6194	017640	020004 				CMP	R0,R4
   6195	017642	001467 				BEQ	LLDIN		; A MATCH !
   6196	017644	005202 			40$:	INC	R2
   6197	017646	022702 	000037 			CMP	#LCTL,R2
   6198	017652	002346 				BGE	30$
   6200	017654	012702 	000366'		50$:	MOV	#.GAPTB,R2	; CHECK IN GAP TABLE.
   6201	017660	013701 	000364'			MOV	.GAPSZ,R1
   6202	017664	001404 				BEQ	90$		; (NO GAPS)
   6203	017666	021204 			60$:	CMP	(R2),R4
   6204	017670	001435 				BEQ	LLDGP		; A MATCH !
   6205	017672	022222 				CMP	(R2)+,(R2)+
   6206	017674	077104 				SOB	R1,60$
   6207	017676				90$:	RETURN
	017676	000207 				 RTS	PC
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 127
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6210					;+
   6211					; PRINT OUT DMA20 INFORMATION
   6212					;-
   6213
   6214	017700	010400 			LLDEX:	MOV	R4,R0		; PRINT THE ADDRESS.
   6215	017702					CALL	$TENAD
	017702	004737 	023742'			 JSR	PC,$TENAD
   6216	017706	016200 	000002 			MOV	2(R2),R0	; PRINT THE SIZE.
   6217	017712					CALL	LLDSZ
	017712	004737 	020200'			 JSR	PC,LLDSZ
   6218	017716	012701 	000004 			MOV	#4,R1		; DO FOUR TIMES.
   6219	017722	012700 	000004 		10$:	MOV	#4,R0		; PRINT THE CONTROLLER.
   6220	017726					CALL	LLDCT
	017726	004737 	020236'			 JSR	PC,LLDCT
   6221	017732	077105 				SOB	R1,10$
   6222	017734	013700 	002432'			MOV	DLDTYP+<2*2>,R0	; IDENTIFY AS DMA20.
   6223	017740					CALL	$ASCIZ
	017740	004737 	000412'			 JSR	PC,$ASCIZ
   6224	017744	113700 	000165'			MOVB	.CTLUS+4,R0	; PRINT IN THE INTERLEAVE.
   6225	017750					CALL	LLDIL
	017750	004737 	020300'			 JSR	PC,LLDIL
   6226	017754					CALL	LLDPR		; TERMINATE THE LINE
	017754	004737 	020320'			 JSR	PC,LLDPR
   6227	017760	000137 	017540'			JMP	LLDLP		; AND PROCESS NEXT BLOCK.
   6228
   6230					;+
   6231					; PRINT GAP INFORMATION.
   6232					;-
   6233
   6234	017764	010400 			LLDGP:	MOV	R4,R0		; PRINT THE ADDRESS.
   6235	017766					CALL	$TENAD
	017766	004737 	023742'			 JSR	PC,$TENAD
   6236	017772	016200 	000002 			MOV	2(R2),R0	; PRINT THE SIZE.
   6237	017776					CALL	LLDSZ
	017776	004737 	020200'			 JSR	PC,LLDSZ
   6238	020002	012700 	004302'			MOV	#TLDNME,R0	; IDENTIFY AS NON-EXISTANT.
   6239	020006					CALL	$ASCIZ
	020006	004737 	000412'			 JSR	PC,$ASCIZ
   6240	020012					CALL	LLDPR		; TERMINATE THE LINE
	020012	004737 	020320'			 JSR	PC,LLDPR
   6241	020016	000137 	017540'			JMP	LLDLP		; AND PROCESS NEXT BLOCK.
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 128
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6244					;+
   6245					; PRINT INTERNAL MEMORY INFORMATION.
   6246					;-
   6247
   6248	020022	106101 			LLDIN:	ROLB	R1		; COMPUTE LENGTH.
   6249	020024	106101 				ROLB	R1
   6250	020026	106101 				ROLB	R1
   6251	020030	106101 				ROLB	R1
   6252	020032	106101 				ROLB	R1
   6253	020034	042701 	177760 			BIC	#^C17,R1
   6254	020040	005201 				INC	R1
   6255	020042	042700 	177760 			BIC	#^C17,R0
   6256	020046	160001 				SUB	R0,R1
   6257	020050	010400 				MOV	R4,R0		; PRINT THE ADDRESS.
   6258	020052					CALL	$TENAD
	020052	004737 	023742'			 JSR	PC,$TENAD
   6259	020056	010100 				MOV	R1,R0		; PRINT THE SIZE.
   6260	020060					CALL	LLDSZ
	020060	004737 	020200'			 JSR	PC,LLDSZ
   6261	020064					PUSH	R4		; PRINT THE
	020064	010446 				 MOV	R4,-(SP)
   6262	020066	012704 	000004 			MOV	#4,R4		; CONTROLLER ENABLES.
   6263	020072	116301 	000003 			MOVB	3(R3),R1
   6264	020076					SL	R1,4		; +++001 SHIFT SBUS ENABLES INTO POSITION
	020076	006301 				 ASL	R1
	020100	006301 				 ASL	R1
	020102	006301 				 ASL	R1
	020104	006301 				 ASL	R1
   6265	020106	010200 			10$:	MOV	R2,R0
   6266	020110	106301 				ASLB	R1		; +++001 DID WE FIND ONE ??
   6267	020112	103401 				BCS	20$		; YES IF CC-C IS SET
   6268	020114	111300 				MOVB	(R3),R0
   6269	020116				20$:	CALL	LLDCT
	020116	004737 	020236'			 JSR	PC,LLDCT
   6270	020122	077407 				SOB	R4,10$
   6271	020124					POP	R4
	020124	012604 				 MOV	(SP)+,R4
   6272	020126	116200 	000061'			MOVB	.CTLTP(R2),R0	; PRINT CONTROLLER TYPE.
   6273	020132	006300 				ASL	R0
   6274	020134	016000 	002426'			MOV	DLDTYP(R0),R0
   6275	020140					CALL	$ASCIZ
	020140	004737 	000412'			 JSR	PC,$ASCIZ
   6276	020144	116300 	000003 			MOVB	3(R3),R0	; +++001 PRINT THE INTERLEAVE.
   6277	020150					SR	R0,4		; +++001
	020150	006200 				 ASR	R0
	020152	006200 				 ASR	R0
	020154	006200 				 ASR	R0
	020156	006200 				 ASR	R0
   6278	020160	042700 	177774 			BIC	#^C3,R0
   6279	020164					CALL	LLDIL
	020164	004737 	020300'			 JSR	PC,LLDIL
   6280	020170					CALL	LLDPR		; TERMINATE THE LINE
	020170	004737 	020320'			 JSR	PC,LLDPR
   6281	020174	000137 	017540'			JMP	LLDLP		; AND PROCESS NEXT BLOCK.
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 129
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6284					;+
   6285					; THE FOLLOWING DISPLAY FIELD SUBROUTINES INSERT A STRING OF
   6286					; CHARACTERS STARTING AT WHERE R5 IS POINTING AND UPDATE R5 TO
   6287					; POINT ONE BYTE PAST THE LAST CHARACTER INSERTED.
   6288					;-
   6289
   6290					;+
   6291					; ADD BLOCK SIZE IN R0 (SIZE/16K) TO R4 AND INSERT INTO DISPLAY.
   6292					; FORMAT: "<N>K<TAB>" WHERE <N> IS A VARIABLE SIZE DECIMAL NUMBER.
   6293					;-
   6294
   6295	020200	112715 	000040 		LLDSZ:	MOVB	#SPC,(R5)	; SPACE OVER.
   6296	020204	112525 				MOVB	(R5)+,(R5)+
   6297	020206	060004 				ADD	R0,R4		; UPDATE CURRENT ADDRESS.
   6298	020210					SL	R0,4		; GET IN TERMS OF K
	020210	006300 				 ASL	R0
	020212	006300 				 ASL	R0
	020214	006300 				 ASL	R0
	020216	006300 				 ASL	R0
   6299	020220					CALL	$TRB2I		; AND PRINT
	020220	004737 	023266'			 JSR	PC,$TRB2I
   6300	020224	112725 	000113 			MOVB	#'K,(R5)+	; ASSOCIATED IDENTIFICATION.
   6301	020230	112725 	000011 			MOVB	#TAB,(R5)+	; TAB OVER TO NEXT FIELD.
   6302	020234					RETURN
	020234	000207 				 RTS	PC
   6303
   6304					;+
   6305					; INSERT TWO DIGIT OCTAL CONTROLLER NUMBER FROM R0
   6306					; INTO DISPLAY BUFFER. FORMAT: "NN  ".
   6307					;-
   6308
   6309	020236				LLDCT:	PUSH	R0		; SAVE NUMBER AND
	020236	010046 				 MOV	R0,-(SP)
   6310	020240					SR	R0,3		; GET FIRST OCTAL DIGIT.
	020240	006200 				 ASR	R0
	020242	006200 				 ASR	R0
	020244	006200 				 ASR	R0
   6311	020246	062700 	000060 			ADD	#'0,R0
   6312	020252	110025 				MOVB	R0,(R5)+	; INSERT, THEN
   6313	020254					POP	R0
	020254	012600 				 MOV	(SP)+,R0
   6314	020256	042700 	177770 			BIC	#^C7,R0		; DO SAME FOR
   6315	020262	062700 	000060 			ADD	#'0,R0		; SECOND DIGIT.
   6316	020266	110025 				MOVB	R0,(R5)+
   6317	020270	112715 	000040 			MOVB	#SPC,(R5)	; SPACE OVER.
   6318	020274	112525 				MOVB	(R5)+,(R5)+
   6319	020276					RETURN
	020276	000207 				 RTS	PC
KLILD -- DISPLAY LOGICAL CONFIG	MACRO M1108  13-JAN-78 10:41  PAGE 130
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6321					;+
   6322					; INSERT INTERLEAVE NUMBER FROM R0 AS OCTAL DIGIT INTO DISPLAY BUFFER.
   6323					;-
   6324
   6325	020300	022700 	000003 		LLDIL:	CMP	#3,R0		; IF VALUE IS 3
   6326	020304	001001 				BNE	10$
   6327	020306	005200 				INC	R0		; THEN IT IS 4-WAY.
   6328	020310	062700 	000060 		10$:	ADD	#'0,R0		; CONVERT TO ASCII
   6329	020314	110025 				MOVB	R0,(R5)+	; AND INSERT.
   6330	020316					RETURN
	020316	000207 				 RTS	PC
   6331
   6332					;+
   6333					; INSERT <CR><LF> INTO DISPLAY BUFFER AND DISPLAY LINE ON CONSOLE.
   6334					;-
   6335
   6336	020320	112725 	000015 		LLDPR:	MOVB	#CR,(R5)+	; TERMINATE LINE
   6337	020324	112725 	000012 			MOVB	#LF,(R5)+	; WITH CR,LF.
   6338	020330	010501 				MOV	R5,R1		; FIGURE LINE LENGTH
   6339	020332	012700 	000772'			MOV	#.TTOBF,R0
   6340	020336	160001 				SUB	R0,R1
   6341	020340					CALLR	$TTWR		; AND PRINT IT.
	020340	000137 	000000G			 JMP	$TTWR
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 131
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6343						.TITLE	KLIXC -- KL INSTRUCTION EXECUTION
   6344	020344					IDENT$	5,0
						.IDENT	/005000/
   6345					;
   6346					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6347					;
   6348					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6349					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6350					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6351					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6352					;
   6353					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6354					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6355					; EQUIPMENT CORPORATION.
   6356					;
   6357					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6358					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6359					;
   6360					; VERSION 05-00
   6361					;
   6362					; ALAN D. PECKHAM  30-MAR-77
   6363					;
   6364					; MODIFIED BY:
   6365					;
   6366					; FUNCTION: THIS MODULE CONTAINS ROUTINES TO ALLOW EXECUTION OF
   6367					;  SINGLE KL INSTRUCTIONS OR THE STARTING OF KL PROGRAMS.
   6368					;
   6369					; LOCAL DATA
   6370					;
   6371	002442					.PSECT	DATA,D
   6372	002442				DXCAD:	WD36$	0 0		; START ADDRESS BUFFER.
	002442	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002445	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6373	002447				DXCBF:	WD36$	0 0		; GENERAL BIT BUCKET.
	002447	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002452	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6374	002454				DXCBRC:	WD36$	0 0		; BURST COUNT BUFFER.
	002454	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002457	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6375						.EVEN
   6376	004401					.PSECT	TEXT,D
   6377	004401				TXCHLE:	ERROR	<CANNOT FIND HALT LOOP>
	004401	   077 	   040 	   103 		 .ASCIZ	\? CANNOT FIND HALT LOOP\
	004404	   101 	   116 	   116
	004407	   117 	   124 	   040
	004412	   106 	   111 	   116
	004415	   104 	   040 	   110
	004420	   101 	   114 	   124
	004423	   040 	   114 	   117
	004426	   117 	   120 	   000
   6378	004431				TXCSFL:	ERROR	<CANNOT START KL>
	004431	   077 	   040 	   103 		 .ASCIZ	\? CANNOT START KL\
	004434	   101 	   116 	   116
	004437	   117 	   124 	   040
	004442	   123 	   124 	   101
	004445	   122 	   124 	   040
	004450	   113 	   114 	   000
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 131-1
$REPLT	-- REPORT LOGICAL CONFIGURATION

   6379	020344					.PSECT
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 132
$EXCT	-- EXECUTE KL INSTRUCTION

   6381						.SBTTL	$EXCT	-- EXECUTE KL INSTRUCTION
   6382					;+
   6383					; EXECUTE A SINGLE KL INSTRUCTION BY GETTING THE KL INTO THE
   6384					; HALT LOOP, LOADING THE AR WITH THE INSTRUCTION, PUSHING THE
   6385					; CONTINUE BUTTON, AND STARTING UP THE CLOCK. THE ROUTINE
   6386					; COMPLETES WHEN THE MICROCODE REACHES THE HALT LOOP AGAIN.
   6387					;
   6388					; INPUTS:
   6389					;	R0	- POINTER TO INSTRUCTION TO EXECUTE.
   6390					;
   6391					; OUTPUTS:
   6392					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   6393					;-
   6394
   6395	020344	004537 	000356'		$EXCT::	JSR	R5,$RSAVE
   6396	020350					TRACK	XC
	020350	004037 	020362'			 JSR	R0,64$
	020354	041530 				 .WORD	"XC
	020356	000000 				 .WORD
	020360	000000 				 .WORD
	020362	004737 	000424'		64$:	 JSR	PC,$TRACK
	020366	012600 				 MOV	(SP)+,R0
   6397	020370					CALL	$LDAR		; LOAD THE AR WITH THE INSTRUCTION.
	020370	004737 	020704'			 JSR	PC,$LDAR
   6398	020374	103416 				BCS	90$
   6399	020376	012700 	012000 			MOV	#.CONBT,R0	; PUSH THE CONTINUE BUTTON
   6400	020402					CALL	$DFXC
	020402	004737 	022006'			 JSR	PC,$DFXC
   6401	020406	103411 				BCS	90$
   6402	020410	012700 	001000 			MOV	#.STRCL,R0	; AND START THE CLOCK
   6403	020414					CALL	$DFXC
	020414	004737 	022006'			 JSR	PC,$DFXC
   6404	020420	103404 				BCS	90$
   6405	020422	012703 	001750 			MOV	#1000.,R3
   6406	020426					CALLR	$WTKL		; WAIT FOR THE HALT LOOP.
	020426	000137 	020624'			 JMP	$WTKL
   6407	020432				90$:	RETURN
	020432	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 133
$STRKL	-- START THE KL PROCESSOR

   6409						.SBTTL	$STRKL	-- START THE KL PROCESSOR
   6410					;+
   6411					; START THE KL AT THE 22 BIT ADDRESS POINTED TO BY R0.
   6412					; THIS IS DONE BY LOADING THE AR WITH THE ADDRESS, PUSHING
   6413					; THE RUN AND CONTINUE BUTTONS, AND STARTING THE CLOCK.
   6414					; WE STEP THE MICROCODE OUT OF THE HALT LOOP TO MAKE SURE IT
   6415					; IS RUNNING BEFORE WE LEAVE.
   6416					;
   6417					; INPUTS:
   6418					;	R0	- POINTER TO 22 BIT KL ADDRESS.
   6419					;
   6420					; OUTPUTS:
   6421					;	CARRY IS SET ON ERROR AND A MESSAGE IS DISPLAYED.
   6422					;-
   6423
   6424	020434	004537 	000356'		$STRKL::JSR	R5,$RSAVE
   6425	020440					TRACK	ST
	020440	004037 	020452'			 JSR	R0,64$
	020444	052123 				 .WORD	"ST
	020446	000000 				 .WORD
	020450	000000 				 .WORD
	020452	004737 	000424'		64$:	 JSR	PC,$TRACK
	020456	012600 				 MOV	(SP)+,R0
   6426	020460	012701 	002442'			MOV	#DXCAD,R1	; POINT TO A SCRATCH AREA
   6427	020464	112021 				MOVB	(R0)+,(R1)+	; LOAD THE ADDRESS
   6428	020466	112021 				MOVB	(R0)+,(R1)+
   6429	020470	111011 				MOVB	(R0),(R1)	; AS A PC WORD
   6430	020472	142711 	177700 			BICB	#^C77,(R1)	; ONLY 22 BITS PLEASE
   6431	020476	012700 	002442'			MOV	#DXCAD,R0	; GET OUR ADDRESS
   6432	020502					CALL	$LDAR		; AND LOAD IT INTO THE AR.
	020502	004737 	020704'			 JSR	PC,$LDAR
   6433	020506	103440 				BCS	80$
   6434	020510	012700 	011000 			MOV	#.SETRN,R0	; SET THE RUN FLOP
   6435	020514					CALL	$DFXC
	020514	004737 	022006'			 JSR	PC,$DFXC
   6436	020520	103433 				BCS	80$
   6437	020522	012700 	012000 			MOV	#.CONBT,R0	; SET THE CONTINUE BUTTON
   6438	020526					CALL	$DFXC
	020526	004737 	022006'			 JSR	PC,$DFXC
   6439	020532	103426 				BCS	80$
   6440	020534	012701 	001750 			MOV	#1000.,R1	; LOOP COUNT TO R1
   6441	020540	012700 	002000 		10$:	MOV	#.SSCLK,R0	; SINGLE STEP THE M-BOX CLOCK
   6442	020544					CALL	$DFXC
	020544	004737 	022006'			 JSR	PC,$DFXC
   6443	020550	103417 				BCS	80$
   6444	020552					CALL	$DTRW1		; READ DIAG WORD 1
	020552	004737 	000266'			 JSR	PC,$DTRW1
   6445	020556	103414 				BCS	80$
   6446	020560	032700 	001000 			BIT	#DS06,R0	; STILL IN THE HALT LOOP?
   6447	020564	001402 				BEQ	20$		; NO -- GO ON
   6448	020566	077114 				SOB	R1,10$		; YES -- TRY AGAIN
   6449	020570	000407 				BR	80$		; TIMED OUT -- COMPLAIN
   6450	020572	032700 	002000 		20$:	BIT	#DS05,R0	; OUT OF HALT LOOP -- IS RUN ON?
   6451	020576	001404 				BEQ	80$		; NO -- COMPLAIN
   6452	020600	012700 	001000 			MOV	#.STRCL,R0	; YES -- START THE CLOCK
   6453	020604					CALLR	$DFXC		; AND EXIT.
	020604	000137 	022006'			 JMP	$DFXC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 133-1
$STRKL	-- START THE KL PROCESSOR

   6454	020610				80$:	PRINT	#TXCSFL		; NO -- PRINT ERROR MESSAGE
	020610	012700 	004431'			 MOV	#TXCSFL,R0
	020614	004737 	000000G			 JSR	PC,$TTMSG
   6455	020620	000261 				SEC
   6456	020622				90$:	RETURN			; AND EXIT
	020622	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 134
$WTKL	-- WAIT FOR KL PROGRAM TO HALT

   6458						.SBTTL	$WTKL	-- WAIT FOR KL PROGRAM TO HALT
   6459					;+
   6460					; WAIT FOR THE KL TO REENTER THE HALT LOOP.
   6461					;
   6462					; INPUTS:
   6463					;	R0	- A TIMEOUT VALUE.
   6464					;
   6465					; OUTPUTS:
   6466					;	CARRY IS SET IF THE KL DOES NOT ENTER THE HALT LOOP
   6467					;	BEFORE THE -11 HAS CHECKED THE DTE20 THE NUMBER OF TIMES
   6468					;	SPECIFIED IN R0.
   6469					;-
   6470
   6471	020624				$WTKL::	TRACK	WT
	020624	004037 	020636'			 JSR	R0,64$
	020630	052127 				 .WORD	"WT
	020632	000000 				 .WORD
	020634	000000 				 .WORD
	020636	004737 	000424'		64$:	 JSR	PC,$TRACK
	020642	012600 				 MOV	(SP)+,R0
   6472	020644					PUSH	<R2,R1,R0>
	020644	010246 				 MOV	R2,-(SP)
	020646	010146 				 MOV	R1,-(SP)
	020650	010046 				 MOV	R0,-(SP)
   6473	020652	010002 				MOV	R0,R2
   6474	020654				10$:	CALL	$DTRW1		; READ DTE DIAG 1
	020654	004737 	000266'			 JSR	PC,$DTRW1
   6475	020660	103404 				BCS	80$
   6476	020662	032700 	001000 			BIT	#DS06,R0	; ARE WE AT THE HALT LOOP ?
   6477	020666	001002 				BNE	90$		; YES, RETURN.
   6478	020670	077207 				SOB	R2,10$		; NO, TRY AGAIN
   6479	020672	000261 			80$:	SEC			; OR GIVE UP.
   6480	020674				90$:	POP	<R0,R1,R2>
	020674	012600 				 MOV	(SP)+,R0
	020676	012601 				 MOV	(SP)+,R1
	020700	012602 				 MOV	(SP)+,R2
   6481	020702					RETURN
	020702	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 135
$LDAR	-- LOAD THE AR REGISTER

   6483						.SBTTL	$LDAR	-- LOAD THE AR REGISTER
   6484					;+
   6485					; PUT THE MICROCODE INTO THE HALT LOOP, STOP IT, PHASE THE CLOCKS,
   6486					; AND LOAD THE AR REGISTER WITH AN INSTRUCTION OR STARTING ADDRESS.
   6487					;
   6488					; INPUTS:
   6489					;	R0	- ADDRESS OF 36 BIT WORD TO LOAD INTO THE AR.
   6490					;
   6491					; OUTPUTS:
   6492					;	CARRY IS SET IF ERROR OCCURS.
   6493					;-
   6494
   6495	020704	004537 	000356'		$LDAR::	JSR	R5,$RSAVE	; SAVE THE REGISTERS.
   6496	020710					CALL	STPKL		; STOP THE MICROCODE.
	020710	004737 	020740'			 JSR	PC,STPKL
   6497	020714	103410 				BCS	90$
   6498	020716					CALL	$MBPHS		; PHASE THE CLOCKS FOR THE LOAD.
	020716	004737 	021142'			 JSR	PC,$MBPHS
   6499	020722	103405 				BCS	90$
   6500	020724	010001 				MOV	R0,R1		; GET DATA
   6501	020726	012700 	077000 			MOV	#.LDAR,R0	; AND
   6502	020732					CALLR	$DFWR		; STORE IN THE AR.
	020732	000137 	021610'			 JMP	$DFWR
   6503	020736				90$:	RETURN
	020736	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 136
STPKL	-- HALT THE KL CPU

   6505						.SBTTL	 STPKL	-- HALT THE KL CPU
   6506					;+
   6507					; GET THE KL INTO THE HALT LOOP. THIS IS DONE MERCIFULLY IN CASE
   6508					; IT IS RUNNING.
   6509					;
   6510					; NO INPUTS.
   6511					;
   6512					; OUTPUTS:
   6513					;	CARRY IS SET IF UNABLE TO COMPLY, AND ERROR MESSAGE
   6514					;	IS DISPLAYED.
   6515					;-
   6516
   6517	020740				STPKL:	TRACK	HA
	020740	004037 	020752'			 JSR	R0,64$
	020744	040510 				 .WORD	"HA
	020746	000000 				 .WORD
	020750	000000 				 .WORD
	020752	004737 	000424'		64$:	 JSR	PC,$TRACK
	020756	012600 				 MOV	(SP)+,R0
   6518	020760					PUSH	<R0,R1>		; SAVE R0 AND R1
	020760	010046 				 MOV	R0,-(SP)
	020762	010146 				 MOV	R1,-(SP)
   6519	020764	012700 	010000 			MOV	#.CLRUN,R0	; CLEAR RUN
   6520	020770					CALL	$DFXC		; CLEAR RUN
	020770	004737 	022006'			 JSR	PC,$DFXC
   6521	020774	103451 				BCS	90$
   6522	020776	012700 	000024 			MOV	#20.,R0		; SET A WAIT VALUE
   6523	021002					CALL	$WTKL		; AND SEE IF WE FALL
	021002	004737 	020624'			 JSR	PC,$WTKL
   6524	021006	103033 				BCC	20$		; INTO THE HALT LOOP.
   6525	021010	012701 	000024 			MOV	#^D20,R1	; LOOP COUNT TO R4
   6526	021014	012700 	000310 		10$:	MOV	#^D200,R0	; BURST COUNT TO R0
   6527	021020					CALL	$BURST		; BURST THE CLOCK
	021020	004737 	021310'			 JSR	PC,$BURST
   6528	021024	103435 				BCS	90$
   6529	021026					CALL	$DTRW1		; READ DTE-20 DIAG 1
	021026	004737 	000266'			 JSR	PC,$DTRW1
   6530	021032	103432 				BCS	90$
   6531	021034	032700 	001000 			BIT	#DS06,R0	; ARE WE IN THE HALT LOOP NOW?
   6532	021040	001016 				BNE	20$		; YES -- GO ON
   6533	021042	077114 				SOB	R1,10$		; NO -- TRY AGAIN
   6534	021044					CALL	$KLMR		; KL IS IN TROUBLE - RESET
	021044	004737 	022452'			 JSR	PC,$KLMR
   6535	021050	103423 				BCS	90$
   6536	021052	012700 	001000 			MOV	#.STRCL,R0	; BY RESTARTING MICROCODE.
   6537	021056					CALL	$DFXC
	021056	004737 	022006'			 JSR	PC,$DFXC
   6538	021062	103416 				BCS	90$
   6539	021064	012700 	001750 			MOV	#1000.,R0	; WAIT FOR IT TO ENTER HALT LOOP
   6540	021070					CALL	$WTKL		; AND IF THIS FAILS,
	021070	004737 	020624'			 JSR	PC,$WTKL
   6541	021074	103414 				BCS	80$		; THEN DIE A MIZERABLE DEATH.
   6542	021076	012700 	000000 		20$:	MOV	#.STPCL,R0	; STOP THE CLOCK
   6543	021102					CALL	$DFXC
	021102	004737 	022006'			 JSR	PC,$DFXC
   6544	021106	103404 				BCS	90$
   6545	021110	012700 	004000 			MOV	#.CECLK,R0	; MAKES EBOX CLOCK FALSE
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 136-1
STPKL	-- HALT THE KL CPU

   6546	021114					CALL	$DFXC
	021114	004737 	022006'			 JSR	PC,$DFXC
   6547	021120				90$:	POP	<R1,R0>		; RESTORE REGISTERS
	021120	012601 				 MOV	(SP)+,R1
	021122	012600 				 MOV	(SP)+,R0
   6548	021124					RETURN			; TO CALLER
	021124	000207 				 RTS	PC
   6549
   6550	021126				80$:	PRINT	#TXCHLE		; CANNOT FIND HALT LOOP !
	021126	012700 	004401'			 MOV	#TXCHLE,R0
	021132	004737 	000000G			 JSR	PC,$TTMSG
   6551	021136	000261 				SEC
   6552	021140	000767 				BR	90$
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 137
$MBPHS	-- PHASE THE KL CLOCKS

   6554						.SBTTL	$MBPHS	-- PHASE THE KL CLOCKS
   6555					;+
   6556					; PHASE THE CLOCKS TO LOAD THE AR
   6557					; $MBPHS WAITS FOR THREE TEST POINTS TO MATCH UP AND
   6558					; THEN SETS UP FOR A CHANGE COMING A L. THIS MAKES
   6559					; THE AR LOA FUNCTION STRICTLY REPEATABLE.
   6560					;
   6561					; NO INPUTS
   6562					;
   6563					; OUTPUTS:
   6564					;	CARRY IS SET IF ERROR OCCURS.
   6565					;-
   6566
   6567	021142	004537 	000356'		$MBPHS::JSR	R5,$RSAVE	; SAVE THE REGISTERS.
   6568	021146	012702 	000030 			MOV	#24.,R2		; DO THIS A MAXIMUM OF 24 TIMES.
   6569	021152	012701 	002447'			MOV	#DXCBF,R1	; SET UP A READ BUFFER.
   6570	021156	012700 	102000 		10$:	MOV	#<102*1000>,R0	; READ 102
   6571	021162					CALL	$DFRD
	021162	004737 	021502'			 JSR	PC,$DFRD
   6572	021166	103432 				BCS	80$
   6573	021170	132711 	000004 			BITB	#4,(R1)		; CHECK "CLK SYNCH H"
   6574	021174	001421 				BEQ	20$		; MUST BE HIGH
   6575	021176	012700 	144000 			MOV	#<144*1000>,R0	; READ 144
   6576	021202					CALL	$DFRD
	021202	004737 	021502'			 JSR	PC,$DFRD
   6577	021206	103422 				BCS	80$
   6578	021210	132761 	000100 	000003 		BITB	#100,3(R1)	; CHECK "CR ADR 10"
   6579	021216	001010 				BNE	20$		; MUST BE EVEN
   6580	021220	012700 	164000 			MOV	#<164*1000>,R0	; READ 164
   6581	021224					CALL	$DFRD
	021224	004737 	021502'			 JSR	PC,$DFRD
   6582	021230	103411 				BCS	80$
   6583	021232	132711 	000040 			BITB	#40,(R1)	; CHECK "PHASE CHANGE COMING L"
   6584	021236	001410 				BEQ	30$		; MUST BE LOW
   6585	021240	012700 	002000 		20$:	MOV	#.SSCLK,R0	; STEP THE MBOX CLOCK.
   6586	021244					CALL	$DFXC
	021244	004737 	022006'			 JSR	PC,$DFXC
   6587	021250	103401 				BCS	80$
   6588	021252	077237 				SOB	R2,10$		; AVOID TRYING AD INFINITUM.
   6589	021254	000261 			80$:	SEC			; ERROR....
   6590	021256				90$:	RETURN
	021256	000207 				 RTS	PC
   6591	021260	012700 	162000 		30$:	MOV	#<162*1000>,R0	; READ 162
   6592	021264					CALL	$DFRD
	021264	004737 	021502'			 JSR	PC,$DFRD
   6593	021270	103771 				BCS	80$
   6594	021272	132711 	000010 			BITB	#10,(R1)	; CHECK "A CHANGE COMING A L"
   6595	021276	001767 				BEQ	90$		; IF HIGH, THEN
   6596	021300	012700 	000012 			MOV	#10.,R0		; WE MUST CLOCK THE MBOX
   6597	021304					CALLR	$BURST		; 10. TIMES.
	021304	000137 	021310'			 JMP	$BURST
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 138
$BURST	-- BURST THE M-BOX CLOCK

   6599						.SBTTL	$BURST	-- BURST THE M-BOX CLOCK
   6600					;+
   6601					; STEP THE M-BOX A GIVEN NUMBER OF TICKS USING THE BURST
   6602					; DIAGNOSTIC INSTRUCTION.
   6603					;
   6604					; INPUTS:
   6605					;	R0	- NUMBER OF STEPS TO BURST.
   6606					;
   6607					; OUTPUTS:
   6608					;	CARRY IS SET IF OPERATION WAS UNSUCCESSFUL.
   6609					;-
   6610
   6611	021310	004537 	000356'		$BURST::JSR	R5,$RSAVE
   6612	021314	010002 				MOV	R0,R2		; SAVE BURST COUNT.
   6613	021316	012700 	000000 			MOV	#.STPCL,R0	; STOP CLOCK FOR SAFETY.
   6614	021322					CALL	$DFXC
	021322	004737 	022006'			 JSR	PC,$DFXC
   6615	021326	103464 				BCS	90$
   6616	021330	012701 	002454'			MOV	#DXCBRC,R1
   6617	021334	012711 	000017 			MOV	#17,(R1)
   6618	021340	162702 	000377 			SUB	#255.,R2	; MORE THAN 255 BURSTS ?
   6619	021344	002422 				BLT	20$
   6620	021346	012700 	042000 		10$:	MOV	#.LDBRR,R0	; YES, DO A BURST
   6621	021352					CALL	$DFWR
	021352	004737 	021610'			 JSR	PC,$DFWR
   6622	021356	103450 				BCS	90$
   6623	021360	012700 	043000 			MOV	#.LDBRL,R0	; WITH 255, AND
   6624	021364					CALL	$DFWR
	021364	004737 	021610'			 JSR	PC,$DFWR
   6625	021370	103443 				BCS	90$
   6626	021372	012700 	005000 			MOV	#.BRCLK,R0
   6627	021376					CALL	$DFXC
	021376	004737 	022006'			 JSR	PC,$DFXC
   6628	021402	103436 				BCS	90$
   6629	021404	162702 	000377 			SUB	#255.,R2	; COUNT DOWN UNTIL
   6630	021410	002356 				BGE	10$		; LESS THAN 255.
   6631	021412	062702 	000377 		20$:	ADD	#255.,R2	; ANY LEFT TO DO ?
   6632	021416	001430 				BEQ	90$
   6633	021420	110211 				MOVB	R2,(R1)		; YES, DO LAST BURST.
   6634	021422	142711 	177760 			BICB	#^C17,(R1)
   6635	021426	012700 	042000 			MOV	#.LDBRR,R0
   6636	021432					CALL	$DFWR
	021432	004737 	021610'			 JSR	PC,$DFWR
   6637	021436	103420 				BCS	90$
   6638	021440					SR	R2,4
	021440	006202 				 ASR	R2
	021442	006202 				 ASR	R2
	021444	006202 				 ASR	R2
	021446	006202 				 ASR	R2
   6639	021450	110211 				MOVB	R2,(R1)
   6640	021452	142711 	177760 			BICB	#^C17,(R1)
   6641	021456	012700 	043000 			MOV	#.LDBRL,R0
   6642	021462					CALL	$DFWR
	021462	004737 	021610'			 JSR	PC,$DFWR
   6643	021466	103404 				BCS	90$
   6644	021470	012700 	005000 			MOV	#.BRCLK,R0
   6645	021474					CALLR	$DFXC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1108  13-JAN-78 10:41  PAGE 138-1
$BURST	-- BURST THE M-BOX CLOCK

	021474	000137 	022006'			 JMP	$DFXC
   6646	021500				90$:	RETURN
	021500	000207 				 RTS	PC
KLIFR -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 139
$BURST	-- BURST THE M-BOX CLOCK

   6648						.TITLE	KLIFR -- PERFORM DIAGNOSTIC FUNCTION READ
   6649	021502					IDENT$	5,0
						.IDENT	/005000/
   6650					;
   6651					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6652					;
   6653					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6654					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6655					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6656					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6657					;
   6658					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6659					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6660					; EQUIPMENT CORPORATION.
   6661					;
   6662					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6663					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6664					;
   6665					; VERSION 05-00
   6666					;
   6667					; ALAN D. PECKHAM  29-MAR-77
   6668					;
   6669					; MODIFIED BY:
   6670					;
   6671					; FUNCTION: DO A FUNCTION READ TO THE DTE20.
   6672					;
   6673					; LOCAL MACROS
   6674					;
   6675						.MCALL	KLDR$
   6676					;
   6677					; LOCAL DATA
   6678					;
   6679	002462					.PSECT	DATA,D
   6680	002462				DFRRDB:	KLDR$	0,.DFBLK,.DREG,0	; DPB FOR FUNCTION READ.
	002462	002411 				.WORD	400*5.+DR.DTE
	002464	   012 	   000 			.BYTE	DF.KLR,0/400
	002466	000704'				.WORD	.DFBLK
	002470	000720'				.WORD	.DREG
	002472	000000 				.WORD	0
   6681						.EVEN
   6682	004453					.PSECT	TEXT,D
   6683	004453				TFREMS:	ERROR	<DF READ FAILED> ; READ FAILED ERROR MESSAGE.
	004453	   077 	   040 	   104 		 .ASCIZ	\? DF READ FAILED\
	004456	   106 	   040 	   122
	004461	   105 	   101 	   104
	004464	   040 	   106 	   101
	004467	   111 	   114 	   105
	004472	   104 	   000
   6684	021502					.PSECT
KLIFR -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 140
$DFRD	-- DIAGNOSTIC READ FUNCTION

   6686						.SBTTL	$DFRD	-- DIAGNOSTIC READ FUNCTION
   6687					;+
   6688					; PERFORM A DIAGNOSTIC READ FUNCTION.
   6689					;
   6690					; INPUTS:
   6691					;	R1	- ADDRESS OF 36 BIT BUFFER TO RECIEVE DATA FROM READ.
   6692					;	R0	- FUNCTION CODE OF READ TO PERFORM.
   6693					;
   6694					; OUTPUTS:
   6695					;	(R1)	- DATA READ FROM DIAGNOSTIC IS SUCCESSFUL.
   6696					;	CARRY IS SET IF ERROR, AND ERROR MESSAGE IS DISPLAYED.
   6697					;-
   6698
   6699	021502				$DFRD:: PUSH	<R1,R0>
	021502	010146 				 MOV	R1,-(SP)
	021504	010046 				 MOV	R0,-(SP)
   6700	021506	000300 				SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   6701	021510	110037 	002465'			MOVB	R0,DFRRDB+3	; STORE FUNCTION CODE
   6702	021514					DIR$	#DFRRDB
	021514	012746 	002462'			MOV	#DFRRDB,-(SP)
	021520	104375 				EMT	375
   6703	021522					TRACK	FR,DFRRDB+3,.DFRBK
	021522	004037 	021534'			 JSR	R0,64$
	021526	051106 				 .WORD	"FR
	021530	002465'				 .WORD	DFRRDB+3
	021532	000712'				 .WORD	.DFRBK
	021534	004737 	000424'		64$:	 JSR	PC,$TRACK
	021540	012600 				 MOV	(SP)+,R0
   6704	021542	103412 				BCS	10$
   6705	021544	012700 	000712'			MOV	#.DFRBK,R0
   6706	021550	005701 				TST	R1		; TEST R1
   6707	021552	001413 				BEQ	90$		; BYPASS LOADING
   6708	021554	112021 				MOVB	(R0)+,(R1)+	; REMOVE DATA FROM DEXWD3
   6709	021556	112021 				MOVB	(R0)+,(R1)+
   6710	021560	112021 				MOVB	(R0)+,(R1)+	; FROM DEXWD2
   6711	021562	112021 				MOVB	(R0)+,(R1)+
   6712	021564	111011 				MOVB	(R0),(R1)	; FROM DEXWD1
   6713	021566	000405 				BR	90$
   6714	021570				10$:	PRINT	#TFREMS		; INDICATE FUNC READ FAILED
	021570	012700 	004453'			 MOV	#TFREMS,R0
	021574	004737 	000000G			 JSR	PC,$TTMSG
   6715	021600	000261 				SEC
   6716	021602				90$:	POP	<R0,R1>
	021602	012600 				 MOV	(SP)+,R0
	021604	012601 				 MOV	(SP)+,R1
   6717	021606					RETURN
	021606	000207 				 RTS	PC
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 141
$DFRD	-- DIAGNOSTIC READ FUNCTION

   6719						.TITLE	KLIFW -- PERFORM DIAGNOSTIC FUNCTION WRITE
   6720	021610					IDENT$	5,0
						.IDENT	/005000/
   6721					;
   6722					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6723					;
   6724					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6725					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6726					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6727					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6728					;
   6729					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6730					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6731					; EQUIPMENT CORPORATION.
   6732					;
   6733					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6734					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6735					;
   6736					; VERSION 05-00
   6737					;
   6738					; ALAN D. PECKHAM  29-MAR-77
   6739					;
   6740					; MODIFIED BY:
   6741					;
   6742					; FUNCTION: DO A FUNCTION WRITE TO THE DTE20.
   6743					;
   6744					; LOCAL MACROS
   6745					;
   6746						.MCALL	KLDW$,PREX$
   6747					;
   6748					; LOCAL DATA
   6749					;
   6750	002474					.PSECT	DATA,D
   6751	002474				DFWWDB:	KLDW$	0,.DFBLK,.DREG,0 ; DPB FOR FUNCTION WRITE.
	002474	002411 				.WORD	400*5.+DR.DTE
	002476	   013 	   000 			.BYTE	DF.KLW,0/400
	002500	000704'				.WORD	.DFBLK
	002502	000720'				.WORD	.DREG
	002504	000000 				.WORD		0
   6752	002506				DFWEDB:	PREX$	0,.ZERO,DFWBF,ED.PHY ; PRIVLEDGED EXAMINE DPB.
	002506	   011 	   005 			.BYTE	DR.DTE,5
	002510	   015 	   200 			.BYTE	DF.PEX,ED.PHY
	002512	000000'				.WORD	.ZERO
	002514	002520'				.WORD	DFWBF
	002516	000000 				.WORD	0
   6753	002520				DFWBF:	WD36$	0 0		; EXAMINE SCRATCH BUFFER.
	002520	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002523	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6754						.EVEN
   6755	004474					.PSECT	TEXT,D
   6756	004474				TFWEMS:	ERROR	<DF WRITE FAILED>
	004474	   077 	   040 	   104 		 .ASCIZ	\? DF WRITE FAILED\
	004477	   106 	   040 	   127
	004502	   122 	   111 	   124
	004505	   105 	   040 	   106
	004510	   101 	   111 	   114
	004513	   105 	   104 	   000
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 141-1
$DFRD	-- DIAGNOSTIC READ FUNCTION

   6757	021610					.PSECT
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 142
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   6759						.SBTTL	$DFWR	-- DIAGNOSTIC WRITE FUNCTION
   6760					;+
   6761					; PERFORM DIAGNOSTIC WRITE FUNCTION.
   6762					;
   6763					; INPUTS:
   6764					;	R1	- ADDRESS OF 36 BIT WORD TO WRITE.
   6765					;	R0	- FUNCTION CODE OF WRITE TO PERFORM.
   6766					;
   6767					; OUTPUTS:
   6768					;	CARRY IS SET IF ERROR, AND ERROR MESSAGE IS DISPLAYED.
   6769					;-
   6770
   6771	021610				$DFWR:: PUSH	<R1,R0>
	021610	010146 				 MOV	R1,-(SP)
	021612	010046 				 MOV	R0,-(SP)
   6772	021614					CALL	LFWCKF		; TURN OFF CLOCK
	021614	004737 	021730'			 JSR	PC,LFWCKF
   6773	021620	103440 				BCS	90$
   6774	021622	000300 				SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   6775	021624	110037 	002477'			MOVB	R0,DFWWDB+3	; SET THE FUNCTION CODE IN DPB
   6776	021630	012700 	000704'			MOV	#.DFWBK,R0	; POINT TO TOP OF 3 WORDS FOR WRITE
   6777	021634	005701 				TST	R1		; TEST R1
   6778	021636	001405 				BEQ	10$		; BYPASS LOADING
   6779	021640	112120 				MOVB	(R1)+,(R0)+	; FILL IN DATA IN DEXWD3
   6780	021642	112120 				MOVB	(R1)+,(R0)+
   6781	021644	112120 				MOVB	(R1)+,(R0)+	; IN DEXWD2
   6782	021646	112120 				MOVB	(R1)+,(R0)+
   6783	021650	111110 				MOVB	(R1),(R0)	; IN DEXWD1
   6784	021652	042760 	177760 	000004 	10$:	BIC	#^C17,4(R0)	; JUST SAVE BITS 0-3 IN DEXWD1
   6785	021660					DIR$	#DFWWDB		; DO THE FUNCTION WRITE
	021660	012746 	002474'			MOV	#DFWWDB,-(SP)
	021664	104375 				EMT	375
   6786	021666					TRACK	FW,DFWWDB+3,.DFWBK
	021666	004037 	021700'			 JSR	R0,64$
	021672	053506 				 .WORD	"FW
	021674	002477'				 .WORD	DFWWDB+3
	021676	000704'				 .WORD	.DFWBK
	021700	004737 	000424'		64$:	 JSR	PC,$TRACK
	021704	012600 				 MOV	(SP)+,R0
   6787	021706	103005 				BCC	90$		; WRITE OKAY
   6788	021710				20$:	PRINT	#TFWEMS
	021710	012700 	004474'			 MOV	#TFWEMS,R0
	021714	004737 	000000G			 JSR	PC,$TTMSG
   6789	021720	000261 				SEC
   6790	021722				90$:	POP	<R0,R1>
	021722	012600 				 MOV	(SP)+,R0
	021724	012601 				 MOV	(SP)+,R1
   6791	021726					RETURN			; ERROR
	021726	000207 				 RTS	PC
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 143
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   6793					;+
   6794					; MAKE SURE THE KL CLOCK IS OFF FOR FUNCTION WRITE.
   6795					;
   6796					; NO INPUTS OR OUTPUTS.
   6797					;-
   6798
   6799	021730	105037 	000032'		LFWCKF:	CLRB	.DESW		; DEP/EXAM MUST START FRESH.
   6800	021734	105737 	000031'			TSTB	.CKSW		; TEST THE CLOCK CONDITION:
   6801	021740	100421 				BMI	90$		; OFF IS OKAY.
   6802	021742	003012 				BGT	10$		; ON - TURN IT OFF.
   6803	021744					DIR$	#DFWEDB		; OTHERWISE DETERMINATE...
	021744	012746 	002506'			MOV	#DFWEDB,-(SP)
	021750	104375 				EMT	375
   6804	021752	103006 				BCC	10$		; CLOCK IS ON ! STOP IT.
   6805	021754	022737 	000000G	000000G		CMP	#IE.EBX,$DSW	; EBOX STOPPED ?
   6806	021762	001410 				BEQ	90$		; YES, WE ARE OKAY.
   6807	021764					CALLR	$KLMR		; SOME HORRIBLE STATE...
	021764	000137 	022452'			 JMP	$KLMR
   6808	021770				10$:	PUSH	R0		; CLOCK IS ON -
	021770	010046 				 MOV	R0,-(SP)
   6809	021772	012700 	000000 			MOV	#.STPCL,R0	; TURN IT OFF
   6810	021776					CALL	$DFXC
	021776	004737 	022006'			 JSR	PC,$DFXC
   6811	022002					POP	R0
	022002	012600 				 MOV	(SP)+,R0
   6812	022004				90$:	RETURN
	022004	000207 				 RTS	PC
KLIFX -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 144
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   6814						.TITLE	KLIFX -- PERFORM DIAGNOSTIC FUNCTION EXECUTE
   6815	022006					IDENT$	5,0
						.IDENT	/005000/
   6816					;
   6817					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6818					;
   6819					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6820					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6821					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6822					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6823					;
   6824					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6825					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6826					; EQUIPMENT CORPORATION.
   6827					;
   6828					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6829					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6830					;
   6831					; VERSION 05-00
   6832					;
   6833					; ALAN D. PECKHAM  29-MAR-77
   6834					;
   6835					; MODIFIED BY:
   6836					;
   6837					; FUNCTION: DO A FUNCTION WRITE TO THE DTE20.
   6838					;
   6839					; LOCAL MACROS
   6840					;
   6841						.MCALL	KLDX$
   6842					;
   6843					; LOCAL VARIABLES
   6844					;
   6845	002526					.PSECT	DATA,D
   6846	002526				DFXXDB:	KLDX$	0,.DFBLK,.DREG,0 ; DPB FOR FUNCTION EXECUTE.
	002526	002411 				.WORD	400*5.+DR.DTE
	002530	   014 	   000 			.BYTE	DF.KLX,0/400
	002532	000704'				.WORD	.DFBLK
	002534	000720'				.WORD	.DREG
	002536	000000 				.WORD	0
   6847						.EVEN
   6848	004516					.PSECT	TEXT,D
   6849	004516				TFXEMS:	ERROR	<DF EXECUTE FAILED>
	004516	   077 	   040 	   104 		 .ASCIZ	\? DF EXECUTE FAILED\
	004521	   106 	   040 	   105
	004524	   130 	   105 	   103
	004527	   125 	   124 	   105
	004532	   040 	   106 	   101
	004535	   111 	   114 	   105
	004540	   104 	   000
   6850	022006					.PSECT
KLIFX -- PERFORM DIAGNOSTIC FUN	MACRO M1108  13-JAN-78 10:41  PAGE 145
$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION

   6852						.SBTTL	$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION
   6853					;+
   6854					; PERFORM A DIAGNOSTIC EXECUTE FUNCTION.
   6855					;
   6856					; INPUTS:
   6857					;	R0	- EXECUTE FUNCTION CODE.
   6858					;
   6859					; OUTPUTS:
   6860					;	CARRY IS SET IF OPERATION FAILS.
   6861					;-
   6862
   6863	022006				$DFXC::	PUSH	<R1,R0>
	022006	010146 				 MOV	R1,-(SP)
	022010	010046 				 MOV	R0,-(SP)
   6864	022012	022700 	001000 			CMP	#.STRCL,R0	; START CLOCK ?
   6865	022016	001411 				BEQ	10$
   6866	022020	022700 	007000 			CMP	#.SETMR,R0	; DOES IT STOP CLOCK ?
   6867	022024	002413 				BLT	20$
   6868	022026	112737 	177777 	000031'		MOVB	#-1,.CKSW	; INDICATE CLOCK STOPPED.
   6869	022034	105037 	000032'			CLRB	.DESW		; DEP/EXAM MUST START FRESH.
   6870	022040	000405 				BR	20$
   6871	022042	112737 	000001 	000031'	10$:	MOVB	#+1,.CKSW	; INDICATE CLOCK STARTED.
   6872	022050	105237 	000032'			INCB	.DESW
   6873	022054	000300 			20$:	SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   6874	022056	110037 	002531'			MOVB	R0,DFXXDB+3	; SET FUNCTION CODE IN DPB
   6875	022062					TRACK	FX,DFXXDB+3
	022062	004037 	022074'			 JSR	R0,64$
	022066	054106 				 .WORD	"FX
	022070	002531'				 .WORD	DFXXDB+3
	022072	000000 				 .WORD
	022074	004737 	000424'		64$:	 JSR	PC,$TRACK
	022100	012600 				 MOV	(SP)+,R0
   6876	022102					DIR$	#DFXXDB
	022102	012746 	002526'			MOV	#DFXXDB,-(SP)
	022106	104375 				EMT	375
   6877	022110	103007 				BCC	30$
   6878	022112	105037 	000031'			CLRB	.CKSW		; CLOCK STATUS INDETERMINATE.
   6879	022116					PRINT	#TFXEMS		; INDICATE FUNC EX FAILED
	022116	012700 	004516'			 MOV	#TFXEMS,R0
	022122	004737 	000000G			 JSR	PC,$TTMSG
   6880	022126	000261 				SEC
   6881	022130				30$:	POP	<R0,R1>
	022130	012600 				 MOV	(SP)+,R0
	022132	012601 				 MOV	(SP)+,R1
   6882	022134					RETURN
	022134	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 146
$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION

   6884						.TITLE	KLIFE -- DEPOSIT/EXAMINE KL MEMORY
   6885	022136					IDENT$	5,0
						.IDENT	/005000/
   6886					;
   6887					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6888					;
   6889					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6890					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6891					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6892					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6893					;
   6894					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6895					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6896					; EQUIPMENT CORPORATION.
   6897					;
   6898					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6899					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6900					;
   6901					; VERSION 05-00
   6902					;
   6903					; ALAN D. PECKHAM  29-MAR-77
   6904					;
   6905					; MODIFIED BY:
   6906					;
   6907					; FUNCTION: ROUTINES TO ACCESS KL MEMORY.
   6908					;
   6909					; LOCAL MACROS
   6910					;
   6911						.MCALL	PREX$,PRDP$
   6912					;
   6913					; LOCAL DATA
   6914					;
   6915	002540					.PSECT	DATA,D
   6916	002540				DFEDPB:	PRDP$	0,DFEAD,DFEBF,ED.PHY ; DPB FOR PRIVLEDGED DEPOSIT.
	002540	   011 	   005 			.BYTE	DR.DTE,5
	002542	   016 	   200 			.BYTE	DF.PDP,ED.PHY
	002544	002564'				.WORD	DFEAD
	002546	002570'				.WORD	DFEBF
	002550	000000 				.WORD	0
   6917	002552				DFEEXB:	PREX$	0,DFEAD,DFEBF,ED.PHY ; DPB FOR PRIVLEDGED EXAMINE.
	002552	   011 	   005 			.BYTE	DR.DTE,5
	002554	   015 	   200 			.BYTE	DF.PEX,ED.PHY
	002556	002564'				.WORD	DFEAD
	002560	002570'				.WORD	DFEBF
	002562	000000 				.WORD	0
   6918	002564				DFEAD:	WD22$	0		; ADDRESS OF MEMORY ACCESS.
	002564	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   6919						.EVEN
   6920	002570				DFEBF:	WD36$	0 0		; DATA TO WRITE OR READ.
	002570	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002573	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6921						.EVEN
   6922	004542					.PSECT	TEXT,D
   6923	004542				TFEDFL:	ERROR	<DEPOSIT FAILED>
	004542	   077 	   040 	   104 		 .ASCIZ	\? DEPOSIT FAILED\
	004545	   105 	   120 	   117
	004550	   123 	   111 	   124
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 146-1
$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION

	004553	   040 	   106 	   101
	004556	   111 	   114 	   105
	004561	   104 	   000
   6924	004563				TFEEFL:	ERROR	<EXAMINE FAILED>
	004563	   077 	   040 	   105 		 .ASCIZ	\? EXAMINE FAILED\
	004566	   130 	   101 	   115
	004571	   111 	   116 	   105
	004574	   040 	   106 	   101
	004577	   111 	   114 	   105
	004602	   104 	   000
   6925	022136					.PSECT
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 147
$DPOS	-- DEPOSIT KL MEMORY ROUTINE

   6927						.SBTTL	$DPOS	-- DEPOSIT KL MEMORY ROUTINE
   6928					;+
   6929					; DEPOSIT GIVEN WORD INTO PHYSICAL CORE.
   6930					;
   6931					; INPUTS:
   6932					;	R1	- ADDRESS OF 36 BIT DATA WORD.
   6933					;	R0	- 22 BIT KL ADDRESS.
   6934					;
   6935					; OUTPUTS:
   6936					;	CARRY IS SET ON ERROR AND MESSAGE IS DISPLAYED.
   6937					;-
   6938
   6939	022136	004537 	000356'		$DPOS::	JSR	R5,$RSAVE
   6940	022142					CALL	LFEMVA		; SET UP PROPER BOUNDARY
	022142	004737 	022344'			 JSR	PC,LFEMVA
   6941	022146					CALL	LFECKN		; MAKE SURE THE CLOCK IS ON.
	022146	004737 	022370'			 JSR	PC,LFECKN
   6942	022152	103431 				BCS	90$
   6943	022154	012704 	002570'			MOV	#DFEBF,R4	; SET UP TEMPORARY WORK AREA
   6944	022160	012703 	000005 			MOV	#5,R3		; AREA COUNT
   6945	022164	112124 			10$:	MOVB	(R1)+,(R4)+	; MOVE IN -11 DATA
   6946	022166	077302 				SOB	R3,10$		; CONTINUE MOVE
   6947	022170	142744 	177760 			BICB	#^C17,-(R4)	; CLEAR HIGH BYTE
   6948	022174					TRACK	DP,DFEAD,DFEBF
	022174	004037 	022206'			 JSR	R0,64$
	022200	050104 				 .WORD	"DP
	022202	002564'				 .WORD	DFEAD
	022204	002570'				 .WORD	DFEBF
	022206	004737 	000424'		64$:	 JSR	PC,$TRACK
	022212	012600 				 MOV	(SP)+,R0
   6949	022214					DIR$	#DFEDPB		; DO DEPOSIT TO KL
	022214	012746 	002540'			MOV	#DFEDPB,-(SP)
	022220	104375 				EMT	375
   6950	022222	103005 				BCC	90$
   6951	022224					PRINT	#TFEDFL		; INFORM OF ERROR.
	022224	012700 	004542'			 MOV	#TFEDFL,R0
	022230	004737 	000000G			 JSR	PC,$TTMSG
   6952	022234	000261 				SEC
   6953	022236				90$:	RETURN
	022236	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 148
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   6955						.SBTTL	$EXAM	-- EXAMINE KL MEMORY ROUTINE
   6956					;+
   6957					; EXAMINE GIVEN WORD FROM KL PHYSICAL CORE.
   6958					;
   6959					; INPUTS:
   6960					;	R1	- ADDRESS OF BUFFER TO RECIEVE DATA.
   6961					;	R0	- 22 BIT KL ADDRESS.
   6962					;
   6963					; OUTPUTS:
   6964					;	CARRY IS SET ON ERROR AND MESSAGE IS DISPLAYED.
   6965					;-
   6966
   6967	022240	004537 	000356'		$EXAM::	JSR	R5,$RSAVE
   6968	022244					CALL	LFEMVA
	022244	004737 	022344'			 JSR	PC,LFEMVA
   6969	022250					CALL	LFECKN		; MAKE SURE THE CLOCK IS ON.
	022250	004737 	022370'			 JSR	PC,LFECKN
   6970	022254	103425 				BCS	90$
   6971	022256					DIR$	#DFEEXB		; DO KL EXAMINE
	022256	012746 	002552'			MOV	#DFEEXB,-(SP)
	022262	104375 				EMT	375
   6972	022264					TRACK	EX,DFEAD,DFEBF
	022264	004037 	022276'			 JSR	R0,64$
	022270	054105 				 .WORD	"EX
	022272	002564'				 .WORD	DFEAD
	022274	002570'				 .WORD	DFEBF
	022276	004737 	000424'		64$:	 JSR	PC,$TRACK
	022302	012600 				 MOV	(SP)+,R0
   6973	022304	103411 				BCS	90$
   6974	022306	012702 	000005 			MOV	#5,R2
   6975	022312	012700 	002570'			MOV	#DFEBF,R0
   6976	022316	112021 			10$:	MOVB	(R0)+,(R1)+
   6977	022320	077202 				SOB	R2,10$
   6978	022322	142741 	177760 			BICB	#^C17,-(R1)
   6979	022326					RETURN
	022326	000207 				 RTS	PC
   6980	022330				90$:	PRINT	#TFEEFL		; INFORM OPERATOR OF ERROR.
	022330	012700 	004563'			 MOV	#TFEEFL,R0
	022334	004737 	000000G			 JSR	PC,$TTMSG
   6981	022340	000261 				SEC
   6982	022342					RETURN
	022342	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1108  13-JAN-78 10:41  PAGE 149
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   6984					;+
   6985					; GET 22-BIT ADDRESS AND PLACE IN WORD-ALIGNED HOLDING AREA.
   6986					;-
   6987
   6988	022344	012705 	002564'		LFEMVA:	MOV	#DFEAD,R5
   6989	022350	112025 				MOVB	(R0)+,(R5)+	; CLAIM THE CALLER'S
   6990	022352	112025 				MOVB	(R0)+,(R5)+	; KL ADDRESS
   6991	022354	111015 				MOVB	(R0),(R5)	; FOR OUR OWN.
   6992	022356	042715 	177700 			BIC	#^C77,(R5)	; 22 BITS PLEASE.
   6993	022362	012700 	002564'			MOV	#DFEAD,R0
   6994	022366					RETURN
	022366	000207 				 RTS	PC
   6995
   6996					;+
   6997					; MAKE SURE THE CLOCK IS ON
   6998					;-
   6999
   7000	022370	105737 	000032'		LFECKN:	TSTB	.DESW		; IF OUR SWITCH IS >0,
   7001	022374	003025 				BGT	90$		; THEN MICROCODE IS USEABLE.
   7002	022376					CALL	$KLMR		; OTHERWISE RESET
	022376	004737 	022452'			 JSR	PC,$KLMR
   7003	022402	103422 				BCS	90$
   7004	022404	012700 	001000 			MOV	#.STRCL,R0	; AND START CLOCK.
   7005	022410					CALL	$DFXC
	022410	004737 	022006'			 JSR	PC,$DFXC
   7006	022414	103415 				BCS	90$
   7007	022416	012702 	001750 			MOV	#1000.,R2	; WAIT FOR HALT LOOP
   7008	022422				10$:	CALL	$DTRW1		; BY READING DTE REG #1
	022422	004737 	000266'			 JSR	PC,$DTRW1
   7009	022426	103410 				BCS	90$		; AND
   7010	022430	032700 	001000 			BIT	#DS06,R0	; CHECKING HALT BIT.
   7011	022434	001003 				BNE	20$
   7012	022436	077207 				SOB	R2,10$		; IF TAKES TOO LONG
   7013	022440	000261 				SEC			; THEN WE ARE IN TROUBLE.
   7014	022442					RETURN
	022442	000207 				 RTS	PC
   7015	022444	105237 	000032'		20$:	INCB	.DESW		; OTHERWISE INDICATE
   7016	022450				90$:	RETURN			; OKAY TO USE.
	022450	000207 				 RTS	PC
KLIMR -- KL RESET ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 150
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   7018						.TITLE	KLIMR -- KL RESET ROUTINES
   7019	022452					IDENT$	5,0
						.IDENT	/005000/
   7020					;
   7021					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7022					;
   7023					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7024					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7025					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7026					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7027					;
   7028					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7029					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7030					; EQUIPMENT CORPORATION.
   7031					;
   7032					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7033					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7034					;
   7035					; VERSION 05-00
   7036					;
   7037					; ALAN D. PECKHAM  29-MAR-77
   7038					;
   7039					; MODIFIED BY:
   7040					;
   7041					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO DO A FULL MASTER RESET
   7042					;  AND A PARTIAL RESET FOR RAM ADDRESS CLEARING.
   7043					;
KLIMR -- KL RESET ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 151
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   7045					;
   7046					; LOCAL DATA
   7047					;
   7048	002576					.PSECT	DATA,D
   7049	002576	022000 	000000'		DMRMRT:	.WORD	.LDSEL/2,.ZERO	; CLOCK LOAD FUNC #44
   7050	002602	100000 				.WORD	.STPCL/2+BIT15	; STOP THE CLOCK
   7051	002604	103400 				.WORD	.SETMR/2+BIT15	; SET RESET
   7052	002606	023000 	000000'			.WORD	.LDCK1/2,.ZERO	; LOAD CLK PARITY CHECK & FS CHECK
   7053	002612	023400 	000000'			.WORD	.LDCK2/2,.ZERO	; LOAD CLK MBOX CYCLE DISABLES,
   7054									; PARITY CHECK, ERROR STOP ENABLE
   7055	002616	021000 	000000'			.WORD	.LDBRR/2,.ZERO	; LOAD BURST COUNTER (8,4,2,1)
   7056	002622	021400 	000000'			.WORD	.LDBRL/2,.ZERO	; LOAD BURST COUNTER (128,64,32,16)
   7057	002626	022400 	000000'			.WORD	.LDDIS/2,.ZERO	; LOAD EBOX CLOCK DISABLE
   7058	002632	100400 				.WORD	.STRCL/2+BIT15	; START THE CLOCK
   7059	002634	034000 	000000'			.WORD	.INICL/2,.ZERO	; INIT CHANNELS
   7060	002640	021000 	000000'			.WORD	.LDBRR/2,.ZERO	; LOAD BURST COUNTER (8,4,2,1)
   7061	002644	000000 				.WORD	0
   7062	002646	102000 				.WORD	.CECLK/2+BIT15	; CONDITIONAL SINGLE STEP
   7063	002650	103000 				.WORD	.CLRMR/2+BIT15	; CLEAR RESET
   7064	002652	033400 	000000'			.WORD	.EIOJA/2,.ZERO	; ENABLE KL STL DECODING OF CODES & AC'S
   7065	002656	037000 	000000'			.WORD	.MEMRS/2,.ZERO	; SET KL10 MEM RESET FLOP
   7066	002662	034400 	002670'			.WORD	.WRMBX/2,DMRMMR	; WRITE M-BOX
   7067	002666	000000 				.WORD	0
   7068	002670				DMRMMR:	WD36$	0 12		; FOR MEMORY RESET
	002670	   012 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002673	   000 	   000 			 .BYTE	BY$$3,BY$$4
   7069						.EVEN
   7070
   7071	002676	007000 			DMRSRT:	.WORD	.SETMR		; SET RESET.
   7072	002700	001000 				.WORD	.STRCL		; START THE CLOCK.
   7073	002702	000000 				.WORD	.STPCL		; STOP THE CLOCK.
   7074	002704	004000 				.WORD	.CECLK		; CONDITIONAL SINGLE STEP.
   7075	002706	006000 				.WORD	.CLRMR		; CLEAR RESET.
   7076		000005 			DMRSRL	=	.-DMRSRT/2	; LENGTH OF TABLE.
   7077	002710				DMRBF:	WD36$	0 0		; GENERAL BIT BUCKET.
	002710	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002713	   000 	   000 			 .BYTE	BY$$3,BY$$4
   7078						.EVEN
   7079	004604					.PSECT	TEXT,D
   7080	004604				TMRMFL:	ERROR	<MASTER RESET FAILED>
	004604	   077 	   040 	   115 		 .ASCIZ	\? MASTER RESET FAILED\
	004607	   101 	   123 	   124
	004612	   105 	   122 	   040
	004615	   122 	   105 	   123
	004620	   105 	   124 	   040
	004623	   106 	   101 	   111
	004626	   114 	   105 	   104
	004631	   000
   7081	022452					.PSECT
KLIMR -- KL RESET ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 152
$KLMR	-- DO A MASTER RESET ON THE KL

   7083						.SBTTL	$KLMR	-- DO A MASTER RESET ON THE KL
   7084					;+
   7085					; RESET THE KL PROCESSOR.
   7086					;
   7087					; NO INPUTS
   7088					;
   7089					; OUTPUTS:
   7090					;	THE CARRY IS SET ON ANY ERROR AND AN ERROR MESSAGE IS DISPLAYED.
   7091					;-
   7092
   7093	022452	004537 	000356'		$KLMR::	JSR	R5,$RSAVE
   7094	022456					TRACK	MR
	022456	004037 	022470'			 JSR	R0,64$
	022462	051115 				 .WORD	"MR
	022464	000000 				 .WORD
	022466	000000 				 .WORD
	022470	004737 	000424'		64$:	 JSR	PC,$TRACK
	022474	012600 				 MOV	(SP)+,R0
   7095	022476	012700 	010000 			MOV	#.CLRUN,R0
   7096	022502					CALL	$DFXC		; CLEAR RUN
	022502	004737 	022006'			 JSR	PC,$DFXC
   7097	022506	103446 				BCS	80$		; TIMEOUT ERROR
   7098	022510	012737 	000100 	000730'		MOV	#DRESET,.DTEDT	; RESET BIT TO .DTEDT
   7099	022516					CALL	$DTRW2		; WRITE DTE-20 DIAG 2
	022516	004737 	000274'			 JSR	PC,$DTRW2
   7100	022522	103440 				BCS	80$		; ERROR
   7101	022524	012737 	053101 	000730'		MOV	#DON10C!ERR10C!INT11C!PERCLR!DON11C!ERR11C,.DTEDT
   7102									; CLEAR DTE-20 STATUS
   7103	022532					CALL	$DTRWS		; WRITE IT
	022532	004737 	000304'			 JSR	PC,$DTRWS
   7104	022536	103432 				BCS	80$
   7105	022540	012703 	002576'			MOV	#DMRMRT,R3	; SET UP TABLE AND
   7106	022544					CALL	LMRDFN		; DO FIRST SET OF FUNCTIONS.
	022544	004737 	022640'			 JSR	PC,LMRDFN
   7107	022550	103425 				BCS	80$
   7108	022552	012702 	000003 			MOV	#3,R2		; SET UP MAX LOOP COUNT
   7109	022556	012701 	002710'			MOV	#DMRBF,R1	; AND DIAGNOSTIC READ BUFFER.
   7110	022562	012700 	162000 		10$:	MOV	#<162*1000>,R0	; LOOK
   7111	022566					CALL	$DFRD		; FOR
	022566	004737 	021502'			 JSR	PC,$DFRD
   7112	022572	103414 				BCS	80$
   7113	022574	132711 	000010 			BITB	#10,(R1)	; "A CHANGE COMING A L"
   7114	022600	001406 				BEQ	20$
   7115	022602	012700 	002000 			MOV	#.SSCLK,R0	; SINGLE STEP THE MBOX
   7116	022606					CALL	$DFXC
	022606	004737 	022006'			 JSR	PC,$DFXC
   7117	022612	103404 				BCS	80$
   7118	022614	077216 				SOB	R2,10$		; ONLY 3 TIMES MAX.
   7119	022616				20$:	CALL	LMRDFN		; NOW FINISH THE JOB.
	022616	004737 	022640'			 JSR	PC,LMRDFN
   7120	022622	103005 				BCC	90$
   7121	022624				80$:	PRINT	#TMRMFL		; PRINT ERROR IF NEED BE.
	022624	012700 	004604'			 MOV	#TMRMFL,R0
	022630	004737 	000000G			 JSR	PC,$TTMSG
   7122	022634	000261 				SEC
   7123	022636				90$:	RETURN
	022636	000207 				 RTS	PC
KLIMR -- KL RESET ROUTINES	MACRO M1108  13-JAN-78 10:41  PAGE 152-1
$KLMR	-- DO A MASTER RESET ON THE KL

   7124
   7125	022640	012300 			LMRDFN:	MOV	(R3)+,R0	; FUNCTION TO BE PERFORMED
   7126	022642	006300 			10$:	ASL	R0		; GET ITS TYPE
   7127	022644	103004 				BCC	20$		; A WRITE OR
   7128	022646					CALL	$DFXC		; EXECUTE FUNCTION.
	022646	004737 	022006'			 JSR	PC,$DFXC
   7129	022652	103005 				BCC	30$		; SUCCESS
   7130	022654	000406 				BR	40$		; OR FAILURE.
   7131	022656	012301 			20$:	MOV	(R3)+,R1
   7132	022660					CALL	$DFWR
	022660	004737 	021610'			 JSR	PC,$DFWR
   7133	022664	103402 				BCS	40$
   7134	022666	012300 			30$:	MOV	(R3)+,R0	; IF MORE FUNCTIONS
   7135	022670	001364 				BNE	10$		; THEN CONTINUE.
   7136	022672				40$:	RETURN
	022672	000207 				 RTS	PC
   7137
   7138						.SBTTL	$KLSR	-- SOFT RESET FOR RAM LOADERS
   7139
   7140	022674				$KLSR::	PUSH	<R2,R1,R0>
	022674	010246 				 MOV	R2,-(SP)
	022676	010146 				 MOV	R1,-(SP)
	022700	010046 				 MOV	R0,-(SP)
   7141	022702					TRACK	SR
	022702	004037 	022714'			 JSR	R0,64$
	022706	051123 				 .WORD	"SR
	022710	000000 				 .WORD
	022712	000000 				 .WORD
	022714	004737 	000424'		64$:	 JSR	PC,$TRACK
	022720	012600 				 MOV	(SP)+,R0
   7142	022722	012702 	000005 			MOV	#DMRSRL,R2
   7143	022726	012701 	002676'			MOV	#DMRSRT,R1
   7144	022732	012100 			1$:	MOV	(R1)+,R0
   7145	022734					CALL	$DFXC
	022734	004737 	022006'			 JSR	PC,$DFXC
   7146	022740	103401 				BCS	9$
   7147	022742	077205 				SOB	R2,1$
   7148	022744				9$:	POP	<R0,R1,R2>
	022744	012600 				 MOV	(SP)+,R0
	022746	012601 				 MOV	(SP)+,R1
	022750	012602 				 MOV	(SP)+,R2
   7149	022752					RETURN
	022752	000207 				 RTS	PC
KLISB -- SBUS CONTROL SERVICES	MACRO M1108  13-JAN-78 10:41  PAGE 153
$KLSR	-- SOFT RESET FOR RAM LOADERS

   7151						.TITLE	KLISB -- SBUS CONTROL SERVICES
   7152	022754					IDENT$	5,0
						.IDENT	/005000/
   7153					;
   7154					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7155					;
   7156					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7157					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7158					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7159					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7160					;
   7161					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7162					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7163					; EQUIPMENT CORPORATION.
   7164					;
   7165					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7166					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7167					;
   7168					; VERSION 05-00
   7169					;
   7170					; ALAN D. PECKHAM  30-MAR-77
   7171					;
   7172					; MODIFIED BY:
   7173					;
   7174					; FUNCTION: THIS MODULE CONTAINS ROUTINES TO MANIPULATE THE SBUS.
   7175					;
   7176					; EQUATED SYMBOLS
   7177					;
   7178		000002 			BLKO	=	2		; KL I/O SUBFUNCTION CODE.
   7179		000004 			PI	=	4		; KL DEVICE.
   7180					;
   7181					; LOCAL DATA
   7182					;
   7183	002716					.PSECT	DATA,D
   7184	002716				DSBRSB:	WD36$	0 4000		; BIT 24 ENABLES SBUS RESET.
	002716	   000 	   010 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002721	   000 	   000 			 .BYTE	BY$$3,BY$$4
   7185	002723				DSBA16:	WD22$	16		; KL AC 16 ADDRESS.
	002723	   016 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   7186	002726				DSBA17:	WD22$	17		; KL AC 17 ADDRESS.
	002726	   017 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   7187	002731				DSBDI:	IO10$	BLKO PI,,16	; SBUS DIAGNOSTIC INSTRUCTION.
	002731	   016 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002734	   005 	   016 			 .BYTE	BY$$3,BY$$4
   7188	002736				DSBBF:	WD36$	0 0		; GENERAL BIT BUCKET.
	002736	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002741	   000 	   000 			 .BYTE	BY$$3,BY$$4
   7189						.EVEN
   7190	022754					.PSECT
KLISB -- SBUS CONTROL SERVICES	MACRO M1108  13-JAN-78 10:41  PAGE 154
$SBDG	-- DO SBUS DIAGNOSTIC FUNCTIONS

   7192						.SBTTL	$SBDG	-- DO SBUS DIAGNOSTIC FUNCTIONS
   7193					;+
   7194					; DO SBUS DIAGNOSTIC FUNCTION TO THE SPECIFIED CONTROLLER USING A
   7195					; FUNCTION WORD POINTED TO BY R1. THE FUNCTION WORD IS MODIFIED TO
   7196					; INSERT THIS NUMBER. THE FUNCTION RETURN WORD IS PLACED IN A TEMPORARY
   7197					; BUFFER AND ITS ADDRESS IS PASSED BACK IN R0.
   7198					;
   7199					; INPUTS:
   7200					;	R1	- POINTS TO A 36 BIT DATA WORD TO BE USED AS THE FIRST
   7201					;		  WORD OF THE PAIR OF SBUS OBJECT WORDS.
   7202					;	R0	- THE MEMORY CONTROLLER TO OPERATE ON.
   7203					;
   7204					; OUTPUTS:
   7205					;	R0	- POINTS TO A TEMPORARY BUFFER WHICH CONTAINS THE SECOND
   7206					;		  WORD RETURNED FROM THE SBUS DIAGNOSTIC.
   7207					;	THE CARRY IS SET ON ANY ERROR.
   7208					;
   7209					; THE 36 BIT WORD POINTED TO BY R1 IS MODIFIED IN BITS 0-4 TO CONTAIN
   7210					; THE CONTROLLER.
   7211					;-
   7212
   7213	022754				$SBDG::	PUSH	R1
	022754	010146 				 MOV	R1,-(SP)
   7214	022756	142761 	000017 	000004 		BICB	#17,4(R1)	; CLEAR CONTROLLER FIELD.
   7215	022764	142761 	000200 	000003 		BICB	#200,3(R1)
   7216	022772	006200 				ASR	R0		; JUST #0 - #3 IN R0
   7217	022774	150061 	000004 			BISB	R0,4(R1)	; STORE IN SBUS WORD
   7218	023000	103003 				BCC	10$		; SET IT ?
   7219	023002	152761 	000200 	000003 		BISB	#200,3(R1)	; YES
   7220	023010	012700 	002723'		10$:	MOV	#DSBA16,R0	; DEPOSIT IN AC16.
   7221	023014					CALL	$DPOS
	023014	004737 	022136'			 JSR	PC,$DPOS
   7222	023020	103423 				BCS	90$
   7223	023022	012701 	000000'			MOV	#.ZERO,R1	; AND CLEAR
   7224	023026	012700 	002726'			MOV	#DSBA17,R0	; AC17.
   7225	023032					CALL	$DPOS
	023032	004737 	022136'			 JSR	PC,$DPOS
   7226	023036	103414 				BCS	90$
   7227	023040	012700 	002731'			MOV	#DSBDI,R0
   7228	023044					CALL	$EXCT		; DO SBUS DIAG
	023044	004737 	020344'			 JSR	PC,$EXCT
   7229	023050	103407 				BCS	90$
   7230	023052	012701 	002736'			MOV	#DSBBF,R1	; GET RESPONSE
   7231	023056	012700 	002726'			MOV	#DSBA17,R0	; FROM AC17.
   7232	023062					CALL	$EXAM
	023062	004737 	022240'			 JSR	PC,$EXAM
   7233	023066	010100 				MOV	R1,R0		; PASS BACK RETURN WORD.
   7234	023070				90$:	POP	R1
	023070	012601 				 MOV	(SP)+,R1
   7235	023072					RETURN
	023072	000207 				 RTS	PC
KLISB -- SBUS CONTROL SERVICES	MACRO M1108  13-JAN-78 10:41  PAGE 155
$SBMR	-- RESET ALL MEMORY CONTROLLERS

   7237						.SBTTL	$SBMR	-- RESET ALL MEMORY CONTROLLERS
   7238					;+
   7239					; THIS IS ESSENTIALLY AN SBUS CONTROLLER RESET. IT IS DONE BY SETTING
   7240					; THE MEMORY RESET FLOP, RUNNING THE CLOCK, AND THEN RESETTING THE FLOP.
   7241					; THE CLOCK RUN AND FLOP RESET ARE DONE BY A MASTER RESET.
   7242					;
   7243					; NO INPUTS
   7244					;
   7245					; OUTPUTS:
   7246					;	CARRY IS SET ON ANY ERROR.
   7247					;-
   7248
   7249	023074				$SBMR::	PUSH	<R1,R0>
	023074	010146 				 MOV	R1,-(SP)
	023076	010046 				 MOV	R0,-(SP)
   7250	023100	012701 	002716'			MOV	#DSBRSB,R1
   7251	023104	012700 	076000 			MOV	#.MEMRS,R0
   7252	023110					CALL	$DFWR			; DO FW: 76:4000
	023110	004737 	021610'			 JSR	PC,$DFWR
   7253	023114					POP	<R0,R1>
	023114	012600 				 MOV	(SP)+,R0
	023116	012601 				 MOV	(SP)+,R1
   7254	023120	103402 				BCS	90$			; ERROR
   7255	023122					CALLR	$KLMR			; DO MASTER RESET
	023122	000137 	022452'			 JMP	$KLMR
   7256	023126				90$:	RETURN
	023126	000207 				 RTS	PC
KLITO -- ASCII-OCTAL TRANSLATIO	MACRO M1108  13-JAN-78 10:41  PAGE 156
$SBMR	-- RESET ALL MEMORY CONTROLLERS

   7258						.TITLE	KLITO -- ASCII-OCTAL TRANSLATION
   7259	023130					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   7260					;
   7261					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7262					;
   7263					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7264					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7265					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7266					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7267					;
   7268					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7269					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7270					; EQUIPMENT CORPORATION.
   7271					;
   7272					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7273					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7274					;
   7275					; VERSION 05-01									; ADP01
   7276					;
   7277					; ALAN D. PECKHAM  30-MAR-77
   7278					;
   7279					; MODIFIED BY:
   7280					;
   7281					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
   7282					;  TO/FROM THE ASCII REPRESENTATION OF OCTAL NUMBERS.
   7283					;
   7284	023130					.PSECT
KLITO -- ASCII-OCTAL TRANSLATIO	MACRO M1108  13-JAN-78 10:41  PAGE 157
$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII

   7286						.SBTTL	$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII
   7287					;+
   7288					; TRANSLATE THE UNSIGNED BINARY NUMBER IN R0 INTO AND ASCII STRING
   7289					; AND PUT IT INTO THE AREA POINTED TO BY R5. THE STRING IS VARIBLE
   7290					; IN LENGTH WITH LEADING ZERO SUPPRESSION AND A MAXIMUM LENGTH OF
   7291					; 6. R5 IS INCREMENTED PAST THE INSERTED STRING.
   7292					;
   7293					; INPUTS:
   7294					;	R5	- POINTER TO AREA TO RECIEVE ASCII CHARACTERS.
   7295					;	R0	- BINARY NUMBER TO CONVERT.
   7296					;
   7297					; OUTPUTS:
   7298					;	THE ASCII STRING IS PLACED IN THE BYTES POINTED TO BY R5 AND
   7299					;	R5 IS UPDATED TO POINT AT THE BYTE FOLLOWING THE INSERTED
   7300					;	STRING. R0 IS DESTROYED.
   7301					;-
   7302
   7303	023130				$TRB2O::PUSH	<R2,R1>		; SAVE REGISTERS AND
	023130	010246 				 MOV	R2,-(SP)
	023132	010146 				 MOV	R1,-(SP)
   7304	023134	012702 	023156'			MOV	#20$,R2		; SET SIGNIFICANCE CHECKER.
   7305	023140	012701 	002200 			MOV	#2200,R1	; GET INITIAL BIT.
   7306	023144	006100 			10$:	ROL	R0
   7307	023146	106101 				ROLB	R1		; ROLL BITS IN.
   7308	023150	103375 				BCC	10$		; ANY MORE ?
   7309	023152	001003 				BNE	30$		; NON-ZERO BYTE IS SIGNIFICANT.
   7310	023154	000112 				JMP	(R2)		; HAVE WE MET SIGNIFICANCE ?
   7311	023156	005701 			20$:	TST	R1		; NO - LAST DIGIT ?
   7312	023160	100004 				BPL	40$		; NO- IGNORE.
   7313	023162	010702 			30$:	MOV	PC,R2		; SIGNIFICANCE HAS BEEN REACHED.
   7314	023164	152701 	000060 			BISB	#'0,R1		; MAKE IT A DIGIT
   7315	023170	110125 				MOVB	R1,(R5)+	; AND INSERT.
   7316	023172	105001 			40$:	CLRB	R1		; CLEAR OLD DIGIT
   7317	023174	152701 	000020 			BISB	#20,R1		; AND SET 3-BIT INDICATOR.
   7318	023200	006301 				ASL	R1		; FINISHED WITH WORD ?
   7319	023202	103360 				BCC	10$		; NO - CONTINUE, OTHERWISE
   7320	023204					POP	<R1,R2>
	023204	012601 				 MOV	(SP)+,R1
	023206	012602 				 MOV	(SP)+,R2
   7321	023210					RETURN			; WE ARE FINISHED.
	023210	000207 				 RTS	PC
KLITO -- ASCII-OCTAL TRANSLATIO	MACRO M1108  13-JAN-78 10:41  PAGE 158
$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD

   7323						.SBTTL	$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD
   7324					;+
   7325					; THIS ROUTINE TRANSLATES AN ASCII OCTAL NUMBER POINTED
   7326					; TO BY R5 INTO ITS BINARY EQUIVALENT IN R0. R5 IS INCRMENTED
   7327					; PAST THE NUMBER, AND CARRY IS RETURNED ON OVERFLOW.
   7328					;
   7329					; INPUTS:
   7330					;	R5	- POINTER TO ASCII STRING TO EXTRACT OCTAL NUMBER FROM.
   7331					;
   7332					; OUTPUTS:
   7333					;	R0	- BINARY NUMBER EXTRACTED.
   7334					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS USED
   7335					;	IN THE TRANSLATION. THE CARRY IS SET ON OVERFLOW.
   7336					;-
   7337
   7338	023212				$TRO2B::PUSH	R2
	023212	010246 				 MOV	R2,-(SP)
   7339	023214	005000 				CLR	R0		; INITIALIZE RESULT.
   7340	023216	112502 			10$:	MOVB	(R5)+,R2	; GET NEXT CHARACTER				; ADP01
   7341	023220	162702 	000060 			SUB	#'0,R2		; AND MAKE BINARY
   7342	023224	100413 				BMI	20$		; WHILE CHECKING
   7343	023226	022702 	000007 			CMP	#7,R2		; IF OCTAL NUMERIC.
   7344	023232	103410 				BLO	20$		; WE ARE FINISHED IF NOT.
   7345	023234	032700 	160000 			BIT	#160000,R0	; IF RESULT WILL OVERFLOW
   7346	023240	001006 				BNE	30$		; THEN SIGNAL ERROR
   7347	023242	006300 				ASL	R0		; OTHERWISE
   7348	023244	006300 				ASL	R0		; MULTIPLY BY 8
   7349	023246	006300 				ASL	R0		; AND
   7350	023250	060200 				ADD	R2,R0		; ADD NEW DIGIT.
   7351	023252	000761 				BR	10$		; GO BACK FOR MORE.
   7352	023254	005727 			20$:	TST	(PC)+		; PROPER EXIT - CLEAR CARRY.
   7353	023256	000261 			30$:	SEC			; OVERFLOW - SET CARRY.
   7354	023260	005305 				DEC	R5		; BACK UP OVER					; ADP01
   7355	023262					POP	R2		; LAST CHARACTER CHECKED
	023262	012602 				 MOV	(SP)+,R2
   7356	023264					RETURN			; AND EXIT.
	023264	000207 				 RTS	PC
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 159
$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD

   7358						.TITLE	KLITI -- ASCII-DECIMAL TRANSLATION
   7359	023266					IDENT$	5,0
						.IDENT	/005000/
   7360					;
   7361					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7362					;
   7363					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7364					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7365					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7366					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7367					;
   7368					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7369					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7370					; EQUIPMENT CORPORATION.
   7371					;
   7372					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7373					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7374					;
   7375					; VERSION 05-00
   7376					;
   7377					; ALAN D. PECKHAM  30-MAR-77
   7378					;
   7379					; MODIFIED BY:
   7380					;
   7381					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
   7382					;  TO/FROM THE ASCII REPRESENTATION OF INTEGERS.
   7383					;
   7384	023266					.PSECT
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 160
$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII

   7386						.SBTTL	$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII
   7387					;+
   7388					; THIS ROUTINE TRANSLATES A BINARY NUMBER IN R0 INTO AN ASCII
   7389					; STRING AND PUTS THIS STRING INTO THE AREA POINTED TO BY R5.
   7390					; THE NUMBER IS CONSIDERED UNSIGNED, AND THE RESULTING STRING
   7391					; IS VARIABLE IN LENGTH WITH A MAXIMUM OF 5 CHARACTERS.
   7392					;
   7393					; INPUTS:
   7394					;	R5	- POINTER TO AREA TO RECIEVE ASCII CHARACTERS.
   7395					;	R0	- BINARY NUMBER TO CONVERT.
   7396					;
   7397					; OUTPUTS:
   7398					;	THE ASCII STRING IS PLACED IN THE BYTES POINTED TO BY R5 AND
   7399					;	R5 IS UPDATED TO POINT AT THE BYTE FOLLOWING THE INSERTED
   7400					;	STRING. R0 IS DESTROYED.
   7401					;-
   7402
   7403	023266	004237 	023304'		$TRB2I::JSR	R2,10$		; SAVE R2 AND POINT TO POWER TABLE.
   7404	023272	023420 	001750 	000144 		.WORD	10000.,1000.,100.,10.,1.
	023300	000012 	000001
   7405	023304	004337 	023340'		10$:	JSR	R3,50$		; THE SAVE R3 AND SET TO
   7406
   7407	023310	022200 				CMP	(R2)+,R0	; SIGNIFICANCE CHECKER.
   7408	023312	101011 				BHI	40$		; IGNORES LEADING ZEROES.
   7409	023314	005742 				TST	-(R2)		; WHOOPS ! THIS ONE IS GOOD,
   7410	023316	010703 			20$:	MOV	PC,R3		; DIGITS ARE NOW TO BE PRINTED.
   7411
   7412	023320	112715 	000060 			MOVB	#'0,(R5)	; SET TO ZERO
   7413	023324	105215 			30$:	INCB	(R5)		; AND GO UP
   7414	023326	161200 				SUB	(R2),R0
   7415	023330	100375 				BPL	30$		; UNTIL TOO FAR,
   7416	023332	062200 				ADD	(R2)+,R0	; THEN BACK UP.
   7417	023334	105325 				DECB	(R5)+
   7418	023336	000207 			40$:	RTS	PC
   7419
   7420	023340	004713 			50$:	JSR	PC,(R3)		; MAIN PROCESSOR -
   7421	023342	004713 				JSR	PC,(R3)		; ALLOW FOR FOUR INSIGNIFICANT DIGITS,
   7422	023344	004713 				JSR	PC,(R3)
   7423	023346	004713 				JSR	PC,(R3)
   7424	023350	004737 	023316'			JSR	PC,20$		; AND THEN FORCE SIGNIFICANCE.
   7425	023354					POP	<R3,R2>		; RESTORE REGISTERS
	023354	012603 				 MOV	(SP)+,R3
	023356	012602 				 MOV	(SP)+,R2
   7426	023360					RETURN			; AND .....
	023360	000207 				 RTS	PC
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 161
$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD

   7428						.SBTTL	$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD
   7429					;+
   7430					; THIS ROUTINE TRANSLATES AN ASCII INTEGER NUMBER POINTED
   7431					; TO BY R5 INTO ITS BINARY EQUIVALENT IN R0. R5 IS INCRMENTED
   7432					; PAST THE NUMBER, AND CARRY IS RETURNED ON OVERFLOW.
   7433					;
   7434					; INPUTS:
   7435					;	R5	- POINTER TO ASCII STRING TO EXTRACT INTEGER FROM.
   7436					;
   7437					; OUTPUTS:
   7438					;	R0	- BINARY NUMBER EXTRACTED.
   7439					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS USED
   7440					;	IN THE TRANSLATION. THE CARRY IS SET ON SIGNED OVERFLOW.
   7441					;-
   7442
   7443	023362				$TRI2B::PUSH	R1
	023362	010146 				 MOV	R1,-(SP)
   7444	023364	005000 				CLR	R0
   7445	023366	112501 			10$:	MOVB	(R5)+,R1
   7446	023370	162701 	000060 			SUB	#'0,R1
   7447	023374	100420 				BMI	30$
   7448	023376	022701 	000011 			CMP	#9.,R1
   7449	023402	103415 				BLO	30$
   7450	023404	022700 	006314 			CMP	#<77777/10.>,R0
   7451	023410	103413 				BLO	40$
   7452	023412	101003 				BHI	20$
   7453	023414	022701 	000007 			CMP	#<77777-<77777/10.*10.>>,R1
   7454	023420	103407 				BLO	40$
   7455	023422	006300 			20$:	ASL	R0
   7456	023424	060001 				ADD	R0,R1
   7457	023426	006300 				ASL	R0
   7458	023430	006300 				ASL	R0
   7459	023432	060100 				ADD	R1,R0
   7460	023434	000754 				BR	10$
   7461	023436	005727 			30$:	TST	(PC)+
   7462	023440	000261 			40$:	SEC
   7463	023442	005305 				DEC	R5
   7464	023444					POP	R1
	023444	012601 				 MOV	(SP)+,R1
   7465	023446					RETURN
	023446	000207 				 RTS	PC
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1108  13-JAN-78 10:41  PAGE 162
$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD

   7467						.TITLE	KLITR -- ASCII-RAD50 CONVERSION
   7468	023450					IDENT$	5,0
						.IDENT	/005000/
   7469					;
   7470					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7471					;
   7472					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7473					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7474					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7475					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7476					;
   7477					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7478					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7479					; EQUIPMENT CORPORATION.
   7480					;
   7481					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7482					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7483					;
   7484					; VERSION 05-00
   7485					;
   7486					; ALAN D. PECKHAM  30-MAR-77
   7487					;
   7488					; MODIFIED BY:
   7489					;
   7490					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED WITH TRANSLATION
   7491					;  OF RAD50 WORDS TO/FROM ASCII STRINGS.
   7492					;
   7493	023450					.PSECT
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1108  13-JAN-78 10:41  PAGE 163
$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD

   7495						.SBTTL	$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD
   7496					;+
   7497					; TRANSLATE 3 OR LESS CHARACTERS POINTED TO BY R5 INTO A RAD50 WORD
   7498					; AND PLACE IT IN R0. IF A CHARACTER IS ENCOUNTERED DURING TRANSLATION
   7499					; WHICH IS NOT ALPHANUMERIC, SPACES ARE SUBSTITUTED FOR THE REMAINING
   7500					; CHARACTERS OF THE THREE. R5 IS INCREMENTED PAST ANY CHARACTERS
   7501					; WHICH WERE ACCEPTED.
   7502					; **NOTE** THIS ROUTINE ONLY TRANSLATES ALPHANUMERIC CHARACTERS, NOT
   7503					; THE FULL RAD50 CHARACTER SET.
   7504					;
   7505					; INPUTS:
   7506					;	R5	- POINTER TO CHARACTERS TO BE USED IN TRANSLATION.
   7507					;
   7508					; OUTPUTS:
   7509					;	R0	- RAD50 WORD CONTAINING CHARACTERS TRANSLATED.
   7510					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS
   7511					;	INSERTED INTO THE RAD50 WORD.
   7512					;-
   7513
   7514	023450				$TRR2B::PUSH	<R2,R1>		; SAVE REGISTERS AND
	023450	010246 				 MOV	R2,-(SP)
	023452	010146 				 MOV	R1,-(SP)
   7515	023454	005000 				CLR	R0		; INITIALIZE RETURN VALUE.
   7516	023456	012702 	000003 			MOV	#3.,R2		; GET 3 CHARACTERS.
   7517	023462	112501 			10$:	MOVB	(R5)+,R1	; PICK UP THE NEXT
   7518	023464	162701 	000100 			SUB	#100,R1		; AND CHECK FOR ALPHAMERIC.
   7519	023470	003404 				BLE	20$
   7520	023472	022701 	000032 			CMP	#32,R1		; WITHIN A-Z ?
   7521	023476	002014 				BGE	50$		; YES, STICK IT IN.
   7522	023500	000406 				BR	30$
   7523	023502	062701 	000020 		20$:	ADD	#<100-60>,R1	; CHECK FOR NUMERIC.
   7524	023506	002403 				BLT	30$
   7525	023510	022701 	000011 			CMP	#9.,R1		; WITHIN 0-9 ?
   7526	023514	002003 				BGE	40$
   7527	023516	005305 			30$:	DEC	R5		; INVALID CHARACTER, IGNORE.
   7528	023520	012701 	177742 			MOV	#-36,R1		; INSERT A NULL.
   7529	023524	062701 	000036 		40$:	ADD	#36,R1		; INCREASE FOR NUMERIC.
   7530	023530	006300 			50$:	ASL	R0		; MULTIPLY BY 50
   7531	023532	006300 				ASL	R0
   7532	023534	006300 				ASL	R0
   7533	023536	060001 				ADD	R0,R1		; WHILE ADDING IN
   7534	023540	006300 				ASL	R0
   7535	023542	006300 				ASL	R0
   7536	023544	060100 				ADD	R1,R0		; THE NEW CHARACTER.
   7537	023546	077233 				SOB	R2,10$		; DO FOR 3 CHARACTERS
   7538	023550					POP	<R1,R2>		; AND...
	023550	012601 				 MOV	(SP)+,R1
	023552	012602 				 MOV	(SP)+,R2
   7539	023554					RETURN
	023554	000207 				 RTS	PC
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1108  13-JAN-78 10:41  PAGE 164
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

   7541						.SBTTL	$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII
   7542					;+
   7543					; TRANSLATE THE RAD50 WORD IN R0 TO AN ASCIZ STRING AND INSERT THE
   7544					; STRING AT THE AREA POINTED TO BY R5. INCREMENT R5 TO POINT PAST
   7545					; THE INSERTED STRING. THE INVALID RAD50 CODE IS REPRESENTED BY
   7546					; THE UNDERLINE CHARACTER. THE BLANK CHARACTER IS NOT INSERTED.
   7547					;
   7548					; INPUTS:
   7549					;	R5	- POINTER TO BYTES TO RECIEVE ASCII STRING.
   7550					;	R0	- RAD50 WORD FROM WHICH TO EXTRACT THE CHARACTERS.
   7551					;
   7552					; OUTPUTS:
   7553					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS
   7554					;	INSERTED.
   7555					;-
   7556
   7557	023556				$TRB2R::PUSH	<R2,R1,R0>
	023556	010246 				 MOV	R2,-(SP)
	023560	010146 				 MOV	R1,-(SP)
	023562	010046 				 MOV	R0,-(SP)
   7558	023564	012702 	000002 			MOV	#2.,R2		; I DON'T UNDERSTAND THIS ROUTINE.
   7559	023570				10$:	PUSH	R0		; BUT IT DEFINITELY WORKS.
	023570	010046 				 MOV	R0,-(SP)
   7560	023572	005000 				CLR	R0
   7561	023574	011601 			20$:	MOV	(SP),R1
   7562	023576	152701 	000002 			BISB	#2,R1
   7563	023602	010146 				MOV	R1,-(SP)
   7564	023604	006016 				ROR	(SP)
   7565	023606	006216 				ASR	(SP)
   7566	023610	162601 				SUB	(SP)+,R1
   7567	023612	042701 	000037 			BIC	#37,R1
   7568	023616	160116 				SUB	R1,(SP)
   7569	023620	006001 				ROR	R1
   7570	023622	006001 				ROR	R1
   7571	023624	160116 				SUB	R1,(SP)
   7572	023626	060100 				ADD	R1,R0
   7573	023630	021627 	000047 			CMP	(SP),#47
   7574	023634	101357 				BHI	20$		; NOTE: CARRY IS CLEAR ON BRANCH.
   7575	023636	006200 				ASR	R0
   7576	023640	006200 				ASR	R0
   7577	023642	006200 				ASR	R0
   7578	023644	077227 				SOB	R2,10$
   7579	023646	012702 	000003 			MOV	#3.,R2
   7580	023652	022700 	000047 			CMP	#47,R0
   7581	023656	103405 				BLO	40$
   7582	023660	105700 				TSTB	R0
   7583	023662	001422 			30$:	BEQ	90$
   7584	023664	122700 	000035 			CMPB	#35,R0
   7585	023670	001002 				BNE	50$
   7586	023672	012700 	000115 		40$:	MOV	#115,R0
   7587	023676	122700 	000033 		50$:	CMPB	#33,R0
   7588	023702	001403 				BEQ	60$
   7589	023704	103404 				BLO	70$
   7590	023706	062700 	000040 			ADD	#40,R0
   7591	023712	062700 	000016 		60$:	ADD	#16,R0
   7592	023716	062700 	000011 		70$:	ADD	#11,R0
   7593	023722	062700 	000011 		80$:	ADD	#11,R0
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1108  13-JAN-78 10:41  PAGE 164-1
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

   7594	023726	110025 				MOVB	R0,(R5)+
   7595	023730				90$:	POP	R0
	023730	012600 				 MOV	(SP)+,R0
   7596	023732	077225 				SOB	R2,30$
   7597	023734					POP	<R1,R2>
	023734	012601 				 MOV	(SP)+,R1
	023736	012602 				 MOV	(SP)+,R2
   7598	023740					RETURN
	023740	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 165
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

   7600						.TITLE	KLITN -- ASCII-KL WORD TRANSLATION
   7601	023742					IDENT$	5,0
						.IDENT	/005000/
   7602					;
   7603					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7604					;
   7605					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7606					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7607					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7608					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7609					;
   7610					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7611					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7612					; EQUIPMENT CORPORATION.
   7613					;
   7614					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7615					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7616					;
   7617					; VERSION 05-00
   7618					;
   7619					; ALAN D. PECKHAM 30-MAR-77
   7620					;
   7621					; MODIFIED BY:
   7622					;
   7623					; FUNCTION: THIS MODULE PROVIDES ROUTINES TO DISPLAY KL ADDRESSES
   7624					;  AND WORDS.
   7625					;
   7626					; LOCAL DATA
   7627					;
   7628	002744					.PSECT	DATA,D
   7629	002744	000000 	000000 	000000 	DTNXP:	.WORD	0,0,0		; WORK AREA TO EXPAND 16K BANK NUMBER.
   7630	002752	000000 	000000 	000000 	DTNRB:	.WORD	0,0,0		; WORK AREA FOR ROLLING BITS AROUND.
   7631	023742					.PSECT
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 166
$TENAD	-- DISPLAY KL ADDRESS/16K

   7633						.SBTTL	$TENAD	-- DISPLAY KL ADDRESS/16K
   7634					;+
   7635					; INSERT THE 22 BIT ASCII REPRESENTATION OF THE ADDRESS/16K CONTAINED
   7636					; IN R0. THE PATTERN IS "XXXXXXXX" WHERE X IS AN OCTAL DIGIT.
   7637					;
   7638					; INPUTS:
   7639					;	R5	- POINTER TO WHERE TO INSERT THE ASCII STRING.
   7640					;	R0	- NUMBER OF 16K MEMORY BANK.
   7641					;
   7642					; OUTPUTS:
   7643					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE INSERTED
   7644					;	CHARACTERS.
   7645					;-
   7646
   7647	023742				$TENAD::PUSH	<R2,R1,R0>
	023742	010246 				 MOV	R2,-(SP)
	023744	010146 				 MOV	R1,-(SP)
	023746	010046 				 MOV	R0,-(SP)
   7648	023750	012701 	002751'			MOV	#DTNXP+5,R1
   7649	023754	105041 				CLRB	-(R1)
   7650	023756	105041 				CLRB	-(R1)
   7651	023760	006000 				ROR	R0		; POSITION AND SET BITS 14-19
   7652	023762	006000 				ROR	R0
   7653	023764	110041 				MOVB	R0,-(R1)
   7654	023766	006000 				ROR	R0		; BITS 20-21
   7655	023770	000300 				SWAB	R0
   7656	023772	110041 				MOVB	R0,-(R1)
   7657	023774	105041 				CLRB	-(R1)
   7658	023776	010100 				MOV	R1,R0
   7659	024000					CALL	$WRD22		; INSERT KL ADDRESS
	024000	004737 	024070'			 JSR	PC,$WRD22
   7660	024004					POP	<R0,R1,R2>
	024004	012600 				 MOV	(SP)+,R0
	024006	012601 				 MOV	(SP)+,R1
	024010	012602 				 MOV	(SP)+,R2
   7661	024012					RETURN
	024012	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 167
$TENAD	-- DISPLAY KL ADDRESS/16K

   7663					;+
   7664					; THE FOLLOWING THREE ROUTINES DISPLAY VARYING AMOUNTS OF A 36 BIT
   7665					; KL WORD POINTED TO BY R0. THEY ALL FOLLOW THE  SAME RULES.
   7666					;
   7667					; INPUTS:
   7668					;	R5	- POINTER TO AREA TO RECIEVE ASCII STRING.
   7669					;	R0	- POINTER TO 36 BIT WORD TO DISPLAY.
   7670					;
   7671					; OUTPUTS:
   7672					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE INSERTED
   7673					;	CHARACTERS.
   7674					;-
   7675
   7676						.SBTTL	$WRD18	-- DISPLAY 18 BIT KL WORD
   7677					;+
   7678					; PATTERN: "XXXXXX"
   7679					;-
   7680
   7681	024014				$WRD18::PUSH	<R2,R1,R0>
	024014	010246 				 MOV	R2,-(SP)
	024016	010146 				 MOV	R1,-(SP)
	024020	010046 				 MOV	R0,-(SP)
   7682	024022					CALL	LTNMV
	024022	004737 	024260'			 JSR	PC,LTNMV
   7683	024026	012702 	000006 			MOV	#6,R2
   7684	024032	012700 	000001 			MOV	#1,R0
   7685	024036				10$:	CALL	LTNROL
	024036	004737 	024304'			 JSR	PC,LTNROL
   7686	024042	116100 	000002 			MOVB	2(R1),R0
   7687	024046					CALL	LTNCHR
	024046	004737 	024320'			 JSR	PC,LTNCHR
   7688	024052	012700 	000003 			MOV	#3,R0
   7689	024056	077211 				SOB	R2,10$
   7690	024060					POP	<R0,R1,R2>
	024060	012600 				 MOV	(SP)+,R0
	024062	012601 				 MOV	(SP)+,R1
	024064	012602 				 MOV	(SP)+,R2
   7691	024066					RETURN
	024066	000207 				 RTS	PC
   7692
   7693						.SBTTL	$WRD22	-- DISPLAY 22 BIT KL WORD
   7694					;+
   7695					; PATTERN: "XXXXXXXX"
   7696					;-
   7697
   7698	024070				$WRD22::PUSH	<R2,R1,R0>
	024070	010246 				 MOV	R2,-(SP)
	024072	010146 				 MOV	R1,-(SP)
	024074	010046 				 MOV	R0,-(SP)
   7699	024076					CALL	LTNMV
	024076	004737 	024260'			 JSR	PC,LTNMV
   7700	024102	012702 	000010 			MOV	#8.,R2
   7701	024106	012700 	000003 			MOV	#3,R0
   7702	024112	042761 	177700 	000002 		BIC	#^C77,2(R1)
   7703	024120				10$:	CALL	LTNROL
	024120	004737 	024304'			 JSR	PC,LTNROL
   7704	024124	116100 	000003 			MOVB	3(R1),R0
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 167-1
$WRD22	-- DISPLAY 22 BIT KL WORD

   7705	024130					CALL	LTNCHR
	024130	004737 	024320'			 JSR	PC,LTNCHR
   7706	024134	012700 	000003 			MOV	#3,R0
   7707	024140	077211 				SOB	R2,10$
   7708	024142					POP	<R0,R1,R2>
	024142	012600 				 MOV	(SP)+,R0
	024144	012601 				 MOV	(SP)+,R1
	024146	012602 				 MOV	(SP)+,R2
   7709	024150					RETURN
	024150	000207 				 RTS	PC
   7710
   7711						.SBTTL	$WRD36	-- DISPLAY 36 BIT KL WORD
   7712					;+
   7713					; PATTERN: "XXXXXX XXXXXX"
   7714					;-
   7715
   7716	024152				$WRD36::PUSH	<R2,R1,R0>
	024152	010246 				 MOV	R2,-(SP)
	024154	010146 				 MOV	R1,-(SP)
	024156	010046 				 MOV	R0,-(SP)
   7717	024160					CALL	LTNMV
	024160	004737 	024260'			 JSR	PC,LTNMV
   7718	024164	012702 	000006 			MOV	#6,R2
   7719	024170	012700 	000007 			MOV	#7,R0
   7720	024174				10$:	CALL	LTNROL
	024174	004737 	024304'			 JSR	PC,LTNROL
   7721	024200	116100 	000005 			MOVB	5(R1),R0
   7722	024204					CALL	LTNCHR
	024204	004737 	024320'			 JSR	PC,LTNCHR
   7723	024210	012700 	000003 			MOV	#3,R0
   7724	024214	077211 				SOB	R2,10$
   7725	024216	112725 	000040 			MOVB	#' ,(R5)+
   7726	024222	012702 	000006 			MOV	#6,R2
   7727	024226				20$:	CALL	LTNROL
	024226	004737 	024304'			 JSR	PC,LTNROL
   7728	024232	116100 	000005 			MOVB	5(R1),R0
   7729	024236					CALL	LTNCHR
	024236	004737 	024320'			 JSR	PC,LTNCHR
   7730	024242	012700 	000003 			MOV	#3,R0
   7731	024246	077211 				SOB	R2,20$
   7732	024250					POP	<R0,R1,R2>
	024250	012600 				 MOV	(SP)+,R0
	024252	012601 				 MOV	(SP)+,R1
	024254	012602 				 MOV	(SP)+,R2
   7733	024256					RETURN
	024256	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 168
$WRD36	-- DISPLAY 36 BIT KL WORD

   7735					;+
   7736					; INSERT 36 BIT WORD INTO WORD-ALIGNED WORK AREA.
   7737					;
   7738					; INPUTS:
   7739					;	R0	- POINTER TO 36 BIT WORD TO COPY.
   7740					;
   7741					; OUTPUTS:
   7742					;	R1	- POINTER TO COPY OF 36 BIT WORD POINTED TO BY R0.
   7743					;	R0 AND R2 ARE DESTROYED.
   7744					;-
   7745
   7746	024260	012702 	000006 		LTNMV:	MOV	#6,R2		; MOVE 6 BYTES
   7747	024264	012701 	002752'			MOV	#DTNRB,R1
   7748	024270	112021 			10$:	MOVB	(R0)+,(R1)+	; MOVE DATA TO BE CONVERTED
   7749	024272	077202 				SOB	R2,10$
   7750	024274	042741 	177760 			BIC	#^C17,-(R1)	; ONLY 36 BITS PLEASE
   7751	024300	024141 				CMP	-(R1),-(R1)
   7752	024302					RETURN
	024302	000207 				 RTS	PC
   7753
   7754					;+
   7755					; SHIFT 3 WORDS AT R1 TO THE LEFT BY THE NUMBER OF BITS SPECIFED.
   7756					;
   7757					; INPUTS:
   7758					;	R1	- POINTER TO THE THREE WORDS TO SHIFT.
   7759					;	R0	- NUMBER OF TIMES TO SHIFT. MUST BE >0.
   7760					;
   7761					; OUTPUTS:
   7762					;	R0 IS DESTROYED.
   7763					;-
   7764
   7765	024304	006321 			LTNROL:	ASL	(R1)+
   7766	024306	006121 				ROL	(R1)+
   7767	024310	006111 				ROL	(R1)
   7768	024312	024141 				CMP	-(R1),-(R1)
   7769	024314	077005 				SOB	R0,LTNROL
   7770	024316					RETURN
	024316	000207 				 RTS	PC
   7771
   7772					;+
   7773					; INSERT 3 LEAST SIGNIFICANT BITS FROM R0 AS ASCII CHARACTER TO BYTE
   7774					; POINTED TO BY R5 AND INCREMENT R5.
   7775					;
   7776					; INPUTS:
   7777					;	R5	- POINTER TO BYTE TO RECIEVE DIGIT.
   7778					;	R0	- NUMBER TO PICK BOTTOM OCTAL DIGIT FROM.
   7779					;
   7780					; OUTPUTS:
   7781					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE INSERTED
   7782					;	CHARACTER. R0 IS DESTROYED.
   7783					;-
   7784
   7785	024320	042700 	177770 		LTNCHR:	BIC	#^C7,R0
   7786	024324	062700 	000060 			ADD	#'0,R0
   7787	024330	110025 				MOVB	R0,(R5)+
   7788	024332					RETURN
	024332	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 169
$WRD36	-- DISPLAY 36 BIT KL WORD

   7790
   7791		000000'				.END	$START
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 169-1
SYMBOL TABLE

AAX   = 000020   	DCBFNM  001162R     002	DF.KLR= 000012   	DRESET= 000100   	DXTRNM  001652R     002
ADD   = 000270   	DCFCFN  001114R     002	DF.KLW= 000013   	DRSCEN  001532R     002	DXTSI   001672R     002
APR   = 000000   	DCFLFN  001134R     002	DF.KLX= 000014   	DRSPEN  001544R     002	DXTSI1  001665R     002
A.LULU= 000002   	DCFRJT  001154R     002	DF.OFF= 000002   	DRSPFR  001551R     002	DXTSX2  001633R     002
A.LUNA= 000004   	DCOMST= 000001   	DF.ON = 000003   	DRSPLD  001537R     002	DXWRD1= 002000
A.LUNU= 000006   	DDCDAI  000526R     002	DF.PDP= 000016   	DRTBF   000136R     002	D.MAL = 000020 G
BIT0  = 000001   	DDCDAO  000542R     002	DF.PEX= 000015   	DRTBUF  000026R     002	D.MA20= 000000
BIT1  = 000002   	DDCWAT  000562R     002	DGCFNM  001054R     002	DRTDTE  000322R  	D1011 = 000040
BIT10 = 002000   	DDDDEL  000174R     002	DGMFNM  001074R     002	DRTSTA  000022R     002	EBSEL = 000100
BIT11 = 004000   	DDDFNA  000144R     002	DIAG1 = 174430   	DRTWLB  000000R     002	EBUSPC= 000020
BIT12 = 010000   	DDDRNA  000212R     002	DIAG2 = 174432   	DR.DTE= 000011   	EBUSPS= 000004
BIT13 = 020000   	DDLACR  000300R     002	DIAG3 = 174436   	DSBA16  002723R     002	EDONES= 040000
BIT14 = 040000   	DDLFNA  000250R     002	DIKL10= 000010   	DSBA17  002726R     002	ED.PHY= 000200
BIT15 = 100000   	DDLGLN  000242R     002	DLDTYP= 002426R     002	DSBBF   002736R     002	EF.PR1= ****** GX
BIT2  = 000004   	DDLRAT  000356R     002	DLRBTC  001764R     002	DSBDI   002731R     002	EPTR  = 000000
BIT3  = 000010   	DDLRNA  000326R     002	DLRCT   001722R     002	DSBRSB  002716R     002	ERR10C= 010000
BIT4  = 000020   	DDNACE  000452R     002	DLRCT0= 001722R     002	DSEND = 000004   	ERR10S= 020000
BIT5  = 000040   	DDNCRE  000376R     002	DLRCT1= 001723R     002	DSMAC1  002411R     002	ERR11C= 000001
BIT6  = 000100   	DDNDEL  000500R     002	DLRLGL  001744R     002	DSMBF   002404R     002	ERR11S= 000002
BIT7  = 000200   	DDNENA  000422R     002	DLROFT  001724R     002	DSMPGM  002352R     002	FM    = 000010
BIT8  = 000400   	DDNGLN  000370R     002	DLR0    002352R     002	DSMSD0  002355R     002	FORPRO= 000020
BIT9  = 001000   	DDNRAT  000514R     002	DLR128  002030R     002	DSMSD1  002362R     002	FS    = 000001
BLKI  = 000000   	DDPDAI  000600R     002	DLR16   002326R     002	DSTBF   001524R     002	F.TRCK= 000000
BLKO  = 000002   	DDPDAO  000630R     002	DLR192  002016R     002	DSTCEN  001500R     002	G.APL = 000020 G
BPARER= 000020   	DDPDEL  000614R     002	DLR256  002004R     002	DSTRT   001454R     002	G.LUBA= 000004
BY$$0 = 000000   	DDPRNA  000644R     002	DLR32   002237R     002	DSTRTL= 000004   	G.LUCW= 000004
BY$$1 = 000000   	DEP   = 010000   	DLR48   002225R     002	DST1B0  001505R     002	G.LUFB= 000003
BY$$2 = 000000   	DEX   = 000400   	DLR64   002124R     002	DST1B1  001512R     002	G.LULU= 000002
BY$$3 = 000000   	DEXDON= 000004   	DLR96   002100R     002	DST3B1  001517R     002	G.LUNA= 000000
BY$$4 = 000000   	DEXWD1= 174406   	DLTNXB  001720R     002	DS04  = 004000   	G.LUNU= 000002
CCA   = 000014   	DEXWD2= 174404   	DLYCNT= 174400   	DS05  = 002000   	HIBYTE= 177400
CDD   = 000020   	DEXWD3= 174402   	DM    = 000002   	DS06  = 001000   	HRR   = 000540
CHNPNT= 000001   	DFCABF  001311R     002	DMRBF   002710R     002	DTECMD= 000451   	IE.DFU= ****** GX
CM    = 000004   	DFCBF   001302R     002	DMRMMR  002670R     002	DTEFLG= 000444   	IE.EBX= ****** GX
CNUPE = 000002   	DFCFL2  001307R     002	DMRMRT  002576R     002	DTEF11= 000450   	IE.EOF= ****** GX
CONO  = 000004   	DFCFL3  001310R     002	DMRSRL= 000005   	DTEMTD= 000455   	IE.NSF= ****** GX
CR    = 000015   	DFCRFL  001262R     002	DMRSRT  002676R     002	DTEMTI= 000456   	IFLOP = 100000
CS.EXP= 177670   	DFCWFL  001272R     002	DNILPO  000714R     002	DTNRB   002752R     002	INTROF= 000010
CTLS  = 000040   	DFDABF  001323R     002	DNISYF  000744R     002	DTNXP   002744R     002	INTRON= 000040
CYCLS = 000002   	DFDDBF  001316R     002	DNISYI  000724R     002	DUPE  = 000020   	INTSON= 000001
C.ACHE= 000000   	DFEAD   002564R     002	DNISYO  000734R     002	DURE  = 000004   	INT10S= 000400
DATAI = 000001   	DFEBF   002570R     002	DNITTI  000674R     002	DXBADR  001434R     002	INT11C= 002000
DATAO = 000003   	DFEDPB  002540R     002	DNITTO  000704R     002	DXBCNM  001446R     002	INT11S= 004000
DATE  = 000004   	DFEEXB  002552R     002	DON10C= 040000   	DXBDAT  001440R     002	IO.ACE= ****** GX
DCAPGM  001331R     002	DFRRDB  002462R     002	DON10S= 100000   	DXBFNM  001414R     002	IO.ACR= ****** GX
DCARCA  001346R     002	DFUNC = 000200   	DON11C= 000100   	DXCAD   002442R     002	IO.CRE= ****** GX
DCARFL  001407R     002	DFWBF   002520R     002	DON11S= 000200   	DXCBF   002447R     002	IO.DAC= ****** GX
DCASIA  001341R     002	DFWEDB  002506R     002	DPDTYP  002414R     002	DXCBRC  002454R     002	IO.DEL= ****** GX
DCAWRF  001372R     002	DFWWDB  002474R     002	DPS4  = 040000   	DXTAC1  001657R     002	IO.ENA= ****** GX
DCBADR  001202R     002	DFXXDB  002526R     002	DPTAC1  001564R     002	DXTAC2  001662R     002	IO.FNA= ****** GX
DCBAPR  001254R     002	DF.DMG= 000004   	DPTBF   001557R     002	DXTAD   001712R     002	IO.RNA= ****** GX
DCBA17  001251R     002	DF.DMN= 000007   	DPTPGM  001554R     002	DXTBF   001677R     002	IO.RVB= ****** GX
DCBBF   001244R     002	DF.DOR= 000001   	DQMORD  001012R     002	DXTDP0  001645R     002	IO.WLB= ****** GX
DCBCBF  001222R     002	DF.EHG= 000010   	DQSAPR  001004R     002	DXTEX0  001640R     002	IO.WVB= ****** GX
DCBCNT  001220R     002	DF.EHM= 000011   	DQSCBF  000754R     002	DXTFLG  001704R     002	I.MEM = 000000
DCBDAT  001204R     002	DF.EMG= 000005   	DQSCF3  000770R     002	DXTJRS  001626R     002	I.10L = 000005
DCBDBF  001236R     002	DF.EMN= 000006   	DQSFLG  001011R     002	DXTPSW  001717R     002	JRST  = 000254
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 169-2
SYMBOL TABLE

JUMPE = 000322   	LLTFHL  015500R  	PSWW13= 000017   	TDWWRE  000137R     003	TQCCEN  001024R     003
KLI$$E= 000007   	LMRDFN  022640R  	PSWW2 = 000006   	TENAD1= 174410   	TQCSYN  001070R     003
KLI$$F= 000102   	LOAD11= 000004   	PSWW3 = 000007   	TENAD2= 174412   	TQESYN  002115R     003
KLI$$K= 000126   	LPOLUN= 000003   	PSWW4 = 000010   	TFEDFL  004542R     003	TQEXIT  002071R     003
KLI$$V= 000006   	LQCCM   004174R  	PSWW5 = 000011   	TFEEFL  004563R     003	TQMCFG  001115R     003
KLPWRF= 000010   	LQMADJ  004772R  	PSWW6 = 000012   	TFREMS  004453R     003	TQMCTE  001261R     003
KL.CFL= ****** GX	LQMMD   005006R  	PSWW7 = 000013   	TFWEMS  004474R     003	TQMCTN  001211R     003
KL.CFM= ****** GX	LQMSAT  005314R  	PULSE = 000020   	TFXEMS  004516R     003	TQMI2H  001574R     003
KL.LCA= ****** GX	LQSBPS  003550R  	QSIZE = 000023   	TGCNFL  002142R     003	TQMMCE  001521R     003
KL.LVB= ****** GX	LQSHDW  003574R  	Q.IOAE= 000012   	TGMBFL  002261R     003	TQMMDE  001447R     003
KL.SPF= ****** GX	LQSHWO  003712R  	Q.IOEF= 000006   	TGMNFL  002211R     003	TQMMOD  001374R     003
KL.VBD= ****** GX	LRSTKL  013664R  	Q.IOFN= 000002   	TLDHD   004145R     003	TQMNEM  001337R     003
KL.VBN= ****** GX	LSMSBD  016766R  	Q.IOLU= 000004   	TLDHDL= 000135   	TQMSYN  001164R     003
LCARPT  012520R  	LTNCHR  024320R  	Q.IOPL= 000014   	TLDNME  004302R     003	TQSDLG  000671R     003
LCBCRM  007560R  	LTNMV   024260R  	Q.IOPR= 000007   	TLDNTP  004325R     003	TQSSYN  000732R     003
LCBDRM  007732R  	LTNROL  024304R  	Q.IOSB= 000010   	TLDT01  004340R     003	TQXINT  001644R     003
LCBFL   010142R  	LXBRC   013014R  	RAMIS0= 010000   	TLDT02  004353R     003	TQXI2H  001727R     003
LCBRC   007464R  	LXB5B   012772R  	RFMAD0= 100000   	TLDT03  004366R     003	TQXSYN  001702R     003
LCBRME  010066R  	LXTDPM  014740R  	RFMAD1= 040000   	TLTIDM  003466R     003	TRSPRF  003112R     003
LCBVR   010174R  	LXTMI   014430R  	RFMAD2= 020000   	TLTNM0  003527R     003	TRSRSM  003146R     003
LCB3W   007434R  	LXTMN   014512R  	RFMAD3= 010000   	TLT2MG  003564R     003	TRTBTF  000036R     003
LCB6W   007442R  	LXTMT   014540R  	RM    = 000010   	TMRMFL  004604R     003	TRTMMF  000000R     003
LCFCPY  006704R  	LXTMTP  014652R  	RULNG = 000005   	TNINDV  000471R     003	TSMMI1  003617R     003
LCFERR  007102R  	LXTMTR  014546R  	SCD   = 000040   	TNIN55  000516R     003	TSTBSM  003055R     003
LCFNXT  006652R  	LXTSDP  015126R  	SETZ  = 000400   	TNIPRI  000554R     003	TTILUN= 000001
LCFPRG  007076R  	LXTSEX  015014R  	SPC   = 000040   	TNIVER  000640R     003	TTOLUN= 000002
LCFRCA  006756R  	MOVE  = 000200   	STAT  = 174434   	TOBM  = 000004   	TXBIMM  003011R     003
LCFREF  006774R  	MOVEM = 000202   	STATUS= 000022   	TOD   = 000003   	TXCHLE  004401R     003
LCFRMM  006676R  	MPE11 = 001000   	STPKL   020740R  	TOIP  = 000002   	TXCSFL  004431R     003
LCFRTN  007074R  	MXTYP = 000002   	SWR   = 177570   	TOIT  = 000001   	TXDHD   004073R     003
LCFSKP  006764R  	M.A20 = 000000   	SWSLLT= 100000   	TO10  = 000200   	TXDHL = 000052
LCFWCA  007242R  	M.B20 = 000000   	SXCT  = 000106   	TO10AD= 174420   	TXTPER  003267R     003
LCFWEF  007116R  	NULSTP= 000040   	SYFLUN= 000006   	TO10BC= 174414   	TXTPRF  003370R     003
LCFWMM  007140R  	NUPE  = 000002   	SYILUN= 000004   	TO10BM= 000001   	TXT2MG  003235R     003
LCTL  = 000037   	PAG   = 000010   	SYOLUN= 000005   	TO10DB= 000400   	T.TIL = 000040 G
LDEIDV  003000R  	PAGE  = 001000   	S.YIL = 001000 G 	TO10DN= 100000   	T.TOL = 000111 G
LDRER   002026R  	PERCLR= 001000   	S.YOL = 001000 G 	TO10DT= 174424   	T.YPL = 000005 G
LDWER   002270R  	PGBTS = 000777   	TAB   = 000011   	TO10ER= 020000   	UNASG1= 000032
LF    = 000012   	PHYS  = 100000   	TCAACD  002771R     003	TO11  = 000100   	UNASG2= 000033
LFCSAB  011340R  	PI    = 000004   	TCAACE  002720R     003	TO11AD= 174422   	UNASG3= 000034
LFDWFN  011524R  	PIDENT= 000000   	TCACEF  002672R     003	TO11BC= 174416   	UNASG4= 000035
LFECKN  022370R  	PRI7  = 000340   	TCASCE  002743R     003	TO11BM= 020000   	UNASG5= 000036
LFEMVA  022344R  	PROPNT= 000021   	TCBDCW  002430R     003	TO11DB= 004000   	UNASG6= 000037
LFWCKF  021730R  	PRTOFF= 004000   	TCBDDW  002462R     003	TO11DN= 000200   	WEP   = 000010
LLDCT   020236R  	PR0   = 000000   	TCBMLF  002514R     003	TO11DT= 174426   	W.10L = 000005
LLDEX   017700R  	PR1   = 000040   	TCBMVF  002544R     003	TO11ER= 000002   	X.MEM = 000000
LLDGP   017764R  	PR2   = 000100   	TCBMVL  002576R     003	TPDHD   003670R     003	ZSTOP = 040000
LLDIL   020300R  	PR3   = 000140   	TCBMVV  002633R     003	TPDHL1= 000067   	$ACRAM  011232RG
LLDIN   020022R  	PR4   = 000200   	TCFCFA  002334R     003	TPDHL2= 000115   	$ADRAM  011750RG
LLDLP   017540R  	PR5   = 000240   	TCFCFE  002367R     003	TPDNTP  004005R     003	$ASCIZ  000412RG
LLDPR   020320R  	PR6   = 000300   	TDEDFU  000444R     003	TPDT01  004031R     003	$BURST  021310RG
LLDSZ   020200R  	PR7   = 000340   	TDEDR   000212R     003	TPDT02  004043R     003	$CD11 = 000001
LLRALC  016070R  	PS    = 177776   	TDEIO   000304R     003	TPDT03  004061R     003	$CFGBT  000150RG
LLRFND  016324R  	PSWW1 = 000005   	TDENSF  000370R     003	TPTNPC  003163R     003	$CFGCA  000022RG
LLRNXH  015736R  	PSWW10= 000014   	TDRRDE  000066R     003	TQBOOT  001777R     003	$CFGMM  000066RG
LLRULE  015764R  	PSWW11= 000015   	TDRRLE  000103R     003	TQBSYN  002044R     003	$CFGRM  000010RG
LLTFGP  015606R  	PSWW12= 000016   	TDWRLE  000155R     003	TQCACH  000757R     003	$CLOSE  001334RG
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1108  13-JAN-78 10:41  PAGE 169-3
SYMBOL TABLE

$DBDTE= 000001   	$PURGE  001472RG 	$WRITC  002172RG 	.DSACF= 066000   	.PCAB4= 153000
$DELET  000640RG 	$RCRAM  010630RG 	$WRITE  002440RG 	.DSIOJ= 065000   	.RCRM1= 147000
$DFRD   021502RG 	$RDRAM  011540RG 	$WRITS  002234RG 	.DTEDT  000730RG    004	.RCRM2= 146000
$DFWR   021610RG 	$READ   002042RG 	$WRITW  002304RG 	.EASW   000034RG    004	.RCRM3= 145000
$DFXC   022006RG 	$READB  001766RG 	$WTKL   020624RG 	.EIOJA= 067000   	.RCRM4= 144000
$DH11 = 000001   	$READC  001564RG 	$ZERAC= ****** GX	.FEMOD= ****** GX	.RCSPF= 141000
$DLGBT  005536RG 	$READS  001622RG 	$$    = 000037   	.GAPSZ  000364RG    004	.RDJ14= 134000
$DLGCA  004016RG 	$READW  001672RG 	$$$ARG= 000006   	.GAPTB  000366RG    004	.RDJ71= 135000
$DLGCT  004540RG 	$REPLT  017522RG 	$$$OST= 000010   	.GFNR = 102000   	.RDMAB= 133000
$DLGEN  003350RG 	$REPPT  017074RG 	$$$T1 = 000014   	.HOLE   003274RG    004	.SECLK= 003000
$DLGEX  005712RG 	$REPXT  017372RG 	.BRCLK= 005000   	.ILMAX  000055RG    004	.SETMR= 007000
$DLGIL  005374RG 	$RP04 = 000001   	.BTADR  001124RG    004	.ILMIN  000056RG    004	.SETRN= 011000
$DLGMM  004352RG 	$RSAVE  000356RG 	.CACHN  000041RG    004	.INICL= 070000   	.SSCLK= 002000
$DLGRM= ****** GX	$RX11 = 000001   	.CASW   000033RG    004	.IRLTC= 014000   	.STPCL= 000000
$DPOS   022136RG 	$SBDG   022754RG 	.CATIF  000666RG    004	.KLISV  000036RG    004	.STRCL= 001000
$DSPPT  000050RG 	$SBMR   023074RG 	.CATTB  000466RG    004	.KLIWD= ****** GX	.SYATT  003256RG    004
$DSW  = ****** GX	$SETCA  012122RG 	.CECLK= 004000   	.KLREG  000672RG    004	.SYFID= 003224RG    004
$DTE  = 000001   	$SETFN  000730RG 	.CKSW   000031RG    004	.LCRDL= 052000   	.SYFNB  003224RG    004
$DTRWS  000304RG 	$SETLT  015232RG 	.CLRMR= 006000   	.LCRDR= 051000   	.SYFNM= 003232RG    004
$DTRW1  000266RG 	$SETMM  016472RG 	.CLRUN= 010000   	.LCRM1= 057000   	.SYIBA  001142RG    004
$DTRW2  000274RG 	$SETPT  013762RG 	.COMEF= ****** GX	.LCRM2= 056000   	.SYIBC  001144RG    004
$DTRW3  000314RG 	$SETXT  014216RG 	.CONBT= 012000   	.LCRM3= 055000   	.SYIBF  001172RG    004
$ENTER  001144RG 	$START  000000RG 	.CSHRG= 164000   	.LCRM4= 054000   	.SYIFN  001146RG    004
$ERROR  000242RG 	$STRKL  020434RG 	.CTLMD  000121RG    004	.LCRM5= 053000   	.SYIRC  001140RG    004
$EXAM   022240RG 	$SWEEP  012632RG 	.CTLSW  000221RG    004	.LDAR = 077000   	.SYISW  001136RG    004
$EXBLD  012674RG 	$TENAD  023742RG 	.CTLTP  000061RG    004	.LDBRL= 043000   	.SYIVB  001166RG    004
$EXCT   020344RG 	$TENST  013310RG 	.CTLUS  000161RG    004	.LDBRR= 042000   	.SYOBA  002174RG    004
$EXIT   000252RG 	$TOP20= 000001   	.DATE3= ****** GX	.LDCK1= 046000   	.SYOBC  002176RG    004
$EXTEN= ****** GX	$TRACK  000424RG 	.DBSW   000027RG    004	.LDCK2= 047000   	.SYOBF  002224RG    004
$FE   = 000001   	$TRB2F= ****** GX	.DCSW   000025RG    004	.LDDIS= 045000   	.SYOFN  002200RG    004
$FILE   006572RG 	$TRB2I  023266RG 	.DESW   000032RG    004	.LDRJD= 064000   	.SYORC  002172RG    004
$FILHL  015732RG 	$TRB2O  023130RG 	.DFBLK  000704RG    004	.LDRJV= 063000   	.SYOSW  001137RG    004
$F11  = 000001   	$TRB2R  023556RG 	.DFRBK  000712RG    004	.LDRM1= 060000   	.SYOVB  002220RG    004
$GETCA  006032RG 	$TRF2B= ****** GX	.DFRG1  000720RG    004	.LDRM2= 061000   	.SYSTA  001132RG    004
$GETMM  006232RG 	$TRI2B  023362RG 	.DFRG2  000722RG    004	.LDRM3= 062000   	.TRKSW  000030RG    004
$INIT   003024RG 	$TRO2B  023212RG 	.DFRG3  000726RG    004	.LDSEL= 044000   	.TTIBF  000732RG    004
$IOERR  002610RG 	$TRR2B  023450RG 	.DFSTA  000724RG    004	.LTBEX  000057RG    004	.TTOBF  000772RG    004
$KLMR   022452RG 	$TTMSG= ****** GX	.DFWBK  000704RG    004	.LTBIN  000060RG    004	.TYPTB  000046RG    004
$KLSR   022674RG 	$TTRD = ****** GX	.DLGSW  000022RG    004	.MEMRS= 076000   	.UFNSW  000023RG    004
$LDAR   020704RG 	$TTWR = ****** GX	.DMASZ  000262RG    004	.MINT   000054RG    004	.USRFN  001104RG    004
$LDNGO= ****** GX	$WCRAM  010350RG 	.DMATB  000264RG    004	.NCACH  000040RG    004	.WORK   000014RG    004
$LOOKU  000772RG 	$WDRAM  011360RG 	.DMSW   000026RG    004	.NOERR= ****** GX	.WRMBX= 071000
$LP20 = 000001   	$WRD18  024014RG 	.DREG   000720RG    004	.PCAB1= 150000   	.ZERO   000000RG    004
$MBPHS  021142RG 	$WRD22  024070RG 	.DRLTC= 015000   	.PCAB2= 151000   	..DTP2= ****** GX
$MCBLD  007330RG 	$WRD36  024152RG 	.DRSW   000024RG    004	.PCAB3= 152000   	..DTSP= ****** GX
$POWER  013574RG 	$WRITB  002400RG

. ABS.	000000	   000
      	024334	   001
DATA  	002760	   002
TEXT  	004632	   003
GLBL  	003300	   004
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  12496 WORDS  ( 49 PAGES)
DYNAMIC MEMORY:  13664 WORDS  ( 52 PAGES)
ELAPSED TIME:  00:14:55
,[50,20]BIGKLINIT/CRF/-SP=[20,30]RSXFC/PA:1,[50,30]KLINIT.TMP
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

AAX   	= 000020	#96-4388   
ADD   	= 000270	#102-4699   102-4712   102-4712  
APR   	= 000000	#72-3187    72-3205    72-3205   #88-3972    88-3994    88-3994   #92-4192    92-4206    92-4206   
                        #96-4389    96-4402    96-4402   #104-4841   104-4855   104-4855  
A.LULU	= 000002	#44-1894   #44-1895   #44-1897   #44-1899   #44-1900   #44-1901   
A.LUNA	= 000004	#44-1894   #44-1895   #44-1897   #44-1899   #44-1900   #44-1901   
A.LUNU	= 000006	#44-1894   #44-1895   #44-1897   #44-1899   #44-1900   #44-1901   
BIT0  	= 000001	#3-104      48-2077    96-4395   
BIT1  	= 000002	#3-104      96-4393   
BIT10 	= 002000	#3-104     
BIT11 	= 004000	#3-104     
BIT12 	= 010000	#3-104     
BIT13 	= 020000	#3-104     
BIT14 	= 040000	#3-104     
BIT15 	= 100000	#3-104      25-1095    27-1180    27-1182    75-3319    151-7050   151-7051   151-7058   151-7062  
                         151-7063  
BIT2  	= 000004	#3-104      96-4391   
BIT3  	= 000010	#3-104      96-4394   
BIT4  	= 000020	#3-104      96-4388   
BIT5  	= 000040	#3-104      48-2080   
BIT6  	= 000100	#3-104      48-2083   
BIT7  	= 000200	#3-104     
BIT8  	= 000400	#3-104     
BIT9  	= 001000	#3-104     
BLKI  	= 000000	#72-3188    72-3205    72-3205   
BLKO  	= 000002	#88-3973    88-3994    88-3994   #102-4700   102-4714   102-4714  #119-5702   119-5712   119-5712  
                        #153-7178   153-7187   153-7187  
BPARER	= 000020	#3-104     
BY$$0 	= 000000	#9-380      9-380      9-380     #9-380      9-380     #46-2000    46-2000    46-2000   #46-2000   
                         46-2000   #72-3203    72-3203    72-3203   #72-3203    72-3203   #72-3204    72-3204    72-3204   
                        #72-3204    72-3204    72-3204   #72-3204    72-3204   #72-3205    72-3205    72-3205   #72-3205   
                         72-3205    72-3205   #72-3205    72-3205   #80-3542    80-3542    80-3542   #80-3542    80-3542   
                        #80-3545    80-3545    80-3545   #80-3545    80-3545   #84-3784    84-3784    84-3784   #84-3784   
                         84-3784   #84-3785    84-3785    84-3785   #84-3785    84-3785   #88-3988    88-3988    88-3988   
                        #88-3988    88-3988   #88-3989    88-3989    88-3989   #88-3989    88-3989   #88-3990    88-3990   
                         88-3990   #88-3990    88-3990   #88-3991    88-3991    88-3991   #88-3991    88-3991   #88-3992   
                         88-3992    88-3992   #88-3992    88-3992   #88-3993    88-3993    88-3993   #88-3993    88-3993   
                        #88-3994    88-3994    88-3994   #88-3994    88-3994   #88-3995    88-3995    88-3995   #88-3995   
                         88-3995   #92-4206    92-4206    92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206   
                         92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206   
                        #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   
                        #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   
                        #96-4402    96-4402   #96-4403    96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403   
                         96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403   
                         96-4403   #96-4404    96-4404    96-4404   #96-4404    96-4404   #96-4405    96-4405    96-4405   
                        #96-4405    96-4405   #96-4408    96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408   
                         96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408   
                         96-4408    96-4408   #96-4408    96-4408   #96-4410    96-4410    96-4410   #96-4410    96-4410   
                        #96-4411    96-4411    96-4411   #96-4411    96-4411   #96-4412    96-4412    96-4412   #96-4412   
                         96-4412   #96-4414    96-4414    96-4414   #96-4414    96-4414   #98-4539    98-4539    98-4539   
                        #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   
                        #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   #98-4539    98-4539   #98-4541   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         98-4541    98-4541   #98-4541    98-4541   #98-4542    98-4542    98-4542   #98-4542    98-4542   
                         98-4542   #98-4542    98-4542   #98-4543    98-4543    98-4543   #98-4543    98-4543    98-4543   
                        #98-4543    98-4543   #102-4709   102-4709   102-4709  #102-4709   102-4709  #102-4710   102-4710  
                         102-4710  #102-4710   102-4710  #102-4711   102-4711   102-4711  #102-4711   102-4711  #102-4712  
                         102-4712   102-4712  #102-4712   102-4712  #102-4713   102-4713   102-4713  #102-4713   102-4713  
                        #102-4714   102-4714   102-4714  #102-4714   102-4714  #102-4715   102-4715   102-4715  #102-4715  
                         102-4715  #104-4851   104-4851   104-4851  #104-4851   104-4851  #104-4852   104-4852   104-4852  
                        #104-4852   104-4852  #104-4853   104-4853   104-4853  #104-4853   104-4853  #104-4854   104-4854  
                         104-4854  #104-4854   104-4854  #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  
                        #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  
                        #104-4855   104-4855  #104-4856   104-4856   104-4856  #104-4856   104-4856  #104-4857   104-4857  
                         104-4857  #104-4857   104-4857  #104-4858   104-4858   104-4858  #104-4858   104-4858  #104-4859  
                         104-4859   104-4859  #104-4859   104-4859  #104-4860   104-4860   104-4860  #104-4860   104-4860  
                        #104-4861   104-4861   104-4861  #104-4861   104-4861  #104-4863   104-4863   104-4863  #104-4863  
                         104-4863  #119-5710   119-5710   119-5710  #119-5710   119-5710  #119-5711   119-5711   119-5711  
                        #119-5711   119-5711  #119-5712   119-5712   119-5712  #119-5712   119-5712  #119-5713   119-5713  
                         119-5713  #119-5713   119-5713  #119-5715   119-5715   119-5715  #119-5715   119-5715  #119-5716  
                         119-5716   119-5716  #119-5716   119-5716  #131-6372   131-6372   131-6372  #131-6372   131-6372  
                        #131-6373   131-6373   131-6373  #131-6373   131-6373  #131-6374   131-6374   131-6374  #131-6374  
                         131-6374  #141-6753   141-6753   141-6753  #141-6753   141-6753  #146-6918   146-6918   146-6918  
                        #146-6918   146-6918  #146-6920   146-6920   146-6920  #146-6920   146-6920  #151-7068   151-7068  
                         151-7068  #151-7068   151-7068   151-7068  #151-7068   151-7068  #151-7077   151-7077   151-7077  
                        #151-7077   151-7077  #153-7184   153-7184   153-7184  #153-7184   153-7184   153-7184  #153-7184  
                         153-7184   153-7184  #153-7184   153-7184   153-7184  #153-7184   153-7184  #153-7185   153-7185  
                         153-7185  #153-7185   153-7185   153-7185  #153-7185   153-7185  #153-7186   153-7186   153-7186  
                        #153-7186   153-7186   153-7186  #153-7186   153-7186  #153-7187   153-7187   153-7187  #153-7187  
                         153-7187   153-7187  #153-7187   153-7187  #153-7188   153-7188   153-7188  #153-7188   153-7188  
BY$$1 	= 000000	#9-380      9-380      9-380     #9-380      9-380     #46-2000    46-2000    46-2000   #46-2000   
                         46-2000   #72-3203    72-3203    72-3203   #72-3203    72-3203   #72-3204    72-3204    72-3204   
                        #72-3204    72-3204    72-3204   #72-3204    72-3204   #72-3205    72-3205    72-3205   #72-3205   
                         72-3205    72-3205   #72-3205    72-3205   #80-3542    80-3542    80-3542   #80-3542    80-3542   
                        #80-3545    80-3545    80-3545   #80-3545    80-3545   #84-3784    84-3784    84-3784   #84-3784   
                         84-3784   #84-3785    84-3785    84-3785   #84-3785    84-3785   #88-3988    88-3988    88-3988   
                        #88-3988    88-3988   #88-3989    88-3989    88-3989   #88-3989    88-3989   #88-3990    88-3990   
                         88-3990   #88-3990    88-3990   #88-3991    88-3991    88-3991   #88-3991    88-3991   #88-3992   
                         88-3992    88-3992   #88-3992    88-3992   #88-3993    88-3993    88-3993   #88-3993    88-3993   
                        #88-3994    88-3994    88-3994   #88-3994    88-3994   #88-3995    88-3995    88-3995   #88-3995   
                         88-3995   #92-4206    92-4206    92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206   
                         92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206    92-4206   #92-4206    92-4206   
                        #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   
                        #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   #96-4402    96-4402    96-4402   
                        #96-4402    96-4402   #96-4403    96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403   
                         96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403    96-4403    96-4403   #96-4403   
                         96-4403   #96-4404    96-4404    96-4404   #96-4404    96-4404   #96-4405    96-4405    96-4405   
                        #96-4405    96-4405   #96-4408    96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408   
                         96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408    96-4408    96-4408   #96-4408   
                         96-4408    96-4408   #96-4408    96-4408   #96-4410    96-4410    96-4410   #96-4410    96-4410   
                        #96-4411    96-4411    96-4411   #96-4411    96-4411   #96-4412    96-4412    96-4412   #96-4412   
                         96-4412   #96-4414    96-4414    96-4414   #96-4414    96-4414   #98-4539    98-4539    98-4539   
                        #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   
                        #98-4539    98-4539    98-4539   #98-4539    98-4539    98-4539   #98-4539    98-4539   #98-4541   
                         98-4541    98-4541   #98-4541    98-4541   #98-4542    98-4542    98-4542   #98-4542    98-4542   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         98-4542   #98-4542    98-4542   #98-4543    98-4543    98-4543   #98-4543    98-4543    98-4543   
                        #98-4543    98-4543   #102-4709   102-4709   102-4709  #102-4709   102-4709  #102-4710   102-4710  
                         102-4710  #102-4710   102-4710  #102-4711   102-4711   102-4711  #102-4711   102-4711  #102-4712  
                         102-4712   102-4712  #102-4712   102-4712  #102-4713   102-4713   102-4713  #102-4713   102-4713  
                        #102-4714   102-4714   102-4714  #102-4714   102-4714  #102-4715   102-4715   102-4715  #102-4715  
                         102-4715  #104-4851   104-4851   104-4851  #104-4851   104-4851  #104-4852   104-4852   104-4852  
                        #104-4852   104-4852  #104-4853   104-4853   104-4853  #104-4853   104-4853  #104-4854   104-4854  
                         104-4854  #104-4854   104-4854  #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  
                        #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  #104-4855   104-4855   104-4855  
                        #104-4855   104-4855  #104-4856   104-4856   104-4856  #104-4856   104-4856  #104-4857   104-4857  
                         104-4857  #104-4857   104-4857  #104-4858   104-4858   104-4858  #104-4858   104-4858  #104-4859  
                         104-4859   104-4859  #104-4859   104-4859  #104-4860   104-4860   104-4860  #104-4860   104-4860  
                        #104-4861   104-4861   104-4861  #104-4861   104-4861  #104-4863   104-4863   104-4863  #104-4863  
                         104-4863  #119-5710   119-5710   119-5710  #119-5710   119-5710  #119-5711   119-5711   119-5711  
                        #119-5711   119-5711  #119-5712   119-5712   119-5712  #119-5712   119-5712  #119-5713   119-5713  
                         119-5713  #119-5713   119-5713  #119-5715   119-5715   119-5715  #119-5715   119-5715  #119-5716  
                         119-5716   119-5716  #119-5716   119-5716  #131-6372   131-6372   131-6372  #131-6372   131-6372  
                        #131-6373   131-6373   131-6373  #131-6373   131-6373  #131-6374   131-6374   131-6374  #131-6374  
                         131-6374  #141-6753   141-6753   141-6753  #141-6753   141-6753  #146-6918   146-6918   146-6918  
                        #146-6918   146-6918  #146-6920   146-6920   146-6920  #146-6920   146-6920  #151-7068   151-7068  
                         151-7068  #151-7068   151-7068   151-7068  #151-7068   151-7068  #151-7077   151-7077   151-7077  
                        #151-7077   151-7077  #153-7184   153-7184   153-7184  #153-7184   153-7184   153-7184  #153-7184  
                         153-7184   153-7184  #153-7184   153-7184   153-7184  #153-7184   153-7184  #153-7185   153-7185  
                         153-7185  #153-7185   153-7185   153-7185  #153-7185   153-7185  #153-7186   153-7186   153-7186  
                        #153-7186   153-7186   153-7186  #153-7186   153-7186  #153-7187   153-7187   153-7187  #153-7187  
                         153-7187   153-7187  #153-7187   153-7187  #153-7188   153-7188   153-7188  #153-7188   153-7188  
BY$$2 	= 000000	#9-380      9-380      9-380     #9-380      9-380     #9-380      9-380     #46-2000    46-2000   
                         46-2000   #46-2000    46-2000   #46-2000    46-2000   #72-3203    72-3203    72-3203   #72-3203   
                         72-3203   #72-3203    72-3203   #72-3204    72-3204   #72-3204    72-3204   #72-3204    72-3204   
                        #72-3205    72-3205   #72-3205    72-3205   #72-3205    72-3205   #72-3205    72-3205   #80-3542   
                         80-3542    80-3542   #80-3542    80-3542   #80-3542    80-3542   #80-3545    80-3545    80-3545   
                        #80-3545    80-3545   #80-3545    80-3545   #84-3784    84-3784    84-3784   #84-3784    84-3784   
                        #84-3784    84-3784   #84-3785    84-3785    84-3785   #84-3785    84-3785   #84-3785    84-3785   
                        #88-3988    88-3988    88-3988   #88-3988    88-3988   #88-3988    88-3988   #88-3989    88-3989   
                        #88-3989    88-3989   #88-3989    88-3989   #88-3990    88-3990   #88-3990    88-3990   #88-3990   
                         88-3990   #88-3991    88-3991   #88-3991    88-3991   #88-3991    88-3991   #88-3992    88-3992   
                        #88-3992    88-3992   #88-3992    88-3992   #88-3993    88-3993   #88-3993    88-3993   #88-3993   
                         88-3993   #88-3994    88-3994   #88-3994    88-3994   #88-3994    88-3994   #88-3995    88-3995   
                        #88-3995    88-3995   #88-3995    88-3995   #92-4206    92-4206   #92-4206    92-4206   #92-4206   
                         92-4206   #92-4206    92-4206   #92-4206    92-4206   #92-4206    92-4206   #92-4206    92-4206   
                        #96-4402    96-4402   #96-4402    96-4402   #96-4402    96-4402   #96-4402    96-4402   #96-4402   
                         96-4402   #96-4402    96-4402   #96-4402    96-4402   #96-4402    96-4402   #96-4403    96-4403   
                        #96-4403    96-4403   #96-4403    96-4403   #96-4403    96-4403   #96-4403    96-4403   #96-4403   
                         96-4403   #96-4403    96-4403   #96-4404    96-4404   #96-4404    96-4404   #96-4404    96-4404   
                        #96-4405    96-4405   #96-4405    96-4405   #96-4405    96-4405   #96-4408    96-4408   #96-4408   
                         96-4408   #96-4408    96-4408   #96-4408    96-4408   #96-4408    96-4408   #96-4408    96-4408   
                        #96-4408    96-4408   #96-4408    96-4408   #96-4410    96-4410    96-4410   #96-4410    96-4410   
                         96-4410   #96-4410    96-4410    96-4410   #96-4410    96-4410    96-4410   #96-4410    96-4410   
                         96-4410   #96-4410    96-4410    96-4410   #96-4410    96-4410   #96-4410    96-4410   #96-4411   
                         96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411   
                         96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411   
                         96-4411   #96-4411    96-4411   #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   
                        #96-4412    96-4412    96-4412   #96-4412    96-4412   #96-4412    96-4412   #96-4414    96-4414   
                         96-4414   #96-4414    96-4414   #96-4414    96-4414   #98-4539    98-4539   #98-4539    98-4539   
                        #98-4539    98-4539   #98-4539    98-4539   #98-4539    98-4539   #98-4539    98-4539   #98-4539   
                         98-4539   #98-4539    98-4539   #98-4541    98-4541    98-4541   #98-4541    98-4541   #98-4541   
                         98-4541   #98-4542    98-4542    98-4542   #98-4542    98-4542   #98-4542    98-4542   #98-4542   
                         98-4542   #98-4543    98-4543   #98-4543    98-4543   #98-4543    98-4543   #102-4709   102-4709  
                         102-4709  #102-4709   102-4709  #102-4709   102-4709  #102-4710   102-4710   102-4710  #102-4710  
                         102-4710  #102-4710   102-4710  #102-4711   102-4711   102-4711  #102-4711   102-4711   102-4711  
                        #102-4711   102-4711   102-4711  #102-4711   102-4711   102-4711  #102-4711   102-4711   102-4711  
                        #102-4711   102-4711  #102-4711   102-4711  #102-4712   102-4712  #102-4712   102-4712  #102-4712  
                         102-4712  #102-4713   102-4713  #102-4713   102-4713  #102-4713   102-4713  #102-4714   102-4714  
                        #102-4714   102-4714  #102-4714   102-4714  #102-4715   102-4715  #102-4715   102-4715  #102-4715  
                         102-4715  #104-4851   104-4851  #104-4851   104-4851  #104-4851   104-4851  #104-4852   104-4852  
                        #104-4852   104-4852  #104-4852   104-4852  #104-4853   104-4853  #104-4853   104-4853  #104-4853  
                         104-4853  #104-4854   104-4854  #104-4854   104-4854  #104-4854   104-4854  #104-4855   104-4855  
                        #104-4855   104-4855  #104-4855   104-4855  #104-4855   104-4855  #104-4855   104-4855  #104-4855  
                         104-4855  #104-4855   104-4855  #104-4856   104-4856  #104-4856   104-4856  #104-4857   104-4857  
                        #104-4857   104-4857  #104-4858   104-4858   104-4858  #104-4858   104-4858   104-4858  #104-4858  
                         104-4858   104-4858  #104-4858   104-4858   104-4858  #104-4858   104-4858   104-4858  #104-4858  
                         104-4858  #104-4858   104-4858  #104-4859   104-4859   104-4859  #104-4859   104-4859   104-4859  
                        #104-4859   104-4859  #104-4859   104-4859  #104-4860   104-4860   104-4860  #104-4860   104-4860  
                        #104-4860   104-4860  #104-4861   104-4861   104-4861  #104-4861   104-4861  #104-4861   104-4861  
                        #104-4863   104-4863   104-4863  #104-4863   104-4863  #104-4863   104-4863  #119-5710   119-5710  
                         119-5710  #119-5710   119-5710   119-5710  #119-5710   119-5710  #119-5710   119-5710  #119-5711  
                         119-5711   119-5711  #119-5711   119-5711  #119-5711   119-5711  #119-5712   119-5712  #119-5712  
                         119-5712  #119-5712   119-5712  #119-5713   119-5713  #119-5713   119-5713  #119-5713   119-5713  
                        #119-5715   119-5715   119-5715  #119-5715   119-5715  #119-5715   119-5715  #119-5716   119-5716  
                        #119-5716   119-5716  #131-6372   131-6372   131-6372  #131-6372   131-6372  #131-6372   131-6372  
                        #131-6373   131-6373   131-6373  #131-6373   131-6373  #131-6373   131-6373  #131-6374   131-6374  
                         131-6374  #131-6374   131-6374  #131-6374   131-6374  #141-6753   141-6753   141-6753  #141-6753  
                         141-6753  #141-6753   141-6753  #146-6918   146-6918  #146-6918   146-6918  #146-6920   146-6920  
                         146-6920  #146-6920   146-6920  #146-6920   146-6920  #151-7068   151-7068   151-7068  #151-7068  
                         151-7068  #151-7068   151-7068  #151-7068   151-7068  #151-7077   151-7077   151-7077  #151-7077  
                         151-7077  #151-7077   151-7077  #153-7184   153-7184   153-7184  #153-7184   153-7184  #153-7184  
                         153-7184  #153-7184   153-7184  #153-7184   153-7184  #153-7184   153-7184  #153-7185   153-7185  
                        #153-7185   153-7185  #153-7185   153-7185  #153-7186   153-7186  #153-7186   153-7186  #153-7186  
                         153-7186  #153-7187   153-7187  #153-7187   153-7187  #153-7187   153-7187  #153-7187   153-7187  
                        #153-7188   153-7188   153-7188  #153-7188   153-7188  #153-7188   153-7188  
BY$$3 	= 000000	#9-380      9-380      9-380     #9-380      9-380     #46-2000    46-2000    46-2000   #46-2000   
                         46-2000   #72-3203    72-3203    72-3203   #72-3203    72-3203   #72-3205    72-3205   #80-3542   
                         80-3542    80-3542   #80-3542    80-3542   #80-3545    80-3545    80-3545   #80-3545    80-3545   
                        #84-3784    84-3784    84-3784   #84-3784    84-3784   #84-3785    84-3785    84-3785   #84-3785   
                         84-3785   #88-3988    88-3988    88-3988   #88-3988    88-3988   #88-3989    88-3989   #88-3990   
                         88-3990   #88-3991    88-3991   #88-3992    88-3992   #88-3993    88-3993   #88-3994    88-3994   
                        #88-3995    88-3995   #92-4206    92-4206   #96-4402    96-4402   #96-4403    96-4403   #96-4404   
                         96-4404   #96-4405    96-4405   #96-4408    96-4408   #96-4410    96-4410    96-4410   #96-4410   
                         96-4410    96-4410   #96-4410    96-4410    96-4410   #96-4410    96-4410    96-4410   #96-4410   
                         96-4410    96-4410   #96-4410    96-4410    96-4410   #96-4410    96-4410   #96-4411    96-4411   
                         96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411   
                         96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411    96-4411   #96-4411    96-4411   
                        #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   #96-4412    96-4412    96-4412   
                        #96-4412    96-4412   #96-4414    96-4414    96-4414   #96-4414    96-4414   #98-4539    98-4539   
                        #98-4541    98-4541    98-4541   #98-4541    98-4541   #98-4542    98-4542    98-4542   #98-4542   
                         98-4542   #102-4709   102-4709   102-4709  #102-4709   102-4709  #102-4710   102-4710   102-4710  
                        #102-4710   102-4710  #102-4711   102-4711   102-4711  #102-4711   102-4711   102-4711  #102-4711  
                         102-4711   102-4711  #102-4711   102-4711   102-4711  #102-4711   102-4711   102-4711  #102-4711  
                         102-4711  #102-4712   102-4712  #102-4713   102-4713  #102-4714   102-4714  #102-4715   102-4715  
                        #104-4851   104-4851  #104-4852   104-4852  #104-4853   104-4853  #104-4854   104-4854  #104-4855  
                         104-4855  #104-4858   104-4858   104-4858  #104-4858   104-4858   104-4858  #104-4858   104-4858  
                         104-4858  #104-4858   104-4858   104-4858  #104-4858   104-4858   104-4858  #104-4858   104-4858  
                        #104-4859   104-4859   104-4859  #104-4859   104-4859   104-4859  #104-4859   104-4859  #104-4860  
                         104-4860   104-4860  #104-4860   104-4860  #104-4861   104-4861   104-4861  #104-4861   104-4861  
                        #104-4863   104-4863   104-4863  #104-4863   104-4863  #119-5710   119-5710   119-5710  #119-5710  
                         119-5710   119-5710  #119-5710   119-5710  #119-5711   119-5711   119-5711  #119-5711   119-5711  
                        #119-5712   119-5712  #119-5713   119-5713  #119-5715   119-5715   119-5715  #119-5715   119-5715  
                        #131-6372   131-6372   131-6372  #131-6372   131-6372  #131-6373   131-6373   131-6373  #131-6373  
                         131-6373  #131-6374   131-6374   131-6374  #131-6374   131-6374  #141-6753   141-6753   141-6753  
                        #141-6753   141-6753  #146-6920   146-6920   146-6920  #146-6920   146-6920  #151-7068   151-7068  
                         151-7068  #151-7068   151-7068  #151-7077   151-7077   151-7077  #151-7077   151-7077  #153-7184  
                         153-7184   153-7184  #153-7184   153-7184  #153-7187   153-7187  #153-7188   153-7188   153-7188  
                        #153-7188   153-7188  
BY$$4 	= 000000	#9-380      9-380     #9-380      9-380     #46-2000    46-2000   #46-2000    46-2000   #72-3203   
                         72-3203   #72-3203    72-3203   #72-3205    72-3205   #80-3542    80-3542   #80-3542    80-3542   
                        #80-3545    80-3545   #80-3545    80-3545   #84-3784    84-3784   #84-3784    84-3784   #84-3785   
                         84-3785   #84-3785    84-3785   #88-3988    88-3988   #88-3988    88-3988   #88-3989    88-3989   
                        #88-3990    88-3990   #88-3991    88-3991   #88-3992    88-3992   #88-3993    88-3993   #88-3994   
                         88-3994   #88-3995    88-3995   #92-4206    92-4206   #96-4402    96-4402   #96-4403    96-4403   
                        #96-4404    96-4404   #96-4405    96-4405   #96-4408    96-4408   #96-4410    96-4410   #96-4410   
                         96-4410   #96-4410    96-4410   #96-4410    96-4410   #96-4410    96-4410   #96-4410    96-4410   
                        #96-4410    96-4410   #96-4411    96-4411   #96-4411    96-4411   #96-4411    96-4411   #96-4411   
                         96-4411   #96-4411    96-4411   #96-4411    96-4411   #96-4411    96-4411   #96-4412    96-4412   
                        #96-4412    96-4412   #96-4412    96-4412   #96-4412    96-4412   #96-4412    96-4412   #96-4412   
                         96-4412   #96-4412    96-4412   #96-4414    96-4414   #96-4414    96-4414   #98-4539    98-4539   
                        #98-4541    98-4541   #98-4541    98-4541   #98-4542    98-4542   #98-4542    98-4542   #102-4709  
                         102-4709  #102-4709   102-4709  #102-4710   102-4710  #102-4710   102-4710  #102-4711   102-4711  
                        #102-4711   102-4711  #102-4711   102-4711  #102-4711   102-4711  #102-4711   102-4711  #102-4711  
                         102-4711  #102-4712   102-4712  #102-4713   102-4713  #102-4714   102-4714  #102-4715   102-4715  
                        #104-4851   104-4851  #104-4852   104-4852  #104-4853   104-4853  #104-4854   104-4854  #104-4855  
                         104-4855  #104-4858   104-4858  #104-4858   104-4858  #104-4858   104-4858  #104-4858   104-4858  
                        #104-4858   104-4858  #104-4858   104-4858  #104-4859   104-4859  #104-4859   104-4859  #104-4859  
                         104-4859  #104-4860   104-4860  #104-4860   104-4860  #104-4861   104-4861  #104-4861   104-4861  
                        #104-4863   104-4863  #104-4863   104-4863  #119-5710   119-5710  #119-5710   119-5710  #119-5710  
                         119-5710  #119-5711   119-5711  #119-5711   119-5711  #119-5712   119-5712  #119-5713   119-5713  
                        #119-5715   119-5715  #119-5715   119-5715  #131-6372   131-6372  #131-6372   131-6372  #131-6373  
                         131-6373  #131-6373   131-6373  #131-6374   131-6374  #131-6374   131-6374  #141-6753   141-6753  
                        #141-6753   141-6753  #146-6920   146-6920  #146-6920   146-6920  #151-7068   151-7068  #151-7068  
                         151-7068  #151-7077   151-7077  #151-7077   151-7077  #153-7184   153-7184  #153-7184   153-7184  
                        #153-7187   153-7187  #153-7188   153-7188  #153-7188   153-7188  
CCA   	= 000014	#88-3974    88-3989    88-3989   
CDD   	= 000020	#3-104     
CHNPNT	= 000001	#3-104     
CM    	= 000004	#96-4391    97-4477   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CNUPE 	= 000002	#3-104     
CONO  	= 000004	#88-3975    88-3990    88-3990   #92-4193    92-4206    92-4206   #96-4390    96-4402    96-4402   
                         96-4403    96-4403    96-4404    96-4404    96-4408    96-4408   #98-4528    98-4539    98-4539   
                        #104-4842   104-4855   104-4855  
CR    	= 000015	#9-364      18-830    #121-5858   121-5896   121-5897   121-5900   122-5982  #123-6026   123-6033  
                         123-6034   124-6060  #125-6099   125-6137   125-6138   125-6139   130-6336  
CS.EXP	= 177670	#3-104     
CTLS  	= 000040	#8-333      8-334      11-507     11-508     11-509     11-510     12-549     53-2262    55-2376   
                         68-2951    71-3130    103-4746   110-5217   122-5989  
CYCLS 	= 000002	#3-104     
C.ACHE	= 000000	#2-86       10-406     10-416     10-425     11-444     15-659     50-2151    54-2307    65-2752   
                         69-3003    70-3018    70-3061    70-3068    70-3089    71-3133    88-3969    93-4249    96-4407   
                         97-4447    98-4538    101-4650   120-5731  
DATAI 	= 000001	#88-3976    88-3989    88-3989   
DATAO 	= 000003	#96-4392    96-4405    96-4405   
DATE  	= 000004	#3-104     
DCAPGM	  001331 R	#88-3987    89-4019   
DCARCA	  001346 R	#88-3990    91-4157   
DCARFL	  001407 R	#88-3997    89-4041    89-4068    89-4070    89-4072    89-4074   
DCASIA	  001341 R	#88-3989    91-4154   
DCAWRF	  001372 R	#88-3994    89-4024    89-4082   
DCBADR	  001202 R	#72-3197   *75-3317   *75-3319    75-3322    76-3348    76-3356    77-3395   *77-3414    77-3418   
DCBAPR	  001254 R	#72-3205    79-3478   
DCBA17	  001251 R	#72-3204    79-3482   
DCBBF 	  001244 R	#72-3203    79-3481   
DCBCBF	  001222 R	#72-3200    76-3362   
DCBCNT	  001220 R	#72-3199   *74-3271    75-3323   *78-3446    78-3447   
DCBDAT	  001204 R	#72-3198    74-3272   
DCBDBF	  001236 R	#72-3201    77-3402   
DCBFNM	  001162 R	#72-3193    74-3251   
DCFCFN	  001114 R	#69-2993    70-3027    70-3033   
DCFLFN	  001134 R	#69-2997    70-3086   
DCFRJT	  001154 R	#69-3001    69-3008    70-3044   
DCOMST	= 000001	#3-104     
DDCDAI	  000526 R	#29-1268    30-1292   
DDCDAO	  000542 R	#29-1269    30-1308   
DDCWAT	  000562 R	 29-1269   #29-1270   
DDDDEL	  000174 R	#19-873     23-1014   
DDDFNA	  000144 R	#19-872     23-1010   
DDDRNA	  000212 R	#19-874     23-1019   
DDLACR	  000300 R	#25-1095    26-1126   
DDLFNA	  000250 R	#25-1094    26-1122   
DDLGLN	  000242 R	#25-1093    26-1118   
DDLRAT	  000356 R	 25-1095   #25-1097   
DDLRNA	  000326 R	#25-1096    26-1138   
DDNACE	  000452 R	#27-1182    28-1216   
DDNCRE	  000376 R	#27-1180    28-1208   
DDNDEL	  000500 R	#27-1183    28-1230   
DDNENA	  000422 R	#27-1181    28-1212   
DDNGLN	  000370 R	#27-1179    28-1204   
DDNRAT	  000514 R	 27-1182   #27-1184   
DDPDAI	  000600 R	#31-1354    32-1371   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DDPDAO	  000630 R	#31-1356    32-1376   
DDPDEL	  000614 R	#31-1355    32-1375   
DDPRNA	  000644 R	#31-1357    32-1381   
DEP   	= 010000	#3-104     
DEX   	= 000400	#3-104     
DEXDON	= 000004	#3-104     
DEXWD1	= 174406	#3-104     
DEXWD2	= 174404	#3-104     
DEXWD3	= 174402	#3-104     
DFCABF	  001311 R	#80-3545    83-3732   *83-3748   *83-3750   
DFCBF 	  001302 R	#80-3542    81-3569    81-3577   *81-3583    81-3584    81-3585   *81-3585   *81-3600   *81-3601   
                         81-3603   *81-3608   *81-3609   *81-3610   *81-3611   *81-3612    81-3613    82-3642    82-3646   
                         82-3647   *82-3666   *82-3667    82-3668    82-3692    82-3693    82-3697   
DFCFL2	  001307 R	#80-3543    82-3670   *82-3674   *82-3695   
DFCFL3	  001310 R	#80-3544    82-3688   *82-3690   *82-3694   
DFCRFL	  001262 R	#80-3533    82-3640   
DFCWFL	  001272 R	#80-3537    81-3602   
DFDABF	  001323 R	#84-3785    87-3911    87-3912    87-3935   
DFDDBF	  001316 R	#84-3784   *85-3838    85-3839    86-3865   
DFEAD 	  002564 R	 146-6916   146-6917  #146-6918   147-6948   148-6972   149-6988   149-6993  
DFEBF 	  002570 R	 146-6916   146-6917  #146-6920   147-6943   147-6948   148-6972   148-6975  
DFEDPB	  002540 R	#146-6916   147-6949  
DFEEXB	  002552 R	#146-6917   148-6971  
DFRRDB	  002462 R	#139-6680  *140-6701   140-6702   140-6703  
DFUNC 	= 000200	#3-104     
DFWBF 	  002520 R	 141-6752  #141-6753  
DFWEDB	  002506 R	#141-6752   143-6803  
DFWWDB	  002474 R	#141-6751  *142-6775   142-6785   142-6786  
DFXXDB	  002526 R	#144-6846  *145-6874   145-6875   145-6876  
DF.DMG	= 000004	#3-104     
DF.DMN	= 000007	#3-104     
DF.DOR	= 000001	#3-104     
DF.EHG	= 000010	#3-104     
DF.EHM	= 000011	#3-104     
DF.EMG	= 000005	#3-104     
DF.EMN	= 000006	#3-104     
DF.KLR	= 000012	#3-104      139-6680  
DF.KLW	= 000013	#3-104      141-6751  
DF.KLX	= 000014	#3-104      144-6846  
DF.OFF	= 000002	#3-104     
DF.ON 	= 000003	#3-104     
DF.PDP	= 000016	#3-104      146-6916  
DF.PEX	= 000015	#3-104      141-6752   146-6917  
DGCFNM	  001054 R	#65-2756    66-2779   
DGMFNM	  001074 R	#67-2850    68-2891   
DIAG1 	= 174430	#3-104     
DIAG2 	= 174432	#3-104     
DIAG3 	= 174436	#3-104     
DIKL10	= 000010	#3-104     
DLDTYP	= 002426 R	#125-6107   125-6130   127-6222   128-6274  
DLRBTC	  001764 R	#113-5437   117-5575  
DLRCT 	  001722 R	#113-5420   113-5421   113-5422  *118-5639  
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DLRCT0	= 001722 R	#113-5421   117-5602   117-5618  *118-5649  
DLRCT1	= 001723 R	#113-5422   117-5607   117-5611   117-5613  *118-5662  
DLRLGL	  001744 R	#113-5433   118-5647   118-5655  
DLROFT	  001724 R	#113-5426   115-5518  
DLR0  	  002352 R	#114-5487   116-5551  
DLR128	  002030 R	 113-5428   113-5428   113-5428   113-5428  #114-5445  
DLR16 	  002326 R	 113-5428  #114-5483  
DLR192	  002016 R	 113-5428   113-5428   113-5428   113-5428  #114-5443  
DLR256	  002004 R	 113-5428   113-5428   113-5428   113-5428   113-5428   113-5428   113-5428   113-5428   113-5428  
                         113-5428   113-5428   113-5428   113-5428   113-5428   113-5428   113-5428   113-5428  #114-5441  
                         115-5519  
DLR32 	  002237 R	 113-5428  #114-5472  
DLR48 	  002225 R	 113-5428  #114-5470  
DLR64 	  002124 R	 113-5428   113-5428  #114-5457  
DLR96 	  002100 R	 113-5428   113-5428  #114-5453  
DLTNXB	  001720 R	#109-5178  *110-5261  *110-5273   111-5316   111-5318   111-5326   111-5329  
DLYCNT	= 174400	#3-104     
DM    	= 000002	#96-4393    97-4477   
DMRBF 	  002710 R	#151-7077   152-7109  
DMRMMR	  002670 R	 151-7066  #151-7068  
DMRMRT	  002576 R	#151-7049   152-7105  
DMRSRL	= 000005	#151-7076   152-7142  
DMRSRT	  002676 R	#151-7071   151-7076   152-7143  
DNILPO	  000714 R	#44-1897    45-1928   
DNISYF	  000744 R	#44-1901    45-1935   
DNISYI	  000724 R	#44-1899    45-1931   
DNISYO	  000734 R	#44-1900    45-1933   
DNITTI	  000674 R	#44-1894    45-1923   
DNITTO	  000704 R	#44-1895    45-1925   
DON10C	= 040000	#3-104      152-7101  
DON10S	= 100000	#3-104     
DON11C	= 000100	#3-104      152-7101  
DON11S	= 000200	#3-104     
DPDTYP	  002414 R	#121-5866   121-5889   122-5946  
DPS4  	= 040000	#3-104     
DPTAC1	  001564 R	#102-4710   103-4755  
DPTBF 	  001557 R	#102-4709   103-4754   103-4762   103-4788   103-4789  
DPTPGM	  001554 R	#102-4708   103-4743  
DQMORD	  001012 R	#53-2262    55-2342    56-2393   
DQSAPR	  001004 R	#46-2000    48-2073    48-2077    48-2080    48-2083   
DQSCBF	  000754 R	#46-1998    49-2105    49-2120   
DQSCF3	  000770 R	#46-1999    49-2109   
DQSFLG	  001011 R	#46-2001   *48-2066   
DRESET	= 000100	#3-104      152-7098  
DRSCEN	  001532 R	#98-4539    101-4656  
DRSPEN	  001544 R	#98-4542    101-4663  
DRSPFR	  001551 R	#98-4543    99-4573   
DRSPLD	  001537 R	#98-4541    101-4660  
DRTBF 	  000136 R	#9-380      18-811     18-820    
DRTBUF	  000026 R	 9-377     #9-379      18-796     18-802     18-832    
DRTDTE	  000322 R	 16-734     16-736     16-738    #16-740    
DRTSTA	  000022 R	 9-377     #9-378     
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DRTWLB	  000000 R	#9-377     *18-833     18-834    
DR.DTE	= 000011	#3-104      139-6680   141-6751   141-6752   144-6846   146-6916   146-6917  
DSBA16	  002723 R	#153-7185   154-7220  
DSBA17	  002726 R	#153-7186   154-7224   154-7231  
DSBBF 	  002736 R	#153-7188   154-7230  
DSBDI 	  002731 R	#153-7187   154-7227  
DSBRSB	  002716 R	#153-7184   155-7250  
DSEND 	= 000004	#3-104     
DSMAC1	  002411 R	#119-5716   120-5826  
DSMBF 	  002404 R	#119-5715   120-5825  
DSMPGM	  002352 R	#119-5709   120-5739  
DSMSD0	  002355 R	#119-5710  *120-5753   120-5754  *120-5758   120-5761  
DSMSD1	  002362 R	#119-5711  *120-5751  *120-5752   120-5763  *120-5771   120-5773  *120-5775   120-5777  
DSTBF 	  001524 R	#96-4414    97-4472   
DSTCEN	  001500 R	#96-4408   
DSTRT 	  001454 R	#96-4402    96-4406    97-4442   
DSTRTL	= 000004	#96-4406    97-4441   
DST1B0	  001505 R	#96-4410    97-4460   
DST1B1	  001512 R	#96-4411    97-4468   
DST3B1	  001517 R	#96-4412    97-4462   
DS04  	= 004000	#3-104     
DS05  	= 002000	#3-104      133-6450  
DS06  	= 001000	#3-104      133-6446   134-6476   136-6531   149-7010  
DTECMD	= 000451	#3-104     
DTEFLG	= 000444	#3-104     
DTEF11	= 000450	#3-104     
DTEMTD	= 000455	#3-104     
DTEMTI	= 000456	#3-104     
DTNRB 	  002752 R	#165-7630   168-7747  
DTNXP 	  002744 R	#165-7629   166-7648  
DUPE  	= 000020	#3-104     
DURE  	= 000004	#3-104     
DXBADR	  001434 R	#92-4204    93-4262   
DXBCNM	  001446 R	#92-4206    93-4265   
DXBDAT	  001440 R	#92-4205    93-4261   
DXBFNM	  001414 R	#92-4200    93-4252   
DXCAD 	  002442 R	#131-6372   133-6426   133-6431  
DXCBF 	  002447 R	#131-6373   137-6569  
DXCBRC	  002454 R	#131-6374   138-6616  
DXTAC1	  001657 R	#104-4856   108-5108   108-5131  
DXTAC2	  001662 R	#104-4857   108-5104   108-5127  
DXTAD 	  001712 R	#104-4863   105-4896  
DXTBF 	  001677 R	#104-4860   107-5004   107-5016  
DXTDP0	  001645 R	#104-4854   108-5126  
DXTEX0	  001640 R	#104-4853   108-5103  
DXTFLG	  001704 R	#104-4861   107-5012   107-5017   107-5019   107-5021  
DXTJRS	  001626 R	#104-4851   108-5111  
DXTPSW	  001717 R	#104-4864  *107-5003  *107-5045  
DXTRNM	  001652 R	#104-4855   105-4890   107-5023   107-5056   107-5061  
DXTSI 	  001672 R	#104-4859   106-4947  
DXTSI1	  001665 R	#104-4858   105-4886  
DXTSX2	  001633 R	#104-4852   108-5114   108-5138  
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DXWRD1	= 002000	#3-104     
D.MAL 	= 000020  G	#11-518     11-520     105-4903  
D.MA20	= 000000	#2-82       2-90       2-96       11-465     11-513     53-2279    56-2398    56-2443    68-2922   
                         103-4782   109-5180   110-5284   120-5767   121-5872   121-5907   122-5951   123-6023   125-6113  
                         125-6146   126-6164   126-6181   127-6209  
D1011 	= 000040	#3-104     
EBSEL 	= 000100	#3-104     
EBUSPC	= 000020	#3-104     
EBUSPS	= 000004	#3-104     
EDONES	= 040000	#3-104     
ED.PHY	= 000200	#8-326      141-6752   146-6916   146-6917  
EF.PR1	= ******  GX	 45-1956   
EPTR  	= 000000	#3-104     
ERR10C	= 010000	#3-104      152-7101  
ERR10S	= 020000	#3-104     
ERR11C	= 000001	#3-104      152-7101  
ERR11S	= 000002	#3-104     
FM    	= 000010	#96-4394    97-4477   
FORPRO	= 000020	#3-104     
FS    	= 000001	#96-4395   
F.TRCK	= 000000	#2-88       9-375      10-411     17-778     44-1896    45-1927    81-3563    82-3632    83-3729   
                         85-3803    86-3856    87-3910    132-6396   133-6425   134-6471   136-6517   140-6703   142-6786  
                         145-6875   147-6948   148-6972   152-7094   152-7141  
G.APL 	= 000020  G	#11-528     11-530     112-5357  
G.LUBA	= 000004	#25-1093   #27-1179   
G.LULU	= 000002	#25-1093   #27-1179   
G.LUNA	= 000000	 25-1093    27-1179   
HIBYTE	= 177400	#3-104     
HRR   	= 000540	#88-3977    88-3992    88-3992   
IE.DFU	= ******  GX	 42-1790   
IE.EBX	= ******  GX	 143-6805  
IE.EOF	= ******  GX	 40-1718   
IE.NSF	= ******  GX	 26-1135    26-1139    42-1786    66-2782    68-2894    70-3030    74-3278    93-4270   
IFLOP 	= 100000	#3-104     
INTROF	= 000010	#3-104     
INTRON	= 000040	#3-104     
INTSON	= 000001	#3-104     
INT10S	= 000400	#3-104     
INT11C	= 002000	#3-104      152-7101  
INT11S	= 004000	#3-104     
IO.ACE	= ******  GX	 27-1182   
IO.ACR	= ******  GX	 25-1095   
IO.CRE	= ******  GX	 27-1180   
IO.DAC	= ******  GX	 29-1268    29-1269    31-1354    31-1356   
IO.DEL	= ******  GX	 19-873     27-1183    31-1355   
IO.ENA	= ******  GX	 27-1181   
IO.FNA	= ******  GX	 19-872     25-1094    45-1942   
IO.RNA	= ******  GX	 19-874     25-1096    31-1357   
IO.RVB	= ******  GX	 36-1541   
IO.WLB	= ******  GX	 9-377     
IO.WVB	= ******  GX	 40-1708   
I.MEM 	= 000000	#2-94       11-483     11-491     15-672     54-2323    58-2497    58-2504    59-2511    59-2523   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         59-2562    68-2923    68-2938    103-4750   103-4765   103-4786   110-5211   110-5222   110-5234  
                         110-5260   110-5272   110-5292   113-5402   119-5718   120-5742   120-5779   120-5789   121-5899  
                         122-5926   122-5953   122-5970   126-6167   126-6177   127-6242  
I.10L 	= 000005	#6-221      96-4406    97-4445   
JRST  	= 000254	#88-3978    88-3995    88-3995   #102-4701   102-4715   102-4715  #104-4843   104-4851   104-4851  
                        #119-5703   119-5713   119-5713  
JUMPE 	= 000322	#88-3979    88-3991    88-3991   
KLI$$E	= 000007	#1-41       44-1906   
KLI$$F	= 000102	#2-76       9-337      9-337      44-1837    44-1837    44-1906    53-2234    53-2234    58-2470   
                         58-2470    63-2661    63-2661    67-2822    67-2822    72-3157    72-3157    98-4495    98-4495   
                         102-4671   102-4671   104-4812   104-4812   109-5148   109-5148   113-5377   113-5377   119-5675  
                         119-5675   121-5831   121-5831   123-5998   123-5998   125-6071   125-6071  
KLI$$K	= 000126	#1-45       44-1906   
KLI$$V	= 000006	#1-40       44-1906   
KLPWRF	= 000010	#3-104     
KL.CFL	= ******  GX	 51-2189    54-2319   
KL.CFM	= ******  GX	 54-2315   
KL.LCA	= ******  GX	 51-2186   
KL.LVB	= ******  GX	 62-2645   
KL.SPF	= ******  GX	 64-2714   
KL.VBD	= ******  GX	 97-4458    97-4464   
KL.VBN	= ******  GX	 97-4456   
LCARPT	  012520 R	 89-4107   #90-4116   
LCBCRM	  007560 R	 75-3321   #76-3346   
LCBDRM	  007732 R	 75-3318   #77-3393    77-3416   
LCBFL 	  010142 R	 74-3281    75-3331    76-3382    77-3422   #78-3454   
LCBRC 	  007464 R	 74-3275   #75-3315    76-3377    77-3417   
LCBRME	  010066 R	 76-3380    76-3380    77-3420    77-3420   #78-3436   
LCBVR 	  010174 R	 75-3330   #79-3467   
LCB3W 	  007434 R	#74-3294    77-3393    77-3393   
LCB6W 	  007442 R	#74-3296    76-3357    76-3357   
LCFCPY	  006704 R	 70-3042   #70-3047    70-3063   
LCFERR	  007102 R	 70-3031    70-3035   #70-3096   
LCFNXT	  006652 R	#70-3038    70-3055    70-3067   
LCFPRG	  007076 R	 70-3039    70-3050    70-3053    70-3057    70-3059    70-3066    70-3072    70-3079    70-3081   
                         70-3083   #70-3095   
LCFRCA	  006756 R	 69-3004   #70-3062   
LCFREF	  006774 R	 69-3001    70-3037   #70-3069   
LCFRMM	  006676 R	 69-3002   #70-3045   
LCFRTN	  007074 R	 70-3025   #70-3093   
LCFSKP	  006764 R	 70-3046   #70-3065   
LCFWCA	  007242 R	 70-3071    70-3071   #71-3135   
LCFWEF	  007116 R	 70-3080    70-3080   #71-3104   
LCFWMM	  007140 R	 70-3078    70-3078   #71-3111   
LCTL  	= 000037	#8-334      55-2345    57-2453    68-2875    103-4797   118-5668   120-5787   126-6197  
LDEIDV	  003000 R	 42-1812    42-1812   #43-1829   
LDRER 	  002026 R	 34-1438    35-1487    35-1510   #35-1520   
LDWER 	  002270 R	 38-1605    38-1628   #38-1637    39-1660    39-1684   
LF    	= 000012	#9-365      18-831    #121-5859   121-5896   121-5897   121-5900   122-5983  #123-6027   123-6033  
                         123-6034   124-6061  #125-6100   125-6137   125-6138   125-6139   130-6337  
LFCSAB	  011340 R	 83-3733    83-3733    83-3741    83-3741   #83-3747   
LFDWFN	  011524 R	 85-3823    85-3833    85-3833   #85-3838   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LFECKN	  022370 R	 147-6941   147-6941   148-6969   148-6969  #149-7000  
LFEMVA	  022344 R	 147-6940   147-6940   148-6968   148-6968  #149-6988  
LFWCKF	  021730 R	 142-6772   142-6772  #143-6799  
LLDCT 	  020236 R	 127-6220   127-6220   128-6269   128-6269  #129-6309  
LLDEX 	  017700 R	 126-6173  #127-6214  
LLDGP 	  017764 R	 126-6204  #127-6234  
LLDIL 	  020300 R	 127-6225   127-6225   128-6279   128-6279  #130-6325  
LLDIN 	  020022 R	 126-6195  #128-6248  
LLDLP 	  017540 R	#126-6163   127-6227   127-6241   128-6281  
LLDPR 	  020320 R	 127-6226   127-6226   127-6240   127-6240   128-6280   128-6280  #130-6336  
LLDSZ 	  020200 R	 127-6217   127-6217   127-6237   127-6237   128-6260   128-6260  #129-6295  
LLRALC	  016070 R	 116-5549  #117-5574  
LLRFND	  016324 R	 116-5548   116-5548  #118-5639  
LLRNXH	  015736 R	#115-5513   117-5622  
LLRULE	  015764 R	#116-5535   116-5552  
LLTFGP	  015606 R	 111-5324   111-5324  #112-5351  
LLTFHL	  015500 R	 110-5262   110-5262   110-5274   110-5274  #111-5311   111-5327  
LMRDFN	  022640 R	 152-7106   152-7106   152-7119   152-7119  #152-7125  
LOAD11	= 000004	#3-104     
LPOLUN	= 000003	#8-329      9-377      44-1897   
LQCCM 	  004174 R	 51-2178   #52-2196    52-2230   
LQMADJ	  004772 R	 55-2356    55-2356    55-2362    55-2362   #55-2376   
LQMMD 	  005006 R	 55-2357   #56-2383    56-2438    56-2440    56-2442    56-2445   
LQMSAT	  005314 R	 55-2327    55-2327   #57-2453   
LQSBPS	  003550 R	 47-2033    47-2033   #47-2052    47-2055   
LQSHDW	  003574 R	 47-2029    47-2029    47-2044    47-2044   #48-2066   
LQSHWO	  003712 R	 48-2074    48-2074   #49-2102   
LRSTKL	  013664 R	 99-4572    99-4572   #101-4649  
LSMSBD	  016766 R	 120-5756   120-5756   120-5765   120-5765  #120-5810  
LTNCHR	  024320 R	 167-7687   167-7687   167-7705   167-7705   167-7722   167-7722   167-7729   167-7729  #168-7785  
LTNMV 	  024260 R	 167-7682   167-7682   167-7699   167-7699   167-7717   167-7717  #168-7746  
LTNROL	  024304 R	 167-7685   167-7685   167-7703   167-7703   167-7720   167-7720   167-7727   167-7727  #168-7765  
                         168-7769  
LXBRC 	  013014 R	 93-4267   #94-4291    95-4357   
LXB5B 	  012772 R	#93-4279    95-4347    95-4347   
LXTDPM	  014740 R	 107-5048   107-5048   107-5060   107-5060  #107-5066  
LXTMI 	  014430 R	 105-4910   105-4910  #106-4946  
LXTMN 	  014512 R	 105-4915   105-4915   105-4923   105-4923  #107-4978  
LXTMT 	  014540 R	 105-4900   105-4900   106-4955   106-4955   107-4982  #107-5003  
LXTMTP	  014652 R	 107-5020  #107-5045  
LXTMTR	  014546 R	#107-5004   107-5058  
LXTSDP	  015126 R	 107-5053   107-5053  #108-5122  
LXTSEX	  015014 R	 107-5009   107-5009  #108-5099  
MOVE  	= 000200	#104-4844   104-4853   104-4853  
MOVEM 	= 000202	#102-4702   102-4713   102-4713  #104-4845   104-4854   104-4854  
MPE11 	= 001000	#3-104     
MXTYP 	= 000002	#69-2988    69-3008    70-3041   
M.A20 	= 000000	#2-83       2-90       2-93       11-460     121-5867   121-5904   125-6108   125-6143  
M.B20 	= 000000	#2-84       2-90       2-93       11-470     121-5877   121-5910   125-6118   125-6149  
M.F20 	= ******	 2-90       2-93       11-476     121-5883   121-5913   125-6124   125-6152  
NULSTP	= 000040	#3-104     
NUPE  	= 000002	#3-104     
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PAG   	= 000010	#88-3980    88-3990    88-3990   #96-4396    96-4404    96-4404    96-4405    96-4405    96-4408   
                         96-4408   #98-4529    98-4539    98-4539   
PAGE  	= 001000	#92-4194    92-4195   
PERCLR	= 001000	#3-104      152-7101  
PGBTS 	= 000777	#92-4195    94-4305    95-4330    95-4334   
PHYS  	= 100000	#3-104     
PI    	= 000004	#96-4397    96-4403    96-4403   #102-4703   102-4714   102-4714  #119-5704   119-5712   119-5712  
                        #153-7179   153-7187   153-7187  
PIDENT	= 000000	#3-104     
PRI7  	= 000340	#3-104     
PROPNT	= 000021	#3-104     
PRTOFF	= 004000	#3-104     
PR0   	= 000000	#3-104     
PR1   	= 000040	#3-104     
PR2   	= 000100	#3-104     
PR3   	= 000140	#3-104     
PR4   	= 000200	#3-104     
PR5   	= 000240	#3-104     
PR6   	= 000300	#3-104     
PR7   	= 000340	#3-104     
PS    	= 177776	#3-104     
PSWW1 	= 000005	#3-104     
PSWW10	= 000014	#3-104     
PSWW11	= 000015	#3-104     
PSWW12	= 000016	#3-104     
PSWW13	= 000017	#3-104     
PSWW2 	= 000006	#3-104     
PSWW3 	= 000007	#3-104     
PSWW4 	= 000010	#3-104     
PSWW5 	= 000011	#3-104     
PSWW6 	= 000012	#3-104     
PSWW7 	= 000013	#3-104     
PULSE 	= 000020	#3-104     
QSIZE 	= 000023	#3-104     
Q.IOAE	= 000012	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOEF	= 000006	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOFN	= 000002	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOLU	= 000004	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOPL	= 000014	#9-377     *18-833    #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   
                        #27-1181   #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOPR	= 000007	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
Q.IOSB	= 000010	#9-377     #19-872    #19-873    #19-874    #25-1094   #25-1095   #25-1096   #27-1180   #27-1181   
                        #27-1182   #27-1183   #29-1268   #29-1269   #31-1354   #31-1355   #31-1356   #31-1357   
RAMIS0	= 010000	#3-104     
RFMAD0	= 100000	#3-104     
RFMAD1	= 040000	#3-104     
RFMAD2	= 020000	#3-104     
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RFMAD3	= 010000	#3-104     
RM    	= 000010	#3-104     
RULNG 	= 000005	#113-5405   116-5550  
SCD   	= 000040	#3-104     
SETZ  	= 000400	#88-3981    88-3993    88-3993   
SPC   	= 000040	#9-366      18-801    #121-5860   122-5973  #123-6028   124-6056  #125-6101   129-6295   129-6317  
STAT  	= 174434	#3-104     
STATUS	= 000022	#3-104     
STPKL 	  020740 R	 135-6496   135-6496  #136-6517  
SWR   	= 177570	#3-104     
SWSLLT	= 100000	#3-104     
SXCT  	= 000106	#104-4846   104-4852   104-4852  
SYFLUN	= 000006	#8-332      19-872     19-873     19-874     25-1094    25-1096    27-1180    27-1181    31-1357   
                         44-1901   
SYILUN	= 000004	#8-330      25-1093    25-1095    29-1268    31-1354    36-1541    44-1899    45-1942   
SYOLUN	= 000005	#8-331      27-1179    27-1182    27-1183    29-1269    31-1355    31-1356    40-1708    44-1900   
S.YIL 	= 001000  G	#14-603     14-606     14-611     14-616     36-1541   
S.YOL 	= 001000  G	#14-613     14-621     28-1224    38-1629    40-1708    40-1715   
TAB   	= 000011	#9-367      18-798    #121-5861   122-5938   122-5941  #125-6102   129-6301  
TCAACD	  002771 R	#88-4003    90-4116   
TCAACE	  002720 R	#88-4001    90-4119   
TCACEF	  002672 R	#88-4000    89-4108   
TCASCE	  002743 R	#88-4002    90-4122   
TCBDCW	  002430 R	#72-3208    76-3379   
TCBDDW	  002462 R	#72-3209    77-3419   
TCBMLF	  002514 R	#72-3210    78-3454   
TCBMVF	  002544 R	#72-3211    78-3457   
TCBMVL	  002576 R	#72-3212    79-3469   
TCBMVV	  002633 R	#72-3213    79-3471   
TCFCFA	  002334 R	#69-3012    70-3088   
TCFCFE	  002367 R	#69-3013    70-3096   
TDEDFU	  000444 R	#41-1761    42-1788   
TDEDR 	  000212 R	#41-1758    42-1779   
TDEIO 	  000304 R	#41-1759    42-1792   
TDENSF	  000370 R	#41-1760    42-1784   
TDRRDE	  000066 R	#33-1419    36-1549   
TDRRLE	  000103 R	#33-1420    35-1520   
TDWRLE	  000155 R	#37-1588    38-1637   
TDWWRE	  000137 R	#37-1587    40-1724   
TENAD1	= 174410	#3-104     
TENAD2	= 174412	#3-104     
TFEDFL	  004542 R	#146-6923   147-6951  
TFEEFL	  004563 R	#146-6924   148-6980  
TFREMS	  004453 R	#139-6683   140-6714  
TFWEMS	  004474 R	#141-6756   142-6788  
TFXEMS	  004516 R	#144-6849   145-6879  
TGCNFL	  002142 R	#65-2761    66-2784   
TGMBFL	  002261 R	#67-2856    68-2955   
TGMNFL	  002211 R	#67-2855    68-2896   
TLDHD 	  004145 R	#125-6137   125-6140   126-6159  
TLDHDL	= 000135	#125-6140   126-6160  
TLDNME	  004302 R	#125-6141   127-6238  
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TLDNTP	  004325 R	 125-6123   125-6127  #125-6142  
TLDT01	  004340 R	 125-6109  #125-6144  
TLDT02	  004353 R	 125-6114  #125-6147  
TLDT03	  004366 R	 125-6119  #125-6150  
TLTIDM	  003466 R	#109-5181   110-5285  
TLTNM0	  003527 R	#109-5183   110-5289  
TLT2MG	  003564 R	#109-5184   112-5372  
TMRMFL	  004604 R	#151-7080   152-7121  
TNINDV	  000471 R	#44-1903    45-1937   
TNIN55	  000516 R	#44-1904    45-1946   
TNIPRI	  000554 R	#44-1905    45-1960   
TNIVER	  000640 R	#44-1906    45-1962   
TOBM  	= 000004	#3-104     
TOD   	= 000003	#3-104     
TOIP  	= 000002	#3-104     
TOIT  	= 000001	#3-104     
TO10  	= 000200	#3-104     
TO10AD	= 174420	#3-104     
TO10BC	= 174414	#3-104     
TO10BM	= 000001	#3-104     
TO10DB	= 000400	#3-104     
TO10DN	= 100000	#3-104     
TO10DT	= 174424	#3-104     
TO10ER	= 020000	#3-104     
TO11  	= 000100	#3-104     
TO11AD	= 174422	#3-104     
TO11BC	= 174416	#3-104     
TO11BM	= 020000	#3-104     
TO11DB	= 004000	#3-104     
TO11DN	= 000200	#3-104     
TO11DT	= 174426	#3-104     
TO11ER	= 000002	#3-104     
TPDHD 	  003670 R	#121-5896   121-5898   121-5901   122-5924  
TPDHL1	= 000067	#121-5898   122-5925  
TPDHL2	= 000115	#121-5901   122-5929  
TPDNTP	  004005 R	 121-5866   121-5882   121-5886  #121-5903  
TPDT01	  004031 R	 121-5868  #121-5905  
TPDT02	  004043 R	 121-5873  #121-5908  
TPDT03	  004061 R	 121-5878  #121-5911  
TPTNPC	  003163 R	#102-4719   103-4807  
TQBOOT	  001777 R	#61-2622    62-2633   
TQBSYN	  002044 R	#61-2623    62-2657   
TQCACH	  000757 R	#50-2155    51-2168   
TQCCEN	  001024 R	#50-2156    52-2196   
TQCSYN	  001070 R	#50-2157    51-2183    52-2229   
TQESYN	  002115 R	#63-2691    64-2710   
TQEXIT	  002071 R	#63-2690    64-2699   
TQMCFG	  001115 R	#53-2265    54-2290   
TQMCTE	  001261 R	#53-2272    55-2369   
TQMCTN	  001211 R	#53-2268    55-2328   
TQMI2H	  001574 R	#53-2280    56-2444   
TQMMCE	  001521 R	#53-2278    56-2439   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TQMMDE	  001447 R	#53-2277    56-2441   
TQMMOD	  001374 R	#53-2276    56-2383   
TQMNEM	  001337 R	#53-2274    55-2372   
TQMSYN	  001164 R	#53-2266    54-2305    55-2367    56-2437   
TQSDLG	  000671 R	#46-2004    47-2013   
TQSSYN	  000732 R	#46-2005    47-2026   
TQXINT	  001644 R	#58-2498    59-2520   
TQXI2H	  001727 R	#58-2503    59-2560   
TQXSYN	  001702 R	#58-2502    59-2558   
TRSPRF	  003112 R	#98-4549    99-4580   
TRSRSM	  003146 R	#98-4556    99-4577   
TRTBTF	  000036 R	#9-385      15-707    
TRTMMF	  000000 R	#9-384      15-689    
TSMMI1	  003617 R	#119-5720   120-5792  
TSTBSM	  003055 R	#96-4417    97-4487   
TTILUN	= 000001	#8-327      44-1894   
TTOLUN	= 000002	#8-328      44-1895   
TXBIMM	  003011 R	#92-4209    94-4322   
TXCHLE	  004401 R	#131-6377   136-6550  
TXCSFL	  004431 R	#131-6378   133-6454  
TXDHD 	  004073 R	#123-6033   123-6035   124-6045  
TXDHL 	= 000052	#123-6035   124-6046  
TXTPER	  003267 R	#104-4868   107-5047  
TXTPRF	  003370 R	#104-4869   107-5059  
TXT2MG	  003235 R	#104-4867   105-4905  
T.TIL 	= 000040  G	#13-579     13-580    
T.TOL 	= 000111  G	#13-581     13-582    
T.YPL 	= 000005  G	#11-481     57-2457    68-2879    103-4770   121-5888   121-5889   122-5942   125-6129   125-6130  
UNASG1	= 000032	#3-104     
UNASG2	= 000033	#3-104     
UNASG3	= 000034	#3-104     
UNASG4	= 000035	#3-104     
UNASG5	= 000036	#3-104     
UNASG6	= 000037	#3-104     
WEP   	= 000010	#3-104     
W.10L 	= 000005	#6-222     
X.MEM 	= 000000	#2-97       11-488     53-2267    53-2273    55-2335    55-2358    55-2371    58-2493    103-4799  
                         104-4838   110-5209   110-5221   110-5242   122-5991  
ZSTOP 	= 040000	#3-104     
$ACRAM	  011232 RG	 75-3325    75-3325    81-3565    81-3565    82-3633    82-3633   #83-3728   
$ADRAM	  011750 RG	 85-3808    85-3808    86-3860    86-3860   #87-3909   
$ARPA 	= ******	 2-69       2-75       107-5006   107-5050   108-5082  
$ASCIZ	  000412 RG	#17-772     17-773     122-5947   122-5947   127-6223   127-6223   127-6239   127-6239   128-6275  
                         128-6275  
$BURST	  021310 RG	 136-6527   136-6527   137-6597  #138-6611  
$CFGBT	  000150 RG	#15-691     47-2045    62-2656   
$CFGCA	  000022 RG	#15-661     51-2192    52-2226    52-2228   
$CFGMM	  000066 RG	#15-677     54-2322    55-2366    56-2436    59-2557   
$CFGRM	  000010 RG	#15-657    
$CLOSE	  001334 RG	#30-1290    66-2802    66-2802    66-2815    68-2906    68-2906    68-2954    70-3082    70-3082   
                         75-3329    75-3329    94-4320    94-4320   
$DELET	  000640 RG	#23-1009    70-3087    70-3087   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$DFRD 	  021502 RG	 49-2119    49-2119    82-3643    82-3643    82-3698    82-3698    86-3867    86-3867    86-3875   
                         86-3875    86-3888    86-3888    94-4316    94-4316    107-5014   107-5014   137-6571   137-6571  
                         137-6576   137-6576   137-6581   137-6581   137-6592   137-6592  #140-6699   152-7111   152-7111  
$DFWR 	  021610 RG	 81-3604    81-3604    81-3615    83-3735    83-3735    83-3743    83-3743    85-3840    87-3937   
                         87-3937    97-4475    97-4475    97-4479    97-4479    101-4662   101-4662   101-4665   101-4665  
                         135-6502   138-6621   138-6621   138-6624   138-6624   138-6636   138-6636   138-6642   138-6642  
                        #142-6771   152-7132   152-7132   155-7252   155-7252  
$DFXC 	  022006 RG	 48-2071    48-2071    49-2113    49-2113    49-2115    49-2115    75-3328    75-3328    82-3636   
                         82-3636    86-3863    86-3863    87-3940    101-4667   103-4759   103-4759   120-5820   120-5820  
                         132-6400   132-6400   132-6403   132-6403   133-6435   133-6435   133-6438   133-6438   133-6442  
                         133-6442   133-6453   136-6520   136-6520   136-6537   136-6537   136-6543   136-6543   136-6546  
                         136-6546   137-6586   137-6586   138-6614   138-6614   138-6627   138-6627   138-6645   143-6810  
                         143-6810  #145-6863   149-7005   149-7005   152-7096   152-7096   152-7116   152-7116   152-7128  
                         152-7128   152-7145   152-7145  
$DLGBT	  005536 RG	 15-688     54-2317   #62-2628    64-2712   
$DLGCA	  004016 RG	 15-660    #51-2162    52-2207    54-2310   
$DLGCT	  004540 RG	 15-673    #55-2327    55-2368    55-2370    55-2373    56-2392    59-2541   
$DLGEN	  003350 RG	 15-656     15-710    #47-2010    64-2713   
$DLGEX	  005712 RG	 15-705     62-2647   #64-2696   
$DLGIL	  005374 RG	 55-2363   #59-2512   
$DLGMM	  004352 RG	 15-668     51-2188   #54-2286    55-2341    62-2644   
$DLGRM	= ******  GX	 47-2030    51-2185    54-2311   
$DPOS 	  022136 RG	 89-4092    89-4092    94-4309    94-4309    95-4339    95-4339    95-4351    95-4351    97-4470   
                         97-4470    108-5105   108-5105   108-5109   108-5109   108-5124   108-5128   108-5128   108-5132  
                         108-5132   108-5136   108-5136   120-5817   120-5817  #147-6939   154-7221   154-7221   154-7225  
                         154-7225  
$DSPPT	  000050 RG	#15-669     54-2318   
$DSW  	= ******  GX	 28-1229   *28-1231    42-1781    143-6805  
$DTRWS	  000304 RG	#16-737     152-7103   152-7103  
$DTRW1	  000266 RG	#16-733     133-6444   133-6444   134-6474   134-6474   136-6529   136-6529   149-7008   149-7008  
$DTRW2	  000274 RG	#16-735     152-7099   152-7099  
$DTRW3	  000314 RG	#16-739    
$ENTER	  001144 RG	#28-1203    70-3034    70-3034   
$ERROR	  000242 RG	 15-658     15-664     15-666     15-670     15-680     15-682     15-690     15-696     15-700    
                        #15-709     15-713     97-4492    99-4581   
$EXAM 	  022240 RG	 79-3483    79-3483    103-4756   103-4756   108-5101   108-5119   108-5119   120-5827  #148-6967  
                         154-7232   154-7232  
$EXBLD	  012674 RG	 15-701     15-701    #93-4250   
$EXCT 	  020344 RG	 79-3479    79-3479    91-4155    91-4155    91-4158    91-4158    93-4266    93-4266    97-4443   
                         97-4443    97-4452    97-4452    101-4657   101-4657   105-4891   105-4891   107-5024   107-5024  
                         107-5057   107-5057   107-5062   107-5062   108-5112   108-5112   108-5115   108-5115   108-5139  
                         108-5139  #132-6395   154-7228   154-7228  
$EXIT 	  000252 RG	 15-704    #15-712     45-1961    47-2046    64-2720    99-4579   
$EXTEN	= ******  GX	 40-1720    40-1720   
$FILE 	  006572 RG	 15-712     15-712    #70-3019    97-4437    97-4437    99-4569    99-4569   
$FILHL	  015732 RG	 111-5320   111-5320  #115-5512  
$GETCA	  006032 RG	 15-663     15-663     15-695     15-695    #66-2777   
$GETMM	  006232 RG	 15-681     15-681    #68-2875   
$INIT 	  003024 RG	 15-655     15-655    #45-1913   
$IOERR	  002610 RG	 23-1025    26-1144    28-1232    30-1318   #42-1777    74-3280    74-3280    93-4272   
$KLMR 	  022452 RG	 49-2103    49-2103    74-3274    74-3274    101-4649   101-4649   136-6534   136-6534   143-6807  
                         149-7002   149-7002  #152-7093   155-7255  
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$KLSR 	  022674 RG	 83-3730    83-3730    87-3933    87-3933   #152-7140  
$LDAR 	  020704 RG	 132-6397   132-6397   133-6432   133-6432  #135-6495  
$LDNGO	= ******  GX	 89-4020    89-4020    103-4744   103-4744   120-5740   120-5740  
$LOOKU	  000772 RG	#26-1117    66-2780    66-2780    68-2892    68-2892    70-3028    70-3028    74-3269    74-3269   
                         93-4259    93-4259   
$MBPHS	  021142 RG	 135-6498   135-6498  #137-6567  
$MCBLD	  007330 RG	 15-657     15-657    #74-3251   
$POWER	  013574 RG	 64-2721   #99-4569   
$PURGE	  001472 RG	 15-706     15-706    #32-1369    66-2816    66-2816    68-2956    68-2956    70-3095    70-3095   
                         78-3459    78-3459   
$RCRAM	  010630 RG	 49-2107    49-2107    76-3363    76-3363   #82-3631   
$RDRAM	  011540 RG	 77-3403    77-3403   #86-3855   
$READ 	  002042 RG	 26-1134    34-1461    34-1461    35-1490    35-1490    35-1513    35-1513   #36-1536   
$READB	  001766 RG	#35-1509    66-2804    66-2804    66-2810    66-2810    68-2908    68-2908    68-2913    68-2913   
                         68-2917    68-2917    70-3056    70-3056    93-4281    93-4281   
$READC	  001564 RG	#34-1437    66-2796    66-2796    68-2901    68-2901    68-2946    68-2946    70-3038    70-3038   
                         75-3315    75-3315    94-4291    94-4291   
$READS	  001622 RG	#34-1458    34-1462    66-2794    66-2794    68-2899    68-2899    68-2944    68-2944    70-3065   
                         70-3065   
$READW	  001672 RG	 34-1440    34-1440    34-1444   #35-1481    74-3298    74-3298    94-4294    94-4294   
$REPLT	  017522 RG	 15-685     15-685    #126-6159  
$REPPT	  017074 RG	 15-671     15-671    #122-5923  
$REPXT	  017372 RG	 122-5992  #124-6043  
$RSAVE	  000356 RG	#17-756     18-792     42-1777    78-3436    81-3562    82-3631    85-3802    86-3855    87-3909   
                         115-5512   122-5923   132-6395   133-6424   135-6495   137-6567   138-6611   147-6939   148-6967  
                         152-7093  
$SBDG 	  022754 RG	 105-4888   105-4888   106-4950   106-4950  #154-7213  
$SBMR 	  023074 RG	 103-4741   103-4741   120-5734   120-5734  #155-7249  
$SETCA	  012122 RG	 15-665     15-665     15-699     15-699    #89-4019   
$SETFN	  000730 RG	 23-1009    23-1009    23-1018    23-1018   #24-1045    26-1117    26-1117    26-1137    26-1137   
                         28-1203    28-1203    32-1379    32-1379   
$SETLT	  015232 RG	 15-683     15-683    #110-5210  
$SETMM	  016472 RG	 15-686     15-686    #120-5732  
$SETPT	  013762 RG	 15-669     15-669     15-679     15-679    #103-4741  
$SETXT	  014216 RG	 103-4802  #105-4886  
$START	  000000 RG	#15-655     169-7791  
$STRKL	  020434 RG	 97-4484    97-4484    99-4574    99-4574   #133-6424  
$SWEEP	  012632 RG	#91-4151    93-4250    93-4250    120-5732   120-5732  
$TENAD	  023742 RG	 124-6053   124-6053   127-6215   127-6215   127-6235   127-6235   128-6258   128-6258  #166-7647  
$TENST	  013310 RG	 94-4321   #97-4437   
$TOP10	= ******	 2-66       2-69       2-72       10-431     64-2716    64-2722    74-3253    74-3261    98-4522   
                         98-4544    98-4550    99-4582   
$TOP20	= 000001	 2-66      
$TRACK	  000424 RG	#18-792     81-3563    82-3632    83-3729    85-3803    86-3856    87-3910    132-6396   133-6425  
                         134-6471   136-6517   140-6703   142-6786   145-6875   147-6948   148-6972   152-7094   152-7141  
$TRB2F	= ******  GX	 42-1805    42-1805   
$TRB2I	  023266 RG	 122-5966   122-5966   124-6058   124-6058   129-6299   129-6299  #160-7403  
$TRB2O	  023130 RG	 18-807     18-807     42-1797    42-1797    78-3443    78-3443    79-3488    79-3488    122-5940  
                         122-5940   122-5981   122-5981  #157-7303  
$TRB2R	  023556 RG	#164-7557  
$TRF2B	= ******  GX	 47-2039    47-2039    62-2652    62-2652   
$TRI2B	  023362 RG	 52-2208    52-2208    55-2343    55-2343   #161-7443  
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$TRO2B	  023212 RG	#158-7338  
$TRR2B	  023450 RG	#163-7514  
$TTMSG	= ******  GX	 15-689     15-707     35-1520    36-1549    38-1637    40-1724    42-1813    45-1937    45-1946   
                         45-1960    45-1962    47-2013    47-2026    51-2168    51-2183    52-2196    52-2229    54-2290   
                         54-2305    55-2328    55-2367    55-2369    55-2372    56-2383    56-2437    56-2439    56-2441   
                         56-2444    59-2520    59-2558    59-2560    62-2633    62-2657    64-2699    64-2710    66-2784   
                         68-2896    68-2955    70-3088    70-3096    78-3445    78-3458    79-3497    89-4108    90-4136   
                         94-4322    97-4487    99-4577    99-4580    103-4807   105-4905   107-5078   110-5285   110-5289  
                         112-5372   120-5792   133-6454   136-6550   140-6714   142-6788   145-6879   147-6951   148-6980  
                         152-7121  
$TTRD 	= ******  GX	 47-2014    47-2014    51-2169    51-2169    52-2197    52-2197    54-2291    54-2291    55-2329   
                         55-2329    56-2384    56-2384    59-2521    59-2521    62-2634    62-2634    64-2700    64-2700   
$TTWR 	= ******  GX	 122-5931   122-5931   122-5987   122-5987   124-6047   124-6047   124-6065   124-6065   126-6161  
                         126-6161   130-6341  
$WCRAM	  010350 RG	 49-2110    49-2110    49-2122    76-3352    76-3352    76-3372    76-3372   #81-3562   
$WDRAM	  011360 RG	 77-3399    77-3399   #85-3802   
$WRD18	  024014 RG	#167-7681  
$WRD22	  024070 RG	 18-817     18-817     107-5074   107-5074   166-7659   166-7659  #167-7698  
$WRD36	  024152 RG	 18-829     18-829     107-5077   107-5077  #167-7716  
$WRITB	  002400 RG	 38-1633    38-1633   #39-1683    70-3058    70-3058    71-3121    71-3121    71-3124    71-3124   
                         71-3127    71-3127    71-3144    71-3144    71-3150    71-3150   
$WRITC	  002172 RG	#38-1604    70-3049    70-3049    71-3105    71-3105    71-3115    71-3115    71-3138    71-3138   
$WRITE	  002440 RG	 39-1663    39-1663    39-1687    39-1687   #40-1708    40-1721   
$WRITS	  002234 RG	 30-1306    30-1306   #38-1627   
$WRITW	  002304 RG	 38-1610    38-1610   #39-1654    70-3052    70-3052    71-3108    71-3118    71-3118    71-3141   
                         71-3141   
$WTKL 	  020624 RG	 120-5823   120-5823   132-6406  #134-6471   136-6523   136-6523   136-6540   136-6540  
$ZERAC	= ******  GX	 97-4439    97-4439    99-4571    99-4571   
$$    	= 000037	#15-655     15-655    #15-657     15-657    #15-663     15-663    #15-665     15-665    #15-669    
                         15-669    #15-671     15-671    #15-679     15-679    #15-681     15-681    #15-683     15-683    
                        #15-685     15-685    #15-686     15-686    #15-695     15-695    #15-699     15-699    #15-701    
                         15-701    #15-706     15-706    #15-712     15-712    #18-807     18-807    #18-817     18-817    
                        #18-829     18-829    #23-1009    23-1009   #23-1018    23-1018   #26-1117    26-1117   #26-1137   
                         26-1137   #28-1203    28-1203   #30-1306    30-1306   #32-1379    32-1379   #34-1440    34-1440   
                        #34-1461    34-1461   #35-1490    35-1490   #35-1513    35-1513   #38-1610    38-1610   #38-1633   
                         38-1633   #39-1663    39-1663   #39-1687    39-1687   #40-1720    40-1720   #42-1797    42-1797   
                        #42-1805    42-1805   #42-1812    42-1812   #47-2014    47-2014   #47-2029    47-2029   #47-2033   
                         47-2033   #47-2039    47-2039   #47-2044    47-2044   #48-2069    48-2069   #48-2071    48-2071   
                        #48-2074    48-2074   #49-2103    49-2103   #49-2107    49-2107   #49-2110    49-2110   #49-2113   
                         49-2113   #49-2115    49-2115   #49-2119    49-2119   #51-2169    51-2169   #52-2197    52-2197   
                        #52-2208    52-2208   #54-2291    54-2291   #55-2327    55-2327   #55-2329    55-2329   #55-2343   
                         55-2343   #55-2356    55-2356   #55-2362    55-2362   #56-2384    56-2384   #59-2521    59-2521   
                        #62-2634    62-2634   #62-2652    62-2652   #64-2700    64-2700   #66-2780    66-2780   #66-2794   
                         66-2794   #66-2796    66-2796   #66-2802    66-2802   #66-2804    66-2804   #66-2810    66-2810   
                        #66-2816    66-2816   #68-2892    68-2892   #68-2899    68-2899   #68-2901    68-2901   #68-2906   
                         68-2906   #68-2908    68-2908   #68-2913    68-2913   #68-2917    68-2917   #68-2944    68-2944   
                        #68-2946    68-2946   #68-2956    68-2956   #70-3028    70-3028   #70-3034    70-3034   #70-3038   
                         70-3038   #70-3049    70-3049   #70-3052    70-3052   #70-3056    70-3056   #70-3058    70-3058   
                        #70-3065    70-3065   #70-3071    70-3071   #70-3078    70-3078   #70-3080    70-3080   #70-3082   
                         70-3082   #70-3087    70-3087   #70-3095    70-3095   #71-3105    71-3105   #71-3115    71-3115   
                        #71-3118    71-3118   #71-3121    71-3121   #71-3124    71-3124   #71-3127    71-3127   #71-3138   
                         71-3138   #71-3141    71-3141   #71-3144    71-3144   #71-3150    71-3150   #74-3269    74-3269   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #74-3274    74-3274   #74-3280    74-3280   #74-3298    74-3298   #75-3315    75-3315   #75-3325   
                         75-3325   #75-3328    75-3328   #75-3329    75-3329   #76-3352    76-3352   #76-3357    76-3357   
                        #76-3363    76-3363   #76-3372    76-3372   #76-3380    76-3380   #77-3393    77-3393   #77-3399   
                         77-3399   #77-3403    77-3403   #77-3420    77-3420   #78-3443    78-3443   #78-3459    78-3459   
                        #79-3479    79-3479   #79-3483    79-3483   #79-3488    79-3488   #81-3565    81-3565   #81-3604   
                         81-3604   #82-3633    82-3633   #82-3636    82-3636   #82-3643    82-3643   #82-3698    82-3698   
                        #83-3730    83-3730   #83-3733    83-3733   #83-3735    83-3735   #83-3741    83-3741   #83-3743   
                         83-3743   #85-3808    85-3808   #85-3811    85-3811   #85-3814    85-3814   #85-3833    85-3833   
                        #86-3860    86-3860   #86-3863    86-3863   #86-3867    86-3867   #86-3875    86-3875   #86-3888   
                         86-3888   #87-3933    87-3933   #87-3937    87-3937   #89-4020    89-4020   #89-4092    89-4092   
                        #91-4155    91-4155   #91-4158    91-4158   #93-4250    93-4250   #93-4259    93-4259   #93-4266   
                         93-4266   #93-4281    93-4281   #94-4291    94-4291   #94-4294    94-4294   #94-4309    94-4309   
                        #94-4316    94-4316   #94-4320    94-4320   #95-4339    95-4339   #95-4347    95-4347   #95-4351   
                         95-4351   #97-4437    97-4437   #97-4439    97-4439   #97-4443    97-4443   #97-4452    97-4452   
                        #97-4470    97-4470   #97-4475    97-4475   #97-4479    97-4479   #97-4484    97-4484   #97-4488   
                         97-4488   #99-4569    99-4569   #99-4571    99-4571   #99-4572    99-4572   #99-4574    99-4574   
                        #99-4578    99-4578   #101-4649   101-4649  #101-4657   101-4657  #101-4662   101-4662  #101-4665  
                         101-4665  #103-4741   103-4741  #103-4744   103-4744  #103-4756   103-4756  #103-4759   103-4759  
                        #105-4888   105-4888  #105-4891   105-4891  #105-4900   105-4900  #105-4910   105-4910  #105-4915  
                         105-4915  #105-4923   105-4923  #106-4950   106-4950  #106-4955   106-4955  #107-5009   107-5009  
                        #107-5014   107-5014  #107-5024   107-5024  #107-5048   107-5048  #107-5053   107-5053  #107-5057  
                         107-5057  #107-5060   107-5060  #107-5062   107-5062  #107-5074   107-5074  #107-5077   107-5077  
                        #108-5105   108-5105  #108-5109   108-5109  #108-5112   108-5112  #108-5115   108-5115  #108-5119  
                         108-5119  #108-5128   108-5128  #108-5132   108-5132  #108-5136   108-5136  #108-5139   108-5139  
                        #110-5262   110-5262  #110-5274   110-5274  #111-5320   111-5320  #111-5324   111-5324  #116-5548  
                         116-5548  #120-5732   120-5732  #120-5734   120-5734  #120-5740   120-5740  #120-5756   120-5756  
                        #120-5765   120-5765  #120-5817   120-5817  #120-5820   120-5820  #120-5823   120-5823  #122-5931  
                         122-5931  #122-5940   122-5940  #122-5947   122-5947  #122-5966   122-5966  #122-5981   122-5981  
                        #122-5987   122-5987  #124-6047   124-6047  #124-6053   124-6053  #124-6058   124-6058  #124-6065  
                         124-6065  #126-6161   126-6161  #127-6215   127-6215  #127-6217   127-6217  #127-6220   127-6220  
                        #127-6223   127-6223  #127-6225   127-6225  #127-6226   127-6226  #127-6235   127-6235  #127-6237  
                         127-6237  #127-6239   127-6239  #127-6240   127-6240  #128-6258   128-6258  #128-6260   128-6260  
                        #128-6269   128-6269  #128-6275   128-6275  #128-6279   128-6279  #128-6280   128-6280  #129-6299  
                         129-6299  #132-6397   132-6397  #132-6400   132-6400  #132-6403   132-6403  #133-6432   133-6432  
                        #133-6435   133-6435  #133-6438   133-6438  #133-6442   133-6442  #133-6444   133-6444  #134-6474  
                         134-6474  #135-6496   135-6496  #135-6498   135-6498  #136-6520   136-6520  #136-6523   136-6523  
                        #136-6527   136-6527  #136-6529   136-6529  #136-6534   136-6534  #136-6537   136-6537  #136-6540  
                         136-6540  #136-6543   136-6543  #136-6546   136-6546  #137-6571   137-6571  #137-6576   137-6576  
                        #137-6581   137-6581  #137-6586   137-6586  #137-6592   137-6592  #138-6614   138-6614  #138-6621  
                         138-6621  #138-6624   138-6624  #138-6627   138-6627  #138-6636   138-6636  #138-6642   138-6642  
                        #142-6772   142-6772  #143-6810   143-6810  #147-6940   147-6940  #147-6941   147-6941  #148-6968  
                         148-6968  #148-6969   148-6969  #149-7002   149-7002  #149-7005   149-7005  #149-7008   149-7008  
                        #152-7096   152-7096  #152-7099   152-7099  #152-7103   152-7103  #152-7106   152-7106  #152-7111  
                         152-7111  #152-7116   152-7116  #152-7119   152-7119  #152-7128   152-7128  #152-7132   152-7132  
                        #152-7145   152-7145  #154-7221   154-7221  #154-7225   154-7225  #154-7228   154-7228  #154-7232  
                         154-7232  #155-7252   155-7252  #166-7659   166-7659  #167-7682   167-7682  #167-7685   167-7685  
                        #167-7687   167-7687  #167-7699   167-7699  #167-7703   167-7703  #167-7705   167-7705  #167-7717  
                         167-7717  #167-7720   167-7720  #167-7722   167-7722  #167-7727   167-7727  #167-7729   167-7729  
$$$ARG	= 000006	#9-377      9-377     #9-377      9-377     #9-377      9-377     #9-377      9-377     #19-872    
                         19-872    #19-872     19-872    #19-872     19-872    #19-872     19-872    #19-872     19-872    
                        #19-872     19-872    #19-872     19-872    #19-873     19-873    #19-873     19-873    #19-874    
                         19-874    #19-874     19-874    #19-874     19-874    #19-874     19-874    #19-874     19-874    
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #19-874     19-874    #19-874     19-874    #25-1094    25-1094   #25-1094    25-1094   #25-1094   
                         25-1094   #25-1094    25-1094   #25-1094    25-1094   #25-1094    25-1094   #25-1094    25-1094   
                        #25-1095    25-1095   #25-1095    25-1095   #25-1095    25-1095   #25-1095    25-1095   #25-1095   
                         25-1095   #25-1095    25-1095   #25-1096    25-1096   #25-1096    25-1096   #25-1096    25-1096   
                        #25-1096    25-1096   #25-1096    25-1096   #25-1096    25-1096   #25-1096    25-1096   #27-1180   
                         27-1180   #27-1180    27-1180   #27-1180    27-1180   #27-1180    27-1180   #27-1180    27-1180   
                        #27-1181    27-1181   #27-1181    27-1181   #27-1181    27-1181   #27-1181    27-1181   #27-1181   
                         27-1181   #27-1181    27-1181   #27-1181    27-1181   #27-1182    27-1182   #27-1182    27-1182   
                        #27-1182    27-1182   #27-1182    27-1182   #27-1182    27-1182   #27-1182    27-1182   #27-1183   
                         27-1183   #29-1268    29-1268   #29-1269    29-1269   #29-1269    29-1269   #29-1269    29-1269   
                        #31-1354    31-1354   #31-1355    31-1355   #31-1356    31-1356   #31-1357    31-1357   #31-1357   
                         31-1357   #31-1357    31-1357   #31-1357    31-1357   #31-1357    31-1357   #31-1357    31-1357   
                        #31-1357    31-1357   #36-1541    36-1541    36-1541    36-1541    36-1541    36-1541    36-1541   
                         36-1541    36-1541    36-1541    36-1541    36-1541   #40-1708    40-1708    40-1708    40-1708   
                         40-1708    40-1708    40-1708    40-1708    40-1708    40-1708    40-1708    40-1708   #44-1894   
                         44-1894   #44-1894    44-1894   #44-1894    44-1894   #44-1895    44-1895   #44-1895    44-1895   
                        #44-1895    44-1895   #44-1897    44-1897   #44-1897    44-1897   #44-1897    44-1897   #44-1899   
                         44-1899   #44-1899    44-1899   #44-1899    44-1899   #44-1900    44-1900   #44-1900    44-1900   
                        #44-1900    44-1900   #44-1901    44-1901   #44-1901    44-1901   #44-1901    44-1901   #45-1942   
                         45-1942    45-1942    45-1942    45-1942    45-1942    45-1942    45-1942    45-1942    45-1942   
                         45-1942    45-1942   
$$$GLB	= ******	 9-377      9-377      9-377      9-377      9-377      9-377      9-377      9-377      19-872    
                         19-872     19-872     19-872     19-872     19-872     19-872     19-872     19-873     19-873    
                         19-873     19-873     19-873     19-873     19-873     19-873     19-874     19-874     19-874    
                         19-874     19-874     19-874     19-874     19-874     25-1093    25-1093    25-1093    25-1094   
                         25-1094    25-1094    25-1094    25-1094    25-1094    25-1094    25-1094    25-1095    25-1095   
                         25-1095    25-1095    25-1095    25-1095    25-1095    25-1095    25-1096    25-1096    25-1096   
                         25-1096    25-1096    25-1096    25-1096    25-1096    27-1179    27-1179    27-1179    27-1180   
                         27-1180    27-1180    27-1180    27-1180    27-1180    27-1180    27-1180    27-1181    27-1181   
                         27-1181    27-1181    27-1181    27-1181    27-1181    27-1181    27-1182    27-1182    27-1182   
                         27-1182    27-1182    27-1182    27-1182    27-1182    27-1183    27-1183    27-1183    27-1183   
                         27-1183    27-1183    27-1183    27-1183    29-1268    29-1268    29-1268    29-1268    29-1268   
                         29-1268    29-1268    29-1268    29-1269    29-1269    29-1269    29-1269    29-1269    29-1269   
                         29-1269    29-1269    31-1354    31-1354    31-1354    31-1354    31-1354    31-1354    31-1354   
                         31-1354    31-1355    31-1355    31-1355    31-1355    31-1355    31-1355    31-1355    31-1355   
                         31-1356    31-1356    31-1356    31-1356    31-1356    31-1356    31-1356    31-1356    31-1357   
                         31-1357    31-1357    31-1357    31-1357    31-1357    31-1357    31-1357    44-1894    44-1894   
                         44-1894    44-1894    44-1895    44-1895    44-1895    44-1895    44-1897    44-1897    44-1897   
                         44-1897    44-1899    44-1899    44-1899    44-1899    44-1900    44-1900    44-1900    44-1900   
                         44-1901    44-1901    44-1901    44-1901   
$$$OST	= 000010	#9-377      9-377      9-377     #9-377      9-377      9-377     #9-377      9-377      9-377     
                        #9-377      9-377      9-377     #9-377      9-377      9-377     #9-377      9-377      9-377     
                        #9-377      9-377     #19-872     19-872     19-872    #19-872     19-872     19-872    #19-872    
                         19-872     19-872    #19-872     19-872     19-872    #19-872     19-872     19-872    #19-872    
                         19-872     19-872    #19-872     19-872    #19-873     19-873     19-873    #19-873     19-873    
                         19-873    #19-873     19-873     19-873    #19-873     19-873     19-873    #19-873     19-873    
                         19-873    #19-873     19-873     19-873    #19-873     19-873    #19-874     19-874     19-874    
                        #19-874     19-874     19-874    #19-874     19-874     19-874    #19-874     19-874     19-874    
                        #19-874     19-874     19-874    #19-874     19-874     19-874    #19-874     19-874    #25-1093   
                         25-1093    25-1093   #25-1093    25-1093    25-1093   #25-1093   #25-1094    25-1094    25-1094   
                        #25-1094    25-1094    25-1094   #25-1094    25-1094    25-1094   #25-1094    25-1094    25-1094   
                        #25-1094    25-1094    25-1094   #25-1094    25-1094    25-1094   #25-1094    25-1094   #25-1095   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         25-1095    25-1095   #25-1095    25-1095    25-1095   #25-1095    25-1095    25-1095   #25-1095   
                         25-1095    25-1095   #25-1095    25-1095    25-1095   #25-1095    25-1095    25-1095   #25-1095   
                         25-1095   #25-1096    25-1096    25-1096   #25-1096    25-1096    25-1096   #25-1096    25-1096   
                         25-1096   #25-1096    25-1096    25-1096   #25-1096    25-1096    25-1096   #25-1096    25-1096   
                         25-1096   #25-1096    25-1096   #27-1179    27-1179    27-1179   #27-1179    27-1179    27-1179   
                        #27-1179   #27-1180    27-1180    27-1180   #27-1180    27-1180    27-1180   #27-1180    27-1180   
                         27-1180   #27-1180    27-1180    27-1180   #27-1180    27-1180    27-1180   #27-1180    27-1180   
                         27-1180   #27-1180    27-1180   #27-1181    27-1181    27-1181   #27-1181    27-1181    27-1181   
                        #27-1181    27-1181    27-1181   #27-1181    27-1181    27-1181   #27-1181    27-1181    27-1181   
                        #27-1181    27-1181    27-1181   #27-1181    27-1181   #27-1182    27-1182    27-1182   #27-1182   
                         27-1182    27-1182   #27-1182    27-1182    27-1182   #27-1182    27-1182    27-1182   #27-1182   
                         27-1182    27-1182   #27-1182    27-1182    27-1182   #27-1182    27-1182   #27-1183    27-1183   
                         27-1183   #27-1183    27-1183    27-1183   #27-1183    27-1183    27-1183   #27-1183    27-1183   
                         27-1183   #27-1183    27-1183    27-1183   #27-1183    27-1183    27-1183   #27-1183    27-1183   
                        #29-1268    29-1268    29-1268   #29-1268    29-1268    29-1268   #29-1268    29-1268    29-1268   
                        #29-1268    29-1268    29-1268   #29-1268    29-1268    29-1268   #29-1268    29-1268    29-1268   
                        #29-1268    29-1268   #29-1269    29-1269    29-1269   #29-1269    29-1269    29-1269   #29-1269   
                         29-1269    29-1269   #29-1269    29-1269    29-1269   #29-1269    29-1269    29-1269   #29-1269   
                         29-1269    29-1269   #29-1269    29-1269   #31-1354    31-1354    31-1354   #31-1354    31-1354   
                         31-1354   #31-1354    31-1354    31-1354   #31-1354    31-1354    31-1354   #31-1354    31-1354   
                         31-1354   #31-1354    31-1354    31-1354   #31-1354    31-1354   #31-1355    31-1355    31-1355   
                        #31-1355    31-1355    31-1355   #31-1355    31-1355    31-1355   #31-1355    31-1355    31-1355   
                        #31-1355    31-1355    31-1355   #31-1355    31-1355    31-1355   #31-1355    31-1355   #31-1356   
                         31-1356    31-1356   #31-1356    31-1356    31-1356   #31-1356    31-1356    31-1356   #31-1356   
                         31-1356    31-1356   #31-1356    31-1356    31-1356   #31-1356    31-1356    31-1356   #31-1356   
                         31-1356   #31-1357    31-1357    31-1357   #31-1357    31-1357    31-1357   #31-1357    31-1357   
                         31-1357   #31-1357    31-1357    31-1357   #31-1357    31-1357    31-1357   #31-1357    31-1357   
                         31-1357   #31-1357    31-1357   #44-1894    44-1894    44-1894   #44-1894    44-1894    44-1894   
                        #44-1894    44-1894    44-1894   #44-1894   #44-1895    44-1895    44-1895   #44-1895    44-1895   
                         44-1895   #44-1895    44-1895    44-1895   #44-1895   #44-1897    44-1897    44-1897   #44-1897   
                         44-1897    44-1897   #44-1897    44-1897    44-1897   #44-1897   #44-1899    44-1899    44-1899   
                        #44-1899    44-1899    44-1899   #44-1899    44-1899    44-1899   #44-1899   #44-1900    44-1900   
                         44-1900   #44-1900    44-1900    44-1900   #44-1900    44-1900    44-1900   #44-1900   #44-1901   
                         44-1901    44-1901   #44-1901    44-1901    44-1901   #44-1901    44-1901    44-1901   #44-1901   
$$$T1 	= 000014	#36-1541    36-1541   #40-1708    40-1708   #44-1894    44-1894    44-1894   #44-1894    44-1894   
                         44-1894   #44-1894    44-1894    44-1894   #44-1895    44-1895    44-1895   #44-1895    44-1895   
                         44-1895   #44-1895    44-1895    44-1895   #44-1897    44-1897    44-1897   #44-1897    44-1897   
                         44-1897   #44-1897    44-1897    44-1897   #44-1899    44-1899    44-1899   #44-1899    44-1899   
                         44-1899   #44-1899    44-1899    44-1899   #44-1900    44-1900    44-1900   #44-1900    44-1900   
                         44-1900   #44-1900    44-1900    44-1900   #44-1901    44-1901    44-1901   #44-1901    44-1901   
                         44-1901   #44-1901    44-1901    44-1901   #45-1942    45-1942   
.BRCLK	= 005000	#3-104      138-6626   138-6644  
.BTADR	  001124 RG	#13-593    *94-4293   *94-4296    95-4332    95-4333    95-4335    95-4343    95-4345    97-4481   
.CACHN	  000041 RG	#11-450     52-2212    66-2786    66-2809    71-3148    89-4028    89-4075    90-4128   
.CASW 	  000033 RG	#10-417     15-691    *48-2076   *48-2079    51-2162    54-2308    91-4151    97-4448    101-4652  
.CATIF	  000666 RG	#12-551     106-4948   110-5257   117-5597  
.CATTB	  000466 RG	#12-549     110-5252   117-5606   117-5617   120-5750   126-6187  
.CECLK	= 004000	#3-104      136-6545   151-7062   151-7074  
.CKSW 	  000031 RG	#10-414     143-6800  *145-6868  *145-6871  *145-6878  
.CLRMR	= 006000	#3-104      151-7063   151-7075  
.CLRUN	= 010000	#3-104      48-2070    136-6519   152-7095  
.COMEF	= ******  GX	 45-1956   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.CONBT	= 012000	#3-104      103-4758   120-5819   132-6399   133-6437  
.CSHRG	= 164000	#3-104     
.CTLMD	  000121 RG	#11-508     56-2408    56-2421    57-2461    59-2553    68-2883   *103-4748  *103-4795  *105-4893  
                         105-4912  *105-4914   122-5935   122-5971  
.CTLSW	  000221 RG	#11-510     55-2347   *55-2349   *55-2361   *55-2377   *57-2454   *57-2463   *68-2876   *68-2885   
                         68-2911   *68-2942   *68-2952    71-3112    110-5218   110-5246  *110-5251  *117-5603  *117-5614  
                         118-5642   118-5652   120-5746   126-6179  
.CTLTP	  000061 RG	#11-507     55-2359    56-2399    57-2455    68-2877    68-2915    68-2921    71-3123   *103-4747  
                        *103-4764   103-4800   110-5220   118-5644   120-5768   122-5933   122-5980   124-6043   126-6182  
                         128-6272  
.CTLUS	  000161 RG	#11-509    *56-2396   *56-2410    56-2423   *56-2425   *57-2461   *57-2464   *59-2555   *68-2883   
                        *68-2886    68-2919   *68-2920    71-3126    110-5256   118-5646   118-5654   127-6224  
.DATE3	= ******  GX	*45-1916   
.DBSW 	  000027 RG	#10-410    *47-2031   *62-2628   
.DCSW 	  000025 RG	#10-407     15-661    *51-2164   *51-2191   *52-2225   *52-2227    66-2777   *66-2785    70-3019   
                         70-3062    70-3069   *70-3090   
.DESW 	  000032 RG	#10-415    *143-6799  *145-6869  *145-6872   149-7000  *149-7015  
.DFBLK	  000704 RG	#13-564     139-6680   141-6751   144-6846  
.DFRBK	  000712 RG	#13-566     140-6703   140-6705  
.DFRG1	  000720 RG	#13-568    
.DFRG2	  000722 RG	#13-569    
.DFRG3	  000726 RG	#13-571    
.DFSTA	  000724 RG	#13-570    
.DFWBK	  000704 RG	#13-565     142-6776   142-6786  
.DLGSW	  000022 RG	#10-403     15-703    *15-709    *45-1913   *45-1919    45-1954    47-2010   *47-2012   *47-2028   
                         51-2165    54-2287    62-2630    64-2696   
.DMASZ	  000262 RG	#11-519    *105-4895   105-4903  *105-4906  *105-4920   110-5249   122-5958   124-6049   126-6166  
.DMATB	  000264 RG	#11-520     105-4894   110-5248   122-5960   124-6048   126-6165  
.DMSW 	  000026 RG	#10-409     15-677    *54-2286   *54-2321   *55-2365   *56-2435   *59-2556    68-2889   *68-2897   
                         70-3021    70-3045    70-3073   *70-3092   
.DREG 	  000720 RG	 13-561    #13-567    *16-741     16-745     139-6680   141-6751   144-6846  
.DRLTC	= 015000	#3-104      86-3862   
.DRSW 	  000024 RG	#10-405     76-3346    76-3360    77-3396    78-3455    79-3467   
.DSACF	= 066000	#3-104     
.DSIOJ	= 065000	#3-104     
.DTEDT	  000730 RG	 13-560    #13-573     16-740    *16-744    *152-7098  *152-7101  
.EASW 	  000034 RG	#10-419    *48-2082   *48-2085    74-3258    82-3707    108-5099   108-5122  
.EIOJA	= 067000	#3-104      151-7064  
.FEMOD	= ******  GX	 45-1958   
.GAPSZ	  000364 RG	#11-529    *110-5238   112-5351   112-5357  *112-5360  *112-5370   126-6201  
.GAPTB	  000366 RG	#11-530     110-5240   110-5280   126-6200  
.GFNR 	= 102000	#3-104     
.HOLE 	  003274 RG	#109-5186  *110-5239  *110-5268  *110-5269   111-5313  *111-5319   111-5322  *111-5322  *111-5323  
                         111-5326  *111-5329   112-5355   112-5361   112-5363   112-5366   112-5368  *112-5368   115-5513  
                         115-5514   116-5539   116-5546   117-5582  *117-5584  
.ILMAX	  000055 RG	#11-485     116-5535   118-5665  
.ILMIN	  000056 RG	#11-486     116-5537  
.INICL	= 070000	#3-104      151-7059  
.IRLTC	= 014000	#3-104      87-3939   
.KLISV	  000036 RG	#10-442    *45-1914    51-2186    51-2189    54-2315    54-2319    62-2645    64-2714    97-4455   
.KLIWD	= ******  GX	 45-1914   *45-1918   
.KLREG	  000672 RG	#13-558    *16-733    *16-735    *16-737    *16-739    *16-740     16-742    
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.LCRDL	= 052000	#3-104      83-3734   
.LCRDR	= 051000	#3-104      83-3742   
.LCRM1	= 057000	#3-104      80-3537   
.LCRM2	= 056000	#3-104      80-3538   
.LCRM3	= 055000	#3-104      80-3539   
.LCRM4	= 054000	#3-104      80-3540   
.LCRM5	= 053000	#3-104      81-3614   
.LDAR 	= 077000	#3-104      87-3936    135-6501  
.LDBRL	= 043000	#3-104      138-6623   138-6641   151-7056  
.LDBRR	= 042000	#3-104      138-6620   138-6635   151-7055   151-7060  
.LDCK1	= 046000	#3-104      97-4478    101-4664   151-7052  
.LDCK2	= 047000	#3-104      97-4474    101-4661   151-7053  
.LDDIS	= 045000	#3-104      151-7057  
.LDRJD	= 064000	#3-104      85-3826   
.LDRJV	= 063000	#3-104      85-3829   
.LDRM1	= 060000	#3-104      85-3828   
.LDRM2	= 061000	#3-104      85-3825   
.LDRM3	= 062000	#3-104      85-3820   
.LDSEL	= 044000	#3-104      151-7049  
.LTBEX	  000057 RG	#11-489    *110-5210  *110-5227  *110-5243  
.LTBIN	  000060 RG	#11-492    *110-5212  *110-5235   111-5311  *117-5604  *117-5615  
.MEMRS	= 076000	#3-104      151-7065   155-7251  
.MINT 	  000054 RG	#11-484    *103-4751  *103-4787   122-5927  
.NCACH	  000040 RG	#11-449     15-693     15-697    *52-2224   *66-2792   *66-2814    71-3135    89-4022    89-4037   
                         89-4076    90-4117    97-4450    101-4654  
.NOERR	= ******  GX	*48-2068   *97-4486   *99-4576   
.PCAB1	= 150000	#3-104     
.PCAB2	= 151000	#3-104     
.PCAB3	= 152000	#3-104     
.PCAB4	= 153000	#3-104     
.RCRM1	= 147000	#3-104      80-3533   
.RCRM2	= 146000	#3-104      80-3534   
.RCRM3	= 145000	#3-104      80-3535   
.RCRM4	= 144000	#3-104      80-3536   
.RCSPF	= 141000	#3-104      82-3696   
.RDJ14	= 134000	#3-104      86-3887   
.RDJ71	= 135000	#3-104      86-3866   
.RDMAB	= 133000	#3-104      86-3874   
.SECLK	= 003000	#3-104      49-2112    82-3635   
.SETMR	= 007000	#3-104      145-6866   151-7051   151-7071  
.SETRN	= 011000	#3-104      133-6434  
.SSCLK	= 002000	#3-104      133-6441   137-6585   152-7115  
.STPCL	= 000000	#3-104      136-6542   138-6613   143-6809   151-7050   151-7073  
.STRCL	= 001000	#3-104      75-3327    101-4666   132-6402   133-6452   136-6536   145-6864   149-7004   151-7058  
                         151-7072  
.SYATT	  003256 RG	#14-643    *28-1226    29-1271   *30-1302   *30-1303   *30-1304   *30-1305    38-1606   *38-1608   
.SYFID	= 003224 RG	#14-635     19-873     25-1095    27-1180    27-1182   
.SYFNB	  003224 RG	#14-627     14-635     14-636     19-872     19-874     24-1046    25-1094    25-1096    27-1181   
                         31-1357    45-1942    45-1948   *45-1948    45-1949   *45-1949    45-1950   *45-1950   
.SYFNM	= 003232 RG	#14-636    
.SYIBA	  001142 RG	#14-605    *34-1464    35-1481   *35-1484    35-1492   *35-1493    35-1515   *35-1516   *36-1545   
.SYIBC	  001144 RG	#14-606     34-1458    34-1460   *34-1465   *35-1485    35-1488   *35-1494    35-1511   *35-1517   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        *36-1546   
.SYIBF	  001172 RG	 14-605    #14-611     14-615     25-1093    26-1120    26-1121    36-1541    36-1545   
.SYIFN	  001146 RG	#14-607     25-1098    25-1100   *26-1120   *26-1121    30-1315   
.SYIRC	  001140 RG	#14-604    *26-1133    34-1437   *34-1439   *34-1442    34-1458   *34-1460    34-1464    34-1465   
                        *34-1466   *35-1483   *35-1486   *35-1509    70-3047    70-3054    75-3320    76-3375    77-3415   
                         94-4297    95-4355   
.SYISW	  001136 RG	#14-600    *26-1130    30-1290   *30-1296    32-1369   *32-1372   
.SYIVB	  001166 RG	#14-610    *26-1131   *26-1132   *36-1536   *36-1537    36-1541    36-1541   
.SYOBA	  002174 RG	#14-615    *28-1223    30-1304    39-1654   *39-1657    39-1665   *39-1666    39-1689   *39-1690   
                        *40-1714   
.SYOBC	  002176 RG	#14-616    *28-1224    38-1629   *39-1658    39-1661   *39-1667    39-1685   *39-1691   *40-1715   
.SYOBF	  002224 RG	#14-621     27-1179    28-1206    28-1207    28-1223    30-1305    40-1708    40-1714   
.SYOFN	  002200 RG	#14-617     27-1185    27-1187   *28-1206   *28-1207    29-1273    29-1275    30-1317    32-1378   
.SYORC	  002172 RG	#14-614    *28-1225    38-1604   *38-1609   *38-1612    38-1627   *38-1631   *39-1656   *39-1659   
                        *39-1683   
.SYOSW	  001137 RG	#14-601    *28-1220    30-1297   *30-1312    32-1373   *32-1382   
.SYOVB	  002220 RG	#14-620    *28-1221   *28-1222    30-1302    30-1303    40-1708    40-1708   *40-1712   *40-1713   
.SYSTA	  001132 RG	#14-599     19-872     19-873     19-874     23-1012    23-1016    23-1021    25-1094    25-1095   
                         26-1124    26-1128    26-1135    26-1139    27-1180    27-1181    27-1182    28-1210    28-1214   
                         28-1218    29-1268    29-1269    30-1294    30-1310    36-1541    36-1543    36-1546    40-1708   
                         40-1710    40-1718    42-1783    45-1942    45-1944    66-2782    68-2894    70-3030    74-3278   
                         93-4270   
.TRKSW	  000030 RG	#10-412     18-794    
.TTIBF	  000732 RG	#13-580     47-2015    51-2170    52-2198    54-2292    55-2330    56-2385    59-2522    62-2635   
                         64-2701   
.TTOBF	  000772 RG	#13-582     122-5937   122-5985   124-6051   124-6063   126-6163   130-6339  
.TYPTB	  000046 RG	#11-459     11-481     57-2459    68-2881    103-4776   122-5949  
.UFNSW	  000023 RG	#10-404    *47-2032   *47-2043   *62-2629   *62-2655    74-3266    93-4256   
.USRFN	  001104 RG	#13-589     47-2035    62-2648    74-3268    93-4258   
.WORK 	  000014 RG	#10-397    
.WRMBX	= 071000	#3-104      151-7066  
.ZERO 	  000000 RG	#10-395     76-3350    89-4091    94-4307    95-4337    97-4466    97-4469    108-5118   108-5135  
                         120-5816   141-6752   151-7049   151-7052   151-7053   151-7055   151-7056   151-7057   151-7059  
                         151-7060   151-7064   151-7065   154-7223  
..DTP2	= ******  GX	 97-4488    97-4488    99-4578    99-4578   
..DTSP	= ******  GX	 48-2069    48-2069   
BIGKLINIT  CREATED BY  MACRO  ON 13-JAN-78 AT 10:47	PAGE 26

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$ 		#44-1865    44-1894    44-1895    44-1897    44-1899    44-1900    44-1901   
CALL  		#4-156      15-655     15-657     15-663     15-665     15-669     15-671     15-679     15-681     15-683    
                 15-685     15-686     15-695     15-699     15-701     15-706     15-712     18-807     18-817     18-829    
                 23-1009    23-1018    26-1117    26-1137    28-1203    30-1306    32-1379    34-1440    34-1461    35-1490   
                 35-1513    38-1610    38-1633    39-1663    39-1687    40-1720    42-1797    42-1805    42-1812    47-2014   
                 47-2029    47-2033    47-2039    47-2044    48-2069    48-2071    48-2074    49-2103    49-2107    49-2110   
                 49-2113    49-2115    49-2119    51-2169    52-2197    52-2208    54-2291    55-2327    55-2329    55-2343   
                 55-2356    55-2362    56-2384    59-2521    62-2634    62-2652    64-2700    66-2780    66-2794    66-2796   
                 66-2802    66-2804    66-2810    66-2816    68-2892    68-2899    68-2901    68-2906    68-2908    68-2913   
                 68-2917    68-2944    68-2946    68-2956    70-3028    70-3034    70-3038    70-3049    70-3052    70-3056   
                 70-3058    70-3065    70-3071    70-3078    70-3080    70-3082    70-3087    70-3095    71-3105    71-3115   
                 71-3118    71-3121    71-3124    71-3127    71-3138    71-3141    71-3144    71-3150    74-3269    74-3274   
                 74-3280    74-3298    75-3315    75-3325    75-3328    75-3329    76-3352    76-3357    76-3363    76-3372   
                 76-3380    77-3393    77-3399    77-3403    77-3420    78-3443    78-3459    79-3479    79-3483    79-3488   
                 81-3565    81-3604    82-3633    82-3636    82-3643    82-3698    83-3730    83-3733    83-3735    83-3741   
                 83-3743    85-3808    85-3811    85-3814    85-3833    86-3860    86-3863    86-3867    86-3875    86-3888   
                 87-3933    87-3937    89-4020    89-4092    91-4155    91-4158    93-4250    93-4259    93-4266    93-4281   
                 94-4291    94-4294    94-4309    94-4316    94-4320    95-4339    95-4347    95-4351    97-4437    97-4439   
                 97-4443    97-4452    97-4470    97-4475    97-4479    97-4484    97-4488    99-4569    99-4571    99-4572   
                 99-4574    99-4578    101-4649   101-4657   101-4662   101-4665   103-4741   103-4744   103-4756   103-4759  
                 105-4888   105-4891   105-4900   105-4910   105-4915   105-4923   106-4950   106-4955   107-5009   107-5014  
                 107-5024   107-5048   107-5053   107-5057   107-5060   107-5062   107-5074   107-5077   108-5105   108-5109  
                 108-5112   108-5115   108-5119   108-5128   108-5132   108-5136   108-5139   110-5262   110-5274   111-5320  
                 111-5324   116-5548   120-5732   120-5734   120-5740   120-5756   120-5765   120-5817   120-5820   120-5823  
                 122-5931   122-5940   122-5947   122-5966   122-5981   122-5987   124-6047   124-6053   124-6058   124-6065  
                 126-6161   127-6215   127-6217   127-6220   127-6223   127-6225   127-6226   127-6235   127-6237   127-6239  
                 127-6240   128-6258   128-6260   128-6269   128-6275   128-6279   128-6280   129-6299   132-6397   132-6400  
                 132-6403   133-6432   133-6435   133-6438   133-6442   133-6444   134-6474   135-6496   135-6498   136-6520  
                 136-6523   136-6527   136-6529   136-6534   136-6537   136-6540   136-6543   136-6546   137-6571   137-6576  
                 137-6581   137-6586   137-6592   138-6614   138-6621   138-6624   138-6627   138-6636   138-6642   142-6772  
                 143-6810   147-6940   147-6941   148-6968   148-6969   149-7002   149-7005   149-7008   152-7096   152-7099  
                 152-7103   152-7106   152-7111   152-7116   152-7119   152-7128   152-7132   152-7145   154-7221   154-7225  
                 154-7228   154-7232   155-7252   166-7659   167-7682   167-7685   167-7687   167-7699   167-7703   167-7705  
                 167-7717   167-7720   167-7722   167-7727   167-7729  
CALLR 		#4-165      23-1025    26-1134    26-1144    28-1232    30-1318    34-1444    49-2122    66-2815    68-2954   
                 71-3108    81-3615    85-3840    87-3940    89-4107    93-4272    101-4667   103-4802   108-5101   108-5124  
                 120-5827   122-5992   130-6341   132-6406   133-6453   135-6502   137-6597   138-6645   143-6807   155-7255  
CLEF$S		#44-1865   
DIR$  		#3-103     #15-714    #15-714    #16-742    #18-834    #23-1010   #23-1014   #23-1019   #26-1118   #26-1122   
                #26-1126   #26-1138   #28-1204   #28-1208   #28-1212   #28-1216   #28-1230   #30-1292   #30-1308   #32-1371   
                #32-1375   #32-1376   #32-1381   #36-1541   #36-1541   #40-1708   #40-1708   #45-1923   #45-1925   #45-1928   
                #45-1931   #45-1933   #45-1935   #45-1938   #45-1938   #45-1942   #45-1942   #45-1947   #45-1947   #140-6702  
                #142-6785  #143-6803  #145-6876  #147-6949  #148-6971  
ERROR 		#7-299     #9-