Google
 

Trailing-Edge - PDP-10 Archives - bb-m403a-bk - klinit.l20
There are 3 other files named klinit.l20 in the archive. Click here to see a list.
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25
TABLE OF CONTENTS

     8-  429	MOSDEF -- DIAGNOSTIC MEMORY BOOT MACRO COMPATABILITY PACKAGE
    12-  562	DMBMCP -- DTE-20 OPERATION MACROS
    32- 1155	REGISTER SAVE/RESTORE TRANSLATION MACROS
    52- 1773	$LDNGO	-- LOAD AC BLOCKS AND GO
    53- 1830	$ZERAC	-- ZERO AC SETS 0 TO 6
    54- 1861	$XCDT	-- INSTRUCTION EXECUTER
    56- 1974	$SETCA	-- CONFIGURE CACHE
    60- 2200	$MCBLD	-- LOAD THE RAMS
    68- 2688	$FILE	-- WRITE THE CONFIGURATION FILE
    70- 2932	$FILE	-- WRITE BOOTSTRAP RECORD
    71- 2971	$FILE	-- WRITE END-OF-FILE RECORD
    72- 2987	$FILE	-- WRITE MEMORY CONTROLLER RECORDS
    73- 3022	$FILE	-- WRITE CACHE RECORDS
    74- 3054	$FILE -- WRITE MICROCODE RECORDS
    76- 3129	$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES
    78- 3440	$CHKIM -- CHECK INTERNAL MEMORY MASK WORD
    79- 3569	$CHKMM -- CHECK MOS MEMORY CONFIGURATION
    81- 3718	$CONFG -- EDITOR DISPATCH
    82- 3753	CFGINT -- INTERNAL MEMORY CONFIGURATION EDITOR
    83- 3828	CFGEXT -- EXTERNAL MEMORY CONFIGURATION EDITOR
    84- 3869	CFGMOS -- MOS CONFIGURATION EDITOR
    85- 3929	$MAPMM -- MAP MOS CONTROLLER BLOCKS
    87- 3991	$SWEEP	-- SWEEP AND INVALIDATE THE CACHE
    89- 4064	$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG
    91- 4189	$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES
    96- 4388	$DELETE	-- DELETE A FILE
    97- 4418	$SETFN	-- SET FILE NAME IN FILE NAME BLOCK
    99- 4487	$IOERR	-- REPORT I/O ERROR
   102- 4603	$LOOKUP	-- LOOK UP AN EXISTING FILE
   104- 4690	$ENTER	-- ENTER A NEW FILE
   106- 4774	$PURGE	-- PURGE FILES CURRENTLY OPEN
   108- 4838	$READC	-- START READING A RECORD
   109- 4866	$READS	-- SKIP THE CURRENT RECORD
   110- 4890	$READW	-- READ A WORD
   111- 4923	$READB	-- READ A BYTE
   112- 4953	$READ	-- READ NEXT VIRTUAL BLOCK
   114- 5024	$WRITC	-- START WRITING A RECORD
   115- 5051	$WRITS	-- ZERO REMAINDER OF CURRENT BLOCK
   116- 5081	$WRITW	-- WRITE A WORD
   117- 5115	$WRITB	-- WRITE A BYTE
   118- 5141	$WRITE	-- WRITE NEXT VIRTUAL BLOCK
   120- 5212	$EXTEND	-- EXTEND OUTPUT FILE BY ONE BLOCK
   122- 5279	$WCRAM	-- WRITE C-RAM WORD
   123- 5348	$RCRAM	-- READ C-RAM WORD
   124- 5447	$ACRAM	-- ADDRESS C-RAM WORD
   126- 5519	$WDRAM	-- WRITE D-RAM WORD
   127- 5572	$RDRAM	-- READ D-RAM WORD
   128- 5628	$ADRAM	-- ADDRESS D-RAM WORD
   130- 5718	$DPOS	-- DEPOSIT KL MEMORY ROUTINE
   131- 5755	$EXAM	-- EXAMINE KL MEMORY ROUTINE
   134- 5875	$DFRD	-- DIAGNOSTIC READ FUNCTION
   136- 5952	$DFWR	-- DIAGNOSTIC WRITE FUNCTION
   139- 6051	$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION
   141- 6125	$GETCA	-- SET CACHE CONFIGURATION TABLES
   144- 6226	$GETMM	-- SET UP MEMORY CONFIGURATION TABLES
   146- 6357	$GETTF -- READ MF20 TIMING FILE DATA
   150- 6606	$KLMR	-- DO A MASTER RESET ON THE KL
KLIMR -- KL RESET ROUTINES	MACRO M1113  11-NOV-81 11:25
TABLE OF CONTENTS

   150- 6671	$KLSR	-- SOFT RESET FOR RAM LOADERS
   152- 6772	$INIT	-- PROGRAM INITIALIZATION
   153- 6881	$DFPC -- KL PC READ SUBROUTINE 7510.21
   156- 6996	$KLREC -- KL FAULT CONTINUATION
   159- 7167	$DLGBT	-- ASK IF LOADING BOOT IS REQUIRED
   160- 7234	$DLWCF  -- ASK IF CONFIGURATION FILE IS TO BE WRITTEN
   161- 7283	LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG
   163- 7376	$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED
   164- 7410	LQCCM	-- ASK WHICH CACHES TO CONFIGURE
   166- 7483	$DLGEX	-- ASK WHERE TO EXIT
   169- 7581	$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY
   171- 7734	$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER
   173- 7809	$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED
   174- 7980	$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED
   182- 8377	$POWER	-- POWER FAILURE RESTART
   187- 8569	GLOBAL DATA STORAGE
   191- 8858	$START	-- MAIN PROGRAM FLOW CONTROL
   192- 8979	$DTRXX -- DTE20 REGISTER READ/WRITE SUBROUTINES
   193- 9020	$RSAVE	-- SAVE REGISTERS FOR ROUTINES
   194- 9034	$ASCIZ	-- TRANSFER ASCII STRING
   195- 9055	$TRACK	-- SPECIAL TRACK ROUTINE
   196- 9210	$TENST	-- START KL BOOT
   198- 9382	$TRB2F	-- TRANSLATE BINARY TO ASCII FILENAME
   199- 9421	$TRF2B	-- TRANSLATE ASCII FILE-NAME TO BINARY
   201- 9492	$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII
   202- 9543	$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD
   204- 9636	$TRCRM  -- TRANSLATE CRAM FILE ENTRY TO ASCII OCTAL
   205- 9700	$TRDRM  -- TRANSLATE DRAM FILE ENTRY TO ASCII OCTAL
   206- 9776	TROCT  -- TRANSLATE OCTAL VALUE TO ASCII DIGITS
   208- 9833	$TENAD	-- DISPLAY KL ADDRESS/16K
   210- 9915	$WRD22	-- DISPLAY 22 BIT KL WORD
   211- 9943	$WRD36	-- DISPLAY 36 BIT KL WORD
   214-10061	$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII
   215-10114	$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD
   217-10189	$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD
   218-10235	$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII
   220-10353	$TTRD	-- READ A LINE FROM THE CONSOLE TTY
   222-10480	$TTMSG	-- WRITE A MESSAGE TO THE CONSOLE TTY
   223-10531	$TTWR	-- WRITE A LINE TO THE CONSOLE TTY
   224-10561	$ECHO	-- ECHO CTY OUTPUT TO LP
   225-10636	$EXBLD	-- LOAD THE BOOT
   229-10842	$EXCT	-- EXECUTE KL INSTRUCTION
   230-10873	$STRKL	-- START THE KL PROCESSOR
   231-10929	$WTKL	-- WAIT FOR KL PROGRAM TO HALT
   232-10958	$LDAR	-- LOAD THE AR REGISTER
   233-10983	STPKL	-- HALT THE KL CPU
   234-11040	$MBPHS	-- PHASE THE KL CLOCKS
   235-11092	$BURST	-- BURST THE M-BOX CLOCK
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  11-NOV-81 11:25  PAGE 1


      1						.TITLE	RSXFC	-- RSX20F PARAMETER FILE (TOPS-20 SYSTEM DEFINITION)
      2						.IDENT	/013100/
      3					;
      4					;                             COPYRIGHT (C) 1977, 1978 BY
      5					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      6					;
      7					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      8					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      9					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     10					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     11					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     12					;
     13					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     14					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     15					;       CORPORATION.
     16					;
     17					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     18					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     19					;
     20					; VERSION 13-10
     21					;
     22					; ALAN D. PECKHAM  19-APR-77
     23					;
     24					; MODIFIED BY:
     25					;
     26					;		R. BELANGER -- ELIMINATE 1090T "ARPA" CONFIGURATTION
     27					;		R. BELANGER -- ADD 1091 CONFIGURATION
     28					;
     29					; FUNCTION: THIS MODULE PROVIDES THE PARAMETERS FOR ASSEMBLY OF RSX20F FOR
     30					;  THE TOPS-20 SYSTEM.
     31					;
     32					; EQUATED SYMBOLS
     33					;
     34		000001 				$TOP20	=1	; DEFINE TOPS-20 OPTION
     35
     36		000001 				$LP20	=1	; INCLUDE LP20 DRIVER
     37		000002 				L$$P20	=2	; INCLUDE 2 LP-20'S
     38		000001 				$CD11	=1	; INCLUDE CD11 CARD READER DRIVER
     39		000001 				$RP04	=1	; INCLUDE RP04 DISK DRIVER
     40		000001 				$FE	=1	; INCLUDE FE PSEUDO-DEVICE DRIVER
     41		000001 				$F11	=1	; INCLUDE FILES-11 ACP
     42		000001 				$DH11	=1	; INCLUDE DH11 DRIVER
     43		000010 				D$$H11	=8.	; INCLUDE 8 DH-11'S
     44		000001 				$DBDTE	=1	; INCLUDE DTE20 DEBUGGING CODE
     45		000001 				$DTE	=1	; INCLUDE DTE20 DTE DRIVER
     46		000001 				R$$11D	=1	; RSX-11D BASE
     47
     48					.IF DF	$T1091
     49						$TOP10	=1	; DEFINE TOPS-10 BASE FOR 1091
     50					.ENDC			; $T1091
     51
     52					.IF DF	$TOP10
     53					.IF NDF	$T1091
     54						$DTA	=1	; INCLUDE DECTAPE DRIVER FOR TOPS-10
     55					.IFF
     56						$RX11	=1	; INCLUDE FLOPPY DRIVER FOR TOPS-10/1091
     57					.ENDC			; $T1091
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  11-NOV-81 11:25  PAGE 1-1


     58					.ENDC			; $TOP10
     59
     60					.IF DF	$TOP20
     61		000001 				$RX11	=1	; INCLUDE FLOPPY DRIVER
     62					.ENDC			; $TOP20
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 2


     64						.TITLE	KLINIT - KL CPU INITIALIZATION PROGRAM
     65						.IDENT	/012270/
     66						.ENABL	AMA
     67						.LIST	MEB
     68						.NLIST	CND
     69
     70					;
     71					;                             COPYRIGHT (C) 1975, 1978 BY
     72					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     73					;
     74					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     75					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     76					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     77					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     78					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     79					;
     80					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     81					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     82					;       CORPORATION.
     83					;
     84					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     85					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     86					;
     87					; VERSION: 12-27
     88					;
     89					; ALAN D. PECKHAM  29-MAR-77
     90					;
     91					; MODIFIED BY:
     92					;
     93					;	S. LEAPLINE	06-MAR-80	FIX RACE CONDITION IN BOOT
     94					;					TCO 4.1.1100
     95					;
     96					;	K. LEFEBVRE	25-JAN-80	LOG RAM ERRORS TO ERROR FILE
     97					;					TCO 4.1.1073
     98					;
     99					;	R.  BELANGER	22-OCT-79	ADD CACHE SWEEP ON RELOAD OR BOOT
    100					;					TCO 5.1013
    101					;
    102					;	K. LEFEBVRE	19-SEP-79	ADD LP SUPPORT FOR TRACK FEATURE
    103					;					TCO 5.1005
    104					;
    105					;	R. BELANGER	16-JUL-79	ADD ENVIRONMENTAL REPORTING
    106					;					TCO 4.2333
    107					;
    108					;	R. BELANGER	11-JUL-79	ADD FORCE MEMORY CONFIGURATION OPTION.
    109					;					ADD FORCE DBE SCAN ON MF-20 POWERFAIL.
    110					;					TCO 4.2322
    111					;
    112					;	K. LEFEBVRE	13-MAR-79	ADD EXPANDED CRAM/DRAM ERROR REPORT
    113					;					TCO 4.2209
    114					;
    115					;	K. LEFEBVRE	01-MAR-79	ADD PERMANENT TRACK FEATURE
    116					;					TCO 4.2210
    117					;
    118					;	R. BELANGER	01-MAR-79	ADD REVERSE MEMORY CONFIGURATION
    119					;					TCO 4.2204
    120					;
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 2-1


    121					;	R. BELANGER	06-DEC-78	ADD NEW KEEP-ALIVE-CEASE PROCESSING
    122					;					TCO 4.2107
    123					;
    124					;	R. BELANGER	16-NOV-78	ADD TOPS-10 SMP FEATURES
    125					;					CHANGE VERSION TO 11
    126					;
    127					;	R. BELANGER	25-JUL-78	INTEGRATE MOS CONFIGURATOR
    128					;					CHANGE VERSION TO 10
    129					;
    130					;	R. BELANGER	27-JAN-78	CHANGE VERSION TO 7
    131					;					REMOVE "$ARPA" CONDITIONALS
    132					;					ADD "$RV" CONDITIONAL
    133					;					REMOVE "SXCT" CODE FOR REV. 10 MACHINES
    134					;
    135					;	R. BELANGER	10-SEP-77	CHANGE VERSION TO 6
    136					;					INCLUDE INTERNAL AND EXTERNAL
    137					;					MEMORY CONFIGURATORS
    138					;
    139					; THIS MODULE CONTAINS SYMBOLS AND MACROS USED GENERALLY BY ALL KLINIT
    140					;  MODULES.
    141					;
    142					; SET VERSION OF KLINIT HERE
    143					;
    144		000012 			KLI$$V	=	12		; VERSION 12
    145		000027 			KLI$$E	=	27		; EDIT 27
    146					;
    147					;
    148		000126 			KLI$$K	=	'V		; KEY FOR RELEASE
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 3


    150					;+
    151					; NOW SET THE SWITCHES WHICH WILL DETERMINE WHAT KLINIT WILL
    152					; INTERFACE TO.
    153					;
    154					;	C.ACHE	IF DEFINED WILL ALLOW KLINIT TO HANDLE CACHES
    155					;
    156					;	F.TRCK	IF DEFINED WILL INCLUDE CODING TO ALLOW TRACKING OF FUNCTIONS
    157					;		BEING DONE ON THE KL CPU
    158					;
    159					;	F.PTCH	IF DEFINED WILL INCLUDE A FREE AREA LABELED "PATCH" IN WHICH
    160					;		TO INSERT CODING PATCHES DURING PROGRAM DEBUGGING
    161					;
    162					; DEFINITIONS MADE HERE:
    163					;-
    164
    168
    172
    174		000102 			KLI$$F	=	'B		; TOPS20 FORM OF KLINIT.
    176
    177		000000 			C.ACHE	=	0		; SYSTEM HAS CACHE
    178
    179		000001 			F.TRCK	=	1		; [TCO 4.2210] INCLUDE FUNCTION TRACK
    180
    181		000001 			FTKLI	=	1		; [4.1.1073]ASSEMBLE EROOR LOG INTERFACE
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 4


    183					;
    184					; GLOBAL MACROS
    185					;
    186						.MCALL	$DEF,DIR$
    187	000000					$DEF
    188
    189					;
    190					; LOCAL MACROS
    191					;
    192					;+
    193					; MACRO TO SET IDENT FOR KLINIT MODULES.
    194					; FORMAT OF CALL IS:
    195					;	IDENT$	VERSION,EDIT
    196					; OR
    197					;	IDENT$	VERSION,EDIT,KLI$$F
    198					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    199					;-
    200
    201						.MACRO	IDENT$ VER,EDT,FRM,XA,XB,XC,NUM
    202						.IF	B,NUM
    203						.IF	B,FRM
    204						IDENT$	\VER,\EDT,0,,,,0
    205						.IFF
    206						.IF	EQ,<FRM-'A>
    207						IDENT$	\VER,\EDT,A,,,,0
    208						.IFF
    209						.IF	EQ,<FRM-'B>
    210						IDENT$	\VER,\EDT,B,,,,0
    211						.IFF
    212						IDENT$	\VER,\EDT,C,,,,0
    213						.ENDC
    214						.ENDC
    215						.ENDC
    216						.MEXIT
    217						.IFF
    218						.IF	GE,VER-10
    219						.IF	GE,EDT-10
    220						.LIST
    221						.IDENT	/'FRM'VER'EDT'0/
    222						.NLIST
    223						.IFF
    224						.LIST
    225						.IDENT	/'FRM'VER'0'EDT'0/
    226						.NLIST
    227						.ENDC
    228						.IFF
    229						.IF	GE,EDT-10
    230						.LIST
    231						.IDENT	/'FRM'0'VER'EDT'0/
    232						.NLIST
    233						.IFF
    234						.LIST
    235						.IDENT	/'FRM'0'VER'0'EDT'0/
    236						.NLIST
    237						.ENDC
    238						.ENDC
    239						.ENDC
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 4-1


    240						.ENDM	IDENT$
    241
    242						.MACRO	CALL	X,Y
    243						.NTYPE	$$,X
    244						.IF	EQ,$$&70
    245						 JSR	X,Y
    246						.IFF
    247						 JSR	PC,X
    248						.ENDC
    249						.ENDM	CALL
    250
    251						.MACRO	CALLR	X
    252						 JMP	X
    253						.ENDM	CALLR
    254
    255						.MACRO	RETURN	X
    256						.IF	NB,<X>
    257						 RTS	X
    258						.IFF
    259						 RTS	PC
    260						.ENDC
    261						.ENDM	RETURN
    262
    263						.MACRO	PUSH	LOCS
    264						.IRP	L,<LOCS>
    265						 MOV	L,-(SP)
    266						.ENDR
    267						.ENDM	PUSH
    268
    269						.MACRO	POP	LOCS
    270						.IRP	L,<LOCS>
    271						 MOV	(SP)+,L
    272						.ENDR
    273						.ENDM	POP
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 5


    275					;
    276					; SHIFT MACROS
    277					;
    278						.MACRO	SL	R,N
    279						.IF	GT,N-7
    280						 SWAB	R
    281						.REPT	N-10
    282						 ASL	R
    283						.ENDR
    284						.IFF
    285						.REPT	N
    286						 ASL	R
    287						.ENDR
    288						.ENDC
    289						.ENDM	SL
    290
    291						.MACRO	SR	R,N
    292						.IF	GT,N-7
    293						 SWAB	R
    294						.REPT	N-10
    295						 ASR	R
    296						.ENDR
    297						.IFF
    298						.REPT	N
    299						 ASR	R
    300						.ENDR
    301						.ENDC
    302						.ENDM	SR
    303
    304						.MACRO	ERROR$	CODE
    305						MOV	#^R'CODE,$LGERR
    306						SEC
    307						RETURN
    308						.ENDM	ERROR$
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 6


    310					;
    311					; KL INSTRUCTION AND DATA CREATION MACROS
    312					;
    313		000005 			I.10L	=	5		; KL INSTRUCTIONS TAKE 5 -11 BYTES !!!!
    314		000005 			W.10L	=	5		; KL WORDS TAKE 5 BYTES ALSO.
    315
    316						.MACRO	I10$	OP,AC,I,AD,XR
    317						 BY$$0=0
    318						 BY$$1=0
    319						 BY$$2=0
    320						.IRPC	AD1,AD
    321						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    322						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    323						 BY$$0=<BY$$0*10&370>+<AD1>
    324						.ENDM
    325						 BY$$2=<AC+0&1*200>+<I+0&1*100>+<XR+0&17*4>+BY$$2
    326						 BY$$3=<OP&37*10>+<AC+0/2&7>
    327						 BY$$4=<OP/40>
    328						 .BYTE	BY$$0,BY$$1,BY$$2
    329						 .BYTE	BY$$3,BY$$4
    330						.ENDM	I10$
    331
    332						.MACRO	IO10$	OP,DV,I,AD,XR
    333						 BY$$0=0
    334						 BY$$1=0
    335						 BY$$2=0
    336						.IRPC	AD1,AD
    337						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    338						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    339						 BY$$0=<BY$$0*10&370>+<AD1>
    340						.ENDM
    341						 BY$$2=<OP&1*200>+<I+0&1*100>+<XR+0&17+0*4>+BY$$2
    342						 BY$$3=<DV&374>+<OP/2&3>
    343						 BY$$4=16+<DV/400&1>
    344						 .BYTE	BY$$0,BY$$1,BY$$2
    345						 .BYTE	BY$$3,BY$$4
    346						.ENDM	IO10$
    347
    348						.MACRO	WD22$	AD
    349						 BY$$0=0
    350						 BY$$1=0
    351						 BY$$2=0
    352						.IRPC	AD1,AD
    353						 BY$$2=<BY$$2*10&370>+<BY$$1/40&007>
    354						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    355						 BY$$0=<BY$$0*10&370>+<AD1>
    356						.ENDM
    357						 .BYTE	BY$$0,BY$$1,BY$$2
    358						.ENDM	WD22$
    359
    360						.MACRO	WD36$	LH,RH
    361						 BY$$0=0
    362						 BY$$1=0
    363						 BY$$2=0
    364						 BY$$3=0
    365						 BY$$4=0
    366						.IRPC	AD1,LH
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 6-1


    367						 BY$$4=<BY$$4*10&010>+<BY$$3/40&007>
    368						 BY$$3=<BY$$3*10&370>+<BY$$2/40&007>
    369						 BY$$2=<BY$$2*10&340>+<AD1*4>
    370						.ENDM
    371						.IRPC	AD1,RH
    372						 BY$$2=<BY$$2&374>+<BY$$1/40&003>
    373						 BY$$1=<BY$$1*10&370>+<BY$$0/40&007>
    374						 BY$$0=<BY$$0*10&370>+<AD1>
    375						.ENDM
    376						 .BYTE	BY$$0,BY$$1,BY$$2
    377						 .BYTE	BY$$3,BY$$4
    378						.ENDM	WD36$
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 7


    380					;
    381					; MESSAGE FORMATING AND PRINT MACROS
    382					;
    383						.MACRO	MESSAGE	MSG
    384						 .ASCIZ	\'MSG'\
    385						.ENDM	MESSAGE
    386
    387						.MACRO	WARNING	MSG
    388						 .ASCIZ	\% 'MSG'\
    389						.ENDM	WARNING
    390
    391						.MACRO	ERROR	MSG
    392						 .ASCIZ	\? 'MSG'\
    393						.ENDM	ERROR
    394
    395						.MACRO	PRINT	ADR
    396						.IF	NB,<ADR>
    397						 MOV	ADR,R0
    398						.ENDC
    399						 JSR	PC,$TTMSG
    400						.ENDM	PRINT
    401
    402					;---	SPECIAL TRACK MACRO
    403
    404						.MACRO	TRACK	FN,ADR1,ADR2,?A1
    405						.IF	DF,F.TRCK
    406						 JSR	R0,A1
    407						 .WORD	"FN
    408						 .WORD	ADR1
    409						 .WORD	ADR2
    410					A1:	 JSR	PC,$TRACK
    411						 MOV	(SP)+,R0
    412						.ENDC
    413						.ENDM	TRACK
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 8


    415					;
    416					; EQUATED SYMBOLS
    417					;
    418		000006 			E.FFIL	=	6		; [4.1.1073]LOGGING EVENT FLAG
    419		000200 			ED.PHY	=	200
    420		000001 			TTILUN	=	1		; TT: INPUT LOGICAL UNIT
    421		000002 			TTOLUN	=	2		; TT: OUTPUT LOGICAL UNIT
    422		000003 			LPOLUN	=	3		; LP: OUTPUT LOGICAL UNIT
    423		000004 			SYILUN	=	4		; SY: INPUT LOGICAL UNIT
    424		000005 			SYOLUN	=	5		; SY: OUTPUT LOGICAL UNIT
    425		000006 			SYFLUN	=	6		; SY: GENERAL FUNCTION LOGICAL UNIT
    426		000006 			LOGLUN	=	6		; [4.1.1073] SY: ERROR LOGGING LUN
    427		000040 			CTLS	=	40		; MAXIMUM NUMBER OF CONTROLLERS.
    428		000037 			LCTL	=	CTLS-1		; LAST CONTROLLER NUMBER.
    429						.SBTTL	MOSDEF -- DIAGNOSTIC MEMORY BOOT MACRO COMPATABILITY PACKAGE
    430
    431						.IDENT	/001020/
    432
    433					;                            COPYRIGHT (C) 1975, 1978 BY
    434					;                    DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    435					;
    436					;      THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
    437					;      ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
    438					;      OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
    439					;      OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
    440					;      NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
    441					;
    442					;      THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
    443					;      NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
    444					;      CORPORATION.
    445					;
    446					;      DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
    447					;      SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
    448					;
    449					;	VERSION:	01-02
    450					;
    451					;	AUTHOR:		R. BELANGER
    452					;
    453					;	DATE:		11-AUG-78
    454					;
    455					;	MODIFICATIONS:
    456					;
    457					;	EDIT	PROGRAMMER		REASON
    458					;	----	----------		------
    459					;	001	R. BELANGER		FIX BUG IN "PMSG"
    460					;     4.2218	K. LEFEBVRE		FIX BUG IN "EXAM"
    461
    462						.MCALL	$DEF
    463
    464	000000					$DEF
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 9
MOSDEF -- DIAGNOSTIC MEMORY BOOT MACRO COMPATABILITY PACKAGE

    466						.MACRO	CALL	X,Y
    467						.NTYPE	$$,X
    468						.IF	EQ,$$&70
    469						 JSR	X,Y
    470						.IFF
    471						 JSR	PC,X
    472						.ENDC
    473						.ENDM	CALL
    474
    475						.MACRO	CALLR	X
    476						 JMP	X
    477						.ENDM	CALLR
    478
    479						.MACRO	RETURN	X
    480						.IF	NB,<X>
    481						 RTS	X
    482						.IFF
    483						 RTS	PC
    484						.ENDC
    485						.ENDM	RETURN
    486
    487						.MACRO	PUSH	LOCS
    488						.IRP	L,<LOCS>
    489						 MOV	L,-(SP)
    490						.ENDR
    491						.ENDM	PUSH
    492
    493						.MACRO	POP	LOCS
    494						.IRP	L,<LOCS>
    495						 MOV	(SP)+,L
    496						.ENDR
    497						.ENDM	POP
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 10
MOSDEF -- DIAGNOSTIC MEMORY BOOT MACRO COMPATABILITY PACKAGE

    499					.MACRO	SL	REG,NUM
    500							.IF	GT,NUM-7
    501							.IFT
    502						  SWAB	REG
    503							.REPT	NUM-^D8
    504						  ASL	REG
    505							.ENDR
    506							.IFF
    507							.REPT	NUM
    508						  ASL	REG
    509							.ENDR
    510							.ENDC
    511					.ENDM
    512
    513					.MACRO	SR	REG,NUM
    514							.IF	GT,NUM-7
    515							.IFT
    516						  SWAB	REG
    517							.REPT	NUM-^D8
    518						  ASR	REG
    519							.ENDR
    520							.IFF
    521							.REPT	NUM
    522						  ASR	REG
    523							.ENDR
    524							.ENDC
    525					.ENDM
    526
    527					.MACRO	EXOR	REG,DESTIN,SCRTCH
    528							.IF	NB,SCRTCH
    529							.IFT
    530						  MOV	REG,SCRTCH
    531						  BIC	DESTIN,SCRTCH
    532						  BIC	REG,DESTIN
    533						  BIS	SCRTCH,DESTIN
    534							.IFF
    535						  MOV	REG,-(SP)
    536						  BIC	DESTIN,(SP)
    537						  BIC	REG,DESTIN
    538						  BIS	(SP)+,DESTIN
    539							.ENDC
    540					.ENDM
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 11
MOSDEF -- DIAGNOSTIC MEMORY BOOT MACRO COMPATABILITY PACKAGE

    542
    543		000000 			STPCLK=	000	; STOP CLOCK
    544		000001 			STRCLK=	001	; START CLOCK
    545		000002 			SSCLK=	002	; SINGLE STEP THE MBOX CLOCK
    546		000003 			SECLK=	003	; SINGLE STEP EBOX CLOCK
    547		000004 			CECLK=	004	; CONDITIONAL EBOX CLOCK
    548		000006 			CLRMR=	006	; CLEAR MR RESET
    549		000007 			SETMR=	007	; SET MR RESET
    550		000005 			BRCLK=	005	; BURST THE CLOCK
    551		000011 			SETRUN=	011	; SET THE RUN FLOP
    552		000012 			CONBUT=	012	; SET THE CONTINUE BUTTON
    553		000077 			LDAR=	077	; LOAD THE AR REGISTER
    554
    555		000002 			$SBDIAG=BLKO
    556		000004 			$$SBDIAG=PI
    557		000000 			$APRID=BLKI
    558		000000 			$$APRID=APR
    559		000000 			$RDERA=BLKI
    560		000004 			$$RDERA=PI
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 12
DMBMCP -- DTE-20 OPERATION MACROS

    562					.SBTTL	DMBMCP -- DTE-20 OPERATION MACROS
    563
    564					;+
    565					; DFRD -- DIAGNOSTIC FUNCTION READ TRANSLATION MACRO
    566					;
    567					; DFRD TRANSLATES THE DIAGNOSTIC EMT 116 IN TO A CALL TO "$DDFRD"
    568					;
    569					; SEQUENCE OF OPERATION:
    570					;
    571					;	1. R1 IS SAVED ON THE STACK
    572					;	2. R1 IS SET POINTING TO STORAGE
    573					;	3. CALL TO "$DDFRD" IS MADE
    574					;
    575					; ERROR RETURN -- CC-C SET
    576					;
    577					; SUCCESS RETURN -- CC-C CLEAR
    578					;
    579					;	R0 -- POINTS TO DEXWDS IN ".DFRBK"
    580					;
    581					; STACK SUMMARY:
    582					;
    583					;	STACK IS UNAFFECTED
    584					;
    585					; CALLER'S RESPONSIBILITIES:
    586					;
    587					;	NONE
    588					;
    589					;-
    590
    591					.MACRO	DFRD	FUNC,ADDR
    592					.IF	NB,FUNC
    593						 MOV	#FUNC,R0	; ** FUNCTION READ CODE TO R0
    594					.ENDC	; .IF NB,FUNC
    595						 MOV	R1,-(SP)	; ** SAVE R1
    596					.IF	NB,ADDR
    597						 MOV	#ADDR,R1	; ** BUFFER POINTER TO R1
    598					.IFF
    599						 CLR	R1		; ** NO DATA BUFFER
    600					.IFTF
    601						 JSR	PC,$DDFRD	; ** EXECUTE THE FUNCTION READ
    602						 MOV	(SP)+,R1	; ** RESTORE R1
    603					.ENDC	; .IF NB,ADDR
    604					.ENDM	; DFRD
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 13
DMBMCP -- DTE-20 OPERATION MACROS

    606					;+
    607					; DFRDT -- DIAGNOSTIC FUNCTION READ (TRAILING) TRANSLATION MACRO
    608					;
    609					; DFRDT TRANSLATES THE DIAGNOSTIC EMT 140 INTO A "DFRD" MACRO (Q.V.)
    610					;-
    611
    612					.MACRO	DFRDT	FUNC,ADDR
    613					.IF	NB,FUNC
    614						 MOV	#FUNC,R0	; ** FUNCTION READ CODE TO R0
    615					.ENDC	; .IF NB,FUNC
    616						 MOV	R1,-(SP)	; ** SAVE R1
    617					.IF	NB,ADDR
    618						 MOV	#ADDR,R1	; ** BUFFER POINTER TO R1
    619					.IFF
    620						 CLR	R1		; ** NO DATA BUFFER
    621					.IFTF
    622						 JSR	PC,$DDFRD	; ** EXECUTE THE FUNCTION READ
    623						 MOV	(SP)+,R1	; ** RESTORE R1
    624					.ENDC	; .IF NB,ADDR
    625					.ENDM	; DFRDT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 14
DMBMCP -- DTE-20 OPERATION MACROS

    627					;+
    628					; DFWRT -- DIAGNOSTIC FUNCTION WRITE TRANSTATION MACRO
    629					;
    630					; DFWRT  TRANSLATES A DIAGNOSTIC EMT 141 IN TO A CALL TO "$DDFWR"
    631					;
    632					; SEQUENCE OF OPERATION:
    633					;
    634					;	1. DATA POINTER IS LOADED INTO R1
    635					;	2. FUNCTION CODE IS LOADED INTO R0
    636					;	3. CALL IS MADE TO "$DFWR"
    637					;
    638					; ERROR RETURN -- CC-C SET
    639					;
    640					; SUCCESS RETURN -- CC-C CLEAR
    641					;
    642					;	R0, R1 -- UNCHANGED
    643					;
    644					; STACK SUMMARY:
    645					;
    646					;	STACK IS UNAFFECTED
    647					;
    648					; CALLER'S REPONSIBILITIES:
    649					;
    650					;	NONE
    651					;-
    652
    653					.MACRO	DFWRT	ADDR,FUNC
    654					.IF	NB,FUNC
    655						 MOV	#FUNC,R0	; ** FUNCTION WRITE CODE TO R0
    656					.ENDC	; .IF NB,FUNC
    657					.IF	NB,ADDR
    658						 MOV	R1,-(SP)	; ** SAVE R1
    659						 MOV	#ADDR,R1	; ** BUFFER POINTER TO R1
    660					.IFTF
    661						 JSR	PC,$DDFWR	; ** EXECUTE THE FUNCTION WRITE
    662					.IFT
    663						 MOV	(SP)+,R1	; ** RESTORE R1
    664					.ENDC	; .IF NB,ADDR
    665					.ENDM	; DFWRT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 15
DMBMCP -- DTE-20 OPERATION MACROS

    667					;+
    668					; DFWRTT -- DIAGNOSIC FUNCTION WRITE (TRAILING) TRANSLATION MACRO
    669					;
    670					; DFWRT TRANSLATES A DIAGNOSTIC EMT 140 INTO A CALL TO "$DDFWR"
    671					;
    672					; SEQUENCE OF OPERATION:
    673					;
    674					;	1. DATA POINTER IS LOADED INTO R1
    675					;	2. FUNCTION CODE IS LOADED INTO R0
    676					;	3. CALL IS MADE TO "$DDFWR"
    677					;
    678					; ERROR RETURN -- CC-C SET
    679					;
    680					; SUCCESS RETURN -- CC-C CLEAR
    681					;
    682					;	R0, R1 -- UNCHANGED
    683					;
    684					; STACK SUMMARY:
    685					;
    686					;	STACK IS UNAFFECTED
    687					;
    688					; CALLER'S REPONSIBILITIES:
    689					;
    690					;	NONE
    691					;-
    692
    693					.MACRO	DFWRTT	ADDR,FUNC
    694					.IF	NB,FUNC
    695						 MOV	#FUNC,R0	; ** FUNCTION WRITE CODE TO R0
    696					.ENDC	; .IF NB,FUNC
    697					.IF	NB,ADDR
    698						 MOV	R1,-(SP)	; ** SAVE R1
    699						 MOV	#ADDR,R1	; ** BUFFER POINTER TO R1
    700					.IFTF
    701						 JSR	PC,$DDFWR	; ** EXECUTE THE FUNCTION WRITE
    702					.IFT
    703						 MOV	(SP)+,R1	; ** RESTORE R1
    704					.ENDC	; .IF NB,ADDR
    705					.ENDM	; DFWRTT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 16
DMBMCP -- DTE-20 OPERATION MACROS

    707					;+
    708					; DFXCT -- DIAGNOSTIC FUNCTION EXECUTE MACRO
    709					;
    710					; DFXCT TRANSLATES A DIAGNOSTIC EMT 114 IN TO A CALL TO "$DDFXC"
    711					;
    712					; SEQUENCE OF OPERATION:
    713					;
    714					;	1. FUNCTION CODE IS LOADED INTO R0
    715					;	2. CALL IS MADE TO "$DDFXC"
    716					;
    717					; ERROR RETURN -- CC-C SET
    718					;
    719					; SUCCESS RETURN -- CC-C CLEAR
    720					;
    721					;	R0, R1 -- UNCHANGED
    722					;
    723					; STACK SUMMARY:
    724					;
    725					;	STACK IS UNAFFECTED
    726					;
    727					; CALLER'S REPONSIBILITIES:
    728					;
    729					;	NONE
    730					;-
    731
    732					.MACRO	DFXCT	FUNC
    733					.IF	NB,FUNC
    734						 MOV	#FUNC,R0	; ** FUNCTION CODE TO R0
    735					.ENDC	; .IF NB,FUNC
    736						 JSR	PC,$DDFXC	; ** EXECUTE THE FUNCTION EXECUTE
    737					.ENDM	; DFXCT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 17
DMBMCP -- DTE-20 OPERATION MACROS

    739					;+
    740					; DFXCTT -- DIAGNOSIC FUNCTION EXECUTE (TRAILING) TRANSLATION MACRO
    741					;
    742					; DFXCTT TRANSLATES A DIAGNOSTIC EMT 115 INTO A CALL TO "$DDFXC"
    743					;
    744					; SEQUENCE OF OPERATION:
    745					;
    746					;	1. FUNCTION CODE IS LOADED INTO R0
    747					;	2. CALL IS MADE TO "$DDFXC"
    748					;
    749					; ERROR RETURN -- CC-C SET
    750					;
    751					; SUCCESS RETURN -- CC-C CLEAR
    752					;
    753					;	R0, R1 -- UNCHANGED
    754					;
    755					; STACK SUMMARY:
    756					;
    757					;	STACK IS UNAFFECTED
    758					;
    759					; CALLER'S REPONSIBILITIES:
    760					;
    761					;	NONE
    762					;-
    763
    764					.MACRO	DFXCTT	FUNC
    765					.IF	NB,FUNC
    766						 MOV	#FUNC,R0	; ** FUNCTION CODE TO R0
    767					.ENDC	; .IF NB,FUNC
    768						 JSR	PC,$DDFXC	; ** EXECUTE THE FUNCTION EXECUTE
    769					.ENDM	; DFXCTT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 18
DMBMCP -- DTE-20 OPERATION MACROS

    771					;+
    772					; DPOS -- DIAGNOSTIC KL10 DEPOSIT MACRO
    773					;
    774					; DPOS TRANSLATES THE DIAGNOSTIC EMT 105 INTO A CALL TO "$DPOS"
    775					;
    776					; SEQUENCE OF OPERATION:
    777					;
    778					;	1. DATA POINTER IS LOADED INTO R0
    779					;	2. KL10 ADDRESS POINTER IS LOADED INTO R1
    780					;	3. THE CALL TO "$DPOS" IS EXECUTED
    781					;
    782					; ERROR RETURN -- CC-C IS SET
    783					;
    784					; SUCCESS RETURN - CC-C IS CLEAR
    785					;
    786					;	R0 AND R1 ARE UNCHANGED
    787					;
    788					; STACK SUMMARY:
    789					;
    790					;	STACK IS UNAFFECTED
    791					;
    792					; CALLER'S RESPONSIBILITIES:
    793					;
    794					;	NONE
    795					;-
    796
    797					.MACRO	DPOS	ADDR,DATA
    798					.IF	NB,DATA
    799						 MOV	#DATA,R0	; ** DATA POINTER TO R0
    800					.ENDC	; .IF NB,DATA
    801					.IF	NB,	ADDR
    802						 MOV	R1,-(SP)	; ** SAVE R1
    803						 MOV	#ADDR,R1	; ** ADDRESS POINTER TO R1
    804					.IFTF
    805						 JSR	PC,$DPOS	; ** EXECUTE THE DEPOSIT
    806					.IFT
    807						 MOV	(SP)+,R1	; ** RESTORE R1
    808					.ENDC	; .IF NB,ADDR
    809					.ENDM	; DPOS
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 19
DMBMCP -- DTE-20 OPERATION MACROS

    811					;+
    812					; DPOST -- DIAGNOSTIC KL10 DEPOSIT (TRAILING) MACRO
    813					;
    814					; DPOST TRANSLATES THE DIAGNOSTIC EMT 106 INTO A CALL TO "$DPOST"
    815					;
    816					; SEQUENCE OF OPERATION:
    817					;
    818					;	1. DATA POINTER IS LOADED INTO R0
    819					;	2. KL10 ADDRESS POINTER IS LOADED INTO R1
    820					;	3. THE CALL TO "$DPOS" IS EXECUTED
    821					;
    822					; ERROR RETURN -- CC-C IS SET
    823					;
    824					; SUCESS RETURN - CC-C IS CLEAR
    825					;
    826					;	R0 AND R1 ARE UNCHANGED
    827					;
    828					; STACK SUMMARY:
    829					;
    830					;	STACK IS UNAFFECTED
    831					;
    832					; CALLERS RESPONSIBILITIES:
    833					;
    834					;	NONE
    835					;-
    836
    837					.MACRO	DPOST	ADDR,DATA
    838					.IF	NB,	ADDR
    839						 MOV	#ADDR,R0	; ** ADDRESS TO R0
    840					.ENDC	; .IF NB,ADDR
    841					.IF	NB,DATA
    842						 MOV	R1,-(SP)	; ** SAVE R1
    843						 MOV	#DATA,R1	; ** DATA POINTER TO R1
    844					.IFTF
    845						 JSR	PC,$DPOST	; ** EXECUTE THE DEPOSIT
    846					.IFT
    847						 MOV	(SP)+,R1	; ** RESTORE R1
    848					.ENDC	; .IF NB,DATA
    849					.ENDM	; DPOST
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 20
DMBMCP -- DTE-20 OPERATION MACROS

    851					;+
    852					; EXAM -- DIAGNOSTIC KL10 EXAMINE TRANSLATION MACRO
    853					;
    854					; EXAM TRANSLATES A DIAGNOSTIC EMT 103 INTO A CALL TO "$EXAM"
    855					;
    856					; SEQUENCE OF OPERATION
    857					;
    858					;	1. R0 POINTS TO THE KL10 ADDRESS
    859					;	2. THE CALL TO "$EXAM" IS EXECUTED
    860					;	3. R0 POINTS TO RETURNED DATA BUFFER
    861					;
    862					; ERROR RETURN -- CC-C IS SET
    863					;
    864					; SUCCESS RETURN -- CC-C CLEAR
    865					;
    866					;
    867					; STACK SUMMARY:
    868					;
    869					;	STACK IS UNAFFECTED
    870					;
    871					; CALLER'S RESPONSIBILITIES:
    872					;
    873					;	NONE
    874					;-
    875
    876					.MACRO	EXAM	ADDR,DATA
    877					.IF	NB,ADDR
    878						 MOV	#ADDR,R0	; ** ADDRESS POINTER TO R0
    879					.ENDC	; .IF NB,ADDR
    880					.IF	NB,DATA
    881						 MOV	R1,-(SP)	; ** SAVE R1
    882						 MOV	#DATA,R1	; ** DATA BUFFER POINTER TO R1
    883					.IFF
    884						MOV	R1,-(SP)	; [4.2218] SAVE R1
    885						MOV	#.WORK,R1	; [4.2218] WORK SPACE
    886					.IFTF
    887						 JSR	PC,$EXAMD	; ** EXECUTE THE KL10 EXAMINE
    888					.IFT
    889						 MOV	(SP)+,R1	; ** RESTORE R1
    890					.IFF
    891						MOV	#.WORK,R0	; [4.2218] PTR TO 36 BIT DATA
    892						MOV	(SP)+,R1	; [4.2218] RESTORE R1
    893					.ENDC	; .IF NB,DATA
    894					.ENDM	; EXAM
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 21
DMBMCP -- DTE-20 OPERATION MACROS

    896					;+
    897					; EXAMT -- DIAGNOSTIC KL10 EXAMINE (TRAILING) TRANSLATION MACRO
    898					;
    899					; EXAMT TRANSLATES A DIAGNOSTIC EMT 104 INTO A CALL TO "$EXAM"
    900					;
    901					; SEQUENCE OF OPERATION
    902					;
    903					;	1. R1 POINTS TO THE RETURNED DATA BUFFER
    904					;	2. R0 POINTS TO THE KL10 ADDRESS
    905					;	3. THE CALL TO "$EXAM" IS EXECUTED
    906					;
    907					; ERROR RETURN -- CC-C IS SET
    908					;
    909					; SUCCESS RETURN -- CC-C CLEAR
    910					;
    911					;	R1 IS MOVED TO R0 TO MAINTAIN COMPATABILITY
    912					;
    913					; STACK SUMMARY:
    914					;
    915					;	STACK IS UNAFFECTED
    916					;
    917					; CALLER'S RESPONSIBILITIES:
    918					;
    919					;	NONE
    920					;-
    921
    922					.MACRO	EXAMT	ADDR,DATA
    923					.IF	NB,ADDR
    924						 MOV	#ADDR,R0	; ** ADDRESS POINTER TO R0
    925					.ENDC	; .IF NB,ADDR
    926					.IF	NB,DATA
    927						 MOV	R1,-(SP)	; ** SAVE R1
    928						 MOV	#DATA,R1	; ** DATA BUFFER POINTER TO R1
    929					.IFTF
    930						 JSR	PC,$EXAMT	; ** EXECUTE THE KL10 EXAMINE
    931					.IFT
    932						 MOV	(SP)+,R1	; ** RESTORE R1
    933					.ENDC	; .IF NB,DATA
    934					.ENDM	; EXAMT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 22
DMBMCP -- DTE-20 OPERATION MACROS

    936					;+
    937					; DFSCLK -- DAGNOSTIC SINGLE STEP CLOCK TRANSLATION MACRO
    938					;
    939					; DFSCLK TRANSALTES A DIAGNOSTIC EMT 122 INTO A "DFXCT SSCLK"
    940					;
    941					; SEE "DFXCT" FOR DETAILS
    942					;-
    943
    944					.MACRO DFSCLK
    945						DFXCT	SSCLK
    946					.ENDM	; DFSCLK
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 23
DMBMCP -- DTE-20 OPERATION MACROS

    948					;+
    949					; DFPC -- DIAGNOSTIC PC READ TRANSLATION MACRO
    950					;
    951					; DFPC RETURNS THE KL10 PC IN A TRIPLET POINTED TO BY R0
    952					;-
    953
    954					.MACRO	DFPC	ADDR
    955					.IF	NB,ADDR
    956						 MOV	#ADDR,R0	; ** BUFFER POINTER TO R0
    957					.ENDC	; .IF NB,ADDR
    958						 JSR	PC,$DFPC	; ** READ THE KL10 PC
    959					.ENDM	; DFPC
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 24
DMBMCP -- DTE-20 OPERATION MACROS

    961					;+
    962					; BURST -- BURST MBOX CLOCK TRANSLATION MACRO
    963					;
    964					; BURST TRANSLATES A DIAGNOSTIC EMT 131 INTO A CALL TO "$BURST"
    965					;
    966					; SEQUENCE OF OPERATION:
    967					;
    968					;	1. THE MBOX CLOCK BURST COUNT IS LOADED INTO R0
    969					;	2. THE CALL TO "$BURST" IS MADE
    970					;
    971					; ERROR RETURN -- CC-C SET
    972					;
    973					; SUCCESS RETURN -- CC-C CLEAR
    974					;
    975					; STACK SUMMARY:
    976					;
    977					;	STACK IS UNAFFECTED
    978					;
    979					; CALLER'S RESPONSIBILITIES:
    980					;
    981					;	NONE
    982					;-
    983
    984					.MACRO	BURST ARG
    985					.IF	NB,ARG
    986						 MOV	#ARG,R0		; ** BURST COUNT TO R0
    987					.ENDC	; .IF NB,ARG
    988						 JSR	PC,$BURST	; ** BURST THE MBOX CLOCK
    989					.ENDM	; BURST
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 25
DMBMCP -- DTE-20 OPERATION MACROS

    991					;+
    992					; DTEBAS -- RETURN DTE-20 BASE ADDRESS TRANSLATION MACRO
    993					;
    994					; DTEBAS RETURNS THE THE BASE ADDRESS OF THE PRIVILEGED DTE-20 FROM
    995					; ".PRDTE" IN THE REGISTER SPECIFIED
    996					;-
    997
    998					.MACRO	DTEBAS	REG
    999					.IF 	NB,REG
   1000						 MOV	.PRDTE,REG	; ** DTE-20 BASE ADDRESS TO REG
   1001					.IFF
   1002						MOV	.PRDTE,R0	; ** DTE-20 BASE ADDRESS TO R0
   1003					.ENDC	; .IF NB,REG
   1004					.ENDM	; DTEBAS
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 26
DMBMCP -- DTE-20 OPERATION MACROS

   1006					;+
   1007					; LODAR -- DIAGNOSTIC KL10 AR LOAD TRANSLATION MACRO
   1008					;
   1009					; LODAR TRANSLATES A DIAGNOSTIC EMT 102 INTO A CALL TO "$LDAR"
   1010					;
   1011					; SEQUENCE OF OPERATION:
   1012					;
   1013					;	1. R0 POINTS TO THE DATA TO BE LOADED INTO THE KL10 AR REGISTER
   1014					;	2. THE CALL TO "$LDAR" IS MADE
   1015					;
   1016					; ERROR RETURN -- CC-C SET
   1017					;
   1018					; SUCCESS RETURN -- CC-C CLEAR
   1019					;
   1020					; STACK SUMMARY:
   1021					;
   1022					;	STACK IS UNAFFECTED
   1023					;
   1024					; CALLER'S RESPONSIBILITIES:
   1025					;
   1026					;	NONE
   1027					;-
   1028
   1029					.MACRO	LODAR	DATA
   1030					.IF	NB,DATA
   1031						 MOV	#DATA,R0	; ** DATA POINTER TO R0
   1032					.ENDC	; .IF NB,DATA
   1033						 JSR	PC,$LDAR	; ** LOAD THE KL10 AR REGISTER
   1034					.ENDM	; LODAR
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 28
DMBMCP -- DTE-20 OPERATION MACROS

   1037					;+
   1038					; EXCT -- DIAGNOSTIC KL10 INSTRUCTION EXECUTE TRANSLATION MACRO
   1039					;
   1040					; EXCT TRANSLATES A DIAGNOSTIC EMT 101 INTO A CALL TO "$EXCT"
   1041					;
   1042					; SEQUENCE OF OPERATION:
   1043					;
   1044					;	1. POINTER TO KL10 INSTRUCTION IS LOADED INTO R0
   1045					;	2. CALL TO "$EXCT" IS MADE
   1046					;
   1047					; ERROR RETURN -- CC-C SET
   1048					;
   1049					; SUCCESS RETURN -- CC-C CLEAR
   1050					;
   1051					; STACK SUMMARY:
   1052					;
   1053					;	STACK IS UNAFFECTED
   1054					;
   1055					; CALLER'S RESPONSIBILITIES:
   1056					;
   1057					;	NONE
   1058					;-
   1059
   1060					.MACRO	EXCT	INST
   1061					.IF	NB,INST
   1062						 MOV	#INST,R0	; ** KL10 INSTRUCTION POINTER TO R0
   1063					.ENDC	; .IF NB,INST
   1064						 JSR	PC,$EXCT	; ** EXECUTE IT
   1065					.ENDM	; $EXCT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 29
DMBMCP -- DTE-20 OPERATION MACROS

   1067					;+
   1068					; SM -- DIAGNOSTIC START MICROCODE TRANSLATION MACRO
   1069					;
   1070					; SM TRANSLATES A DIAGNOSTIC EMT 100 INTO A "MASTER RESET/ START CLOCK" SEQUENCE
   1071					;
   1072					; SEQUENCE:
   1073					;
   1074					;	1. A KL10 MASTER RESET SEQUENCE IS EXECUTED
   1075					;	2. THE KL10 CLOCK IS STARTED
   1076					;
   1077					; ERROR RETURN -- CC-C SET
   1078					;
   1079					; SUCCESS RETURN -- CC-C CLEAR
   1080					;
   1081					; STACK SUMMARY:
   1082					;
   1083					;	STACK IS UNAFFECTED
   1084					;
   1085					; CALLER'S RESPONSIBILITIES:
   1086					;
   1087					;	NONE
   1088					;-
   1089
   1090					.MACRO	SM
   1091						 JSR	PC,$KLMR	; ** MASTER RESET THE KL10
   1092						 MOV	#STRCLK,R0	; ** START CLOCK FUNCTION CODE TO R0
   1093						 JSR	PC,$DDFXC	; ** START THE KL10 CLOCK
   1094					.ENDM	; SM
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 30
DMBMCP -- DTE-20 OPERATION MACROS

   1096					;+
   1097					; WWADR -- DIAGNOSTIC CRAM ADDRESS LOAD TRANSLATION MACRO
   1098					;
   1099					; WWADR TRANSLATES A DIAGNOSTIC EMT 075 INTO A CALL TO "$ACRAM"
   1100					;
   1101					; SEQUENCE OF OPERATION
   1102					;
   1103					;	1. CRAM ADDRESS IS LOADED INTO R0
   1104					;	2. CALL TO "$ACRAM" IS MADE
   1105					;
   1106					; ERROR RETURN -- CC-C SET
   1107					;
   1108					; SUCCESS RETURN -- CC-C CLEAR
   1109					;
   1110					; STACK SUMMARY:
   1111					;
   1112					;	STACK IS UNAFFECTED
   1113					;
   1114					; CALLER'S RESPONSIBILITIES:
   1115					;
   1116					;	NONE:
   1117					;-
   1118
   1119					.MACRO	WWADR	ADDR
   1120					.IF	NB,ADDR
   1121						 MOV	#ADDR,R0	; ** CRAM ADDRESS TO R0
   1122					.ENDC	; .IF NB,ADDR
   1123						 MOV	R0,-(SP)	; ** SAVE R0
   1124						 JSR	PC,$KLMR	; ** RESET THE KL10
   1125						 MOV	(SP)+,R0	; ** RESTORE R0
   1126						 JSR	PC,$ACRAM	; ** LOAD THE CRAM ADDRESS REGISTER
   1127					.ENDM	; WWADR
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 31
DMBMCP -- DTE-20 OPERATION MACROS

   1129					;+
   1130					; MRESET -- DIAGNOSTIC KL10 MASTER RESET TRANSLATION MACRO
   1131					;
   1132					; MRESET TRANSLATES A DIAGNOSTIC EMT 076 INTO A CALL TO "$KLMR"
   1133					;
   1134					; SEQUENCE OF OPERATION:
   1135					;
   1136					;	1. THE CALL TO "$KLMR" IS EXECUTED
   1137					;
   1138					; ERROR RETURN -- CC-C SET
   1139					;
   1140					; SUCCESS RETURN -- CC-C CLEAR
   1141					;
   1142					; STACK SUMMARY:
   1143					;
   1144					;	STACK IS UNAFFECTED
   1145					;
   1146					; CALLER'S RESPONSIBILITIES:
   1147					;
   1148					;	NONE
   1149					;-
   1150
   1151					.MACRO	MRESET
   1152						 JSR	PC,$KLMR	; ** MASTER RESET THE KL10
   1153					.ENDM	; MRESET
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 32
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1155					.SBTTL REGISTER SAVE/RESTORE TRANSLATION MACROS
   1156
   1157					;+
   1158					; REGSAV -- R1 - R5 SAVE TRANSLATION MACRO
   1159					; REGRST -- R1 - R5 RESTORE TRANSLATION MACRO
   1160					;
   1161					; SEQUENCE OF OPERATION:
   1162					;
   1163					;	1. REGSAV -- R1 - R5 ARE SAVED ON THE STACK
   1164					;	2. REGRST -- R1 - R5 ARE RESTORED FROM THE STACK
   1165					;
   1166					; ALWAYS RETURNS SUCCESS
   1167					;
   1168					; STACK SUMMARY:
   1169					;
   1170					;	SP+00 ==> SAVED R1
   1171					;	SP+02 ==> SAVED R2
   1172					;	SP+04 ==> SAVED R3
   1173					;	SP+06 ==> SAVED R4
   1174					;	SP+10 ==> SAVED R5
   1175					;	SP+12 ==> SUBROUTINE RETURN PC
   1176					;
   1177					; CALLER'S RESPONSIBILITIES
   1178					;
   1179					;	CALLS TO THESE ROUTINES MUST BE PARALLEL AND SYMMETRIC
   1180					;	A ROUTINE WHICH CALLS REGSAV UPON ENTRY MAY RESTORE R0 - R5 AND EXIT
   1181					;	TO ITS CALLER VIA A SIMPLE "RTS PC"
   1182					;-
   1183
   1184					.MACRO	REGSAV
   1185						 JSR	PC,SAV.5	; ** SAVE R1 - R5 ON THE STACK
   1186					.ENDM	; REGSAV
   1187
   1188					.MACRO	REGRST
   1189						 JSR	PC,RST.5	; ** RESTORE R1 - R5 AND RETURN
   1190					.ENDM	; REGRST
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 33
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1192					;+
   1193					; VARIOUS PRINT MACROS
   1194					;
   1195					; PFORCE -- NOOP
   1196					; PNORML -- NOOP
   1197					; PNTBAK -- NOOP
   1198					;
   1199					; CHARACTERISTICS:
   1200					;
   1201					;	OBVIOUS
   1202					;-
   1203
   1204					.MACRO	PFORCE
   1205					.ENDM	; PFORCE
   1206
   1207					.MACRO	PNORML
   1208					.ENDM	; PNORML
   1209
   1210					.MACRO	PNTBAK
   1211					.ENDM	; PNTBAK
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 34
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1213					;+
   1214					; PNT36 -- 36-BIT KL10 WORD PRINT TRANSLATION MACRO
   1215					;
   1216					; PNT36 TRANSLATES A DIAGNOSTIC EMT 042 INTO A CALL TO "$WDD36"
   1217					;
   1218					; SEQUENCE OF OPERATION:
   1219					;
   1220					;	1. THE POINTER TO THE 36-BIT DATA IS LOADED INTO R0
   1221					;	2. THE CALL TO "$WDD36" IS MADE
   1222					;
   1223					; ALWAYS RETURNS SUCCESS
   1224					;
   1225					; STACK SUMMARY:
   1226					;
   1227					;	STACK IS UNAFFECTED
   1228					;
   1229					; CALLER'S RESPONSIBILITIES:
   1230					;
   1231					;	NONE
   1232					;-
   1233
   1234					.MACRO	PNT36	ADDR
   1235					.IF	NB,ADDR
   1236						 MOV	#ADDR,R0	; ** ADDRESS OF 36-BIT KL10 NUMBER TO R0
   1237					.ENDC	; .IF NB,ADDR
   1238						 JSR	PC,$WDD36	; ** CALL TO PRINT ROUTINE
   1239					.ENDM	; PNT36
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 35
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1241					;+
   1242					; PNTADR -- 22-BIT KL10 ADDRESS PRINT TRANSLATION MACRO
   1243					;
   1244					; PNTADR TRANSLATES A DIAGNOSTIC EMT 042 INTO A CALL TO "$WDD22"
   1245					;
   1246					; SEQUENCE OF OPERATION:
   1247					;
   1248					;	1. THE POINTER TO THE 22-BIT DATA IS LOADED INTO R0
   1249					;	2. THE CALL TO "$WDD22" IS MADE
   1250					;
   1251					; ALWAYS RETURNS SUCCESS
   1252					;
   1253					; STACK SUMMARY:
   1254					;
   1255					;	STACK IS UNAFFECTED
   1256					;
   1257					; CALLER'S RESPONSIBILITIES:
   1258					;
   1259					;	NONE
   1260					;-
   1261
   1262					.MACRO	PNTADR	ADDR
   1263					.IF	NB,ADDR
   1264						 MOV	#ADDR,R0	; ** ADDRESS OF 22-BIT KL10 ADDRESS TO R0
   1265					.ENDC	; .IF NB,ADDR
   1266						 JSR	PC,$WDD22	; ** CALL TO PRINT ROUTINE
   1267					.ENDM	; PNTADR
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 36
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1269					;+
   1270					; PNTNBR -- NUMERIC PRINT TRANSLATION MACRO
   1271					;
   1272					; PNTNBR TRANSLATES A DIAGNOSTIC PRINT EMT INTO A CALL TO "$TDB2O"
   1273					;
   1274					; SEQUENCE OF OPERATION:
   1275					;
   1276					;	"$TDB2O" IS CALLED
   1277					;
   1278					; ALWAYS RETURNS SUCCESS
   1279					;
   1280					; STACK SUMMARY:
   1281					;
   1282					;	STACK IS UNAFFECTED
   1283					;
   1284					; CALLER'S RESPONSIBILITIES:
   1285					;
   1286					;	NONE
   1287					;-
   1288
   1289					.MACRO	PNTNBR
   1290						 MOV	R0,-(SP)	; ** SAVE R0
   1291						 BIC	#^C777,R0	; ** MASK OFF UNWANTED BITS
   1292						 JSR	PC,$TDB2O	; ** PRINT THE NUMBER
   1293						 MOV	(SP)+,R0	; ** RESTORE R0
   1294					.ENDM	; PNTNBR
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 37
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1296					;+
   1297					; PNT36B -- 36-BIT KL10 WORD PRINT TRANSLATION MACRO
   1298					;
   1299					; PNT36B TRANSLATES A DIAGNOSTIC EMT 134 INTO A CALL TO "$WDD36"
   1300					;
   1301					; SEQUENCE OF OPERATION:
   1302					;
   1303					;	1. THE POINTER TO THE 36-BIT DATA IS LOADED INTO R0
   1304					;	2. THE CALL TO "$WDD36" IS MADE
   1305					;
   1306					; ALWAYS RETURNS SUCCESS
   1307					;
   1308					; STACK SUMMARY:
   1309					;
   1310					;	STACK IS UNAFFECTED
   1311					;
   1312					; CALLER'S RESPONSIBILITIES:
   1313					;
   1314					;	NONE
   1315					;-
   1316
   1317					.MACRO	PNT36B	ADDR
   1318					.IF	NB,ADDR
   1319						 MOV	#ADDR,R0	; ** ADDRESS OF 36-BIT KL10 NUMBER TO R0
   1320					.ENDC	; .IF NB,ADDR
   1321						 JSR	PC,$WDD36	; ** CALL TO PRINT ROUTINE
   1322					.ENDM	; PNT36B
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 38
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1324					;+ PNTOCT -- PRINT OCTAL NUMBER TRANSLATION MACRO
   1325					;
   1326					; PNTOCT TRANSLATES A DIAGNOSTIC EMT 035 INTO A CALL TO "$TDB2O"
   1327					;
   1328					; SEQUENCE OF OPERATION
   1329					;
   1330					;	1. THE NUMBER TO BE PRINTED IS LOADED INTO R0
   1331					;	2. THE CALL IS MADE TO "$TDB2O"
   1332					;
   1333					; ALWAYS RETURNS SUCCESS
   1334					;
   1335					; STACK SUMMARY:
   1336					;
   1337					;	STACK IS UNAFFECTED
   1338					;
   1339					; CALLER'S RESPONSIBILITIES:
   1340					;
   1341					;	NONE
   1342					;-
   1343
   1344					.MACRO	PNTOCT	NUMB
   1345					.IF	NB,NUMB
   1346						.NTYPE	$$T$$,NUMB
   1347					.IF	EQ,$$T$$&70
   1348						 MOV	NUMB,R0		; ** GET THE NUMBER INTO R0
   1349					.IFF
   1350						 MOV	#NUMB,R0	; ** GET THE NUMBER INTO R0
   1351					.ENDC	; .IF EQ,$$T$$&70
   1352					.ENDC	; .IF NB,NUMB
   1353						 JSR	PC,$TDB2O	; ** PRINT THE NUMBER
   1354					.ENDM	; PNTOCT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 39
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1356					;+ PNTOCS -- PRINT OCTAL NUMBER TRANSLATION MACRO
   1357					;
   1358					; PNTOCS TRANSLATES A DIAGNOSTIC EMT 036 INTO A CALL TO "$TDB2O"
   1359					;
   1360					; SEQUENCE OF OPERATION
   1361					;
   1362					;	1. THE NUMBER TO BE PRINTED IS LOADED INTO R0
   1363					;	2. THE CALL IS MADE TO "$TDB2O"
   1364					;
   1365					; ALWAYS RETURNS SUCCESS
   1366					;
   1367					; STACK SUMMARY:
   1368					;
   1369					;	STACK IS UNAFFECTED
   1370					;
   1371					; CALLER'S RESPONSIBILITIES:
   1372					;
   1373					;	NONE
   1374					;-
   1375
   1376					.MACRO	PNTOCS	NUMB
   1377					.IF	NB,NUMB
   1378						.NTYPE	$$T$$,NUMB
   1379					.IF	EQ,$$T$$&70
   1380						 MOV	NUMB,R0		; ** GET THE NUMBER INTO R0
   1381					.IFF
   1382						 MOV	#NUMB,R0	; ** GET THE NUMBER INTO R0
   1383					.ENDC	; .IF EQ,$$T$$&70
   1384					.ENDC	; .IF NB,NUMB
   1385						 JSR	PC,$TDB2O	; ** PRINT THE NUMBER
   1386					.ENDM	; PNTOCS
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 40
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1388					;+ PNTDEC -- PRINT DECIMAL NUMBER TRANSLATION MACRO
   1389					;
   1390					; PNTDEC TRANSLATES A DIAGNOSTIC EMT 037 INTO A CALL TO "$TDB2I"
   1391					;
   1392					; SEQUENCE OF OPERATION
   1393					;
   1394					;	1. THE NUMBER TO BE PRINTED IS LOADED INTO R0
   1395					;	2. THE CALL IS MADE TO "$TDB2I"
   1396					;
   1397					; ALWAYS RETURNS SUCCESS
   1398					;
   1399					; STACK SUMMARY:
   1400					;
   1401					;	STACK IS UNAFFECTED
   1402					;
   1403					; CALLER'S RESPONSIBILITIES:
   1404					;
   1405					;	NONE
   1406					;-
   1407
   1408					.MACRO	PNTDEC	NUMB
   1409					.IF	NB,NUMB
   1410						.NTYPE	$$T$$,NUMB
   1411					.IF	EQ,$$T$$&70
   1412						 MOV	NUMB,R0		; ** GET THE NUMBER INTO R0
   1413					.IFF
   1414						 MOV	#NUMB,R0	; ** GET THE NUMBER INTO R0
   1415					.ENDC	; .IF EQ,$$T$$&70
   1416					.ENDC	; .IF NB,NUMB
   1417						 JSR	PC,$TDB2I	; ** PRINT THE NUMBER
   1418					.ENDM	; PNTDEC
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 41
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1420					;+
   1421					; PNTODT -- FORMATTED OCTAL PRINT TRANSLATION MACRO
   1422					;
   1423					; PNTODT TRANSLATES A DIAGNOSTIC EMT 047 INTO A CALL TO "$TDB2O"
   1424					;
   1425					; SEQUENCE OF OPERATION:
   1426					;
   1427					;	1. THE NUMBER IN R0 IS MASKED TO THE PROPER WIDTH
   1428					;	2. THE CALL TO "$TDB2O" IS MADE
   1429					;
   1430					; ALWAYS RETURNS SUCCESS
   1431					;
   1432					; STACK SUMMARY:
   1433					;
   1434					;	STACK IS UNAFFECTED
   1435					;
   1436					; CALLER'S RESPONSIBILITIES:
   1437					;
   1438					;	NONE
   1439					;-
   1440
   1441					.MACRO	PNTODT	ARG
   1442					.IF	NB,ARG
   1443						 MOV	R0,-(SP)	; ** SAVE R0
   1444					.IF	EQ,ARG-1
   1445						 BIC	#^C7,R0		; ** MASK OUT UNWANTED BITS
   1446					.ENDC	; .IF EQ, ARG-1
   1447					.IF	EQ,ARG-2
   1448						 BIC	#^C77,R0	; ** MASK OUT UNWANTED BITS
   1449					.ENDC	; .IF EQ, ARG-2
   1450					.IF	EQ,ARG-3
   1451						 BIC	#^C777,R0	; ** MASK OUT UNWANTED BITS
   1452					.ENDC	; .IF EQ, ARG-3
   1453					.IF	EQ,ARG-4
   1454						 BIC	#^C7777,R0	; ** MASK OUT UNWANTED BITS
   1455					.ENDC	; .IF EQ, ARG-4
   1456					.IF	EQ,ARG-5
   1457						 BIC	#^C77777,R0	; ** MASK OUT UNWANTED BITS
   1458					.ENDC	; .IF EQ, ARG-5
   1459					.IFTF
   1460						 JSR	PC,$TDB2O	; ** PRINT THE NUMBER
   1461					.IFT
   1462						 MOV	(SP)+,R0	; ** RESTORE R0
   1463					.ENDC	;.IF NB,ARG
   1464					.ENDM	; PNTODT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 42
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1466					;+
   1467					; PMSG -- DIAGNOSTIC PRINT TRANSLATION MACRO
   1468					;
   1469					; PMSG TRANSLATES A DIAGNOSTIC PRINT CALL INTO A CALL TO  "$TTDMS"
   1470					;
   1471					; SEQUENCE OF OPERATION:
   1472					;
   1473					;	1. A POINTER TO THE MESSAGE IS LOADED INTO R0
   1474					;	2. THE CALL TO "$TTDMS" IS MADE
   1475					;
   1476					; ALWAYS RETURNS SUCCESS
   1477					;
   1478					; STACK SUMMARY:
   1479					;
   1480					;	STACK IS UNAFFECTED
   1481					;
   1482					; CALLER'S RESPONSIBILITIES
   1483					;
   1484					;	NONE
   1485					;-
   1486
   1487					.MACRO	PMSG	MSG,?L1,?L2
   1488						 MOV	#L1,R0		; ** MESSAGE POINTER TO R0
   1489						 JSR	PC,$TTDMS	; ** OUTPUT THE MESSAGE
   1490						 BR	L2		; ** BRANCH AROUND TEXT
   1491						 ;
   1492					L1:	 .ASCIZ	%MSG%
   1493						 .EVEN
   1494					L2:
   1495					.ENDM	; PMSG
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 43
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1497					;+
   1498					; PNTAL -- DIAGNOSTIC PRINT ASCII LINE TRANSLATION MACRO
   1499					;
   1500					; PNTAL TRANSLATES A DIAGNOSTIC PRINT CALL INTO A CALL TO  "$TTDMS"
   1501					;
   1502					; SEQUENCE OF OPERATION:
   1503					;
   1504					;	1. A POINTER TO THE MESSAGE IS LOADED INTO R0
   1505					;	2. THE CALL TO "$TTDMS" IS MADE
   1506					;
   1507					; ALWAYS RETURNS SUCCESS
   1508					;
   1509					; STACK SUMMARY:
   1510					;
   1511					;	STACK IS UNAFFECTED
   1512					;
   1513					; CALLER'S RESPONSIBILITIES
   1514					;
   1515					;	NONE
   1516					;-
   1517
   1518					.MACRO	PNTAL
   1519						 JSR	PC,$TTDMS	; ** OUTPUT THE MESSAGE
   1520					.ENDM	; PNTAL
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 44
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1522					;+
   1523					; $PMSG -- DIAGNOSTIC PRINT TRANSLATION MACRO
   1524					;
   1525					; $PMSG TRANSLATES A DIAGNOSTIC PRINT EMT INTO A CALL TO "$TTDMS"
   1526					;
   1527					; SEQUENCE OF OPERATION
   1528					;
   1529					;	1. MESSAGE POINTER IS LOADED INTO R0
   1530					;	2. CALL IS MADE TO "$TTDMS"
   1531					;
   1532					; ALWAYS RETURNS SUCCESS
   1533					;
   1534					; STACK SUMMARY:
   1535					;
   1536					;	STACK IS UNAFFECTED
   1537					;-
   1538
   1539					.MACRO	$PMSG	ARG
   1540					.IF	NB,ARG
   1541						 MOV	#ARG,R0		; ** TEXT POINTER TO R0
   1542					.ENDC	; .IF NB,ARG
   1543						 JSR	PC,$TTDMS	; ** OUTPUT THE MESSAGE
   1544					.ENDM	; $PMSG
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 45
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1546					;+
   1547					; PSPACE ET. AL. -- VARIOUS PRINT MACROS
   1548					;
   1549					; PSPACE PRINTS A <SPACE>
   1550					; PTAB PRINTS A <TAB>
   1551					; PSLASH PRINTS A <SLASH>
   1552					; PBELL PRINTS A <BELL>
   1553					; PCRLF PRINTS A <CR><LF>
   1554					;
   1555					; SEQUENCE OF OPERATION:
   1556					;
   1557					;	THE APPROPRIATE CALL IS MADE
   1558					;
   1559					; ALWAYS RETURNS SUCCESS
   1560					;
   1561					; STACK SUMMARY:
   1562					;
   1563					;	STACK IS UNAFFECTED
   1564					;
   1565					; CALLER'S RESPONSIBILITIES:
   1566					;
   1567					;	NONE
   1568					;-
   1569
   1570					.MACRO	PSPACE
   1571						 JSR	PC,$TTSPC	; ** PRINT A <SPACE>
   1572					.ENDM	; PSPACE
   1573
   1574					.MACRO	PSLASH
   1575						 JSR	PC,$TTSLS	; ** PRINT A <SLASH>
   1576					.ENDM	; PSLASH
   1577
   1578					.MACRO	PBELL
   1579						 JSR	PC,$TTBEL	; ** PRINT A <BELL>
   1580					.ENDM	; PBELL
   1581
   1582					.MACRO	PTAB
   1583						 JSR	PC,$TTTAB	; ** PRINT A <TAB>
   1584					.ENDM	; PTAB
   1585
   1586					.MACRO	PCRLF
   1587						 JSR	PC,$TCRLF	; ** PRINT A <CR><LF>
   1588					.ENDM	; PCRLF
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 46
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1590					;+
   1591					; TTIOCT -- DIAGNOSTIC OCTAL INPUT TRANSLATION MACRO
   1592					;
   1593					; TTIOCT TRANSLATES A DIAGNOSTIC OCTAL INPUT EMT INTO A CALL TO "$TDO2B"
   1594					;
   1595					; SEQUENCE OF OPERATION:
   1596					;
   1597					;	THE CALL TO "$TDO2B" IS EXECUTED
   1598					;
   1599					; SUCCESS RETURN -- CC-C CLEAR
   1600					;
   1601					; ERROR RETURN -- CC-C SET
   1602					;
   1603					;	NUMBER IN R0 IN EITHER CASE
   1604					;
   1605					; STACK SUMMARY:
   1606					;
   1607					;	STACK IS UNAFFECTED
   1608					;
   1609					; CALLER'S RESPONSIBILITIES:
   1610					;
   1611					;	NONE
   1612					;-
   1613
   1614					.MACRO	TTIOCT
   1615						 JSR	PC,$TDO2B	; ** READ OCTAL NUMBER
   1616					.ENDM	; TTIOCT
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 47
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1618					;+
   1619					; TTIDEC -- DIAGNOSTIC DECIMAL INPUT TRANSLATION MACRO
   1620					;
   1621					; TTIDEC TRANSLATES A DIAGNOSTIC DECIMAL INPUT EMT INTO A CALL TO "$TDI2B"
   1622					;
   1623					; SEQUENCE OF OPERATION:
   1624					;
   1625					;	THE CALL TO "$TDI2B" IS EXECUTED
   1626					;
   1627					; SUCCESS RETURN -- CC-C CLEAR
   1628					;
   1629					; ERROR RETURN -- CC-C SET
   1630					;
   1631					;	NUMBER IN R0 IN EITHER CASE
   1632					;
   1633					; STACK SUMMARY:
   1634					;
   1635					;	STACK IS UNAFFECTED
   1636					;
   1637					; CALLER'S RESPONSIBILITIES:
   1638					;
   1639					;	NONE
   1640					;-
   1641
   1642					.MACRO	TTIDEC
   1643						 JSR	PC,$TDI2B	; ** READ DECIMAL NUMBER
   1644					.ENDM	; TTIDEC
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 48
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1646					;+
   1647					; TTILIN -- DIAGNOSTIC TERMINAL INPUT TRANSLATION MACRO
   1648					;
   1649					; TTILIN TRANSLATES A DIAGNOSTIC TERMINAL INPUT EMT INTO A CALL TO "$TTRD"
   1650					;
   1651					; SEQUENCE OF OPERATION:
   1652					;
   1653					;	THE CALL TO "$TTRD" IS EXECUTED
   1654					;
   1655					; SUCCESS RETURN -- INPUT STRING IN ".TTIBF"
   1656					;
   1657					; ESCAPES THROUGH "$ERROR" ON ERROR
   1658					;
   1659					; STACK SUMMARY:
   1660					;
   1661					;	STACK IS UNAFFECTED
   1662					;
   1663					; CALLER'S RESPONSIBILITIES:
   1664					;
   1665					;	NONE
   1666					;-
   1667
   1668					.MACRO	TTILIN
   1669						 JSR	PC,$TTRD	; ** READ TERMINAL INPUT
   1670					.ENDM	; TTILIN
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 49
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1672					;+
   1673					; TTILNW -- DIAGNOSTIC TERMINAL INPUT TRANSLATION MACRO
   1674					;
   1675					; TTILNW TRANSLATES A DIAGNOSTIC TERMINAL INPUT EMT INTO A CALL TO "$TTRD"
   1676					;
   1677					; SEQUENCE OF OPERATION:
   1678					;
   1679					;	THE CALL TO "$TTRD" IS EXECUTED
   1680					;
   1681					; SUCCESS RETURN -- INPUT STRING IN ".TTIBF"
   1682					;
   1683					; ESCAPES THROUGH "$ERROR" ON ERROR
   1684					;
   1685					; STACK SUMMARY:
   1686					;
   1687					;	STACK IS UNAFFECTED
   1688					;
   1689					; CALLER'S RESPONSIBILITIES:
   1690					;
   1691					;	NONE
   1692					;-
   1693
   1694					.MACRO	TTILNW
   1695						 JSR	PC,$TTRD	; ** READ TERMINAL INPUT
   1696					.ENDM	; TTILNW
KLINIT - KL CPU INITIALIZATION 	MACRO M1113  11-NOV-81 11:25  PAGE 50
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1698					;+
   1699					; FATAL -- MEMORY BOOT ERROR CALL TRANSLATION MACRO
   1700					;
   1701					; FATAL EXECUTES A CALL TO "$FATAL" WHERE THE MEMORY BOOT IS ABORTED
   1702					; AFTER THE ERROR CODE IS PRINTED
   1703					;
   1704					; SEQUENCE OF OPERATION:
   1705					;
   1706					;	THE CALL TO "$FATAL" IS EXECUTED
   1707					;
   1708					; NEVER RETURNS (GUARANTEED ESCAPE)
   1709					;
   1710					; STACK SUMMARY:
   1711					;
   1712					;	POINTER TO ERROR TEXT IS ON TOP OF THE STACK
   1713					;
   1714					; CALLER'S RESPONSIBILITIES:
   1715					;
   1716					;	NONE
   1717					;-
   1718
   1719					.MACRO	FATAL	TXT
   1720					.IF NB,	<TXT>
   1721					ER$'TXT==.
   1722						 JSR	PC,$FATAL	; ** FATAL "TXT" ERROR
   1723						 .ASCIZ	%TXT%
   1724						.EVEN
   1725					.IFF
   1726						.ERROR			; ** UNDEFINED ERROR TRAP!!
   1727					.ENDC	; .IF NB, <TXT>
   1728					.ENDM	; FATAL
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 51
REGISTER SAVE/RESTORE TRANSLATION MACROS

   1730						.TITLE	KLIAC	-- AC PROGRAM CONTROL
   1731	000000					IDENT$	5,3								; ADP02
						.IDENT	/005030/
   1732
   1733					;
   1734					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1735					;
   1736					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1737					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1738					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1739					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1740					;
   1741					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1742					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1743					; EQUIPMENT CORPORATION.
   1744					;
   1745					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1746					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1747					;
   1748					; VERSION 05-03									; ADP02
   1749					;
   1750					; ALAN D. PECKHAM  29-MAR-77
   1751					;
   1752					; MODIFIED BY:
   1753					;
   1754					;	R. BELANGER	24-AUG-78	CLEAR ALL EIGHT (0 - 7) AC BLOCKS.
   1755					;
   1756					; FUNCTION: KL AC MANIPULATION.
   1757					;
   1758					; EQUATED SYMBOLS
   1759					;
   1760		000003 			DATAO	=	3		; KL I/O SUBFUNCTION CODE.
   1761		000010 			PAG	=	10		; KL DEVICE.
   1762					;
   1763					; LOCAL DATA
   1764					;
   1765	000000					.PSECT	DATA,D
   1766	000000				DACAB:	WD36$	400000 000000	; OBJECT FOR DATAO PAG TO SET AC BLOCK.
	000000	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000003	   000 	   010 			 .BYTE	BY$$3,BY$$4
   1767	000005				DACBI:	IO10$	DATAO PAG,,0	; KL INSTRUCTION TO SET AC BLOCK.
	000005	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	000010	   011 	   016 			 .BYTE	BY$$3,BY$$4
   1768	000012				DACAD:	WD22$	0		; BUCKET FOR AC ADDRESSES.
	000012	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   1769	000015				DACBF:	WD36$	0 0		; GENERAL 36 BIT BUCKET.
	000015	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000020	   000 	   000 			 .BYTE	BY$$3,BY$$4
   1770						.EVEN
   1771	000000					.PSECT
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 52
$LDNGO	-- LOAD AC BLOCKS AND GO

   1773						.SBTTL	$LDNGO	-- LOAD AC BLOCKS AND GO
   1774					;+
   1775					; LOAD THE SPECIFIED AC BLOCKS WITH INSTRUCTIONS AND DATA AND
   1776					; CONDITIONALLY START THE KL AT A GIVEN LOCATION. THE LOADING IS DRIVEN
   1777					; BY A LIST WHICH IS POINTED TO BY R0. THE ENTRIES ARE:
   1778					;
   1779					;  CHOOSE AC BLOCK AND LOAD N ACS STARTING WITH M
   1780					;
   1781					;	.BYTE	ACBLK*10,M,N	; WHERE AND HOW MUCH
   1782					;	.BLKB	N*5		; WORDS TO LOAD
   1783					;
   1784					;  START KL AT AC M AND RETURN
   1785					;
   1786					;	.BYTE	ACBLK*10,M,-1	; WHERE TO START
   1787					;
   1788					;  RETURN WITHOUT STARTING KL
   1789					;
   1790					;	.BYTE	-1		; END OF LOAD LIST
   1791					;
   1792					;  A PREVIOUS CONTEXT AC BLOCK MAY BE SPECIFIED IN THE BOTTOM 3 BITS
   1793					;  OF THE AC BLOCK BYTE. IF LEFT ZERO, THE PREVIOUS CONTEXT WILL BE
   1794					;  AC BLOCK ZERO.
   1795					;
   1796					; INPUTS:
   1797					;	R0	- POINTER TO AC LOAD LIST.
   1798					;
   1799					; OUTPUTS:
   1800					;	CARRY IS SET IF ERROR OCCURRED DURING LOAD OR START.
   1801					;-
   1802
   1803	000000	004537 	023142'		$LDNGO::JSR	R5,$RSAVE	; SAVE MY REGISTERS.
   1804	000004	010005 				MOV	R0,R5		; COPY LOAD LIST.
   1805	000006	105137 	000003'			COMB	DACAB+3		; INVALIDATE THE CURRENT AC BLOCK.		; ADP02
   1806	000012	112500 			10$:	MOVB	(R5)+,R0	; NEXT AC BLOCK NUMBER
   1807	000014	100434 				BMI	80$		; STOP IF NEGATIVE.
   1808	000016	123700 	000003'			CMPB	DACAB+3,R0	; IF THE SAME AS LAST TIME
   1809	000022	001411 				BEQ	30$		; THEN DON'T CHANGE AC BLOCK
   1810	000024	110037 	000003'			MOVB	R0,DACAB+3	; OTHERWISE GET BLOCK AND
   1811	000030	012700 	000005'			MOV	#DACBI,R0	; EXECUTE DATAO PAG
   1812	000034	012701 	000000'			MOV	#DACAB,R1	; WITH OUR DATA.
   1813	000040					CALL	$XCDT		; AVOID USING AN AC.
	000040	004737 	000206'			 JSR	PC,$XCDT
   1814	000044	103421 				BCS	90$
   1815	000046	012700 	000012'		30$:	MOV	#DACAD,R0	; GET PLACE FOR
   1816	000052	112510 				MOVB	(R5)+,(R0)	; THE NEXT AC ADDRESS
   1817	000054	112502 				MOVB	(R5)+,R2	; AND GET NUMBER OF ACS.
   1818	000056	100411 				BMI	50$		; IF NEG, START AT AC.
   1819	000060	010501 			40$:	MOV	R5,R1		; GET ADDRESS OF DATA
   1820	000062					CALL	$DPOS		; AND STORE IT.
	000062	004737 	012654'			 JSR	PC,$DPOS
   1821	000066	103410 				BCS	90$
   1822	000070	105210 				INCB	(R0)		; INCREMENT ADDRESS
   1823	000072	062705 	000005 			ADD	#5,R5		; AND LIST POINTER
   1824	000076	077210 				SOB	R2,40$		; AND GO BACK IF MORE.
   1825	000100	000744 				BR	10$		; OTHERWISE GET NEXT DIRECTION.
   1826	000102				50$:	CALLR	$STRKL		; START KL AT ADDRESS.
	000102	000137 	030002'			 JMP	$STRKL
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 52-1
$LDNGO	-- LOAD AC BLOCKS AND GO

   1827	000106	000241 			80$:	CLC			; END OF LOAD.
   1828	000110				90$:	RETURN
	000110	000207 				 RTS	PC
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 53
$ZERAC	-- ZERO AC SETS 0 TO 6

   1830						.SBTTL	$ZERAC	-- ZERO AC SETS 0 TO 6
   1831					;+
   1832					; ZERO ALL ACS INCLUDING SET 7 WHICH BELONGS TO THE MICROCODE.
   1833					;
   1834					; NO INPUTS
   1835					;
   1836					; OUTPUTS:
   1837					;	CARRY IS SET ON ERROR.
   1838					;-
   1839
   1840	000112	004537 	023142'		$ZERAC::JSR	R5,$RSAVE	; SAVE HIS REGISTERS.
   1841	000116	012703 	000070 			MOV	#70,R3		; ZERO AC SET 6 TO 0.				; ADP02
   1842
   1843	000122	110337 	000003'		10$:	MOVB	R3,DACAB+3	; NEXT AC BLOCK.				;**-1
   1844	000126	012701 	000000'			MOV	#DACAB,R1	; GET DATA FOR
   1845	000132	012700 	000005'			MOV	#DACBI,R0	; DATAO PAG TO
   1846	000136					CALL	$XCDT		; SET THE CURRENT AC SET.
	000136	004737 	000206'			 JSR	PC,$XCDT
   1847	000142	103420 				BCS	90$
   1848	000144	012702 	000020 			MOV	#20,R2		; ZERO 20 ACS.
   1849	000150	012701 	000000'			MOV	#.ZERO,R1	; (DATA TO DEPOSIT)
   1850	000154	012700 	000012'			MOV	#DACAD,R0	; GET POINTER TO ADDRESS
   1851	000160	105010 				CLRB	(R0)		; AND START AT ZERO.
   1852	000162				20$:	CALL	$DPOS		; CLEAR THE AC.
	000162	004737 	012654'			 JSR	PC,$DPOS
   1853	000166	103406 				BCS	90$
   1854	000170	105210 				INCB	(R0)		; GO ON
   1855	000172	077205 				SOB	R2,20$		; TO THE NEXT ONE.
   1856	000174	162703 	000010 			SUB	#10,R3		; IF ANOTHER AC SET TO DO			; ADP01
   1857	000200	002350 				BGE	10$		; THEN DO IT.					; ADP01
   1858	000202	000241 				CLC			; (MAKE SURE CARRY IS CLEAR)			; ADP01
   1859	000204				90$:	RETURN
	000204	000207 				 RTS	PC
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 54
$XCDT	-- INSTRUCTION EXECUTER

   1861						.SBTTL	$XCDT	-- INSTRUCTION EXECUTER
   1862					;+
   1863					; EXECUTE AN INSTRUCTION AND SUBSTITUTE THE GIVEN DATA INTO THE AR
   1864					; AFTER THE AR FETCH. THIS IS DONE BY LOADING THE INSTRUCTION AND
   1865					; STEPPING THE CLOCK UNTIL "CON AR LOADED H" IS UP. THE DATA IS THEN
   1866					; WRITTEN INTO THE AR OVER THE PREVIOUS FETCHED DATA AND THE INSTRUCTION
   1867					; IS ALLOWED TO FINISH. NOTE THAT THIS ASSUMES THAT THE FETCH IS
   1868					; SUCCESSFUL.
   1869					;
   1870					; INPUTS:
   1871					;	R0	- ADDRESS OF KL INSTRUCTION TO EXECUTE.
   1872					;	R1	- ADDRESS OF 36 BIT DATA WORD TO SUBSTITUTE.
   1873					;
   1874					; OUTPUTS:
   1875					;	CARRY IS SET IF ERROR OCCURS.
   1876					;-
   1877
   1878	000206	004537 	023142'		$XCDT::	JSR	R5,$RSAVE	; SAVE THE REGISTERS AND
   1879	000212	010103 				MOV	R1,R3		; COPY THE POINTER TO THE DATA.
   1880	000214					CALL	$LDAR		; LOAD THE INSTRUCTION
	000214	004737 	030252'			 JSR	PC,$LDAR
   1881	000220	103436 				BCS	90$		; AND
   1882	000222	012700 	012000 			MOV	#.CONBT,R0	; PUSH THE CONTINUE BUTTON.
   1883	000226					CALL	$DFXC
	000226	004737 	013540'			 JSR	PC,$DFXC
   1884	000232	103431 				BCS	90$
   1885	000234	012700 	000022 			MOV	#18.,R0		; GIVE THE CLOCK
   1886	000240					CALL	$BURST		; AN 18. TICK LEAD.
	000240	004737 	030666'			 JSR	PC,$BURST
   1887	000244	103424 				BCS	90$
   1888	000246	012702 	000144 			MOV	#100.,R2	; LIMIT THE CLOCK TO 100. TICKS
   1889	000252	012701 	000015'			MOV	#DACBF,R1	; AND GET SCRATCH BUFFER.
   1890	000256	012700 	132000 		20$:	MOV	#<132*1000>,R0	; NOW READ
   1891	000262					CALL	$DFRD		; A DIAGNOSTIC REGISTER AND
	000262	004737 	013224'			 JSR	PC,$DFRD
   1892	000266	103413 				BCS	90$
   1893	000270	132761 	000020 	000001 		BITB	#20,1(R1)	; IF "CON AR LOADED H"
   1894	000276	001010 				BNE	30$		; IS NOT UP,
   1895	000300	012700 	002000 			MOV	#.SSCLK,R0	; STEP THE CLOCK
   1896	000304					CALL	$DFXC
	000304	004737 	013540'			 JSR	PC,$DFXC
   1897	000310	103402 				BCS	90$
   1898	000312	077217 				SOB	R2,20$		; AND LOOK AGAIN.
   1899	000314	000261 				SEC			; THIS TOOK TOO LONG.
   1900	000316				90$:	RETURN
	000316	000207 				 RTS	PC
   1901	000320	012700 	004000 		30$:	MOV	#.CECLK,R0	; THE AR IS RIPE TO LOAD, SO
   1902	000324					CALL	$DFXC		; PHASE THE CLOCKS
	000324	004737 	013540'			 JSR	PC,$DFXC
   1903	000330	103772 				BCS	90$
   1904	000332	010301 				MOV	R3,R1		; GET THE SUBSTITUTE WORD
   1905	000334	012700 	077000 			MOV	#.LDAR,R0	; AND LOAD IT
   1906	000340					CALL	$DFWR		; INTO THE AR.
	000340	004737 	013336'			 JSR	PC,$DFWR
   1907	000344	103764 				BCS	90$
   1908	000346	012700 	001000 			MOV	#.STRCL,R0	; LET THE INSTRUCTION COMPLETE.
   1909	000352					CALLR	$DFXC
KLIAC	-- AC PROGRAM CONTROL	MACRO M1113  11-NOV-81 11:25  PAGE 54-1
$XCDT	-- INSTRUCTION EXECUTER

	000352	000137 	013540'			 JMP	$DFXC
KLICA -- LOAD CACHE REFILL RAM	MACRO M1113  11-NOV-81 11:25  PAGE 55
$XCDT	-- INSTRUCTION EXECUTER

   1911						.TITLE	KLICA -- LOAD CACHE REFILL RAM
   1912	000356					IDENT$	5,1
						.IDENT	/005010/
   1913					;
   1914					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   1915					;
   1916					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   1917					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   1918					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   1919					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   1920					;
   1921					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   1922					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   1923					; EQUIPMENT CORPORATION.
   1924					;
   1925					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   1926					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   1927					;
   1928					; VERSION 05-01
   1929					;
   1930					; ALAN D. PECKHAM  8-APR-77
   1931					;
   1932					; MODIFIED BY:
   1933					;
   1934					; FUNCTION: COMPUTE THE REFILL ALGORITHM FOR THE GIVEN CACHE CONFIGURATION
   1935					;  AND WRITE IT TO THE CACHE REFILL RAM.
   1936					;
   1938					; EQUATED SYMBOLS
   1939					;
   1940		000000 			APR	=	0		; KL DEVICE.
   1941		000002 			BLKO	=	2		; KL I/O SUBFUNCTION CODE.
   1942		000014 			CCA	=	14		; KL DEVICE.
   1943		000004 			CONO	=	4		; KL I/O SUBFUNCTION CODE.
   1944		000001 			DATAI	=	1		; KL I/O SUBFUNCTION CODE.
   1945		000540 			HRR	=	540		; KL INSTRUCTION CODE.
   1946		000254 			JRST	=	254		; KL INSTRUCTION CODE.
   1947		000322 			JUMPE	=	322		; KL INSTRUCTION CODE.
   1948		000010 			PAG	=	10		; KL DEVICE.
   1949		000400 			SETZ	=	400		; KL INSTRUCTION CODE.
   1950					;
   1951					; LOCAL DATA
   1952					;
   1953	000022					.PSECT	DATA,D
   1954						.ODD			; DCAWRF MUST BE ON EVEN BOUNDRY.
   1955	000023	   000 	   000 	   010 	DCAPGM:	.BYTE	0,0,10		; LOAD AC0-AC7 OF AC SET 0.
   1956	000026					WD36$	0 0		; AC0
	000026	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000031	   000 	   000 			 .BYTE	BY$$3,BY$$4
   1957	000033				DCASIA:	IO10$	DATAI CCA,,0	; AC1 - A SWPIA INSTRUCTION.
	000033	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	000036	   014 	   016 			 .BYTE	BY$$3,BY$$4
   1958	000040				DCARCA:	IO10$	CONO PAG,,0	; AC2 - RESET CACHE & PAGING STATUS.
	000040	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000043	   012 	   016 			 .BYTE	BY$$3,BY$$4
   1959	000045					I10$	JUMPE 0,,3	; AC3
	000045	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000050	   220 	   006 			 .BYTE	BY$$3,BY$$4
KLICA -- LOAD CACHE REFILL RAM	MACRO M1113  11-NOV-81 11:25  PAGE 55-1
$XCDT	-- INSTRUCTION EXECUTER

   1960	000052					I10$	HRR 6,,0	; AC4
	000052	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000055	   003 	   013 			 .BYTE	BY$$3,BY$$4
   1961	000057					I10$	SETZ 0,,0	; AC5
	000057	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000062	   000 	   010 			 .BYTE	BY$$3,BY$$4
   1962	000064				DCAWRF:	IO10$	BLKO APR,,0	; AC6 - WRFIL INSTRUCTION.
	000064	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000067	   001 	   016 			 .BYTE	BY$$3,BY$$4
   1963	000071					I10$	JRST 0,,3	; AC7
	000071	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000074	   140 	   005 			 .BYTE	BY$$3,BY$$4
   1964	000076	   000 	   001 	   377 		.BYTE	0,1,-1		; START AT AC1 OF AC SET 0.
   1965	000101				DCARFL:	.BLKB	5		; WORK TABLE.
   1966						.EVEN
   1967	000000					.PSECT	TEXT,D
   1968	000000				TCACEF:	ERROR	<CACHE ENABLE FAILED>
	000000	   077 	   040 	   103 		 .ASCIZ	\? CACHE ENABLE FAILED\
	000003	   101 	   103 	   110
	000006	   105 	   040 	   105
	000011	   116 	   101 	   102
	000014	   114 	   105 	   040
	000017	   106 	   101 	   111
	000022	   114 	   105 	   104
	000025	   000
   1969	000026				TCAACE:	MESSAGE	<ALL CACHES ENABLED>
	000026	   101 	   114 	   114 		 .ASCIZ	\ALL CACHES ENABLED\
	000031	   040 	   103 	   101
	000034	   103 	   110 	   105
	000037	   123 	   040 	   105
	000042	   116 	   101 	   102
	000045	   114 	   105 	   104
	000050	   000
   1970	000051				TCASCE:	MESSAGE	<CACHES X,X,X, ENABLED>
	000051	   103 	   101 	   103 		 .ASCIZ	\CACHES X,X,X, ENABLED\
	000054	   110 	   105 	   123
	000057	   040 	   130 	   054
	000062	   130 	   054 	   130
	000065	   054 	   040 	   105
	000070	   116 	   101 	   102
	000073	   114 	   105 	   104
	000076	   000
   1971	000077				TCAACD:	MESSAGE	<CACHES DISABLED>
	000077	   103 	   101 	   103 		 .ASCIZ	\CACHES DISABLED\
	000102	   110 	   105 	   123
	000105	   040 	   104 	   111
	000110	   123 	   101 	   102
	000113	   114 	   105 	   104
	000116	   000
   1972	000356					.PSECT
KLICA -- LOAD CACHE REFILL RAM	MACRO M1113  11-NOV-81 11:25  PAGE 56
$SETCA	-- CONFIGURE CACHE

   1974						.SBTTL	$SETCA	-- CONFIGURE CACHE
   1975					;+
   1976					; INITIALIZE THE CACHE REFILL RAM IF CACHE IS TO BE TURNED ON AND
   1977					; REPORT THE CACHE STATUS.
   1978					;
   1979					; INPUTS:
   1980					;	.NCACH	- NUMBER OF CACHES TO BE USED.
   1981					;	.CACHN	- NUMBERS OF THE CACHES TO BE USED.
   1982					;
   1983					; OUTPUTS:
   1984					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   1985					;-
   1986
   1987	000356	012700 	000023'		$SETCA::MOV	#DCAPGM,R0	; GET OUR KL PROGRAM
   1988	000362					CALL	$LDNGO		; LOAD AND START IT.
	000362	004737 	000000'			 JSR	PC,$LDNGO
   1989	000366	103564 				BCS	200$
   1990	000370	105737 	000062'			TSTB	.NCACH		; IF NO CACHES WERE REQUESTED
   1991	000374	003557 				BLE	190$		; THEN NO ACTION NECESSARY.
   1992	000376	012701 	000066'			MOV	#DCAWRF+2,R1	; GET DATA AREA AND
   1993	000402	042711 	000003 			BIC	#3,(R1)		; CLEAR IT OUT.
   1994	000406	005041 				CLR	-(R1)
   1995	000410	005005 				CLR	R5		; +++001 R5 >MUST< INITIALLY BE CLEAR!!!
   1996	000412	113700 	000063'			MOVB	.CACHN,R0	; SET LRU IN CASE OF SINGLE CACHE.
   1997	000416	006200 				ASR	R0		; SHIFT LOW ORDER BIT
   1998	000420	103002 				BCC	20$		; INTO KL INSTRUCTION -
   1999	000422	052711 	100000 			BIS	#100000,(R1)	; (KIND OF A HACK....)
   2000	000426	050061 	000002 		20$:	BIS	R0,2(R1)	; INSTALL REST.
   2001									; INITIALIZE COUNTERS:
   2002	000432	105003 				CLRB	R3		; NEW CACHE NUMBER.
   2003	000434	105004 			30$:	CLRB	R4		; MRU CACHE.
   2004	000436	105005 			40$:	CLRB	R5		; LRU CACHE
   2005	000440	122737 	000001 	000062'	50$:	CMPB	#1,.NCACH	; ONLY ONE CACHE ?
   2006	000446	001504 				BEQ	180$		; YES, BYPASS THIS STUFF.
   2007	000450	042721 	100000 			BIC	#100000,(R1)+	; CLEAR OUT DATA BITS.
   2008	000454	042711 	000003 			BIC	#000003,(R1)
   2009	000460	012702 	000101'			MOV	#DCARFL,R2	; INITIALIZE TABLE.
   2010	000464	110522 				MOVB	R5,(R2)+	; LRU CACHE
   2011	000466	005000 				CLR	R0		; FIND LOW CACHE NUMBER
   2012	000470	000401 				BR	70$
   2013	000472	005200 			60$:	INC	R0
   2014	000474	120005 			70$:	CMPB	R0,R5
   2015	000476	001775 				BEQ	60$
   2016	000500	120004 				CMPB	R0,R4
   2017	000502	001773 				BEQ	60$
   2018	000504	012701 	000003 			MOV	#3,R1		; AND HIGH CACHE NUMBER
   2019	000510	000401 				BR	90$
   2020	000512	005301 			80$:	DEC	R1
   2021	000514	120105 			90$:	CMPB	R1,R5
   2022	000516	001775 				BEQ	80$
   2023	000520	120104 				CMPB	R1,R4
   2024	000522	001773 				BEQ	80$
   2025	000524	005705 				TST	R5		; AND INSTALL IN TABLE
   2026	000526	100003 				BPL	100$		; AS INTERMEDIATE CACHES.
   2027	000530	110022 				MOVB	R0,(R2)+
   2028	000532	110122 				MOVB	R1,(R2)+
   2029	000534	000402 				BR	110$
KLICA -- LOAD CACHE REFILL RAM	MACRO M1113  11-NOV-81 11:25  PAGE 56-1
$SETCA	-- CONFIGURE CACHE

   2030	000536	110122 			100$:	MOVB	R1,(R2)+
   2031	000540	110022 				MOVB	R0,(R2)+
   2032	000542	110422 			110$:	MOVB	R4,(R2)+	; MRU CACHE
   2033	000544	110312 				MOVB	R3,(R2)		; NEW CACHE.
   2034	000546	120342 			120$:	CMPB	R3,-(R2)	; ADJUST LIST TO REFLECT
   2035	000550	001376 				BNE	120$		; NEW CACHE IN USE.
   2036	000552	022702 	000101'			CMP	#DCARFL,R2
   2037	000556	003402 				BLE	130$
   2038	000560	012702 	000101'			MOV	#DCARFL,R2
   2039	000564	116222 	000001 		130$:	MOVB	1(R2),(R2)+
   2040	000570	022702 	000105'			CMP	#DCARFL+4,R2
   2041	000574	003373 				BGT	130$
   2042	000576	012702 	000101'			MOV	#DCARFL,R2	; NOW, SCREEN OUT
   2043	000602	012701 	000063'		140$:	MOV	#.CACHN,R1	; UNWANTED LRUS.
   2044	000606	113700 	000062'			MOVB	.NCACH,R0
   2045	000612	122112 			150$:	CMPB	(R1)+,(R2)
   2046	000614	001403 				BEQ	160$
   2047	000616	077003 				SOB	R0,150$
   2048	000620	005202 				INC	R2
   2049	000622	000767 				BR	140$
   2050	000624	012701 	000064'		160$:	MOV	#DCAWRF,R1
   2051	000630	112200 				MOVB	(R2)+,R0	; GET LRU AND
   2052	000632	006200 				ASR	R0		; SHIFT LOW ORDER BIT
   2053	000634	103002 				BCC	170$		; INTO KL INSTRUCTION -
   2054	000636	052711 	100000 			BIS	#100000,(R1)	; (KIND OF A HACK....)
   2055	000642	050061 	000002 		170$:	BIS	R0,2(R1)	; INSTALL REST OF LRU.
   2056	000646	122212 				CMPB	(R2)+,(R2)	; CHECK ORDER AND
   2057	000650	003003 				BGT	180$
   2058	000652	052761 	000002 	000002 		BIS	#000002,2(R1)	; AND INSTALL IT.
   2059	000660	012700 	000000'		180$:	MOV	#.ZERO,R0	; GIVE THE DATA TO THE AC PROGRAM
   2060	000664					CALL	$DPOS		; TO STORE IN THE REFILL RAM.
	000664	004737 	012654'			 JSR	PC,$DPOS
   2061	000670	103423 				BCS	200$
   2062	000672	062711 	000004 			ADD	#4,(R1)		; INCREMENT THE COUNTS
   2063	000676	105205 				INCB	R5
   2064	000700	122705 	000003 			CMPB	#3,R5
   2065	000704	002255 				BGE	50$		; TO LOOP.
   2066	000706	105105 				COMB	R5
   2067	000710	005105 				COM	R5
   2068	000712	100651 				BMI	40$
   2069	000714	105204 				INCB	R4
   2070	000716	122704 	000003 			CMPB	#3,R4
   2071	000722	002245 				BGE	40$
   2072	000724	105203 				INCB	R3
   2073	000726	122703 	000003 			CMPB	#3,R3
   2074	000732	002240 				BGE	30$
   2075	000734				190$:	CALLR	LCARPT		; REPORT WHAT CACHES ENABLED.
	000734	000137 	000754'			 JMP	LCARPT
   2076	000740				200$:	PRINT	#TCACEF		; CACHE ENABLE FAILED.
	000740	012700 	000000'			 MOV	#TCACEF,R0
	000744	004737 	027034'			 JSR	PC,$TTMSG
   2077	000750	000261 				SEC
   2078	000752					RETURN
	000752	000207 				 RTS	PC
KLICA -- LOAD CACHE REFILL RAM	MACRO M1113  11-NOV-81 11:25  PAGE 57
$SETCA	-- CONFIGURE CACHE

   2080					;+
   2081					; REPORT THE CACHE CONFIGURATION
   2082					;-
   2083
   2084	000754	012701 	000077'		LCARPT:	MOV	#TCAACD,R1	; GET MESSAGE FOR NO CACHE
   2085	000760	113702 	000062'			MOVB	.NCACH,R2	; AND IF NONE,
   2086	000764	003433 				BLE	80$		; PRINT THE MESSAGE.
   2087	000766	012701 	000026'			MOV	#TCAACE,R1	; USE ALL CACHE MESSAGE IF
   2088	000772	022702 	000004 			CMP	#4,R2		; ALL CACHES ARE BEING USED.
   2089	000776	003426 				BLE	80$
   2090	001000	012701 	000051'			MOV	#TCASCE,R1	; MUST BE A PARTIAL CONFIGURATION.
   2091	001004	010105 				MOV	R1,R5
   2092	001006	122725 	000123 		10$:	CMPB	#'S,(R5)+	; LOOK FOR PLACE TO
   2093	001012	001375 				BNE	10$
   2094	001014	122725 	000040 			CMPB	#' ,(R5)+	; INSERT CACHE NUMBERS.
   2095	001020	001372 				BNE	10$
   2096	001022	012703 	000063'			MOV	#.CACHN,R3
   2097	001026	112315 			20$:	MOVB	(R3)+,(R5)	; GET NEXT NUMBER
   2098	001030	152725 	000060 			BISB	#'0,(R5)+	; AND MAKE PRINTABLE.
   2099	001034	112725 	000054 			MOVB	#',,(R5)+
   2100	001040	077206 				SOB	R2,20$		; DO FOR ALL NUMBERS.
   2101	001042	111765 	177777 		30$:	MOVB	(PC),-1(R5)	; NOW CLEAN UP
   2102	001046	122725 	000040 			CMPB	#' ,(R5)+
   2103	001052	001373 				BNE	30$
   2104	001054				80$:	PRINT	R1
	001054	010100 				 MOV	R1,R0
	001056	004737 	027034'			 JSR	PC,$TTMSG
   2105	001062	000241 				CLC
   2106	001064				90$:	RETURN
	001064	000207 				 RTS	PC
   2107
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 58
$SETCA	-- CONFIGURE CACHE

   2110						.TITLE	KLICB -- LOAD THE MICROCODE
   2111	001066					IDENT$	5,2,KLI$$F
						.IDENT	/B05020/
   2112					;
   2113					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2114					;
   2115					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2116					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2117					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2118					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   2119					;
   2120					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2121					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2122					; EQUIPMENT CORPORATION.
   2123					;
   2124					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2125					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2126					;
   2127					; VERSION 05-02
   2128					;
   2129					; ALAN D. PECKHAM  11-APR-77
   2130					;
   2131					; MODIFICATIONS:
   2132					;
   2133					;	K. LEFEBVRE	13-MAR-79	EXPANDED CRAM/DRAM ERROR REPORT
   2134					;					TCO 4.2209
   2135					; 001	S. LEAPLINE	19-AUG-81	READ MICROCODE FILENAME FROM CONFIG FILE
   2136					;
   2137					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES WHICH LOAD THE KL
   2138					;  MICROCODE FROM THE FILE 'KL.MCB'.
   2139					;
   2140					; EQUATED SYMBOLS
   2141					;
   2142		000000 			APR	=	0		; KL DEVICE.
   2143		000000 			BLKI	=	0		; KL I/O SUBFUNCTION CODE.
   2144					;
   2145					; LOCAL DATA
   2146					;
   2147	000106					.PSECT	DATA,D
   2148	000106	043240 	000000 	000000 	DCBFNM:	.RAD50	/KL       MCB/	; MICROCODE FILE NAME.
	000114	050672
   2149	000116	000000 				.WORD	0		; GET LATEST VERSION.
   2150	000120	   005 	   005 			.BYTE	5,5
   2151	000122	054523 	000000 			.WORD	"SY,0
   2152	000126	000000 			DCBADR:	.WORD	0		; RAM ADDRESS FROM RECORD.
   2153	000130	000000 	000000 	000000 	DCBDAT:	.WORD	0,0,0,0,0,0	; RAM DATA WORK AREA.
	000136	000000 	000000 	000000
   2154	000144	000000 			DCBCNT:	.WORD	0		; VERIFY DIFFERENCE COUNT.
   2155	000146	000000 			DCBFIX:	.WORD	0		; [4.2209] MICROCODE FIX FLAG
   2156	000150	000000 	000000 	000000 	DCBCBF:	.WORD	0,0,0,0,0,0	; HOLDING AREA FOR C-RAM WORD.
	000156	000000 	000000 	000000
   2157	000164	000000 	000000 	000000 	DCBDBF:	.WORD	0,0,0		; D-RAM WORD HOLDING AREA.
   2158						.EVEN			; DCBBF MUST BE ON A WORD BOUNDRY.
   2159	000172				DCBBF:	WD36$	0 0		; APRID RESULT.
	000172	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000175	   000 	   000 			 .BYTE	BY$$3,BY$$4
   2160	000177				DCBA17:	WD22$	17		; AC17 ADDRESS.
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 58-1
$SETCA	-- CONFIGURE CACHE

	000177	   017 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   2161	000202				DCBAPR:	IO10$	BLKI APR,,17	; APRID INSTRUCTION.
	000202	   017 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000205	   000 	   016 			 .BYTE	BY$$3,BY$$4
   2162	000207	   113 	   114 	   111 	TTTPR:	.ASCIZ	/KLI -- /			;[4.2209]
	000212	   040 	   055 	   055
	000215	   040 	   000
   2163						.EVEN
   2164	000117					.PSECT	TEXT,D
   2165	000117				TCBDCW:	ERROR	<C-RAM DIFFERS AT XXXXXX>
	000117	   077 	   040 	   103 		 .ASCIZ	\? C-RAM DIFFERS AT XXXXXX\
	000122	   055 	   122 	   101
	000125	   115 	   040 	   104
	000130	   111 	   106 	   106
	000133	   105 	   122 	   123
	000136	   040 	   101 	   124
	000141	   040 	   130 	   130
	000144	   130 	   130 	   130
	000147	   130 	   000
   2166	000151				TCBDDW:	ERROR	<D-RAM DIFFERS AT XXXXXX>
	000151	   077 	   040 	   104 		 .ASCIZ	\? D-RAM DIFFERS AT XXXXXX\
	000154	   055 	   122 	   101
	000157	   115 	   040 	   104
	000162	   111 	   106 	   106
	000165	   105 	   122 	   123
	000170	   040 	   101 	   124
	000173	   040 	   130 	   130
	000176	   130 	   130 	   130
	000201	   130 	   000
   2167	000203				TCBMLF:	ERROR	<MICROCODE LOAD FAILED>
	000203	   077 	   040 	   115 		 .ASCIZ	\? MICROCODE LOAD FAILED\
	000206	   111 	   103 	   122
	000211	   117 	   103 	   117
	000214	   104 	   105 	   040
	000217	   114 	   117 	   101
	000222	   104 	   040 	   106
	000225	   101 	   111 	   114
	000230	   105 	   104 	   000
   2168	000233				TCBMVF:	ERROR	<MICROCODE VERIFY FAILED>
	000233	   077 	   040 	   115 		 .ASCIZ	\? MICROCODE VERIFY FAILED\
	000236	   111 	   103 	   122
	000241	   117 	   103 	   117
	000244	   104 	   105 	   040
	000247	   126 	   105 	   122
	000252	   111 	   106 	   131
	000255	   040 	   106 	   101
	000260	   111 	   114 	   105
	000263	   104 	   000
   2169	000265				TCBFXF:	ERROR	<MICROCODE FIX FAILED>			; [4.2209]
	000265	   077 	   040 	   115 		 .ASCIZ	\? MICROCODE FIX FAILED\
	000270	   111 	   103 	   122
	000273	   117 	   103 	   117
	000276	   104 	   105 	   040
	000301	   106 	   111 	   130
	000304	   040 	   106 	   101
	000307	   111 	   114 	   105
	000312	   104 	   000
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 58-2
$SETCA	-- CONFIGURE CACHE

   2170	000314				TCBMVL:	MESSAGE	<MICROCODE VERSION XXX LOADED>
	000314	   115 	   111 	   103 		 .ASCIZ	\MICROCODE VERSION XXX LOADED\
	000317	   122 	   117 	   103
	000322	   117 	   104 	   105
	000325	   040 	   126 	   105
	000330	   122 	   123 	   111
	000333	   117 	   116 	   040
	000336	   130 	   130 	   130
	000341	   040 	   114 	   117
	000344	   101 	   104 	   105
	000347	   104 	   000
   2171	000351				TCBMVV:	MESSAGE	<MICROCODE VERSION XXX VERIFIED>
	000351	   115 	   111 	   103 		 .ASCIZ	\MICROCODE VERSION XXX VERIFIED\
	000354	   122 	   117 	   103
	000357	   117 	   104 	   105
	000362	   040 	   126 	   105
	000365	   122 	   123 	   111
	000370	   117 	   116 	   040
	000373	   130 	   130 	   130
	000376	   040 	   126 	   105
	000401	   122 	   111 	   106
	000404	   111 	   105 	   104
	000407	   000
   2172	000410				TCBBAD:	MESSAGE	<BAD  >					; [4.2209]
	000410	   102 	   101 	   104 		 .ASCIZ	\BAD  \
	000413	   040 	   040 	   000
   2173	000416				TCBGOD:	MESSAGE	<GOOD >					; [4.2209]
	000416	   107 	   117 	   117 		 .ASCIZ	\GOOD \
	000421	   104 	   040 	   000
   2174	000424				TCBXOR:	MESSAGE	<XOR  >					; [4.2209]
	000424	   130 	   117 	   122 		 .ASCIZ	\XOR  \
	000427	   040 	   040 	   000
   2175	000432				TCBMRE:	WARNING	<READ ERROR ON CONFIG FILE - LOADING DEFAULT MICROCODE> ;001
	000432	   045 	   040 	   122 		 .ASCIZ	\% READ ERROR ON CONFIG FILE - LOADING DEFAULT MICROCODE\
	000435	   105 	   101 	   104
	000440	   040 	   105 	   122
	000443	   122 	   117 	   122
	000446	   040 	   117 	   116
	000451	   040 	   103 	   117
	000454	   116 	   106 	   111
	000457	   107 	   040 	   106
	000462	   111 	   114 	   105
	000465	   040 	   055 	   040
	000470	   114 	   117 	   101
	000473	   104 	   111 	   116
	000476	   107 	   040 	   104
	000501	   105 	   106 	   101
	000504	   125 	   114 	   124
	000507	   040 	   115 	   111
	000512	   103 	   122 	   117
	000515	   103 	   117 	   104
	000520	   105 	   000
   2176	001066					.PSECT
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 59
$SETCA	-- CONFIGURE CACHE

   2178					;+
   2179					; LOAD THE BINARY RAM FILE INTO THE KL OR USE THE FILE TO
   2180					; VERIFY THE RAM CODE.
   2181					; THE RAM BINARY FILE HAS THREE RECORD TYPES.
   2182					;	*D-RAM RECORDS:
   2183					;	.WORD	2+<6*N>		; BYTE COUNT RECORD LENGTH.
   2184					;	.WORD	ADR		; D-RAM ADDRESS (SHOULD BE EVEN).
   2185					;	.BLKW	3*N		; D-RAM CODE WORDS.
   2186					;	*C-RAM RECORDS:
   2187					;	.WORD	2+<14*N>	; BYTE COUNT RECORD LENGTH.
   2188					;	.WORD	100000+ADR	; C-RAM ADDRESS.
   2189					;	.BLKW	6*N		; C-RAM CODE WORDS.
   2190					;	*END OF FILE:
   2191					;	.WORD	2		; BYTE COUNT RECORD LENGTH.
   2192					;	.WORD	100000!ADR	; C-RAM STARTING ADDRESS
   2193					;				; (NORMALLY ZERO).
   2194					;
   2195					; THE C-RAM RECORDS MUST BE SORTED IN ASCENDING ORDER BY ADDRESS
   2196					; SO THAT UNUSED WORDS MAY BE CLEARED WITHOUT HAVING TO CLEAR ALL
   2197					; THE C-RAM LOCATIONS.
   2198					;-
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 60
$MCBLD	-- LOAD THE RAMS

   2200						.SBTTL	$MCBLD	-- LOAD THE RAMS
   2201					;+
   2202					; LOAD OR VERIFY THE C&D-RAMS AND REPORT THE VERSION.
   2203					;
   2204					; INPUTS:
   2205					;	.DRSW	- IF NON-ZERO, LOAD RAMS, OTHERWISE VERIFY.
   2206					;
   2207					; OUTPUTS:
   2208					;	CARRY SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   2209					;+
   2210					; GET THE FILE AND INITIALIZE THE KL FOR MICROCODE OPERATIONS.
   2211					;-
   2212
   2213	001066				$MCBLD::
   2214	001066	105737 	000025'			TSTB	.MCBSW		; 001 - FILENAME ALREADY SPECIFIED ??
   2215	001072	001007 				BNE	5$		; 001 - BRANCH IF YES
   2216	001074					CALL	LQMRFN		; 001 - READ MICROCODE FILENAME FROM CONFIG FILE
	001074	004737 	001246'			 JSR	PC,LQMRFN
   2217	001100	103004 				BCC	5$		; 001 - BRANCH IF NO ERRORS
   2218	001102					PRINT	#TCBMRE		; 001 - TELL HIM WERE LOADING THE DEFAULT
	001102	012700 	000432'			 MOV	#TCBMRE,R0
	001106	004737 	027034'			 JSR	PC,$TTMSG
   2219	001112	012700 	000106'		5$:	MOV	#DCBFNM,R0	; GET UCODE FILE NAME AND
   2220	001116	012710 				MOV	(PC)+,(R0)	; ASSUME MODEL A MICROCODE
   2224	001120	043241 				.RAD50	/KLA/		; FOR MODEL A CPU.
   2226	001122	105737 	000042'			TSTB	.EASW		; IF
   2227	001126	003402 				BLE	10$		; MODEL B THEN
   2228	001130	012710 				MOV	(PC)+,(R0)	; CHOOSE
   2232	001132	043270 				.RAD50	/KLX/		; MODEL B MICROCODE
   2234	001134	105737 	000025'		10$:	TSTB	.MCBSW		; IF FILE NAME SPECIFIED
   2235	001140	003402 				BLE	20$		; BY OPERATOR
   2236	001142	012700 	000454'			MOV	#.MCBFN,R0	; THEN USE HIS.
   2237	001146				20$:	CALL	$LOOKUP		; AND OPEN IT.
	001146	004737 	007342'			 JSR	PC,$LOOKUP
   2238	001152	103411 				BCS	40$
   2239	001154	005037 	000144'			CLR	DCBCNT		; INITIALIZE RAM DIFFERENCE COUNT.
   2240	001160	012703 	000130'			MOV	#DCBDAT,R3	; DATA AREA AND
   2241	001164	005002 				CLR	R2		; NEXT C-RAM ADDRESS TO DEPOSIT.
   2242	001166					CALL	$KLMR		; RESET THE WORLD.
	001166	004737 	014666'			 JSR	PC,$KLMR
   2243	001172	103077 				BCC	LCBRC
   2244	001174				30$:	RETURN
	001174	000207 				 RTS	PC
   2245
   2246	001176	122737 	000000G	000522'	40$:	CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND
   2247	001204	001373 				BNE	30$
   2248	001206					CALL	$IOERR		; DECLARE THE ERROR.
	001206	004737 	007126'			 JSR	PC,$IOERR
   2249	001212	000137 	002504'			JMP	LCBFL		; REPORT OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 61
$MCBLD	-- LOAD THE RAMS

   2251					;+
   2252					; READ 3 OR 6 WORDS FROM THE MICROCODE FILE.
   2253					;
   2254					; INPUTS:
   2255					;	R3	- POINTER TO AREA TO RECIEVE DATA.
   2256					;
   2257					; OUTPUTS:
   2258					;	CARRY SET IF ERROR. R0, R4 & R5 ARE DESTROYED.
   2259					;-
   2260
   2261						.ENABL	LSB
   2262	001216	012705 	000003 		LCB3W:	MOV	#3,R5		; GET 3 WORDS.
   2263	001222	000402 				BR	10$
   2264	001224	012705 	000006 		LCB6W:	MOV	#6,R5		; GET 6 WORDS.
   2265	001230	010304 			10$:	MOV	R3,R4
   2266	001232				20$:	CALL	$READW
	001232	004737 	010104'			 JSR	PC,$READW
   2267	001236	103402 				BCS	30$
   2268	001240	010024 				MOV	R0,(R4)+
   2269	001242	077505 				SOB	R5,20$
   2270	001244				30$:	RETURN
	001244	000207 				 RTS	PC
   2271						.DSABL	LSB
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 62
$MCBLD	-- LOAD THE RAMS

   2273					;+
   2274					;
   2275					; LOCAL SUBROUTINE TO READ THE MICROCODE FILE NAME FROM KL.CFG. IF NOT FOUND
   2276					; THE DEFAULT(DEC SUPPLIED) MICROCODE IS LOADED.
   2277					;
   2278					;-
   2279
   2280	001246				LQMRFN:
   2281	001246	012700 	001522'			MOV	#DQBFNM,R0		; GET THE FILE TO LOOK UP
   2282	001252					CALL	$LOOKUP			; LOOK UP THE FILE
	001252	004737 	007342'			 JSR	PC,$LOOKUP
   2283	001256	103002 				BCC	10$			; BRANCH IF FOUND
   2284	001260	000241 				CLC				; NO ERROR IF NOT FOUND
   2285	001262	000442 				BR	60$			; EXIT
   2286	001264				10$:
   2287	001264					CALL	$READC			; READ FIRST RECORD
	001264	004737 	007776'			 JSR	PC,$READC
   2288	001270	103434 				BCS	50$			; EXIT ON ERROR
   2289	001272	022700 	000004 			CMP	#4,R0			; THIS RECORD OURS ??
   2290	001276	001411 				BEQ	30$			; BRANCH IF YES
   2291	001300	005700 				TST	R0			; END-OF-FILE ??
   2292	001302	001003 				BNE	20$			; NO, SKIP THIS RECORD
   2293	001304				15$:
   2294	001304					CALL	$CLOSE			; CLOSE THE FILE
	001304	004737 	006636'			 JSR	PC,$CLOSE
   2295	001310	000427 				BR	60$			; AND EXIT
   2296	001312				20$:
   2297	001312					CALL	$READS			; SKIP THIS RECORD
	001312	004737 	010034'			 JSR	PC,$READS
   2298	001316	103421 				BCS	50$			; EXIT ON ERROR
   2299	001320	000761 				BR	10$			; READ THE NEXT RECORD
   2300	001322				30$:
   2301	001322					CALL	$READB			; READ THE NEXT BYTE
	001322	004737 	010200'			 JSR	PC,$READB
   2302	001326	103415 				BCS	50$			; EXIT ON ERROR
   2303	001330	110037 	000025'			MOVB	R0,.MCBSW		; SAVE THE FILENAME SWITCH
   2304	001334	001763 				BEQ	15$			; IF NO FILENAME, EXIT
   2305	001336	012701 	000004 			MOV	#4,R1			; SETUP TO READ THE FILENAME
   2306	001342	012702 	000454'			MOV	#.MCBFN,R2		; PLACE IT HERE
   2307	001346				40$:
   2308	001346					CALL	$READW			; READ A WORD
	001346	004737 	010104'			 JSR	PC,$READW
   2309	001352	103403 				BCS	50$			; EXIT ON ERROR
   2310	001354	010022 				MOV	R0,(R2)+		; SAVE IT
   2311	001356	077105 				SOB	R1,40$			; LOOP FOR ALL
   2312	001360	000751 				BR	15$			; EXIT
   2313	001362				50$:
   2314	001362					CALL	$PURGE			; PURGE THE FILE
	001362	004737 	007704'			 JSR	PC,$PURGE
   2315	001366	000261 				SEC
   2316	001370				60$:
   2317	001370					RETURN
	001370	000207 				 RTS	PC
   2318
   2319					;+
   2320					; IDENTIFY A RECORD AND DISPATCH ON RECORD TYPE.
   2321					; END-OF-FILE IS HANDLED HERE - THE C-RAM STARTING ADDRESS IS
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 62-1
$MCBLD	-- LOAD THE RAMS

   2322					; USED TO START THE MICROCODE, THE FILE IS CLOSED, AND WE GO
   2323					; TO IDENTIFY THE MICROCODE VERSION.
   2324					;
   2325					; NECESSARY EVILS:
   2326					;	.SYIRC	- THE NUMBER OF BYTES LEFT IN THE CURRENT RECORD.
   2327					;-
   2328
   2329	001372				LCBRC:	CALL	$READC		; GET ADDRESS.
	001372	004737 	007776'			 JSR	PC,$READC
   2330	001376	103435 				BCS	10$
   2331	001400	010037 	000126'			MOV	R0,DCBADR
   2332	001404	100402 				BMI	5$		; C-RAM RECORD OR END OF FILE
   2333	001406	000137 	002040'			JMP	LCBDRM		; D-RAM RECORD
   2334	001412	042737 	100000 	000126'	5$:	BIC	#BIT15,DCBADR	; (REMOVE FLAG)
   2335	001420	005737 	000530'			TST	.SYIRC
   2336	001424	003024 				BGT	LCBCRM		; C-RAM RECORD OR
   2337	001426	013700 	000126'			MOV	DCBADR,R0	; C-RAM START ADDRESS.
   2338	001432	005737 	000144'			TST	DCBCNT		; IF VERIFY AND DIFFERENCE FOUND
   2339	001436	001015 				BNE	10$		; SIGNAL ERROR.
   2340	001440					CALL	$ACRAM		; SET C-RAM STARTING ADDRESS
	001440	004737 	011746'			 JSR	PC,$ACRAM
   2341	001444	103412 				BCS	10$		; AND
   2342	001446	012700 	001000 			MOV	#.STRCL,R0
   2343	001452					CALL	$DFXC		; START THE CLOCK.
	001452	004737 	013540'			 JSR	PC,$DFXC
   2344	001456					CALL	$CLOSE		; CLOSE THE FILE
	001456	004737 	006636'			 JSR	PC,$CLOSE
   2345	001462					CALL	$CLLOG		; [4.1.1073]CLOSE LOG FILE
	001462	004737 	000000G			 JSR	PC,$CLLOG
   2346	001466	000137 	002542'			JMP	LCBVR		; IDENTIFY RAM VERSION.
   2347	001472	000137 	002504'		10$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 63
$MCBLD	-- LOAD THE RAMS

   2349					;+
   2350					; PROCESS C-RAM RECORD.
   2351					;
   2352					; NECESSARY EVILS:
   2353					;	R3	- POINTS TO THE CURRENT C-RAM WORD FROM THE FILE.
   2354					;	R2	- CONTAINS THE NEXT EXPECTED C-RAM ADDRESS TO BE
   2355					;		  WRITTEN.
   2356					;	DCBADR	- CONTAINS THE ADDRESS FOR THE C-RAM WORD READ
   2357					;		  FROM THE FILE.
   2358					;	.DRSW	- IF NON-ZERO, THEN VERIFY.
   2359					;	.SYIRC	- COUNT OF BYTES LEFT IN CURRENT RECORD.
   2360					;-
   2361
   2362	001476	005037 	000146'		LCBCRM:	CLR	DCBFIX		; [4.2209] CLEAR FIX FLAG
   2363	001502	105737 	000027'			TSTB	.DRSW		; TEST FUNCTION...
   2364	001506	001013 				BNE	20$		; IF WE ARE LOADING,
   2365	001510	020237 	000126'		10$:	CMP	R2,DCBADR	; AND WORDS ARE BEING SKIPPED
   2366	001514	001412 				BEQ	30$
   2367	001516	012701 	000000'			MOV	#.ZERO,R1	; THEN ZERO THE WORDS OUT.
   2368	001522	010200 				MOV	R2,R0
   2369	001524					CALL	$WCRAM
	001524	004737 	011064'			 JSR	PC,$WCRAM
   2370	001530	103541 				BCS	80$
   2371	001532	005202 				INC	R2
   2372	001534	000765 				BR	10$
   2373	001536	013702 	000126'		20$:	MOV	DCBADR,R2
   2374	001542				30$:	CALL	LCB6W		; GET THE C-RAM WORD AND
	001542	004737 	001224'			 JSR	PC,LCB6W
   2375	001546	103532 				BCS	80$
   2376	001550	010200 			35$:	MOV	R2,R0		; SET UP POINTER.
   2377	001552	105737 	000027'			TSTB	.DRSW		; IF WE VERIFY,
   2378	001556	001417 				BEQ	50$
   2379	001560	012701 	000150'			MOV	#DCBCBF,R1	; GET HOLDING AREA,
   2380	001564					CALL	$RCRAM		; READ IT IN
	001564	004737 	011344'			 JSR	PC,$RCRAM
   2381	001570	103521 				BCS	80$
   2382	001572	042761 	000020 	000004 		BIC	#20,4(R1)	; [4.1.1072]CLEAR MARK BIT
   2383	001600	012705 	000006 			MOV	#6,R5		; AND COMPARE 6 WORDS
   2384	001604	010300 				MOV	R3,R0
   2385	001606	022021 			40$:	CMP	(R0)+,(R1)+
   2386	001610	001023 				BNE	70$
   2387	001612	077503 				SOB	R5,40$
   2388	001614	000404 				BR	60$		; OTHERWISE
   2389	001616	010301 			50$:	MOV	R3,R1		; GET THE WORD ADDRESS
   2390	001620					CALL	$WCRAM		; AND WRITE INTO THE RAM.
	001620	004737 	011064'			 JSR	PC,$WCRAM
   2391	001624	103503 				BCS	80$
   2392	001626	005737 	000146'		60$:	TST	DCBFIX		; [4.2209] FIXED FLAG SET?
   2393	001632	001402 				BEQ	65$		; [4.2209] NO-- CONTINUE
   2394	001634	005337 	000144'			DEC	DCBCNT		; [4.2209] YES-- DECREMENT ERROR COUNT
   2395	001640	005037 	000146'		65$:	CLR	DCBFIX		; [4.2209] CLEAR FIX FLAG
   2396	001644	005202 				INC	R2		; BUMP C-RAM ADDRESS AND
   2397	001646	005737 	000530'			TST	.SYIRC		; IF MORE DATA, THEN
   2398	001652	001333 				BNE	30$		; GET NEXT WORD OR
   2399	001654	000137 	001372'			JMP	LCBRC		; GET NEW RECORD.
   2400	001660				70$:	CALL	$OPLOG		; [4.1.1073]OPEN LOG FILE
	001660	004737 	000000G			 JSR	PC,$OPLOG
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 63-1
$MCBLD	-- LOAD THE RAMS

   2401	001664	005737 	000146'			TST	DCBFIX		; [4.2209] FIXED FLAG SET?
   2402	001670	001405 				BEQ	72$		; [4.2209] NO-- CONTINUE
   2403	001672	012700 	000265'			MOV	#TCBFXF,R0	; [4.2209] YES-- TYPE MESSAGE
   2404	001676					CALL	$TTMSG		; [4.2209] TYPE IT
	001676	004737 	027034'			 JSR	PC,$TTMSG
   2405	001702	000756 				BR	65$		; [4.2209] TRY NEXT WORD
   2406	001704	010200 			72$:	MOV	R2,R0		; ERROR - PUT ADDRESS
   2407	001706	012701 	000117'			MOV	#TCBDCW,R1	; INTO ERROR MESSAGE
   2408	001712					CALL	LCBRME		; AND INFORM OPERATOR.
	001712	004737 	002364'			 JSR	PC,LCBRME
   2409	001716	103446 				BCS	80$		; FIVE UNFIXED ERRORS.
   2410	001720	012701 	000150'			MOV	#DCBCBF,R1	; [4.2209] BAD BUFFER TO TYPE
   2411	001724	012700 	000410'			MOV	#TCBBAD,R0	; [4.2209] HEADER TO TYPE
   2412	001730	005004 				CLR	R4		; [4.2209] CRAM TYPE OUT SWITCH
   2413	001732					CALL	LCBVFY		; [4.2209] TYPE BAD DATA
	001732	004737 	002440'			 JSR	PC,LCBVFY
   2414	001736	010301 				MOV	R3,R1		; [4.2209] GOOD BUFFER TO TYPE
   2415	001740	012700 	000416'			MOV	#TCBGOD,R0	; [4.2209] HEADER TO TYPE
   2416	001744					CALL	LCBVFY		; [4.2209] TYPE GOOD DATA
	001744	004737 	002440'			 JSR	PC,LCBVFY
   2417	001750	012700 	000150'			MOV	#DCBCBF,R0	; [4.2209] BAD DATA PTR
   2418	001754	010301 				MOV	R3,R1		; [4.2209] GOOD DATA PTR
   2419	001756	012705 	000006 			MOV	#6,R5		; [4.2209] NUMBER OF WORDS
   2420	001762	012104 			75$:	MOV	(R1)+,R4	; [4.2209] GET GOOD DATA
   2421	001764	074420 				XOR	R4,(R0)+	; [4.2209] GET DIFFERENCES
   2422	001766	077503 				SOB	R5,75$		; [4.2209] DONE?
   2423	001770	012701 	000150'			MOV	#DCBCBF,R1	; [4.2209] YES-- XOR DATA TO TYPE
   2424	001774	012700 	000424'			MOV	#TCBXOR,R0	; [4.2209] HEADER TO TYPE
   2425	002000	005004 				CLR	R4		; [4.2209] CRAM TYPE OUT SWITCH
   2426	002002					CALL	LCBVFY		; [4.2209] TYPE XOR DATA
	002002	004737 	002440'			 JSR	PC,LCBVFY
   2427	002006	105737 	000027'			TSTB	.DRSW		; [4.2209] YES-- TRY TO FIX?
   2428	002012	002305 				BGE	60$		; [4.2209] NO-- EXIT
   2429	002014	010301 				MOV	R3,R1		; [4.2209] YES-- SET UP GOOD DATA
   2430	002016	010200 				MOV	R2,R0		; [4.2209] ADDR TO WRITE
   2431	002020					CALL	$WCRAM		; [4.2209] WRITE DATA
	002020	004737 	011064'			 JSR	PC,$WCRAM
   2432	002024	103403 				BCS	80$		; [4.2209] WRITE FAILED
   2433	002026	005237 	000146'			INC	DCBFIX		; [4.2209] SET FIXED FLAG
   2434	002032	000646 				BR	35$		; [4.2209] VERIFY FIX
   2435	002034	000137 	002504'		80$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 64
$MCBLD	-- LOAD THE RAMS

   2437					;+
   2438					; PROCESS D-RAM RECORD.
   2439					;
   2440					; NECESSARY EVILS:
   2441					;	R3	- POINTS TO D-RAM WORD READ FROM FILE.
   2442					;	DCBADR	- ADDRESS FOR D-RAM WORD FROM FILE.
   2443					;	.DRSW	- IF NON-ZERO, THEN VERIFY.
   2444					;-
   2445
   2446	002040	005037 	000146'		LCBDRM:	CLR	DCBFIX		; [4.2209] CLEAR FIX FLAG
   2447	002044					CALL	LCB3W		; READ D-RAM WORD AND
	002044	004737 	001216'			 JSR	PC,LCB3W
   2448	002050	103543 				BCS	40$
   2449	002052	013700 	000126'			MOV	DCBADR,R0	; SET UP POINTERS.
   2450	002056	105737 	000027'			TSTB	.DRSW		; TEST FUNCTION...
   2451	002062	001005 				BNE	10$
   2452	002064	010301 				MOV	R3,R1		; GET THE WORD AND
   2453	002066					CALL	$WDRAM		; WRITE IT OUT.
	002066	004737 	012074'			 JSR	PC,$WDRAM
   2454	002072	103021 				BCC	20$
   2455	002074	000531 				BR	40$
   2456	002076	012701 	000164'		10$:	MOV	#DCBDBF,R1	; GET A HOLDING AREA
   2457	002102					CALL	$RDRAM		; AND READ IT IN
	002102	004737 	012254'			 JSR	PC,$RDRAM
   2458	002106	103524 				BCS	40$
   2459	002110	010300 				MOV	R3,R0
   2460	002112	042711 	000020 			BIC	#20,(R1)	; CLEAR PARITY BITS
   2461	002116	022120 				CMP	(R1)+,(R0)+	; AND COMPARE.
   2462	002120	001025 				BNE	30$
   2463	002122	042711 	000020 			BIC	#20,(R1)
   2464	002126	022120 				CMP	(R1)+,(R0)+
   2465	002130	001021 				BNE	30$
   2466	002132	021110 				CMP	(R1),(R0)
   2467	002134	001017 				BNE	30$
   2468	002136	005737 	000146'		20$:	TST	DCBFIX		; [4.2209] FIXED FLAG SET?
   2469	002142	001402 				BEQ	25$		; [4.2209] NO-- CONTINUE
   2470	002144	005337 	000144'			DEC	DCBCNT		; [4.2209] YES-- DECREMENT ERROR COUNT
   2471	002150	005037 	000146'		25$:	CLR	DCBFIX		; [4.2209] CLEAR FIX FLAG
   2472	002154	062737 	000002 	000126'		ADD	#2,DCBADR	; BUMP D-RAM ADDRESS.
   2473	002162	005737 	000530'			TST	.SYIRC		; END OF RECORD ?
   2474	002166	001324 				BNE	LCBDRM		; NO, STILL GOING,
   2475	002170	000137 	001372'			JMP	LCBRC		; OTHERWISE GET NEW RECORD.
   2476	002174				30$:	CALL	$OPLOG		; [4.1.1073]OPEN LOG FILE
	002174	004737 	000000G			 JSR	PC,$OPLOG
   2477	002200	005737 	000146'			TST	DCBFIX		; [4.2209] FIXED FLAG SET?
   2478	002204	001405 				BEQ	32$		; [4.2209] NO-- CONTINUE
   2479	002206	012700 	000265'			MOV	#TCBFXF,R0	; [4.2209] YES-- TYPE MESSAGE
   2480	002212					CALL	$TTMSG		; [4.2209] TYPE IT
	002212	004737 	027034'			 JSR	PC,$TTMSG
   2481	002216	000754 				BR	25$		; [4.2209] TRY NEXT WORD
   2482	002220	013700 	000126'		32$:	MOV	DCBADR,R0	; ERROR - PUT ADDRESS
   2483	002224	012701 	000151'			MOV	#TCBDDW,R1	; IN ERROR MESSAGE
   2484	002230					CALL	LCBRME		; AND INFORM OPERATOR.
	002230	004737 	002364'			 JSR	PC,LCBRME
   2485	002234	103451 				BCS	40$		; FIVE UNFIXED ERRORS
   2486	002236	012704 	000001 			MOV	#1,R4		; [4.2209] DRAM TYPE OUT SWITCH
   2487	002242	012701 	000164'			MOV	#DCBDBF,R1	; [4.2209] BAD BUFFER
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 64-1
$MCBLD	-- LOAD THE RAMS

   2488	002246	012700 	000410'			MOV	#TCBBAD,R0	; [4.2209] HEADER
   2489	002252					CALL	LCBVFY		; [4.2209] TYPE GOOD DATA
	002252	004737 	002440'			 JSR	PC,LCBVFY
   2490	002256	010301 				MOV	R3,R1		; [4.2209] GOOD BUFFER
   2491	002260	012700 	000416'			MOV	#TCBGOD,R0	; [4.2209] HEADER
   2492	002264					CALL	LCBVFY		; [4.2209] TYPE GOOD DATA
	002264	004737 	002440'			 JSR	PC,LCBVFY
   2493	002270	012700 	000164'			MOV	#DCBDBF,R0	; [4.2209] BAD BUFFER
   2494	002274	010301 				MOV	R3,R1		; [4.2209] GOOD DATA
   2495	002276	012705 	000003 			MOV	#3,R5		; [4.2209] NUMBER OF WORDS
   2496	002302	012104 			35$:	MOV	(R1)+,R4	; [4.2209] GET GOOD DATA
   2497	002304	074420 				XOR	R4,(R0)+	; [4.2209] GET DIFFERENCES
   2498	002306	077503 				SOB	R5,35$		; [4.2209] DONE?
   2499	002310	012701 	000164'			MOV	#DCBDBF,R1	; [4.2209] YES-- XOR BUFFER
   2500	002314	012700 	000424'			MOV	#TCBXOR,R0	; [4.2209] HEADER
   2501	002320	012704 	000001 			MOV	#1,R4		; [4.2209] DRAM TYPE OUT HEADER
   2502	002324					CALL	LCBVFY		; [4.2209] TYPE XOR DATA
	002324	004737 	002440'			 JSR	PC,LCBVFY
   2503	002330	105737 	000027'			TSTB	.DRSW		; [4.2209] TRY TO FIX?
   2504	002334	002300 				BGE	20$		; [4.2209] NO-- NEXT WORD
   2505	002336	013700 	000126'			MOV	DCBADR,R0	; [4.2209] YES-- SET UP ADDRESS
   2506	002342	010301 				MOV	R3,R1		; [4.2209] SET UP DATA
   2507	002344					CALL	$WDRAM		; [4.2209] WRITE IT
	002344	004737 	012074'			 JSR	PC,$WDRAM
   2508	002350	103403 				BCS	40$		; [4.2209] WRITE FAILED
   2509	002352	005237 	000146'			INC	DCBFIX		; [4.2209] SET FIXED FLAG
   2510	002356	000647 				BR	10$		; [4.2209] VERIFY FIX
   2511	002360	000137 	002504'		40$:	JMP	LCBFL		; OPERATION FAILED.
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 65
$MCBLD	-- LOAD THE RAMS

   2513					;+
   2514					; INSERT RAM ADDRESS IN ERROR MESSAGE AND PRINT IT. BUMP ERROR COUNT
   2515					; AND IF TOO HIGH, SO INDICATE.
   2516					;
   2517					; INPUTS:
   2518					;	R1	- ADDRESS OF MESSAGE TO DISPLAY.
   2519					;	R0	- RAM ADDRESS TO DISPLAY IN OCTAL AFTER "AT ".
   2520					;
   2521					; OUTPUT:
   2522					;	CARRY SET IF TOO MANY ERRORS.
   2523					;-
   2524
   2525	002364	004537 	023142'		LCBRME:	JSR	R5,$RSAVE
   2526	002370	010105 				MOV	R1,R5		; GET MESSAGE ADDRESS
   2527	002372	122725 	000101 		10$:	CMPB	#'A,(R5)+	; AND LOOK FOR "AT"
   2528	002376	001375 				BNE	10$
   2529	002400	122725 	000124 			CMPB	#'T,(R5)+
   2530	002404	001372 				BNE	10$
   2531	002406	005205 				INC	R5		; PASS BY SPACE
   2532	002410					CALL	$TRB2O		; AND INSERT RAM ADDRESS.
	002410	004737 	025700'			 JSR	PC,$TRB2O
   2533	002414	105015 				CLRB	(R5)		; THIS IS THE END OF THE MESSAGE.
   2534	002416					PRINT	R1		; TYPE OUT OFFENDING ADDRESS.
	002416	010100 				 MOV	R1,R0
	002420	004737 	027034'			 JSR	PC,$TTMSG
   2535	002424	005237 	000144'			INC	DCBCNT		; ONE MORE DIFFERENCE.
   2536	002430	022737 	000005 	000144'		CMP	#5,DCBCNT	; LAST STRAW ?
   2537	002436					RETURN			; SETS CARRY IF MCBCNT>5.
	002436	000207 				 RTS	PC
   2538
   2539					;+
   2540					; TYPE MESSAGE HEADER THEN A SPECIFIED NUMBER OF WORDS AS BINARY VALUES.
   2541					;
   2542					; INPUTS:
   2543					;	R0-	MESSAGE HEADER.
   2544					;	R1-	DATA BUFFER TO TYPE AS BINARY DIGITS.
   2545					;	R4-	CRAM/DRAM TYPE OUT SWITCH
   2546					;
   2547					; OUTPUTS:
   2548					;	NONE-	NO REGISTERS AFFECTED
   2549					;-
   2550
   2551	002440				LCBVFY:	PUSH	<R0>		; [4.2209] SAVE R0
	002440	010046 				 MOV	R0,-(SP)
   2552	002442	012700 	000207'			MOV	#TTTPR,R0	; [4.2209] PREFIX HEADER
   2553	002446					CALL	$TTDMS		; [4.2209] TYPE PREFIX HEADER
	002446	004737 	026766'			 JSR	PC,$TTDMS
   2554	002452					POP	<R0>		; [4.2209] RESTORE R0
	002452	012600 				 MOV	(SP)+,R0
   2555	002454					CALL	$TTDMS		; [4.2209] TYPE MESSAGE HEADER
	002454	004737 	026766'			 JSR	PC,$TTDMS
   2556	002460	005704 				TST	R4		; [4.2209] TEST SWITCH
   2557	002462	001403 				BEQ	5$		; [4.2209] CRAM
   2558	002464					CALL	$TRDRM		; [4.2209] TYPE DRAM
	002464	004737 	025056'			 JSR	PC,$TRDRM
   2559	002470	000402 				BR	7$		; [4.2209] CONTINUE
   2560	002472				5$:	CALL	$TRCRM		; [4.2209] TYPE CRAM
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 65-1
$MCBLD	-- LOAD THE RAMS

	002472	004737 	024712'			 JSR	PC,$TRCRM
   2561	002476				7$:	CALL	$TCRLF		; [4.2209] TYPE CR-LF
	002476	004737 	026730'			 JSR	PC,$TCRLF
   2562	002502					RETURN			; [4.2209] DONE
	002502	000207 				 RTS	PC
   2563
   2564					;+
   2565					; OPERATION FAILED - NOTIFY OPERATOR.
   2566					;-
   2567
   2568	002504				LCBFL:	CALL	$CLLOG		; [4.1.1073]CLOSE LOG FILE
	002504	004737 	000000G			 JSR	PC,$CLLOG
   2569	002510	012700 	000203'			MOV	#TCBMLF,R0	; ASSUME LOAD
   2570	002514	105737 	000027'			TSTB	.DRSW		; AND IF VERIFY,
   2571	002520	001402 				BEQ	10$
   2572	002522	012700 	000233'			MOV	#TCBMVF,R0	; GET VERIFY MESSAGE.
   2573	002526				10$:	PRINT
	002526	004737 	027034'			 JSR	PC,$TTMSG
   2574	002532					CALL	$PURGE
	002532	004737 	007704'			 JSR	PC,$PURGE
   2575	002536	000261 				SEC
   2576	002540					RETURN
	002540	000207 				 RTS	PC
KLICB -- LOAD THE MICROCODE	MACRO M1113  11-NOV-81 11:25  PAGE 66
$MCBLD	-- LOAD THE RAMS

   2578					;+
   2579					; IDENTIFY THE MICROCODE VERSION NUMBER.
   2580					;-
   2581
   2582	002542	105737 	000027'		LCBVR: TSTB	.DRSW		; GET MESSAGE:
   2583	002546	001003 				BNE	10$
   2584	002550	012702 	000314'			MOV	#TCBMVL,R2	; MICROCODE LOADED OR
   2585	002554	000402 				BR	20$
   2586	002556	012702 	000351'		10$:	MOV	#TCBMVV,R2	; MICROCODE VERIFIED.
   2587	002562	010205 			20$:	MOV	R2,R5		; GET POSITION TO INSERT
   2588	002564	122725 	000117 		30$:	CMPB	#'O,(R5)+	; MICROCODE VERSION.
   2589	002570	001375 				BNE	30$
   2590	002572	122725 	000116 			CMPB	#'N,(R5)+
   2591	002576	001372 				BNE	30$
   2592	002600	005205 				INC	R5
   2593	002602	012700 	000202'			MOV	#DCBAPR,R0
   2594	002606					CALL	$EXCT		; DO AN APRID
	002606	004737 	027712'			 JSR	PC,$EXCT
   2595	002612	103425 				BCS	50$
   2596	002614	012701 	000172'			MOV	#DCBBF,R1	; AND GET RESULT
   2597	002620	012700 	000177'			MOV	#DCBA17,R0	; FROM AC17.
   2598	002624					CALL	$EXAM
	002624	004737 	013004'			 JSR	PC,$EXAM
   2599	002630	103416 				BCS	50$
   2600	002632	016100 	000002 			MOV	2(R1),R0	; EXTRACT MICROCODE VERSION
   2601	002636					SR	R0,2		; FROM BITS 9-17
	002636	006200 				  ASR	R0
	002640	006200 				  ASR	R0
   2602	002642	042700 	177000 			BIC	#^C777,R0	; AND ONLY THESE BITS.
   2603	002646					CALL	$TRB2O
	002646	004737 	025700'			 JSR	PC,$TRB2O
   2604	002652	122715 	000040 		40$:	CMPB	#' ,(R5)	; ZAP OUT REST OF FIELD.
   2605	002656	001410 				BEQ	60$
   2606	002660	112725 	177777 			MOVB	#-1,(R5)+
   2607	002664	000772 				BR	40$
   2608	002666	112715 	000077 		50$:	MOVB	#'?,(R5)	; VERSION UNKNOWN.
   2609	002672	112515 				MOVB	(R5)+,(R5)
   2610	002674	112525 				MOVB	(R5)+,(R5)+
   2611	002676	005005 				CLR	R5		; INDICATE LOAD WAS A FLOP.
   2612	002700				60$:	PRINT	R2		; PRINT THE MESSAGE.
	002700	010200 				 MOV	R2,R0
	002702	004737 	027034'			 JSR	PC,$TTMSG
   2613	002706	005705 				TST	R5		; HOW DID IT TURN OUT ?
   2614	002710	001001 				BNE	70$
   2615	002712	000261 				SEC			; BADLY.....
   2616	002714				70$:	RETURN
	002714	000207 				 RTS	PC
   2617						.TITLE	KLICF -- CREATE NEW CONFIGURATION IN FILE
   2618	002716					IDENT$	12,27
						.IDENT	/012270/
   2619					;
   2620					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   2621					;
   2622					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   2623					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   2624					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   2625					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 66-1
$MCBLD	-- LOAD THE RAMS

   2626					;
   2627					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   2628					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   2629					; EQUIPMENT CORPORATION.
   2630					;
   2631					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   2632					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   2633					;
   2634					; VERSION 12-27
   2635					;
   2636					; ALAN D. PECKHAM  11-APR-77
   2637					;
   2638					; MODIFIED BY:
   2639					;
   2640					;	R. BELANGER	02-MAR-79	ADD REVERSE MEMORY CONFIGURATION
   2641					;					TCO 4.2204
   2642					;	R. BELANGER	16-NOV-78	INTEGRATE TOPS-10 SMP FEATURES
   2643					;					TCO 4.2093
   2644					;	R. BELANGER	25-JUL-78	INTEGRATE MOS CONFIGURATOR
   2645					;
   2646					;	S. LEAPLINE	19-AUG-81	SAVE MICROCODE FILENAME IN CONFIG
   2647					; FUNCTION: THIS MODULE WRITES OUT THE NEW CONFIGURATION TO
   2648					;  KL.CFG IF THE CONFIGURATION HAS BEEN CHANGED.
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 67
$MCBLD	-- LOAD THE RAMS

   2650					;
   2651					; EQUATED SYMBOLS
   2652					;
   2653		000004 			MXTYP	=	4		; LARGEST RECORD TYPE WE HANDLE.
   2654					;
   2655					; LOCAL DATA
   2656					;
   2657	000220					.PSECT	DATA,D
   2658	000220				DCFCFN:
   2659	000220	043240 	000000 	000000 		.RAD50	/KL       CFG/	;CONFIGURATION FILE NAME.
	000226	011667
   2660	000230	000000 				.WORD	0		;CREATE NEXT VERSION.
   2661	000232	   005 	   005 			.BYTE	5,5
   2662	000234	054523 	000000 			.WORD	"SY,0
   2663	000240				DCFLFN:
   2664	000240	043240 	000000 	000000 		.RAD50	/KL       CFG/	;CONFIGURATION FILE NAME.
	000246	011667
   2665	000250	177777 				.WORD	-1		;DELETE LOWEST VERSION.
   2666	000252	   005 	   005 			.BYTE	5,5
   2667	000254	054523 	000000 			.WORD	"SY,0
   2668	000260				DCFRJT:
   2669	000260	003152'				.WORD	LCFREF		; 0 - EOF RECORD
   2670	000262	003044'				.WORD	LCFRMM		; 1 - CONTROLLER RECORD
   2672	000264	003134'				.WORD	LCFRCA		; 2 - CACHE RECORD
   2676	000266	003124'				.WORD	LCFRBF		; 3 - BOOTSTRAP RECORD
   2677	000270	003334'				.WORD	LCFRMC		; 4 - MICROCODE RECORD
   2681	000522					.PSECT	TEXT,D
   2682	000522				TCFCFA:
   2683	000522					MESSAGE	<CONFIGURATION FILE WRITTEN>		; [4.2251]
	000522	   103 	   117 	   116 		 .ASCIZ	\CONFIGURATION FILE WRITTEN\
	000525	   106 	   111 	   107
	000530	   125 	   122 	   101
	000533	   124 	   111 	   117
	000536	   116 	   040 	   106
	000541	   111 	   114 	   105
	000544	   040 	   127 	   122
	000547	   111 	   124 	   124
	000552	   105 	   116 	   000
   2684	000555				TCFCFE:
   2685	000555					ERROR	<CONFIGURATION FILE NOT CHANGED>
	000555	   077 	   040 	   103 		 .ASCIZ	\? CONFIGURATION FILE NOT CHANGED\
	000560	   117 	   116 	   106
	000563	   111 	   107 	   125
	000566	   122 	   101 	   124
	000571	   111 	   117 	   116
	000574	   040 	   106 	   111
	000577	   114 	   105 	   040
	000602	   116 	   117 	   124
	000605	   040 	   103 	   110
	000610	   101 	   116 	   107
	000613	   105 	   104 	   000
   2686	002716					.PSECT
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 68
$FILE	-- WRITE THE CONFIGURATION FILE

   2688						.SBTTL	$FILE	-- WRITE THE CONFIGURATION FILE
   2689
   2690					;+
   2691					; CONFIGURATION FILE FORMAT:
   2692					;
   2693					; GENERAL --
   2694					;
   2695					;	RECORDS IN THE CONFIGURATION FILE HAVE THE FOLLOWING GENERAL FORMAT:
   2696					;
   2697					;		+-----------+
   2698					;		!  .WORD N  !
   2699					;		+-----------+
   2700					;		! RECORD ID !
   2701					;		+-----------+
   2702					;		! .BLKB N-2 !
   2703					;		+-----------+
   2704					;
   2705					; END-OF-FILE RECORD:
   2706					;
   2707					;	THE END-OF FILE RECORD IS FIXED-LENGTH IN THE FOLLOWING FORMAT:
   2708					;
   2709					;		+-----------+
   2710					;		!  .WORD 2  !
   2711					;		+-----------+
   2712					;		!  .WORD 0  !
   2713					;		+-----------+
   2714					;
   2715					; MEMORY CONTROLLER RECORD:
   2716					;
   2717					;	A MEMORY CONTROLLER RECORD IS FIXED-LENGTH IN THE FOLLOWING FORMAT:
   2718					;
   2719					;		+-----------+
   2720					;		!  .WORD 6  !
   2721					;		+-----------+
   2722					;		!  .WORD 1  !
   2723					;		+-----------+
   2724					;		!  .BLKB 4  !
   2725					;		+-----------+
   2726					;
   2727					; CACHE RECORD:
   2728					;
   2729					;	A CACHE RECORD IS VARIABLE-LENGTH IN THE FOLLOWING FORMAT:
   2730					;
   2731					;		+-----------+
   2732					;		!  .WORD X  !	(X = .NCACH + 3)
   2733					;		+-----------+
   2734					;		!  .WORD 2  !
   2735					;		+-----------+
   2736					;		!  .BLKB Y  !	(Y = .NCACH)
   2737					;		+-----------+
   2738					;
   2739					; BOOTSTRAP RECORD:
   2740					;
   2741					;	THE BOOTSTRAP RECORD IS VARIABLE-LENGTH IN THE FOLLOWING FORMAT:
   2742					;
   2743					;		+-----------+
   2744					;		!  .WORD N  !	(N >= 4)
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 68-1
$FILE	-- WRITE THE CONFIGURATION FILE

   2745					;		+-----------+
   2746					;		!  .WORD 3  !
   2747					;		+-----------+
   2748					;		!  .BLKB 1  !
   2749					;		+-----------+
   2750					;		!  .BLKB 1  !
   2751					;		+-----------+
   2752					;		!  .BLKW 4  !
   2753					;		+-----------+
   2754					;
   2755					;	THE FIRST TWO BYTES IN THE RECORD ARE ".BTSW" AND ".UFNSW".  IF
   2756					;	THE USER SPECIFIED A FILENAME FOR THE BOOTSTRAP, THE FILENAME IS
   2757					;	SAVED IN THE LAST FOUR WORDS OF THE BOOTSTRAP RECORD.
   2758					;
   2759					; MICROCODE RECORD:
   2760					;
   2761					;	A MICROCODE RECORD IS FIXED LENGTH IN THE FOLLOWING FORMAT:
   2762					;
   2763					;		+-----------+
   2764					;		!  .WORD 14 !
   2765					;		+-----------+
   2766					;		!  .WORD 4  !
   2767					;		+-----------+
   2768					;		!  .BLKB 1  !
   2769					;		+-----------+
   2770					;		!  .BLKW 4  !
   2771					;		+-----------+
   2772					;	A NON EXISTENT RECORD IN THE FILE IMPLIES THE DEFAULT, ALL, OR YES
   2773					;	OPTION IS TO BE TAKEN
   2774					;-
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 69
$FILE	-- WRITE THE CONFIGURATION FILE

   2776	002716				$FILE::
   2777	002716	105737 	000045'			TSTB	.FILSW		; WRITE CONFIGURATION FILE??
   2778	002722	100573 				BMI	LCFRTN		; NO -- JUST EXIT
   2779	002724	105737 	000046'			TSTB	.BTSW		; YES -- BOOTSTRAP MODIFIED??
   2780	002730	001011 				BNE	10$		; YES -- WRITE THE  FILE
   2781	002732	105737 	000025'			TSTB	.MCBSW		; MICROCODE FILENAME SPECIFIED
   2782	002736	001006 				BNE	10$		; YES, WRITE THE FILE
   2784	002740	105737 	000031'			TSTB	.DCSW		; IF NO CACHE OR
   2785	002744	001003 				BNE	10$
   2786	002746	105737 	000032'			TSTB	.DMSW		; MEMORY MODIFICATION,
   2790	002752	001557 				BEQ	LCFRTN		; LEAVE THE FILE ALONE.
   2791	002754				10$:
   2792	002754	005004 				CLR	R4		; SET INPUT FILE SWITCH.
   2793	002756	012700 	000220'			MOV	#DCFCFN,R0	; FIRST, FIND OLD FILE
   2794	002762					CALL	$LOOKUP
	002762	004737 	007342'			 JSR	PC,$LOOKUP
   2795	002766	103005 				BCC	20$
   2796	002770	122737 	000000G	000522'		CMPB	#IE.NSF,.SYSTA	; IF NOT THERE
   2797	002776	001150 				BNE	LCFERR
   2798	003000	005304 				DEC	R4		; SET INDICATOR.
   2799	003002				20$:
   2800	003002	012700 	000220'			MOV	#DCFCFN,R0	; OPEN 'KL.CFG'
   2801	003006					CALL	$ENTER		; FOR OUTPUT.
	003006	004737 	007514'			 JSR	PC,$ENTER
   2802	003012	103542 				BCS	LCFERR
   2803	003014	005704 				TST	R4		; IF NO INPUT FILE
   2804	003016	002455 				BLT	LCFREF		; THEN DON'T READ IT.
   2805					;
   2806					; READ THE NEXT RECORD FROM THE FILE AND DISPATCH ON ITS RECORD TYPE
   2807					;
   2808	003020				LCFNXT:
   2809	003020					CALL	$READC		; READ NEXT RECORD
	003020	004737 	007776'			 JSR	PC,$READC
   2810	003024	103533 				BCS	LCFPRG
   2811	003026	010001 				MOV	R0,R1		; AND SAVE ID.
   2812	003030	022701 	000004 			CMP	#MXTYP,R1	; IS IT MY RECORD ?
   2813	003034	002406 				BLT	LCFCPY		; NO, JUST TRANSFER.
   2814	003036	006300 				ASL	R0
   2815	003040	000170 	000260'			JMP	@DCFRJT(R0)	; PROCESS THE RECORD.
   2816						;
   2817					;
   2818					; PROCESS MEMORY CONTROLLER RECORDS
   2819					;
   2820	003044				LCFRMM:
   2821	003044	105737 	000032'			TSTB	.DMSW		; IF MEMORY CONFIGURATION IS CHANGED
   2822	003050	001034 				BNE	LCFSKP		; THEN SKIP RECORD, OTHERWISE
   2823					;
   2824					; COPY A RECORD FROM THE INPUT FILE TO THE OUTPUT FILE
   2825					;
   2826	003052				LCFCPY:
   2827	003052	013700 	000530'			MOV	.SYIRC,R0	; TRANSFER RECORD TO OUTPUT FILE.
   2828	003056	062700 	000002 			ADD	#2,R0
   2829	003062					CALL	$WRITC		; (BYTE COUNT)
	003062	004737 	010404'			 JSR	PC,$WRITC
   2830	003066	103512 				BCS	LCFPRG
   2831	003070	010100 				MOV	R1,R0
   2832	003072					CALL	$WRITW		; (ID #)
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 69-1
$FILE	-- WRITE THE CONFIGURATION FILE

	003072	004737 	010516'			 JSR	PC,$WRITW
   2833	003076	103506 				BCS	LCFPRG
   2834	003100				10$:
   2835	003100	005737 	000530'			TST	.SYIRC		; ANY MORE STUFF ?
   2836	003104	003745 				BLE	LCFNXT		; NO, WE ARE FINISHED.
   2837	003106					CALL	$READB
	003106	004737 	010200'			 JSR	PC,$READB
   2838	003112	103500 				BCS	LCFPRG
   2839	003114					CALL	$WRITB
	003114	004737 	010612'			 JSR	PC,$WRITB
   2840	003120	103475 				BCS	LCFPRG
   2841	003122	000766 				BR	10$		; LOOP UNTIL WE RUN OUT OF BYTES.
   2842						;
   2843					;
   2844					; PROCESS THE BOOTSTRAP RECORD
   2845					;
   2846	003124				LCFRBF:
   2847	003124	105737 	000046'			TSTB	.BTSW		; BOOTSTRAP FLAG MODIFIED??
   2848	003130	001750 				BEQ	LCFCPY		; NO -- COPY RECORD
   2849	003132	000403 				BR	LCFSKP		; YES --SKIP RECORD
   2850						;
   2852					;
   2853					; PROCESS THE CACHE RECORD
   2854					;
   2855	003134				LCFRCA:
   2856	003134	105737 	000031'			TSTB	.DCSW		; IF CACHE IS NOT CHANGED
   2857	003140	001744 				BEQ	LCFCPY		; THEN COPY CACHE RECORD, OTHERWISE
   2859					;
   2860					; SKIP AN INPUT RECORD
   2861					;
   2862	003142				LCFSKP:
   2863	003142					CALL	$READS		; SKIP THIS RECORD.
	003142	004737 	010034'			 JSR	PC,$READS
   2864	003146	103462 				BCS	LCFPRG
   2865	003150	000723 				BR	LCFNXT		; GET A NEW RECORD.
   2866						;
   2868					;
   2869					; HERE ON END-OF-FILE RECORD
   2870					;
   2871	003152				LCFREF:
   2872	003152	105737 	000031'			TSTB	.DCSW		; IF CACHE WAS CHANGED
   2873	003156	001403 				BEQ	10$
   2874	003160					CALL	LCFWCA		; THEN WRITE THE CACHE RECORD.
	003160	004737 	003610'			 JSR	PC,LCFWCA
   2875	003164	103453 				BCS	LCFPRG
   2876	003166				10$:
   2877	003166	105737 	000032'			TSTB	.DMSW		; IF THE MEMORY CONFIGURATION
   2882	003172	001403 				BEQ	20$		; WAS CHANGED, THEN
   2883	003174					CALL	LCFWMM		; WRITE THE CONTROLLER RECORDS.
	003174	004737 	003502'			 JSR	PC,LCFWMM
   2884	003200	103445 				BCS	LCFPRG
   2885	003202				20$:
   2886	003202	105737 	000046'			TSTB	.BTSW		; BOOT FLAG CHANGED??
   2887	003206	001403 				BEQ	30$		; NO -- GO ON
   2888	003210					CALL	LCFWBF		; YES -- WRITE BOOT RECORD
	003210	004737 	003344'			 JSR	PC,LCFWBF
   2889	003214	103437 				BCS	LCFPRG		;ERROF CC-C IS SET
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 69-2
$FILE	-- WRITE THE CONFIGURATION FILE

   2890	003216				30$:
   2891	003216	105737 	000025'			TSTB	.MCBSW		; MICROCODE FILENAME MODIFIED ?
   2892	003222	001403 				BEQ	40$		; NO, GO ON
   2893	003224					CALL	LCFWMC		; WRITE THE MICROCODE RECORD
	003224	004737 	003676'			 JSR	PC,LCFWMC
   2894	003230	103431 				BCS	LCFPRG		; ERROR
   2895	003232				40$:
   2896	003232					CALL	LCFWEF		; NOW WRITE END OF FILE.
	003232	004737 	003460'			 JSR	PC,LCFWEF
   2897	003236	103426 				BCS	LCFPRG
   2898	003240					CALL	$CLOSE		; CLOSE THE FILE AND
	003240	004737 	006636'			 JSR	PC,$CLOSE
   2899	003244	103423 				BCS	LCFPRG
   2900	003246	005704 				TST	R4		; DELETE THE OLD VERSION
   2901	003250	002404 				BLT	90$		; IF THERE IS ONE.
   2902	003252	012700 	000240'			MOV	#DCFLFN,R0
   2903	003256					CALL	$DELETE
	003256	004737 	006774'			 JSR	PC,$DELETE
   2904	003262				90$:
   2905	003262					PRINT	#TCFCFA		; INFORM THE OPERATOR.
	003262	012700 	000522'			 MOV	#TCFCFA,R0
	003266	004737 	027034'			 JSR	PC,$TTMSG
   2906	003272	105037 	000046'			CLRB	.BTSW		; RESET THE BOOTSTRAP SWITCH
   2907	003276	105037 	000025'			CLRB	.MCBSW		; RESET MICROCODE FLAG
   2909	003302	105037 	000031'			CLRB	.DCSW
   2911	003306	105037 	000032'			CLRB	.DMSW		; FILE NOW CORRESPONDS
   2912					;
   2913					; NORMAL EXIT
   2914					;
   2915	003312				LCFRTN:
   2916	003312					RETURN			; TO NEW CONFIGURATION.
	003312	000207 				 RTS	PC
   2917					;
   2918					; ERROR EXIT
   2919					;
   2920	003314				LCFPRG:
   2921	003314					CALL	$PURGE		; ERROR !  PURGE FILE
	003314	004737 	007704'			 JSR	PC,$PURGE
   2922	003320				LCFERR:
   2923	003320					PRINT	#TCFCFE		; TELL OPERATOR
	003320	012700 	000555'			 MOV	#TCFCFE,R0
	003324	004737 	027034'			 JSR	PC,$TTMSG
   2924	003330	000261 				SEC
   2925	003332					RETURN			; AND GO AWAY.
	003332	000207 				 RTS	PC
   2926
   2927	003334				LCFRMC:
   2928	003334	105737 	000025'			TSTB	.MCBSW		; FILENAME SPECIFIED ??
   2929	003340	001644 				BEQ	LCFCPY		; NO, SKIP THIS RECORD
   2930	003342	000677 				BR	LCFSKP		; YES, SKIP IT
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 70
$FILE	-- WRITE BOOTSTRAP RECORD

   2932						.SBTTL	$FILE	-- WRITE BOOTSTRAP RECORD
   2933
   2934					;+
   2935					; ROUTINES TO WRITE THE INDIVIDUAL RECORDS
   2936					;-
   2937
   2938					;
   2939					; WRITE THE BOOTSTRAP RECORD
   2940					;
   2941
   2942	003344				LCFWBF:
   2943	003344	012700 	000004 			MOV	#4,R0		; WRITE BOOTSTRAP RECORD
   2944	003350	105737 	000026'			TSTB	.UFNSW		; DID HE SPECIFY A FILE-NAME??
   2945	003354	001402 				BEQ	10$		; NO -- GO ON
   2946	003356	062700 	000010 			ADD	#10,R0		; YES -- ALLOW FOR IT
   2947	003362				10$:
   2948	003362					CALL	$WRITC		; WRITE THE RECORD HEADER
	003362	004737 	010404'			 JSR	PC,$WRITC
   2949	003366	103433 				BCS	30$		; ERROR IF CC-C IS SET
   2950	003370	012700 	000003 			MOV	#3,R0		; RECORD ID
   2951	003374					CALL	$WRITW		; WRITE IT
	003374	004737 	010516'			 JSR	PC,$WRITW
   2952	003400	103426 				BCS	30$		; ERROR IF CC-C IS SET
   2953	003402	113700 	000046'			MOVB	.BTSW,R0	; BOOTSTRAP SWITCH TO R0
   2954	003406					CALL	$WRITB		; WRITE IT
	003406	004737 	010612'			 JSR	PC,$WRITB
   2955	003412	103421 				BCS	30$		; ERROR IF CC-C IS SET
   2956	003414	113700 	000026'			MOVB	.UFNSW,R0	; FILE-NAME SWITCH TO R0
   2957	003420					CALL	$WRITB		; WRITE IT
	003420	004737 	010612'			 JSR	PC,$WRITB
   2958	003424	103414 				BCS	30$		; ERROR IF CC-C IS SET
   2959	003426	005737 	001562'			TST	.SYORC		; ARE WE DONE??
   2960	003432	001411 				BEQ	30$		; YES -- EXIT
   2961	003434	012701 	000004 			MOV	#4,R1		; NO -- SET UP TO WRITE FILE-NAME
   2962	003440	012702 	000474'			MOV	#.USRFN,R2	; POINT TO THE FILE-NAME
   2963	003444				20$:
   2964	003444	012200 				MOV	(R2)+,R0	; GET ONE WORD AT A TIME
   2965	003446					CALL	$WRITW		; WRITE IT
	003446	004737 	010516'			 JSR	PC,$WRITW
   2966	003452	103401 				BCS	30$		; ERROR IF CC-C IS SET
   2967	003454	077105 				SOB	R1,20$		; DO ALL 4 ELEMENTS
   2968	003456				30$:
   2969	003456					RETURN			; EXIT
	003456	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 71
$FILE	-- WRITE END-OF-FILE RECORD

   2971						.SBTTL	$FILE	-- WRITE END-OF-FILE RECORD
   2972
   2973					;
   2974					; WRITE END-OF-FILE RECORD
   2975					;
   2976
   2977	003460				LCFWEF:
   2978	003460	012700 	000002 			MOV	#2,R0		; WRITE EOF RECORD.
   2979	003464					CALL	$WRITC
	003464	004737 	010404'			 JSR	PC,$WRITC
   2980	003470	103403 				BCS	10$
   2981	003472	005000 				CLR	R0
   2982	003474					CALLR	$WRITW
	003474	000137 	010516'			 JMP	$WRITW
   2983						;
   2984	003500				10$:
   2985	003500					RETURN
	003500	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 72
$FILE	-- WRITE MEMORY CONTROLLER RECORDS

   2987						.SBTTL	$FILE	-- WRITE MEMORY CONTROLLER RECORDS
   2988
   2989					;
   2990					; WRITE MEMORY CONTROLLER RECORD(S)
   2991					;
   2992
   2993	003502				LCFWMM:
   2994	003502	005002 				CLR	R2		; WRITE OUT MEMORY RECORDS.
   2995	003504				10$:
   2996	003504	105762 	000070'			TSTB	.CTLTP(R2)	; CHECK IF CONTROLLER USED.
   2997	003510	001432 				BEQ	20$		; NOT USED -- TRY FOR THE NEXT CONTROLLER
   2998	003512	012700 	000006 			MOV	#6,R0		; OK - INCLUDE IN FILE.
   2999	003516					CALL	$WRITC		; (LENGTH)
	003516	004737 	010404'			 JSR	PC,$WRITC
   3000	003522	103431 				BCS	30$
   3001	003524	012700 	000001 			MOV	#1,R0
   3002	003530					CALL	$WRITW		; (ID #)
	003530	004737 	010516'			 JSR	PC,$WRITW
   3003	003534	103424 				BCS	30$
   3004	003536	010200 				MOV	R2,R0
   3005	003540					CALL	$WRITB		; (CONTROLLER #)
	003540	004737 	010612'			 JSR	PC,$WRITB
   3006	003544	103420 				BCS	30$
   3007	003546	116200 	000070'			MOVB	.CTLTP(R2),R0
   3008	003552					CALL	$WRITB		; (TYPE)
	003552	004737 	010612'			 JSR	PC,$WRITB
   3009	003556	103413 				BCS	30$
   3010	003560	006302 				ASL	R2		; WORD INDEX
   3011	003562	016200 	000132'			MOV	.CFGTB(R2),R0
   3012	003566	006202 				ASR	R2		; BACK TO BYTE INDEX
   3013	003570					CALL	$WRITW		; (MODULES/BLOCKS/INTERLEAVE/BUS-MODE)
	003570	004737 	010516'			 JSR	PC,$WRITW
   3014	003574	103404 				BCS	30$
   3015	003576				20$:
   3016	003576	005202 				INC	R2		; CHECK ALL CONTROLLERS.
   3017	003600	022702 	000041 			CMP	#CTLS+1,R2	; [4.2204] AND REVERSE CONFIGURATION FLAG
   3018	003604	003337 				BGT	10$
   3019	003606				30$:
   3020	003606					RETURN
	003606	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 73
$FILE	-- WRITE CACHE RECORDS

   3022						.SBTTL	$FILE	-- WRITE CACHE RECORDS
   3023
   3024
   3025					;
   3026					; WRITE CACHE RECORD(S)
   3027					;
   3029
   3030	003610				LCFWCA:
   3031	003610	113700 	000062'			MOVB	.NCACH,R0	; WRITE OUT CACHE RECORD.
   3032	003614	010001 				MOV	R0,R1
   3033	003616	062700 	000003 			ADD	#3,R0
   3034	003622					CALL	$WRITC		; (LENGTH)
	003622	004737 	010404'			 JSR	PC,$WRITC
   3035	003626	103422 				BCS	20$
   3036	003630	012700 	000002 			MOV	#2,R0
   3037	003634					CALL	$WRITW		; (ID #)
	003634	004737 	010516'			 JSR	PC,$WRITW
   3038	003640	103415 				BCS	20$
   3039	003642	110100 				MOVB	R1,R0
   3040	003644					CALL	$WRITB		; (# CACHES)
	003644	004737 	010612'			 JSR	PC,$WRITB
   3041	003650	103411 				BCS	20$
   3042	003652	005701 				TST	R1
   3043	003654	001407 				BEQ	20$
   3044	003656	012702 	000063'			MOV	#.CACHN,R2
   3045	003662				10$:
   3046	003662	112200 				MOVB	(R2)+,R0
   3047	003664					CALL	$WRITB		; (CACHE #S)
	003664	004737 	010612'			 JSR	PC,$WRITB
   3048	003670	103401 				BCS	20$
   3049	003672	077105 				SOB	R1,10$
   3050	003674				20$:
   3051	003674					RETURN
	003674	000207 				 RTS	PC
KLICF -- CREATE NEW CONFIGURATI	MACRO M1113  11-NOV-81 11:25  PAGE 74
$FILE -- WRITE MICROCODE RECORDS

   3054						.SBTTL	$FILE -- WRITE MICROCODE RECORDS
   3055
   3056					;
   3057					; WRITE MICROCODE RECORDS
   3058					;
   3059
   3060	003676				LCFWMC:
   3061	003676	012700 	000014 			MOV	#14,R0		; SIZE OF RECORD
   3062	003702					CALL	$WRITC		; WRITE IT
	003702	004737 	010404'			 JSR	PC,$WRITC
   3063	003706	103423 				BCS	20$		; ERROR
   3064	003710	012700 	000004 			MOV	#4,R0		; OUR RECORD TYPE
   3065	003714					CALL	$WRITW		; WRITE IT
	003714	004737 	010516'			 JSR	PC,$WRITW
   3066	003720	103416 				BCS	20$		; ERROR
   3067	003722	113700 	000025'			MOVB	.MCBSW,R0	; FILENAME SWITCH
   3068	003726					CALL	$WRITB		; WRITE IT
	003726	004737 	010612'			 JSR	PC,$WRITB
   3069	003732	103411 				BCS	20$		; ERROR
   3070	003734	012701 	000004 			MOV	#4,R1		; NUMBER OF WORDS IN FILENAME
   3071	003740	012702 	000454'			MOV	#.MCBFN,R2	; WHERE ITS AT
   3072	003744				10$:
   3073	003744	012200 				MOV	(R2)+,R0	; GET A WORD
   3074	003746					CALL	$WRITW		; AND WRITE IT
	003746	004737 	010516'			 JSR	PC,$WRITW
   3075	003752	103401 				BCS	20$		; ERROR
   3076	003754	077105 				SOB	R1,10$		; LOOP FOR ALL
   3077	003756				20$:
   3078	003756					RETURN
	003756	000207 				 RTS	PC
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 75
$FILE -- WRITE MICROCODE RECORDS

   3080						.TITLE	KLICI -- INTERNAL AND MOS DIALOGUE
   3081	003760					IDENT$	10,0,KLI$$F
						.IDENT	/B10000/
   3082					;
   3083					;                             COPYRIGHT (C) 1975, 1978 BY
   3084					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3085					;
   3086					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3087					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3088					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3089					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3090					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3091					;
   3092					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3093					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3094					;       CORPORATION.
   3095					;
   3096					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3097					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3098					;
   3099					;
   3100					;	MODULE: INTERNAL AND MOS DIALOGUE
   3101					;
   3102					;	VERSION:  10-00
   3103					;
   3104					;	DATE: 25-JUL-78
   3105					;
   3106					;	AUTHOR: R. BELANGER
   3107					;
   3108					;	MODIFICATIONS:
   3109					;
   3110					;	NO.	DATE		PROGRAMMER	REASON
   3111					;	---	----		----------	------
   3112					;
   3113					;			LOCAL DATA
   3114					;
   3115
   3116	000616					.PSECT	TEXT,D
   3117	000616				CFIMQ1:
   3118	000616					MESSAGE	<CONFIGURE INTERNAL CORE MEMORY [ALL,YES,NO]?>
	000616	   103 	   117 	   116 		 .ASCIZ	\CONFIGURE INTERNAL CORE MEMORY [ALL,YES,NO]?\
	000621	   106 	   111 	   107
	000624	   125 	   122 	   105
	000627	   040 	   111 	   116
	000632	   124 	   105 	   122
	000635	   116 	   101 	   114
	000640	   040 	   103 	   117
	000643	   122 	   105 	   040
	000646	   115 	   105 	   115
	000651	   117 	   122 	   131
	000654	   040 	   133 	   101
	000657	   114 	   114 	   054
	000662	   131 	   105 	   123
	000665	   054 	   116 	   117
	000670	   135 	   077 	   000
   3119	000673				CFMMQ1:
   3120	000673					MESSAGE	<CONFIGURE MOS MEMORY [ALL,YES,NO]?>
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 75-1
$FILE -- WRITE MICROCODE RECORDS

	000673	   103 	   117 	   116 		 .ASCIZ	\CONFIGURE MOS MEMORY [ALL,YES,NO]?\
	000676	   106 	   111 	   107
	000701	   125 	   122 	   105
	000704	   040 	   115 	   117
	000707	   123 	   040 	   115
	000712	   105 	   115 	   117
	000715	   122 	   131 	   040
	000720	   133 	   101 	   114
	000723	   114 	   054 	   131
	000726	   105 	   123 	   054
	000731	   116 	   117 	   135
	000734	   077 	   000
   3121	000736				CFIMQ2:
   3122	000736					MESSAGE	<KLI -- MODULES/BLOCKS WITHIN CONTROLLER _>
	000736	   113 	   114 	   111 		 .ASCIZ	\KLI -- MODULES/BLOCKS WITHIN CONTROLLER _\
	000741	   040 	   055 	   055
	000744	   040 	   115 	   117
	000747	   104 	   125 	   114
	000752	   105 	   123 	   057
	000755	   102 	   114 	   117
	000760	   103 	   113 	   123
	000763	   040 	   127 	   111
	000766	   124 	   110 	   111
	000771	   116 	   040 	   103
	000774	   117 	   116 	   124
	000777	   122 	   117 	   114
	001002	   114 	   105 	   122
	001005	   040 	   137 	   000
   3123	001010				CFIMQ3:
   3124	001010					MESSAGE	< [ALL,NONE,SPECIFY]?>
	001010	   040 	   133 	   101 		 .ASCIZ	\ [ALL,NONE,SPECIFY]?\
	001013	   114 	   114 	   054
	001016	   116 	   117 	   116
	001021	   105 	   054 	   123
	001024	   120 	   105 	   103
	001027	   111 	   106 	   131
	001032	   135 	   077 	   000
   3125	001035				CFIMQ4:
   3126	001035					MESSAGE	<INTERNAL CORE MEMORY INTERLEAVE UPPER LIMIT [4,2,1]?>
	001035	   111 	   116 	   124 		 .ASCIZ	\INTERNAL CORE MEMORY INTERLEAVE UPPER LIMIT [4,2,1]?\
	001040	   105 	   122 	   116
	001043	   101 	   114 	   040
	001046	   103 	   117 	   122
	001051	   105 	   040 	   115
	001054	   105 	   115 	   117
	001057	   122 	   131 	   040
	001062	   111 	   116 	   124
	001065	   105 	   122 	   114
	001070	   105 	   101 	   126
	001073	   105 	   040 	   125
	001076	   120 	   120 	   105
	001101	   122 	   040 	   114
	001104	   111 	   115 	   111
	001107	   124 	   040 	   133
	001112	   064 	   054 	   062
	001115	   054 	   061 	   135
	001120	   077 	   000
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 75-2
$FILE -- WRITE MICROCODE RECORDS

   3127	003760					.PSECT
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3129					.SBTTL	$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES
   3130
   3131					;+
   3132					; $CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES
   3133					;
   3134					; $CFIMD SETS UP THE INTERNAL MEMORY CONFIGURATION TABLES FROM THE DIALOGUE.
   3135					; THE MEMORY BOOT'S TABLES ARE SIMPLY CHECKED, AND NOT ALTERED
   3136					;
   3137					; $CFMMD -- SET UP MOS MEMORY CONFIGURATION TABLES
   3138					;
   3139					; $CFMMD SETS UP THE MOS MEMORY CONFIGURATION TABLES FROM THE DIALOGUE.
   3140					; THE MEMORY BOOT'S TABLES ARE SIMPLY CHECKED, AND NOT ALTERED
   3141					;-
   3142
   3143	003760				$CFMMD::
   3144	003760	105737 	000000G			TSTB	MF20		; DO WE HAVE MOS MEMORY??
   3145	003764	001410 				BEQ	10$		; NO -- JUST EXIT
   3146	003766	012703 	000013 			MOV	#13,R3		; YES -- MAX LEGAL BLOCK NUMBER TO R3
   3147	003772	012704 	000010 			MOV	#10,R4		; ITERATION COUNT TO R4
   3148	003776	010402 				MOV	R4,R2		; IS ALSO BASE CONTROLLER NUMBER
   3149	004000	012700 	000673'			MOV	#CFMMQ1,R0	; MESSAGE POINTER TO R0
   3150	004004	000421 				BR	CFGXMC		; GO TO COMMON CODE
   3151						;
   3152	004006				10$:
   3153	004006					CALLR	$CFGXX		; EXIT TO CONFIGURE MEMORY
	004006	000137 	020320'			 JMP	$CFGXX
   3154						;
   3155
   3156						.ENABL	LSB
   3157
   3158	004012				$CFIMD::
   3159	004012	105737 	000000G			TSTB	MA20		; DO WE HAVE INTERNAL MEMORY??
   3160	004016	001005 				BNE	5$		; YES -- GO ON
   3161	004020	105737 	000000G			TSTB	MB20		; NO -- HOW ABOUT MB20'S??
   3162	004024	001002 				BNE	5$		; YES -- GO ON
   3163	004026					CALLR	$DLGXM		; NO -- TRY FOR EXTERNAL MEMORY
	004026	000137 	020436'			 JMP	$DLGXM
   3164						;
   3165	004032				5$:
   3166	004032	012703 	000003 			MOV	#3,R3		; YES -- MAX LEGAL BLOCK NUMBER TO R3
   3167	004036	012700 	000616'			MOV	#CFIMQ1,R0	; MESSAGE POINTER TO R0
   3168	004042	005002 				CLR	R2		; INIT COUNTER
   3169	004044	012704 	000004 			MOV	#4,R4		; MAXIMUM OF FOUR INTERNAL CONTROLLERS
   3170					;
   3171					; ASK THE TOP-LEVEL QUESTION
   3172					;
   3173	004050				CFGXMC:
   3174	004050				10$:
   3175	004050	105737 	000032'			TSTB	.DMSW		; ARE WE IN DIALOG MODE??
   3176	004054	002440 				BLT	20$		; NO -- TAKE DEFAULT PATH
   3177	004056					CALL	$TTMSG		; YES -- ASK THE FIRST QUESTION
	004056	004737 	027034'			 JSR	PC,$TTMSG
   3178	004062					CALL	$TTRD		; READ THE RESPONSE
	004062	004737 	026330'			 JSR	PC,$TTRD
   3179	004066	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO THE INPUT BUFFER
   3180	004072	105715 				TSTB	(R5)		; DEFAULT??
   3181	004074	001430 				BEQ	20$		; YES -- DO "ALL"
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76-1
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3182	004076	022715 	046101 			CMP	#"AL,(R5)	; "ALL"??
   3183	004102	001425 				BEQ	20$		; YES -- DO ALL
   3184	004104	022715 	047516 			CMP	#"NO,(R5)	; "NO"??
   3185	004110	001424 				BEQ	30$		; YES  -- DO NONE
   3186	004112	022715 	042531 			CMP	#"YE,(R5)	; "YES"??
   3187	004116	001435 				BEQ	50$		; YES --  FIND OUT WHAT
   3188	004120	022715 	040502 			CMP	#"BA,(R5)	; "BACK"??
   3189	004124	001007 				BNE	15$		; NO -- ERROR
   3190	004126	022703 	000003 			CMP	#3,R3		; YES -- IS THIS INTERNAL MEMORY??
   3191	004132	001002 				BNE	14$		; NO -- GO THOUGH VECTORS
   3192	004134					CALLR	$DLGMB		; YES -- BACK UP ONE
	004134	000137 	020446'			 JMP	$DLGMB
   3193						;
   3194	004140				14$:
   3195	004140					CALLR	$DLMB1		; BACK UP THRU VECTORS
	004140	000137 	020452'			 JMP	$DLMB1
   3196						;
   3197					;
   3198					; UNRECOGNIZED COMMAND
   3199					;
   3200	004144				15$:
   3201	004144					PRINT	#COMCSE		; COMMAND SYNTAX ERROR
	004144	012700 	004705'			 MOV	#COMCSE,R0
	004150	004737 	027034'			 JSR	PC,$TTMSG
   3202	004154	000531 				BR	150$		; TRY AGAIN
   3203						;
   3204					;
   3205					; ENTRY FOR "ALL" CONTROLLERS <DEFAULT PATH>
   3206					;
   3207	004156				20$:
   3208	004156	005001 				CLR	R1		; SET R1 TO SAY "ALL"
   3209	004160	000402 				BR	40$		; DO COMMON CODE
   3210						;
   3211					;
   3212					; ENTRY FOR "NO(NE)" CONTROLLERS
   3213					;
   3214	004162				30$:
   3215	004162	012701 	100000 			MOV	#BIT15,R1	; SET R1 TO SAY "NO(NE)"
   3216					;
   3217					; COMMON CODE FOR "ALL" OR "NO(NE)" CONTROLLERS
   3218					;
   3219					; WHAT'S WHERE:
   3220					;
   3221					;	R0 -- CONTROLLER NUMBER PASSED TO CHECK ROUTINE
   3222					;	R1 -- ALLOCATION FLAG
   3223					;		0 = ALL CONTROLLERS
   3224					;		100000 = NO CONTROLLERS
   3225					;	R2 -- CONTROLLER NUMBER
   3226					;	R3 -- MODULE/BLOCK NUMBER LIMIT
   3227					;	R4 -- ITERATION COUNT
   3228					;
   3229	004166				40$:
   3230	004166	105762 	000000G			TSTB	TYPNUM(R2)	; DOES THIS CONTROLLER EXIST??
   3231	004172	001404 				BEQ	45$		; NO -- TRY FOR THE NEXT ONE
   3232	004174	010200 				MOV	R2,R0		; YES -- CONTROLLER NUMBER TO R0
   3233	004176	006300 				ASL	R0		; WORD INDEX
   3234	004200	010160 	000132'			MOV	R1,.CFGTB(R0)	; SET ALLOCATION OR DELETION REQUEST
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76-2
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3235	004204				45$:
   3236	004204	105722 				TSTB	(R2)+		; ADVANCE CONTROLLER INDEX
   3237	004206	077411 				SOB	R4,40$		; DO THIS FOR ALL
   3238	004210	000501 				BR	130$		; AND EXIT
   3239						;
   3240					;
   3241					; ENTRY FOR "YES" (LONG DIALOGUE)
   3242					;
   3243	004212				50$:
   3244	004212	005001 				CLR	R1		; INIT BIT-MASK
   3245	004214				60$:
   3246	004214	105762 	000000G			TSTB	TYPNUM(R2)	; IS THIS CONTROLLER HERE??
   3247	004220	001472 				BEQ	120$		; NO -- TRY THE NEXT ONE
   3248	004222	012700 	000736'			MOV	#CFIMQ2,R0	; YES -- MESSAGE POINTER TO R0
   3249	004226					CALL	$TTDMS		; TYPE PREAMBLE
	004226	004737 	026766'			 JSR	PC,$TTDMS
   3250	004232	010200 				MOV	R2,R0		; CONTROLLER NUMBER TO R0
   3251	004234					CALL	$TDB2O		; CONVERT TO OCTAL ASCII
	004234	004737 	025650'			 JSR	PC,$TDB2O
   3252	004240	012700 	001010'			MOV	#CFIMQ3,R0	; MESSAGE POINTER TO R0
   3253	004244					CALL	$TTDMS		; END THE QUESTION
	004244	004737 	026766'			 JSR	PC,$TTDMS
   3254	004250					CALL	$TCRLF		; AND THE LINE
	004250	004737 	026730'			 JSR	PC,$TCRLF
   3255	004254					CALL	$TTRD		; READ RESPONSE
	004254	004737 	026330'			 JSR	PC,$TTRD
   3256	004260	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO INPUT BUFFER
   3257	004264	105715 				TSTB	(R5)		; DEFAULT??
   3258	004266	001412 				BEQ	70$		; YES -- DO "ALL"
   3259	004270	022715 	046101 			CMP	#"AL,(R5)	; "ALL"??
   3260	004274	001407 				BEQ	70$		; YES -- DO IT
   3261	004276	022715 	047516 			CMP	#"NO,(R5)	; "NONE"??
   3262	004302	001406 				BEQ	80$		; YES -- DO IT
   3263	004304	022715 	040502 			CMP	#"BA,(R5)	; "BACK"??
   3264	004310	001006 				BNE	90$		; NO -- HOPE ITS NUMERIC...
   3265	004312	000452 				BR	150$		; YES -- GO DO IT
   3266						;
   3267					;
   3268					; "ALL" MODULES/BLOCKS THIS CONTROLLER
   3269					;
   3270	004314				70$:
   3271	004314	005001 				CLR	R1		; SET R1 TO "ALL"
   3272	004316	000420 				BR	100$		; AND DO IT
   3273						;
   3274					;
   3275					; "NO(NE)" MODULES/BLOCKS THIS CONTROLLER
   3276					;
   3277	004320				80$:
   3278	004320	012701 	100000 			MOV	#BIT15,R1	; SET R1 TO "NONE"
   3279	004324	000415 				BR	100$
   3280						;
   3281					;
   3282					; HERE TO SPECIFY MODULES/BLOCKS WITHIN THIS CONTROLLER
   3283					;
   3284					; WHAT'S WHERE:
   3285					;
   3286					;	R0 -- PASSED CONTROLLER NUMBER
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76-3
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3287					;	R1 -- ALLOCATION MASK
   3288					;	R2 -- CONTROLLER NUMBER
   3289					;	R3 -- MODULE/BLOCK NUMBER LIMIT
   3290					;	R4 -- ITERATION COUNT
   3291					;
   3292	004326				90$:
   3293	004326					CALL	$TRO2B		; CONVERT TO OCTAL NUMERIC
	004326	004737 	025762'			 JSR	PC,$TRO2B
   3294	004332	103435 				BCS	140$		; FIDDLE FINGERS!
   3295	004334	020300 				CMP	R3,R0		; IN RANGE??
   3296	004336	002433 				BLT	140$		; NO -- COMPLAIN
   3297	004340	006300 				ASL	R0		; YES -- GET WORD INDEX
   3298	004342	056001 	000000G			BIS	BITTBL(R0),R1	; LIGHT THE BIT
   3299	004346	122725 	000054 			CMPB	#',,(R5)+	; CONTINUE??
   3300	004352	001765 				BEQ	90$		; YES -- CONTINUE
   3301	004354	105745 				TSTB	-(R5)		; NO -- TERMINATE OK??
   3302	004356	001272 				BNE	15$		; NO -- COMPLAIN
   3303					;
   3304					; COMMON CODE FOR "ALL", "NO(NE)", OR SPECIFIC MODULES/BLOCKS THIS CONTROLLER
   3305					;
   3306	004360				100$:
   3307	004360	010200 				MOV	R2,R0		; YES -- CONTROLLER NUMBER TO R0
   3308	004362	022703 	000003 			CMP	#3,R3		; IS THIS INTERNAL MEMORY??
   3309	004366	001004 				BNE	110$		; NO -- MOS MEMORY
   3310	004370					CALL	$CHKIM		; YES -- CHECK INTERNAL CONFIGURATION
	004370	004737 	004644'			 JSR	PC,$CHKIM
   3311	004374	103706 				BCS	50$		; OOPS!
   3312	004376	000403 				BR	120$		; ALL OK -- GO ON
   3313						;
   3314	004400				110$:
   3315	004400					CALL	$CHKMM		; CHECK MOS CONFIGURATION
	004400	004737 	005070'			 JSR	PC,$CHKMM
   3316	004404	103702 				BCS	50$		; BAD NEWS...
   3317	004406				120$:
   3318	004406	105722 				TSTB	(R2)+		; ADVANCE CONTROLLER COUNTER
   3319	004410	005304 				DEC	R4		; DECREMENT ITERATION COUNT
   3320	004412	001277 				BNE	50$		; LOOP THROUGH ALL CONTROLLERS
   3321	004414				130$:
   3322	004414	022703 	000003 			CMP	#3,R3		; DONE -- IS THIS INTERNAL MEMORY??
   3323	004420	001420 				BEQ	CFIMIL		; YES -- GO GET INTERLEAVE FACTOR
   3324	004422					CALLR	$CFGXX		; NO -- GO CONFIGURE THE MEMORY
	004422	000137 	020320'			 JMP	$CFGXX
   3325						;
   3326					;
   3327					; ERROR PROCESSING
   3328					;
   3329	004426				140$:
   3330	004426					PRINT	#COMCSE		; ERROR MESSAGE
	004426	012700 	004705'			 MOV	#COMCSE,R0
	004432	004737 	027034'			 JSR	PC,$TTMSG
   3331	004436	000666 				BR	60$		; TRY AGAIN
   3332						;
   3333	004440				150$:
   3334	004440	012700 	000616'			MOV	#CFIMQ1,R0	; YES -- ASSUME INTERNAL MEMORY
   3335	004444	022703 	000003 			CMP	#3,R3		; IS IT REALLY??
   3336	004450	001402 				BEQ	160$		; YES -- GO ON
   3337	004452	012700 	000673'			MOV	#CFMMQ1,R0	; NO -- SET MOS MESSAGE
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76-4
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3338	004456				160$:
   3339	004456	000137 	004050'			JMP	10$		; AND BACK UP
   3340						;
   3341						.DSABL	LSB
   3342					;
   3343					; HERE TO GET INTERNAL CORE MEMORY INTERLEAVE FACTOR
   3344					;
   3345	004462				CFIMIL:
   3346	004462	105737 	000032'			TSTB	.DMSW		; ARE WE IN DIALOG MODE??
   3347	004466	002452 				BLT	50$		; NO -- TAKE DEFAULT PATH
   3348	004470	012700 	000132'			MOV	#.CFGTB,R0	; YES -- POINT TO CONFIGURATION TABLE
   3349	004474	012704 	000004 			MOV	#4,R4		; ITERATION COUNT TO R4
   3350	004500				10$:
   3351	004500	005720 				TST	(R0)+		; IS THIS ONE CONFIGURABLE??
   3352	004502	100002 				BPL	20$		; YES -- GO ON
   3353	004504	077403 				SOB	R4,10$		; NO -- TRY FOR THE NEXT ONE
   3354	004506	000442 				BR	50$		; NO INTERNAL MEMORY -- EXIT
   3355						;
   3356	004510				20$:
   3357	004510					PRINT	#CFIMQ4		; ASK THE QUESTION
	004510	012700 	001035'			 MOV	#CFIMQ4,R0
	004514	004737 	027034'			 JSR	PC,$TTMSG
   3358	004520					CALL	$TTRD		; READ THE RESPONSE
	004520	004737 	026330'			 JSR	PC,$TTRD
   3359	004524	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO INPUT BUFFER
   3360	004530	005000 				CLR	R0		; INIT DEFAULT
   3361	004532	022715 	040502 			CMP	#"BA,(R5)	; "BACK"??
   3362	004536	001430 				BEQ	60$		; YES -- DO IT
   3363	004540	105715 				TSTB	(R5)		; NO -- DEFAULT??
   3364	004542	001413 				BEQ	25$		; YES -- SET IT
   3365	004544					CALL	$TRI2B		; NO -- CONVERT TO NUMERIC
	004544	004737 	024624'			 JSR	PC,$TRI2B
   3366	004550	103425 				BCS	70$		; OOPS!
   3367	004552	005700 				TST	R0		; DID HE TYPE ANYTHING??
   3368	004554	001423 				BEQ	70$		; NO -- NOT ALLOWED
   3369	004556	022700 	000003 			CMP	#3,R0		; YES -- DID HE SAY "3"??
   3370	004562	001420 				BEQ	70$		; YES -- NOT ALLOWED
   3371	004564	022700 	000004 			CMP	#4,R0		; NO -- IN RANGE??
   3372	004570	002415 				BLT	70$		; NO -- COMPLAIN
   3373	004572				25$:
   3374	004572	012704 	000004 			MOV	#4,R4		; YES -- ITERATION COUNT TO R4
   3375	004576	012701 	000142'			MOV	#.CFGTB+8.,R1	; POINT TO END OF INTERNAL CONTROLLERS+1
   3376	004602				30$:
   3377	004602	005741 				TST	-(R1)		; BACK UP OVER NEXT ENTRY
   3378	004604	100402 				BMI	40$		; NOT THERE IF NEGATIVE
   3379	004606	110061 	000001 			MOVB	R0,1(R1)	; SET THE BUS-MODE IN HIGH BYTE
   3380	004612				40$:
   3381	004612	077405 				SOB	R4,30$		; LOOP TILL DONE
   3382	004614				50$:
   3383	004614					CALLR	$DLGXM		; DONE -- TRY EXTERNAL MEMORY
	004614	000137 	020436'			 JMP	$DLGXM
   3384						;
   3385	004620				60$:
   3386	004620					CALLR	$CFIMD		; BACK UP
	004620	000137 	004012'			 JMP	$CFIMD
   3387						;
   3388	004624				70$:
KLICI -- INTERNAL AND MOS DIALO	MACRO M1113  11-NOV-81 11:25  PAGE 76-5
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3389	004624					PRINT	#COMCSE		; ERROR MESSAGE
	004624	012700 	004705'			 MOV	#COMCSE,R0
	004630	004737 	027034'			 JSR	PC,$TTMSG
   3390	004634	000725 				BR	20$		; TRY AGAIN
   3391						;
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 77
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

   3393						.TITLE	KLICM -- CHECK INTERNAL MEMORY CONFIGURATION
   3394	004636					IDENT$	10,0,KLI$$F
						.IDENT	/B10000/
   3395					;
   3396					;                             COPYRIGHT (C) 1975, 1978 BY
   3397					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3398					;
   3399					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3400					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3401					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3402					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3403					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3404					;
   3405					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3406					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3407					;       CORPORATION.
   3408					;
   3409					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3410					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3411					;
   3412					;
   3413					;	MODULE: INTERNAL CONFIGURATION CHECK
   3414					;
   3415					;	VERSION: 10-00
   3416					;
   3417					;	DATE: 25-JUL-78
   3418					;
   3419					;	AUTHOR: R. BELANGER
   3420					;
   3421					;	MODIFICATIONS:
   3422					;
   3423					;	NO.	DATE		PROGRAMMER	REASON
   3424					;	---	----		----------	------
   3425					;
   3426					;			LOCAL DATA
   3427					;
   3428	000272					.PSECT	DATA,D
   3429	000272				SETIMF:
   3430	000272	   000 				.BYTE	0
   3431	000273				SETMMF:
   3432	000273	   000 				.BYTE	0
   3433	001122					.PSECT	TEXT,D
   3434	001122				CIMNXC:
   3435	001122					ERROR	<NONEXISTENT CONTROLLER>
	001122	   077 	   040 	   116 		 .ASCIZ	\? NONEXISTENT CONTROLLER\
	001125	   117 	   116 	   105
	001130	   130 	   111 	   123
	001133	   124 	   105 	   116
	001136	   124 	   040 	   103
	001141	   117 	   116 	   124
	001144	   122 	   117 	   114
	001147	   114 	   105 	   122
	001152	   000
   3436	001153				CIMNXM:
   3437	001153					ERROR	<NONEXISTENT MODULE/BLOCK>
	001153	   077 	   040 	   116 		 .ASCIZ	\? NONEXISTENT MODULE/BLOCK\
	001156	   117 	   116 	   105
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 77-1
$CFIMD -- SET UP INTERNAL MEMORY CONFIGURATION TABLES

	001161	   130 	   111 	   123
	001164	   124 	   105 	   116
	001167	   124 	   040 	   115
	001172	   117 	   104 	   125
	001175	   114 	   105 	   057
	001200	   102 	   114 	   117
	001203	   103 	   113 	   000
   3438	004636					.PSECT
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 78
$CHKIM -- CHECK INTERNAL MEMORY MASK WORD

   3440					.SBTTL	$CHKIM -- CHECK INTERNAL MEMORY MASK WORD
   3441
   3442					;+
   3443					; $CHKIM -- CHECK INTERNAL MEMORY MASK WORD
   3444					;
   3445					; $CHKIM WILL VERIFY THAT THE MASK WORD FOR INTERNAL CORE MEMORY CONFIGURATION
   3446					; IS VALID IN THAT THE MODULE SPECIFIED DOES EXIST IN THE PHYSICAL RESOURCES.
   3447					;
   3448					; INPUT ARGUMENTS:
   3449					;
   3450					;	R0 -- CONTROLLER NUMBER
   3451					;	R1 -- MODULE SELECTION BIT-MASK
   3452					;	CONTI(R0) -- BIT-MASK OF AVAILABLE MODULES
   3453					;	TYPNUM(R0) -- CONTROLLER AVAILABILITY FLAG WORD
   3454					;
   3455					; OUTPUT ARGUMENTS:
   3456					;
   3457					;	R0,R1 -- UNDEFINED
   3458					;	.CFGTB+0(R0) -- EDITED MODULE SELECTION BIT-MASK
   3459					;	CONTI(R0) -- EDITED MODULE SELECTION BIT-MASK
   3460					;
   3461					; SUCCESS RETURN:
   3462					;
   3463					;	CC-C CLEAR
   3464					;
   3465					; ERROR RETURN:
   3466					;
   3467					;	CC-C SET AND CONTI(R0) UNCHANGED.
   3468					;-
   3469
   3470					;
   3471					; HERE TO ACTUALLY SET THE SPECIFIED CONFIGURATION
   3472					;
   3473
   3474	004636				$SETIM::
   3475	004636	105237 	000272'			INCB	SETIMF		; SAY "SET"
   3476	004642	000402 				BR	CHKIMC		; DO COMMON CODE
   3477						;
   3478					;
   3479					; HERE TO SIMPLY CHECK THE DESIRED CONFIGURATION
   3480					;
   3481
   3482	004644				$CHKIM::
   3483	004644	105037 	000272'			CLRB	SETIMF		; SAY "CHECK"
   3484					;
   3485					; COMMON SET/CHECK CODE
   3486					;
   3487	004650				CHKIMC:
   3488	004650					PUSH	R2		; SAVE R2
	004650	010246 				 MOV	R2,-(SP)
   3489	004652					PUSH	R3		; AND R3
	004652	010346 				 MOV	R3,-(SP)
   3490	004654	005046 				CLR	-(SP)		; GET A BUFFER FOR BIT MASK
   3491	004656	122760 	000001 	000000G		CMPB	#1,TYPNUM(R0)	; IS THIS AN MA20??
   3492	004664	001411 				BEQ	10$		; YES -- GO ON
   3493	004666	122760 	000003 	000000G		CMPB	#3,TYPNUM(R0)	; NO -- IS IT AN MB20??
   3494	004674	001405 				BEQ	10$		; YES -- GO ON
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 78-1
$CHKIM -- CHECK INTERNAL MEMORY MASK WORD

   3495	004676					PRINT	#CIMNXC		; NO -- COMPLAIN
	004676	012700 	001122'			 MOV	#CIMNXC,R0
	004702	004737 	027034'			 JSR	PC,$TTMSG
   3496	004706	000434 				BR	50$		; AND EXIT
   3497						;
   3498	004710				10$:
   3499	004710	005701 				TST	R1		; DOES HE WANT ALL MODULES??
   3500	004712	001442 				BEQ	70$		; YES -- GIVE IT TO HIM
   3501	004714	100404 				BMI	20$		; NO -- DOES HE WANT SOME??
   3502	004716	116016 	000000G			MOVB	CONTI(R0),(SP)	; YES -- PHYSICAL BIT-MAP TO STACK
   3503	004722	005002 				CLR	R2		; INIT BIT-MASK INDEX
   3504	004724	000410 				BR	30$		; CHECK WHAT HE WANTS
   3505						;
   3506					;
   3507					; WHAT'S WHERE:
   3508					;
   3509					;	R0 -- CONTROLLER NUMBER
   3510					;	R1 -- ALLOCATION BIT MASK
   3511					;		.LT. 0 -- DELETE ENTIRE CONTROLLER
   3512					;		.EQ. 0 -- ALLOCATE ENTIRE CONTROLLER
   3513					;		.GT. 0 -- ALLOCATE SOME MUDULES IN CONTROLLER
   3514					;	R2 -- BIT MASK INDEX
   3515					;	R3 -- CURRENT BIT MASK
   3516					;	(SP) -- BIT MASK TO/FROM MEMORY BOOT
   3517					;
   3518					; HERE TO DELETE AN ENTIRE CONTROLLER
   3519					;
   3520	004726				20$:
   3521	004726	012716 	100000 			MOV	#BIT15,(SP)	; FLAG NONE FOR SAVE/RESTORE
   3522	004732	105737 	000272'			TSTB	SETIMF		; IS THIS A SET??
   3523	004736	001430 				BEQ	70$		; NO -- JUST EXIT
   3524	004740	105060 	000000G			CLRB	TYPNUM(R0)	; YES -- CLEAR CONTROLLER FLAG
   3525	004744	000425 				BR	70$		; AND EXIT
   3526						;
   3527					;
   3528					; HERE TO ALLOCATE MODULES WITHIN A CONTROLLER
   3529					;
   3530	004746				30$:
   3531	004746	016203 	000000G			MOV	BITTBL(R2),R3	; GET MASK FOR TARGET MODULE
   3532	004752	030301 				BIT	R3,R1		; DOES HE WANT THIS ONE??
   3533	004754	001002 				BNE	40$		; YES -- GO ON
   3534	004756	140316 				BICB	R3,(SP)		; NO -- GET RID OF IT
   3535	004760	000411 				BR	60$		; AND GO ON
   3536						;
   3537	004762				40$:
   3538	004762	130316 				BITB	R3,(SP)		; WANTS THIS ONE -- IS IT THERE??
   3539	004764	001007 				BNE	60$		; YES -- GO ON
   3540	004766					PRINT	#CIMNXM		; NO -- COMPLAIN
	004766	012700 	001153'			 MOV	#CIMNXM,R0
	004772	004737 	027034'			 JSR	PC,$TTMSG
   3541	004776	005726 				TST	(SP)+		; FLUSH STACK
   3542	005000				50$:
   3543	005000	000261 				SEC			; SET ERROR FLAG
   3544	005002	000424 				BR	90$		; AND EXIT
   3545						;
   3546	005004				60$:
   3547	005004	005722 				TST	(R2)+		; POINT TO NEXT MASK BIT
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 78-2
$CHKIM -- CHECK INTERNAL MEMORY MASK WORD

   3548	005006	022702 	000010 			CMP	#10,R2		; ARE WE DONE??
   3549	005012	003355 				BGT	30$		; NO -- CONTINUE
   3550	005014	005716 				TST	(SP)		; YES -- DID HE DELETE THEM ALL??
   3551	005016	001743 				BEQ	20$		; YES -- DELETE THE CONTROLLER TOO
   3552	005020				70$:
   3553	005020	012602 				MOV	(SP)+,R2	; NO -- EDITED MASK TO R2
   3554	005022	001411 				BEQ	80$		; ZERO BIT MASK IS ONE FLAVOR OF ALL
   3555	005024	120260 	000000G			CMPB	R2,CONTI(R0)	; HAS ANYTHING CHANGED??
   3556	005030	001406 				BEQ	80$		; NO -- GO ON
   3557	005032	010201 				MOV	R2,R1		; YES -- COPY WORD TO R1
   3558	005034	105737 	000272'			TSTB	SETIMF		; IS THIS A SET??
   3559	005040	001402 				BEQ	80$		; NO -- GO ON
   3560	005042	110260 	000000G			MOVB	R2,CONTI(R0)	; YES -- EDITED MASK TO PHYSICAL TABLE
   3561	005046				80$:
   3562	005046	006300 				ASL	R0		; WORD INDEX
   3563	005050	010160 	000132'			MOV	R1,.CFGTB(R0)	; SET WORD INTO CONFIGURATION TABLE
   3564	005054				90$:
   3565	005054					POP	R3		; RESTORE REGISTERS
	005054	012603 				 MOV	(SP)+,R3
   3566	005056					POP	R2		; SO
	005056	012602 				 MOV	(SP)+,R2
   3567	005060					RETURN			; TO CALLER
	005060	000207 				 RTS	PC
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 79
$CHKMM -- CHECK MOS MEMORY CONFIGURATION

   3569					.SBTTL	$CHKMM -- CHECK MOS MEMORY CONFIGURATION
   3570
   3571					;
   3572					; HERE TO SET THE CONFIGURATION FOR AN MF20 CONTROLLER
   3573					;
   3574	005062				$SETMM::
   3575	005062	105237 	000273'			INCB	SETMMF		; SAY "SET"
   3576	005066	000402 				BR	CHKMMC		; DO COMMON CODE
   3577						;
   3578					;
   3579					; HERE TO CHECK THE CONFIGURATION FOR AN MF20 CONTROLLER
   3580					;
   3581	005070				$CHKMM::
   3582	005070	105037 	000273'			CLRB	SETMMF		; SAY "CHECK"
   3583					;
   3584					; COMMON CHECK/SET CODE
   3585					;
   3586					;	R0 -- CONTROLLER NUMBER
   3587					;	R1 -- ALLOCATION MASK
   3588					;
   3589	005074				CHKMMC:
   3590	005074					PUSH	R2		; SAVE R2
	005074	010246 				 MOV	R2,-(SP)
   3591	005076					PUSH	R3		; AND R3
	005076	010346 				 MOV	R3,-(SP)
   3592	005100					PUSH	R4		; R4 TOO
	005100	010446 				 MOV	R4,-(SP)
   3593	005102	122760 	000005 	000000G		CMPB	#5,TYPNUM(R0)	; IS THIS AN MF20??
   3594	005110	001405 				BEQ	10$		; YES  -- GO ON
   3595	005112					PRINT	#CIMNXC		; NO -- COMPLAIN
	005112	012700 	001122'			 MOV	#CIMNXC,R0
	005116	004737 	027034'			 JSR	PC,$TTMSG
   3596	005122	000440 				BR	40$		; AND EXIT
   3597						;
   3598	005124				10$:
   3599	005124	005002 				CLR	R2		; INIT BIT-MASK INDEX
   3600	005126	005046 				CLR	-(SP)		; INIT BIT-MASK
   3601	005130	010004 				MOV	R0,R4		; COPY CONTROLLER NUMBER TO R4
   3602	005132					CALL	BAF0		; FIND BASE OF THIS MF20 TABLE
	005132	004737 	000000G			 JSR	PC,BAF0
   3603	005136	005701 				TST	R1		; WHAT DOES HE WANT??
   3604	005140	001446 				BEQ	80$		; ALL
   3605	005142	100015 				BPL	30$		; SOMETHING
   3606					;
   3607					; WHAT'S WHERE:
   3608					;
   3609					;	R0 -- POINTS TO MF20 BLOCK TABLE
   3610					;	R1 -- ALLOCATION MASK
   3611					;		.LT. 0 -- DELETE ENTIRE CONTROLLER
   3612					;		.EQ. 0 -- ALLOCATE ENTIRE CONTROLLER
   3613					;		.GT. 0 -- DELETE SOME BLOCKS WITHIN CONTROLLER
   3614					;	R2 -- BIT MASK INDEX
   3615					;	R3 -- CURRENT BIT MASK
   3616					;	R4 -- CONTROLLER NUMBER
   3617					;	(SP) -- ACCUMULATED ALLOCATION MASK FOR RETURN
   3618					;
   3619					; HERE TO DELETE AN ENTIRE CONTROLLER
KLICM -- CHECK INTERNAL MEMORY 	MACRO M1113  11-NOV-81 11:25  PAGE 79-1
$CHKMM -- CHECK MOS MEMORY CONFIGURATION

   3620					;
   3621	005144				20$:
   3622	005144	012716 	100000 			MOV	#BIT15,(SP)	; MARK DELETION DONE
   3623	005150	105737 	000273'			TSTB	SETMMF		; IS THIS A SET??
   3624	005154	001440 				BEQ	80$		; NO -- JUST EXIT
   3625	005156				25$:
   3626	005156	105020 				CLRB	(R0)+		; YES -- MARK THAT WE DON'T WANT THIS BLOCK
   3627	005160	005202 				INC	R2		; ADVANCE COUNTER
   3628	005162	022702 	000014 			CMP	#14,R2		; ARE WE DONE??
   3629	005166	003373 				BGT	25$		; NO -- CONTINUE DELETING
   3630	005170	105064 	000000G			CLRB	TYPNUM(R4)	; DONE -- DELETE THE CONTROLLER
   3631	005174	000430 				BR	80$		; AND EXIT
   3632						;
   3633					;
   3634					; HERE TO ALLOCATE/DELETE BLOCKS TO/FROM A CONTROLLER
   3635					;
   3636	005176				30$:
   3637	005176	016203 	000000G			MOV	BITTBL(R2),R3	; GET MASK BIT INTO R3
   3638	005202	030301 				BIT	R3,R1		; DOES HE WANT THIS ONE??
   3639	005204	001413 				BEQ	60$		; NO -- GO DELETE IT
   3640	005206	105710 				TSTB	(R0)		; YES -- DOES IT EXIST??
   3641	005210	001007 				BNE	50$		; YES -- ALLOCATE IT
   3642	005212					PRINT	#CIMNXM		; NO -- COMPLAIN
	005212	012700 	001153'			 MOV	#CIMNXM,R0
	005216	004737 	027034'			 JSR	PC,$TTMSG
   3643	005222	005726 				TST	(SP)+		; FLUSH STACK
   3644	005224				40$:
   3645	005224	000261 				SEC			; SET ERROR FLAG
   3646	005226	000416 				BR	90$		; AND EXIT
   3647						;
   3648	005230				50$:
   3649	005230	050316 				BIS	R3,(SP)		; MARK DESIRED BLOCK
   3650	005232	000404 				BR	70$		; AND TRY FOR NEXT
   3651						;
   3652	005234				60$:
   3653	005234	105737 	000273'			TSTB	SETMMF		; IS THIS A SET??
   3654	005240	001401 				BEQ	70$		; NO -- GO ON
   3655	005242	105010 				CLRB	(R0)		; YES -- DELETE BLOCK FROM PHYSICAL TABLE
   3656	005244				70$:
   3657	005244	005200 				INC	R0		; STEP POINTER
   3658	005246	005722 				TST	(R2)+		; ADVANCE TO NEXT BLOCK
   3659	005250	022702 	000030 			CMP	#30,R2		; DONE??
   3660	005254	003350 				BGT	30$		; NO -- CONTINUE TESTING
   3661	005256				80$:
   3662	005256	006304 				ASL	R4		; YES -- CONVERT TO WORD INDEX
   3663	005260	012664 	000132'			MOV	(SP)+,.CFGTB(R4) ; SET CONFIGURATION MASK IN TABLE
   3664	005264				90$:
   3665	005264					POP	R4		; RESTORE REGISTERS
	005264	012604 				 MOV	(SP)+,R4
   3666	005266					POP	R3
	005266	012603 				 MOV	(SP)+,R3
   3667	005270					POP	R2
	005270	012602 				 MOV	(SP)+,R2
   3668	005272					RETURN			; TO CALLER
	005272	000207 				 RTS	PC
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 80
$CHKMM -- CHECK MOS MEMORY CONFIGURATION

   3670						.TITLE	KLICO -- CONFIGURATION EDITOR
   3671	005274					IDENT$	10,0,KLI$$F
						.IDENT	/B10000/
   3672					;
   3673					;                             COPYRIGHT (C) 1975, 1978 BY
   3674					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3675					;
   3676					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3677					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3678					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3679					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3680					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3681					;
   3682					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3683					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3684					;       CORPORATION.
   3685					;
   3686					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3687					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3688					;
   3689					;
   3690					;	MODULE: CONFIGURATION EDITOR
   3691					;
   3692					;	VERSION: 10-00
   3693					;
   3694					;	DATE: 25-JUL-78
   3695					;
   3696					;	AUTHOR: R. BELANGER
   3697					;
   3698					;	MODIFICATIONS:
   3699					;
   3700					;	NO.	DATE		PROGRAMMER	REASON
   3701					;	---	----		----------	------
   3702					;
   3703					;
   3704					;
   3705					;			LOCAL DATA
   3706					;
   3707	001206					.PSECT	TEXT,D
   3708	001206				CFGINM:
   3709	001206					WARNING <INTERNAL CORE MEMORY RESOURCES DO NOT MATCH FILE>
	001206	   045 	   040 	   111 		 .ASCIZ	\% INTERNAL CORE MEMORY RESOURCES DO NOT MATCH FILE\
	001211	   116 	   124 	   105
	001214	   122 	   116 	   101
	001217	   114 	   040 	   103
	001222	   117 	   122 	   105
	001225	   040 	   115 	   105
	001230	   115 	   117 	   122
	001233	   131 	   040 	   122
	001236	   105 	   123 	   117
	001241	   125 	   122 	   103
	001244	   105 	   123 	   040
	001247	   104 	   117 	   040
	001252	   116 	   117 	   124
	001255	   040 	   115 	   101
	001260	   124 	   103 	   110
	001263	   040 	   106 	   111
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 80-1
$CHKMM -- CHECK MOS MEMORY CONFIGURATION

	001266	   114 	   105 	   000
   3710	001271				CFGXNM:
   3711	001271					WARNING <EXTERNAL CORE MEMORY RESOURCES DO NOT MATCH FILE>
	001271	   045 	   040 	   105 		 .ASCIZ	\% EXTERNAL CORE MEMORY RESOURCES DO NOT MATCH FILE\
	001274	   130 	   124 	   105
	001277	   122 	   116 	   101
	001302	   114 	   040 	   103
	001305	   117 	   122 	   105
	001310	   040 	   115 	   105
	001313	   115 	   117 	   122
	001316	   131 	   040 	   122
	001321	   105 	   123 	   117
	001324	   125 	   122 	   103
	001327	   105 	   123 	   040
	001332	   104 	   117 	   040
	001335	   116 	   117 	   124
	001340	   040 	   115 	   101
	001343	   124 	   103 	   110
	001346	   040 	   106 	   111
	001351	   114 	   105 	   000
   3712	001354				CFGMNM:
   3713	001354					WARNING <MOS MEMORY RESOURCES DO NOT MATCH FILE>
	001354	   045 	   040 	   115 		 .ASCIZ	\% MOS MEMORY RESOURCES DO NOT MATCH FILE\
	001357	   117 	   123 	   040
	001362	   115 	   105 	   115
	001365	   117 	   122 	   131
	001370	   040 	   122 	   105
	001373	   123 	   117 	   125
	001376	   122 	   103 	   105
	001401	   123 	   040 	   104
	001404	   117 	   040 	   116
	001407	   117 	   124 	   040
	001412	   115 	   101 	   124
	001415	   103 	   110 	   040
	001420	   106 	   111 	   114
	001423	   105 	   000
   3714	001425				CFGMAC:
   3715	001425					WARNING <MOS MEMORY IS ALREADY CONFIGURED>
	001425	   045 	   040 	   115 		 .ASCIZ	\% MOS MEMORY IS ALREADY CONFIGURED\
	001430	   117 	   123 	   040
	001433	   115 	   105 	   115
	001436	   117 	   122 	   131
	001441	   040 	   111 	   123
	001444	   040 	   101 	   114
	001447	   122 	   105 	   101
	001452	   104 	   131 	   040
	001455	   103 	   117 	   116
	001460	   106 	   111 	   107
	001463	   125 	   122 	   105
	001466	   104 	   000
   3716	005274					.PSECT
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 81
$CONFG -- EDITOR DISPATCH

   3718						.SBTTL	$CONFG -- EDITOR DISPATCH
   3719
   3720	005274				$CONFG::
   3721	005274	105037 	000032'			CLRB	.DMSW		; RESET FLAG
   3722	005300	105737 	000000G			TSTB	MA20		; DO WE HAVE INTERNAL MEMORY??
   3723	005304	001003 				BNE	10$		; YES -- CONFIGURE IT
   3724	005306	105737 	000000G			TSTB	MB20		; NO -- HOW ABOUT MB20'S
   3725	005312	001403 				BEQ	20$		; NO -- GO ON
   3726	005314				10$:
   3727	005314					CALL	CFGINT		; YES -- CONFIGURE IT
	005314	004737 	005404'			 JSR	PC,CFGINT
   3728	005320	103430 				BCS	70$		; ERROR IF CC-C SET
   3729	005322				20$:
   3730	005322	105737 	000000G			TSTB	DMA20		; DO WE HAVE EXTERNAL MEMORY??
   3731	005326	001403 				BEQ	30$		; NO -- GO ON
   3732	005330					CALL	CFGEXT		; YES -- CONFIGURE IT
	005330	004737 	005656'			 JSR	PC,CFGEXT
   3733	005334	103422 				BCS	70$		; ERROR IF CC-C SET
   3734	005336				30$:
   3735	005336	105737 	000000G			TSTB	MF20		; DO WE HAVE MOS MEMORY??
   3736	005342	001403 				BEQ	40$		; NO -- GO ON
   3737	005344					CALL	CFGMOS		; YES CONFIGURE IT
	005344	004737 	006014'			 JSR	PC,CFGMOS
   3738	005350	103414 				BCS	70$		; ERROR IF CC-C SET
   3739	005352				40$:
   3740	005352	113746 	000032'			MOVB	.DMSW,-(SP)	; DONE -- SAVE FLAG
   3741	005356	105037 	000032'			CLRB	.DMSW		; INIT FOR RETURN
   3742	005362	105737 	000024'			TSTB	.DLGSW		; ARE WE BEING TOLD WHAT TO DO??
   3743	005366	001402 				BEQ	50$		; YES -- SET FLAG TO WRITE FILE
   3744	005370	105716 				TSTB	(SP)		; NO -- DID ANYTHING CHANGE??
   3745	005372	001402 				BEQ	60$		; NO -- JUST EXIT
   3746	005374				50$:
   3747	005374	105237 	000032'			INCB	.DMSW		; YES -- FLAG FILE WRITE
   3748	005400				60$:
   3749	005400	005726 				TST	(SP)+		; CLEAR STACK
   3750	005402				70$:
   3751	005402					RETURN			; TO CALLER
	005402	000207 				 RTS	PC
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 82
CFGINT -- INTERNAL MEMORY CONFIGURATION EDITOR

   3753						.SBTTL	CFGINT -- INTERNAL MEMORY CONFIGURATION EDITOR
   3754
   3755	005404				CFGINT:
   3756	005404	012704 	000004 			MOV	#4,R4		; INIT ITERATION COUNTER
   3757	005410	005002 				CLR	R2		; INIT CONTROLER NUMBER
   3758	005412	005003 				CLR	R3		; RESET ERROR FLAG
   3759	005414				10$:
   3760	005414	010200 				MOV	R2,R0		; CONTROLLER NUMBER TO R0
   3761	005416	006200 				ASR	R0		; BYTE INDEX
   3762	005420	016201 	000132'			MOV	.CFGTB(R2),R1	; EDITED CONFIGURATION MASK
   3763	005424	100015 				BPL	20$		; WANTS IT CONFIGURED
   3764	005426	105760 	000000G			TSTB	TYPNUM(R0)	; THIS CONTROLLER EXIST??
   3765	005432	001461 				BEQ	60$		; NO -- DON'T BOTHER DELETING
   3766	005434	126060 	000000G	000070'		CMPB	TYPNUM(R0),.CTLTP(R0) ; CONTROLLERS MATCH??
   3767	005442	001402 				BEQ	15$		; YES -- GO ON
   3768	005444					CALL	70$		; NO -- WARN HIM
	005444	004737 	005614'			 JSR	PC,70$
   3769	005450				15$:
   3770	005450					CALL	$SETIM		; AND DELETE IT
	005450	004737 	004636'			 JSR	PC,$SETIM
   3771	005454	103477 				BCS	90$		; ERROR IF CC-C SET
   3772	005456	000447 				BR	60$		; AND TRY FOR NEXT
   3773						;
   3774	005460				20$:
   3775	005460	105760 	000000G			TSTB	TYPNUM(R0)	; DOES THIS CONTROLLER EXIST??
   3776	005464	001006 				BNE	30$		; YES -- GO ON
   3777	005466	012762 	100000 	000132'		MOV	#BIT15,.CFGTB(R2) ; NO -- (LOGICALLY) DELETE THE CONTROLLER
   3778	005474					CALL	70$		; WARN OPERATOR
	005474	004737 	005614'			 JSR	PC,70$
   3779	005500	000436 				BR	60$		; GO AROUND AGAIN
   3780						;
   3781	005502				30$:
   3782	005502	126060 	000000G	000070'		CMPB	TYPNUM(R0),.CTLTP(R0) ; CONTROLLERS MATCH??
   3783	005510	001403 				BEQ	35$		; YES -- GO ON
   3784	005512					CALL	70$		; NO -- WARN OPERATOR
	005512	004737 	005614'			 JSR	PC,70$
   3785	005516	105001 				CLRB	R1		; SAY "ALL"
   3786	005520				35$:
   3787	005520	120160 	000000G			CMPB	R1,CONTI(R0)	; ARE THESE THE SAME??
   3788	005524	001414 				BEQ	40$		; YES -- GO ON
   3789	005526	105701 				TSTB	R1		; IS IT "ALL"??
   3790	005530	001412 				BEQ	40$		; YES -- SAME DIFFERENCE
   3791	005532					PUSH	R1		; SAVE R1
	005532	010146 				 MOV	R1,-(SP)
   3792	005534					CALL	$SETIM		; DELETE THE MODULES
	005534	004737 	004636'			 JSR	PC,$SETIM
   3793	005540					POP	R1		; RESTORE R1
	005540	012601 				 MOV	(SP)+,R1
   3794	005542	103005 				BCC	40$		; ALL OK IF CC-C IS CLEAR
   3795	005544	105060 	000132'			CLRB	.CFGTB(R0)	; SET TO "ALL"
   3796	005550					CALL	70$		; WARN OPERATOR OR EXIT
	005550	004737 	005614'			 JSR	PC,70$
   3797	005554	000410 				BR	60$		; GO ON TO NEXT CONTROLLER
   3798						;
   3799	005556				40$:
   3800	005556	000301 				SWAB	R1		; SWAP THE BYTES
   3801	005560	042701 	177774 			BIC	#^C3,R1		; FLUSH JUNK
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 82-1
CFGINT -- INTERNAL MEMORY CONFIGURATION EDITOR

   3802	005564	001002 				BNE	50$		; GO ON IF .NE.
   3803	005566	012701 	000003 			MOV	#3,R1		; (0 V 4) => 3
   3804	005572				50$:
   3805	005572	110137 	000000G			MOVB	R1,INTMOD	; SET THE INTERLEAVE MODE
   3806	005576				60$:
   3807	005576	005722 				TST	(R2)+		; ADVANCE CONTROLLER INDEX
   3808	005600	077473 				SOB	R4,10$		; LOOP TILL DONE
   3809	005602	105037 	000000G			CLRB	MABRD		; DONE -- RESET FLAGS
   3810	005606	105037 	000000G			CLRB	RDDONE		; SO
   3811	005612					RETURN			; TO CALLER
	005612	000207 				 RTS	PC
   3812	005614				70$:
   3813	005614	005703 				TST	R3		; ALREADY PRINTED??
   3814	005616	001006 				BNE	80$		; YES -- GO ON
   3815	005620					PUSH	R0		; NO -- SAVE R0
	005620	010046 				 MOV	R0,-(SP)
   3816	005622					PRINT	#CFGINM		; TELL HIM
	005622	012700 	001206'			 MOV	#CFGINM,R0
	005626	004737 	027034'			 JSR	PC,$TTMSG
   3817	005632					POP	R0		; RESTORE R0
	005632	012600 				 MOV	(SP)+,R0
   3818	005634				80$:
   3819	005634	005203 				INC	R3		; FLAG PRINT
   3820	005636	105237 	000032'			INCB	.DMSW		; AND CONTROL
   3821	005642	105737 	000024'			TSTB	.DLGSW		; IS HE TALKING TO US??
   3822	005646	001002 				BNE	90$		; NO -- GO ON
   3823	005650	000137 	022750'			JMP	$ERROR		; YES -- QUIT NOW
   3824						;
   3825	005654				90$:
   3826	005654					RETURN			; TO CALLER
	005654	000207 				 RTS	PC
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 83
CFGEXT -- EXTERNAL MEMORY CONFIGURATION EDITOR

   3828						.SBTTL	CFGEXT -- EXTERNAL MEMORY CONFIGURATION EDITOR
   3829
   3830	005656				CFGEXT:
   3831	005656	012700 	000004 			MOV	#4,R0		; CONTROLLER NUMBER 4
   3832	005662	013701 	000142'			MOV	.CFGTB+10,R1	; ALLOCATION DATA TO R1
   3833	005666	100005 				BPL	10$		; HE WANTS IT
   3834	005670	105737 	000004G			TSTB	TYPNUM+4	; IS IT THERE??
   3835	005674	001446 				BEQ	50$		; NO -- SO DON'T BOTHER
   3836	005676					CALLR	INIDMA		; YES -- SO DELETE IT
	005676	000137 	000000G			 JMP	INIDMA
   3837						;
   3838	005702				10$:
   3839	005702	105737 	000004G			TSTB	TYPNUM+4	; IS IT THERE??
   3840	005706	001004 				BNE	20$		; YES -- ALLOCATE IT
   3841	005710	012737 	100000 	000142'		MOV	#BIT15,.CFGTB+10 ; NO -- LOGICALLY DELETE IT
   3842	005716	000414 				BR	30$		; PRINT THE MESSAGE AND EXIT
   3843						;
   3844	005720				20$:
   3845	005720	005737 	000000G			TST	DMA2TS		; IS IT REALLY THERE??
   3846	005724	003411 				BLE	30$		; NO -- COMPLAIN
   3847	005726	110100 				MOVB	R1,R0		; YES -- GET THE INTERLEAVE MODE INTO R0
   3848	005730	001430 				BEQ	50$		; EXIT NOW IF OPTIMAL
   3849	005732	042700 	177774 			BIC	#^C3,R0		; FLUSH JUNK
   3850	005736	006300 				ASL	R0		; WORD INDEX
   3851	005740	036037 	000234'	000000G		BIT	BMMSTB(R0),DMANXM ; IS IT OK??
   3852	005746	001413 				BEQ	40$		; YES -- GO ON
   3853	005750				30$:
   3854	005750					PRINT	#CFGXNM		; NO -- COMPLAIN
	005750	012700 	001271'			 MOV	#CFGXNM,R0
	005754	004737 	027034'			 JSR	PC,$TTMSG
   3855	005760	105237 	000032'			INCB	.DMSW		; FLAG CONTROL
   3856	005764	105737 	000024'			TSTB	.DLGSW		; IS SOMEONE TALKING TO US??
   3857	005770	001010 				BNE	50$		; NO -- JUST EXIT
   3858	005772	000137 	022750'			JMP	$ERROR		; YES -- BAIL OUT NOW
   3859						;
   3860	005776				40$:
   3861	005776	005701 				TST	R1		; IS MODE NOW ZERO??
   3862	006000	001002 				BNE	45$		; NO -- GO ON
   3863	006002	012701 	000003 			MOV	#3,R1		; YES -- MAKE IT 4-WAY
   3864	006006				45$:
   3865	006006	110137 	000000G			MOVB	R1,DMABM	; SET THE BUS MODE
   3866	006012				50$:
   3867	006012					RETURN			; TO CALLER
	006012	000207 				 RTS	PC
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 84
CFGMOS -- MOS CONFIGURATION EDITOR

   3869						.SBTTL	CFGMOS -- MOS CONFIGURATION EDITOR
   3870
   3871	006014				CFGMOS:
   3872	006014	012704 	000010 			MOV	#10,R4		; INIT ITERATION COUNTER
   3873	006020	012702 	000020 			MOV	#20,R2		; ALSO BASE CONTROLLER NUMBER
   3874	006024	005003 				CLR	R3		; INIT FLAG
   3875	006026				10$:
   3876	006026	010200 				MOV	R2,R0		; CONTROLER NUMBER TO R0
   3877	006030	006200 				ASR	R0		; REAL CONTROLLER NUMBER
   3878	006032	122760 	000002 	000000G		CMPB	#2,CONTI(R0)	; WHAT STATE ARE WE IN??
   3879	006040	003005 				BGT	15$		; OK TO CONFIGURE
   3880	006042					PRINT	#CFGMAC		; ALREADY CONFIGURED
	006042	012700 	001425'			 MOV	#CFGMAC,R0
	006046	004737 	027034'			 JSR	PC,$TTMSG
   3881	006052	000441 				BR	45$		; NEXT...
   3882						;
   3883	006054				15$:
   3884	006054	016201 	000132'			MOV	.CFGTB(R2),R1	; CONFIGURATION MASK
   3885	006060	002004 				BGE	20$		; WANTS IT IF .GE. 0
   3886	006062	105760 	000000G			TSTB	TYPNUM(R0)	; IS CONTROLLER THERE??
   3887	006066	001022 				BNE	35$		; YES -- DELETE IT
   3888	006070	000430 				BR	40$		; NO -- TRY FOR NEXT CONTROLLER
   3889						;
   3890	006072				20$:
   3891	006072	105760 	000000G			TSTB	TYPNUM(R0)	; IS THE CONTROLLER THERE??
   3892	006076	003006 				BGT	30$		; YES -- GO ON
   3893	006100	012762 	100000 	000132'		MOV	#BIT15,.CFGTB(R2) ; NO -- (LOGICALLY) DELETE THE CONTROLLER
   3894	006106					CALL	50$		; WARN OPERATOR
	006106	004737 	006160'			 JSR	PC,50$
   3895	006112	000417 				BR	40$		; AND GO ON
   3896						;
   3897	006114				30$:
   3898	006114					CALL	$MAPMM		; GET THE MOS MAP FOR THIS CONTROLLER
	006114	004737 	006216'			 JSR	PC,$MAPMM
   3899	006120	020100 				CMP	R1,R0		; ARE THE MASKS THE SAME??
   3900	006122	001413 				BEQ	40$		; YES -- DON'T DELETE MODULES
   3901	006124	005701 				TST	R1		; NO -- DID HE MEAN ALL??
   3902	006126	001411 				BEQ	40$		; YES -- GO ON
   3903	006130	010200 				MOV	R2,R0		; NO -- GET CONTROLLER NUMBER
   3904	006132	006200 				ASR	R0		; RIGHT
   3905	006134				35$:
   3906	006134					CALL	$SETMM		; AND SET IT
	006134	004737 	005062'			 JSR	PC,$SETMM
   3907	006140	103004 				BCC	40$		; ALL OK IF CC-C IS CLEAR
   3908	006142					CALL	50$		; WARN OPERATOR OR EXIT
	006142	004737 	006160'			 JSR	PC,50$
   3909	006146	005062 	000132'			CLR	.CFGTB(R2)	; SET TABLE TO "ALL"
   3910	006152				40$:
   3911	006152	005722 				TST	(R2)+		; NEXT CONTROLLER
   3912	006154	077454 				SOB	R4,10$		; LOOP TILL DONE
   3913	006156				45$:
   3914	006156					RETURN			; TO CALLER
	006156	000207 				 RTS	PC
   3915	006160				50$:
   3916	006160	005703 				TST	R3		; ALREADY PRINTED??
   3917	006162	001004 				BNE	60$		; YES -- GO ON
   3918	006164					PRINT	#CFGMNM		; NO PRINT IT
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 84-1
CFGMOS -- MOS CONFIGURATION EDITOR

	006164	012700 	001354'			 MOV	#CFGMNM,R0
	006170	004737 	027034'			 JSR	PC,$TTMSG
   3919	006174				60$:
   3920	006174	005203 				INC	R3		; FLAG PRINT
   3921	006176	105237 	000032'			INCB	.DMSW		; HERE TOO
   3922	006202	105737 	000024'			TSTB	.DLGSW		; SOMEONE OUT THERE??
   3923	006206	001401 				BEQ	70$		; YES
   3924	006210					RETURN			; NO -- RETURN
	006210	000207 				 RTS	PC
   3925	006212				70$:
   3926	006212	000137 	022750'			JMP	$ERROR		; BAIL OUT NOW...
   3927						;
KLICO -- CONFIGURATION EDITOR	MACRO M1113  11-NOV-81 11:25  PAGE 85
$MAPMM -- MAP MOS CONTROLLER BLOCKS

   3929						.SBTTL	$MAPMM -- MAP MOS CONTROLLER BLOCKS
   3930
   3931	006216				$MAPMM::
   3932	006216					PUSH	R2		; SAVE R2
	006216	010246 				 MOV	R2,-(SP)
   3933	006220					PUSH	R4		; AND R4
	006220	010446 				 MOV	R4,-(SP)
   3934	006222	005046 				CLR	-(SP)		; BUFFER
   3935	006224	012704 	000014 			MOV	#14,R4		; ITERATION COUNTER
   3936	006230	005002 				CLR	R2		; INIT INDEX
   3937	006232					CALL	BAF0		; FIND BASE ADDRESS THIS CONTROLLER
	006232	004737 	000000G			 JSR	PC,BAF0
   3938	006236				10$:
   3939	006236	105720 				TSTB	(R0)+		; IS THE BLOCK THERE??
   3940	006240	001402 				BEQ	20$		; NO -- GO ON
   3941	006242	056216 	000000G			BIS	BITTBL(R2),(SP)	; YES -- LIGHT A BIT
   3942	006246				20$:
   3943	006246	005722 				TST	(R2)+		; AND NEXT BIT
   3944	006250	077406 				SOB	R4,10$		; LOOP TILL DONE
   3945	006252					POP	R0		; BIT MASK TO R0
	006252	012600 				 MOV	(SP)+,R0
   3946	006254					POP	R4		; RESTORE R4
	006254	012604 				 MOV	(SP)+,R4
   3947	006256					POP	R2		; RESTORE R2
	006256	012602 				 MOV	(SP)+,R2
   3948	006260					RETURN			; TO CALLER
	006260	000207 				 RTS	PC
KLICS -- SWEEP CACHE	MACRO M1113  11-NOV-81 11:25  PAGE 86
$MAPMM -- MAP MOS CONTROLLER BLOCKS

   3950						.TITLE	KLICS -- SWEEP CACHE
   3951	006262					IDENT$	5,1
						.IDENT	/005010/
   3952					;
   3953					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   3954					;
   3955					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   3956					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   3957					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   3958					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   3959					;
   3960					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   3961					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   3962					; EQUIPMENT CORPORATION.
   3963					;
   3964					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   3965					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   3966					;
   3967					; VERSION 05-01
   3968					;
   3969					; ALAN D. PECKHAM  8-APR-77
   3970					;
   3971					; MODIFIED BY:
   3972					;
   3973					; FUNCTION: SWEEP AND INVALIDATE THE KL CACHE.
   3974					;
   3976					; EQUATED SYMBOLS
   3977					;
   3978		000014 			CCA	=	14		; KL DEVICE.
   3979		000004 			CONO	=	4		; KL I/O SUBFUNCTION CODE.
   3980		000001 			DATAI	=	1		; KL I/O SUBFUNCTION CODE.
   3981		000010 			PAG	=	10		; KL DEVICE.
   3982					;
   3983					; LOCAL DATA
   3984					;
   3985	000274					.PSECT	DATA,D
   3986	000274				DCSSIA:	IO10$	DATAI CCA,,0	; SWPIA INSTRUCTION.
	000274	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	000277	   014 	   016 			 .BYTE	BY$$3,BY$$4
   3987	000301				DCSRCA:	IO10$	CONO PAG,,0	; RESET CACHE & PAGING STATUS.
	000301	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	000304	   012 	   016 			 .BYTE	BY$$3,BY$$4
   3988						.EVEN
   3989	006262					.PSECT
KLICS -- SWEEP CACHE	MACRO M1113  11-NOV-81 11:25  PAGE 87
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

   3991						.SBTTL	$SWEEP	-- SWEEP AND INVALIDATE THE CACHE
   3992					;+
   3993					; SWEEP THE CACHE OUT AND TURN IT OFF.
   3994					;
   3995					; INPUTS:
   3996					;	.NCACH	- NUMBER OF CACHES CONFIGURED.
   3997					;	.CACHN	- NUMBERS OF THE CACHES ENABLED.
   3998					;
   3999					; NO OUTPUTS
   4000					;-
   4001
   4002	006262				$SWEEP::
   4003	006262	105737 	000041'			TSTB	.CASW		; CHECK CACHE CONDITION AND
   4004	006266	003415 				BLE	90$		; RETURN IF NO CACHE.
   4005	006270					PUSH	<R1,R0>
	006270	010146 				 MOV	R1,-(SP)
	006272	010046 				 MOV	R0,-(SP)
   4006	006274	012700 	000274'			MOV	#DCSSIA,R0	; FIRST, INVALIDATE THE CACHE
   4007	006300					CALL	$EXCT		; WITH A SWPIA.
	006300	004737 	027712'			 JSR	PC,$EXCT
   4008	006304	103404 				BCS	80$
   4009	006306	012700 	000301'			MOV	#DCSRCA,R0	; THEN TURN OFF CACHE LOOK & LOAD
   4010	006312					CALL	$EXCT		; WITH A CONO PAG,,0.
	006312	004737 	027712'			 JSR	PC,$EXCT
   4011	006316				80$:
   4012	006316					POP	<R0,R1>
	006316	012600 				 MOV	(SP)+,R0
	006320	012601 				 MOV	(SP)+,R1
   4013	006322				90$:
   4014	006322					RETURN
	006322	000207 				 RTS	PC
   4015
KLICX -- EXTERNAL MEMORY CONFIG	MACRO M1113  11-NOV-81 11:25  PAGE 88
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

   4018						.TITLE	KLICX -- EXTERNAL MEMORY CONFIGURATION DIALOG
   4019	006324					IDENT$	10,0,KLI$$F
						.IDENT	/B10000/
   4020					;
   4021					;                             COPYRIGHT (C) 1975, 1978 BY
   4022					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4023					;
   4024					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4025					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4026					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4027					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4028					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4029					;
   4030					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4031					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4032					;       CORPORATION.
   4033					;
   4034					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4035					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4036					;
   4037					;
   4038					;	MODULE: EXTERNAL MEMORY CONFIGURATION DIALOG
   4039					;
   4040					;	VERSION: 10-00
   4041					;
   4042					;	DATE: 25-JUL-78
   4043					;
   4044					;	AUTHOR: R. BELANGER
   4045					;
   4046					;	MODIFICATIONS:
   4047					;
   4048					;	NO.	DATE		PROGRAMMER	REASON
   4049					;	---	----		----------	------
   4050					;
   4051					;			LOCAL DATA
   4052					;
   4053	001470					.PSECT	TEXT,D
   4054	001470				CXMDOL:
   4055	001470					WARNING <EXTERNAL CORE MEMORY IS OFF-LINE>
	001470	   045 	   040 	   105 		 .ASCIZ	\% EXTERNAL CORE MEMORY IS OFF-LINE\
	001473	   130 	   124 	   105
	001476	   122 	   116 	   101
	001501	   114 	   040 	   103
	001504	   117 	   122 	   105
	001507	   040 	   115 	   105
	001512	   115 	   117 	   122
	001515	   131 	   040 	   111
	001520	   123 	   040 	   117
	001523	   106 	   106 	   055
	001526	   114 	   111 	   116
	001531	   105 	   000
   4056	001533				CFXMQ1:
   4057	001533	   103 	   117 	   116 		.ASCIZ	/CONFIGURE EXTERNAL CORE MEMORY [YES,NO]?/
	001536	   106 	   111 	   107
	001541	   125 	   122 	   105
	001544	   040 	   105 	   130
	001547	   124 	   105 	   122
KLICX -- EXTERNAL MEMORY CONFIG	MACRO M1113  11-NOV-81 11:25  PAGE 88-1
$SWEEP	-- SWEEP AND INVALIDATE THE CACHE

	001552	   116 	   101 	   114
	001555	   040 	   103 	   117
	001560	   122 	   105 	   040
	001563	   115 	   105 	   115
	001566	   117 	   122 	   131
	001571	   040 	   133 	   131
	001574	   105 	   123 	   054
	001577	   116 	   117 	   135
	001602	   077 	   000
   4058	001604				CFXMQ2:
   4059	001604	   105 	   130 	   124 		.ASCIZ	/EXTERNAL CORE MEMORY BUS-MODE [OPTIMAL,1,2,4]?/
	001607	   105 	   122 	   116
	001612	   101 	   114 	   040
	001615	   103 	   117 	   122
	001620	   105 	   040 	   115
	001623	   105 	   115 	   117
	001626	   122 	   131 	   040
	001631	   102 	   125 	   123
	001634	   055 	   115 	   117
	001637	   104 	   105 	   040
	001642	   133 	   117 	   120
	001645	   124 	   111 	   115
	001650	   101 	   114 	   054
	001653	   061 	   054 	   062
	001656	   054 	   064 	   135
	001661	   077 	   000
   4060	001663				CXMIBM:
   4061	001663					ERROR	<ILLEGAL BUS-MODE>
	001663	   077 	   040 	   111 		 .ASCIZ	\? ILLEGAL BUS-MODE\
	001666	   114 	   114 	   105
	001671	   107 	   101 	   114
	001674	   040 	   102 	   125
	001677	   123 	   055 	   115
	001702	   117 	   104 	   105
	001705	   000
   4062	006324					.PSECT
KLICX -- EXTERNAL MEMORY CONFIG	MACRO M1113  11-NOV-81 11:25  PAGE 89
$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG

   4064						.SBTTL	$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG
   4065
   4066	006324				$CFXMD::
   4067	006324	105737 	000000G			TSTB	DMA20		; DO WE HAVE EXTERNAL MEMORY??
   4068	006330	001540 				BEQ	100$		; NO -- GO ON TO NEXT SECTION
   4069	006332	005737 	000000G			TST	DMA2TS		; YES -- IS IT ON-LINE??
   4070	006336	003005 				BGT	10$		; YES -- GO ON
   4071	006340					PRINT	#CXMDOL		; NO -- SAY SO
	006340	012700 	001470'			 MOV	#CXMDOL,R0
	006344	004737 	027034'			 JSR	PC,$TTMSG
   4072	006350	000530 				BR	100$		; AND EXIT
   4073						;
   4074	006352				10$:
   4075	006352	105737 	000032'			TSTB	.DMSW		; ARE WE IN DIALOG MODE??
   4076	006356	002435 				BLT	40$		; NO -- TAKE DEFAULT PATH
   4077	006360					PRINT	#CFXMQ1		; YES -- ASK THE FIRST QUESTION
	006360	012700 	001533'			 MOV	#CFXMQ1,R0
	006364	004737 	027034'			 JSR	PC,$TTMSG
   4078	006370					CALL	$TTRD		; READ THE RESPONSE
	006370	004737 	026330'			 JSR	PC,$TTRD
   4079	006374	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO INPUT BUFFER
   4080	006400	105715 				TSTB	(R5)		; DEFAULT??
   4081	006402	001423 				BEQ	40$		; YES -- DO IT
   4082	006404	022715 	042531 			CMP	#"YE,(R5)	; NO -- IS IT "YES"??
   4083	006410	001420 				BEQ	40$		; YES -- DO IT
   4084	006412	022715 	047516 			CMP	#"NO,(R5)	; NO -- IS IT "NO"??
   4085	006416	001412 				BEQ	30$		; YES -- DO IT
   4086	006420	022715 	040502 			CMP	#"BA,(R5)	; NO -- IS IT "BACK"??
   4087	006424	001405 				BEQ	20$		; YES -- BACK UP ONE
   4088	006426					PRINT	#COMCSE		; NO -- ERROR
	006426	012700 	004705'			 MOV	#COMCSE,R0
	006432	004737 	027034'			 JSR	PC,$TTMSG
   4089	006436	000745 				BR	10$
   4090						;
   4091	006440				20$:
   4092	006440					CALLR	$DLMB2		; BACK UP TO PREVIOUS QUESTION
	006440	000137 	020460'			 JMP	$DLMB2
   4093						;
   4094	006444				30$:
   4095	006444	012701 	100000 			MOV	#BIT15,R1	; MAKE R1 SAY "NO"
   4096	006450	000401 				BR	50$		; DO COMMON CODE
   4097						;
   4098	006452				40$:
   4099	006452	005001 				CLR	R1		; MAKE R1 SAY "YES" <DEFAULT PATH>
   4100	006454				50$:
   4101	006454	010137 	000142'			MOV	R1,.CFGTB+10	; SET IT IN CONFIGURATION TABLE
   4102	006460	100464 				BMI	100$		; DONE IF DELETE...
   4103	006462				60$:
   4104	006462	105737 	000032'			TSTB	.DMSW		; ARE WE IN DIALOG MODE??
   4105	006466	002461 				BLT	100$		; NO -- JUST EXIT
   4106	006470					PRINT	#CFXMQ2		; YES -- ASK THE SECOND QUESTION
	006470	012700 	001604'			 MOV	#CFXMQ2,R0
	006474	004737 	027034'			 JSR	PC,$TTMSG
   4107	006500					CALL	$TTRD		; READ THE RESPONSE
	006500	004737 	026330'			 JSR	PC,$TTRD
   4108	006504	005000 				CLR	R0		; INIT DEFAULT BUS-MODE
   4109	006506	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO INPUT BUFFER
KLICX -- EXTERNAL MEMORY CONFIG	MACRO M1113  11-NOV-81 11:25  PAGE 89-1
$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG

   4110	006512	105715 				TSTB	(R5)		; DEFAULT??
   4111	006514	001444 				BEQ	90$		; YES -- GO ON
   4112	006516	022715 	050117 			CMP	#"OP,(R5)	; NO -- "OPTIMAL"??
   4113	006522	001441 				BEQ	90$		; YES -- GO ON
   4114	006524	022715 	040502 			CMP	#"BA,(R5)	; NO -- "BACK"??
   4115	006530	001710 				BEQ	10$		; YES -- BACK UP ONE
   4116	006532					CALL	$TRI2B		; NO -- HAD BETTER BE NUMERIC
	006532	004737 	024624'			 JSR	PC,$TRI2B
   4117	006536	103426 				BCS	80$		; OOPS!
   4118	006540	005700 				TST	R0		; DID HE TYPE ZERO??
   4119	006542	001424 				BEQ	80$		; YES -- NOT ALLOWED
   4120	006544	022700 	000004 			CMP	#4,R0		; NO -- IN RANGE??
   4121	006550	002421 				BLT	80$		; NO -- COMPLAIN
   4122	006552	022700 	000003 			CMP	#3,R0		; YES -- IS IT "3"??
   4123	006556	001416 				BEQ	80$		; YES -- NOT ALLOWED
   4124	006560				70$:
   4125	006560	010001 				MOV	R0,R1		; NO -- ALL OK
   4126	006562	042701 	177774 			BIC	#^C3,R1		; FLUSH JUNK
   4127	006566	006301 				ASL	R1		; WORD INDEX
   4128	006570	016101 	000234'			MOV	BMMSTB(R1),R1	; BIT MASK TO R1
   4129	006574	030137 	000000G			BIT	R1,DMANXM	; IS THIS BUS-MODE LEGAL??
   4130	006600	001412 				BEQ	90$		; YES -- GO ON
   4131	006602					PRINT	#CXMIBM		; NO -- COMPLAIN
	006602	012700 	001663'			 MOV	#CXMIBM,R0
	006606	004737 	027034'			 JSR	PC,$TTMSG
   4132	006612	000723 				BR	60$		; AND TRY AGAIN
   4133						;
   4134	006614				80$:
   4135	006614					PRINT	#COMCSE		; ERROR MESSAGE
	006614	012700 	004705'			 MOV	#COMCSE,R0
	006620	004737 	027034'			 JSR	PC,$TTMSG
   4136	006624	000716 				BR	60$		; TRY AGAIN
   4137						;
   4138	006626				90$:
   4139	006626	010037 	000142'			MOV	R0,.CFGTB+10
   4140	006632				100$:
   4141	006632					CALLR	$DLGMF		; CONFIGURE MOS MEMORY
	006632	000137 	020442'			 JMP	$DLGMF
   4142						;
KLIDC -- FILE CLOSE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 90
$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG

   4144						.TITLE	KLIDC -- FILE CLOSE ROUTINE
   4145	006636					IDENT$	5,0
						.IDENT	/005000/
   4146					;
   4147					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4148					;
   4149					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4150					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4151					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4152					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4153					;
   4154					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4155					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4156					; EQUIPMENT CORPORATION.
   4157					;
   4158					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4159					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4160					;
   4161					; VERSION 05-00
   4162					;
   4163					; ALAN D. PECKHAM  15-APR-77
   4164					;
   4165					; MODIFIED BY:
   4166					;
   4167					; FUNCTION: THIS ROUTINE CLOSES THE FILE CURRENTLY OPEN. IF IT IS
   4168					;  AND OUTPUT FILE, THE LAST BLOCK IS WRITTEN OUT AND
   4169					;  THE ATTRIBUTES ARE WRITTEN.
   4170					;
   4171					; LOCAL MACROS
   4172					;
   4173						.MCALL	QIOW$
   4174					;
   4175					; LOCAL DATA
   4176					;
   4177	000306					.PSECT	DATA,D
   4178	000306				DDCDAI:	QIOW$	IO.DAC,SYILUN,1,,.SYSTA
	000306	   003 	   006 			.BYTE	3,$$$ARG
	000310	000000G				.WORD	IO.DAC
	000312	000004 				.WORD	SYILUN
	000314	   001 	   000 			.BYTE	1,
	000316	000522'				.WORD	.SYSTA
	000320	000000 				.WORD
   4179	000322				DDCDAO:	QIOW$	IO.DAC,SYOLUN,1,,.SYSTA,,<,DDCWAT>
	000322	   003 	   010 			.BYTE	3,$$$ARG
	000324	000000G				.WORD	IO.DAC
	000326	000005 				.WORD	SYOLUN
	000330	   001 	   000 			.BYTE	1,
	000332	000522'				.WORD	.SYSTA
	000334	000000 				.WORD
	000336	000000 				.WORD
	000340	000342'				.WORD	DDCWAT
   4180	000342	   004 	   016 		DDCWAT:	.BYTE	4,16		; ATTRIBUTES INFO
   4181	000344	002646'				.WORD	.SYATT
   4182	000346	   005 	   012 			.BYTE	5,12		; FILENAME INFO
   4183	000350	001570'				.WORD	.SYOFN+00
   4184	000352	   001 	   002 			.BYTE	1,2		; AND OWNER'S UIC
   4185	000354	001602'				.WORD	.SYOFN+12
KLIDC -- FILE CLOSE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 90-1
$CFXMD -- EXTERNAL MEMORY CONFIGURATION DIALOG

   4186	000356	   000 	   000 			.BYTE	0,0		; END OF CONTROL WORDS.
   4187	006636					.PSECT
KLIDC -- FILE CLOSE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 91
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   4189						.SBTTL	$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES
   4190					;+
   4191					; CLOSE THE INPUT AND OUTPUT FILES.
   4192					;
   4193					; NO INPUTS
   4194					;
   4195					; OUTPUTS:
   4196					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   4197					;	R0 IS DESTROYED IF ERROR.
   4198					;-
   4199
   4200	006636	105737 	000526'		$CLOSE::TSTB	.SYISW		; IF INPUT FILE NOT OPEN
   4201	006642	001411 				BEQ	10$		; LEAVE IT ALONE.
   4202	006644					DIR$	#DDCDAI		; DE-ACCESS THE INPUT FILE.
	006644	012746 	000306'			MOV	#DDCDAI,-(SP)
	006650	104375 				EMT	375
   4203	006652	103441 				BCS	30$
   4204	006654	105737 	000522'			TSTB	.SYSTA
   4205	006660	002436 				BLT	30$
   4206	006662	105037 	000526'			CLRB	.SYISW		; INPUT FILE NOW CLOSED.
   4207	006666	105737 	000527'		10$:	TSTB	.SYOSW		; IF OUTPUT FILE NO OPEN
   4208	006672	001430 				BEQ	20$		; LEAVE IT ALONE.
   4209
   4210					; COLLECT OUT STATISTICS
   4211
   4212	006674	013737 	001610'	002656'		MOV	.SYOVB,.SYATT+10 ; RECORD TOP
   4213	006702	013737 	001612'	002660'		MOV	.SYOVB+2,.SYATT+12 ; BLOCK USED AND
   4214	006710	013737 	001564'	002662'		MOV	.SYOBA,.SYATT+14 ; DISPLACEMENT TO
   4215	006716	162737 	001614'	002662'		SUB	#.SYOBF,.SYATT+14 ; NEXT AVAILABLE BYTE.
   4216	006724					CALL	$WRITS		; WRITE OUT REST OF
	006724	004737 	010446'			 JSR	PC,$WRITS
   4217	006730	103411 				BCS	20$		; THE CURRENT BLOCK.
   4218	006732					DIR$	#DDCDAO		; DE-ACCESS THE OUTPUT FILE.
	006732	012746 	000322'			MOV	#DDCDAO,-(SP)
	006736	104375 				EMT	375
   4219	006740	103411 				BCS	40$
   4220	006742	105737 	000522'			TSTB	.SYSTA
   4221	006746	002406 				BLT	40$
   4222	006750	105037 	000527'			CLRB	.SYOSW		; OUTPUT FILE NOW CLOSED.
   4223	006754				20$:	RETURN
	006754	000207 				 RTS	PC
   4224
   4225	006756	012700 	000536'		30$:	MOV	#.SYIFN,R0	; CLOSE FAILED.
   4226	006762	000402 				BR	50$
   4227	006764	012700 	001570'		40$:	MOV	#.SYOFN,R0
   4228	006770				50$:	CALLR	$IOERR
	006770	000137 	007126'			 JMP	$IOERR
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 92
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   4230						.TITLE	KLIDD -- DELETE A FILE
   4231	006774					IDENT$	5,0
						.IDENT	/005000/
   4232					;
   4233					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4234					;
   4235					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4236					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4237					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4238					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4239					;
   4240					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4241					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4242					; EQUIPMENT CORPORATION.
   4243					;
   4244					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4245					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4246					;
   4247					; VERSION 05-00
   4248					;
   4249					; ALAN D. PECKHAM  15-APR-77
   4250					;
   4251					; MODIFIED BY:
   4252					;
   4253					; FUNCTION: THIS ROUTINE DELETES THE FILE SPECIFIED BY THE FILE NAME
   4254					;  POINTED TO BY R0.
   4255					;
   4256					; LOCAL MACROS
   4257					;
   4258						.MCALL	QIOW$
   4259					;
   4260					; LOCAL DATA
   4261					;
   4262	000360					.PSECT	DATA,D
   4263	000360				DDDFNA:	QIOW$	IO.FNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000360	   003 	   014 			.BYTE	3,$$$ARG
	000362	000000G				.WORD	IO.FNA
	000364	000006 				.WORD	SYFLUN
	000366	   001 	   000 			.BYTE	1,
	000370	000522'				.WORD	.SYSTA
	000372	000000 				.WORD
	000374	000000 				.WORD
	000376	000000 				.WORD
	000400	000000 				.WORD
	000402	000000 				.WORD
	000404	000000 				.WORD
	000406	002614'				.WORD	.SYFNB
   4264	000410				DDDDEL:	QIOW$	IO.DEL,SYFLUN,1,,.SYSTA,,<.SYFID>
	000410	   003 	   007 			.BYTE	3,$$$ARG
	000412	000000G				.WORD	IO.DEL
	000414	000006 				.WORD	SYFLUN
	000416	   001 	   000 			.BYTE	1,
	000420	000522'				.WORD	.SYSTA
	000422	000000 				.WORD
	000424	002614'				.WORD	.SYFID
   4265	000426				DDDRNA:	QIOW$	IO.RNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000426	   003 	   014 			.BYTE	3,$$$ARG
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 92-1
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

	000430	000000G				.WORD	IO.RNA
	000432	000006 				.WORD	SYFLUN
	000434	   001 	   000 			.BYTE	1,
	000436	000522'				.WORD	.SYSTA
	000440	000000 				.WORD
	000442	000000 				.WORD
	000444	000000 				.WORD
	000446	000000 				.WORD
	000450	000000 				.WORD
	000452	000000 				.WORD
	000454	002614'				.WORD	.SYFNB
   4266	006774					.PSECT
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 93
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   4268					;+
   4269					; THIS PROGRAM USES THE RSX FILE PRIMITIVES TO DO ITS I/O
   4270					; IN ORDER TO AVOID THE INCLUSION OF THE FILES-11 PACKAGE WHICH IS
   4271					; SOME 2K IN SIZE, AND NOT OVERLAYABLE. THIS HAS A RISK IN THAT
   4272					; THE FILE PRIMITIVES ARE NOT DOCUMENTED, BUT THE INFORMATION IS
   4273					; AVAILABLE TO THOSE WHO WANT TO WADE THROUGH THE LISTINGS. THE
   4274					; FOLLOWING INFORMATION HOPEFULLY WILL BE OF AID TO THE READER
   4275					; OF THIS LISTING.
   4276					;
   4277					; FILES UNDER RSX ARE ACCESSED BY AN INTERNAL 'FILE ID' (FID) WHICH
   4278					; IS ASSOCIATED WITH THE USER'S FILE NAME THROUGH THE DIRECTORY.
   4279					; THUS, UNDER RSX, ACCESSING A FILE NAME IS SEPERATE FROM ACCESSING
   4280					; THE ACTUAL FILE. THE 3 PRIMITIVES IO.FNA, IO.RNA, IO.ENA ARE
   4281					; PROVIDED FOR FINDING, REMOVING, AND ENTERING A FILE NAME. THESE
   4282					; USE THE FILE NAME BLOCK (FNB) ONLY. IN ACCESSING THE DIRECTORY,
   4283					; THE FID OF THE DIRECTORY MUST BE FIRST FOUND WITHIN THE MASTER
   4284					; FILE DIRECTORY, WHICH HAS A FID OF -1,-1.
   4285					;
   4286					; ONCE THE DESIRED FID HAS BEEN FOUND, THE FILE CAN BE ACCESSED
   4287					; FOR THE TYPE OF I/O TO BE DONE: IO.ACR TO READ, IO.ACW TO
   4288					; READ/WRITE, IO.ACE TO READ/WRITE/EXTEND. THE FILE CAN THEN BE
   4289					; WORKED ON THROUGH IO.RVB AND IO.WVB (VIRTUAL BLOCKS START AT 1).
   4290					; WHEN FINISHED, THE USER SHOULD DO AN IO.DAC TO CLOSE THE FILE.
   4291					; THE PRIMITIVES IO.ACR,ACW,ACE USE THE FID AND ACCESS PARAMETERS,
   4292					; WHILE IO.DAC USES THE FID AND MAY SET THE FILE ATTRIBUTES IF
   4293					; ACCESS INCLUDES WRITING.
   4294					;
   4295					; FILES ARE MANIPULATED BY IO.CRE, IO.EXT, IO.DEL WHICH CREATE,
   4296					; EXTEND, OR DELETE A FILE. A DELETE WITH AN EXTEND PARAMETER WILL
   4297					; TRUNCATE A FILE.
   4298					;
   4299					; THE ATTRIBUTES MAY BE ACCESSED ON AN ACCESSED FILE THROUGH
   4300					; IO.RAT TO READ THE ATTRIBUTES AND IO.WAT TO WRITE.
   4301					;
   4302					; CARE MUST BE TAKEN NOT TO LOSE A FILE BY CREATING AND NOT HAVING
   4303					; IT IN SOME DIRECTORY.
   4304					;-
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 94
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   4306					;+
   4307					; THE QIO PARAMETER BLOCK IS ORGANIZED AS FOLLOWS:
   4308					;
   4309					;	.WORD	0		;ADDRESS OF FID BLOCK.
   4310					;	.WORD	0		;ADDRESS OF ATTRIBUTE CONTROL LIST.
   4311					;	.WORD	0,0		;EXTEND PARAMETERS.
   4312					;	.WORD	0		;ACCESS PARAMETERS.
   4313					;	.WORD	0		;ADDRESS OF FILE NAME BLOCK.
   4314					;
   4315					; ANY UNUSED UNUSED PARAMETERS ARE TO BE ZERO.
   4316					;
   4317					; THE PARAMETERS THAT MAY BE USED FOR PRIMITIVES ARE:
   4318					;
   4319					;	FUNC.		FID	ACL	EXT	ACC	FNB
   4320					;	IO.FNA		-	-	-	-	M
   4321					;	IO.RNA		-	-	-	-	M
   4322					;	IO.ENA		-	-	-	-	M
   4323					;	IO.ACR		M	OR	-	M	-
   4324					;	IO.ACW		M	OR	-	M	-
   4325					;	IO.ACE		M	OR	-	M	-
   4326					;	IO.DAC		O	OW	-	-	-
   4327					;	IO.EXT		O	-	M	-	-
   4328					;	IO.CRE		M	OW	O	-	-
   4329					;	IO.DEL		O	-	OT	-	-
   4330					;	IO.RAT		O	OR	-	-	-
   4331					;	IO.WAT		O	OW	-	-	-
   4332					;
   4333					;	M - MANDATORY  O - OPTIONAL  '-' - MUST BE ZERO
   4334					;	R - READ ATTRIBUTES  W - WRITE ATTRIBUTES  T - TRUNCATE FILE
   4335					;-
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 95
$CLOSE	-- CLOSE FILES AND WRITE ATTRIBUTES

   4337					;+
   4338					; THE FILE ID BLOCK IS A TWO WORD HOLDING AREA AND IS USUALLY
   4339					; THE FIRST TWO WORDS OF THE FNB, AS THAT IS WHERE THE FID IS
   4340					; RETURNED FROM A DIRECTORY OPERATION.
   4341					;
   4342					; THE FILE ATTRIBUTES ARE ACCESSED IN PIECES THROUGH A CONTROL
   4343					; LIST. ENTRIES IN THIS LIST ARE TWO WORDS LONG AND ARE TERMINATED
   4344					; BY A NULL BYTE:
   4345					;	.BYTE	0		;ATTRIBUTE # - POSITIVE TO WRITE ATTRIBUTE
   4346					;				;	       NEGATIVE TO READ ATTRIBUTE.
   4347					;	.BYTE	0		;LENGTH IN BYTES TO TRANSFER - IF ZERO
   4348					;				;THEN 1000 BYTES IS IMPLIED. THIS MUST
   4349					;				;BE <=MXLN (THE MAXIMUM LENGTH).
   4350					;	.WORD	0		;ADDRESS OF SENDING/RECIEVING AREA.
   4351					;
   4352					;	ATTR#	MXLN	DESCRIPTION
   4353					;	1	5	OWNERS UIC (MAY INCL 2&3)
   4354					;	2	3	FILE PROTECTION (MAY INCL 3)
   4355					;	3	1	USER CONTROLLED FILE CHARACTERISTICS
   4356					;	4	40	USER FILE ATTRIBUTES
   4357					;	5	12	FILE NAME (MAY INCL 6&7)
   4358					;	6	4	FILE TYPE (MAY INCL 7)
   4359					;	7	2	FILE VERSION
   4360					;	10	7	EXPIRATION DATE
   4361					;	11	12	STATISTICS BLOCK (READ ONLY)
   4362					;	12	0	COMPLETE FILE HEADER (READ ONLY)
   4363					;
   4364					; THE USER FILE ATTRIBUTES ARE DESCRIBED IN THE RSX-11 I/O
   4365					; OPERATIONS MANUAL IN APPENDIX A AS THE FIRST 20 BYTES OF
   4366					; THE FDB. THE STATISTICS BLOCK IS DESCRIBED IN APPENDIX H.
   4367					; THE FULL HEADER BLOCK IS DESCRIBED IN APPENDIX F.
   4368					;
   4369					; THE EXTEND PARAMETER IS A TWO WORD INDICATOR OF THE SIZE OF THE
   4370					; EXTEND:
   4371					;	.BYTE	0		;EXTENSION SIZE HIGH
   4372					;	.BYTE	400		;EXTENSION PARAMETER ENABLE. IF 410
   4373					;				;THEN EXTEND BY SYSTEM DEFAULT.
   4374					;	.WORD	0		;EXTENSION SIZE LOW.
   4375					; THE EXTENSION HIGH & LOW COMBINED PROVIDE A 24 BIT NUMBER OF
   4376					; BLOCKS TO EXTEND THE FILE BY. IF USED IN IO.DEL, ALL 31 BITS
   4377					; EXCLUDING THE ENABLE BIT (SIGN BIT) PARTICIPATE IN A FILE SIZE
   4378					; TO TRUNCATE TO.
   4379					;
   4380					; THE ACCESS PARAMETER SPECIFIES THE FILE WINDOW SIZE:
   4381					;	.BYTE	0		;WINDOW SIZE (NORMALLY ZERO)
   4382					;	.BYTE	400		;ACCESS PARAMETER ENABLE.
   4383					;
   4384					; THE FILE NAME BLOCK IS DESCRIBED IN THE RSX-11 I/O OPERATIONS
   4385					; REFERENCE MANUAL APPENDIX B. THE LAST FOUR BYTES ARE NOT USED.
   4386					;-
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 96
$DELETE	-- DELETE A FILE

   4388						.SBTTL	$DELETE	-- DELETE A FILE
   4389					;+
   4390					; DELETE THE GIVEN FILE FROM THE SYSTEM DEVICE
   4391					;
   4392					; INPUTS:
   4393					;	R0	- POINTER TO FILE NAME.
   4394					;
   4395					; OUTPUTS:
   4396					;	CARRY IS SET IF DELETE FAILED AND MESSAGE IS TYPED.
   4397					;	R0 IS DESTROYED IF ERROR OCCURS.
   4398					;-
   4399
   4400	006774				$DELETE::CALL	$SETFN		; GET FILE NAME.
	006774	004737 	007064'			 JSR	PC,$SETFN
   4401	007000					DIR$	#DDDFNA		; FIND FILE IN DIRECTORY
	007000	012746 	000360'			MOV	#DDDFNA,-(SP)
	007004	104375 				EMT	375
   4402	007006	103424 				BCS	10$
   4403	007010	105737 	000522'			TSTB	.SYSTA
   4404	007014	002421 				BLT	10$
   4405	007016					DIR$	#DDDDEL		; MARK IT FOR DELETION
	007016	012746 	000410'			MOV	#DDDDEL,-(SP)
	007022	104375 				EMT	375
   4406	007024	103415 				BCS	10$
   4407	007026	105737 	000522'			TSTB	.SYSTA
   4408	007032	002412 				BLT	10$
   4409	007034					CALL	$SETFN		; RESET FNB AND
	007034	004737 	007064'			 JSR	PC,$SETFN
   4410	007040					DIR$	#DDDRNA		; REMOVE NAME FROM DIRECTORY.
	007040	012746 	000426'			MOV	#DDDRNA,-(SP)
	007044	104375 				EMT	375
   4411	007046	103404 				BCS	10$
   4412	007050	105737 	000522'			TSTB	.SYSTA
   4413	007054	002401 				BLT	10$
   4414	007056					RETURN
	007056	000207 				 RTS	PC
   4415
   4416	007060				10$:	CALLR	$IOERR		; DELETE FAILED.
	007060	000137 	007126'			 JMP	$IOERR
KLIDD -- DELETE A FILE	MACRO M1113  11-NOV-81 11:25  PAGE 97
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

   4418						.SBTTL	$SETFN	-- SET FILE NAME IN FILE NAME BLOCK
   4419					;+
   4420					; PUT FILE NAME IN FILE NAME BLOCK AND SET UP
   4421					; DPB TO FIND THE FILE. THE FILENAME IS POINTED TO BY R0.
   4422					;
   4423					; INPUTS:
   4424					;	R0	- ADDRESS OF FILE NAME TO USE:
   4425					;		  .RAD50	/FILENAME /	;(THREE WORDS)
   4426					;		  .RAD50	/TYP/		;(ONE WORD)
   4427					;		  .WORD		VERSION
   4428					;		  .WORD		UIC
   4429					;		  .ASCII	/DEVICE/	;(ONE WORD)
   4430					;		  .WORD		UNIT
   4431					;
   4432					; OUTPUTS:
   4433					;	.SYFNB	- IS SET UP FOR USE WITH THE GIVEN FILE NAME.
   4434					;-
   4435
   4436	007064				$SETFN::PUSH	<R1,R0>
	007064	010146 				 MOV	R1,-(SP)
	007066	010046 				 MOV	R0,-(SP)
   4437	007070	012701 	002614'			MOV	#.SYFNB,R1	; GET FNB ADDRESS
   4438	007074	005021 				CLR	(R1)+		; AND CLEAR FID
   4439	007076	005021 				CLR	(R1)+
   4440	007100	005021 				CLR	(R1)+
   4441	007102	012021 				MOV	(R0)+,(R1)+	; MOVE IN FILENAME
   4442	007104	012021 				MOV	(R0)+,(R1)+
   4443	007106	012021 				MOV	(R0)+,(R1)+
   4444	007110	012021 				MOV	(R0)+,(R1)+	; FILE TYPE
   4445	007112	011021 				MOV	(R0),(R1)+	; VERSION
   4446	007114	005021 				CLR	(R1)+		; STATUS AND
   4447	007116	005011 				CLR	(R1)		; NEXT POINTER.
   4448	007120					POP	<R0,R1>
	007120	012600 				 MOV	(SP)+,R0
	007122	012601 				 MOV	(SP)+,R1
   4449	007124					RETURN
	007124	000207 				 RTS	PC
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1113  11-NOV-81 11:25  PAGE 98
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

   4451						.TITLE	KLIDE -- PRINT I/O ERROR MESSAGE
   4452	007126					IDENT$	5,1								; ADP01
						.IDENT	/005010/
   4453					;
   4454					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4455					;
   4456					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4457					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4458					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4459					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4460					;
   4461					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4462					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4463					; EQUIPMENT CORPORATION.
   4464					;
   4465					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4466					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4467					;
   4468					; VERSION 05-01									; ADP01
   4469					;
   4470					; ALAN D. PECKHAM  15-APR-77
   4471					;
   4472					; MODIFIED BY:
   4473					;
   4474					; FUNCTION: THIS ROUTINE IS CALLED TO PRINT OUT THE ERROR CODE
   4475					;  IN CASE OF I/O ERROR. IT ALSO PRINTS THE DEVICE AND
   4476					;  FILE NAME ASSOCIATED TO THE ERROR.
   4477					;
   4478					; LOCAL DATA
   4479					;
   4480	001706					.PSECT	TEXT,D
   4481	001706				TDEDR:	ERROR	<DIRECTIVE ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'>	; ADP01
	001706	   077 	   040 	   104 		 .ASCIZ	\? DIRECTIVE ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'\
	001711	   111 	   122 	   105
	001714	   103 	   124 	   111
	001717	   126 	   105 	   040
	001722	   105 	   122 	   122
	001725	   117 	   122 	   040
	001730	   055 	   130 	   130
	001733	   130 	   040 	   117
	001736	   116 	   040 	   106
	001741	   111 	   114 	   105
	001744	   040 	   047 	   130
	001747	   130 	   130 	   072
	001752	   130 	   130 	   130
	001755	   130 	   130 	   130
	001760	   130 	   130 	   130
	001763	   056 	   130 	   130
	001766	   130 	   073 	   130
	001771	   130 	   130 	   130
	001774	   130 	   130 	   047
	001777	   000
   4482	002000				TDEIO:	ERROR	<I/O ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'>		; ADP01
	002000	   077 	   040 	   111 		 .ASCIZ	\? I/O ERROR -XXX ON FILE 'XXX:XXXXXXXXX.XXX;XXXXXX'\
	002003	   057 	   117 	   040
	002006	   105 	   122 	   122
	002011	   117 	   122 	   040
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1113  11-NOV-81 11:25  PAGE 98-1
$SETFN	-- SET FILE NAME IN FILE NAME BLOCK

	002014	   055 	   130 	   130
	002017	   130 	   040 	   117
	002022	   116 	   040 	   106
	002025	   111 	   114 	   105
	002030	   040 	   047 	   130
	002033	   130 	   130 	   072
	002036	   130 	   130 	   130
	002041	   130 	   130 	   130
	002044	   130 	   130 	   130
	002047	   056 	   130 	   130
	002052	   130 	   073 	   130
	002055	   130 	   130 	   130
	002060	   130 	   130 	   047
	002063	   000
   4483	002064				TDENSF:	ERROR	<FILE 'XXX:XXXXXXXXX.XXX;XXXXXX' NOT FOUND>			; ADP01
	002064	   077 	   040 	   106 		 .ASCIZ	\? FILE 'XXX:XXXXXXXXX.XXX;XXXXXX' NOT FOUND\
	002067	   111 	   114 	   105
	002072	   040 	   047 	   130
	002075	   130 	   130 	   072
	002100	   130 	   130 	   130
	002103	   130 	   130 	   130
	002106	   130 	   130 	   130
	002111	   056 	   130 	   130
	002114	   130 	   073 	   130
	002117	   130 	   130 	   130
	002122	   130 	   130 	   047
	002125	   040 	   116 	   117
	002130	   124 	   040 	   106
	002133	   117 	   125 	   116
	002136	   104 	   000
   4484	002140				TDEDFU:	ERROR	<DEVICE 'XXX:' FULL>
	002140	   077 	   040 	   104 		 .ASCIZ	\? DEVICE 'XXX:' FULL\
	002143	   105 	   126 	   111
	002146	   103 	   105 	   040
	002151	   047 	   130 	   130
	002154	   130 	   072 	   047
	002157	   040 	   106 	   125
	002162	   114 	   114 	   000
   4485	007126					.PSECT
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1113  11-NOV-81 11:25  PAGE 99
$IOERR	-- REPORT I/O ERROR

   4487						.SBTTL	$IOERR	-- REPORT I/O ERROR
   4488					;+
   4489					; DISPLAY AN ERROR MESSAGE ACCORDING TO THE CODES FROM THE LAST
   4490					; I/O OPERATION AND RETURN WITH THE CARRY SET.
   4491					;
   4492					; INPUTS:
   4493					;	$DSW	- DIRECTIVE ERROR CODE OR SUCCESS CODE.
   4494					;	.SYSTA	- I/O OPERATION ERROR CODE.
   4495					;
   4496					; OUTPUT:
   4497					;	THE CARRY IS SET.
   4498					;-
   4499
   4500	007126	004537 	023142'		$IOERR::JSR	R5,$RSAVE
   4501	007132	010002 				MOV	R0,R2		; SAVE FILE NAME.
   4502	007134	012701 	001706'			MOV	#TDEDR,R1	; DIRECTIVE ERROR
   4503	007140	010105 				MOV	R1,R5
   4504	007142	113700 	000000G			MOVB	$DSW,R0
   4505	007146	100421 				BMI	10$		; OR
   4506	007150	113700 	000522'			MOVB	.SYSTA,R0
   4507	007154	012701 	002064'			MOV	#TDENSF,R1	; FILE NOT FOUND
   4508	007160	010105 				MOV	R1,R5
   4509	007162	122700 	000000G			CMPB	#IE.NSF,R0
   4510	007166	001425 				BEQ	30$		; OR
   4511	007170	012701 	002140'			MOV	#TDEDFU,R1	; DEVICE FULL
   4512	007174	010105 				MOV	R1,R5
   4513	007176	122700 	000000G			CMPB	#IE.DFU,R0
   4514	007202	001433 				BEQ	50$		; OR
   4515	007204	012701 	002000'			MOV	#TDEIO,R1	; OPERATION ERROR.
   4516	007210	010105 				MOV	R1,R5
   4517	007212	122725 	000055 		10$:	CMPB	#'-,(R5)+	; FIND POSITION FOR
   4518	007216	001375 				BNE	10$		; ERROR CODE
   4519	007220	005400 				NEG	R0		; AND
   4520	007222					CALL	$TRB2O		; INSERT IN OCTAL.
	007222	004737 	025700'			 JSR	PC,$TRB2O
   4521	007226	122715 	000040 		20$:	CMPB	#' ,(R5)	; ZAP REST OF FIELD.
   4522	007232	001403 				BEQ	30$
   4523	007234	112725 	177777 			MOVB	#-1,(R5)+
   4524	007240	000772 				BR	20$
   4525	007242	122725 	000047 		30$:	CMPB	#'',(R5)+	; NOW FIND
   4526	007246	001375 				BNE	30$		; FILENAME POSITION,
   4527	007250	010200 				MOV	R2,R0		; GET FILENAME BLOCK,				; ADP01
   4528	007252					CALL	$TRB2F		; AND INSERT FILE NAME.				; ADP01
	007252	004737 	024244'			 JSR	PC,$TRB2F
   4529	007256	122725 	000047 		40$:	CMPB	#'',(R5)+	; ZAP REST OF FIELD.
   4530	007262	001410 				BEQ	80$
   4531	007264	111765 	177777 			MOVB	(PC),-1(R5)
   4532	007270	000772 				BR	40$
   4533	007272	122725 	000047 		50$:	CMPB	#'',(R5)+
   4534	007276	001375 				BNE	50$
   4535	007300					CALL	LDEIDV
	007300	004737 	007316'			 JSR	PC,LDEIDV
   4536	007304				80$:	PRINT	R1		; DISPLAY MESSAGE
	007304	010100 				 MOV	R1,R0
	007306	004737 	027034'			 JSR	PC,$TTMSG
   4537	007312	000261 				SEC			; AND RETURN WITH SHAME.
   4538	007314					RETURN
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1113  11-NOV-81 11:25  PAGE 99-1
$IOERR	-- REPORT I/O ERROR

	007314	000207 				 RTS	PC
KLIDE -- PRINT I/O ERROR MESSAG	MACRO M1113  11-NOV-81 11:25  PAGE 100
$IOERR	-- REPORT I/O ERROR

   4540					;+
   4541					; INSERT DEVICE NAME AT AREA POINTED TO BY R5.
   4542					;
   4543					; INPUTS:
   4544					;	R5	- POINTER TO BYTES TO RECIEVE STRING.
   4545					;	R2	- POINTER TO FILE NAME.
   4546					;
   4547					; OUTPUTS:
   4548					;	A 3 CHARACTER STRING IS INSERTED AND R5 IS ADVANCED BY 4 TO
   4549					;	PASS BY THE ":".
   4550					;-
   4551
   4552	007316	116225 	000014 		LDEIDV:	MOVB	14(R2),(R5)+	; INSERT DEVICE NAME
   4553	007322	116225 	000015 			MOVB	15(R2),(R5)+
   4554	007326	116215 	000016 			MOVB	16(R2),(R5)	; DEVICE UNIT
   4555	007332	152725 	000060 			BISB	#'0,(R5)+
   4556	007336	005205 				INC	R5
   4557	007340					RETURN
	007340	000207 				 RTS	PC
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1113  11-NOV-81 11:25  PAGE 101
$IOERR	-- REPORT I/O ERROR

   4559						.TITLE	KLIDL -- LOOKUP AN EXISTING FILE FOR INPUT
   4560	007342					IDENT$	5,0
						.IDENT	/005000/
   4561					;
   4562					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4563					;
   4564					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4565					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4566					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4567					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4568					;
   4569					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4570					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4571					; EQUIPMENT CORPORATION.
   4572					;
   4573					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4574					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4575					;
   4576					; VERSION 05-00
   4577					;
   4578					; ALAN D. PECKHAM  15-APR-77
   4579					;
   4580					; MODIFIED BY:
   4581					;
   4582					; FUNCTION: THIS ROUTINE FINDS THE FILE WITH THE NAME POINTED TO BY R0
   4583					;  AND ACCESSES IT FOR READ.
   4584					;
   4585					; LOCAL MACROS
   4586					;
   4587						.MCALL	GLUN$,QIOW$
   4588					;
   4589					; LOCAL DATA
   4590					;
   4591	000456					.PSECT	DATA,D
   4592	000456				DDLGLN:	GLUN$	SYILUN,.SYIBF
	000456	   005 	   003 			.BYTE	5,3
	000460	000004 				.WORD	SYILUN
	000462	000562'				.WORD	.SYIBF
   4593	000464				DDLFNA:	QIOW$	IO.FNA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000464	   003 	   014 			.BYTE	3,$$$ARG
	000466	000000G				.WORD	IO.FNA
	000470	000006 				.WORD	SYFLUN
	000472	   001 	   000 			.BYTE	1,
	000474	000522'				.WORD	.SYSTA
	000476	000000 				.WORD
	000500	000000 				.WORD
	000502	000000 				.WORD
	000504	000000 				.WORD
	000506	000000 				.WORD
	000510	000000 				.WORD
	000512	002614'				.WORD	.SYFNB
   4594	000514				DDLACR:	QIOW$	IO.ACR,SYILUN,1,,.SYSTA,,<.SYFID,DDLRAT,,,BIT15>
	000514	   003 	   013 			.BYTE	3,$$$ARG
	000516	000000G				.WORD	IO.ACR
	000520	000004 				.WORD	SYILUN
	000522	   001 	   000 			.BYTE	1,
	000524	000522'				.WORD	.SYSTA
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1113  11-NOV-81 11:25  PAGE 101-1
$IOERR	-- REPORT I/O ERROR

	000526	000000 				.WORD
	000530	002614'				.WORD	.SYFID
	000532	000572'				.WORD	DDLRAT
	000534	000000 				.WORD
	000536	000000 				.WORD
	000540	100000 				.WORD	BIT15
   4595	000542				DDLRNA:	QIOW$	IO.RNA,SYFLUN,1,,,,<,,,,,.SYFNB>
	000542	   003 	   014 			.BYTE	3,$$$ARG
	000544	000000G				.WORD	IO.RNA
	000546	000006 				.WORD	SYFLUN
	000550	   001 	   000 			.BYTE	1,
	000552	000000 				.WORD
	000554	000000 				.WORD
	000556	000000 				.WORD
	000560	000000 				.WORD
	000562	000000 				.WORD
	000564	000000 				.WORD
	000566	000000 				.WORD
	000570	002614'				.WORD	.SYFNB
   4596	000572	   373 	   012 		DDLRAT:	.BYTE	-5,12		; READ FILE NAME
   4597	000574	000536'				.WORD	.SYIFN+00
   4598	000576	   377 	   002 			.BYTE	-1,2		; READ OWNER'S UIC
   4599	000600	000550'				.WORD	.SYIFN+12
   4600	000602	   000 	   000 			.BYTE	0,0		; END OF CONTROL LIST.
   4601	007342					.PSECT
KLIDL -- LOOKUP AN EXISTING FIL	MACRO M1113  11-NOV-81 11:25  PAGE 102
$LOOKUP	-- LOOK UP AN EXISTING FILE

   4603						.SBTTL	$LOOKUP	-- LOOK UP AN EXISTING FILE
   4604					;+
   4605					; FIND AN EXISTING FILE ON THE SYSTEM DEVICE AND OPEN IT FOR INPUT.
   4606					; IF THE FILE NAME IS IN THE DIRECTORY BUT THERE IS NO FILE, THE FILE
   4607					; NAME IS DELETED.
   4608					;
   4609					; INPUTS:
   4610					;	R0	- POINTER TO FILE NAME.
   4611					;
   4612					; OUTPUTS:
   4613					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   4614					;-
   4615
   4616	007342				$LOOKUP::CALL	$SETFN		; TRANSFER FILE NAME AND
	007342	004737 	007064'			 JSR	PC,$SETFN
   4617	007346					DIR$	#DDLGLN		; GET DEVICE NAME
	007346	012746 	000456'			MOV	#DDLGLN,-(SP)
	007352	104375 				EMT	375
   4618	007354	103455 				BCS	30$		; AND
   4619	007356	013737 	000562'	000552'		MOV	.SYIBF+0,.SYIFN+14 ; PUT IN OUR
   4620	007364	113737 	000564'	000554'		MOVB	.SYIBF+2,.SYIFN+16 ; FILENAME BLOCK.
   4621	007372					DIR$	#DDLFNA		; FIND FILE IN DIRECTORY.
	007372	012746 	000464'			MOV	#DDLFNA,-(SP)
	007376	104375 				EMT	375
   4622	007400	103443 				BCS	30$
   4623	007402	105737 	000522'			TSTB	.SYSTA
   4624	007406	002432 				BLT	20$
   4625	007410					DIR$	#DDLACR		; ACCESS FILE TO READ.
	007410	012746 	000514'			MOV	#DDLACR,-(SP)
	007414	104375 				EMT	375
   4626	007416	103434 				BCS	30$
   4627	007420	105737 	000522'			TSTB	.SYSTA
   4628	007424	002412 				BLT	10$		; FILE CAN'T BE READ
   4629	007426	105237 	000526'			INCB	.SYISW		; INPUT FILE IS NOW OPEN.
   4630	007432	005037 	000560'			CLR	.SYIVB+2	; NO BLOCK OR
   4631	007436	005037 	000556'			CLR	.SYIVB
   4632	007442	005037 	000530'			CLR	.SYIRC		; RECORD READ YET.
   4633	007446					CALLR	$READ		; READ FIRST BLOCK.
	007446	000137 	010254'			 JMP	$READ
   4634	007452	122737 	000000G	000522'	10$:	CMPB	#IE.NSF,.SYSTA	; IF FILENAME EXISTS BUT
   4635	007460	001013 				BNE	30$		; FILE DOESN'T, THEN
   4636	007462					CALL	$SETFN		; RESET FILE NAME BLOCK AND
	007462	004737 	007064'			 JSR	PC,$SETFN
   4637	007466					DIR$	#DDLRNA		; DELETE FILE NAME FROM DIRECTORY.
	007466	012746 	000542'			MOV	#DDLRNA,-(SP)
	007472	104375 				EMT	375
   4638	007474	122737 	000000G	000522'	20$:	CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND,
   4639	007502	001002 				BNE	30$		; LEAVE ERROR REPORT
   4640	007504	000261 				SEC			; TO CALLER.
   4641	007506					RETURN
	007506	000207 				 RTS	PC
   4642
   4643	007510				30$:	CALLR	$IOERR		; LOOKUP FAILED.
	007510	000137 	007126'			 JMP	$IOERR
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1113  11-NOV-81 11:25  PAGE 103
$LOOKUP	-- LOOK UP AN EXISTING FILE

   4645						.TITLE	KLIDN -- ENTER A FILE FOR OUTPUT
   4646	007514					IDENT$	5,0
						.IDENT	/005000/
   4647					;
   4648					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4649					;
   4650					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4651					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4652					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4653					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4654					;
   4655					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4656					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4657					; EQUIPMENT CORPORATION.
   4658					;
   4659					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4660					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4661					;
   4662					; VERSION 05-00
   4663					;
   4664					; ALAN D. PECKHAM  15-APR-77
   4665					;
   4666					; MODIFIED BY:
   4667					;
   4668					; FUNCTION: THIS ROUTINE CREATES A FILE AND ACCESSES IT FOR EXTENDING.
   4669					;  THE FILE IS ALLOCATED 1 BLOCK INITIALLY.
   4670					;
   4671					; LOCAL MACROS
   4672					;
   4673						.MCALL	GLUN$,QIOW$
   4674					;
   4675					; LOCAL DATA
   4676					;
   4677	000604					.PSECT	DATA,D
   4678	000604				DDNGLN:	GLUN$	SYOLUN,.SYOBF
	000604	   005 	   003 			.BYTE	5,3
	000606	000005 				.WORD	SYOLUN
	000610	001614'				.WORD	.SYOBF
   4679	000612				DDNCRE:	QIOW$	IO.CRE,SYFLUN,1,,.SYSTA,,<.SYFID,,BIT15,1>
	000612	   003 	   012 			.BYTE	3,$$$ARG
	000614	000000G				.WORD	IO.CRE
	000616	000006 				.WORD	SYFLUN
	000620	   001 	   000 			.BYTE	1,
	000622	000522'				.WORD	.SYSTA
	000624	000000 				.WORD
	000626	002614'				.WORD	.SYFID
	000630	000000 				.WORD
	000632	100000 				.WORD	BIT15
	000634	000001 				.WORD	1
   4680	000636				DDNENA:	QIOW$	IO.ENA,SYFLUN,1,,.SYSTA,,<,,,,,.SYFNB>
	000636	   003 	   014 			.BYTE	3,$$$ARG
	000640	000000G				.WORD	IO.ENA
	000642	000006 				.WORD	SYFLUN
	000644	   001 	   000 			.BYTE	1,
	000646	000522'				.WORD	.SYSTA
	000650	000000 				.WORD
	000652	000000 				.WORD
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1113  11-NOV-81 11:25  PAGE 103-1
$LOOKUP	-- LOOK UP AN EXISTING FILE

	000654	000000 				.WORD
	000656	000000 				.WORD
	000660	000000 				.WORD
	000662	000000 				.WORD
	000664	002614'				.WORD	.SYFNB
   4681	000666				DDNACE:	QIOW$	IO.ACE,SYOLUN,1,,.SYSTA,,<.SYFID,DDNRAT,,,BIT15>
	000666	   003 	   013 			.BYTE	3,$$$ARG
	000670	000000G				.WORD	IO.ACE
	000672	000005 				.WORD	SYOLUN
	000674	   001 	   000 			.BYTE	1,
	000676	000522'				.WORD	.SYSTA
	000700	000000 				.WORD
	000702	002614'				.WORD	.SYFID
	000704	000730'				.WORD	DDNRAT
	000706	000000 				.WORD
	000710	000000 				.WORD
	000712	100000 				.WORD	BIT15
   4682	000714				DDNDEL:	QIOW$	IO.DEL,SYOLUN,1
	000714	   003 	   006 			.BYTE	3,$$$ARG
	000716	000000G				.WORD	IO.DEL
	000720	000005 				.WORD	SYOLUN
	000722	   001 	   000 			.BYTE	1,
	000724	000000 				.WORD
	000726	000000 				.WORD
   4683	000730	   373 	   012 		DDNRAT:	.BYTE	-5,12		; READ FILE NAME
   4684	000732	001570'				.WORD	.SYOFN+00
   4685	000734	   377 	   002 			.BYTE	-1,2		; AND OWNER'S UIC
   4686	000736	001602'				.WORD	.SYOFN+12
   4687	000740	   000 	   000 			.BYTE	0,0		; END OF CONTROL LIST.
   4688	007514					.PSECT
KLIDN -- ENTER A FILE FOR OUTPU	MACRO M1113  11-NOV-81 11:25  PAGE 104
$ENTER	-- ENTER A NEW FILE

   4690						.SBTTL	$ENTER	-- ENTER A NEW FILE
   4691					;+
   4692					; ENTER A NEW FILE ONTO THE SYSTEM DEVICE AND OPEN IT FOR OUTPUT.
   4693					;
   4694					; INPUTS:
   4695					;	R0	- POINTER TO FILE NAME.
   4696					;
   4697					; OUTPUTS:
   4698					;	CARRY IS SET IF FILE WAS NOT CREATED AND MESSAGE IS DISPLAYED.
   4699					;	R0 IS DESTROYED IF ERROR OCCURS.
   4700					;-
   4701
   4702	007514				$ENTER::CALL	$SETFN		; TRANSFER FILE NAME.
	007514	004737 	007064'			 JSR	PC,$SETFN
   4703	007520					DIR$	#DDNGLN		; GET DEVICE NAME
	007520	012746 	000604'			MOV	#DDNGLN,-(SP)
	007524	104375 				EMT	375
   4704	007526	103464 				BCS	20$		; AND
   4705	007530	013737 	001614'	001604'		MOV	.SYOBF+0,.SYOFN+14 ; INSERT IT INTO
   4706	007536	113737 	001616'	001606'		MOVB	.SYOBF+2,.SYOFN+16 ; OUR OWN FILENAME BLOCK.
   4707	007544					DIR$	#DDNCRE		; CREATE NEW FILE AND ALLOCATE ONE BLOCK.
	007544	012746 	000612'			MOV	#DDNCRE,-(SP)
	007550	104375 				EMT	375
   4708	007552	103452 				BCS	20$		; IF SUCCESSFUL
   4709	007554	105737 	000522'			TSTB	.SYSTA
   4710	007560	002447 				BLT	20$
   4711	007562					DIR$	#DDNENA		; ENTER NAME IN DIRECTORY.
	007562	012746 	000636'			MOV	#DDNENA,-(SP)
	007566	104375 				EMT	375
   4712	007570	103434 				BCS	10$		; IF DIRECTORY OPERATION FAILED
   4713	007572	105737 	000522'			TSTB	.SYSTA		; WE MUST
   4714	007576	002431 				BLT	10$		; RELEASE THE FILE.
   4715	007600					DIR$	#DDNACE		; ACCESS THE FILE FOR EXTEND.
	007600	012746 	000666'			MOV	#DDNACE,-(SP)
	007604	104375 				EMT	375
   4716	007606	103434 				BCS	20$
   4717	007610	105737 	000522'			TSTB	.SYSTA
   4718	007614	002431 				BLT	20$
   4719	007616	105237 	000527'			INCB	.SYOSW		; OUTPUT FILE IS NOW OPEN.
   4720	007622	012737 	000001 	001612'		MOV	#1,.SYOVB+2	; WORKING ON FIRST BLOCK.
   4721	007630	005037 	001610'			CLR	.SYOVB
   4722	007634	012737 	001614'	001564'		MOV	#.SYOBF,.SYOBA	; INITIALIZE BLOCK
   4723	007642	012737 	001000 	001566'		MOV	#S.YOL,.SYOBC
   4724	007650	005037 	001562'			CLR	.SYORC		; AND RECORD COUNTS,
   4725	007654	005037 	002650'			CLR	.SYATT+2	; PLUS LARGEST RECORD SIZE.
   4726	007660					RETURN
	007660	000207 				 RTS	PC
   4727
   4728	007662				10$:	PUSH	$DSW
	007662	013746 	000000G			 MOV	$DSW,-(SP)
   4729	007666					DIR$	#DDNDEL		; DELETE FILE (NOT IN DIRECTORY).
	007666	012746 	000714'			MOV	#DDNDEL,-(SP)
	007672	104375 				EMT	375
   4730	007674					POP	$DSW
	007674	012637 	000000G			 MOV	(SP)+,$DSW
   4731	007700				20$:	CALLR	$IOERR		; ENTER FAILED.
	007700	000137 	007126'			 JMP	$IOERR
KLIDP -- FILE PURGE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 105
$ENTER	-- ENTER A NEW FILE

   4733						.TITLE	KLIDP -- FILE PURGE ROUTINE
   4734	007704					IDENT$	5,0
						.IDENT	/005000/
   4735					;
   4736					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4737					;
   4738					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4739					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4740					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4741					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4742					;
   4743					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4744					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4745					; EQUIPMENT CORPORATION.
   4746					;
   4747					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4748					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4749					;
   4750					; VERSION 05-00
   4751					;
   4752					; ALAN D. PECKHAM  15-APR-77
   4753					;
   4754					; MODIFIED BY:
   4755					;
   4756					; FUNCTION: THIS ROUTINE PURGES THE FILE CURRENTLY OPEN. THE
   4757					;  OUTPUT FILE IS MARKED FOR DELETION AND ITS FILE NAME
   4758					;  IS REMOVED FROM THE DIRECTORY.
   4759					;
   4760					; LOCAL MACROS
   4761					;
   4762						.MCALL	QIOW$
   4763					;
   4764					; LOCAL DATA
   4765					;
   4766	000742					.PSECT	DATA,D
   4767	000742				DDPDAI:	QIOW$	IO.DAC,SYILUN,1	; DE-ACCESS INPUT FILE.
	000742	   003 	   006 			.BYTE	3,$$$ARG
	000744	000000G				.WORD	IO.DAC
	000746	000004 				.WORD	SYILUN
	000750	   001 	   000 			.BYTE	1,
	000752	000000 				.WORD
	000754	000000 				.WORD
   4768	000756				DDPDEL:	QIOW$	IO.DEL,SYOLUN,1	; MARK OUTPUT FILE FOR DELETE.
	000756	   003 	   006 			.BYTE	3,$$$ARG
	000760	000000G				.WORD	IO.DEL
	000762	000005 				.WORD	SYOLUN
	000764	   001 	   000 			.BYTE	1,
	000766	000000 				.WORD
	000770	000000 				.WORD
   4769	000772				DDPDAO:	QIOW$	IO.DAC,SYOLUN,1	; DE-ACCESS OUTPUT FILE.
	000772	   003 	   006 			.BYTE	3,$$$ARG
	000774	000000G				.WORD	IO.DAC
	000776	000005 				.WORD	SYOLUN
	001000	   001 	   000 			.BYTE	1,
	001002	000000 				.WORD
	001004	000000 				.WORD
   4770	001006				DDPRNA:	QIOW$	IO.RNA,SYFLUN,1,,,,<,,,,,.SYFNB>
KLIDP -- FILE PURGE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 105-1
$ENTER	-- ENTER A NEW FILE

	001006	   003 	   014 			.BYTE	3,$$$ARG
	001010	000000G				.WORD	IO.RNA
	001012	000006 				.WORD	SYFLUN
	001014	   001 	   000 			.BYTE	1,
	001016	000000 				.WORD
	001020	000000 				.WORD
	001022	000000 				.WORD
	001024	000000 				.WORD
	001026	000000 				.WORD
	001030	000000 				.WORD
	001032	000000 				.WORD
	001034	002614'				.WORD	.SYFNB
   4771									; REMOVE OUTPUT FILENAME FROM DIRECTORY.
   4772	007704					.PSECT
KLIDP -- FILE PURGE ROUTINE	MACRO M1113  11-NOV-81 11:25  PAGE 106
$PURGE	-- PURGE FILES CURRENTLY OPEN

   4774						.SBTTL	$PURGE	-- PURGE FILES CURRENTLY OPEN
   4775					;+
   4776					; CLOSE THE INPUT FILE AND DELETE THE CURRENT OUTPUT FILE.
   4777					; ALL ERRORS ARE IGNORED AND THE LUNS ARE ASSUMED FREED.
   4778					;
   4779					; NO INPUTS OR OUTPUTS
   4780					;-
   4781
   4782	007704	105737 	000526'		$PURGE::TSTB	.SYISW		; IF INPUT FILE NOT OPEN
   4783	007710	001405 				BEQ	10$		; LEAVE IT ALONE.
   4784	007712					DIR$	#DDPDAI		; DE-ACCESS THE INPUT FILE.
	007712	012746 	000742'			MOV	#DDPDAI,-(SP)
	007716	104375 				EMT	375
   4785	007720	105037 	000526'			CLRB	.SYISW		; INPUT FILE NOW CLOSED.
   4786	007724	105737 	000527'		10$:	TSTB	.SYOSW		; IF OUTPUT FILE NO OPEN
   4787	007730	001421 				BEQ	20$		; LEAVE IT ALONE.
   4788	007732					DIR$	#DDPDEL		; MARK FOR DELETION AND
	007732	012746 	000756'			MOV	#DDPDEL,-(SP)
	007736	104375 				EMT	375
   4789	007740					DIR$	#DDPDAO		; DE-ACCESS THE OUTPUT FILE.
	007740	012746 	000772'			MOV	#DDPDAO,-(SP)
	007744	104375 				EMT	375
   4790	007746					PUSH	R0
	007746	010046 				 MOV	R0,-(SP)
   4791	007750	012700 	001570'			MOV	#.SYOFN,R0	; GET THE FILE NAME
   4792	007754					CALL	$SETFN		; AND
	007754	004737 	007064'			 JSR	PC,$SETFN
   4793	007760					POP	R0
	007760	012600 				 MOV	(SP)+,R0
   4794	007762					DIR$	#DDPRNA		; REMOVE FROM THE DIRECTORY.
	007762	012746 	001006'			MOV	#DDPRNA,-(SP)
	007766	104375 				EMT	375
   4795	007770	105037 	000527'			CLRB	.SYOSW		; OUTPUT FILE NOW CLOSED.
   4796	007774				20$:	RETURN
	007774	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 107
$PURGE	-- PURGE FILES CURRENTLY OPEN

   4798						.TITLE	KLIDR -- RECORD READ ROUTINES
   4799	007776					IDENT$	5,0
						.IDENT	/005000/
   4800					;
   4801					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4802					;
   4803					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4804					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4805					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4806					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4807					;
   4808					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4809					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4810					; EQUIPMENT CORPORATION.
   4811					;
   4812					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4813					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   4814					;
   4815					; VERSION 05-00
   4816					;
   4817					; ALAN D. PECKHAM  15-APR-77
   4818					;
   4819					; MODIFIED BY:
   4820					;
   4821					; FUNCTION: THIS MODULE CONTAINS ROUTINES WHICH FACILITATE THE
   4822					;  READING OF RSX-BINARY RECORDS FROM THE CURRENTLY
   4823					;  OPEN FILE.
   4824					;
   4825					; LOCAL MACROS
   4826					;
   4827						.MCALL	QIOW$S
   4828					;
   4829					; LOCAL DATA
   4830					;
   4831	002165					.PSECT	TEXT,D
   4832	002165				TDRRDE:
   4833	002165					ERROR	<READ ERROR>
	002165	   077 	   040 	   122 		 .ASCIZ	\? READ ERROR\
	002170	   105 	   101 	   104
	002173	   040 	   105 	   122
	002176	   122 	   117 	   122
	002201	   000
   4834	002202				TDRRLE:
   4835	002202					ERROR	<INPUT RECORD LENGTH ERROR>
	002202	   077 	   040 	   111 		 .ASCIZ	\? INPUT RECORD LENGTH ERROR\
	002205	   116 	   120 	   125
	002210	   124 	   040 	   122
	002213	   105 	   103 	   117
	002216	   122 	   104 	   040
	002221	   114 	   105 	   116
	002224	   107 	   124 	   110
	002227	   040 	   105 	   122
	002232	   122 	   117 	   122
	002235	   000
   4836	007776					.PSECT
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 108
$READC	-- START READING A RECORD

   4838						.SBTTL	$READC	-- START READING A RECORD
   4839					;+
   4840					; READ THE RECORD TYPE FOR THE NEXT RECORD. IF THE PREVIOUS RECORD
   4841					; HAS NOT BEEN TOTALLY READ IN, SIGNAL ERROR. SAVE THE BYTE COUNT
   4842					; TO KEEP TRACK OF HOW MANY BYTES OF THE RECORD HAVE BEEN READ.
   4843					;
   4844					; NO INPUTS:
   4845					;
   4846					; OUTPUTS:
   4847					;	R0	- TYPE CODE OF NEW RECORD.
   4848					;	.SYIRC	- COUNT OF BYTES REMAINING IN RECORD.
   4849					;	CARRY IS SET IF LENGTH OR READ ERROR AND MESSAGE IS DISPLAYED.
   4850					;-
   4851
   4852	007776				$READC::
   4853	007776	005737 	000530'			TST	.SYIRC		; IF LAST RECORD IS NOT FINISHED,
   4854	010002	001116 				BNE	LDRER		; THEN ERROR.
   4855	010004				10$:
   4856	010004	012737 	000003 	000530'		MOV	#3,.SYIRC	; SET UP DUMMY COUNT AND
   4857	010012					CALL	$READW		; READ IN BYTE COUNT FOR NEXT RECORD.
	010012	004737 	010104'			 JSR	PC,$READW
   4858	010016	103405 				BCS	20$
   4859	010020	010037 	000530'			MOV	R0,.SYIRC	; STORE BYTE COUNT AND
   4860	010024	001767 				BEQ	10$		; (NULL RECORD)
   4861	010026					CALLR	$READW		; READ IN NEXT WORD.
	010026	000137 	010104'			 JMP	$READW
   4862						;
   4863	010032				20$:
   4864	010032					RETURN
	010032	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 109
$READS	-- SKIP THE CURRENT RECORD

   4866						.SBTTL	$READS	-- SKIP THE CURRENT RECORD
   4867					;+
   4868					; SKIP OVER THE REST OF THE CURRENT AND POSITION TO THE NEXT RECORD.
   4869					; IF NO RECORD IS BEING PROCESSED (RECORD COUNT=0), NO ACTION IS TAKEN.
   4870					;
   4871					; NO INPUTS
   4872					;
   4873					; OUTPUTS:
   4874					;	CARRY IS SET IF ERROR DURING READ AND MESSAGE IS DISPLAYED.
   4875					;-
   4876
   4877	010034				$READS::
   4878	010034	023737 	000530'	000534'		CMP	.SYIRC,.SYIBC	; IF RECORD IS WITHIN BLOCK
   4879	010042	003407 				BLE	10$		; THEN GO PAST IT,
   4880	010044	163737 	000534'	000530'		SUB	.SYIBC,.SYIRC	; OTHERWISE PASS PART OF THE RECORD,
   4881	010052					CALL	$READ		; GET NEXT BLOCK,
	010052	004737 	010254'			 JSR	PC,$READ
   4882	010056	103366 				BCC	$READS		; AND SEE IF RECORD IS DEPLETED.
   4883	010060					RETURN
	010060	000207 				 RTS	PC
   4884	010062				10$:
   4885	010062	063737 	000530'	000532'		ADD	.SYIRC,.SYIBA	; PUSH POINTERS PAST RECORD.
   4886	010070	163737 	000530'	000534'		SUB	.SYIRC,.SYIBC
   4887	010076	005037 	000530'			CLR	.SYIRC		; NO MORE RECORD !
   4888	010102					RETURN
	010102	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 110
$READW	-- READ A WORD

   4890						.SBTTL	$READW	-- READ A WORD
   4891					;+
   4892					; READ THE NEXT WORD FROM THE CURRENT RECORD. IF CURRENTLY ON
   4893					; AN ODD BOUNDARY, SKIP OVER THE CURRENT BYTE TO MAKE IT EVEN.
   4894					;
   4895					; NO INPUTS
   4896					;
   4897					; OUTPUTS:
   4898					;	R0	- THE WORD READ.
   4899					;	CARRY IS SET ON RECORD OVERRUN OR READ ERROR AND MESSAGE IS DISPLAYED.
   4900					;-
   4901
   4902	010104				$READW::
   4903	010104	032737 	000001 	000532'		BIT	#1,.SYIBA	; MAKE SURE WE ARE
   4904	010112	001406 				BEQ	10$		; ON A WORD BOUNDARY.
   4905	010114	005337 	000530'			DEC	.SYIRC
   4906	010120	005237 	000532'			INC	.SYIBA
   4907	010124	005337 	000534'			DEC	.SYIBC
   4908	010130				10$:
   4909	010130	162737 	000002 	000530'		SUB	#2,.SYIRC	; UPDATE RECORD COUNT AND
   4910	010136	002440 				BLT	LDRER		; IF IT BOTTOMS, ERROR.
   4911	010140	005737 	000534'			TST	.SYIBC		; IF WE ARE AT THE END
   4912	010144	003003 				BGT	20$		; OF THE BUFFER
   4913	010146					CALL	$READ		; THEN READ ANOTHER ONE.
	010146	004737 	010254'			 JSR	PC,$READ
   4914	010152	103411 				BCS	30$
   4915	010154				20$:
   4916	010154	017700 	000532'			MOV	@.SYIBA,R0	; PICK UP WORD
   4917	010160	062737 	000002 	000532'		ADD	#2,.SYIBA	; BUMP ADDRESS
   4918	010166	162737 	000002 	000534'		SUB	#2,.SYIBC	; AND BYTE COUNT.
   4919	010174	000241 				CLC
   4920	010176				30$:
   4921	010176					RETURN
	010176	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 111
$READB	-- READ A BYTE

   4923						.SBTTL	$READB	-- READ A BYTE
   4924					;+
   4925					; READ THE NEXT BYTE FROM THE CURRENT RECORD.
   4926					;
   4927					; NO INPUTS
   4928					;
   4929					; OUTPUTS:
   4930					;	R0	- THE BYTE READ.
   4931					;	CARRY IS SET ON RECORD OVERRUN OR READ ERROR AND A MESSAGE IS DISPLAYED.
   4932					;-
   4933
   4934	010200				$READB::
   4935	010200	005337 	000530'			DEC	.SYIRC		; UPDATE RECORD COUNT AND
   4936	010204	002415 				BLT	LDRER		; IF IT BOTTOMS, ERROR.
   4937	010206	005737 	000534'			TST	.SYIBC		; IF WE ARE AT THE END
   4938	010212	003003 				BGT	10$		; OF THE BUFFER
   4939	010214					CALL	$READ		; THEN READ ANOTHER ONE.
	010214	004737 	010254'			 JSR	PC,$READ
   4940	010220	103406 				BCS	20$
   4941	010222				10$:
   4942	010222	117700 	000532'			MOVB	@.SYIBA,R0	; PICK UP BYTE
   4943	010226	005237 	000532'			INC	.SYIBA		; BUMP ADDRESS
   4944	010232	005337 	000534'			DEC	.SYIBC		; AND BYTE COUNT.
   4945	010236				20$:
   4946	010236					RETURN
	010236	000207 				 RTS	PC
   4947
   4948	010240				LDRER:
   4949	010240					PRINT	#TDRRLE		; RECORD OVERRUN OR UNDERRUN.
	010240	012700 	002202'			 MOV	#TDRRLE,R0
	010244	004737 	027034'			 JSR	PC,$TTMSG
   4950	010250	000261 				SEC
   4951	010252					RETURN
	010252	000207 				 RTS	PC
KLIDR -- RECORD READ ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 112
$READ	-- READ NEXT VIRTUAL BLOCK

   4953						.SBTTL	$READ	-- READ NEXT VIRTUAL BLOCK
   4954					;+
   4955					; READ THE NEXT BLOCK FROM THE SYSTEM DEVICE AND RESET BUFFER PARAMETERS.
   4956					;
   4957					; NO INPUTS
   4958					;
   4959					; OUTPUTS:
   4960					;	.SYIBA	- POINTS TO THE BEGINING OF THE BUFFER READ.
   4961					;	.SYIBC	- COUNT OF BYTES READ.
   4962					;	CARRY IS SET ON READ ERROR AND MESSAGE IS DISPLAYED.
   4963					;-
   4964
   4965	010254				$READ::
   4966	010254	062737 	000001 	000560'		ADD	#1,.SYIVB+2	; GET NEXT BLOCK.
   4967	010262	005537 	000556'			ADC	.SYIVB
   4968
   4969					;	READ VIRTUAL BLOCK
   4970
   4971	010266					QIOW$S	#IO.RVB,#SYILUN,#1,,#.SYSTA,,<#.SYIBF,#S.YIL,,.SYIVB,.SYIVB+2>
	010266	013746 	000560'			MOV	.SYIVB+2,-(SP)
	010272	013746 	000556'			MOV	.SYIVB,-(SP)
	010276	005046 				CLR	-(SP)
	010300	012746 	001000 			MOV	#S.YIL,-(SP)
	010304	012746 	000562'			MOV	#.SYIBF,-(SP)
	010310	005046 				CLR	-(SP)
	010312	012746 	000522'			MOV	#.SYSTA,-(SP)
	010316	005046 				CLR	-(SP)
	010320	112716 	000001 			MOVB	#1,(SP)
	010324	012746 	000004 			MOV	#SYILUN,-(SP)
	010330	012746 	000000G			MOV	#IO.RVB,-(SP)
	010334	012746 				MOV	(PC)+,-(SP)
	010336	   003 	   013 			.BYTE	3,$$$T1
	010340	104375 				EMT	375
   4972	010342	103412 				BCS	10$
   4973	010344	105737 	000522'			TSTB	.SYSTA
   4974	010350	002407 				BLT	10$		; READ FAILED.
   4975	010352	012737 	000562'	000532'		MOV	#.SYIBF,.SYIBA	; SAVE BUFFER ADR
   4976	010360	013737 	000524'	000534'		MOV	.SYSTA+2,.SYIBC	; AND BYTE COUNT
   4977	010366					RETURN
	010366	000207 				 RTS	PC
   4978
   4979	010370				10$:
   4980	010370					PRINT	#TDRRDE		; PRINT ERROR MESSAGE.
	010370	012700 	002165'			 MOV	#TDRRDE,R0
	010374	004737 	027034'			 JSR	PC,$TTMSG
   4981	010400	000261 				SEC
   4982	010402					RETURN
	010402	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 113
$READ	-- READ NEXT VIRTUAL BLOCK

   4984						.TITLE	KLIDW -- RECORD WRITE ROUTINES
   4985	010404					IDENT$	5,0
						.IDENT	/005000/
   4986					;
   4987					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   4988					;
   4989					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   4990					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   4991					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   4992					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   4993					;
   4994					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   4995					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   4996					; EQUIPMENT CORPORATION.
   4997					;
   4998					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   4999					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5000					;
   5001					; VERSION 05-00
   5002					;
   5003					; ALAN D. PECKHAM  15-APR-77
   5004					;
   5005					; MODIFIED BY:
   5006					;
   5007					; FUNCTION: THIS MODULE CONTAINS ROUTINES WHICH FACILITATE THE
   5008					;  WRITING OF RSX-BINARY RECORDS TO THE CURRENTLY
   5009					;  OPEN FILE.
   5010					;
   5011					; LOCAL MACROS
   5012					;
   5013						.MCALL	QIOW$S
   5014					;
   5015					; LOCAL DATA
   5016					;
   5017	002236					.PSECT	TEXT,D
   5018	002236				TDWWRE:
   5019	002236					ERROR	<WRITE ERROR>
	002236	   077 	   040 	   127 		 .ASCIZ	\? WRITE ERROR\
	002241	   122 	   111 	   124
	002244	   105 	   040 	   105
	002247	   122 	   122 	   117
	002252	   122 	   000
   5020	002254				TDWRLE:
   5021	002254					ERROR	<OUTPUT RECORD LENGTH ERROR>
	002254	   077 	   040 	   117 		 .ASCIZ	\? OUTPUT RECORD LENGTH ERROR\
	002257	   125 	   124 	   120
	002262	   125 	   124 	   040
	002265	   122 	   105 	   103
	002270	   117 	   122 	   104
	002273	   040 	   114 	   105
	002276	   116 	   107 	   124
	002301	   110 	   040 	   105
	002304	   122 	   122 	   117
	002307	   122 	   000
   5022	010404					.PSECT
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 114
$WRITC	-- START WRITING A RECORD

   5024						.SBTTL	$WRITC	-- START WRITING A RECORD
   5025					;+
   5026					; START WRITING A RECORD OF GIVEN LENGTH. IF PREVIOUS RECORD UNFINISHED
   5027					; THE SIGNAL ERROR.
   5028					;
   5029					; INPUTS:
   5030					;	R0	- LENGTH OF RECORD TO BE WRITTEN.
   5031					;
   5032					; OUTPUTS:
   5033					;	CARRY SET IF LAST RECORD UNFINISHED OR WRITE ERROR AND MESSAGE
   5034					;	IS DISPLAYED.
   5035					;-
   5036
   5037	010404				$WRITC::
   5038	010404	005737 	001562'			TST	.SYORC		; IF LAST RECORD NOT FINISHED
   5039	010410	001034 				BNE	LDWER		; SIGNAL ERROR.
   5040	010412	020037 	002650'			CMP	R0,.SYATT+2	; CHECK IF LARGEST RECORD WRITTEN
   5041	010416	101402 				BLOS	10$		; AND
   5042	010420	010037 	002650'			MOV	R0,.SYATT+2	; RECORD IF LARGER.
   5043	010424				10$:
   5044	010424	012737 	000003 	001562'		MOV	#3,.SYORC	; SET UP DUMMY COUNT,
   5045	010432					CALL	$WRITW		; WRITE IN BYTE COUNT FOR NEXT RECORD,
	010432	004737 	010516'			 JSR	PC,$WRITW
   5046	010436	103402 				BCS	20$
   5047	010440	010037 	001562'			MOV	R0,.SYORC	; AND SAVE FOR RECORD COUNT.
   5048	010444				20$:
   5049	010444					RETURN
	010444	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 115
$WRITS	-- ZERO REMAINDER OF CURRENT BLOCK

   5051						.SBTTL	$WRITS	-- ZERO REMAINDER OF CURRENT BLOCK
   5052					;+
   5053					; CLEAR OUT THE REST OF THE CURRENT BLOCK AND WRITE IT. THIS ROUTINE IS
   5054					; USED TO WRITE OUT THE LAST RECORD INTO THE OUTPUT FILE.
   5055					;
   5056					; NO INPUTS
   5057					;
   5058					; OUTPUTS:
   5059					;	CARRY IS SET IF LAST RECORD IS UNFINISHED OR WRITE ERROR AND
   5060					;	MESSAGE IS DISPLAYED.
   5061					;-
   5062
   5063	010446				$WRITS::
   5064	010446	005737 	001562'			TST	.SYORC		; IF RECORD NOT FINISHED
   5065	010452	001013 				BNE	LDWER		; THEN THERE IS PROBLEM.
   5066	010454				10$:
   5067	010454	022737 	000777 	001566'		CMP	#S.YOL-1,.SYOBC	; ARE WE AT NEW PAGE ?
   5068	010462	003406 				BLE	20$		; YES, QUIT (CARRY IS CLEAR)
   5069	010464	005237 	001562'			INC	.SYORC		; SET UP DUMMY COUNT
   5070	010470	005000 				CLR	R0		; AND WRITE A ZERO
   5071	010472					CALL	$WRITB
	010472	004737 	010612'			 JSR	PC,$WRITB
   5072	010476	103366 				BCC	10$		; AND CHECK AGAIN.
   5073	010500				20$:
   5074	010500					RETURN
	010500	000207 				 RTS	PC
   5075
   5076	010502				LDWER:
   5077	010502					PRINT	#TDWRLE		; RECORD OVERRUN OR UNDERRUN.
	010502	012700 	002254'			 MOV	#TDWRLE,R0
	010506	004737 	027034'			 JSR	PC,$TTMSG
   5078	010512	000261 				SEC
   5079	010514					RETURN
	010514	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 116
$WRITW	-- WRITE A WORD

   5081						.SBTTL	$WRITW	-- WRITE A WORD
   5082					;+
   5083					; WRITE THE NEXT WORD INTO THE OUTPUT RECORD. IF ON AN ODD BOUNDRY
   5084					; THE SKIP A BYTE TO WRITE THE WORD ON AN EVEN WORD. SIGNAL ERROR
   5085					; IF RECORD OVERFLOW.
   5086					;
   5087					; INPUTS:
   5088					;	R0	- THE WORD TO WRITE.
   5089					;
   5090					; OUTPUTS:
   5091					;	CARRY IS SET IF WRITE ERROR AND MESSAGE IS DISPLAYED.
   5092					;-
   5093
   5094	010516				$WRITW::
   5095	010516	032737 	000001 	001564'		BIT	#1,.SYOBA	; MAKE SURE WE ARE
   5096	010524	001406 				BEQ	10$		; ON A WORD BOUNDRY.
   5097	010526	005337 	001562'			DEC	.SYORC
   5098	010532	005237 	001564'			INC	.SYOBA
   5099	010536	005337 	001566'			DEC	.SYOBC
   5100	010542				10$:
   5101	010542	162737 	000002 	001562'		SUB	#2,.SYORC	; UPDATE RECORD COUNT AND
   5102	010550	002754 				BLT	LDWER		; IF IT BOTTOMS, ERROR.
   5103	010552	005737 	001566'			TST	.SYOBC		; IF WE ARE AT THE END
   5104	010556	003003 				BGT	20$		; OF THE BUFFER
   5105	010560					CALL	$WRITE		; THEN WRITE IT.
	010560	004737 	010652'			 JSR	PC,$WRITE
   5106	010564	103411 				BCS	30$
   5107	010566				20$:
   5108	010566	010077 	001564'			MOV	R0,@.SYOBA	; STICK IN WORD
   5109	010572	062737 	000002 	001564'		ADD	#2,.SYOBA	; BUMP ADDRESS
   5110	010600	162737 	000002 	001566'		SUB	#2,.SYOBC	; AND BYTE COUNT.
   5111	010606	000241 				CLC
   5112	010610				30$:
   5113	010610					RETURN
	010610	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 117
$WRITB	-- WRITE A BYTE

   5115						.SBTTL	$WRITB	-- WRITE A BYTE
   5116					;+
   5117					; WRITE A BYTE INTO THE CURRENT RECORD. SIGNAL ERROR IF RECORD OVERFLOW.
   5118					;
   5119					; INPUTS:
   5120					;	R0	- BYTE TO WRITE.
   5121					;
   5122					; OUTPUTS:
   5123					;	CARRY IS SET IF RECORD OVERFLOW OR WRITE ERROR AND MESSAGE
   5124					;	IS DISPLAYED.
   5125					;-
   5126
   5127	010612				$WRITB::
   5128	010612	005337 	001562'			DEC	.SYORC		; UPDATE RECORD COUNT AND
   5129	010616	002731 				BLT	LDWER		; IF IT BOTTOMS, ERROR.
   5130	010620	005737 	001566'			TST	.SYOBC		; IF WE ARE AT THE END
   5131	010624	003003 				BGT	10$		; OF THE BUFFER
   5132	010626					CALL	$WRITE		; THEN WRITE IT.
	010626	004737 	010652'			 JSR	PC,$WRITE
   5133	010632	103406 				BCS	20$
   5134	010634				10$:
   5135	010634	110077 	001564'			MOVB	R0,@.SYOBA	; STICK IN BYTE
   5136	010640	005237 	001564'			INC	.SYOBA		; BUMP ADDRESS
   5137	010644	005337 	001566'			DEC	.SYOBC		; AND BYTE COUNT.
   5138	010650				20$:
   5139	010650					RETURN
	010650	000207 				 RTS	PC
KLIDW -- RECORD WRITE ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 118
$WRITE	-- WRITE NEXT VIRTUAL BLOCK

   5141						.SBTTL	$WRITE	-- WRITE NEXT VIRTUAL BLOCK
   5142					;+
   5143					; WRITE THE NEXT BLOCK TO THE OUTPUT FILE. IF END-OF-FILE, THEN
   5144					; EXTEND THE FILE AND TRY TO WRITE THE BLOCK AGAIN.
   5145					;
   5146					; INPUTS:
   5147					;	.SYOBF	- BLOCK OF "S.YOL" BYTES TO WRITE.
   5148					;
   5149					; OUTPUTS:
   5150					;	.SYOBA	- ADDRESS OF NEW BUFFER TO FILL
   5151					;	.SYOBC	- SIZE OF BUFFER IN BYTES.
   5152					;	CARRY IS SET ON WRITE OR EXTEND ERROR AND MESSAGE IS DISPLAYED.
   5153					;-
   5154
   5155	010652				$WRITE::
   5156	010652					QIOW$S	#IO.WVB,#SYOLUN,#1,,#.SYSTA,,<#.SYOBF,#S.YOL,,.SYOVB,.SYOVB+2>
	010652	013746 	001612'			MOV	.SYOVB+2,-(SP)
	010656	013746 	001610'			MOV	.SYOVB,-(SP)
	010662	005046 				CLR	-(SP)
	010664	012746 	001000 			MOV	#S.YOL,-(SP)
	010670	012746 	001614'			MOV	#.SYOBF,-(SP)
	010674	005046 				CLR	-(SP)
	010676	012746 	000522'			MOV	#.SYSTA,-(SP)
	010702	005046 				CLR	-(SP)
	010704	112716 	000001 			MOVB	#1,(SP)
	010710	012746 	000005 			MOV	#SYOLUN,-(SP)
	010714	012746 	000000G			MOV	#IO.WVB,-(SP)
	010720	012746 				MOV	(PC)+,-(SP)
	010722	   003 	   013 			.BYTE	3,$$$T1
	010724	104375 				EMT	375
   5157	010726	103427 				BCS	20$
   5158	010730	105737 	000522'			TSTB	.SYSTA
   5159	010734	002414 				BLT	10$		; WRITE FAILED.
   5160	010736	062737 	000001 	001612'		ADD	#1,.SYOVB+2	; SET UP FOR NEXT BLOCK.
   5161	010744	005537 	001610'			ADC	.SYOVB		; (CARRY SHOULD BE CLEAR)
   5162	010750	012737 	001614'	001564'		MOV	#.SYOBF,.SYOBA	; RESET BUFFER ADDRESS
   5163	010756	012737 	001000 	001566'		MOV	#S.YOL,.SYOBC	; AND BYTE COUNT.
   5164	010764					RETURN
	010764	000207 				 RTS	PC
   5165	010766				10$:
   5166	010766	122737 	000000G	000522'		CMPB	#IE.EOF,.SYSTA	; IS THE FILE TOO SMALL ?
   5167	010774	001004 				BNE	20$		; NO, THIS IS TRULY AN ERROR.
   5168	010776					CALL	$EXTEND		; OTHERWISE EXTEND THE FILE
	010776	004737 	011022'			 JSR	PC,$EXTEND
   5169	011002	103323 				BCC	$WRITE		; AND WRITE THE BLOCK AGAIN.
   5170	011004					RETURN
	011004	000207 				 RTS	PC
   5171	011006				20$:
   5172	011006					PRINT	#TDWWRE		; PRINT IT.
	011006	012700 	002236'			 MOV	#TDWWRE,R0
	011012	004737 	027034'			 JSR	PC,$TTMSG
   5173	011016	000261 				SEC
   5174	011020					RETURN
	011020	000207 				 RTS	PC
KLIDX -- EXTEND AN OUTPUT FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 119
$WRITE	-- WRITE NEXT VIRTUAL BLOCK

   5176						.TITLE	KLIDX -- EXTEND AN OUTPUT FILE BY ONE BLOCK
   5177	011022					IDENT$	5,0
						.IDENT	/005000/
   5178					;
   5179					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5180					;
   5181					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5182					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5183					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5184					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5185					;
   5186					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5187					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5188					; EQUIPMENT CORPORATION.
   5189					;
   5190					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5191					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5192					;
   5193					; VERSION 05-00
   5194					;
   5195					; ALAN D. PECKHAM  15-APR-77
   5196					;
   5197					; MODIFIED BY:
   5198					;
   5199					; FUNCTION: THIS ROUTINE EXTENDS THE ALLOCATION OF THE CURRENTLY OPEN
   5200					;  FILE BY ONE BLOCK.
   5201					;
   5202					; LOCAL MACROS
   5203					;
   5204						.MCALL	QIOW$
   5205					;
   5206					; LOCAL DATA
   5207					;
   5208	001036					.PSECT	DATA,D
   5209	001036				DDXEXT:	QIOW$	IO.EXT,SYOLUN,1,,.SYSTA,,<,,BIT15,1>
	001036	   003 	   012 			.BYTE	3,$$$ARG
	001040	000000G				.WORD	IO.EXT
	001042	000005 				.WORD	SYOLUN
	001044	   001 	   000 			.BYTE	1,
	001046	000522'				.WORD	.SYSTA
	001050	000000 				.WORD
	001052	000000 				.WORD
	001054	000000 				.WORD
	001056	100000 				.WORD	BIT15
	001060	000001 				.WORD	1
   5210	011022					.PSECT
KLIDX -- EXTEND AN OUTPUT FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 120
$EXTEND	-- EXTEND OUTPUT FILE BY ONE BLOCK

   5212						.SBTTL	$EXTEND	-- EXTEND OUTPUT FILE BY ONE BLOCK
   5213					;+
   5214					; EXTEND THE OUTPUT FILE BY ONE BLOCK.
   5215					;
   5216					; NO INPUTS
   5217					;
   5218					; OUTPUTS:
   5219					;	CARRY SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
   5220					;-
   5221
   5222	011022				$EXTEND::DIR$	#DDXEXT		; EXTEND THE FILE.
	011022	012746 	001036'			MOV	#DDXEXT,-(SP)
	011026	104375 				EMT	375
   5223	011030	103411 				BCS	10$
   5224	011032	105737 	000522'			TSTB	.SYSTA
   5225	011036	002406 				BLT	10$
   5226	011040	062737 	000001 	002654'		ADD	#1,.SYATT+6	; ONE MORE BLOCK ALLOCATED.
   5227	011046	005537 	002652'			ADC	.SYATT+4	; (CARRY SHOULD BE CLEAR)
   5228	011052					RETURN
	011052	000207 				 RTS	PC
   5229
   5230	011054	012700 	001570'		10$:	MOV	#.SYOFN,R0	; EXTEND FAILED.
   5231	011060					CALLR	$IOERR
	011060	000137 	007126'			 JMP	$IOERR
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 121
$EXTEND	-- EXTEND OUTPUT FILE BY ONE BLOCK

   5233						.TITLE	KLIFC -- C-RAM READ/WRITE
   5234	011064					IDENT$	5,0
						.IDENT	/005000/
   5235					;
   5236					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5237					;
   5238					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5239					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5240					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5241					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5242					;
   5243					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5244					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5245					; EQUIPMENT CORPORATION.
   5246					;
   5247					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5248					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5249					;
   5250					; VERSION 05-00
   5251					;
   5252					; ALAN D. PECKHAM  11-APR-77
   5253					;
   5254					; MODIFIED BY:
   5255					;
   5256					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO WORK ON THE C-RAMS.
   5257					;  THE C-RAM DATA IS WORKED WITH IN 6-WORD COMPRESSED FORMAT, AS
   5258					;  SPECIFIED IN THE KLDCP DOCUMENTATION.
   5259					;
   5260					; LOCAL DATA
   5261					;
   5262	001062					.PSECT	DATA,D
   5263	001062	147000 			DFCRFL:	.WORD	.RCRM1		; READ C-RAM BITS 0-19
   5264	001064	146000 				.WORD	.RCRM2		; READ C-RAM BITS 20-39
   5265	001066	145000 				.WORD	.RCRM3		; READ C-RAM BITS 40-59
   5266	001070	144000 				.WORD	.RCRM4		; READ C-RAM BITS 60-79
   5267	001072	057000 			DFCWFL:	.WORD	.LCRM1		; C-RAM WRITE FUNCTION LIST.
   5268	001074	056000 				.WORD	.LCRM2
   5269	001076	055000 				.WORD	.LCRM3
   5270	001100	054000 				.WORD	.LCRM4
   5271						.EVEN			; DFCBF MUST BE ON A WORD BOUNDRY.
   5272	001102				DFCBF:	WD36$	0 0		; DATA BUFFER.
	001102	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001105	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5273	001107	   000 			DFCFL2:	.BYTE	0
   5274	001110	   000 			DFCFL3:	.BYTE	0
   5275	001111				DFCABF:	WD36$	0 0		; WORK AREA.
	001111	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001114	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5276						.EVEN
   5277	011064					.PSECT
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 122
$WCRAM	-- WRITE C-RAM WORD

   5279						.SBTTL	$WCRAM	-- WRITE C-RAM WORD
   5280					;+
   5281					; WRITE COMPRESSED C-RAM WORD POINTED TO BY R1 TO C-RAM LOCATION
   5282					; ADDRESSED BY R0.
   5283					;
   5284					; INPUTS:
   5285					;	R1	- POINTER TO 6 WORDS OF DATA TO WRITE.
   5286					;	R0	- C-RAM ADDRESS TO WRITE TO.
   5287					;
   5288					; OUTPUT:
   5289					;	CARRY IS SET IF ERROR OCCURS.
   5290					;-
   5291
   5292	011064	004537 	023142'		$WCRAM::JSR	R5,$RSAVE
   5293	011070					TRACK	CW
	011070	004037 	011102'			 JSR	R0,64$
	011074	053503 				 .WORD	"CW
	011076	000000 				 .WORD
	011100	000000 				 .WORD
	011102	004737 	023210'		64$:	 JSR	PC,$TRACK
	011106	012600 				 MOV	(SP)+,R0
   5294	011110	010102 				MOV	R1,R2		; GET DATA ADDRESS
   5295	011112					CALL	$ACRAM		; WRITE C-RAM ADDRESS
	011112	004737 	011746'			 JSR	PC,$ACRAM
   5296	011116	103511 				BCS	70$		; RAM ERROR
   5297	011120	012704 	000006 			MOV	#6,R4		; 4 LOOPS PER C-RAM WORD
   5298	011124	005003 				CLR	R3		; CLEAR BOUNDRY FLAG
   5299	011126	012701 	001102'		10$:	MOV	#DFCBF,R1	; SET UP WORK AREA
   5300	011132	112221 				MOVB	(R2)+,(R1)+	; REAL DATA TO WORK AREA
   5301	011134	112221 				MOVB	(R2)+,(R1)+
   5302	011136	111221 				MOVB	@R2,(R1)+
   5303	011140	005703 				TST	R3		; SEE IF BITS ON WORD BOUNDARY
   5304	011142	001411 				BEQ	30$		; YES
   5305	011144	005202 				INC	R2		; INCREASE DTA ADR PTR
   5306	011146	012705 	000004 			MOV	#4,R5		; # OF SHIFTS REQUIRED
   5307	011152	012701 	001105'		20$:	MOV	#DFCBF+3,R1	; POINT TO TOP OF WORK AREA
   5308	011156	106041 				RORB	-(R1)		; RIGHT SHIFT ONE BYTE
   5309	011160	106041 				RORB	-(R1)
   5310	011162	106041 				RORB	-(R1)
   5311	011164	077506 				SOB	R5,20$		; LOOP BACK IF NOT DONE
   5312	011166	005103 			30$:	COM	R3		; CHANGE BOUNDARY FLAG
   5313	011170	042737 	177760 	001104'		BIC	#177760,DFCBF+2	; ONLY FOUR BITS COUNT
   5314	011176	013700 	001102'			MOV	DFCBF,R0	; GET UNPACED DATA
   5315	011202	113737 	001104'	001105'		MOVB	DFCBF+2,DFCBF+3	; PUT C-RAM 0-3 BITS INTO CORRECT CORE
   5316	011210	005001 				CLR	R1		; INIT R1
   5317	011212	000261 				SEC			; C-BIT IS SET AS A FLAG
   5318	011214	012705 	000005 		40$:	MOV	#5,R5		; 4 SHIFTS BETWEEN BALNKS
   5319	011220	006001 			50$:	ROR	R1		; NEW DATA LEFT END OF DESTINATION
   5320	011222	103406 				BCS	60$		; IF FLAG FALLS OUT, DONE
   5321	011224	006000 				ROR	R0		; ROTATE SOURCE BITS RIGHT
   5322	011226	077504 				SOB	R5,50$		; SHIFT 4 TIMES?
   5323	011230	006100 				ROL	R0		; REPAIR ANY DAMAGE
   5324	011232	000241 				CLC			; CLEAR C-BIT AS FLAG
   5325	011234	006001 				ROR	R1		; AND ROLL ZEROES
   5326	011236	000766 				BR	40$		; CONTINUE
   5327	011240	000241 			60$:	CLC			; CLEAR C-BIT AS FLAG
   5328	011242	006100 				ROL	R0		; BITS 4-7
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 122-1
$WCRAM	-- WRITE C-RAM WORD

   5329	011244	006100 				ROL	R0		; MUST BE CORRECTED
   5330	011246	010137 	001102'			MOV	R1,DFCBF	; BITS 8-19 INTO CORE
   5331	011252	110037 	001104'			MOVB	R0,DFCBF+2	; BITS 4-7 INTO CORE
   5332	011256	016400 	001072'			MOV	DFCWFL(R4),R0	; GET WRITE FUNCTION LIST
   5333	011262	012701 	001102'			MOV	#DFCBF,R1	; ADDRESS OF DATA
   5334	011266					CALL	$DFWR		; WRITE TO C-RAM
	011266	004737 	013336'			 JSR	PC,$DFWR
   5335	011272	103423 				BCS	70$		; TIME OUT ERROR
   5336	011274	162704 	000002 			SUB	#2,R4		; ENTIRE RAM WORD DONE?
   5337	011300	002312 				BGE	10$		; NOT YET
   5338	011302	111237 	001106'			MOVB	@R2,DFCBF+4	; GET DATA FOR DEPOSIT
   5339	011306	106237 	001106'			ASRB	DFCBF+4		; SHIFT DATA
   5340	011312	106037 	001105'			RORB	DFCBF+3		; TO EBUS BITS
   5341	011316	106237 	001106'			ASRB	DFCBF+4
   5342	011322	106037 	001105'			RORB	DFCBF+3
   5343	011326	012701 	001102'			MOV	#DFCBF,R1	; DATA ADDRESS IN R1
   5344	011332	012700 	053000 			MOV	#.LCRM5,R0	; DISP 00-04
   5345	011336					CALLR	$DFWR
	011336	000137 	013336'			 JMP	$DFWR
   5346	011342				70$:	RETURN
	011342	000207 				 RTS	PC
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 123
$RCRAM	-- READ C-RAM WORD

   5348						.SBTTL	$RCRAM	-- READ C-RAM WORD
   5349					;+
   5350					; READ C-RAM WORD ADDRESSED BY R0 AND COMPRESS IT INTO AREA POINTED
   5351					; TO BY R1.
   5352					;
   5353					; INPUTS:
   5354					;	R1	- 6 WORD BUFFER TO RECIEVE COMPRESSED C-RAM WORD.
   5355					;	R0	- C-RAM ADDRESS OF WORD TO READ.
   5356					;
   5357					; OUTPUT:
   5358					;	CARRY SET IF ERROR OCCURS.
   5359					;-
   5360
   5361	011344	004537 	023142'		$RCRAM::JSR	R5,$RSAVE
   5362	011350					TRACK	CR
	011350	004037 	011362'			 JSR	R0,64$
	011354	051103 				 .WORD	"CR
	011356	000000 				 .WORD
	011360	000000 				 .WORD
	011362	004737 	023210'		64$:	 JSR	PC,$TRACK
	011366	012600 				 MOV	(SP)+,R0
   5363	011370					CALL	$ACRAM		; SET EBOX TO C-RAM ADDRESS ZERO.
	011370	004737 	011746'			 JSR	PC,$ACRAM
   5364	011374	103421 				BCS	30$		; ERROR
   5365	011376	012700 	003000 			MOV	#.SECLK,R0	; SINGLE STEP EBUS CLOCK
   5366	011402					CALL	$DFXC
	011402	004737 	013540'			 JSR	PC,$DFXC
   5367	011406	103414 				BCS	30$		; ERROR
   5368	011410	016603 	000004 		10$:	MOV	4(SP),R3	; GET BUF ADR FOR C-RAM CONTENTS
   5369	011414	062703 	000012 			ADD	#12,R3		; POINT TO END.
   5370	011420	012704 	001062'			MOV	#DFCRFL,R4
   5371	011424	012400 			20$:	MOV	(R4)+,R0	; DIAG FUNCTIONS
   5372	011426	012701 	001102'			MOV	#DFCBF,R1	; DATA HOLDING AREA
   5373	011432					CALL	$DFRD		; READ DATA
	011432	004737 	013224'			 JSR	PC,$DFRD
   5374	011436	103002 				BCC	40$		; OK
   5375	011440	000137 	011744'		30$:	JMP	140$		; READ ERORR
   5376	011444	013701 	001102'		40$:	MOV	DFCBF,R1	; GET STRETCHED BITS 8-19
   5377	011450	013702 	001104'			MOV	DFCBF+2,R2	; GET STRETCHED BITS 0-7
   5378	011454	005000 				CLR	R0		; USE R0  AS WORK REG
   5379	011456	000261 				SEC			; SET C-BIT AS DONE BIT
   5380	011460	006000 				ROR	R0		; AND ROLL IT INTO R0
   5381	011462	012705 	000004 		50$:	MOV	#4,R5		; FOUR BITS PER GROUP
   5382	011466	005305 			60$:	DEC	R5		; DONE A GROUP?
   5383	011470	002405 				BLT	70$		; NO
   5384	011472	006202 				ASR	R2		; ROTATE SOURCE BITS RIGHT 1 PLACE
   5385	011474	006001 				ROR	R1		; ALL 20 OF THEM
   5386	011476	006000 				ROR	R0		; BEGIN WITH 1ST FLAG INTO R0
   5387	011500	103406 				BCS	80$		; IF C-BIT DETECTED, DONE
   5388	011502	000771 				BR	60$
   5389	011504	006202 			70$:	ASR	R2		; HERE TO SHIFT AWAY
   5390	011506	006001 				ROR	R1		; THE PAIR
   5391	011510	006202 				ASR	R2		; OF BLANKS HIDDEN
   5392	011512	006001 				ROR	R1		; AMIDST THE REAL DATA
   5393	011514	000762 				BR	50$		; AND CONTINUE
   5394	011516	006201 			80$:	ASR	R1		; MAKE LAST BLANKS TO GO AWAY
   5395	011520	006201 				ASR	R1
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 123-1
$RCRAM	-- READ C-RAM WORD

   5396	011522	010037 	001102'			MOV	R0,DFCBF
   5397	011526	010137 	001104'			MOV	R1,DFCBF+2	; STORE RESULTS IN CORE
   5398	011532	012700 	001105'			MOV	#DFCBF+3,R0	; ADDRESS OF DATA JUST READ
   5399	011536	114043 				MOVB	-(R0),-(R3)	; BITS 16-19 TO BUFFER
   5400	011540	105737 	001107'			TSTB	DFCFL2		; CHECK IF BOUNDARY IS RIGHT
   5401	011544	001005 				BNE	100$		; YES, GO FIX BOUNDARY
   5402	011546	114043 			90$:	MOVB	-(R0),-(R3)	; BITS 20-27 TO WORK AREA
   5403	011550	114043 				MOVB	-(R0),-(R3)	; BITS 28-35 TO WORK AREA
   5404	011552	105137 	001107'			COMB	DFCFL2		; CHANGE SIGNAL
   5405	011556	000722 				BR	20$		; GET MORE DATA
   5406	011560	106313 			100$:	ASLB	@R3		; FIX A HALF-BYTE
   5407	011562	106313 				ASLB	@R3
   5408	011564	106313 				ASLB	@R3
   5409	011566	106313 				ASLB	@R3
   5410	011570	012705 	000004 			MOV	#4,R5
   5411	011574	010302 			110$:	MOV	R3,R2		; ADDR OF DATA TO R2
   5412	011576	106122 				ROLB	(R2)+		; SHIFT INCLUDING C-BIT
   5413	011600	106122 				ROLB	(R2)+
   5414	011602	106122 				ROLB	(R2)+
   5415	011604	106122 				ROLB	(R2)+
   5416	011606	077506 				SOB	R5,110$		; ASSEMBLED COMPLETE HALF-BYTE
   5417	011610	105723 				TSTB	(R3)+		; FIX HOLDING AREA ADR
   5418	011612	105737 	001110'			TSTB	DFCFL3		; CHECK SIGNAL
   5419	011616	001003 				BNE	120$		; DONE IF MINUS
   5420	011620	105137 	001110'			COMB	DFCFL3
   5421	011624	000750 				BR	90$		; CONTINUE
   5422	011626	113743 	001103'		120$:	MOVB	DFCBF+1,-(R3)	; ENDING UP
   5423	011632	113743 	001102'			MOVB	DFCBF,-(R3)	; C-RAM BITS 0-15 TO BUFFER
   5424	011636	105037 	001110'			CLRB	DFCFL3		; RESET DFCFL3 TO ZERO
   5425	011642	105037 	001107'			CLRB	DFCFL2		; SAME TO DFCFL2
   5426	011646	012700 	141000 			MOV	#.RCSPF,R0	; READ SPEC FIELD FUNC
   5427	011652	012701 	001102'			MOV	#DFCBF,R1
   5428	011656					CALL	$DFRD		; READ DATA
	011656	004737 	013224'			 JSR	PC,$DFRD
   5429	011662	103430 				BCS	140$
   5430	011664	016100 	000004 			MOV	4(R1),R0	; GET DISP 00-02 - DEXWD1
   5431	011670	016101 	000002 			MOV	2(R1),R1	; GET DISP 03-04 - DEXWD2
   5432	011674	006101 				ROL	R1
   5433	011676	006100 				ROL	R0
   5434	011700	006101 				ROL	R1
   5435	011702	006100 				ROL	R0		; JUSTIFY IN R0
   5436	011704	042700 	177700 			BIC	#^C77,R0	; CLEAR TRASH
   5437	011710	105737 	000042'			TSTB	.EASW		; AND IF MODEL A CPU,
   5438	011714	003002 				BGT	130$
   5439	011716	042700 	177740 			BIC	#^C37,R0	; CLEAR MORE TRASH.
   5440	011722	016601 	000004 		130$:	MOV	4(SP),R1	; GET RECIEVING ADDRESS BACK.
   5441	011726	110061 	000012 			MOVB	R0,12(R1)	; SAVE IN BUFFER
   5442	011732	042721 	052525 			BIC	#052525,(R1)+	; CLEAR PARITY BITS
   5443	011736	042711 	000005 			BIC	#000005,(R1)
   5444	011742	000241 				CLC
   5445	011744				140$:	RETURN
	011744	000207 				 RTS	PC
KLIFC -- C-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 124
$ACRAM	-- ADDRESS C-RAM WORD

   5447						.SBTTL	$ACRAM	-- ADDRESS C-RAM WORD
   5448					;+
   5449					; SET THE M-BOX TO THE C-RAM ADDRESS SPECIFIED BY R0.
   5450					;
   5451					; INPUT:
   5452					;	R0	- ADDRESS OF C-RAM WORD TO ACCESS.
   5453					;
   5454					; OUTPUT:
   5455					;	CARRY SET IF ERROR OCCURS.
   5456					;-
   5457
   5458	011746				$ACRAM::PUSH	<R1,R0>
	011746	010146 				 MOV	R1,-(SP)
	011750	010046 				 MOV	R0,-(SP)
   5459	011752					TRACK	CA
	011752	004037 	011764'			 JSR	R0,64$
	011756	040503 				 .WORD	"CA
	011760	000000 				 .WORD
	011762	000000 				 .WORD
	011764	004737 	023210'		64$:	 JSR	PC,$TRACK
	011770	012600 				 MOV	(SP)+,R0
   5460	011772					CALL	$KLSR		; DO A SOFT RESET
	011772	004737 	015140'			 JSR	PC,$KLSR
   5461	011776	103423 				BCS	9$		; ERROR
   5462	012000	012701 	001111'			MOV	#DFCABF,R1
   5463	012004					CALL	LFCSAB		; LOAD EBUS BITS 00-05
	012004	004737 	012054'			 JSR	PC,LFCSAB
   5464	012010	012700 	052000 			MOV	#.LCRDL,R0	; CRAM DIAG ADR 00-04
   5465	012014					CALL	$DFWR		; DO A WRITE
	012014	004737 	013336'			 JSR	PC,$DFWR
   5466	012020	011600 				MOV	(SP),R0		; RESTORE C-RAM ADR
   5467	012022	103411 				BCS	9$		; ERROR
   5468	012024	000300 				SWAB	R0		; GET BITS 00-04
   5469	012026	006200 				ASR	R0		; TO LOW-ORDER BITS OF R0
   5470	012030	006200 				ASR	R0
   5471	012032					CALL	LFCSAB		; LOAD EBUS BITS 00-05
	012032	004737 	012054'			 JSR	PC,LFCSAB
   5472	012036	012700 	051000 			MOV	#.LCRDR,R0	; CRAM DIAG ADR 05-10
   5473	012042					CALL	$DFWR		; DO ANOTHER WRITE
	012042	004737 	013336'			 JSR	PC,$DFWR
   5474	012046				9$:	POP	<R0,R1>
	012046	012600 				 MOV	(SP)+,R0
	012050	012601 				 MOV	(SP)+,R1
   5475	012052					RETURN
	012052	000207 				 RTS	PC
   5476
   5477	012054	042700 	000077 		LFCSAB:	BIC	#77,R0		; DEAL ONLY WITH 6 BITS
   5478	012060	110037 	001114'			MOVB	R0,DFCABF+3	; TO EBUS BITS 4 & 5
   5479	012064	000300 				SWAB	R0
   5480	012066	110037 	001115'			MOVB	R0,DFCABF+4	; TO EBUS BITS 0,1,2, AND 3
   5481	012072					RETURN
	012072	000207 				 RTS	PC
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 125
$ACRAM	-- ADDRESS C-RAM WORD

   5483						.TITLE	KLIFD -- D-RAM READ/WRITE
   5484	012074					IDENT$	5,0
						.IDENT	/005000/
   5485					;
   5486					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5487					;
   5488					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5489					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5490					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5491					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5492					;
   5493					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5494					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5495					; EQUIPMENT CORPORATION.
   5496					;
   5497					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5498					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5499					;
   5500					; VERSION 05-00
   5501					;
   5502					; ALAN D. PECKHAM  11-APR-77
   5503					;
   5504					; MODIFIED BY:
   5505					;
   5506					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO WORK WITH THE D-RAMS.
   5507					;  THE D-RAM DATA IS PASSED IN THE 3-WORD COMPRESSED FORMAT SPECIFIED
   5508					;  IN THE DOCUMENTATION FOR KLDCP.
   5509					;
   5510					; LOCAL DATA
   5511					;
   5512	001116					.PSECT	DATA,D
   5513						.EVEN			; DFDDBF MUST BE ON AN EVEN BOUNDRY.
   5514	001116				DFDDBF:	WD36$	0 0		; DATA WORK AREA.
	001116	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001121	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5515	001123				DFDABF:	WD36$	0 0		; ADDRESS WORK AREA.
	001123	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001126	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5516						.EVEN
   5517	012074					.PSECT
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 126
$WDRAM	-- WRITE D-RAM WORD

   5519						.SBTTL	$WDRAM	-- WRITE D-RAM WORD
   5520					;+
   5521					; WRITE THE COMPRESSED D-RAM WORD POINTED TO BY R1 INTO THE D-RAM ADDRESS
   5522					; POINTED TO BY R0.
   5523					;
   5524					; INPUTS:
   5525					;	R1	- POINTER TO COMPRESSED D-RAM DATA WORD
   5526					;	R0	- D-RAM ADDRESS TO WRITE DATA INTO.
   5527					;
   5528					; OUTPUTS:
   5529					;	CARRY IS SET IF ERROR OCCURS.
   5530					;-
   5531
   5532	012074	004537 	023142'		$WDRAM::JSR	R5,$RSAVE
   5533	012100					TRACK	DW
	012100	004037 	012112'			 JSR	R0,64$
	012104	053504 				 .WORD	"DW
	012106	000000 				 .WORD
	012110	000000 				 .WORD
	012112	004737 	023210'		64$:	 JSR	PC,$TRACK
	012116	012600 				 MOV	(SP)+,R0
   5534	012120	006000 				ROR	R0		; CHECK IF EVEN OR ODD
   5535	012122	103423 				BCS	10$		; C-BIT NOT SET MEANS EVEN
   5536	012124	006100 				ROL	R0		; RESTORE ADR
   5537	012126	010104 				MOV	R1,R4		; SAVE DATA POINTER
   5538	012130					CALL	$ADRAM		; WRITE D-RAM ADDRESS
	012130	004737 	012464'			 JSR	PC,$ADRAM
   5539	012134	103416 				BCS	10$		; ERROR
   5540	012136	012401 				MOV	(R4)+,R1
   5541	012140					CALL	30$		; WRITE EVEN DATA
	012140	004737 	012206'			 JSR	PC,30$
   5542	012144	103412 				BCS	10$
   5543	012146	012401 				MOV	(R4)+,R1	; MORE DATA TO R1
   5544	012150					CALL	20$		; WRITE ODD DATA
	012150	004737 	012174'			 JSR	PC,20$
   5545	012154	103406 				BCS	10$
   5546	012156	011401 				MOV	(R4),R1
   5547					;
   5548					;	COMMON PART OF LOADING OF THE D-RAM
   5549					;
   5550	012160	012700 	062000 			MOV	#.LDRM3,R0	; COMMON J01-04
   5551	012164	006301 				ASL	R1
   5552	012166	006301 				ASL	R1		; JUSTIFY DATA FOR EBUS
   5553	012170	000423 				BR	LFDWFN
   5554	012172				10$:	RETURN
	012172	000207 				 RTS	PC
   5555	012174	012703 	061000 		20$:	MOV	#.LDRM2,R3	; DRAM FUNC FOR J-FIELD A & B
   5556	012200	012700 	064000 			MOV	#.LDRJD,R0	; J-FIELD ODD
   5557	012204	000404 				BR	40$
   5558	012206	012703 	060000 		30$:	MOV	#.LDRM1,R3	; DRAM FUNC FOR J-FILED
   5559	012212	012700 	063000 			MOV	#.LDRJV,R0	; J-FILED EVEN
   5560	012216	006301 			40$:	ASL	R1		; JUSTIFY J-FIELD DATA
   5561	012220	006301 				ASL	R1
   5562	012222					PUSH	R1
	012222	010146 				 MOV	R1,-(SP)
   5563	012224					CALL	LFDWFN		; WRITE J-DATA
	012224	004737 	012240'			 JSR	PC,LFDWFN
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 126-1
$WDRAM	-- WRITE D-RAM WORD

   5564	012230					POP	R1
	012230	012601 				 MOV	(SP)+,R1
   5565	012232	103757 				BCS	10$		; ERROR
   5566	012234	000301 				SWAB	R1		; GOT A & B
   5567	012236	010300 				MOV	R3,R0		; GOT CORRECT DIAG FUNC & WRITE
   5568	012240	110137 	001120'		LFDWFN:	MOVB	R1,DFDDBF+2	; R1 HAS THE DATA
   5569	012244	012701 	001116'			MOV	#DFDDBF,R1	; DATA ADR
   5570	012250					CALLR	$DFWR		; WRITE IT
	012250	000137 	013336'			 JMP	$DFWR
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 127
$RDRAM	-- READ D-RAM WORD

   5572						.SBTTL	$RDRAM	-- READ D-RAM WORD
   5573					;+
   5574					; READ THE D-RAM WORD ADDRESSED BY R0 INTO THE DATA BUFFER POINTED TO
   5575					; BY R1. THE DATA IS COMPRESSED DURING THE READ.
   5576					;
   5577					; INPUTS:
   5578					;	R1	- POINTER TO BUFFER TO RECIEVE D-RAM WORD.
   5579					;	R0	- D-RAM ADDRESS TO READ DATA FROM.
   5580					;
   5581					; OUTPUTS:
   5582					;	CARRY IS SET IF ERROR OCCURS.
   5583					;-
   5584
   5585	012254	004537 	023142'		$RDRAM::JSR	R5,$RSAVE
   5586	012260					TRACK	DR
	012260	004037 	012272'			 JSR	R0,64$
	012264	051104 				 .WORD	"DR
	012266	000000 				 .WORD
	012270	000000 				 .WORD
	012272	004737 	023210'		64$:	 JSR	PC,$TRACK
	012276	012600 				 MOV	(SP)+,R0
   5587	012300	010104 				MOV	R1,R4		; SAVE RECIEVING ADDRESS.
   5588	012302	010103 				MOV	R1,R3
   5589	012304	005002 				CLR	R2		; CLEAR LOOP SWITCH.
   5590	012306				10$:	CALL	$ADRAM		; WRITE D-RAM ADR
	012306	004737 	012464'			 JSR	PC,$ADRAM
   5591	012312	103463 				BCS	30$
   5592	012314	012700 	015000 			MOV	#.DRLTC,R0	; UNLATCH THE DRAM REG
   5593	012320					CALL	$DFXC
	012320	004737 	013540'			 JSR	PC,$DFXC
   5594	012324	103456 				BCS	30$
   5595	012326	012701 	001116'			MOV	#DFDDBF,R1
   5596	012332	012700 	135000 			MOV	#.RDJ71,R0	; FUNC TO READ J07-10
   5597	012336					CALL	$DFRD		; READ DATA
	012336	004737 	013224'			 JSR	PC,$DFRD
   5598	012342	103447 				BCS	30$		; TIMEOUT ERROR
   5599	012344	016100 	000002 			MOV	2(R1),R0	; GET DATA J07-10 - DEXWD2
   5600	012350	006200 				ASR	R0
   5601	012352	006200 				ASR	R0		; RIGHT JUSTIFIED J-DATA
   5602	012354	042700 	177700 			BIC	#^C77,R0	; CLEAR TRASH
   5603	012360	110023 				MOVB	R0,(R3)+	; SAVE IT IN CORE
   5604	012362	012700 	133000 			MOV	#.RDMAB,R0	; FUNC TO READ A & B FIELD
   5605	012366					CALL	$DFRD		; READ DATA
	012366	004737 	013224'			 JSR	PC,$DFRD
   5606	012372	103433 				BCS	30$
   5607	012374	016100 	000002 			MOV	2(R1),R0	; GET A & B DATA - DEXWD2
   5608	012400	006200 				ASR	R0
   5609	012402	006200 				ASR	R0		; RIGHT JUSTIFIED DATA
   5610	012404	042700 	177700 			BIC	#^C77,R0	; CLEAR EXTRA
   5611	012410	110023 				MOVB	R0,(R3)+	; SAVE IT IN CORE
   5612	012412	005102 				COM	R2		; IS THIS THE SECOND TIME ?
   5613	012414	001404 				BEQ	20$		; GET OUT IF YES
   5614	012416	016600 	000002 			MOV	2(SP),R0	; GET DRAM ADR
   5615	012422	005200 				INC	R0		; GET ODD HALF OF EVEN/ODD PAIR
   5616	012424	000730 				BR	10$		; LOOP AGAIN
   5617	012426	012700 	134000 		20$:	MOV	#.RDJ14,R0	; FUNC TO READ J01-04
   5618	012432					CALL	$DFRD		; READ DATA
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 127-1
$RDRAM	-- READ D-RAM WORD

	012432	004737 	013224'			 JSR	PC,$DFRD
   5619	012436	103411 				BCS	30$
   5620	012440	016100 	000002 			MOV	2(R1),R0	; GET J01-04 DATA - DEXWD2
   5621	012444	006200 				ASR	R0
   5622	012446	006200 				ASR	R0		; RIGHT JUSTIFIED DATA
   5623	012450	042700 	177760 			BIC	#^C17,R0	; CLEAR EXTRA
   5624	012454	110064 	000004 			MOVB	R0,4(R4)	; BIT SET TO CORE
   5625	012460	000241 				CLC
   5626	012462				30$:	RETURN
	012462	000207 				 RTS	PC
KLIFD -- D-RAM READ/WRITE	MACRO M1113  11-NOV-81 11:25  PAGE 128
$ADRAM	-- ADDRESS D-RAM WORD

   5628						.SBTTL	$ADRAM	-- ADDRESS D-RAM WORD
   5629					;+
   5630					; SET E-BOX TO SPECIFIED D-RAM ADDRESS FOR WRITTING OR READING.
   5631					;
   5632					; INPUT:
   5633					;	R0	- ADDRESS TO ACCESS.
   5634					;
   5635					; OUTPUT:
   5636					;	CARRY IS SET IF ERROR OCCURS.
   5637					;-
   5638
   5639	012464	004537 	023142'		$ADRAM::JSR	R5,$RSAVE
   5640	012470					TRACK	DA
	012470	004037 	012502'			 JSR	R0,64$
	012474	040504 				 .WORD	"DA
	012476	000000 				 .WORD
	012500	000000 				 .WORD
	012502	004737 	023210'		64$:	 JSR	PC,$TRACK
	012506	012600 				 MOV	(SP)+,R0
   5641	012510	012704 	001125'			MOV	#DFDABF+2,R4
   5642	012514	012703 	001123'			MOV	#DFDABF,R3	;GET ADR OF EBUS DATA
   5643	012520	010002 				MOV	R0,R2		;DRAM ADR IN R2
   5644	012522	005100 				COM	R0		;READY TO TEST ADR BITS 0-2
   5645	012524	032700 	000700 			BIT	#700,R0		;TESTING!
   5646	012530	001410 				BEQ	10$		;BR IF ADR IS 7XX
   5647	012532	006302 				ASL	R2
   5648	012534	006302 				ASL	R2
   5649	012536	006302 				ASL	R2		;LEFT SHIFT 3 POSITIONS
   5650	012540	105024 				CLRB	(R4)+		;INCREMENT TO DFDABF+3
   5651	012542	110224 				MOVB	R2,(R4)+	;MOVE ADR BITS 4-8 TO EBUS DATA
   5652	012544	000302 				SWAB	R2
   5653	012546	110214 				MOVB	R2,@R4		;MOVE ADR BITS 0-3 TO EBUS DATA
   5654	012550	000413 				BR	40$
   5655	012552	006002 			10$:	ROR	R2		;BIT1 TO C-BIT
   5656	012554	103402 				BCS	20$		;C BIT SET MEANS IR BIT 12 MUST BE 1
   5657	012556	105024 				CLRB	(R4)+		;NO C-BIT MEANS IR BIT 12 MUST BE 0
   5658	012560	000402 				BR	30$		;MOVE ADR TO EBUS DATA
   5659	012562	112724 	000200 		20$:	MOVB	#200,(R4)+	;SET IR BIT 12=1
   5660	012566	042702 	000340 		30$:	BIC	#340,R2
   5661	012572	110224 				MOVB	R2,(R4)+	;MOVE D-RAM ADR TO EBUS BIT POSITION 7-11
   5662	012574	112714 	000016 			MOVB	#16,@R4		;SET THE 7 FROM 7XX IN EBUS DATA
   5663	012600				40$:	CALL	$KLSR		;DO A SOFT RESET
	012600	004737 	015140'			 JSR	PC,$KLSR
   5664	012604	103413 				BCS	50$
   5665	012606	012701 	001123'			MOV	#DFDABF,R1	;EBUS DATA ADR
   5666	012612	012700 	077000 			MOV	#.LDAR,R0	;LOAD THE AR FROM EBUS 0-35
   5667	012616					CALL	$DFWR		;DO THE ACTUAL WRITE
	012616	004737 	013336'			 JSR	PC,$DFWR
   5668	012622	103404 				BCS	50$
   5669	012624	012700 	014000 			MOV	#.IRLTC,R0	;UNLATCH IR AND LOAD IT FROM AD
   5670	012630					CALLR	$DFXC		;EXECUTE IT
	012630	000137 	013540'			 JMP	$DFXC
   5671	012634				50$:	RETURN
	012634	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 129
$ADRAM	-- ADDRESS D-RAM WORD

   5673						.TITLE	KLIFE -- DEPOSIT/EXAMINE KL MEMORY
   5674	012636					IDENT$	5,1
						.IDENT	/005010/
   5675					;
   5676					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5677					;
   5678					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5679					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5680					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5681					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5682					;
   5683					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5684					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5685					; EQUIPMENT CORPORATION.
   5686					;
   5687					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5688					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5689					;
   5690					; VERSION 05-01
   5691					;
   5692					; ALAN D. PECKHAM  29-MAR-77
   5693					;
   5694					; MODIFIED BY:
   5695					;
   5696					;	R. BELANGER	24-AUG-78	FIX CROCK IN ".DESW" MAINTENANCE
   5697					;
   5698					; FUNCTION: ROUTINES TO ACCESS KL MEMORY.
   5699					;
   5700					; LOCAL MACROS
   5701					;
   5702						.MCALL	PREX$,PRDP$
   5703					;
   5704					; LOCAL DATA
   5705					;
   5706	001130					.PSECT	DATA,D
   5707	001130				DFEDPB:	PRDP$	0,DFEAD,DFEBF,ED.PHY ; DPB FOR PRIVLEDGED DEPOSIT.
	001130	   011 	   005 			.BYTE	DR.DTE,5
	001132	   016 	   200 			.BYTE	DF.PDP,ED.PHY
	001134	001154'				.WORD	DFEAD
	001136	001160'				.WORD	DFEBF
	001140	000000 				.WORD	0
   5708	001142				DFEEXB:	PREX$	0,DFEAD,DFEBF,ED.PHY ; DPB FOR PRIVLEDGED EXAMINE.
	001142	   011 	   005 			.BYTE	DR.DTE,5
	001144	   015 	   200 			.BYTE	DF.PEX,ED.PHY
	001146	001154'				.WORD	DFEAD
	001150	001160'				.WORD	DFEBF
	001152	000000 				.WORD	0
   5709	001154				DFEAD:	WD22$	0		; ADDRESS OF MEMORY ACCESS.
	001154	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   5710						.EVEN
   5711	001160				DFEBF:	WD36$	0 0		; DATA TO WRITE OR READ.
	001160	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001163	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5712						.EVEN
   5713	002311					.PSECT	TEXT,D
   5714	002311				TFEDFL:	ERROR	<DEPOSIT FAILED>
	002311	   077 	   040 	   104 		 .ASCIZ	\? DEPOSIT FAILED\
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 129-1
$ADRAM	-- ADDRESS D-RAM WORD

	002314	   105 	   120 	   117
	002317	   123 	   111 	   124
	002322	   040 	   106 	   101
	002325	   111 	   114 	   105
	002330	   104 	   000
   5715	002332				TFEEFL:	ERROR	<EXAMINE FAILED>
	002332	   077 	   040 	   105 		 .ASCIZ	\? EXAMINE FAILED\
	002335	   130 	   101 	   115
	002340	   111 	   116 	   105
	002343	   040 	   106 	   101
	002346	   111 	   114 	   105
	002351	   104 	   000
   5716	012636					.PSECT
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 130
$DPOS	-- DEPOSIT KL MEMORY ROUTINE

   5718						.SBTTL	$DPOS	-- DEPOSIT KL MEMORY ROUTINE
   5719					;+
   5720					; DEPOSIT GIVEN WORD INTO PHYSICAL CORE.
   5721					;
   5722					; INPUTS:
   5723					;	R1	- ADDRESS OF 36 BIT DATA WORD.
   5724					;	R0	- 22 BIT KL ADDRESS.
   5725					;
   5726					; OUTPUTS:
   5727					;	CARRY IS SET ON ERROR AND MESSAGE IS DISPLAYED.
   5728					;-
   5729
   5730	012636				$DPOST::
   5731	012636	005046 				CLR	-(SP)		; SET UP THE ADDRESS
   5732	012640					PUSH	R0		; SO
	012640	010046 				 MOV	R0,-(SP)
   5733	012642	010600 				MOV	SP,R0		; POINT TO ADDRESS
   5734	012644					CALL	$DPOS		; DO THE DEPOSIT
	012644	004737 	012654'			 JSR	PC,$DPOS
   5735	012650	032626 				BIT	(SP)+,(SP)+	; CLEAR STACK
   5736	012652					RETURN			; TO CALLER
	012652	000207 				 RTS	PC
   5737
   5738	012654				$DPOS::
   5739	012654	004537 	023142'			JSR	R5,$RSAVE
   5740	012660					CALL	LFEMVA		; SET UP PROPER BOUNDARY
	012660	004737 	013110'			 JSR	PC,LFEMVA
   5741	012664					CALL	LFECKN		; MAKE SURE THE CLOCK IS ON.
	012664	004737 	013134'			 JSR	PC,LFECKN
   5742	012670	103431 				BCS	90$
   5743	012672	012704 	001160'			MOV	#DFEBF,R4	; SET UP TEMPORARY WORK AREA
   5744	012676	012703 	000005 			MOV	#5,R3		; AREA COUNT
   5745	012702	112124 			10$:	MOVB	(R1)+,(R4)+	; MOVE IN -11 DATA
   5746	012704	077302 				SOB	R3,10$		; CONTINUE MOVE
   5747	012706	142744 	177760 			BICB	#^C17,-(R4)	; CLEAR HIGH BYTE
   5748	012712					TRACK	DP,DFEAD,DFEBF
	012712	004037 	012724'			 JSR	R0,64$
	012716	050104 				 .WORD	"DP
	012720	001154'				 .WORD	DFEAD
	012722	001160'				 .WORD	DFEBF
	012724	004737 	023210'		64$:	 JSR	PC,$TRACK
	012730	012600 				 MOV	(SP)+,R0
   5749	012732					DIR$	#DFEDPB		; DO DEPOSIT TO KL
	012732	012746 	001130'			MOV	#DFEDPB,-(SP)
	012736	104375 				EMT	375
   5750	012740	103005 				BCC	90$
   5751	012742					PRINT	#TFEDFL		; INFORM OF ERROR.
	012742	012700 	002311'			 MOV	#TFEDFL,R0
	012746	004737 	027034'			 JSR	PC,$TTMSG
   5752	012752	000261 				SEC
   5753	012754				90$:	RETURN
	012754	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 131
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   5755						.SBTTL	$EXAM	-- EXAMINE KL MEMORY ROUTINE
   5756					;+
   5757					; EXAMINE GIVEN WORD FROM KL PHYSICAL CORE.
   5758					;
   5759					; INPUTS:
   5760					;	R1	- ADDRESS OF BUFFER TO RECIEVE DATA.
   5761					;	R0	- 22 BIT KL ADDRESS.
   5762					;
   5763					; OUTPUTS:
   5764					;	CARRY IS SET ON ERROR AND MESSAGE IS DISPLAYED.
   5765					;-
   5766
   5767						.ENABL	LSB
   5768
   5769	012756				$EXAMT::
   5770	012756	005046 				CLR	-(SP)		; SET UP THE ADDRESS
   5771	012760					PUSH	R0		; SO
	012760	010046 				 MOV	R0,-(SP)
   5772	012762	010600 				MOV	SP,R0		; POINT TO ADDRESS
   5773	012764					CALL	$EXAM		; DO THE EXAMINE
	012764	004737 	013004'			 JSR	PC,$EXAM
   5774	012770	032626 				BIT	(SP)+,(SP)+	; CLEAR THE STACK
   5775	012772	000402 				BR	10$		; OUT THRU COMMON EXIT
   5776						;
   5777	012774				$EXAMD::
   5778	012774					CALL	$EXAM		; DO THE EXAMINE
	012774	004737 	013004'			 JSR	PC,$EXAM
   5779	013000				10$:
   5780	013000	010100 				MOV	R1,R0		; DATA PONTER TO R0
   5781	013002					RETURN			; TO CALLER
	013002	000207 				 RTS	PC
   5782
   5783						.DSABL	LSB
   5784
   5785	013004				$EXAM::
   5786	013004	004537 	023142'			JSR	R5,$RSAVE
   5787	013010					CALL	LFEMVA
	013010	004737 	013110'			 JSR	PC,LFEMVA
   5788	013014					CALL	LFECKN		; MAKE SURE THE CLOCK IS ON.
	013014	004737 	013134'			 JSR	PC,LFECKN
   5789	013020	103425 				BCS	90$
   5790	013022					DIR$	#DFEEXB		; DO KL EXAMINE
	013022	012746 	001142'			MOV	#DFEEXB,-(SP)
	013026	104375 				EMT	375
   5791	013030					TRACK	EX,DFEAD,DFEBF
	013030	004037 	013042'			 JSR	R0,64$
	013034	054105 				 .WORD	"EX
	013036	001154'				 .WORD	DFEAD
	013040	001160'				 .WORD	DFEBF
	013042	004737 	023210'		64$:	 JSR	PC,$TRACK
	013046	012600 				 MOV	(SP)+,R0
   5792	013050	103411 				BCS	90$
   5793	013052	012702 	000005 			MOV	#5,R2
   5794	013056	012700 	001160'			MOV	#DFEBF,R0
   5795	013062	112021 			10$:	MOVB	(R0)+,(R1)+
   5796	013064	077202 				SOB	R2,10$
   5797	013066	142741 	177760 			BICB	#^C17,-(R1)
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 131-1
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   5798	013072					RETURN
	013072	000207 				 RTS	PC
   5799	013074				90$:	PRINT	#TFEEFL		; INFORM OPERATOR OF ERROR.
	013074	012700 	002332'			 MOV	#TFEEFL,R0
	013100	004737 	027034'			 JSR	PC,$TTMSG
   5800	013104	000261 				SEC
   5801	013106					RETURN
	013106	000207 				 RTS	PC
KLIFE -- DEPOSIT/EXAMINE KL MEM	MACRO M1113  11-NOV-81 11:25  PAGE 132
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   5803					;+
   5804					; GET 22-BIT ADDRESS AND PLACE IN WORD-ALIGNED HOLDING AREA.
   5805					;-
   5806
   5807	013110	012705 	001154'		LFEMVA:	MOV	#DFEAD,R5
   5808	013114	112025 				MOVB	(R0)+,(R5)+	; CLAIM THE CALLER'S
   5809	013116	112025 				MOVB	(R0)+,(R5)+	; KL ADDRESS
   5810	013120	111015 				MOVB	(R0),(R5)	; FOR OUR OWN.
   5811	013122	042715 	177700 			BIC	#^C77,(R5)	; 22 BITS PLEASE.
   5812	013126	012700 	001154'			MOV	#DFEAD,R0
   5813	013132					RETURN
	013132	000207 				 RTS	PC
   5814
   5815					;+
   5816					; MAKE SURE THE CLOCK IS ON
   5817					;-
   5818
   5819	013134	105737 	000040'		LFECKN:	TSTB	.DESW		; IF OUR SWITCH IS >0,
   5820	013140	003026 				BGT	90$		; THEN MICROCODE IS USEABLE.
   5821	013142					CALL	$KLMR		; OTHERWISE RESET
	013142	004737 	014666'			 JSR	PC,$KLMR
   5822	013146	103423 				BCS	90$
   5823	013150	012700 	001000 			MOV	#.STRCL,R0	; AND START CLOCK.
   5824	013154					CALL	$DFXC
	013154	004737 	013540'			 JSR	PC,$DFXC
   5825	013160	103416 				BCS	90$
   5826	013162	012702 	001750 			MOV	#1000.,R2	; WAIT FOR HALT LOOP
   5827	013166				10$:	CALL	$DTRW1		; BY READING DTE REG #1
	013166	004737 	023052'			 JSR	PC,$DTRW1
   5828	013172	103411 				BCS	90$		; AND
   5829	013174	032700 	001000 			BIT	#DS06,R0	; CHECKING HALT BIT.
   5830	013200	001003 				BNE	20$
   5831	013202	077207 				SOB	R2,10$		; IF TAKES TOO LONG
   5832	013204	000261 				SEC			; THEN WE ARE IN TROUBLE.
   5833	013206					RETURN
	013206	000207 				 RTS	PC
   5834	013210	112737 	000001 	000040'	20$:	MOVB	#1,.DESW		; OTHERWISE INDICATE
   5835	013216				90$:	RETURN			; OKAY TO USE.
	013216	000207 				 RTS	PC
KLIFR -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 133
$EXAM	-- EXAMINE KL MEMORY ROUTINE

   5837						.TITLE	KLIFR -- PERFORM DIAGNOSTIC FUNCTION READ
   5838	013220					IDENT$	5,0
						.IDENT	/005000/
   5839					;
   5840					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5841					;
   5842					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5843					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5844					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5845					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5846					;
   5847					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5848					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5849					; EQUIPMENT CORPORATION.
   5850					;
   5851					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5852					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5853					;
   5854					; VERSION 05-00
   5855					;
   5856					; ALAN D. PECKHAM  29-MAR-77
   5857					;
   5858					; MODIFIED BY:
   5859					;
   5860					; FUNCTION: DO A FUNCTION READ TO THE DTE20.
   5861					;
   5862					; LOCAL MACROS
   5863					;
   5864						.MCALL	KLDR$
   5865					;
   5866					; LOCAL DATA
   5867					;
   5868	001166					.PSECT	DATA,D
   5869	001166				DFRRDB:	KLDR$	0,.DFBLK,.DREG,0	; DPB FOR FUNCTION READ.
	001166	002411 				.WORD	400*5.+DR.DTE
	001170	   012 	   000 			.BYTE	DF.KLR,0/400
	001172	000254'				.WORD	.DFBLK
	001174	000270'				.WORD	.DREG
	001176	000000 				.WORD	0
   5870						.EVEN
   5871	002353					.PSECT	TEXT,D
   5872	002353				TFREMS:	ERROR	<DF READ FAILED> ; READ FAILED ERROR MESSAGE.
	002353	   077 	   040 	   104 		 .ASCIZ	\? DF READ FAILED\
	002356	   106 	   040 	   122
	002361	   105 	   101 	   104
	002364	   040 	   106 	   101
	002367	   111 	   114 	   105
	002372	   104 	   000
   5873	013220					.PSECT
KLIFR -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 134
$DFRD	-- DIAGNOSTIC READ FUNCTION

   5875						.SBTTL	$DFRD	-- DIAGNOSTIC READ FUNCTION
   5876					;+
   5877					; PERFORM A DIAGNOSTIC READ FUNCTION.
   5878					;
   5879					; INPUTS:
   5880					;	R1	- ADDRESS OF 36 BIT BUFFER TO RECIEVE DATA FROM READ.
   5881					;	R0	- FUNCTION CODE OF READ TO PERFORM.
   5882					;
   5883					; OUTPUTS:
   5884					;	(R1)	- DATA READ FROM DIAGNOSTIC IS SUCCESSFUL.
   5885					;	CARRY IS SET IF ERROR, AND ERROR MESSAGE IS DISPLAYED.
   5886					;-
   5887
   5888	013220				$DDFRD::
   5889	013220	000300 				SWAB	R0		; POSITION READ CODE
   5890	013222	006300 				ASL	R0		; SO
   5891	013224				$DFRD::
   5892	013224					PUSH	<R1,R0>
	013224	010146 				 MOV	R1,-(SP)
	013226	010046 				 MOV	R0,-(SP)
   5893	013230	000300 				SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   5894	013232	110037 	001171'			MOVB	R0,DFRRDB+3	; STORE FUNCTION CODE
   5895	013236					DIR$	#DFRRDB
	013236	012746 	001166'			MOV	#DFRRDB,-(SP)
	013242	104375 				EMT	375
   5896	013244					TRACK	FR,DFRRDB+3,.DFRBK
	013244	004037 	013256'			 JSR	R0,64$
	013250	051106 				 .WORD	"FR
	013252	001171'				 .WORD	DFRRDB+3
	013254	000262'				 .WORD	.DFRBK
	013256	004737 	023210'		64$:	 JSR	PC,$TRACK
	013262	012600 				 MOV	(SP)+,R0
   5897	013264	103412 				BCS	10$
   5898	013266	012700 	000262'			MOV	#.DFRBK,R0
   5899	013272	005701 				TST	R1		; TEST R1
   5900	013274	001413 				BEQ	90$		; BYPASS LOADING
   5901	013276	112021 				MOVB	(R0)+,(R1)+	; REMOVE DATA FROM DEXWD3
   5902	013300	112021 				MOVB	(R0)+,(R1)+
   5903	013302	112021 				MOVB	(R0)+,(R1)+	; FROM DEXWD2
   5904	013304	112021 				MOVB	(R0)+,(R1)+
   5905	013306	111011 				MOVB	(R0),(R1)	; FROM DEXWD1
   5906	013310	000405 				BR	90$
   5907	013312				10$:	PRINT	#TFREMS		; INDICATE FUNC READ FAILED
	013312	012700 	002353'			 MOV	#TFREMS,R0
	013316	004737 	027034'			 JSR	PC,$TTMSG
   5908	013322	000261 				SEC
   5909	013324				90$:	POP	<R0,R1>
	013324	012600 				 MOV	(SP)+,R0
	013326	012601 				 MOV	(SP)+,R1
   5910	013330					RETURN
	013330	000207 				 RTS	PC
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 135
$DFRD	-- DIAGNOSTIC READ FUNCTION

   5912						.TITLE	KLIFW -- PERFORM DIAGNOSTIC FUNCTION WRITE
   5913	013332					IDENT$	5,0
						.IDENT	/005000/
   5914					;
   5915					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   5916					;
   5917					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   5918					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   5919					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   5920					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   5921					;
   5922					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   5923					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   5924					; EQUIPMENT CORPORATION.
   5925					;
   5926					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   5927					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   5928					;
   5929					; VERSION 05-00
   5930					;
   5931					; ALAN D. PECKHAM  29-MAR-77
   5932					;
   5933					; MODIFIED BY:
   5934					;
   5935					; FUNCTION: DO A FUNCTION WRITE TO THE DTE20.
   5936					;
   5937					; LOCAL MACROS
   5938					;
   5939						.MCALL	KLDW$,PREX$
   5940					;
   5941					; LOCAL DATA
   5942					;
   5943	001200					.PSECT	DATA,D
   5944	001200				DFWWDB:	KLDW$	0,.DFBLK,.DREG,0 ; DPB FOR FUNCTION WRITE.
	001200	002411 				.WORD	400*5.+DR.DTE
	001202	   013 	   000 			.BYTE	DF.KLW,0/400
	001204	000254'				.WORD	.DFBLK
	001206	000270'				.WORD	.DREG
	001210	000000 				.WORD		0
   5945	001212				DFWEDB:	PREX$	0,.ZERO,DFWBF,ED.PHY ; PRIVLEDGED EXAMINE DPB.
	001212	   011 	   005 			.BYTE	DR.DTE,5
	001214	   015 	   200 			.BYTE	DF.PEX,ED.PHY
	001216	000000'				.WORD	.ZERO
	001220	001224'				.WORD	DFWBF
	001222	000000 				.WORD	0
   5946	001224				DFWBF:	WD36$	0 0		; EXAMINE SCRATCH BUFFER.
	001224	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001227	   000 	   000 			 .BYTE	BY$$3,BY$$4
   5947						.EVEN
   5948	002374					.PSECT	TEXT,D
   5949	002374				TFWEMS:	ERROR	<DF WRITE FAILED>
	002374	   077 	   040 	   104 		 .ASCIZ	\? DF WRITE FAILED\
	002377	   106 	   040 	   127
	002402	   122 	   111 	   124
	002405	   105 	   040 	   106
	002410	   101 	   111 	   114
	002413	   105 	   104 	   000
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 135-1
$DFRD	-- DIAGNOSTIC READ FUNCTION

   5950	013332					.PSECT
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 136
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   5952						.SBTTL	$DFWR	-- DIAGNOSTIC WRITE FUNCTION
   5953					;+
   5954					; PERFORM DIAGNOSTIC WRITE FUNCTION.
   5955					;
   5956					; INPUTS:
   5957					;	R1	- ADDRESS OF 36 BIT WORD TO WRITE.
   5958					;	R0	- FUNCTION CODE OF WRITE TO PERFORM.
   5959					;
   5960					; OUTPUTS:
   5961					;	CARRY IS SET IF ERROR, AND ERROR MESSAGE IS DISPLAYED.
   5962					;-
   5963
   5964	013332				$DDFWR::
   5965	013332	000300 				SWAB	R0		; POSITION WRITE CODE
   5966	013334	006300 				ASL	R0		; SO
   5967	013336				$DFWR::
   5968	013336					PUSH	<R1,R0>
	013336	010146 				 MOV	R1,-(SP)
	013340	010046 				 MOV	R0,-(SP)
   5969	013342					CALL	LFWCKF		; TURN OFF CLOCK
	013342	004737 	013456'			 JSR	PC,LFWCKF
   5970	013346	103440 				BCS	90$
   5971	013350	000300 				SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   5972	013352	110037 	001203'			MOVB	R0,DFWWDB+3	; SET THE FUNCTION CODE IN DPB
   5973	013356	012700 	000254'			MOV	#.DFWBK,R0	; POINT TO TOP OF 3 WORDS FOR WRITE
   5974	013362	005701 				TST	R1		; TEST R1
   5975	013364	001405 				BEQ	10$		; BYPASS LOADING
   5976	013366	112120 				MOVB	(R1)+,(R0)+	; FILL IN DATA IN DEXWD3
   5977	013370	112120 				MOVB	(R1)+,(R0)+
   5978	013372	112120 				MOVB	(R1)+,(R0)+	; IN DEXWD2
   5979	013374	112120 				MOVB	(R1)+,(R0)+
   5980	013376	111110 				MOVB	(R1),(R0)	; IN DEXWD1
   5981	013400	042760 	177760 	000004 	10$:	BIC	#^C17,4(R0)	; JUST SAVE BITS 0-3 IN DEXWD1
   5982	013406					DIR$	#DFWWDB		; DO THE FUNCTION WRITE
	013406	012746 	001200'			MOV	#DFWWDB,-(SP)
	013412	104375 				EMT	375
   5983	013414					TRACK	FW,DFWWDB+3,.DFWBK
	013414	004037 	013426'			 JSR	R0,64$
	013420	053506 				 .WORD	"FW
	013422	001203'				 .WORD	DFWWDB+3
	013424	000254'				 .WORD	.DFWBK
	013426	004737 	023210'		64$:	 JSR	PC,$TRACK
	013432	012600 				 MOV	(SP)+,R0
   5984	013434	103005 				BCC	90$		; WRITE OKAY
   5985	013436				20$:	PRINT	#TFWEMS
	013436	012700 	002374'			 MOV	#TFWEMS,R0
	013442	004737 	027034'			 JSR	PC,$TTMSG
   5986	013446	000261 				SEC
   5987	013450				90$:	POP	<R0,R1>
	013450	012600 				 MOV	(SP)+,R0
	013452	012601 				 MOV	(SP)+,R1
   5988	013454					RETURN			; ERROR
	013454	000207 				 RTS	PC
KLIFW -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 137
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   5990					;+
   5991					; MAKE SURE THE KL CLOCK IS OFF FOR FUNCTION WRITE.
   5992					;
   5993					; NO INPUTS OR OUTPUTS.
   5994					;-
   5995
   5996	013456	105037 	000040'		LFWCKF:	CLRB	.DESW		; DEP/EXAM MUST START FRESH.
   5997	013462	105737 	000037'			TSTB	.CKSW		; TEST THE CLOCK CONDITION:
   5998	013466	100421 				BMI	90$		; OFF IS OKAY.
   5999	013470	003012 				BGT	10$		; ON - TURN IT OFF.
   6000	013472					DIR$	#DFWEDB		; OTHERWISE DETERMINATE...
	013472	012746 	001212'			MOV	#DFWEDB,-(SP)
	013476	104375 				EMT	375
   6001	013500	103006 				BCC	10$		; CLOCK IS ON ! STOP IT.
   6002	013502	022737 	000000G	000000G		CMP	#IE.EBX,$DSW	; EBOX STOPPED ?
   6003	013510	001410 				BEQ	90$		; YES, WE ARE OKAY.
   6004	013512					CALLR	$KLMR		; SOME HORRIBLE STATE...
	013512	000137 	014666'			 JMP	$KLMR
   6005	013516				10$:	PUSH	R0		; CLOCK IS ON -
	013516	010046 				 MOV	R0,-(SP)
   6006	013520	012700 	000000 			MOV	#.STPCL,R0	; TURN IT OFF
   6007	013524					CALL	$DFXC
	013524	004737 	013540'			 JSR	PC,$DFXC
   6008	013530					POP	R0
	013530	012600 				 MOV	(SP)+,R0
   6009	013532				90$:	RETURN
	013532	000207 				 RTS	PC
KLIFX -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 138
$DFWR	-- DIAGNOSTIC WRITE FUNCTION

   6011						.TITLE	KLIFX -- PERFORM DIAGNOSTIC FUNCTION EXECUTE
   6012	013534					IDENT$	5,1
						.IDENT	/005010/
   6013					;
   6014					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6015					;
   6016					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6017					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6018					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6019					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6020					;
   6021					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6022					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6023					; EQUIPMENT CORPORATION.
   6024					;
   6025					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6026					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6027					;
   6028					; VERSION 05-01
   6029					;
   6030					; ALAN D. PECKHAM  29-MAR-77
   6031					;
   6032					; MODIFIED BY:
   6033					;
   6034					;	R. BELANGER	24-AUG-77	FIX CROCK IN ".DESW" MAINTENANCE
   6035					;
   6036					; FUNCTION: DO A FUNCTION WRITE TO THE DTE20.
   6037					;
   6038					; LOCAL MACROS
   6039					;
   6040						.MCALL	KLDX$
   6041					;
   6042					; LOCAL VARIABLES
   6043					;
   6044	001232					.PSECT	DATA,D
   6045	001232				DFXXDB:	KLDX$	0,.DFBLK,.DREG,0 ; DPB FOR FUNCTION EXECUTE.
	001232	002411 				.WORD	400*5.+DR.DTE
	001234	   014 	   000 			.BYTE	DF.KLX,0/400
	001236	000254'				.WORD	.DFBLK
	001240	000270'				.WORD	.DREG
	001242	000000 				.WORD	0
   6046						.EVEN
   6047	002416					.PSECT	TEXT,D
   6048	002416				TFXEMS:	ERROR	<DF EXECUTE FAILED>
	002416	   077 	   040 	   104 		 .ASCIZ	\? DF EXECUTE FAILED\
	002421	   106 	   040 	   105
	002424	   130 	   105 	   103
	002427	   125 	   124 	   105
	002432	   040 	   106 	   101
	002435	   111 	   114 	   105
	002440	   104 	   000
   6049	013534					.PSECT
KLIFX -- PERFORM DIAGNOSTIC FUN	MACRO M1113  11-NOV-81 11:25  PAGE 139
$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION

   6051						.SBTTL	$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION
   6052					;+
   6053					; PERFORM A DIAGNOSTIC EXECUTE FUNCTION.
   6054					;
   6055					; INPUTS:
   6056					;	R0	- EXECUTE FUNCTION CODE.
   6057					;
   6058					; OUTPUTS:
   6059					;	CARRY IS SET IF OPERATION FAILS.
   6060					;-
   6061
   6062	013534				$DDFXC::
   6063	013534	000300 				SWAB	R0		; POSITION EXECUTE CODE
   6064	013536	006300 				ASL	R0		; SO
   6065	013540				$DFXC::
   6066	013540					PUSH	<R1,R0>
	013540	010146 				 MOV	R1,-(SP)
	013542	010046 				 MOV	R0,-(SP)
   6067	013544	022700 	001000 			CMP	#.STRCL,R0	; START CLOCK ?
   6068	013550	001411 				BEQ	10$
   6069	013552	022700 	007000 			CMP	#.SETMR,R0	; DOES IT STOP CLOCK ?
   6070	013556	002414 				BLT	20$
   6071	013560	112737 	177777 	000037'		MOVB	#-1,.CKSW	; INDICATE CLOCK STOPPED.
   6072	013566	105037 	000040'			CLRB	.DESW		; DEP/EXAM MUST START FRESH.
   6073	013572	000406 				BR	20$
   6074	013574	112737 	000001 	000037'	10$:	MOVB	#+1,.CKSW	; INDICATE CLOCK STARTED.
   6075	013602	112737 	000001 	000040'		MOVB	#1,.DESW
   6076	013610	000300 			20$:	SWAB	R0		; GET FUNCTION CODE TO LOW BYTE
   6077	013612	110037 	001235'			MOVB	R0,DFXXDB+3	; SET FUNCTION CODE IN DPB
   6078	013616					TRACK	FX,DFXXDB+3
	013616	004037 	013630'			 JSR	R0,64$
	013622	054106 				 .WORD	"FX
	013624	001235'				 .WORD	DFXXDB+3
	013626	000000 				 .WORD
	013630	004737 	023210'		64$:	 JSR	PC,$TRACK
	013634	012600 				 MOV	(SP)+,R0
   6079	013636					DIR$	#DFXXDB
	013636	012746 	001232'			MOV	#DFXXDB,-(SP)
	013642	104375 				EMT	375
   6080	013644	103007 				BCC	30$
   6081	013646	105037 	000037'			CLRB	.CKSW		; CLOCK STATUS INDETERMINATE.
   6082	013652					PRINT	#TFXEMS		; INDICATE FUNC EX FAILED
	013652	012700 	002416'			 MOV	#TFXEMS,R0
	013656	004737 	027034'			 JSR	PC,$TTMSG
   6083	013662	000261 				SEC
   6084	013664				30$:	POP	<R0,R1>
	013664	012600 				 MOV	(SP)+,R0
	013666	012601 				 MOV	(SP)+,R1
   6085	013670					RETURN
	013670	000207 				 RTS	PC
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1113  11-NOV-81 11:25  PAGE 140
$DFXC	-- DIAGNOSTIC EXECUTE FUNCTION

   6087						.TITLE	KLIGC -- SET CACHE CONFIGURATION TABLES
   6088	013672					IDENT$	5,0
						.IDENT	/005000/
   6089					;
   6090					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6091					;
   6092					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6093					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6094					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6095					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6096					;
   6097					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6098					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6099					; EQUIPMENT CORPORATION.
   6100					;
   6101					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6102					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6103					;
   6104					; VERSION 05-00
   6105					;
   6106					; ALAN D. PECKHAM  12-APR-77
   6107					;
   6108					; MODIFIED BY:
   6109					;
   6110					; FUNCTION: THIS MODULE SETS UP THE CACHE CONFIGURATION TABLES
   6111					;  EITHER FROM THE CONFIGURATION FILE OR FOR ALL CACHES.
   6112					;
   6114					; LOCAL DATA
   6115					;
   6116	001244					.PSECT	DATA,D
   6117	001244	043240 	000000 	000000 	DGCFNM:	.RAD50	/KL       CFG/	; CONFIGURATION FILE NAME.
	001252	011667
   6118	001254	000000 				.WORD	0		; GET LATEST VERSION.
   6119	001256	   005 	   005 			.BYTE	5,5
   6120	001260	054523 	000000 			.WORD	"SY,0
   6121	002442					.PSECT	TEXT,D
   6122	002442				TGCNFL:	WARNING	<NO FILE - ALL CACHE BEING CONFIGURED>
	002442	   045 	   040 	   116 		 .ASCIZ	\% NO FILE - ALL CACHE BEING CONFIGURED\
	002445	   117 	   040 	   106
	002450	   111 	   114 	   105
	002453	   040 	   055 	   040
	002456	   101 	   114 	   114
	002461	   040 	   103 	   101
	002464	   103 	   110 	   105
	002467	   040 	   102 	   105
	002472	   111 	   116 	   107
	002475	   040 	   103 	   117
	002500	   116 	   106 	   111
	002503	   107 	   125 	   122
	002506	   105 	   104 	   000
   6123	013672					.PSECT
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1113  11-NOV-81 11:25  PAGE 141
$GETCA	-- SET CACHE CONFIGURATION TABLES

   6125						.SBTTL	$GETCA	-- SET CACHE CONFIGURATION TABLES
   6126					;+
   6127					; GET CACHES TO BE ENABLED FROM FILE OR SET TO CONFIGURE ALL CACHE.
   6128					;
   6129					; INPUTS:
   6130					;	.DCSW	- IF NON-NEGATIVE THEN USE LAST CONFIGURATION, OTHERWISE
   6131					;		  SET FOR ALL CACHE.
   6132					;
   6133					; OUTPUTS:
   6134					;	.NCACH	- NUMBER OF CACHES TO USE.
   6135					;	.CACHN	- NUMBERS OF THE CACHES TO BE USED.
   6136					;-
   6137
   6138	013672	105737 	000031'		$GETCA::TSTB	.DCSW		; IF LAST CONFIGURATION INDICATED
   6139	013676	002417 				BLT	20$
   6140	013700	012700 	001244'			MOV	#DGCFNM,R0	; THEN FIND CONFIGURATION FILE.
   6141	013704					CALL	$LOOKUP
	013704	004737 	007342'			 JSR	PC,$LOOKUP
   6142	013710	103030 				BCC	50$
   6143	013712	122737 	000000G	000522'		CMPB	#IE.NSF,.SYSTA	; IF NO FILE
   6144	013720	001060 				BNE	90$
   6145	013722					PRINT	#TGCNFL		; (NO FILE, OPERATOR !)
	013722	012700 	002442'			 MOV	#TGCNFL,R0
	013726	004737 	027034'			 JSR	PC,$TTMSG
   6146	013732	105237 	000031'		10$:	INCB	.DCSW		; THEN CONFIGURE ALL 4.
   6147	013736	012701 	000063'		20$:	MOV	#.CACHN,R1	; FIX TABLES
   6148	013742	005004 				CLR	R4
   6149	013744	110421 			30$:	MOVB	R4,(R1)+
   6150	013746	005204 				INC	R4
   6151	013750	022704 	000004 			CMP	#4,R4		; FOR FOUR CACHES.
   6152	013754	001373 				BNE	30$
   6153	013756	110437 	000062'			MOVB	R4,.NCACH
   6154	013762					RETURN
	013762	000207 				 RTS	PC
   6155	013764				40$:	CALL	$READS
	013764	004737 	010034'			 JSR	PC,$READS
   6156	013770	103434 				BCS	90$
   6157	013772				50$:	CALL	$READC		; GET A RECORD
	013772	004737 	007776'			 JSR	PC,$READC
   6158	013776	103431 				BCS	90$
   6159	014000	022700 	000002 			CMP	#2,R0		; IF IT IS THE CACHE RECORD,
   6160	014004	001405 				BEQ	60$		; THEN PROCESS IT.
   6161	014006	005700 				TST	R0		; IF NOT END-OF-FILE
   6162	014010	001365 				BNE	40$		; THEN GET NEW RECORD.
   6163	014012					CALL	$CLOSE		; OTHERWISE CLOSE FILE
	014012	004737 	006636'			 JSR	PC,$CLOSE
   6164	014016	000745 				BR	10$		; AND USE ALL CACHES.
   6165	014020				60$:	CALL	$READB		; PICK UP
	014020	004737 	010200'			 JSR	PC,$READB
   6166	014024	103416 				BCS	90$
   6167	014026	110004 				MOVB	R0,R4		; NUMBER OF CACHES
   6168	014030	001410 				BEQ	80$
   6169	014032	010002 				MOV	R0,R2		; AND
   6170	014034	012701 	000063'			MOV	#.CACHN,R1
   6171	014040				70$:	CALL	$READB
	014040	004737 	010200'			 JSR	PC,$READB
   6172	014044	103406 				BCS	90$
KLIGC -- SET CACHE CONFIGURATIO	MACRO M1113  11-NOV-81 11:25  PAGE 141-1
$GETCA	-- SET CACHE CONFIGURATION TABLES

   6173	014046	110021 				MOVB	R0,(R1)+	; AND CACHE NUMBERS.
   6174	014050	077205 				SOB	R2,70$
   6175	014052	110437 	000062'		80$:	MOVB	R4,.NCACH	; SET THE NUMBER OF CACHES
   6176	014056					CALLR	$CLOSE		; AND ALL FINISHED.
	014056	000137 	006636'			 JMP	$CLOSE
   6177	014062				90$:	CALL	$PURGE		; ERROR EXIT.
	014062	004737 	007704'			 JSR	PC,$PURGE
   6178	014066	000261 				SEC
   6179	014070					RETURN
	014070	000207 				 RTS	PC
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1113  11-NOV-81 11:25  PAGE 142
$GETCA	-- SET CACHE CONFIGURATION TABLES

   6182						.TITLE	KLIGM -- SET UP MEMORY CONFIGURATION TABLES
   6183	014072					IDENT$	11,04,KLI$$F
						.IDENT	/B11040/
   6184					;
   6185					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6186					;
   6187					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6188					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6189					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6190					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6191					;
   6192					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6193					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6194					; EQUIPMENT CORPORATION.
   6195					;
   6196					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6197					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6198					;
   6199					; VERSION 11-04
   6200					;
   6201					; ALAN D. PECKHAM  12-APR-77
   6202					;
   6203					; MODIFIED BY:
   6204					;
   6205					;	R. BELANGER	02-MAR-79	ADD REVERSE MEMORY CONFIGURATION
   6206					;					TCO 4.2204
   6207					;	R. BELANGER	25-JUL-78	INTEGRATE MOS CONFIGURATOR
   6208					;
   6209					; FUNCTION: THIS MODULE SETS UP THE MEMORY CONFIGURATION TABLES TO REFLECT
   6210					;  THE LAST MEMORY CONFIGURATION OR TO USE ALL MEMORY AVAILABLE.
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1113  11-NOV-81 11:25  PAGE 143
$GETCA	-- SET CACHE CONFIGURATION TABLES

   6212					;
   6213					; LOCAL DATA
   6214					;
   6215	001264					.PSECT	DATA,D
   6216	001264				DGMFNM:
   6217	001264	043240 	000000 	000000 		.RAD50	/KL       CFG/	; CONFIGURATION FILE NAME.
	001272	011667
   6218	001274	000000 				.WORD	0		; GET LATEST VERSION.
   6219	001276	   005 	   005 			.BYTE	5,5
   6220	001300	054523 	000000 			.WORD	"SY,0
   6221	002511					.PSECT	TEXT,D
   6222	002511				TGMNFL:
   6223	002511					WARNING	<NO FILE - ALL MEMORY BEING CONFIGURED>
	002511	   045 	   040 	   116 		 .ASCIZ	\% NO FILE - ALL MEMORY BEING CONFIGURED\
	002514	   117 	   040 	   106
	002517	   111 	   114 	   105
	002522	   040 	   055 	   040
	002525	   101 	   114 	   114
	002530	   040 	   115 	   105
	002533	   115 	   117 	   122
	002536	   131 	   040 	   102
	002541	   105 	   111 	   116
	002544	   107 	   040 	   103
	002547	   117 	   116 	   106
	002552	   111 	   107 	   125
	002555	   122 	   105 	   104
	002560	   000
   6224	014072					.PSECT
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1113  11-NOV-81 11:25  PAGE 144
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

   6226						.SBTTL	$GETMM	-- SET UP MEMORY CONFIGURATION TABLES
   6227					;+
   6228					; GET THE LAST CONFIGURATION FROM THE CONFIGURATION FILE. IF THERE IS NO
   6229					; FILE, THEN CONFIGURE FOR ALL MEMORY.
   6230					;
   6231					; OUTPUTS:
   6232					;	.DMSW	- MADE NEGATIVE IF ALL MEMORY IS TO BE CONFIGURED (NO FILE).
   6233					;	.CTLTP	- TABLE OF DESIRED CONTROLLERS
   6234					;	.CFGTB	- TABLE OF CONFIGURATION MASKS
   6235					;	.CFMRV	- FORWARD/REVERSE CONFIGURATION INDICATOR
   6236					;-
   6237
   6238	014072				$GETMM::
   6239	014072	105037 	000044'			CLRB	.MFCT		; INIT COUNTER TO ZERO
   6240	014076	012701 	000040 			MOV	#CTLS,R1	; INIT COUNTER
   6241	014102	012700 	000132'			MOV	#.CFGTB,R0	; TABLE POINTER TO R0
   6242	014106	112761 	177777 	000070'		MOVB	#-1,.CTLTP(R1)	; [4.2204] INIT ".CFMRV" CONTROLLER TYPE TO -1
   6243	014114				10$:
   6244	014114	012720 	100000 			MOV	#BIT15,(R0)+	; INVALIDATE THE CONFIGURATION TABLE
   6245	014120	105061 	000067'			CLRB	.CTLTP-1(R1)	; AND THE CONTROLLER TABLE
   6246	014124	077105 				SOB	R1,10$		; LOOP TILL DONE
   6247	014126	005010 				CLR	(R0)		; [4.2204] INIT TO FORWARD CONFIGURATION
   6248	014130	012700 	001264'			MOV	#DGMFNM,R0	; LOOK FOR CONFIGURATION FILE
   6249	014134					CALL	$LOOKUP
	014134	004737 	007342'			 JSR	PC,$LOOKUP
   6250	014140	103016 				BCC	50$
   6251	014142	122737 	000000G	000522'		CMPB	#IE.NSF,.SYSTA	; IF NO FILE
   6252	014150	001070 				BNE	90$		; OTHER ERROR -- FATAL
   6253	014152					PRINT	#TGMNFL		; (NO FILE, OPERATOR !)
	014152	012700 	002511'			 MOV	#TGMNFL,R0
	014156	004737 	027034'			 JSR	PC,$TTMSG
   6254	014162				20$:
   6255	014162	105337 	000032'			DECB	.DMSW		; THEN USE ALL MEMORY.
   6256	014166				30$:
   6257	014166					RETURN			; TO CALLER
	014166	000207 				 RTS	PC
   6258					;
   6259					; HERE TO SKIP PRECEEDING NON-CONTROLLER RECORDS
   6260					;
   6261	014170				40$:
   6262	014170					CALL	$READS
	014170	004737 	010034'			 JSR	PC,$READS
   6263	014174	103456 				BCS	90$
   6264	014176				50$:
   6265	014176					CALL	$READC		; GET A RECORD.
	014176	004737 	007776'			 JSR	PC,$READC
   6266	014202	103453 				BCS	90$
   6267	014204	022700 	000001 			CMP	#1,R0		; IF IT A CONTROLLER RECORD
   6268	014210	001404 				BEQ	60$		; THEN PROCESS, OTHERWISE
   6269	014212	002766 				BLT	40$		; IF NOT END OF FILE, GET ANOTHER.
   6270	014214					CALL	$CLOSE		; IF NO CONTROLLER RECORDS
	014214	004737 	006636'			 JSR	PC,$CLOSE
   6271	014220	000760 				BR	20$		; THEN USE ALL MEMORY.
   6272						;
   6273					;
   6274					; HERE TO READ AND PROCESS A CONTROLLER RECORD
   6275					;
KLIGM -- SET UP MEMORY CONFIGUR	MACRO M1113  11-NOV-81 11:25  PAGE 144-1
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

   6276	014222				60$:
   6277	014222					CALL	$READB		; GET A CONTROLLER INDEX
	014222	004737 	010200'			 JSR	PC,$READB
   6278	014226	103441 				BCS	90$
   6279	014230	010001 				MOV	R0,R1		; COPY TO R1
   6280	014232					CALL	$READB		; GET CONTROLLER TYPE.
	014232	004737 	010200'			 JSR	PC,$READB
   6281	014236	103435 				BCS	90$
   6282	014240	110061 	000070'			MOVB	R0,.CTLTP(R1)	; SET IN TABLE
   6283	014244					CALL	$READW		; GET CONFIGURATION MASK
	014244	004737 	010104'			 JSR	PC,$READW
   6284	014250	103430 				BCS	90$
   6285	014252	006301 				ASL	R1		; WORD INDEX
   6286	014254	010061 	000132'			MOV	R0,.CFGTB(R1)	; SET THAT IN THE TABLE
   6287	014260	002413 				BLT	80$		; GO ON IF NOT DESIRED
   6288	014262	006201 				ASR	R1		; BACK TO BYTE INDEX
   6289	014264	122761 	000005 	000070'		CMPB	#5,.CTLTP(R1)	; IS THIS ONE AN MF20??
   6290	014272	001006 				BNE	80$		; NO -- GO ON
   6291	014274	105237 	000044'			INCB	.MFCT		; YES -- MARK THAT WE EXPECT AT LEAST THIS ONE
   6292	014300	000403 				BR	80$		; AND TRY FOR NEXT RECORD
   6293						;
   6294					;
   6295					; HERE TO SKIP TRAILING NON-CONTROLLER RECORDS
   6296					;
   6297	014302				70$:
   6298	014302					CALL	$READS		; BYPASS RECORD.
	014302	004737 	010034'			 JSR	PC,$READS
   6299	014306	103411 				BCS	90$
   6300	014310				80$:
   6301	014310					CALL	$READC		; GET ANOTHER RECORD
	014310	004737 	007776'			 JSR	PC,$READC
   6302	014314	103406 				BCS	90$		; AND
   6303	014316	022700 	000001 			CMP	#1,R0		; IF A CONTROLLER RECORD
   6304	014322	001737 				BEQ	60$		; THEN PROCESS, OTHERWISE
   6305	014324	002766 				BLT	70$		; REJECT RECORDS UNTIL EOF.
   6306	014326					CALLR	$CLOSE		; CLOSE FILE AND RETURN.
	014326	000137 	006636'			 JMP	$CLOSE
   6307						;
   6308	014332				90$:
   6309	014332					CALL	$PURGE
	014332	004737 	007704'			 JSR	PC,$PURGE
   6310	014336	000261 				SEC			; SO RETURN WITH ERROR.
   6311	014340					RETURN
	014340	000207 				 RTS	PC
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 145
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

   6313					.TITLE	KLIGT -- READ MF20 TIMING FILE DATA
   6314	014342					IDENT$	10,0,KLI$$F
						.IDENT	/B10000/
   6315					;
   6316					;                             COPYRIGHT (C) 1975, 1978 BY
   6317					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   6318					;
   6319					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   6320					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   6321					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   6322					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   6323					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   6324					;
   6325					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   6326					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   6327					;       CORPORATION.
   6328					;
   6329					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   6330					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   6331					;
   6332					;
   6333					;	MODULE: MF20 TIMING FILE INPUT
   6334					;
   6335					;	VERSION: 10-00
   6336					;
   6337					;	DATE: 22-MAY-78
   6338					;
   6339					;	AUTHOR: R. BELANGER
   6340					;
   6341					;	MODIFICATIONS:
   6342					;
   6343					;	NO.	DATE		PROGRAMMER	REASON
   6344					;	---	----		----------	------
   6345
   6346	002561					.PSECT	TEXT,D
   6347	002561				TGTCKE:
   6348	002561					ERROR	<MF20 TIMING FILE CHECKSUM ERROR>
	002561	   077 	   040 	   115 		 .ASCIZ	\? MF20 TIMING FILE CHECKSUM ERROR\
	002564	   106 	   062 	   060
	002567	   040 	   124 	   111
	002572	   115 	   111 	   116
	002575	   107 	   040 	   106
	002600	   111 	   114 	   105
	002603	   040 	   103 	   110
	002606	   105 	   103 	   113
	002611	   123 	   125 	   115
	002614	   040 	   105 	   122
	002617	   122 	   117 	   122
	002622	   000
   6349	002623				TGTNFL:
   6350	002623					ERROR	<NO MF20 TIMING FILE>
	002623	   077 	   040 	   116 		 .ASCIZ	\? NO MF20 TIMING FILE\
	002626	   117 	   040 	   115
	002631	   106 	   062 	   060
	002634	   040 	   124 	   111
	002637	   115 	   111 	   116
	002642	   107 	   040 	   106
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 145-1
$GETMM	-- SET UP MEMORY CONFIGURATION TABLES

	002645	   111 	   114 	   105
	002650	   000
   6351	002651				TGTIFF:
   6352	002651					ERROR	<ILLEGAL MF20 TIMING FILE FORMAT>
	002651	   077 	   040 	   111 		 .ASCIZ	\? ILLEGAL MF20 TIMING FILE FORMAT\
	002654	   114 	   114 	   105
	002657	   107 	   101 	   114
	002662	   040 	   115 	   106
	002665	   062 	   060 	   040
	002670	   124 	   111 	   115
	002673	   111 	   116 	   107
	002676	   040 	   106 	   111
	002701	   114 	   105 	   040
	002704	   106 	   117 	   122
	002707	   115 	   101 	   124
	002712	   000
   6353	002713				TGTRFE:
   6354	002713					ERROR	<MF20 TIMING FILE READ ERROR>
	002713	   077 	   040 	   115 		 .ASCIZ	\? MF20 TIMING FILE READ ERROR\
	002716	   106 	   062 	   060
	002721	   040 	   124 	   111
	002724	   115 	   111 	   116
	002727	   107 	   040 	   106
	002732	   111 	   114 	   105
	002735	   040 	   122 	   105
	002740	   101 	   104 	   040
	002743	   105 	   122 	   122
	002746	   117 	   122 	   000
   6355	014342					.PSECT
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 146
$GETTF -- READ MF20 TIMING FILE DATA

   6357					.SBTTL	$GETTF -- READ MF20 TIMING FILE DATA
   6358
   6359					;+
   6360					; $GETTF -- SUBROUTINE TO READ AND DEASCIIZE AN MF20 TIMING RAM DATA FILE
   6361					;
   6362					; INPUTS:
   6363					;
   6364					;	R0 -- POINTS TO CALLER'S BUFFER
   6365					;	TMFLNM -- TIMING FILE FILENAME
   6366					;
   6367					; OUTPUTS:
   6368					;
   6369					;	R0 - R5 UNCHANGED
   6370					;	DATA IS IN CALLER'S BUFFER
   6371					;	CC-C SET ON ERROR; CLEAR ON SUCCESS
   6372					;-
   6373
   6374	014342				$GETTF::
   6375	014342				RDATIM::
   6376	014342					CALL	R5,$RSAVE	; SAVE REGISTERS
	014342	004537 	023142'			 JSR	R5,$RSAVE
   6377	014346	012705 	000000G			MOV	#TMFLNM,R5	; POINT TO THE ASCII FILENAME
   6378	014352	010004 				MOV	R0,R4		; DESTINATION POINTER TO R4
   6379	014354	012700 	000474'			MOV	#.USRFN,R0	; POINT TO USER FILENAME BLOCK
   6380	014360					PUSH	R0		; SAVE R0 FOR LATER
	014360	010046 				 MOV	R0,-(SP)
   6381	014362					CALL	$TRF2B		; LOAD THE FILENAME BLOCK
	014362	004737 	024346'			 JSR	PC,$TRF2B
   6382	014366					POP	R0		; RESTORE FILNAME BLOCK POINTER
	014366	012600 				 MOV	(SP)+,R0
   6383	014370					CALL	$LOOKUP		; LOOKUP THE FILE
	014370	004737 	007342'			 JSR	PC,$LOOKUP
   6384	014374	103013 				BCC	20$		; FOUND THE FILE OK
   6385	014376	022737 	000000G	000522'		CMP	#IE.NSF,.SYSTA	; DOES THE FILE EXIST??
   6386	014404	001005 				BNE	10$		; YES -- CALL ERROR ROUTINE
   6387	014406					PRINT	#TGTNFL		; NO -- SAY SO AND QUIT
	014406	012700 	002623'			 MOV	#TGTNFL,R0
	014412	004737 	027034'			 JSR	PC,$TTMSG
   6388	014416	000467 				BR	RTFXIT		; EXIT
   6389						;
   6390	014420				10$:
   6391	014420					CALLR	$IOERR		; REPORT THE ERROR AND QUIT
	014420	000137 	007126'			 JMP	$IOERR
   6392						;
   6393					;
   6394					; MAIN CONVERSION LOOP
   6395					;
   6396					; THIS LOOP CONVERTS THE DATA IN AN ASCIIZED "A11" FORMAT FILE TO BINARY.
   6397					;
   6398					; RECORDS WHICH BEGIN WITH A SEMI-COLON (COMMENT) ARE SIMPLY SKIPPED OVER
   6399					;
   6400					; RECORDS WHICH BEGIN WITH AN "E<SPACE>" ARE CONVERTED TO BINARY AND RETURNED TO
   6401					; THE CALLER
   6402					;
   6403					; ANY OTHER FORMAT CONSTITUTES A FATAL ERROR
   6404					;
   6405					; REGISTER SUMMARY:
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 146-1
$GETTF -- READ MF20 TIMING FILE DATA

   6406					;
   6407					;	R0 -- LAST CHARACTER READ FROM FILE
   6408					;	R1 -- LAST WORD CONVERTED FROM FILE
   6409					;	R2 -- RECORD WORD COUNT
   6410					;	R4 -- TRANSFER POINTER
   6411					;	R5 -- CHECKSUM
   6412					;
   6413	014424				20$:
   6414	014424					CALL	$READC		; READ THE RECORD BYTE COUNT
	014424	004737 	007776'			 JSR	PC,$READC
   6415									; AND RETURN FIRST WORD IN R0
   6416	014430	103454 				BCS	RTFERR		; ERROR IF CC-C SET
   6417	014432	122700 	000073 			CMPB	#';,R0		; IS IT A COMMENT LINE??
   6418	014436	001410 				BEQ	40$		; YES -- GO EAT IT UP
   6419	014440	022700 	020105 			CMP	#"E ,R0		; NO -- IS IT A DATA LINE??
   6420	014444	001411 				BEQ	50$		; YES -- GO CONVERT IT
   6421	014446				30$:
   6422	014446					PRINT	#TGTIFF		; NO -- COMPLAIN
	014446	012700 	002651'			 MOV	#TGTIFF,R0
	014452	004737 	027034'			 JSR	PC,$TTMSG
   6423	014456	000445 				BR	RTFERX		; AND EXIT
   6424						;
   6425					;
   6426					; HERE TO READ AND DISCARD A COMMENT LINE
   6427					;
   6428	014460				40$:
   6429	014460					CALL	$READS		; SKIP OVER THIS RECORD
	014460	004737 	010034'			 JSR	PC,$READS
   6430	014464	103436 				BCS	RTFERR		; ERROR IF CC-C IS SET
   6431	014466	000756 				BR	20$		; GO START THE NEXT RECORD
   6432						;
   6433					;
   6434					; HERE TO READ AND CONVERT A DATA LINE
   6435					;
   6436	014470				50$:
   6437	014470	005005 				CLR	R5		; RESET THE CHECKSUM
   6438					;
   6439					; READ THE RECORD DATA WORD COUNT
   6440					; IF .EQ. 0, THEN WE ARE AT THE LOGICAL END-OF-FILE
   6441					;
   6442	014472					CALL	CNVWRD		; CONVERT THE WORD COUNT
	014472	004737 	014610'			 JSR	PC,CNVWRD
   6443	014476	103437 				BCS	RTFXIT		; ERROR IF CC-C IS SET
   6444	014500	010102 				MOV	R1,R2		; WORD COUNT TO R2
   6445	014502	001425 				BEQ	70$		; LOGICAL END-OF-FILE IF .EQ. 0
   6446					;
   6447					; CONVERT AND DISCARD THE ADDRESS POINTER (FIXED-ADDRESS FILES ONLY)
   6448					;
   6449	014504					CALL	CNVWRD		; GET OVER THE ADDRESS WORD
	014504	004737 	014610'			 JSR	PC,CNVWRD
   6450	014510	103432 				BCS	RTFXIT		; ERROR IF CC-C IS SET
   6451					;
   6452					; THIS LOOP CONVERTS ALL WORDS IN ONE RECORD
   6453					;
   6454	014512				60$:
   6455	014512					CALL	CNVWRD		; CONVERT THE DATA
	014512	004737 	014610'			 JSR	PC,CNVWRD
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 146-2
$GETTF -- READ MF20 TIMING FILE DATA

   6456	014516	103427 				BCS	RTFXIT		; ERROR IF CC-C IS SET
   6457	014520	122700 	000054 			CMPB	#',,R0		; DELIMITER OK??
   6458	014524	001350 				BNE	30$		; NO -- COMPLAIN AND DIE
   6459	014526	010124 				MOV	R1,(R4)+	; YES -- RETURN CONVERTED WORD TO CALLER
   6460	014530	077210 				SOB	R2,60$		; GET ALL WORDS FROM THIS RECORD
   6461					;
   6462					; NOW VERIFY CHECKSUM
   6463					;
   6464	014532					CALL	CNVCHK		; READ THE CHECKSUM
	014532	004737 	014602'			 JSR	PC,CNVCHK
   6465	014536	103417 				BCS	RTFXIT		; ERROR IF CC-C IS SET
   6466	014540	005705 				TST	R5		; IS THE CHECKSUM OK??
   6467	014542	001730 				BEQ	20$		; YES -- GO ON TO THE NEXT RECORD
   6468	014544					PRINT	#TGTCKE		; NO -- COMPLAIN
	014544	012700 	002561'			 MOV	#TGTCKE,R0
	014550	004737 	027034'			 JSR	PC,$TTMSG
   6469	014554	000406 				BR	RTFERX		; AND EXIT
   6470						;
   6471					;
   6472					; HERE TO CLOSE THE FILE AND RETURN SUCCESS
   6473					;
   6474	014556				70$:
   6475	014556					CALLR	$CLOSE		; CLOSE THE FILE AND EXIT
	014556	000137 	006636'			 JMP	$CLOSE
   6476						;
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 147
$GETTF -- READ MF20 TIMING FILE DATA

   6478					;
   6479					; READ ERROR ROUTINE
   6480					;
   6481	014562				RTFERR:
   6482	014562					PRINT	#TGTRFE		; ERROR MESSAGE
	014562	012700 	002713'			 MOV	#TGTRFE,R0
	014566	004737 	027034'			 JSR	PC,$TTMSG
   6483					;
   6484					; CLOSE FILE FOR ERROR RETURN
   6485					;
   6486	014572				RTFERX:
   6487	014572					CALL	$CLOSE		; CLOSE THE FILE
	014572	004737 	006636'			 JSR	PC,$CLOSE
   6488	014576				RTFXIT:
   6489	014576	000261 				SEC			; SET THE ERROR FLAG
   6490	014600					RETURN			; TO CALLER
	014600	000207 				 RTS	PC
   6491					;
   6492					; MAIN CONVERSION SUBROUTINE
   6493					;
   6494					; UP TO THREE BYTES ARE READ FROM THE FILE AND CONVERTED TO BINARY
   6495					; THE RECORD CHECKSUM IS ALSO ACCUMULATED BY THIS ROUTINE
   6496					;
   6497					; INPUTS:
   6498					;
   6499					;	NONE
   6500					;
   6501					; OUTPUTS:
   6502					;
   6503					;	R0 -- LAST CHARACTER FROM FILE
   6504					;	R1 -- CONVERTED WORD
   6505					;	R5 -- UPDATED CHECKSUM
   6506					;
   6507						.ENABL	LSB
   6508	014602				CNVCHK:
   6509	014602	013703 	000530'			MOV	.SYIRC,R3	; SYNCHRONIZE THE BYTE COUNTS
   6510	014606	000402 				BR	10$		; COMPUTE THE FINAL CHECKSUM
   6511						;
   6512	014610				CNVWRD:
   6513	014610	012703 	000004 			MOV	#4,R3		; MAXIMUM FIELD WIDTH IS 4 BYTES
   6514	014614				10$:
   6515	014614	005001 				CLR	R1		; INIT RETURNED WORD
   6516	014616				20$:
   6517	014616					CALL	$READB		; READ A BYTE FROM THE FILE
	014616	004737 	010200'			 JSR	PC,$READB
   6518	014622	103757 				BCS	RTFERR		; ERROR IF CC-C IS SET
   6519	014624	122700 	000054 			CMPB	#',,R0		; NO -- END-OF-FIELD??
   6520	014630	001413 				BEQ	30$		; YES -- EXIT
   6521	014632					PUSH	R0		; NO -- CONVERT IT
	014632	010046 				 MOV	R0,-(SP)
   6522	014634	042716 	177700 			BIC	#^C77,(SP)	; SO
   6523	014640	006301 				ASL	R1		; POSITION PREVIOUS BYTE
   6524	014642	006301 				ASL	R1		; SO
   6525	014644	006301 				ASL	R1		; ...
   6526	014646	006301 				ASL	R1		; ...
   6527	014650	006301 				ASL	R1		; ...
   6528	014652	006301 				ASL	R1		; DONE
KLIGT -- READ MF20 TIMING FILE 	MACRO M1113  11-NOV-81 11:25  PAGE 147-1
$GETTF -- READ MF20 TIMING FILE DATA

   6529	014654	052601 				BIS	(SP)+,R1	; SET THE NEW BYTE IN THE WORD
   6530	014656	077321 				SOB	R3,20$		; AND TRY AGAIN
   6531	014660				30$:
   6532	014660	060105 				ADD	R1,R5		; UPDATE CHECKSUM
   6533	014662	000241 				CLC			; INSURE CC-C IS CLEAR
   6534	014664					RETURN			; TO CALLER
	014664	000207 				 RTS	PC
   6535
   6536						.DSABL	LSB
KLIMR -- KL RESET ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 148
$GETTF -- READ MF20 TIMING FILE DATA

   6538						.TITLE	KLIMR -- KL RESET ROUTINES
   6539	014666					IDENT$	5,0
						.IDENT	/005000/
   6540					;
   6541					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6542					;
   6543					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6544					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6545					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6546					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6547					;
   6548					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6549					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6550					; EQUIPMENT CORPORATION.
   6551					;
   6552					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6553					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6554					;
   6555					; VERSION 05-00
   6556					;
   6557					; ALAN D. PECKHAM  29-MAR-77
   6558					;
   6559					; MODIFIED BY:
   6560					;
   6561					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES TO DO A FULL MASTER RESET
   6562					;  AND A PARTIAL RESET FOR RAM ADDRESS CLEARING.
   6563					;
KLIMR -- KL RESET ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 149
$GETTF -- READ MF20 TIMING FILE DATA

   6565					;
   6566					; LOCAL DATA
   6567					;
   6568	001304					.PSECT	DATA,D
   6569	001304	035000 	001434'			.WORD	72*400,DMRKW2	; SELECT KW20/22 FOR MOS SYSTEMS
   6570	001310	022000 	000000'		DMRMRT:	.WORD	.LDSEL/2,.ZERO	; CLOCK LOAD FUNC #44
   6571	001314	100000 				.WORD	.STPCL/2+BIT15	; STOP THE CLOCK
   6572	001316	103400 				.WORD	.SETMR/2+BIT15	; SET RESET
   6573	001320	023000 	000000'			.WORD	.LDCK1/2,.ZERO	; LOAD CLK PARITY CHECK & FS CHECK
   6574	001324	023400 	000000'			.WORD	.LDCK2/2,.ZERO	; LOAD CLK MBOX CYCLE DISABLES,
   6575									; PARITY CHECK, ERROR STOP ENABLE
   6576	001330	021000 	000000'			.WORD	.LDBRR/2,.ZERO	; LOAD BURST COUNTER (8,4,2,1)
   6577	001334	021400 	000000'			.WORD	.LDBRL/2,.ZERO	; LOAD BURST COUNTER (128,64,32,16)
   6578	001340	022400 	000000'			.WORD	.LDDIS/2,.ZERO	; LOAD EBOX CLOCK DISABLE
   6579	001344	100400 				.WORD	.STRCL/2+BIT15	; START THE CLOCK
   6580	001346	034000 	000000'			.WORD	.INICL/2,.ZERO	; INIT CHANNELS
   6581	001352	021000 	000000'			.WORD	.LDBRR/2,.ZERO	; LOAD BURST COUNTER (8,4,2,1)
   6582	001356	000000 				.WORD	0
   6583	001360	102000 				.WORD	.CECLK/2+BIT15	; CONDITIONAL SINGLE STEP
   6584	001362	103000 				.WORD	.CLRMR/2+BIT15	; CLEAR RESET
   6585	001364	033400 	000000'			.WORD	.EIOJA/2,.ZERO	; ENABLE KL STL DECODING OF CODES & AC'S
   6586	001370	037000 	000000'			.WORD	.MEMRS/2,.ZERO	; SET KL10 MEM RESET FLOP
   6587	001374	034400 	001402'			.WORD	.WRMBX/2,DMRMMR	; WRITE M-BOX
   6588	001400	000000 				.WORD	0
   6589	001402				DMRMMR:	WD36$	0 12		; FOR MEMORY RESET
	001402	   012 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001405	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6590						.EVEN
   6591
   6592	001410	007000 			DMRSRT:	.WORD	.SETMR		; SET RESET.
   6593	001412	001000 				.WORD	.STRCL		; START THE CLOCK.
   6594	001414	000000 				.WORD	.STPCL		; STOP THE CLOCK.
   6595	001416	004000 				.WORD	.CECLK		; CONDITIONAL SINGLE STEP.
   6596	001420	006000 				.WORD	.CLRMR		; CLEAR RESET.
   6597		000005 			DMRSRL	=	.-DMRSRT/2	; LENGTH OF TABLE.
   6598	001422				DMRBF:	WD36$	0 0		; GENERAL BIT BUCKET.
	001422	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001425	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6599	001427				DMRMOS:	WD36$	0 10		; CLOCK PARAMETERS FOR MOS
	001427	   010 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001432	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6600	001434				DMRKW2:	WD36$	0 3		; KW-20/22 SELECT CODE
	001434	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001437	   000 	   000 			 .BYTE	BY$$3,BY$$4
   6601						.EVEN
   6602	002751					.PSECT	TEXT,D
   6603	002751				TMRMFL:	ERROR	<MASTER RESET FAILED>
	002751	   077 	   040 	   115 		 .ASCIZ	\? MASTER RESET FAILED\
	002754	   101 	   123 	   124
	002757	   105 	   122 	   040
	002762	   122 	   105 	   123
	002765	   105 	   124 	   040
	002770	   106 	   101 	   111
	002773	   114 	   105 	   104
	002776	   000
   6604	014666					.PSECT
KLIMR -- KL RESET ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 150
$KLMR	-- DO A MASTER RESET ON THE KL

   6606						.SBTTL	$KLMR	-- DO A MASTER RESET ON THE KL
   6607					;+
   6608					; RESET THE KL PROCESSOR.
   6609					;
   6610					; NO INPUTS
   6611					;
   6612					; OUTPUTS:
   6613					;	THE CARRY IS SET ON ANY ERROR AND AN ERROR MESSAGE IS DISPLAYED.
   6614					;-
   6615
   6616	014666	004537 	023142'		$KLMR::	JSR	R5,$RSAVE
   6617	014672					TRACK	MR
	014672	004037 	014704'			 JSR	R0,64$
	014676	051115 				 .WORD	"MR
	014700	000000 				 .WORD
	014702	000000 				 .WORD
	014704	004737 	023210'		64$:	 JSR	PC,$TRACK
	014710	012600 				 MOV	(SP)+,R0
   6618	014712	012700 	010000 			MOV	#.CLRUN,R0
   6619	014716					CALL	$DFXC		; CLEAR RUN
	014716	004737 	013540'			 JSR	PC,$DFXC
   6620	014722	103452 				BCS	80$		; TIMEOUT ERROR
   6621	014724	012737 	000100 	000300'		MOV	#DRESET,.DTEDT	; RESET BIT TO .DTEDT
   6622	014732					CALL	$DTRW2		; WRITE DTE-20 DIAG 2
	014732	004737 	023060'			 JSR	PC,$DTRW2
   6623	014736	103444 				BCS	80$		; ERROR
   6624	014740	012737 	053101 	000300'		MOV	#DON10C!ERR10C!INT11C!PERCLR!DON11C!ERR11C,.DTEDT
   6625									; CLEAR DTE-20 STATUS
   6626	014746					CALL	$DTRWS		; WRITE IT
	014746	004737 	023070'			 JSR	PC,$DTRWS
   6627	014752	103436 				BCS	80$
   6628	014754	012703 	001310'			MOV	#DMRMRT,R3	; SET UP TABLE AND
   6629	014760	105737 	000043'			TSTB	.MFSW		; SEE IF A MOS SYSTEM
   6630	014764	003401 				BLE	5$		; NO -- GO ON
   6631	014766	024343 				CMP	-(R3),-(R3)	; YES -- BE SURE TO SELECT KW20/22
   6632	014770				5$:
   6633	014770					CALL	LMRDFN		; DO FIRST SET OF FUNCTIONS.
	014770	004737 	015064'			 JSR	PC,LMRDFN
   6634	014774	103425 				BCS	80$
   6635	014776	012702 	000003 			MOV	#3,R2		; SET UP MAX LOOP COUNT
   6636	015002	012701 	001422'			MOV	#DMRBF,R1	; AND DIAGNOSTIC READ BUFFER.
   6637	015006	012700 	162000 		10$:	MOV	#<162*1000>,R0	; LOOK
   6638	015012					CALL	$DFRD		; FOR
	015012	004737 	013224'			 JSR	PC,$DFRD
   6639	015016	103414 				BCS	80$
   6640	015020	132711 	000010 			BITB	#10,(R1)	; "A CHANGE COMING A L"
   6641	015024	001406 				BEQ	20$
   6642	015026	012700 	002000 			MOV	#.SSCLK,R0	; SINGLE STEP THE MBOX
   6643	015032					CALL	$DFXC
	015032	004737 	013540'			 JSR	PC,$DFXC
   6644	015036	103404 				BCS	80$
   6645	015040	077216 				SOB	R2,10$		; ONLY 3 TIMES MAX.
   6646	015042				20$:	CALL	LMRDFN		; NOW FINISH THE JOB.
	015042	004737 	015064'			 JSR	PC,LMRDFN
   6647	015046	103005 				BCC	90$
   6648	015050				80$:	PRINT	#TMRMFL		; PRINT ERROR IF NEED BE.
	015050	012700 	002751'			 MOV	#TMRMFL,R0
KLIMR -- KL RESET ROUTINES	MACRO M1113  11-NOV-81 11:25  PAGE 150-1
$KLMR	-- DO A MASTER RESET ON THE KL

	015054	004737 	027034'			 JSR	PC,$TTMSG
   6649	015060	000261 				SEC
   6650	015062				90$:	RETURN
	015062	000207 				 RTS	PC
   6651
   6652	015064	012300 			LMRDFN:	MOV	(R3)+,R0	; FUNCTION TO BE PERFORMED
   6653	015066	006300 			10$:	ASL	R0		; GET ITS TYPE
   6654	015070	103004 				BCC	20$		; A WRITE OR
   6655	015072					CALL	$DFXC		; EXECUTE FUNCTION.
	015072	004737 	013540'			 JSR	PC,$DFXC
   6656	015076	103015 				BCC	30$		; SUCCESS
   6657	015100	000416 				BR	40$		; OR FAILURE.
   6658	015102	012301 			20$:	MOV	(R3)+,R1
   6659	015104	022700 	044000 			CMP	#.LDSEL,R0	; SET CLOCK PARAMETERS??
   6660	015110	001005 				BNE	25$		; NO -- GO ON
   6661	015112	105737 	000043'			TSTB	.MFSW		; YES -- MOS IN SYSTEM??
   6662	015116	003402 				BLE	25$		; NO -- GO ON
   6663	015120	012701 	001427'			MOV	#DMRMOS,R1	; YES -- POINT TO MOS DEFAULT
   6664	015124				25$:
   6665	015124					CALL	$DFWR
	015124	004737 	013336'			 JSR	PC,$DFWR
   6666	015130	103402 				BCS	40$
   6667	015132	012300 			30$:	MOV	(R3)+,R0	; IF MORE FUNCTIONS
   6668	015134	001354 				BNE	10$		; THEN CONTINUE.
   6669	015136				40$:	RETURN
	015136	000207 				 RTS	PC
   6670
   6671						.SBTTL	$KLSR	-- SOFT RESET FOR RAM LOADERS
   6672
   6673	015140				$KLSR::	PUSH	<R2,R1,R0>
	015140	010246 				 MOV	R2,-(SP)
	015142	010146 				 MOV	R1,-(SP)
	015144	010046 				 MOV	R0,-(SP)
   6674	015146					TRACK	SR
	015146	004037 	015160'			 JSR	R0,64$
	015152	051123 				 .WORD	"SR
	015154	000000 				 .WORD
	015156	000000 				 .WORD
	015160	004737 	023210'		64$:	 JSR	PC,$TRACK
	015164	012600 				 MOV	(SP)+,R0
   6675	015166	012702 	000005 			MOV	#DMRSRL,R2
   6676	015172	012701 	001410'			MOV	#DMRSRT,R1
   6677	015176	012100 			1$:	MOV	(R1)+,R0
   6678	015200					CALL	$DFXC
	015200	004737 	013540'			 JSR	PC,$DFXC
   6679	015204	103401 				BCS	9$
   6680	015206	077205 				SOB	R2,1$
   6681	015210				9$:	POP	<R0,R1,R2>
	015210	012600 				 MOV	(SP)+,R0
	015212	012601 				 MOV	(SP)+,R1
	015214	012602 				 MOV	(SP)+,R2
   6682	015216					RETURN
	015216	000207 				 RTS	PC
KLINI -- PROGRAM INITIALIZATION	MACRO M1113  11-NOV-81 11:25  PAGE 151
$KLSR	-- SOFT RESET FOR RAM LOADERS

   6684						.TITLE	KLINI -- PROGRAM INITIALIZATION
   6685	015220					IDENT$	12,06,KLI$$F
						.IDENT	/B12060/
   6686					;
   6687					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   6688					;
   6689					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   6690					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   6691					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   6692					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   6693					;
   6694					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   6695					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   6696					; EQUIPMENT CORPORATION.
   6697					;
   6698					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   6699					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6700					;
   6701					; VERSION 12-06
   6702					;
   6703					; ALAN D. PECKHAM  14-APR-77
   6704					;
   6705					; MODIFIED BY:
   6706					;
   6707					; R. BELANGER	16-JUL-79	ADD HARDWARE ENVIRONMENT REPORTING
   6708					;				TCO 4.2333
   6709					; R. BELANGER	06-DEC-78	MODIFY KEEP-ALIVE-CEASE HANDLING
   6710					;				TCO 4.2107
   6711					;
   6712					; FUNCTION: THIS MODULE ASSIGNS NEEDED I/O DEVICES, LOCATES THE SYSTEM
   6713					;  DIRECTORY, AND SETS DATA TO INDICATE INTERNAL
   6714					;  REQUESTS AND KL CONDITIONS.
   6715					;
   6716					; LOCAL MACROS
   6717					;
   6718						.MCALL	ALUN$,QIOW$S,EXIT$S,CLEF$S
   6719						.MACRO	KLIVR$ KEY,FRM,VER,EDT,NUM
   6720						.IF	B,NUM
   6721						.IF	NB,FRM
   6722						KLIVR$	\KEY,\FRM,\VER,\EDT,0
   6723						.IFF
   6724						KLIVR$	\KEY,200,\VER,\EDT,0
   6725						.ENDC
   6726						.MEXIT
   6727						.IFF
   6728						.IF	GE,VER-10
   6729						.IF	GE,EDT-10
   6730						MESSAGE	<VERSION \<KEY><FRM>\'VER'-'EDT'\<200>\ RUNNING>
   6731						.IFF
   6732						MESSAGE	<VERSION \<KEY><FRM>\'VER'-0'EDT'\<200>\ RUNNING>
   6733						.ENDC
   6734						.IFF
   6735						.IF	GE,EDT-10
   6736						MESSAGE	<VERSION \<KEY><FRM>\0'VER'-'EDT'\<200>\ RUNNING>
   6737						.IFF
   6738						MESSAGE	<VERSION \<KEY><FRM>\0'VER'-0'EDT'\<200>\ RUNNING>
   6739						.ENDC
KLINI -- PROGRAM INITIALIZATION	MACRO M1113  11-NOV-81 11:25  PAGE 151-1
$KLSR	-- SOFT RESET FOR RAM LOADERS

   6740						.ENDC
   6741						.ENDC
   6742						.ENDM	KLIVR$
   6743					;
   6744					; LOCAL DATA
   6745					;
   6746	001442					.PSECT	DATA,D
   6747	001442				DNITTI:
   6748	001442					ALUN$	TTILUN,TT,0
	001442	   007 	   004 			.BYTE	7,4
	001444	000001 				.WORD	TTILUN
	001446	   124 				.ASCII	/T/
	001447	   124 				.ASCII	/T/
	001450	000000 				.WORD	0
   6749	001452				DNITTO:
   6750	001452					ALUN$	TTOLUN,TT,0
	001452	   007 	   004 			.BYTE	7,4
	001454	000002 				.WORD	TTOLUN
	001456	   124 				.ASCII	/T/
	001457	   124 				.ASCII	/T/
	001460	000000 				.WORD	0
   6752	001462				DNILPO:
   6753	001462					ALUN$	LPOLUN,LP,0
	001462	   007 	   004 			.BYTE	7,4
	001464	000003 				.WORD	LPOLUN
	001466	   114 				.ASCII	/L/
	001467	   120 				.ASCII	/P/
	001470	000000 				.WORD	0
   6755	001472				DNISYI:
   6756	001472					ALUN$	SYILUN,SY,0
	001472	   007 	   004 			.BYTE	7,4
	001474	000004 				.WORD	SYILUN
	001476	   123 				.ASCII	/S/
	001477	   131 				.ASCII	/Y/
	001500	000000 				.WORD	0
   6757	001502				DNISYO:
   6758	001502					ALUN$	SYOLUN,SY,0
	001502	   007 	   004 			.BYTE	7,4
	001504	000005 				.WORD	SYOLUN
	001506	   123 				.ASCII	/S/
	001507	   131 				.ASCII	/Y/
	001510	000000 				.WORD	0
   6759	001512				DNISYF:
   6760	001512					ALUN$	SYFLUN,SY,0
	001512	   007 	   004 			.BYTE	7,4
	001514	000006 				.WORD	SYFLUN
	001516	   123 				.ASCII	/S/
	001517	   131 				.ASCII	/Y/
	001520	000000 				.WORD	0
   6761	002777					.PSECT	TEXT,D
   6762	002777				TNINDV:
   6763	002777					ERROR	<CANNOT GET DEVICES>
	002777	   077 	   040 	   103 		 .ASCIZ	\? CANNOT GET DEVICES\
	003002	   101 	   116 	   116
	003005	   117 	   124 	   040
	003010	   107 	   105 	   124
	003013	   040 	   104 	   105
KLINI -- PROGRAM INITIALIZATION	MACRO M1113  11-NOV-81 11:25  PAGE 151-2
$KLSR	-- SOFT RESET FOR RAM LOADERS

	003016	   126 	   111 	   103
	003021	   105 	   123 	   000
   6764	003024				TNIN55:
   6765	003024					ERROR	<CANNOT FIND [5,5] DIRECTORY>
	003024	   077 	   040 	   103 		 .ASCIZ	\? CANNOT FIND [5,5] DIRECTORY\
	003027	   101 	   116 	   116
	003032	   117 	   124 	   040
	003035	   106 	   111 	   116
	003040	   104 	   040 	   133
	003043	   065 	   054 	   065
	003046	   135 	   040 	   104
	003051	   111 	   122 	   105
	003054	   103 	   124 	   117
	003057	   122 	   131 	   000
   6766	003062				TNIPRI:
   6767	003062					ERROR	<CANNOT RUN KLINIT WHILE KL IS IN PRIMARY PROTOCOL>
	003062	   077 	   040 	   103 		 .ASCIZ	\? CANNOT RUN KLINIT WHILE KL IS IN PRIMARY PROTOCOL\
	003065	   101 	   116 	   116
	003070	   117 	   124 	   040
	003073	   122 	   125 	   116
	003076	   040 	   113 	   114
	003101	   111 	   116 	   111
	003104	   124 	   040 	   127
	003107	   110 	   111 	   114
	003112	   105 	   040 	   113
	003115	   114 	   040 	   111
	003120	   123 	   040 	   111
	003123	   116 	   040 	   120
	003126	   122 	   111 	   115
	003131	   101 	   122 	   131
	003134	   040 	   120 	   122
	003137	   117 	   124 	   117
	003142	   103 	   117 	   114
	003145	   000
   6768	003146				TNIVER:
   6769	003146					KLIVR$	KLI$$K,KLI$$F,KLI$$V,KLI$$E
	003146	   126 	   105 	   122 		 .ASCIZ	\VERSION \<126><102>\12-27\<200>\ RUNNING\
	003151	   123 	   111 	   117
	003154	   116 	   040 	   126
	003157	   102 	   061 	   062
	003162	   055 	   062 	   067
	003165	   200 	   040 	   122
	003170	   125 	   116 	   116
	003173	   111 	   116 	   107
	003176	   000
   6770	015220					.PSECT
KLINI -- PROGRAM INITIALIZATION	MACRO M1113  11-NOV-81 11:25  PAGE 152
$INIT	-- PROGRAM INITIALIZATION

   6772						.SBTTL	$INIT	-- PROGRAM INITIALIZATION
   6773					;+
   6774					;	GET KL FUNCTION WORD
   6775					;-
   6776
   6777	015220				$INIT::
   6778	015220	105037 	000024'			CLRB	.DLGSW		; CLEAR DIALOG SWITCH.
   6779	015224	013737 	000000G	000056'		MOV	.KLIWD,.KLISV	; SAVE .KLIWD
   6780	015232	001003 				BNE	10$
   6781	015234	005037 	000000G			CLR	.DATE3		; CLEAR .DATE3 IF .KLIWD=0
   6782	015240	000404 				BR	20$
   6783						;
   6784	015242				10$:
   6785	015242	005037 	000000G			CLR	.KLIWD		; CLEAR .KLIWD TO AVOID DOING THIS AGAIN
   6786	015246	105337 	000024'			DECB	.DLGSW		; AND INDICATE INTERNAL PATH TO BE TAKEN.
   6787
   6788					;+
   6789					;	ASSIGN LOGICAL UNIT NUMBERS (LUN) TO DEVICES
   6790					;-
   6791
   6792	015252				20$:
   6793	015252					DIR$	#DNITTI		; SET TTILUN AS TT0:
	015252	012746 	001442'			MOV	#DNITTI,-(SP)
	015256	104375 				EMT	375
   6794	015260	103430 				BCS	30$
   6795	015262					DIR$	#DNITTO		; SET TTOLUN AS TT0:
	015262	012746 	001452'			MOV	#DNITTO,-(SP)
	015266	104375 				EMT	375
   6796	015270	103424 				BCS	30$
   6798	015272					DIR$	#DNILPO		; SET LPOLUN AS LP0:
	015272	012746 	001462'			MOV	#DNILPO,-(SP)
	015276	104375 				EMT	375
   6799	015300	103420 				BCS	30$
   6801	015302	032737 	000000G	000056'		BIT	#KL.KAC,.KLISV	; [4.2107] KEEP-ALIVE ERROR??
   6802	015310	001130 				BNE	80$		; [4.2107] YES -- DON'T NEED SY:
   6803	015312					DIR$	#DNISYI		; SET SYILUN AS SY0:
	015312	012746 	001472'			MOV	#DNISYI,-(SP)
	015316	104375 				EMT	375
   6804	015320	103410 				BCS	30$
   6805	015322					DIR$	#DNISYO		; SET SYOLUN AS SY0:
	015322	012746 	001502'			MOV	#DNISYO,-(SP)
	015326	104375 				EMT	375
   6806	015330	103404 				BCS	30$
   6807	015332					DIR$	#DNISYF		; SET SYFLUN AS SY0:
	015332	012746 	001512'			MOV	#DNISYF,-(SP)
	015336	104375 				EMT	375
   6808	015340	103007 				BCC	40$
   6809	015342				30$:
   6810	015342					PRINT	#TNINDV		; CAN'T GET DEVICES
	015342	012700 	002777'			 MOV	#TNINDV,R0
	015346	004737 	027034'			 JSR	PC,$TTMSG
   6811	015352					EXIT$S			; WE'RE THROUGH.
	015352	012746 				MOV	(PC)+,-(SP)
	015354	   063 	   001 			.BYTE	51.,1
	015356	104375 				EMT	375
   6812					;+
   6813					;	FIND DIRECTORY FILE FROM MASTER FILE DIRECTORY
KLINI -- PROGRAM INITIALIZATION	MACRO M1113  11-NOV-81 11:25  PAGE 152-1
$INIT	-- PROGRAM INITIALIZATION

   6814					;-
   6815	015360				40$:
   6816	015360					QIOW$S	#IO.FNA,#SYILUN,#1,,#.SYSTA,,<,,,,,#.SYFNB>
	015360	012746 	002614'			MOV	#.SYFNB,-(SP)
	015364	005046 				CLR	-(SP)
	015366	005046 				CLR	-(SP)
	015370	005046 				CLR	-(SP)
	015372	005046 				CLR	-(SP)
	015374	005046 				CLR	-(SP)
	015376	005046 				CLR	-(SP)
	015400	012746 	000522'			MOV	#.SYSTA,-(SP)
	015404	005046 				CLR	-(SP)
	015406	112716 	000001 			MOVB	#1,(SP)
	015412	012746 	000004 			MOV	#SYILUN,-(SP)
	015416	012746 	000000G			MOV	#IO.FNA,-(SP)
	015422	012746 				MOV	(PC)+,-(SP)
	015424	   003 	   014 			.BYTE	3,$$$T1
	015426	104375 				EMT	375
   6817	015430	103403 				BCS	50$
   6818	015432	105737 	000522'			TSTB	.SYSTA
   6819	015436	002007 				BGE	60$
   6820	015440				50$:
   6821	015440					PRINT	#TNIN55		; NO DIRECTORY...
	015440	012700 	003024'			 MOV	#TNIN55,R0
	015444	004737 	027034'			 JSR	PC,$TTMSG
   6822	015450					EXIT$S
	015450	012746 				MOV	(PC)+,-(SP)
	015452	   063 	   001 			.BYTE	51.,1
	015454	104375 				EMT	375
   6823	015456				60$:
   6824	015456	013737 	002614'	002640'		MOV	.SYFNB+0,.SYFNB+24 ; MOVE UP DIRECTORY FID.
   6825	015464	013737 	002616'	002642'		MOV	.SYFNB+2,.SYFNB+26
   6826	015472	013737 	002620'	002644'		MOV	.SYFNB+4,.SYFNB+30
   6827					;+
   6828					;	MAKE SURE SECONDARY PROTOCOL IS RUNNING
   6829					;-
   6830	015500	105737 	000024'			TSTB	.DLGSW		; IF NOT INTERNAL REQUEST
   6831	015504	002416 				BLT	70$
   6832	015506	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ; CHECK CURRENT PROTOCOL.
   6833	015514	001412 				BEQ	70$		; IF PRIMARY,
   6834	015516	032737 	000006 	000000G		BIT	#6,.FEMOD	; AND CONSOLE IS IN
   6835	015524	001006 				BNE	70$		; OPERATOR MODE, THEN
   6836	015526					PRINT	#TNIPRI		; REPRIMAND OPERATOR
	015526	012700 	003062'			 MOV	#TNIPRI,R0
	015532	004737 	027034'			 JSR	PC,$TTMSG
   6837	015536	000137 	022760'			JMP	$EXIT		; AND DIE.
   6838						;
   6839	015542				70$:
   6840	015542	052737 	000000G	000002G		BIS	#EF.CRI,.COMEF+2 ; DECLARE COMM REGION INVALID
   6841	015550	013737 	000000G	000060'		MOV	.CPUSN,.SNSAV	; [4.2333] SAVE OLD SERIAL NUMBER
   6842	015556	005037 	000000G			CLR	.CPUSN		; [4.2333] ALLOW ENVRIONMENT READ
   6843	015562					PRINT	#TNIVER		; HELLO, OPERATOR !
	015562	012700 	003146'			 MOV	#TNIVER,R0
	015566	004737 	027034'			 JSR	PC,$TTMSG
   6844	015572				80$:				; [4.2107]
   6845	015572					RETURN
	015572	000207 				 RTS	PC
KLIPC -- KL PC READ FUNCTION MO	MACRO M1113  11-NOV-81 11:25  PAGE 152-2
$INIT	-- PROGRAM INITIALIZATION

   6846					.TITLE	KLIPC -- KL PC READ FUNCTION MODULE 7603.30
   6847
   6848						.IDENT	"001010"
   6849
   6850					;	COPYRIGHT 1976, DIGITAL EQUIPMENT CORP., MARLBORO, MASSACHUSETTS  01752.
   6851					;
   6852					;	THE MATERIAL INCLUDED IN THIS FUNCTIONAL  SPECIFICATION,  INCLUDING  BUT
   6853					;	NOT   LIMITED   TO,  INSTRUCTION  TIMES  AND  OPERATING  SPEEDS  IS  FOR
   6854					;	INFORMATION PURPOSES ONLY.  ALL  SUCH  MATERIAL  IS  SUBJECT  TO  CHANGE
   6855					;	WITHOUT NOTICE.  CONSEQUENTLY DEC MAKES NO CLAIM AND SHALL NOT BE LIABLE
   6856					;	FOR ITS ACCURACY.
   6857					;
   6858					;	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE
   6859					;	ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6860					;
   6861					;
   6862					;		MODULE: KL VMA BOARD READ FUNCTION
   6863					;
   6864					;		VERSION: 01-01
   6865					;
   6866					;		AUTHOR: R. BELANGER
   6867					;
   6868					;		DATE: 7603.30
   6869					;
   6870					;	THIS MODULE CONTAINS:
   6871					;
   6872					;	1) KL PC READ CODE
   6873					;
   6874					;	LOCAL DATA
   6875					;
   6876	003177					.PSECT	TEXT,D
   6877	003177				PCERRM:
   6878	003177					ERROR	<READ PC FAILED>
	003177	   077 	   040 	   122 		 .ASCIZ	\? READ PC FAILED\
	003202	   105 	   101 	   104
	003205	   040 	   120 	   103
	003210	   040 	   106 	   101
	003213	   111 	   114 	   105
	003216	   104 	   000
   6879	015574				.PSECT
KLIPC -- KL PC READ FUNCTION MO	MACRO M1113  11-NOV-81 11:25  PAGE 153
$DFPC -- KL PC READ SUBROUTINE 7510.21

   6881					.SBTTL	$DFPC -- KL PC READ SUBROUTINE 7510.21
   6882
   6883					;+
   6884					; $DFPC -- SUBROUTINE TO READ THE KL PROGRAM COUNTER REGISTER
   6885					;
   6886					; THESE SUBROUTINES READ AND ASSEMBLE THE DESIRED VMA BOARD REGISTER
   6887					; INTO A THREE WORD BLOCK POINTED TO BY R0 IN THE CALL.
   6888					;
   6889					; INPUT ARGUMENTS:
   6890					;
   6891					;	R0 POINTS TO A THREE WORD BUFFER FOR THE SPECIFIED REGISTER
   6892					;
   6893					; OUTPUT ARGUMENTS:
   6894					;
   6895					;	R0 POINTS TO A THREE WORD BUFFER FOR THE SPECIFIED REGISTER
   6896					;
   6897					; ERROR CODES RETURNED:
   6898					;
   6899					;	CC-C SET ON ERROR.
   6900					;-
   6901
   6902	015574				$DFPC::
   6903	015574					CALL	R5,$RSAVE	; SAVE R5 - R1 ON THE STACK
	015574	004537 	023142'			 JSR	R5,$RSAVE
   6904	015600	012705 	177776 			MOV	#-2,R5		; BASE SHIFT COUNT TO R5
   6905	015604	012704 	000004 			MOV	#^D4,R4		; ITERATION COUNT TO R4
   6906	015610	010003 				MOV	R0,R3		; USER BUFFER ADDRESS TO R3
   6907	015612	012702 	000150 			MOV	#150,R2		; FUNCTION READ BASE TO R2
   6908	015616					PUSH	#135673		; MASK WORD TO TOP OF THE STACK
	015616	012746 	135673 			 MOV	#135673,-(SP)
   6909	015622	005020 				CLR	(R0)+		; .CLEAR CALLER'S AREA
   6910	015624	005020 				CLR	(R0)+		; .SO
   6911	015626	005010 				CLR	(R0)		; .
   6912	015630				10$:
   6913	015630	010200 				MOV	R2,R0		; .SET THE FUNCTION READ NUMBER
   6914	015632	006300 				ASL	R0		; .TIMES 2
   6915	015634	000300 				SWAB	R0		; .IN THE HIGH BYTE
   6916	015636	005001 				CLR	R1		; .CLEAR R1
   6917	015640					CALL	$DFRD		; .READ IT
	015640	004737 	013224'			 JSR	PC,$DFRD
   6918	015644	103423 				BCS	30$		; .EXIT IF ERROR
   6919	015646	012700 	000262'			MOV	#.DFRBK,R0	; .BUFFER POINTER TO R0
   6920	015652	041620 				BIC	(SP),(R0)+	; .SP POINTS TO BIT MASK
   6921	015654	041610 				BIC	(SP),(R0)	; .R0 POINTS TO READ BLOCK
   6922	015656	005740 				TST	-(R0)		; .BACK THE POINTER UP
   6923	015660	010501 				MOV	R5,R1		; .SHIFT COUNT TO R1
   6924	015662					CALL	.TPSHI		; .SHIFT THE BITS INTO POSITION
	015662	004737 	015730'			 JSR	PC,.TPSHI
   6925	015666	052023 				BIS	(R0)+,(R3)+	; .SET THE BITS IN THE USER BUFFER
   6926	015670	051013 				BIS	(R0),(R3)	; .SO
   6927	015672	005743 				TST	-(R3)		; .BACK CALLER'S POINTER UP
   6928	015674	122225 				CMPB	(R2)+,(R5)+	; .INCREMENT READ NUMBER AND SHIFT COUNT
   6929	015676	077424 				SOB	R4,10$		; .DO THIS FOUR TIMES
   6930	015700	042763 	177600 	000002 		BIC	#177600,2(R3)	; .GET RID OF BITS HIGHER THAN 13
   6931	015706	000241 				CLC			; .CLEAR CC-C
   6932	015710				20$:
   6933	015710	005226 				INC	(SP)+		; CLEAR THE STACK
KLIPC -- KL PC READ FUNCTION MO	MACRO M1113  11-NOV-81 11:25  PAGE 153-1
$DFPC -- KL PC READ SUBROUTINE 7510.21

   6934	015712					RETURN			; RETURN TO CALLER
	015712	000207 				 RTS	PC
   6935	015714				30$:
   6936	015714					PRINT	#PCERRM		; TELL OPERATOR ABOUT ERROR
	015714	012700 	003177'			 MOV	#PCERRM,R0
	015720	004737 	027034'			 JSR	PC,$TTMSG
   6937	015724	000261 				SEC			; SET ERROR FLAG
   6938	015726	000770 				BR	20$		; AND EXIT
   6939						;
KLIPC -- KL PC READ FUNCTION MO	MACRO M1113  11-NOV-81 11:25  PAGE 154
$DFPC -- KL PC READ SUBROUTINE 7510.21

   6941	015730				.TPSHI::
   6942	015730					PUSH	R1		; SAVE R1 FROM DESTRUCTION
	015730	010146 				 MOV	R1,-(SP)
   6943	015732	001416 				BEQ	30$		; .ON ZERO DO NOTHING
   6944	015734	003002 				BGT	10$		; .REALLY MEANS LEFT
   6945	015736	005401 				NEG	R1		; .MEANS RIGHT, SO NEGATE
   6946	015740	000406 				BR	20$		; .AND GO RIGHT
   6947						;
   6948	015742				10$:
   6949	015742	006320 				ASL	(R0)+		; .CLEAR CC-C AND SHIFT
   6950	015744	006120 				ROL	(R0)+		; .USE CC-C AND SHIFT
   6951	015746	006110 				ROL	(R0)		; .
   6952	015750	024040 				CMP	-(R0),-(R0)	; .POINT BACK TO BEGINNING
   6953	015752	077105 				SOB	R1,10$		; .AND LOOP 'TILL DONE
   6954	015754	000405 				BR	30$		; .DONE -- EXIT
   6955						;
   6956	015756				20$:				; .HERE TO SHIFT RIGHT
   6957	015756	022020 				CMP	(R0)+,(R0)+	; .FIX POINTER TO POINT TO HIGH PART
   6958	015760	006210 				ASR	(R0)		; .SHIFT HIGH PART
   6959	015762	006040 				ROR	-(R0)		; .THEN MIDDLE PART
   6960	015764	006040 				ROR	-(R0)		; .THEN LOW PART
   6961	015766	077105 				SOB	R1,20$		; .UNTIL DONE
   6962	015770				30$:
   6963	015770					POP	R1		; .RESTORE R1
	015770	012601 				 MOV	(SP)+,R1
   6964	015772					RETURN			; AND RETURN TO CALLER
	015772	000207 				 RTS	PC
KLREC  -  KL FAULT RECOVERY	MACRO M1113  11-NOV-81 11:25  PAGE 155
$DFPC -- KL PC READ SUBROUTINE 7510.21

   6966						.TITLE	KLREC  -  KL FAULT RECOVERY
   6967						.IDENT	/012270/
   6968
   6969					;	COPYRIGHT 1976, DIGITAL EQUIPMENT CORP., MARLBORO, MASSACHUSETTS  01752.
   6970					;
   6971					;	THE MATERIAL INCLUDED IN THIS FUNCTIONAL  SPECIFICATION,  INCLUDING  BUT
   6972					;	NOT   LIMITED   TO,  INSTRUCTION  TIMES  AND  OPERATING  SPEEDS  IS  FOR
   6973					;	INFORMATION PURPOSES ONLY.  ALL  SUCH  MATERIAL  IS  SUBJECT  TO  CHANGE
   6974					;	WITHOUT NOTICE.  CONSEQUENTLY DEC MAKES NO CLAIM AND SHALL NOT BE LIABLE
   6975					;	FOR ITS ACCURACY.
   6976					;
   6977					;	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE
   6978					;	ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   6979					;
   6980					;
   6981					;		MODULE: KL FAULT CONTINUATION
   6982					;
   6983					;		VERSION: 12-27
   6984					;
   6985					;		AUTHOR: S. LEAPLINE
   6986					;
   6987					;		DATE: 8003.06
   6988					;
   6989					;	THIS MODULE CONTAINS:
   6990					;
   6991					;	1) KL PC FLAG READ CODE
   6992					;	2) KL PC READ CODE
   6993					;	3) KL DEPOSIT MEMORY CODE
   6994					;
KLREC  -  KL FAULT RECOVERY	MACRO M1113  11-NOV-81 11:25  PAGE 156
$KLREC -- KL FAULT CONTINUATION

   6996						.SBTTL	$KLREC -- KL FAULT CONTINUATION
   6997
   6998					;+
   6999					; $KLREC  SUBROUTINE TO READ THE KL PC REGISTER AND DEPOSIT IT INTO KL
   7000					;	  MEMORY AT ADDRESS 100 WITH AN ERROR CODE IN 101.
   7001					;
   7002					;
   7003					; INPUT ARGUMENTS:
   7004					;
   7005					;	NONE.
   7006					;
   7007					; OUTPUT ARGUMENTS:
   7008					;
   7009					;	CC-C SET IF ERROR
   7010					;
   7011					; LOCAL DEFINETIONS
   7012
   7013		000001 				BIT00=1
   7014		000100 				FR.100=100
   7015		000101 				FR.101=101
   7016		000132 				FR.132=132
   7017		010000 				PC.OVF=10000
KLREC  -  KL FAULT RECOVERY	MACRO M1113  11-NOV-81 11:25  PAGE 157
$KLREC -- KL FAULT CONTINUATION

   7019	015774				$KLREC::
   7020	015774	005737 	000000G			TST	.KLERW			;ANY ERROS TO REPORT ?
   7021	016000	001002 				BNE	5$			; YES, GO LOOK FOR CONTINUEABLE ONES
   7022	016002	000137 	016422'			JMP	90$			; NO, WHY EVEN LOOK
   7023	016006				5$:
   7024	016006	005001 				CLR	R1			; CLEAR R1
   7025	016010	005002 				CLR	R2			; AND R2
   7026	016012	012700 	000101 			MOV	#FR.101,R0		; FR CODE FOR LOW FLAGS
   7027	016016					CALL	$DDFRD			; READ THEM
	016016	004737 	013220'			 JSR	PC,$DDFRD
   7028	016022	103416 				BCS	7$			; BRANCH IF ERROR
   7029	016024	012700 	000262'			MOV	#.DFRBK,R0		; GET THE ADDRESS OF THE DATA
   7030	016030	012701 	177764 			MOV	#-^D12,R1		; SHIFT COUNT TO R1
   7031	016034					CALL	.TPSHI			; SHIFT OUR WORD
	016034	004737 	015730'			 JSR	PC,.TPSHI
   7032	016040	042710 	177700 			BIC	#177700,(R0)		; MASK OUT FLAG BITS
   7033	016044	051002 				BIS	(R0),R2			; PUT THE LOW FLAGS IN R2
   7034	016046	005001 				CLR	R1			; AGAIN
   7035	016050	012700 	000100 			MOV	#FR.100,R0		; FR CODE FOR MOST OF THE FLAGS
   7036	016054					CALL	$DDFRD			; READ THEM
	016054	004737 	013220'			 JSR	PC,$DDFRD
   7037	016060	103560 			7$:	BCS	90$			; BRANCH IF ERROR
   7038	016062	012700 	000262'			MOV	#.DFRBK,R0		; ADDRESS OF RETURNED DATA
   7039	016066	012701 	177772 			MOV	#-^D6,R1		; SHIFT COUNT TO R1
   7040	016072					CALL	.TPSHI			; SHIFT THE DATA
	016072	004737 	015730'			 JSR	PC,.TPSHI
   7041	016076	042710 	170077 			BIC	#170077,(R0)		; JUST THE BITS WE WANT
   7042	016102	051002 				BIS	(R0),R2			; SAVE THE HIGH FLAGS IN R2
   7043	016104	005001 				CLR	R1			; CLEAR R1 AGAIN
   7044	016106	012700 	000132 			MOV	#FR.132,R0		; FR CODE FOR LAST FLAG BIT
   7045	016112					CALL	$DDFRD			; READ IT
	016112	004737 	013220'			 JSR	PC,$DDFRD
   7046	016116	103541 				BCS	90$			; BRANCH IF ERROR
   7047	016120	012700 	000262'			MOV	#.DFRBK,R0		; ADDRESS OF RETURNED DATA
   7048	016124	032760 	000001 	000004 		BIT	#BIT00,4(R0)		; IS IT ON?
   7049	016132	001402 				BEQ	10$			; NO -- JUST EXIT
   7050	016134	052702 	010000 			BIS	#PC.OVF,R2		; YES -- SET IT IN OUR WORD
   7051	016140				10$:
   7052	016140	010200 				MOV	R2,R0			; COPY TO R0
   7053	016142					PUSH	R0			; PC FLAGS TO THE STACK
	016142	010046 				 MOV	R0,-(SP)
   7054	016144	005046 				CLR	-(SP)			; .CLEAR A THREE WORD BLOCK
   7055	016146	005046 				CLR	-(SP)			; ..
   7056	016150	010600 				MOV	SP,R0			; ...POINTER OF THE BLOCK TO R0
   7057	016152	005046 				CLR	-(SP)			; ...CLEAR A THREE WORD BLOCK FOR THE PC
   7058	016154	005046 				CLR	-(SP)			; ....
   7059	016156	005046 				CLR	-(SP)			; .....
   7060	016160	010001 				MOV	R0,R1			; ......POINTER TO FLAGS IN R1
   7061	016162	010600 				MOV	SP,R0			; ......POINTER TO PC BLOCK IN R0
   7062	016164					PUSH	R1			; ......SAVE R1
	016164	010146 				 MOV	R1,-(SP)
   7063	016166					CALL	$DFPC			; .......READ THE PC
	016166	004737 	015574'			 JSR	PC,$DFPC
   7064	016172	103514 				BCS	95$			; .......BRANCH IF ERROR
   7065	016174					POP	R1			; .......GET POINTER TO FLAGS BACK
	016174	012601 				 MOV	(SP)+,R1
   7066	016176	052621 				BIS	(SP)+,(R1)+		; ......SET PC INTO PC FLAGS
KLREC  -  KL FAULT RECOVERY	MACRO M1113  11-NOV-81 11:25  PAGE 157-1
$KLREC -- KL FAULT CONTINUATION

   7067	016200	052621 				BIS	(SP)+,(R1)+		; .....
   7068	016202	052611 				BIS	(SP)+,(R1)		; ....
   7069	016204	034141 				BIT	-(R1),-(R1)		; ...BACK UP THE POINTER TO BEGINNING
   7070	016206	012700 	002664'			MOV	#KLPCRG,R0		; ...ADDRESS TO SAVE THE PC REGISTER
   7071	016212	012120 				MOV	(R1)+,(R0)+		; ...SAVE IT
   7072	016214	012120 				MOV	(R1)+,(R0)+		; ...
   7073	016216	011110 				MOV	(R1),(R0)		; ...
   7074	016220	032737 	000000G	000000G		BIT	#KS.EPE,.KLERW		; ...EBUS PARITY ERROR ?
   7075	016226	001404 				BEQ	20$			; ...BRANCH IF NOT
   7076	016230	012737 	000002 	002672'		MOV	#EPE,.ERCOD		; ...ERROR CODE ON THE STACK
   7077	016236	000467 				BR	80$			; ...DO COMMON CODE
   7078	016240				20$:
   7079	016240	032737 	000000G	000000G		BIT	#KS.DEX,.KLERW		; ...DEX FAILURE ?
   7080	016246	001404 				BEQ	25$			; ...BRANCH IF NOT
   7081	016250	012737 	000003 	002672'		MOV	#DXE,.ERCOD		; ...ERROR CODE TO STACK
   7082	016256	000457 				BR	80$			; ...DO COMMON CODE
   7083	016260				25$:
   7084	016260	032737 	000000G	000000G		BIT	#KS.CST,.KLERW		; ...KEEP ALIVE CEASE ERROR ?
   7085	016266	001404 				BEQ	30$			; ...BRANCH IF NOT
   7086	016270	012737 	000004 	002672'		MOV	#CST,.ERCOD		; ...ERROR CODE
   7087	016276	000447 				BR	80$			; ...DO COMMON CODE
   7088	016300				30$:
   7089	016300	032737 	000000G	000000G		BIT	#KS.PTO,.KLERW		; ...PROTOCOL TIMEOUT ?
   7090	016306	001404 				BEQ	35$			; ...BRANCH IF NOT
   7091	016310	012737 	000005 	002672'		MOV	#PTO,.ERCOD		; ...ERROR CODE
   7092	016316	000437 				BR	80$			; ...DO COMMON CODE
   7093	016320				35$:
   7094	016320	032737 	000000G	000000G		BIT	#KS.FME,.KLERW		; ...FAST MEMORY PARITY ERROR ?
   7095	016326	001404 				BEQ	40$			; ...BRANCH IF NOT
   7096	016330	012737 	000006 	002672'		MOV	#FME,.ERCOD		; ...ERROR CODE
   7097	016336	000427 				BR	80$			; ...DO COMMON CODE
   7098	016340				40$:
   7099	016340	032737 	000000G	000000G		BIT	#KS.CPE,.KLERW		; ...CRAM PARITY ERROR ?
   7100	016346	001404 				BEQ	45$			; ...BRANCH IF NOT
   7101	016350	012737 	000007 	002672'		MOV	#CPE,.ERCOD		; ...ERROR CODE
   7102	016356	000417 				BR	80$			; ...DO COMMON CODE
   7103	016360				45$:
   7104	016360	032737 	000000G	000000G		BIT	#KS.DPE,.KLERW		; ...DRAM PARITY ERROR ?
   7105	016366	001404 				BEQ	50$			; ...BRANCH IF NOT
   7106	016370	012737 	000010 	002672'		MOV	#DPE,.ERCOD		; ...ERROR CODE
   7107	016376	000407 				BR	80$			; ...DO COMMON CODE
   7108	016400				50$:
   7109	016400	032737 	000000G	000000G		BIT	#KS.CES,.KLERW		; ...CLOCK ERROR STOP ?
   7110	016406	001403 				BEQ	80$			; ...BRANCH IF NOT
   7111	016410	012737 	000001 	002672'		MOV	#CES,.ERCOD		; ...ERROR CODE
   7112	016416				80$:
   7113	016416	032626 				BIT	(SP)+,(SP)+		; ...CLEAR THE STACK , BUT DON'T
   7114	016420	032616 				BIT	(SP)+,(SP)		; .CLEAR THE CC-C BIT
   7115	016422				90$:
   7116	016422					RETURN				;EXIT
	016422	000207 				 RTS	PC
   7117	016424				95$:
   7118	016424					POP	R1			;.......RESTORE POINTER
	016424	012601 				 MOV	(SP)+,R1
   7119	016426	032626 				BIT	(SP)+,(SP)+		;......CLEAN UP THE STACK PERSERVING
   7120	016430	032626 				BIT	(SP)+,(SP)+		;....CC-C BIT
   7121	016432	032626 				BIT	(SP)+,(SP)+		;..
KLREC  -  KL FAULT RECOVERY	MACRO M1113  11-NOV-81 11:25  PAGE 157-2
$KLREC -- KL FAULT CONTINUATION

   7122	016434	000772 				BR	90$			;REJOIN NORMAL CODE
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 158
$KLREC -- KL FAULT CONTINUATION

   7124						.TITLE	KLIQB -- ASK BOOT LOAD QUESTIONS
   7125	016436					IDENT$	12,27								; ADP01
						.IDENT	/012270/
   7126					;
   7127					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7128					;
   7129					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7130					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7131					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7132					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7133					;
   7134					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7135					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7136					; EQUIPMENT CORPORATION.
   7137					;
   7138					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7139					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7140					;
   7141					; VERSION 12-27
   7142					;
   7143					; ALAN D. PECKHAM  12-APR-77
   7144					;
   7145					; MODIFIED BY:
   7146					;
   7147					; FUNCTION: THIS MODULE DETERMINES WHETHER THE BOOT IS TO BE LOADED
   7148					;  AND WHAT BOOT IS TO BE USED.
   7149					;
   7150					; LOCAL DATA
   7151					;
   7152	003220					.PSECT	TEXT,D
   7153	003220				TQBOOT:
   7154	003220					MESSAGE	<LOAD KL BOOTSTRAP [FILE,YES,NO,FILENAME]?>
	003220	   114 	   117 	   101 		 .ASCIZ	\LOAD KL BOOTSTRAP [FILE,YES,NO,FILENAME]?\
	003223	   104 	   040 	   113
	003226	   114 	   040 	   102
	003231	   117 	   117 	   124
	003234	   123 	   124 	   122
	003237	   101 	   120 	   040
	003242	   133 	   106 	   111
	003245	   114 	   105 	   054
	003250	   131 	   105 	   123
	003253	   054 	   116 	   117
	003256	   054 	   106 	   111
	003261	   114 	   105 	   116
	003264	   101 	   115 	   105
	003267	   135 	   077 	   000
   7155	003272				TQBWCF:
   7156	003272					MESSAGE	<WRITE CONFIGURATION FILE [YES,NO]?>
	003272	   127 	   122 	   111 		 .ASCIZ	\WRITE CONFIGURATION FILE [YES,NO]?\
	003275	   124 	   105 	   040
	003300	   103 	   117 	   116
	003303	   106 	   111 	   107
	003306	   125 	   122 	   101
	003311	   124 	   111 	   117
	003314	   116 	   040 	   106
	003317	   111 	   114 	   105
	003322	   040 	   133 	   131
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 158-1
$KLREC -- KL FAULT CONTINUATION

	003325	   105 	   123 	   054
	003330	   116 	   117 	   135
	003333	   077 	   000
   7157	003335				TQBNFL:
   7158	003335					WARNING	<NO FILE - LOADING BOOTSTRAP>
	003335	   045 	   040 	   116 		 .ASCIZ	\% NO FILE - LOADING BOOTSTRAP\
	003340	   117 	   040 	   106
	003343	   111 	   114 	   105
	003346	   040 	   055 	   040
	003351	   114 	   117 	   101
	003354	   104 	   111 	   116
	003357	   107 	   040 	   102
	003362	   117 	   117 	   124
	003365	   123 	   124 	   122
	003370	   101 	   120 	   000
   7159	001522					.PSECT	DATA,D
   7160	001522				DQBFNM::
   7161	001522	043240 	000000 	000000 		.RAD50	/KL       CFG/	; CONFIGURATION FILE NAME
	001530	011667
   7162	001532	000000 				.WORD	0
   7163	001534	   005 	   005 			.BYTE	5,5
   7164	001536	054523 	000000 			.WORD	"SY,0
   7165	016436					.PSECT
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 159
$DLGBT	-- ASK IF LOADING BOOT IS REQUIRED

   7167						.SBTTL	$DLGBT	-- ASK IF LOADING BOOT IS REQUIRED
   7168
   7169					;+
   7170					; $DLGBT -- ASK WHETHER OR NOT TO LOAD THE KL BOOTSTRAP
   7171					;
   7172					; INPUTS:
   7173					;
   7174					;	NONE
   7175					;
   7176					; OUTPUTS:
   7177					;
   7178					;	NONE
   7179					;-
   7180
   7181	016436				$DLGBT::
   7182	016436	105037 	000046'			CLRB	.BTSW		; RESET BOOT SWITCH
   7183	016442	105037 	000033'			CLRB	.DBSW		; RESET FILE SOURCE
   7184	016446	105037 	000026'			CLRB	.UFNSW		; AND FILENAME SWITCH.
   7185	016452	105737 	000024'			TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   7186	016456	001030 				BNE	20$		; LOAD DEFAULT BOOTSTRAP.
   7187	016460				10$:
   7188	016460					PRINT	#TQBOOT		; ASK QUESTION
	016460	012700 	003220'			 MOV	#TQBOOT,R0
	016464	004737 	027034'			 JSR	PC,$TTMSG
   7189	016470					CALL	$TTRD		; READ ANSWER
	016470	004737 	026330'			 JSR	PC,$TTRD
   7190	016474	012705 	000302'			MOV	#.TTIBF,R5
   7191	016500	105715 				TSTB	(R5)		;  CR ?
   7192	016502	001416 				BEQ	20$		; READ BOOTSTRAP SPECIFICATION FROM FILE
   7193	016504	022715 	044506 			CMP	#"FI,(R5)	;  [FILE]?
   7194	016510	001413 				BEQ	20$		; READ BOOTSTRAP SPECIFICATION FROM FILE
   7195	016512	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7196	016516	001433 				BEQ	50$		; LOAD DEFAULT BOOTSTRAP
   7197	016520	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   7198	016524	001411 				BEQ	30$		; ASK NEXT QUESTION.
   7199	016526	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   7200	016532	001011 				BNE	40$		; NO, MUST BE FILENAME...
   7201	016534	000137 	022624'			JMP	$DLGMV		; ASK TO CONFIGURE MEMORY.
   7202						;
   7203	016540				20$:
   7204	016540					CALL	LQBRBF		; SEE IF WE SHOULD LOAD THE BOOT
	016540	004737 	016760'			 JSR	PC,LQBRBF
   7205	016544	103430 				BCS	80$		; ERROR IF CC-C IS SET
   7206	016546	000421 				BR	60$		; AND EXIT
   7207						;
   7208	016550				30$:
   7209	016550	105337 	000046'			DECB	.BTSW		; RESPONSE IS "NO"
   7210	016554	000416 				BR	60$		; ASK NEXT QUESTION.
   7211						;
   7212	016556				40$:
   7213	016556	012700 	000474'			MOV	#.USRFN,R0	; GET FILENAME BLOCK,				; ADP01
   7214	016562	012701 				MOV	(PC)+,R1
   7215	016564	021402 				.RAD50	/EXB/		; SET DEFAULT EXTENSION,
   7216	016566	010160 	000006 			MOV	R1,6(R0)
   7217	016572					CALL	$TRF2B		; AND GET FILE NAME.
	016572	004737 	024346'			 JSR	PC,$TRF2B
   7218	016576	105715 				TSTB	(R5)		; IF NOT PROPERLY TERMINATED
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 159-1
$DLGBT	-- ASK IF LOADING BOOT IS REQUIRED

   7219	016600	001005 				BNE	70$		; THEN INFORM THE OPERATOR.
   7220	016602	105237 	000026'			INCB	.UFNSW		; INDICATE FILE SPECIFIED
   7221	016606				50$:
   7222	016606	105237 	000046'			INCB	.BTSW		; SET RESPONSE TO "YES"
   7223	016612				60$:
   7224	016612	000407 				BR	$DLWCF		; ASK NEXT QUESTION
   7225						;
   7226	016614				70$:
   7227	016614					PRINT	#COMCSE		; ALL THUMBS...
	016614	012700 	004705'			 MOV	#COMCSE,R0
	016620	004737 	027034'			 JSR	PC,$TTMSG
   7228	016624	000715 				BR	10$
   7229						;
   7230	016626				80$:
   7231	016626	000137 	022750'			JMP	$ERROR		; ERROR EXIT
   7232						;
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 160
$DLWCF  -- ASK IF CONFIGURATION FILE IS TO BE WRITTEN

   7234						.SBTTL	$DLWCF  -- ASK IF CONFIGURATION FILE IS TO BE WRITTEN
   7235
   7236					;+
   7237					; $DLWCF -- ASK IF CONFIGURATION FILE IS THE BE WRITTEN
   7238					;
   7239					; INPUTS:
   7240					;
   7241					;	NONE
   7242					;
   7243					; OUTPUTS:
   7244					;
   7245					;	FILE WRITE SWITCH, ".FILSW", IS SET UP
   7246					;-
   7247
   7248	016632				$DLWCF::
   7249	016632	105037 	000045'			CLRB	.FILSW		; RESET FILE SWITCH
   7250	016636	105737 	000024'			TSTB	.DLGSW		; ARE WE IN DIALOG MODE??
   7251	016642	001035 				BNE	40$		; NO -- JUST EXIT
   7252	016644				10$:
   7253	016644					PRINT	#TQBWCF		; ASK THE QUESTION
	016644	012700 	003272'			 MOV	#TQBWCF,R0
	016650	004737 	027034'			 JSR	PC,$TTMSG
   7254	016654					CALL	$TTRD		; READ THE RESPONSE
	016654	004737 	026330'			 JSR	PC,$TTRD
   7255	016660	012705 	000302'			MOV	#.TTIBF,R5	; POINT TO INPUT BUFFER
   7256	016664	105715 				TSTB	(R5)		; DEFAULT??
   7257	016666	001416 				BEQ	20$		; YES -- GO ON
   7258	016670	022715 	042531 			CMP	#"YE,(R5)	; NO -- IS IT "YES"??
   7259	016674	001413 				BEQ	20$		; YES -- GO ON
   7260	016676	022715 	047516 			CMP	#"NO,(R5)	; NO -- IS IT "NO"??
   7261	016702	001413 				BEQ	30$		; YES -- GO ON
   7262	016704	022715 	040502 			CMP	#"BA,(R5)	; NO -- IS IT "BACK"??
   7263	016710	001652 				BEQ	$DLGBT		; YES -- SO BACK UP
   7264	016712					PRINT	#COMCSE		; BLEW IT..
	016712	012700 	004705'			 MOV	#COMCSE,R0
	016716	004737 	027034'			 JSR	PC,$TTMSG
   7265	016722	000750 				BR	10$		; TRY ONCE MORE
   7266						;
   7267	016724				20$:
   7268	016724	105237 	000045'			INCB	.FILSW		; SAY WRITE THE FILE
   7269	016730	000402 				BR	40$		; AND GO ON
   7270						;
   7271	016732				30$:
   7272	016732	105337 	000045'			DECB	.FILSW		; SAY DON'T WRITE THE FILE
   7273	016736				40$:
   7274	016736	105737 	000046'			TSTB	.BTSW		; EXAMINE BOOT SWITCH
   7275	016742	100004 				BPL	50$		; SAID LOAD IT
   7276	016744					CALL	$TENS1		; [TCO 4.2275] FINISH KL INIT
	016744	004737 	023474'			 JSR	PC,$TENS1
   7277	016750	000137 	017524'			JMP	$DLGEX		; SAID DON'T LOAD IT
   7278						;
   7279	016754				50$:
   7280	016754	000137 	022656'			JMP	$CFGBT		; LOAD THE BOOT
   7281						;
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 161
LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG

   7283						.SBTTL	LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG
   7284
   7285	016760				LQBRBF::
   7286	016760	105037 	000026'			CLRB	.UFNSW		; INDICATE NO FILE NAME SPECIFIED
   7287	016764	012700 	001522'			MOV	#DQBFNM,R0	; POINT TO THE FILENAME
   7288	016770					CALL	$LOOKUP		; LOOK IT UP
	016770	004737 	007342'			 JSR	PC,$LOOKUP
   7289	016774	103022 				BCC	30$		; ALL OK IF CC-C IS CLEAR
   7290	016776	122737 	000000G	000522'		CMPB	#IE.NSF,.SYSTA	; NON-EXISTENT FILE??
   7291	017004	001063 				BNE	70$		; NO -- BIG TROUBLE
   7292	017006	105737 	000024'			TSTB	.DLGSW		; ARE WE IN DIALOG MODE??
   7293	017012	100004 				BPL	10$		; YES -- GO ON
   7294	017014	032737 	000000G	000056'		BIT	#KL.LVB,.KLISV	; NO -- DOES HE WANT THE BOOT LOADED??
   7295	017022	001461 				BEQ	90$		; NO -- JUST EXIT
   7296	017024				10$:
   7297	017024					PRINT	#TQBNFL		; YES -- WARN OPERATOR
	017024	012700 	003335'			 MOV	#TQBNFL,R0
	017030	004737 	027034'			 JSR	PC,$TTMSG
   7298	017034				20$:
   7299	017034	105237 	000046'			INCB	.BTSW		; INDICATE TO LOAD THE BOOTSTRAP
   7300	017040	000452 				BR	90$		; AND EXIT
   7301						;
   7302	017042				30$:
   7303	017042					CALL	$READC		; GET A RECORD FROM THE FILE
	017042	004737 	007776'			 JSR	PC,$READC
   7304	017046	103444 				BCS	80$		; ERROR IF CC-C IS SET
   7305	017050	022700 	000003 			CMP	#3,R0		; ONE WE'RE LOOKING FOR??
   7306	017054	001411 				BEQ	50$		; YES -- READ THE DATA
   7307	017056	005700 				TST	R0		; NO -- END-OF-FILE??
   7308	017060	001003 				BNE	40$		; NO -- SKIP THIS RECORD
   7309	017062					CALL	$CLOSE		; YES -- CLOSE THE FILE
	017062	004737 	006636'			 JSR	PC,$CLOSE
   7310	017066	000762 				BR	20$		; AND SAY LOAD THE BOOTSTRAP
   7311						;
   7312	017070				40$:
   7313	017070					CALL	$READS		; SKIP THIS RECORD
	017070	004737 	010034'			 JSR	PC,$READS
   7314	017074	103431 				BCS	80$		; ERROR IF CC-C IS SET
   7315	017076	000761 				BR	30$		; OK -- LOOK AT NEXT RECORD
   7316						;
   7317	017100				50$:
   7318	017100					CALL	$READB		; READ THE BYTE INTO R0
	017100	004737 	010200'			 JSR	PC,$READB
   7319	017104	103425 				BCS	80$		; ERROR IF CC-C IS SET
   7320	017106	110037 	000046'			MOVB	R0,.BTSW	; SAVE THE BOOT SWITCH
   7321	017112					CALL	$READB		; READ THE FILE-NAME SWITCH
	017112	004737 	010200'			 JSR	PC,$READB
   7322	017116	103420 				BCS	80$		; ERROR IF CC-C IS SET
   7323	017120	110037 	000026'			MOVB	R0,.UFNSW	; SET THE FILENAME SWITCH
   7324	017124	001413 				BEQ	70$		; EXIT IF NONE
   7325	017126	012701 	000004 			MOV	#4,R1		; SET UP TO READ FILENAME
   7326	017132	012702 	000474'			MOV	#.USRFN,R2	; POINT TO FILENAME BLOCK
   7327	017136				60$:
   7328	017136					CALL	$READW		; READ A WORD OF THE FILENAME
	017136	004737 	010104'			 JSR	PC,$READW
   7329	017142	103406 				BCS	80$		; ERROR IF CC-C IS SET
   7330	017144	010022 				MOV	R0,(R2)+	; LOAD IT INTO THE FILE-NAME BLOCK
KLIQB -- ASK BOOT LOAD QUESTION	MACRO M1113  11-NOV-81 11:25  PAGE 161-1
LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG

   7331	017146	077105 				SOB	R1,60$		; UNTIL DONE
   7332	017150	105237 	000026'			INCB	.UFNSW		; INDICATE FILE NAME SPECIFIED
   7333	017154				70$:
   7334	017154					CALLR	$CLOSE		; CLOSE THE FILE AND EXIT
	017154	000137 	006636'			 JMP	$CLOSE
   7335						;
   7336	017160				80$:
   7337	017160					CALL	$PURGE		; ERROR -- PURGE FILE
	017160	004737 	007704'			 JSR	PC,$PURGE
   7338	017164	000261 				SEC			; SET ERROR FLAG
   7339	017166				90$:
   7340	017166					RETURN			; TO CALLER
	017166	000207 				 RTS	PC
KLIQC -- ASK CACHE QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 162
LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG

   7342						.TITLE	KLIQC -- ASK CACHE QUESTIONS
   7343	017170					IDENT$	5,0
						.IDENT	/005000/
   7344					;
   7345					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7346					;
   7347					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7348					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7349					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7350					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7351					;
   7352					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7353					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7354					; EQUIPMENT CORPORATION.
   7355					;
   7356					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7357					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7358					;
   7359					; VERSION 05-00
   7360					;
   7361					; ALAN D. PECKHAM  14-APR-77
   7362					;
   7363					; MODIFIED BY:
   7364					;
   7365					; FUNCTION: IF THERE IS CACHE, THIS MODULE DETERMINES HOW IT IS TO BE
   7366					;  LOADED AND WHETHER IT IS TO BE ENABLED.
   7367					;
   7369					; LOCAL DATA
   7370					;
   7371	003373					.PSECT	TEXT,D
   7372	003373				TQCACH:	MESSAGE	<RECONFIGURE CACHE [FILE,ALL,YES,NO]?>
	003373	   122 	   105 	   103 		 .ASCIZ	\RECONFIGURE CACHE [FILE,ALL,YES,NO]?\
	003376	   117 	   116 	   106
	003401	   111 	   107 	   125
	003404	   122 	   105 	   040
	003407	   103 	   101 	   103
	003412	   110 	   105 	   040
	003415	   133 	   106 	   111
	003420	   114 	   105 	   054
	003423	   101 	   114 	   114
	003426	   054 	   131 	   105
	003431	   123 	   054 	   116
	003434	   117 	   135 	   077
	003437	   000
   7373	003440				TQCCEN:	MESSAGE	<ENABLE WHICH CACHES [ALL,NONE,0-3]?>
	003440	   105 	   116 	   101 		 .ASCIZ	\ENABLE WHICH CACHES [ALL,NONE,0-3]?\
	003443	   102 	   114 	   105
	003446	   040 	   127 	   110
	003451	   111 	   103 	   110
	003454	   040 	   103 	   101
	003457	   103 	   110 	   105
	003462	   123 	   040 	   133
	003465	   101 	   114 	   114
	003470	   054 	   116 	   117
	003473	   116 	   105 	   054
	003476	   060 	   055 	   063
	003501	   135 	   077 	   000
KLIQC -- ASK CACHE QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 162-1
LQBRBF -- SUBROUTINE TO READ SAVED BOOT FLAG

   7374	017170					.PSECT
KLIQC -- ASK CACHE QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 163
$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED

   7376						.SBTTL	$DLGCA	-- ASK IF CACHE IS TO BE CONFIGURED
   7377
   7378	017170	105737 	000041'		$DLGCA::TSTB	.CASW		; IF THERE IS NO CACHE
   7379	017174	002452 				BLT	40$		; THEN GO ON TO NEXT QUESTION.
   7380	017176	105037 	000031'			CLRB	.DCSW		; RESET CACHE CONTROL SWITCH.
   7381	017202	105737 	000024'			TSTB	.DLGSW		; DEFAULT PATH TO BE TAKEN ?
   7382	017206	003055 				BGT	70$		; YES, RECONFIGURE CACHE.
   7383	017210	002440 				BLT	30$		; INTERNAL PATH TO BE TAKEN.
   7384	017212				10$:	PRINT	#TQCACH		; ASK IF CACHE IS TO BE CONFIGURED
	017212	012700 	003373'			 MOV	#TQCACH,R0
	017216	004737 	027034'			 JSR	PC,$TTMSG
   7385	017222					CALL	$TTRD		; AND READ ANSWER.
	017222	004737 	026330'			 JSR	PC,$TTRD
   7386	017226	012705 	000302'			MOV	#.TTIBF,R5
   7387	017232	105715 				TSTB	(R5)		;  CR ?
   7388	017234	001442 				BEQ	70$		; GIVE HIM LAST CONFIGURATION.
   7389	017236	022715 	044506 			CMP	#"FI,(R5)	;  [FILE] ?
   7390	017242	001437 				BEQ	70$		; GIVE HIM LAST CONFIGURATION.
   7391	017244	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   7392	017250	001432 				BEQ	60$		; GIVE HIM ALL CACHE.
   7393	017252	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7394	017256	001433 				BEQ	LQCCM		; GO ON TO NEXT QUESTION.
   7395	017260	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   7396	017264	001416 				BEQ	40$		; IGNORE CACHE.
   7397	017266	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   7398	017272	001405 				BEQ	20$		; GO TO RAM QUESTION.
   7399	017274					PRINT	#COMCSE		; MUST BE SOME MISTAKE...
	017274	012700 	004705'			 MOV	#COMCSE,R0
	017300	004737 	027034'			 JSR	PC,$TTMSG
   7400	017304	000742 				BR	10$		; ASK QUESTION AGAIN.
   7401	017306	000137 	020476'		20$:	JMP	$DLGRM		; BACK UP TO RAM QUESTION.
   7402	017312	032737 	000000G	000056'	30$:	BIT	#KL.LCA,.KLISV	; INTERNAL REQUEST MADE ?
   7403	017320	001002 				BNE	50$		; YES, RECONFIGURE CACHE.
   7404	017322	000137 	017644'		40$:	JMP	$DLGMM		; BYPASS CACHE CONFIGURATION.
   7405	017326	032737 	000000G	000056'	50$:	BIT	#KL.CFL,.KLISV	; IF NOT TO GET FROM FILE
   7406	017334	001402 				BEQ	70$		; THEN
   7407	017336	105337 	000031'		60$:	DECB	.DCSW		; INDICATE TO USE ALL CACHES AND
   7408	017342	000137 	022602'		70$:	JMP	$CFGCA		; GO TO CONFIGURE CACHE.
KLIQC -- ASK CACHE QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 164
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

   7410						.SBTTL	LQCCM	-- ASK WHICH CACHES TO CONFIGURE
   7411
   7412	017346				LQCCM:	PRINT	#TQCCEN		;ASK WHICH CACHES HE WANTS
	017346	012700 	003440'			 MOV	#TQCCEN,R0
	017352	004737 	027034'			 JSR	PC,$TTMSG
   7413	017356					CALL	$TTRD		;AND GET HIS ANSWER.
	017356	004737 	026330'			 JSR	PC,$TTRD
   7414	017362	012705 	000302'			MOV	#.TTIBF,R5
   7415	017366	005004 				CLR	R4		;INITIALIZE CACHE COUNTER.
   7416	017370	105715 				TSTB	(R5)		; CR ?
   7417	017372	001443 				BEQ	7$		;GIVE HIM ALL CACHES.
   7418	017374	022715 	046101 			CMP	#"AL,(R5)	; [ALL] ?
   7419	017400	001440 				BEQ	7$		;GIVE HIM ALL CACHES.
   7420	017402	022715 	047516 			CMP	#"NO,(R5)	; [NONE] ?
   7421	017406	001427 				BEQ	6$		;DON'T TOUCH THE CACHE.
   7422	017410	022715 	040502 			CMP	#"BA,(R5)	; [BACKUP] ?
   7423	017414	001665 				BEQ	$DLGCA		;ASK LAST QUESTION.
   7424	017416				3$:	CALL	$TRI2B		;GET A NUMBER -
	017416	004737 	024624'			 JSR	PC,$TRI2B
   7425	017422	103433 				BCS	9$		;IS IT
   7426	017424	022700 	000004 			CMP	#4,R0		;WITHIN RANGE ?
   7427	017430	003430 				BLE	9$
   7428	017432	012701 	000063'			MOV	#.CACHN,R1	;YES, CHECK MODULE TABLE
   7429	017436	110403 				MOVB	R4,R3		;TO SEE IF GIVEN BEFORE.
   7430	017440	001403 				BEQ	5$		;OKAY - EMPTY TABLE.
   7431	017442	120021 			4$:	CMPB	R0,(R1)+
   7432	017444	001422 				BEQ	9$
   7433	017446	077303 				SOB	R3,4$
   7434	017450	105204 			5$:	INCB	R4		;ONE MORE MODULE -
   7435	017452	110011 				MOVB	R0,(R1)		;PUT IN TABLE.
   7436	017454	122725 	000054 			CMPB	#',,(R5)+	;LEGAL SEPERATOR ?
   7437	017460	001756 				BEQ	3$		;YES, GET ANOTHER NUMBER.
   7438	017462	105745 				TSTB	-(R5)		;END OF LINE ?
   7439	017464	001012 				BNE	9$		;NO, ASK QUESTION AGAIN.
   7440	017466	110437 	000062'		6$:	MOVB	R4,.NCACH	;SET NUMBER OF CACHES,
   7441	017472	105237 	000031'			INCB	.DCSW		;INDICATE CONFIGURATION SET AND
   7442	017476	000137 	022602'			JMP	$CFGCA		;GO TO CONFIGURE CACHE.
   7443	017502	105337 	000031'		7$:	DECB	.DCSW		;INDICATE TO USE ALL CACHES AND
   7444	017506	000137 	022602'			JMP	$CFGCA		;GO TO CONFIGURE CACHE.
   7445	017512				9$:	PRINT	#COMCSE		;MUST HAVE MIS-TYPED...
	017512	012700 	004705'			 MOV	#COMCSE,R0
	017516	004737 	027034'			 JSR	PC,$TTMSG
   7446	017522	000711 				BR	LQCCM		;ASK QUESTION AGAIN.
KLIQE --  ASK EXIT QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 165
LQCCM	-- ASK WHICH CACHES TO CONFIGURE

   7449						.TITLE	KLIQE --  ASK EXIT QUESTIONS
   7450	017524					IDENT$	11,0,KLI$$F
						.IDENT	/B11000/
   7451					;
   7452					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7453					;
   7454					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7455					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7456					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7457					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7458					;
   7459					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7460					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7461					; EQUIPMENT CORPORATION.
   7462					;
   7463					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7464					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7465					;
   7466					; VERSION 11-00
   7467					;
   7468					; ALAN D. PECKHAM  12-APR-77
   7469					;
   7470					; MODIFIED BY:
   7471					;
   7472					; FUNCTION: THIS MODULE ALLOWS THE OPERATOR TO RESTART THE DIALOG
   7473					;  OR EXIT FROM KLINIT. IT ALSO DISPATHES INTERNAL REQUESTS FOR
   7474					;  SPECIAL KL RESTARTS SUCH AS POWER FAIL.
   7475					;
   7476					; LOCAL DATA
   7477					;
   7478	003504					.PSECT	TEXT,D
   7479	003504				TQEXIT:
   7480	003504					MESSAGE	<EXIT [YES,RESTART]?>
	003504	   105 	   130 	   111 		 .ASCIZ	\EXIT [YES,RESTART]?\
	003507	   124 	   040 	   133
	003512	   131 	   105 	   123
	003515	   054 	   122 	   105
	003520	   123 	   124 	   101
	003523	   122 	   124 	   135
	003526	   077 	   000
   7481	017524					.PSECT
KLIQE --  ASK EXIT QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 166
$DLGEX	-- ASK WHERE TO EXIT

   7483						.SBTTL	$DLGEX	-- ASK WHERE TO EXIT
   7484
   7485	017524				$DLGEX::
   7486	017524	105737 	000024'			TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   7487	017530	003041 				BGT	50$		; NORMAL EXIT.
   7488	017532	002434 				BLT	40$		; TAKE INTERNAL PATH.
   7489	017534				10$:
   7490	017534					PRINT	#TQEXIT		; ASK QUESTION
	017534	012700 	003504'			 MOV	#TQEXIT,R0
	017540	004737 	027034'			 JSR	PC,$TTMSG
   7491	017544					CALL	$TTRD		; READ ANSWER
	017544	004737 	026330'			 JSR	PC,$TTRD
   7492	017550	012705 	000302'			MOV	#.TTIBF,R5
   7493	017554	105715 				TSTB	(R5)		;  CR ?
   7494	017556	001426 				BEQ	50$		; NORMAL EXIT.
   7495	017560	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7496	017564	001423 				BEQ	50$		; NORMAL EXIT.
   7497	017566	022715 	042522 			CMP	#"RE,(R5)	;  [RESTART] ?
   7498	017572	001412 				BEQ	30$		; GO TO FIRST QUESTION.
   7499	017574	022715 	040502 			CMP	#"BA,(R5)	;  [BACK] ?
   7500	017600	001405 				BEQ	20$		; ASK PREVIOUS QUESTION.
   7501	017602					PRINT	#COMCSE		; FUMBLE FINGERS...
	017602	012700 	004705'			 MOV	#COMCSE,R0
	017606	004737 	027034'			 JSR	PC,$TTMSG
   7502	017612	000750 				BR	10$		; ASK QUESTION AGAIN.
   7503						;
   7504	017614				20$:
   7505	017614	000137 	016632'			JMP	$DLWCF		; ASK TO WRITE CONFIGURATION FILE.
   7506						;
   7507	017620				30$:
   7508	017620	000137 	020754'			JMP	$DLGEN		; ASK IF DIALOG NECESSARY.
   7509						;
   7510	017624				40$:
   7511	017624	032737 	000000G	000056'		BIT	#KL.SPF,.KLISV	; INTERNAL REQUEST ?
   7512	017632	001002 				BNE	60$		; START KL ON POWER FAIL.
   7517	017634				50$:
   7518	017634	000137 	022760'			JMP	$EXIT		; NORMAL EXIT FROM KLINIT
   7519						;
   7520	017640				60$:
   7521	017640	000137 	022256'			JMP	$POWER		; START KL ON POWER FAIL.
   7522						;
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 167
$DLGEX	-- ASK WHERE TO EXIT

   7529						.TITLE	KLIQM -- ASK MEMORY QUESTIONS
   7530	017644					IDENT$	12,15,KLI$$F
						.IDENT	/B12150/
   7531					;
   7532					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7533					;
   7534					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7535					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7536					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7537					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7538					;
   7539					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7540					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7541					; EQUIPMENT CORPORATION.
   7542					;
   7543					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7544					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7545					;
   7546					; VERSION 12-15
   7547					;
   7548					; ALAN D. PECKHAM  12-APR-77
   7549					;
   7550					; MODIFIED BY:
   7551					;
   7552					; R. BELANGER	07-NOV-79	FIX BUG IN MF-20 CONFIGURATION
   7553					;				TCO 4.1.1009
   7554					;
   7555					; R BELANGER	11-JUL-79	ADD FORCE RECONFIGURATION OPTION AND
   7556					;				FORCE RECONFIGURATION ON MF-20
   7557					;				POWER FAIL.
   7558					;				TCO 4.2322
   7559					;
   7560					; R. BELANGER	02-MAR-79	ADD REVERSE MEMORY CONFIGURATION OPTION
   7561					;				TCO 4.2204
   7562					; R. BELANGER	25-JUL-78	INTEGRATE WITH MOS CONFIGURATOR
   7563					;
   7564					; FUNCTION: IF REQUESTED, THIS MODULE GETS ALL INFORMATION NECESSARY TO
   7565					;  CONFIGURE THE KL MEMORY.
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 168
$DLGEX	-- ASK WHERE TO EXIT

   7567					;
   7568					; LOCAL DATA
   7569					;
   7570	003530					.PSECT	TEXT,D
   7571	003530				TQMCF0:
   7572	003530					MESSAGE	<CONFIGURE KL MEMORY [FILE,ALL,REVERSE,YES,NO]?>
	003530	   103 	   117 	   116 		 .ASCIZ	\CONFIGURE KL MEMORY [FILE,ALL,REVERSE,YES,NO]?\
	003533	   106 	   111 	   107
	003536	   125 	   122 	   105
	003541	   040 	   113 	   114
	003544	   040 	   115 	   105
	003547	   115 	   117 	   122
	003552	   131 	   040 	   133
	003555	   106 	   111 	   114
	003560	   105 	   054 	   101
	003563	   114 	   114 	   054
	003566	   122 	   105 	   126
	003571	   105 	   122 	   123
	003574	   105 	   054 	   131
	003577	   105 	   123 	   054
	003602	   116 	   117 	   135
	003605	   077 	   000
   7573	003607				TQMCF1:
   7574	003607					MESSAGE	<CONFIGURE KL MEMORY [FILE,ALL,REVERSE,FORCE,YES,NO]?>
	003607	   103 	   117 	   116 		 .ASCIZ	\CONFIGURE KL MEMORY [FILE,ALL,REVERSE,FORCE,YES,NO]?\
	003612	   106 	   111 	   107
	003615	   125 	   122 	   105
	003620	   040 	   113 	   114
	003623	   040 	   115 	   105
	003626	   115 	   117 	   122
	003631	   131 	   040 	   133
	003634	   106 	   111 	   114
	003637	   105 	   054 	   101
	003642	   114 	   114 	   054
	003645	   122 	   105 	   126
	003650	   105 	   122 	   123
	003653	   105 	   054 	   106
	003656	   117 	   122 	   103
	003661	   105 	   054 	   131
	003664	   105 	   123 	   054
	003667	   116 	   117 	   135
	003672	   077 	   000
   7575	003674				TQMNM0:
   7576	003674					ERROR	<NO MEMORY AT LOCATION ZERO>
	003674	   077 	   040 	   116 		 .ASCIZ	\? NO MEMORY AT LOCATION ZERO\
	003677	   117 	   040 	   115
	003702	   105 	   115 	   117
	003705	   122 	   131 	   040
	003710	   101 	   124 	   040
	003713	   114 	   117 	   103
	003716	   101 	   124 	   111
	003721	   117 	   116 	   040
	003724	   132 	   105 	   122
	003727	   117 	   000
   7577	003731				TQMPCA:
   7578	003731					WARNING	<PHYSICAL MEMORY CONFIGURATION ALTERED - DUMP OR RESTART SUPPRESSED>
	003731	   045 	   040 	   120 		 .ASCIZ	\% PHYSICAL MEMORY CONFIGURATION ALTERED - DUMP OR RESTART SUPPRESSED\
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 168-1
$DLGEX	-- ASK WHERE TO EXIT

	003734	   110 	   131 	   123
	003737	   111 	   103 	   101
	003742	   114 	   040 	   115
	003745	   105 	   115 	   117
	003750	   122 	   131 	   040
	003753	   103 	   117 	   116
	003756	   106 	   111 	   107
	003761	   125 	   122 	   101
	003764	   124 	   111 	   117
	003767	   116 	   040 	   101
	003772	   114 	   124 	   105
	003775	   122 	   105 	   104
	004000	   040 	   055 	   040
	004003	   104 	   125 	   115
	004006	   120 	   040 	   117
	004011	   122 	   040 	   122
	004014	   105 	   123 	   124
	004017	   101 	   122 	   124
	004022	   040 	   123 	   125
	004025	   120 	   120 	   122
	004030	   105 	   123 	   123
	004033	   105 	   104 	   000
   7579	017644					.PSECT
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 169
$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY

   7581						.SBTTL	$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY
   7582
   7583	017644				$DLGMM::
   7584	017644	105037 	000032'			CLRB	.DMSW		; CLEAR MEMORY CONTROL.
   7585	017650	005037 	000232'			CLR	.CFMRV		; [4.2204] ASSUME NORMAL CONFIGURATION
   7586	017654					CALL	MBINI		; INIT THE MEMORY BOOT
	017654	004737 	000000G			 JSR	PC,MBINI
   7587	017660	032737 	000000G	000056'		BIT	#KL.SPF,.KLISV	; POWER-FAIL RECOVERY??
   7588	017666	001403 				BEQ	5$		; NO -- GO ON
   7589	017670	112737 	177777 	000000G		MOVB	#-1,KEEPBB	; [4.2322] YES -- KEEP BAD MF20 BLOCKS
   7590	017676				5$:
   7591	017676	105737 	000024'			TSTB	.DLGSW		; TEST CONFIGURATION SWITCH.
   7592	017702	003110 				BGT	90$		; USE LAST CONFIGURATION.
   7593	017704	002460 				BLT	40$		; TAKE INTERNAL PATH.
   7594	017706				10$:
   7595	017706	012700 	003530'			MOV	#TQMCF0,R0	; [4.2322] ASSUME NO MF-20'S
   7596	017712	105737 	000043'			TSTB	.MFSW		; [4.2322] ARE THERE ANY MF-20'S??
   7597	017716	003402 				BLE	15$		; [4.2322] NO -- GO ON
   7598	017720	012700 	003607'			MOV	#TQMCF1,R0	; [4.2322] YES -- SELECT PROPER MESSAGE
   7599	017724				15$:				; [4.2322]
   7600	017724					CALL	$TTMSG		; [4.2322] ASK THE  QUESTION
	017724	004737 	027034'			 JSR	PC,$TTMSG
   7601	017730					CALL	$TTRD		; READ ANSWER.
	017730	004737 	026330'			 JSR	PC,$TTRD
   7602	017734	012705 	000302'			MOV	#.TTIBF,R5
   7603	017740	105715 				TSTB	(R5)		;  CR ?
   7604	017742	001470 				BEQ	90$		; USE LAST CONFIGURATION.
   7605	017744	022715 	044506 			CMP	#"FI,(R5)	;  [FILE] ?
   7606	017750	001465 				BEQ	90$		; USE LAST CONFIGURATION.
   7607	017752	022715 	046101 			CMP	#"AL,(R5)	;  [ALL] ?
   7608	017756	001460 				BEQ	80$		; CONFIGURE ALL MEMORY.
   7609	017760	022715 	042522 			CMP	#"RE,(R5)	; [4.2204]  [REVERSE] ?
   7610	017764	001443 				BEQ	55$		; [4.2204] YES -- DO IT
   7611	017766	022715 	047506 			CMP	#"FO,(R5)	; [4.2322]  [FORCE] ?
   7612	017772	001432 				BEQ	45$		; [4.2322] YES -- DO IT
   7613	017774	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7614	020000	001437 				BEQ	60$		; GO ON TO NEXT QUESTION.
   7615	020002	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   7616	020006	001430 				BEQ	50$		; SKIP MEMORY CONFIGURATION.
   7617	020010	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   7618	020014	001405 				BEQ	20$		; ASK PREVIOUS QUESTION.
   7619	020016					PRINT	#COMCSE		; UNCOORDINATED FINGERS...
	020016	012700 	004705'			 MOV	#COMCSE,R0
	020022	004737 	027034'			 JSR	PC,$TTMSG
   7620	020026	000727 				BR	10$		; ASK QUESTION AGAIN.
   7621						;
   7623	020030				20$:
   7624	020030	105737 	000041'			TSTB	.CASW		; IS CACHE AVAILABLE ?
   7625	020034	002402 				BLT	30$		; NO, GO TO RAM QUESTION.
   7626	020036	000137 	022576'			JMP	$DLGCV		; YES, ASK ABOUT CACHE.
   7627						;
   7628	020042				30$:
   7629	020042	000137 	022636'			JMP	$DLGRV		; NO, GO TO RAM QUESTION.
   7630						;
   7636	020046				40$:
   7637	020046	032737 	000000G	000056'		BIT	#KL.CFM,.KLISV	; INTERNAL SPECIFIC REQUEST MADE ?
   7638	020054	001015 				BNE	70$		; YES -- ANALYZE FURTHER...
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 169-1
$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY

   7639	020056	000422 				BR	90$		; NO -- MAKE SURE CONFIGURATION STILL EXISTS
   7640						;
   7641	020060				45$:				; [4.2322]
   7642	020060	112737 	177777 	000000G		MOVB	#-1,DBEFRC	; [4.2322] FORCE THE DBE SCAN
   7643	020066	000404 				BR	60$		; [4.2322] AND GO ON
   7644						;
   7645	020070				50$:
   7646	020070	000137 	022632'			JMP	$DLGBV		; ASK TO LOAD BOOT.
   7647						;
   7648	020074				55$:				; [4.2204]
   7649	020074	005337 	000232'			DEC	.CFMRV		; [4.2204] SET REVERSE CONFIGURATION
   7650	020100				60$:
   7651	020100	113737 	000232'	000000G		MOVB	.CFMRV,CONFGR	; [4.2204] TELL THE MEMORY BOOT FORWARD OR REVERSE
   7652	020106	000407 				BR	$DSPPT		; DISPLAY THE PHYSICAL CONFIGURATION.
   7653						;
   7654	020110				70$:
   7655	020110	032737 	000000G	000056'		BIT	#KL.CFL,.KLISV	; IF NOT TO GET FROM FILE,
   7656	020116	001402 				BEQ	90$		; THEN
   7657	020120				80$:
   7658	020120	105337 	000032'			DECB	.DMSW		; INDICATE TO USE ALL AND
   7659	020124				90$:
   7660	020124	000410 				BR	$CFGMM		; GO TO CONFIGURE MEMORY.
   7661						;
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 170
$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY

   7663					;
   7664					; HERE FOR LONG MEMORY CONFIGURATION DIALOG
   7665					;
   7666	020126				$DSPPT::
   7667	020126	112737 	177777 	000000G		MOVB	#-1,FMRECN	; [4.2322] FORCE RECONFIGURATION
   7668	020134					CALL	RESDET		; GET PHYSICAL CONFIGURATION AND
	020134	004737 	000000G			 JSR	PC,RESDET
   7669	020140					CALL	REPCON		; DISPLAY THE MEMORY LAYOUT.
	020140	004737 	000000G			 JSR	PC,REPCON
   7670	020144	000520 				BR	$DLGCT		; ENTER CONTROLLER DIALOG.
   7671						;
   7672					;
   7673					; HERE FOR:
   7674					;
   7675					;	"FILE" IF .DMSW .EQ. 0
   7676					;	"ALL" IF .DMSW .LT. 0
   7677					;
   7678	020146				$CFGMM::
   7679	020146	105737 	000032'			TSTB	.DMSW		; ARE WE IN DIALOG MODE??
   7680	020152	001006 				BNE	10$		; YES -- GO ON
   7681	020154					CALL	$GETMM		; NO -- READ THE FILE
	020154	004737 	014072'			 JSR	PC,$GETMM
   7682	020160	103510 				BCS	ERRORX		; GIVE UP IF ERROR
   7683	020162	105737 	000032'			TSTB	.DMSW		; USE ALL??
   7684	020166	001403 				BEQ	20$		; NO -- GO ON
   7685	020170				10$:
   7686	020170	112737 	177777 	000000G		MOVB	#-1,FMRECN	; [4.2322] YES -- FORCE RECONFIGURATION
   7687	020176				20$:
   7688	020176	113737 	000232'	000000G		MOVB	.CFMRV,CONFGR	; [4.2204] SET FORWARD/REVERSE CONFIGURATION
   7689	020204					CALL	RESDET		; GET PHYSICAL CONFIGURATION
	020204	004737 	000000G			 JSR	PC,RESDET
   7690	020210	105737 	000024'			TSTB	.DLGSW		; ARE WE ON INTERNAL PATH??
   7691	020214	002036 				BGE	40$		; NO -- GO ON
   7692	020216	105737 	000044'			TSTB	.MFCT		; [4.1.1009] YES -- DO WE EXPECT MOS MEMORY??
   7693	020222	001433 				BEQ	40$		; [4.1.1009] NO -- GO ON
   7694	020224	105737 	000000G			TSTB	MF20		; [4.1.1009] YES -- DO WE HAVE MOS MEMORY??
   7695	020230	001406 				BEQ	30$		; [4.1.1009] NO -- COMPLAIN
   7696	020232	105737 	000000G			TSTB	CCFAIL		; YES -- DID THE MF20'S EVAPORATE??
   7697	020236	001003 				BNE	30$		; YES -- SET UP TO RELOAD THE KL
   7698	020240	005737 	000000G			TST	XCONMP		; NO -- DO WE HAVE ANY STATE 2 CONTROLLERS??
   7699	020244	001022 				BNE	40$		; YES -- GO ON
   7700	020246				30$:
   7701	020246	042737 	000000C	000056'		BIC	#KL.SPF!KL.VBD,.KLISV ; NO -- DON'T RESTART OR DUMP THE KL
   7702	020254	052737 	000000C	000056'		BIS	#KL.VBN!KL.LVB,.KLISV ; JUST LOAD AND START IT INSTEAD
   7703	020262					PRINT	#TQMPCA		; WARN SOMEONE ABOUT IT
	020262	012700 	003731'			 MOV	#TQMPCA,R0
	020266	004737 	027034'			 JSR	PC,$TTMSG
   7704	020272	105737 	000000G			TSTB	CCFAIL		; [4.2322] DO WE NEED A DBE SCAN??
   7705	020276	001405 				BEQ	40$		; [4.2322] NO -- GO ON
   7706	020300	112737 	177777 	000000G		MOVB	#-1,DBEFRC	; [4.2322] YES -- SET THE FLAG
   7707	020306					CALL	RESDET		; [4.2322] AND DO IT
	020306	004737 	000000G			 JSR	PC,RESDET
   7708	020312				40$:
   7709	020312	105737 	000032'			TSTB	.DMSW		; IS THIS A FILE READ??
   7710	020316	001033 				BNE	$DLGCT		; NO -- DO DEFAULT DIALOG
   7711	020320				$CFGXX::
   7712	020320					CALL	$CONFG		; YES -- EDIT THE TABLES
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 170-1
$DLGMM	-- ASK WHETHER TO CONFIGURE THE KL MEMORY

	020320	004737 	005274'			 JSR	PC,$CONFG
   7713	020324	103424 				BCS	20$		; ERROR IF CC-C IS SET
   7714	020326					CALL	RESDET		; ONE MORE TIME
	020326	004737 	000000G			 JSR	PC,RESDET
   7715	020332					CALL	FITMEM		; SET UP LOGICAL TABLE
	020332	004737 	000000G			 JSR	PC,FITMEM
   7716	020336					CALL	REPFIT		; REPORT LOGICAL CONFIGURATION
	020336	004737 	000000G			 JSR	PC,REPFIT
   7717	020342	005737 	000000G			TST	GAPCNT		; DO WE HAVE ANY GAPS??
   7718	020346	001410 				BEQ	10$		; NO -- GO ON
   7719	020350	005737 	000000G			TST	GAPTAB+0	; YES -- IS THERE A GAP AT 0??
   7720	020354	001005 				BNE	10$		; NO -- GO ON
   7721	020356					PRINT	#TQMNM0		; YES -- COMPLAIN
	020356	012700 	003674'			 MOV	#TQMNM0,R0
	020362	004737 	027034'			 JSR	PC,$TTMSG
   7722	020366	000405 				BR	ERRORX		; AND EXIT
   7723						;
   7724	020370				10$:
   7725	020370					CALL	CONFIG		; SET REQUESTED CONFIGURATION
	020370	004737 	000000G			 JSR	PC,CONFIG
   7726	020374	000241 				CLC			; INSURE CC-C IS CLEAR
   7727	020376				20$:
   7728	020376					CALLR	$DLGMX		; RETURN TO ROOT
	020376	000137 	022630'			 JMP	$DLGMX
   7729						;
   7730	020402				ERRORX:
   7731	020402	000137 	022750'			JMP	$ERROR		; ERROR EXIT
   7732						;
KLIQM -- ASK MEMORY QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 171
$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER

   7734						.SBTTL	$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER
   7735
   7736	020406				$DLGCT::
   7737	020406	012700 	000040 			MOV	#CTLS,R0	; MAX CONTROLLER NUMBER
   7738	020412	012701 	000132'			MOV	#.CFGTB,R1	; POINT TO CONFIGURATION TABLE
   7739	020416				10$:
   7740	020416	116060 	177777G	000067'		MOVB	TYPNUM-1(R0),.CTLTP-1(R0) ; SET UP OUR CONTROLLER TABLE
   7741	020424	012721 	100000 			MOV	#BIT15,(R1)+	; INVALIDATE OUR CONFIGURATION TABLE
   7742	020430	077006 				SOB	R0,10$		; LOOP TILL DONE
   7743					;
   7744					; CONFIGURATION DIALOG VECTORS
   7745					;
   7746	020432				$DLGIM::
   7747	020432					CALLR	$CFIMD		; INTERNAL MEMORY DIALOG
	020432	000137 	004012'			 JMP	$CFIMD
   7748						;
   7749	020436				$DLGXM::
   7750	020436					CALLR	$CFXMD		; EXTERNAL MEMORY DIALOG
	020436	000137 	006324'			 JMP	$CFXMD
   7751						;
   7752	020442				$DLGMF::
   7753	020442					CALLR	$CFMMD		; MOS MEMORY DIALOG
	020442	000137 	003760'			 JMP	$CFMMD
   7754						;
   7755	020446				$DLGMB::
   7756	020446					CALLR	$DLGMM		; BACK UP
	020446	000137 	017644'			 JMP	$DLGMM
   7757						;
   7758					;
   7759					; DECIDE WHERE TO GO ON "BACKUP"
   7760					;
   7761	020452				$DLMB1::			; HERE FROM MOS MEMORY DIALOG
   7762	020452	105737 	000000G			TSTB	DMA20		; DO WE HAVE EXTERNAL MEMORY??
   7763	020456	001367 				BNE	$DLGXM		; YES -- GO TO IT
   7764	020460				$DLMB2::			; HERE FROM EXTERNAL MEMORY DIALOG
   7765	020460	105737 	000000G			TSTB	MA20		; DO WE HAVE MA20'S??
   7766	020464	001362 				BNE	$DLGIM		; YES -- GO TO IT
   7767	020466	105737 	000000G			TSTB	MB20		; DO WE HAVE MB20'S??
   7768	020472	001357 				BNE	$DLGIM		; YES -- GO TO IT
   7769	020474	000764 				BR	$DLGMB		; NO -- GO ALL THE WAY TO THE TOP
   7770						;
KLIQR -- ASK RAM QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 172
$DLGCT	-- ASK FOR MEMORY CONTROLLER NUMBER

   7772						.TITLE	KLIQR -- ASK RAM QUESTIONS
   7773	020476					IDENT$	5,4
						.IDENT	/005040/
   7774					;
   7775					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7776					;
   7777					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7778					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7779					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7780					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7781					;
   7782					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7783					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7784					; EQUIPMENT CORPORATION.
   7785					;
   7786					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7787					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7788					;
   7789					; VERSION 05-04
   7790					;
   7791					; ALAN D. PECKHAM  14-APR-77
   7792					;
   7793					; MODIFIED BY:
   7794					;
   7795					;	K. LEFEBVRE	13-MAR-79	ADD EXPANDED CRAM/DRAM ERROR REPORT
   7796					;					TCO 4.2209
   7797					;
   7798					;	S. LEAPLINE	25-SEP-80	FIX 'BACK' RESPONCE BRANCH FOR MICROCODE
   7799					;
   7800					; FUNCTION: THIS MODULE DETERMINES THE OPERATIONS TO PERFORM ON THE KL
   7801					;  MICROCODE RAMS.
   7802					;
   7803					; LOCAL DATA
   7804					;
   7805	004036					.PSECT	TEXT,D
   7806	004036				TQRLMC:	MESSAGE	<RELOAD MICROCODE [YES,VERIFY,FIX,NO]?>
	004036	   122 	   105 	   114 		 .ASCIZ	\RELOAD MICROCODE [YES,VERIFY,FIX,NO]?\
	004041	   117 	   101 	   104
	004044	   040 	   115 	   111
	004047	   103 	   122 	   117
	004052	   103 	   117 	   104
	004055	   105 	   040 	   133
	004060	   131 	   105 	   123
	004063	   054 	   126 	   105
	004066	   122 	   111 	   106
	004071	   131 	   054 	   106
	004074	   111 	   130 	   054
	004077	   116 	   117 	   135
	004102	   077 	   000
   7807	020476					.PSECT
KLIQR -- ASK RAM QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 173
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

   7809						.SBTTL	$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED
   7810
   7811	020476	105037 	000027'		$DLGRM::CLRB	.DRSW		; RESET CONTROL AND
   7812	020502	105037 	000025'			CLRB	.MCBSW		; FILENAME SWITCH.
   7813	020506	105737 	000024'			TSTB	.DLGSW		; TEST DIALOG SWITCH.
   7814	020512	003104 				BGT	90$		; TAKE DIALOG DEFAULT PATH.
   7815	020514	002441 				BLT	30$		; TAKE INTERNAL PATH.
   7816	020516	005002 			10$:	CLR	R2		; USE AS VERIFY SWITCH.
   7817	020520					PRINT	#TQRLMC		; ASK QUESTION
	020520	012700 	004036'			 MOV	#TQRLMC,R0
	020524	004737 	027034'			 JSR	PC,$TTMSG
   7818	020530					CALL	$TTRD		; READ ANSWER
	020530	004737 	026330'			 JSR	PC,$TTRD
   7819	020534	012705 	000302'			MOV	#.TTIBF,R5
   7820	020540	105715 				TSTB	(R5)		;  CR ?
   7821	020542	001470 				BEQ	90$		; YES, TREAT AS [YES]
   7822	020544	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7823	020550	001443 				BEQ	60$		; LOAD THE RAMS.
   7824	020552	022715 	042526 			CMP	#"VE,(R5)	;  [VERIFY] ?
   7825	020556	001437 				BEQ	50$		; VERIFY THE RAMS.
   7826	020560	022715 	044506 			CMP	#"FI,(R5)	; [4.2209]  [FIX] ?
   7827	020564	001430 				BEQ	35$		; [4.2209] VERIFY AND FIX THE RAMS.
   7828	020566	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   7829	020572	001427 				BEQ	40$		; GO ON TO NEXT QUESTION.
   7830	020574	022715 	040502 			CMP	#"BA,(R5)	;  [BACKUP] ?
   7831	020600	001405 				BEQ	20$		; GO BACK TO DIALOGUE QUESTION
   7832	020602				80$:	PRINT	#COMCSE		; MUST BE SOME MISTAKE...
	020602	012700 	004705'			 MOV	#COMCSE,R0
	020606	004737 	027034'			 JSR	PC,$TTMSG
   7833	020612	000741 				BR	10$		; ASK QUESTION AGAIN.
   7834	020614	000137 	020754'		20$:	JMP	$DLGEN		; ASK IF DIALOG NECESSARY.
   7835	020620	005002 			30$:	CLR	R2		; [4.2209] CLEAR FIX FLAG
   7836	020622	032737 	000000G	000056'		BIT	#KL.LRM,.KLISV	; LOAD RAMS ?
   7837	020630	001410 				BEQ	40$		; [4.2209] NO-- NEXT QUESTION
   7838	020632	032737 	000000C	000056'		BIT	#KL.SPF!KL.DEF,.KLISV	; [4.2209] YES-- POWER FAIL?
   7839	020640	001027 				BNE	70$		; [4.2209] YES-- NO VERIFY
   7840	020642	105302 				DECB	R2		; [4.2209] YES-- VERIFY AND FIX THE RAMS.
   7841	020644	000425 				BR	70$		; [4.2209] CONTINUE.
   7842	020646	105302 			35$:	DECB	R2		; [4.2209] SET FLAG TO FIX RAMS.
   7843	020650	000403 				BR	60$		; [4.2209] CONTINUE.
   7845	020652	000137 	017170'		40$:	JMP	$DLGCA		; CHECK FOR CACHE.
   7849	020656	105202 			50$:	INCB	R2		; INDICATE VERIFICATION NECESSARY
   7850	020660				60$:	CALL	LQRBPS		; CHECK FOR OPERAND
	020660	004737 	020730'			 JSR	PC,LQRBPS
   7851	020664	001415 				BEQ	70$		; NO OPERAND IS OKAY.				; ADP01
   7852	020666	012700 	000454'			MOV	#.MCBFN,R0	; GET USER FILENAME BLOCK
   7853	020672	012701 				MOV	(PC)+,R1
   7854	020674	050672 				.RAD50	/MCB/		; SET DEFAULT FILE TYPE
   7855	020676	010160 	000006 			MOV	R1,6(R0)
   7856	020702					CALL	$TRF2B		; AND GET FILE NAME.
	020702	004737 	024346'			 JSR	PC,$TRF2B
   7857	020706	103735 				BCS	80$
   7858	020710	105715 				TSTB	(R5)		; CHECK FOR PROPER TERMINATION.
   7859	020712	001333 				BNE	80$
   7860	020714	105237 	000025'			INCB	.MCBSW		; FILE NAME HAS BEEN SPECIFIED.
   7861	020720	110237 	000027'		70$:	MOVB	R2,.DRSW	; INSERT VERIFY SWITCH.
   7862	020724	000137 	022570'		90$:	JMP	$CFGRM		; AND GO PROCESS MICROCODE.
KLIQR -- ASK RAM QUESTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 173-1
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

   7863
   7864					;+
   7865					; BYPASS CHARACTERS TO END OF LINE OR PAST CONTIGUOUS SET OF SPACES.
   7866					;-
   7867
   7868	020730	105715 			LQRBPS:	TSTB	(R5)		; IF END OF LINE
   7869	020732	001407 				BEQ	90$		; THEN QUIT
   7870	020734	122725 	000040 			CMPB	#' ,(R5)+	; OTHERWISE LOOK
   7871	020740	001373 				BNE	LQRBPS		; FOR A SPACE.
   7872	020742	122725 	000040 		10$:	CMPB	#' ,(R5)+	; THEN BYPASS
   7873	020746	001775 				BEQ	10$		; ANY MORE THAT FOLLOW.
   7874	020750	105745 				TSTB	-(R5)		; TEST FOR END OF LINE.
   7875	020752				90$:	RETURN
	020752	000207 				 RTS	PC
   7876						.TITLE	KLIQS -- DIALOG ENTRANCE QUESTION
   7877	020754					IDENT$	12,27
						.IDENT	/012270/
   7878
   7879					;
   7880					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   7881					;
   7882					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   7883					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   7884					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   7885					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   7886					;
   7887					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   7888					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   7889					; EQUIPMENT CORPORATION.
   7890					;
   7891					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   7892					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   7893					;
   7894					; VERSION 12-27
   7895					;
   7896					; ALAN D. PECKHAM  14-APR-77
   7897					;
   7898					; MODIFIED BY:
   7899					;
   7900					; R. BELANGER 22-OCT-79		ADD CACHE SWEEP ON AUTO-RELOAD AND BOOT OPTIONS
   7901					;				TCO 5.1013
   7902					;
   7903					; R. BELANGER	16-JUL-79	ADD KL10 HARDWARE ENVIRONMENTAL REPORTING
   7904					;				TCO 4.2333
   7905					;
   7906					; R. BELANGER -- SET MF20 FLAG ON DETECTION OF MOS MASTER OSCILLATOR
   7907					;
   7908					; S. LEAPLINE	13-AUG-81	USE SAVED BOOT FILENAME ON "BOOT" RESPONSE
   7909					;
   7910					; FUNCTION: THIS DIALOG QUESTION DETERMINES IF THE OPERATOR
   7911					;  WANTS TO GO THROUGH THE DIALOG QUESTIONS OR FOLLOW
   7912					;  THE DEFAULT PATH BY ASSUMING THE DEFAULT ANSWER TO
   7913					;  ALL QUESTIONS.
   7914					;
   7915					; EQUATED SYMBOLS
   7916					;
   7917		000014 				CCA = 14		; [5.1013] KL INTERNAL CACHE DEVICE
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 173-2
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

   7918		000002 				BLKO = 2		; [5.1013] KL OPCODE
   7919					;
   7920					; LOCAL MACROS
   7921					;
   7922						.MCALL	MRKT$,CLEF$S,WTSE$S,DIR$
   7923					;
   7924					; LOCAL VARIABLES
   7925					;
   7926
   7927	001542					.PSECT	DATA,D
   7928
   7929	001542				DQSCSW:
   7930	001542					IO10$	BLKO,CCA,,0	; [5.1013] SWEEP CACHE AND UPDATE CORE
	001542	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001545	   015 	   016 			 .BYTE	BY$$3,BY$$4
   7931						.EVEN
   7932	001550				DQSMKT:
   7933	001550					MRKT$	5.,30.,0,0	; [5.1013] HALF-SECOND WAIT
	001550	   027 	   005 			.BYTE	23.,5
	001552	000005 				.WORD	5.
	001554	000036 				.WORD	30.
	001556	000000 				.WORD	0
	001560	000000 				.WORD	0
   7934	001562				DQSCBF:
   7935	001562	000000 	000000 	000000 		.WORD	0,0,0,0,0,0	;HOLDING AREA FOR C-RAM WORD ZERO.
	001570	000000 	000000 	000000
   7936	001576				DQSCF3:
   7937	001576	000000 	000460 	000000 		.WORD	0,460,0,0,0,0	;C-RAM WORD WITH COND FIELD = 3.
	001604	000000 	000000 	000000
   7938	001612				DQSAPR:
   7939	001612					WD36$	0 0		;HOLDING AREA FOR RH(APRID)
	001612	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001615	   000 	   000 			 .BYTE	BY$$3,BY$$4
   7940						.EVEN
   7941	001620				DQSHWT:
   7942	001620	000000 				.WORD	0
   7943	001622	004246'				.WORD	TQSMMO
   7944	001624	004305'				.WORD	TQSEXT
   7945	001626	004342'				.WORD	TQSCHN
   7946	001630	004375'				.WORD	TQSCAC
   7947	001632	000000 				.WORD	0
   7948
   7949	004104					.PSECT	TEXT,D
   7950
   7951	004104				TQSDLG:
   7952	004104					MESSAGE	<ENTER DIALOG [NO,YES,EXIT,BOOT]?>
	004104	   105 	   116 	   124 		 .ASCIZ	\ENTER DIALOG [NO,YES,EXIT,BOOT]?\
	004107	   105 	   122 	   040
	004112	   104 	   111 	   101
	004115	   114 	   117 	   107
	004120	   040 	   133 	   116
	004123	   117 	   054 	   131
	004126	   105 	   123 	   054
	004131	   105 	   130 	   111
	004134	   124 	   054 	   102
	004137	   117 	   117 	   124
	004142	   135 	   077 	   000
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 173-3
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

   7953	004145				TQSKSN:
   7954	004145					MESSAGE <KLI -- KL10 S/N: _>
	004145	   113 	   114 	   111 		 .ASCIZ	\KLI -- KL10 S/N: _\
	004150	   040 	   055 	   055
	004153	   040 	   113 	   114
	004156	   061 	   060 	   040
	004161	   123 	   057 	   116
	004164	   072 	   040 	   137
	004167	   000
   7955	004170				TQSMDL:
   7956	004170					MESSAGE <., MODEL _>
	004170	   056 	   054 	   040 		 .ASCIZ	\., MODEL _\
	004173	   115 	   117 	   104
	004176	   105 	   114 	   040
	004201	   137 	   000
   7957	004203				TQSHRZ:
   7958	004203	   040 	   110 	   105 		.ASCIZ / HERTZ\/
	004206	   122 	   124 	   132
	004211	   134 	   000
   7959	004213				TQSHWP:
   7960	004213					MESSAGE <KL10 HARDWARE ENVIRONMENT:>
	004213	   113 	   114 	   061 		 .ASCIZ	\KL10 HARDWARE ENVIRONMENT:\
	004216	   060 	   040 	   110
	004221	   101 	   122 	   104
	004224	   127 	   101 	   122
	004227	   105 	   040 	   105
	004232	   116 	   126 	   111
	004235	   122 	   117 	   116
	004240	   115 	   105 	   116
	004243	   124 	   072 	   000
   7961	004246				TQSMMO:
   7962	004246	   040 	   040 	   040 		.ASCIZ /        MOS MASTER OSCILLATOR\/
	004251	   040 	   040 	   040
	004254	   040 	   040 	   115
	004257	   117 	   123 	   040
	004262	   115 	   101 	   123
	004265	   124 	   105 	   122
	004270	   040 	   117 	   123
	004273	   103 	   111 	   114
	004276	   114 	   101 	   124
	004301	   117 	   122 	   134
	004304	   000
   7963	004305				TQSEXT:
   7964	004305	   040 	   040 	   040 		.ASCIZ /        EXTENDED ADDRESSING\/
	004310	   040 	   040 	   040
	004313	   040 	   040 	   105
	004316	   130 	   124 	   105
	004321	   116 	   104 	   105
	004324	   104 	   040 	   101
	004327	   104 	   104 	   122
	004332	   105 	   123 	   123
	004335	   111 	   116 	   107
	004340	   134 	   000
   7965	004342				TQSCHN:
   7966	004342	   040 	   040 	   040 		.ASCIZ /        INTERNAL CHANNELS\/
	004345	   040 	   040 	   040
	004350	   040 	   040 	   111
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 173-4
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

	004353	   116 	   124 	   105
	004356	   122 	   116 	   101
	004361	   114 	   040 	   103
	004364	   110 	   101 	   116
	004367	   116 	   105 	   114
	004372	   123 	   134 	   000
   7967	004375				TQSCAC:
   7968	004375	   040 	   040 	   040 		.ASCIZ /        CACHE\/
	004400	   040 	   040 	   040
	004403	   040 	   040 	   103
	004406	   101 	   103 	   110
	004411	   105 	   134 	   000
   7969	004414				TQSCDH:
   7970	004414					ERROR	<CAN'T DETERMINE KL10 HARDWARE ENVIRONMENT>
	004414	   077 	   040 	   103 		 .ASCIZ	\? CAN'T DETERMINE KL10 HARDWARE ENVIRONMENT\
	004417	   101 	   116 	   047
	004422	   124 	   040 	   104
	004425	   105 	   124 	   105
	004430	   122 	   115 	   111
	004433	   116 	   105 	   040
	004436	   113 	   114 	   061
	004441	   060 	   040 	   110
	004444	   101 	   122 	   104
	004447	   127 	   101 	   122
	004452	   105 	   040 	   105
	004455	   116 	   126 	   111
	004460	   122 	   117 	   116
	004463	   115 	   105 	   116
	004466	   124 	   000
   7971	004470				TQSWRN:
   7972	004470					WARNING <PROCEED AT YOUR OWN RISK>
	004470	   045 	   040 	   120 		 .ASCIZ	\% PROCEED AT YOUR OWN RISK\
	004473	   122 	   117 	   103
	004476	   105 	   105 	   104
	004501	   040 	   101 	   124
	004504	   040 	   131 	   117
	004507	   125 	   122 	   040
	004512	   117 	   127 	   116
	004515	   040 	   122 	   111
	004520	   123 	   113 	   000
   7973	004523				TQSABO:
   7974	004523					WARNING <AUTOMATIC RELOAD ABORTED>
	004523	   045 	   040 	   101 		 .ASCIZ	\% AUTOMATIC RELOAD ABORTED\
	004526	   125 	   124 	   117
	004531	   115 	   101 	   124
	004534	   111 	   103 	   040
	004537	   122 	   105 	   114
	004542	   117 	   101 	   104
	004545	   040 	   101 	   102
	004550	   117 	   122 	   124
	004553	   105 	   104 	   000
   7975	004556				TQSMMA:
   7976	004556					ERROR	<CAN'T SUPPORT MOS MEMORY ON A MODEL "A" CPU>
	004556	   077 	   040 	   103 		 .ASCIZ	\? CAN'T SUPPORT MOS MEMORY ON A MODEL "A" CPU\
	004561	   101 	   116 	   047
	004564	   124 	   040 	   123
	004567	   125 	   120 	   120
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 173-5
$DLGRM	-- ASK IF RELOAD MICROCODE IS REQUIRED

	004572	   117 	   122 	   124
	004575	   040 	   115 	   117
	004600	   123 	   040 	   115
	004603	   105 	   115 	   117
	004606	   122 	   131 	   040
	004611	   117 	   116 	   040
	004614	   101 	   040 	   115
	004617	   117 	   104 	   105
	004622	   114 	   040 	   042
	004625	   101 	   042 	   040
	004630	   103 	   120 	   125
	004633	   000
   7977
   7978	020754					.PSECT
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 174
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   7980						.SBTTL	$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED
   7981
   7982	020754				$DLGEN::
   7983	020754	105037 	000045'			CLRB	.FILSW		; SAY WRITE CONFIGURATION FILE
   7984	020760	105737 	000024'			TSTB	.DLGSW		; TEST DIALOG CONTROL SWITCH.
   7985	020764	002440 				BLT	40$		; TAKE INTERNAL PATH.
   7986	020766	105037 	000024'			CLRB	.DLGSW		; RESET CONTROL SWITCH.
   7987					;
   7988					; ENTER DIALOGUE
   7989					;
   7990	020772				10$:
   7991	020772					PRINT	#TQSDLG		; ASK QUESTION.
	020772	012700 	004104'			 MOV	#TQSDLG,R0
	020776	004737 	027034'			 JSR	PC,$TTMSG
   7992	021002					CALL	$TTRD		; READ ANSWER
	021002	004737 	026330'			 JSR	PC,$TTRD
   7993	021006	012705 	000302'			MOV	#.TTIBF,R5
   7994	021012	105715 				TSTB	(R5)		;  CR ?
   7995	021014	001421 				BEQ	30$		; YES, TREAT AS DEFAULT
   7996	021016	022715 	047516 			CMP	#"NO,(R5)	;  [NO] ?
   7997	021022	001416 				BEQ	30$		; TAKE DEFAULT DIALOG PATH.
   7998	021024	022715 	042531 			CMP	#"YE,(R5)	;  [YES] ?
   7999	021030	001424 				BEQ	45$		; [5.1013] ASK NEXT QUESTION.
   8000	021032	022715 	054105 			CMP	#"EX,(R5)	;  [EXIT] ?
   8001	021036	001515 				BEQ	120$		; EXIT FROM KLINIT.
   8002	021040	022715 	047502 			CMP	#"BO,(R5)	;  [BOOT] ?
   8003	021044	001432 				BEQ	60$		; LOAD AND START BOOT.
   8004					;
   8005					; COMMAND SYNTAX ERROR
   8006					;
   8007	021046				20$:
   8008	021046					PRINT	#COMCSE		; SOME MISTAKE....
	021046	012700 	004705'			 MOV	#COMCSE,R0
	021052	004737 	027034'			 JSR	PC,$TTMSG
   8009	021056	000745 				BR	10$		; ASK QUESTION AGAIN.
   8010						;
   8011					;
   8012					; "NO" RESPONSE
   8013					;
   8014	021060				30$:
   8015	021060	105237 	000024'			INCB	.DLGSW		; INDICATE DEFAULT PATH
   8016	021064	000406 				BR	45$		; [5.1013] AND GO ON
   8017						;
   8018					;
   8019					; INTERNAL PATH
   8020					;
   8021	021066				40$:
   8022	021066	032737 	000000G	000056'		BIT	#KL.LRM,.KLISV	; [5.1013] MUST WE LOAD THE RAMS??
   8023	021074	001002 				BNE	45$		; [5.1013] YES -- FORGET ABOUT CACHE SWEEP
   8024	021076					CALL	LQSCSW		; [5.1013] NO -- SWEEP THE CACHE
	021076	004737 	022152'			 JSR	PC,LQSCSW
   8025					;
   8026					; "YES" RESPONSE
   8027					;
   8028	021102				45$:
   8029	021102					CALL	LQSHWE		; [4.2333] READ AND DESCRIBE OUR HARDWARE
	021102	004737 	021330'			 JSR	PC,LQSHWE
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 174-1
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8030	021106	103007 				BCC	50$		; [4.2333] ALL OK IF CC-C IS CLEAR
   8031	021110	105737 	000024'			TSTB	.DLGSW		; [4.2333] ARE WE ON INTERNAL PATH??
   8032	021114	002462 				BLT	110$		; [4.2333] YES -- ABORT AUTOMATIC RELOAD
   8033	021116					PRINT	#TQSWRN		; [4.2333] NO -- WARN OPERATOR
	021116	012700 	004470'			 MOV	#TQSWRN,R0
	021122	004737 	027034'			 JSR	PC,$TTMSG
   8034	021126				50$:
   8035	021126	000137 	020476'			JMP	$DLGRM		; AND START DIALOGUE
   8036						;
   8037					;
   8038					; "BOOT" RESPONSE
   8039					;
   8040	021132				60$:
   8041	021132	105037 	000033'			CLRB	.DBSW
   8042	021136	105337 	000045'			DECB	.FILSW		; DISABLE CONFIGURATION FILE WRITE
   8043	021142	105037 	000026'			CLRB	.UFNSW		; USE DEFAULT FILE
   8044	021146					CALL	LQSBPS		; IF OPERAND FOLLOWS
	021146	004737 	021304'			 JSR	PC,LQSBPS
   8045	021152	001416 				BEQ	70$		; THEN
   8046	021154	012700 	000474'			MOV	#.USRFN,R0	; GET FILENAME BLOCK
   8047	021160	012701 				MOV	(PC)+,R1
   8048	021162	021402 				.RAD50	/EXB/		; SET DEFAULT EXTENSION
   8049	021164	010160 	000006 			MOV	R1,6(R0)
   8050	021170					CALL	$TRF2B		; AND PARSE OUT FILE NAME.
	021170	004737 	024346'			 JSR	PC,$TRF2B
   8051	021174	103724 				BCS	20$
   8052	021176	105715 				TSTB	(R5)		; IF NOT TERMINATED PROPERLY
   8053	021200	001322 				BNE	20$		; TELL HIM SO.
   8054	021202	105237 	000026'			INCB	.UFNSW		; INDICATED FILE NAME SPECIFIED.
   8055	021206	000402 				BR	71$
   8056	021210				70$:
   8057	021210					CALL	LQBRBF		; READ SAVED BOOT FILE NAME
	021210	004737 	016760'			 JSR	PC,LQBRBF
   8058	021214				71$:	CALL	HLTNOE		; HALT THE KL AND DISABLE -20F INTERRUPTIONS
	021214	004737 	022022'			 JSR	PC,HLTNOE
   8059	021220					CALL	LQSCSW		; [5.1013] SWEEP THE CACHE
	021220	004737 	022152'			 JSR	PC,LQSCSW
   8060	021224					CALL	LQSHDW		; [4.2333] READ THE HARDWARE OPTIONS
	021224	004737 	021644'			 JSR	PC,LQSHDW
   8061	021230	103003 				BCC	80$		; [4.2333] ALL OK IF CC-C IS CLEAR
   8062	021232					CALL	LQSCHE		; [4.2333] TELL HIM WE GOT AN ERROR
	021232	004737 	021624'			 JSR	PC,LQSCHE
   8063	021236	000403 				BR	90$		; [4.2333] AND GO ON
   8064						;
   8065	021240				80$:
   8066	021240					CALL	LQSCHO		; [4.2333] MAKE SURE THAT WE ARE OK
	021240	004737 	021600'			 JSR	PC,LQSCHO
   8067	021244	103004 				BCC	100$		; [4.2333] ALL OK IF CC-C IS CLEAR
   8068	021246				90$:
   8069	021246					PRINT	#TQSWRN		; [4.2333] WARN HIM
	021246	012700 	004470'			 MOV	#TQSWRN,R0
	021252	004737 	027034'			 JSR	PC,$TTMSG
   8070	021256				100$:
   8071	021256	000137 	022656'			JMP	$CFGBT		; AND GO LOAD BOOT.
   8072						;
   8073					;
   8074					; HERE TO ABORT AN AUTOMATIC RELOAD
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 174-2
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8075					;
   8076	021262				110$:
   8077	021262					PRINT	#TQSABO		; [4.2333] SAY THAT WE ARE ABORTING
	021262	012700 	004523'			 MOV	#TQSABO,R0
	021266	004737 	027034'			 JSR	PC,$TTMSG
   8078					;
   8079					; "EXIT" RESPONSE
   8080					;
   8081	021272				120$:
   8082	021272	013737 	000060'	000000G		MOV	.SNSAV,.CPUSN	; [4.2333] RESTORE SERIAL NUMBER
   8083	021300	000137 	022760'			JMP	$EXIT		; EXIT FROM KLINIT.
   8084						;
   8085
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 175
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8087					;+
   8088					; BYPASS CHARACTERS TO END OF LINE OR PAST CONTIGUOUS SET OF SPACES.
   8089					;-
   8090
   8091	021304				LQSBPS:
   8092	021304	105715 				TSTB	(R5)		; IF END OF LINE
   8093	021306	001407 				BEQ	20$		; THEN QUIT
   8094	021310	122725 	000040 			CMPB	#' ,(R5)+	; OTHERWISE LOOK
   8095	021314	001373 				BNE	LQSBPS		; FOR A SPACE.
   8096	021316				10$:
   8097	021316	122725 	000040 			CMPB	#' ,(R5)+	; THEN BYPASS
   8098	021322	001775 				BEQ	10$		; ANY MORE THAT FOLLOW.
   8099	021324	105745 				TSTB	-(R5)		; TEST FOR END OF LINE.
   8100	021326				20$:
   8101	021326					RETURN
	021326	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 176
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8103					;+
   8104					; THIS SUBROUTINE DISPLAYS THE HARDWARE ENVIRONMENT OF THE KL10, AND DOES
   8105					; CHECKS FOR CONFLICTING OPTIONS.
   8106					;-
   8107
   8108						.ENABL	LSB
   8109
   8110	021330				LQSHWE:	CALL	HLTNOE		; HALT KL AND TELL -20F NOT TO INTEFERR
	021330	004737 	022022'			 JSR	PC,HLTNOE
   8111	021334	005737 	000000G			TST	.CPUSN		; [4.2333] HAVE WE BEEN HERE BEFORE??
   8112	021340	003140 				BGT	60$		; [4.2333] YES -- JUST EXIT
   8113	021342	100530 				BMI	LQSCHE		; [4.2333] YES -- FAILED BEFORE, GRIPE AND EXIT
   8114	021344					CALL	LQSHDW		; [4.2333] NO -- READ THE HARDWARE OPTIONS
	021344	004737 	021644'			 JSR	PC,LQSHDW
   8115	021350	103525 				BCS	LQSCHE		; [4.2333] ERROR IF CC-C IS SET
   8116	021352	105737 	000024'			TSTB	.DLGSW		; [4.2333] ARE WE ON INTERNAL PATH??
   8117	021356	002003 				BGE	10$		; [4.2333] NO -- GO ON
   8118	021360	005737 	000000G			TST	.DATE3		; [4.2333] YES -- IS THIS A RELOAD??
   8119	021364	001105 				BNE	LQSCHO		; [4.2333] YES -- JUST CHECK OPTIONS
   8120	021366				10$:
   8121	021366	012700 	004145'			MOV	#TQSKSN,R0	; [4.2333] NO -- SERIAL NUMBER PREAMBLE TO R0
   8122	021372					CALL	$TTDMS		; [4.2333] PRINT IT
	021372	004737 	026766'			 JSR	PC,$TTDMS
   8123	021376	013700 	000000G			MOV	.CPUSN,R0	; [4.2333] AND THE SERIAL NUMBER
   8124	021402					CALL	$TDB2I		; [4.2333] PRINT THAT
	021402	004737 	024464'			 JSR	PC,$TDB2I
   8125	021406	012700 	004170'			MOV	#TQSMDL,R0	; [4.2333] MODEL TYPE PREAMBLE
   8126	021412					CALL	$TTDMS		; [4.2333] PRINT THAT
	021412	004737 	026766'			 JSR	PC,$TTDMS
   8127	021416	012746 	000102 			MOV	#'B,-(SP)	; [4.2333] ASSUME MODEL "B"
   8128	021422	010600 				MOV	SP,R0		; [4.2333] POINT TO BUFFER ON STACK
   8129	021424	012701 	000001 			MOV	#1,R1		; [4.2333] LENGTH OF 1 CHARACTER
   8130	021430	105737 	000042'			TSTB	.EASW		; [4.2333] IS IT A MODEL "B"??
   8131	021434	100001 				BPL	20$		; [4.2333] YES -- GO ON
   8132	021436	005316 				DEC	(SP)		; [4.2333] NO -- MAKE IT AN "A"
   8133	021440				20$:
   8134	021440					CALL	$TTWR		; [4.2333] AND PRINT IT
	021440	004737 	027114'			 JSR	PC,$TTWR
   8135	021444	012716 	000054 			MOV	#',,(SP)	; [4.2333] SET UP <COMMA>
   8136	021450					CALL	$TTWR		; [4.2333] AND PRINT IT
	021450	004737 	027114'			 JSR	PC,$TTWR
   8137	021454	005726 				TST	(SP)+		; [4.2333] CLEAR STACK
   8138	021456					CALL	$TTSPC		; [4.2333] PRINT A <SPACE>
	021456	004737 	026700'			 JSR	PC,$TTSPC
   8139	021462	012700 	000074 			MOV	#^D60,R0	; [4.2333] ASSUME A 60 HERTZ MACHINE
   8140	021466	032737 	000000G	000000G		BIT	#H.KPWR,.HRDWR	; [4.2333] IS IT A 60 HERTZ MACHINE??
   8141	021474	001402 				BEQ	30$		; [4.2333] YES -- GO ON
   8142	021476	012700 	000062 			MOV	#^D50,R0	; [4.2333] NO -- MAKE IT 50 HERTZ
   8143	021502				30$:
   8144	021502					CALL	$TDB2I		; [4.2333] PRINT WHATEVER
	021502	004737 	024464'			 JSR	PC,$TDB2I
   8145	021506	012700 	004203'			MOV	#TQSHRZ,R0	; [4.2333] POSTAMBLE POINTER TO R0
   8146	021512					CALL	$TTDMS		; [4.2333] AND PRINT IT
	021512	004737 	026766'			 JSR	PC,$TTDMS
   8147	021516					PRINT	#TQSHWP		; [4.2333] PRINT THE HEADER
	021516	012700 	004213'			 MOV	#TQSHWP,R0
	021522	004737 	027034'			 JSR	PC,$TTMSG
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 176-1
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8148	021526	012701 	000001 			MOV	#BIT0,R1	; [4.2333] BIT MASK TO R1
   8149	021532	012702 	001620'			MOV	#DQSHWT,R2	; [4.2333] TABLE POINTER TO R2
   8150	021536	013703 	000000G			MOV	.HRDWR,R3	; [4.2333] OPTION BITS TO R3
   8151	021542	042703 	000000C			BIC	#H.KUDF!H.KPWR,R3 ; [4.2333] MINUS A COUPLE
   8152	021546	012704 	000006 			MOV	#6,R4		; [4.2333] ITERATION COUNT TO R4
   8153	021552				40$:
   8154	021552	030103 				BIT	R1,R3		; [4.2333] IS THE OPTION PRESENT??
   8155	021554	001404 				BEQ	50$		; [4.2333] NO -- TRY NET OPTION
   8156	021556	011200 				MOV	(R2),R0		; [4.2333] YES -- DO WE CARE ABOUT IT AT THIS POINT??
   8157	021560	001402 				BEQ	50$		; [4.2333] NO -- GO ON
   8158	021562					CALL	$TTDMS		; [4.2333] YES -- PRINT IT
	021562	004737 	026766'			 JSR	PC,$TTDMS
   8159	021566				50$:
   8160	021566	005722 				TST	(R2)+		; [4.2333] ADVANCE MESSAGE POINTER
   8161	021570	006301 				ASL	R1		; [4.2333] ADVANCE BIT MASK
   8162	021572	077411 				SOB	R4,40$		; [4.2333] AND CONTINUE
   8163	021574					CALL	$TCRLF		; [4.2333] END THE DISPLAY
	021574	004737 	026730'			 JSR	PC,$TCRLF
   8164					;
   8165					; HERE TO CHECK FOR CONFLICTING OPTIONS
   8166					; (MODEL "A" CPU AND MOS MASTER OSCILATOR)
   8167					;
   8168	021600				LQSCHO:
   8169	021600	105737 	000042'			TSTB	.EASW		; [4.2333] IS THIS A MODEL "A" CPU??
   8170	021604	100016 				BPL	60$		; [4.2333] NO -- GO ON
   8171	021606	105737 	000043'			TSTB	.MFSW		; [4.2333] YES -- IS MOS MEMORY PRESENT??
   8172	021612	100413 				BMI	60$		; [4.2333] NO -- GO ON (FIX BR POLARITY)
   8173	021614					PRINT	#TQSMMA		; [4.2333] YES -- COMPLAIN
	021614	012700 	004556'			 MOV	#TQSMMA,R0
	021620	004737 	027034'			 JSR	PC,$TTMSG
   8174					;
   8175					; HERE TO FLAG AND REPORT HARDWARE OPTION ERRORS
   8176					;
   8177	021624				LQSCHE:
   8178	021624					PRINT	#TQSCDH		; [4.2333] CAN'T DETERMINE HARDWARE OPTIONS
	021624	012700 	004414'			 MOV	#TQSCDH,R0
	021630	004737 	027034'			 JSR	PC,$TTMSG
   8179	021634	005337 	000000G			DEC	.CPUSN		; [4.2333] FLAG THIS FACT
   8180	021640	000261 				SEC			; [4.2333] SET ERROR RETURN
   8181	021642				60$:
   8182	021642					RETURN			; [4.2333] TO CALLER
	021642	000207 				 RTS	PC
   8183
   8184						.DSABL	LSB
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 177
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8186					;+
   8187					; DETERMINES THE HARDWARE FEATURES OF THE KL FOR LATER REFERENCE.
   8188					;-
   8189
   8190	021644				LQSHDW:
   8191	021644	012700 	001612'			MOV	#DQSAPR,R0	; GET HARDWARE OPTIONS BY
   8192	021650					CALL	LQSHWO		; OBTAINING RH(APRID)
	021650	004737 	022046'			 JSR	PC,LQSHWO
   8193	021654	103461 				BCS	40$		; [4.2333]
   8194	021656	113746 	001614'			MOVB	DQSAPR+2,-(SP)	; [4.2333] GET HIGH PART OF HARDWARE OPTIONS
   8195	021662	042716 	177774 			BIC	#^C3,(SP)	; [4.2333] GET RID OF JUNK
   8196	021666					SL	(SP),4		; [4.2333] POSITION IT
	021666	006316 				  ASL	(SP)
	021670	006316 				  ASL	(SP)
	021672	006316 				  ASL	(SP)
	021674	006316 				  ASL	(SP)
   8197	021676	113746 	001613'			MOVB	DQSAPR+1,-(SP)	; [4.2333] NOW FOR THE LOW PART
   8198	021702	042716 	177417 			BIC	#^C360,(SP)	; [4.2333] FLUSH JUNK
   8199	021706					SR	(SP),4		; [4.2333] AND POSITION THAT
	021706	006216 				  ASR	(SP)
	021710	006216 				  ASR	(SP)
	021712	006216 				  ASR	(SP)
	021714	006216 				  ASR	(SP)
   8200	021716	052616 				BIS	(SP)+,(SP)	; [4.2333] MERGE THE HARDWARE OPTIONS
   8201	021720	013746 	001612'			MOV	DQSAPR,-(SP)	; [4.2333] NOW GET THE SERIAL NUMBER
   8202	021724	042716 	170000 			BIC	#^C7777,(SP)	; [4.2333] WITHOUT THE HANGERS-ON
   8203	021730	012700 	000000G			MOV	#.CPUSN,R0	; [4.2333] POINT TO THE SERIAL NUMBER
   8204	021734	012620 				MOV	(SP)+,(R0)+	; [4.2333] SET THE SERIAL NUMBER
   8205	021736	012610 				MOV	(SP)+,(R0)	; [4.2333] AND ITS HARDWARE OPTIONS
   8206	021740	105337 	000041'			DECB	.CASW		; ASSUME NO CACHE
   8207	021744	132710 	000000G			BITB	#H.KCAC,(R0)	; [4.2333] AND IF THERE IS
   8208	021750	001402 				BEQ	10$
   8209	021752	105437 	000041'			NEGB	.CASW		; THEN RECORD IT.
   8210	021756				10$:
   8211	021756	105337 	000043'			DECB	.MFSW		; ASSUME NO MOS MEMORY
   8212	021762	132710 	000000G			BITB	#H.KMOS,(R0)	; [4.2333] CHECK MOS MASTER OSCILLATOR
   8213	021766	001404 				BEQ	20$		; NOT PRESENT -- GO ON
   8214	021770	105437 	000043'			NEGB	.MFSW		; MOS IS IN SYSTEM
   8215	021774					CALL	$KLMR		; DO ANOTHER RESET TO SETUP CLOCKS
	021774	004737 	014666'			 JSR	PC,$KLMR
   8216	022000				20$:
   8217	022000	105337 	000042'			DECB	.EASW		; ASSUME A MODEL A CPU
   8218	022004	132710 	000000G			BITB	#H.KEXT,(R0)	; [4.2333] AND IF MODEL B
   8219	022010	001402 				BEQ	30$		; THEN
   8220	022012	105437 	000042'			NEGB	.EASW		; THERE IS EXTENDED ADDRESSING.
   8221	022016				30$:
   8222	022016	000241 				CLC			; [4.2333] INSURE SUCCESS RETURN
   8223	022020				40$:
   8224	022020					RETURN
	022020	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 178
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8226					;+
   8227					; THIS SUBROUTINE CLEARS PROTOCOL AND HALTS THE KL
   8228					;-
   8229
   8230	022022				HLTNOE:
   8231	022022	012737 	000621 	000000G		MOV	#401.,.NOERR	; TELL 20F NOT TO INTERRUPT
   8232	022030					CALL	..DTSP		; AND TURN OFF PROTOCOLS
	022030	004737 	000000G			 JSR	PC,..DTSP
   8233	022034	012700 	010000 			MOV	#.CLRUN,R0	; HALT THE KL IF RUNNING
   8234	022040					CALL	$DFXC
	022040	004737 	013540'			 JSR	PC,$DFXC
   8235	022044					RETURN
	022044	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 179
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8237					;+
   8238					; SPECIAL ROUTINE TO GET LOWER HARDWARE HALF OF APRID WITHOUT
   8239					; DESTROYING REGISTERS. THIS ROUTINE IS HAIRY BECAUSE IT MODIFIES
   8240					; C-RAM LOCATION ZERO FOR A SHORT TIME AND THEN RESTORES IT TO ITS
   8241					; ORIGINAL CONTENTS.
   8242					;
   8243					; INPUTS:
   8244					;	R0	- ADDRESS OF 36 BIT BUFFER.
   8245					;
   8246					; OUTPUT:
   8247					;	(R0)	- RECIEVES RH(APRID) WORD.
   8248					;	CARRY IS SET IF ERROR OCCURS.
   8249					;-
   8250
   8251	022046				LQSHWO:
   8252	022046	010002 				MOV	R0,R2
   8253	022050					CALL	$KLMR		; CLEAR THE WORLD.
	022050	004737 	014666'			 JSR	PC,$KLMR
   8254	022054	103435 				BCS	20$
   8255	022056	012701 	001562'			MOV	#DQSCBF,R1	; HOLDING AREA FOR CONTENTS OF C-RAM 0
   8256	022062	005000 				CLR	R0		; READ C-RAM LOCATION ZERO.
   8257	022064					CALL	$RCRAM
	022064	004737 	011344'			 JSR	PC,$RCRAM
   8258	022070	103427 				BCS	20$
   8259	022072	012701 	001576'			MOV	#DQSCF3,R1	; NOW WRITE WORD WITH COND FIELD = 3
   8260	022076					CALL	$WCRAM
	022076	004737 	011064'			 JSR	PC,$WCRAM
   8261	022102	103415 				BCS	10$
   8262	022104	012700 	003000 			MOV	#.SECLK,R0	; STEP THE EBOX TWICE.
   8263	022110					CALL	$DFXC
	022110	004737 	013540'			 JSR	PC,$DFXC
   8264	022114	103410 				BCS	10$
   8265	022116					CALL	$DFXC
	022116	004737 	013540'			 JSR	PC,$DFXC
   8266	022122	103405 				BCS	10$
   8267	022124	010201 				MOV	R2,R1		; NOW READ THE AR.
   8268	022126	012700 	120000 			MOV	#<120*1000>,R0
   8269	022132					CALL	$DFRD
	022132	004737 	013224'			 JSR	PC,$DFRD
   8270	022136				10$:
   8271	022136	012701 	001562'			MOV	#DQSCBF,R1	; RESTORE C-RAM LOCATION ZERO.
   8272	022142	005000 				CLR	R0
   8273	022144					CALLR	$WCRAM
	022144	000137 	011064'			 JMP	$WCRAM
   8274	022150				20$:
   8275	022150					RETURN
	022150	000207 				 RTS	PC
KLIQS -- DIALOG ENTRANCE QUESTI	MACRO M1113  11-NOV-81 11:25  PAGE 180
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8277					;+
   8278					; LQSCSW -- LOCAL SUBROUTINE TO SWEEP CACHE AND UPDATE CORE
   8279					;
   8280					; THIS SUBROUTINE WILL SWEEP CACHE AND UPDATE CORE.  THIS ROUTINE IS CALLED
   8281					; FROM THE INTERNAL PATH AND THE "BOOT" OPTION IN ANTICIPATION OF A DUMP.
   8282					;
   8283					; THE CACHE SWEEP IS "XCT"'D, BUT IN A DIFFERENT MANNER THAN NORMAL, AS A
   8284					; CACHE SWEEP CAN TAKE A SIGNIFICANTLY LONGER TIME TO EXECUTE THAN OTHER
   8285					; KL INSTRUCTIONS.
   8286					;
   8287					; THIS CACHE SWEEP IS EXECUTED "BLINDLY", REGARDLESS OF WHETHER OR NOT CACHE
   8288					; EXISTS IN THE HARDWARE; THE INSTRUCTION WILL "WORK" ANYWAY.  THE EXECUTE IS
   8289					; INITIATED, WE WAIT FOR ONE-HALF SECOND, AND SIMPLY PROCEEED; ERRORS ARE IGNORED.
   8290					;-
   8291
   8292	022152				LQSCSW:
   8293	022152	105337 	000030'			DECB	.CSDN		; [5.1013] BEEN HERE BEFORE??
   8294	022156	001036 				BNE	10$		; [5.1013] YES -- JUST EXIT
   8295	022160	012700 	001542'			MOV	#DQSCSW,R0	; [5.1013] INSTRUCTION POINTER TO R0
   8296	022164					CALL	$LDAR		; [5.1013] LOAD IT INTO THE AR REGISTER
	022164	004737 	030252'			 JSR	PC,$LDAR
   8297	022170	103431 				BCS	10$		; [5.1013] ERROR IF CC-C IS SET
   8298	022172	012700 	012000 			MOV	#.CONBT,R0	; [5.1013] PUSH THE CONTINUE BUTTON
   8299	022176					CALL	$DFXC		; [5.1013] SO
	022176	004737 	013540'			 JSR	PC,$DFXC
   8300	022202	103424 				BCS	10$		; [5.1013] ERROR IF CC-C IS SET
   8301	022204	012700 	001000 			MOV	#.STRCL,R0	; [5.1013] START THE CLOCK
   8302	022210					CALL	$DFXC		; [5.1013] SO
	022210	004737 	013540'			 JSR	PC,$DFXC
   8303	022214	103417 				BCS	10$		; [5.1013] ERROR IF CC-C IS SET
   8304	022216					CLEF$S	#5.		; [5.1013] RESET THE EVENT FLAG
	022216	012746 	000005 			MOV	#5.,-(SP)
	022222	012746 				MOV	(PC)+,-(SP)
	022224	   037 	   002 			.BYTE	31.,2
	022226	104375 				EMT	375
   8305	022230	103411 				BCS	10$		; [5.1013] ERROR IF CC-C IS SET
   8306	022232					DIR$	#DQSMKT		; [5.1013] WAIT FOR 1/2 SECOND
	022232	012746 	001550'			MOV	#DQSMKT,-(SP)
	022236	104375 				EMT	375
   8307	022240	103405 				BCS	10$		; [5.1013] ERROR IF CC-C IS SET
   8308	022242					WTSE$S	#5.		; [5.1013] ZZZ...
	022242	012746 	000005 			MOV	#5.,-(SP)
	022246	012746 				MOV	(PC)+,-(SP)
	022250	   051 	   002 			.BYTE	41.,2
	022252	104375 				EMT	375
   8309	022254				10$:
   8310	022254					RETURN			; [5.1013] TO CALLER
	022254	000207 				 RTS	PC
KLIRS -- SPECIAL KL RESTARTS	MACRO M1113  11-NOV-81 11:25  PAGE 181
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

   8312						.TITLE	KLIRS -- SPECIAL KL RESTARTS
   8313	022256					IDENT$	5,0,KLI$$F
						.IDENT	/B05000/
   8314					;
   8315					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   8316					;
   8317					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   8318					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   8319					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   8320					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   8321					;
   8322					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   8323					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   8324					; EQUIPMENT CORPORATION.
   8325					;
   8326					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   8327					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   8328					;
   8329					; VERSION 05-00
   8330					;
   8331					; ALAN D. PECKHAM  7-APR-77
   8332					;
   8333					; MODIFICATIONS:
   8334					;
   8335					;	NO.	DATE		PROGRAMMER		REASON
   8336					;	---	----		----------		------
   8337					;
   8338					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES FOR SPECIAL KL RESTARTS:
   8339					;  POWER FAIL RESTART AT 70.
   8343					;
   8344					; EQUATED SYMBOLS
   8345					;
   8346		000004 			CONO	=	4		; KL I/O SUB-FUNCTION CODE.
   8347		000010 			PAG	=	10		; KL DEVICE.
   8348					;
   8349					; LOCAL MACROS
   8350					;
   8351						.MCALL	MRKT$S,WTSE$S,WSIG$S
   8352					;
   8353					; LOCAL DATA
   8354					;
   8355	001634					.PSECT	DATA,D
   8357	001634				DRSCEN:	IO10$	CONO PAG,,600000 ; ENABLE CACHE
	001634	   000 	   000 	   003 		 .BYTE	BY$$0,BY$$1,BY$$2
	001637	   012 	   016 			 .BYTE	BY$$3,BY$$4
   8359	001641				DRSPLD:	WD36$	0 3		; LOAD AR/ARX WITH
	001641	   003 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001644	   000 	   000 			 .BYTE	BY$$3,BY$$4
   8360	001646				DRSPEN:	WD36$	0 16		; C-RAM, D-RAM, AND FS PARITIES
	001646	   016 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001651	   000 	   000 			 .BYTE	BY$$3,BY$$4
   8361	001653				DRSPFR:	WD22$	70		; KL POWER FAIL RESTART ADDRESS.
	001653	   070 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
   8365						.EVEN
   8366	004634					.PSECT	TEXT,D
   8367	004634				TRSPRF:	ERROR	<POWER-FAIL RESTART FAILED>
	004634	   077 	   040 	   120 		 .ASCIZ	\? POWER-FAIL RESTART FAILED\
KLIRS -- SPECIAL KL RESTARTS	MACRO M1113  11-NOV-81 11:25  PAGE 181-1
$DLGEN	-- ASK IF ENTERING DIALOG IS REQUIRED

	004637	   117 	   127 	   105
	004642	   122 	   055 	   106
	004645	   101 	   111 	   114
	004650	   040 	   122 	   105
	004653	   123 	   124 	   101
	004656	   122 	   124 	   040
	004661	   106 	   101 	   111
	004664	   114 	   105 	   104
	004667	   000
   8374	004670				TRSRSM:	MESSAGE	<KL RESTARTED>
	004670	   113 	   114 	   040 		 .ASCIZ	\KL RESTARTED\
	004673	   122 	   105 	   123
	004676	   124 	   101 	   122
	004701	   124 	   105 	   104
	004704	   000
   8375	022256					.PSECT
KLIRS -- SPECIAL KL RESTARTS	MACRO M1113  11-NOV-81 11:25  PAGE 182
$POWER	-- POWER FAILURE RESTART

   8377						.SBTTL	$POWER	-- POWER FAILURE RESTART
   8378					;+
   8379					; UPDATE THE CONFIGURATION FILE, INITIALIZE THE KL FOR EXECUTION,
   8380					; AND START THE KL CPU AT 70 FOR POWER FAIL RESTART.
   8381					;
   8382					; NO INPUTS OR OUTPUTS
   8383					;
   8384					; EXIT IS EITHER TO $EXIT IS SUCCESSFUL OR $ERROR IF RESTART FAILED.
   8385					;-
   8386
   8387	022256				$POWER::CALL	$FILE		; WRITE CONFIGURATION FILE FIRST.
	022256	004737 	002716'			 JSR	PC,$FILE
   8388	022262	103427 				BCS	80$
   8389	022264					CALL	$ZERAC		; CLEAR THE ACS.
	022264	004737 	000112'			 JSR	PC,$ZERAC
   8390	022270					CALL	LRSTKL		; ENABLE KL FOR NORMAL OPERATION
	022270	004737 	022346'			 JSR	PC,LRSTKL
   8391	022274	012700 	001653'			MOV	#DRSPFR,R0	; START KL AT 70.
   8392	022300					CALL	$STRKL
	022300	004737 	030002'			 JSR	PC,$STRKL
   8393	022304	103412 				BCS	70$
   8394	022306	005037 	000000G			CLR	.NOERR		; ALLOW KL ERROR INTERCEPTION
   8395	022312					PRINT	#TRSRSM		; EVERYTHING OKAY.
	022312	012700 	004670'			 MOV	#TRSRSM,R0
	022316	004737 	027034'			 JSR	PC,$TTMSG
   8396	022322					CALL	..DTP2		; START SECONDARY PROTOCOL.
	022322	004737 	000000G			 JSR	PC,..DTP2
   8397	022326	000137 	022760'			JMP	$EXIT		; JUST EXIT FROM KLINIT
   8398	022332				70$:	PRINT	#TRSPRF		; INDICATE POWER FAILURE RESTART FAILED
	022332	012700 	004634'			 MOV	#TRSPRF,R0
	022336	004737 	027034'			 JSR	PC,$TTMSG
   8399	022342	000137 	022750'		80$:	JMP	$ERROR		; CONFIGURATION WAS NOT SAVED.
KLIRS -- SPECIAL KL RESTARTS	MACRO M1113  11-NOV-81 11:25  PAGE 184
$POWER	-- POWER FAILURE RESTART

   8458					;+
   8459					; RESET THE KL CPU, ENABLE THE PARITY STOPS, AND TURN ON CACHE IF NECESSARY.
   8460					;
   8461					; NO INPUTS
   8462					;
   8463					; OUTPUTS:
   8464					;	CARRY SET IF ERROR OCCURRS.
   8465					;-
   8466
   8467	022346				LRSTKL:	CALL	$KLMR		; FORCE E-BOX INTO OBEDIENCE
	022346	004737 	014666'			 JSR	PC,$KLMR
   8469	022352	103433 				BCS	90$
   8470	022354	105737 	000041'			TSTB	.CASW		; IF CACHE IS THERE
   8471	022360	003410 				BLE	10$
   8472	022362	105737 	000062'			TSTB	.NCACH		; AND IS TO BE USED
   8473	022366	003405 				BLE	10$
   8474	022370	012700 	001634'			MOV	#DRSCEN,R0	; THEN
   8475	022374					CALL	$EXCT		; TURN IT ON
	022374	004737 	027712'			 JSR	PC,$EXCT
   8477	022400	103420 				BCS	90$
   8478	022402	012701 	001641'		10$:	MOV	#DRSPLD,R1	; DO STUFF TO
   8479	022406	012700 	047000 			MOV	#.LDCK2,R0
   8480	022412					CALL	$DFWR
	022412	004737 	013336'			 JSR	PC,$DFWR
   8481	022416	012701 	001646'			MOV	#DRSPEN,R1	; SET THE PARITIES
   8482	022422	012700 	046000 			MOV	#.LDCK1,R0
   8483	022426					CALL	$DFWR
	022426	004737 	013336'			 JSR	PC,$DFWR
   8484	022432	012700 	001000 			MOV	#.STRCL,R0	; START THE CLOCK
   8485	022436					CALLR	$DFXC
	022436	000137 	013540'			 JMP	$DFXC
   8486	022442				90$:	RETURN
	022442	000207 				 RTS	PC
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 185
$POWER	-- POWER FAILURE RESTART

   8488						.TITLE	KLIRT -- ROOT SECTION
   8489	022444					IDENT$	KLI$$V,KLI$$E,KLI$$F
						.IDENT	/B12270/
   8490					;
   8491					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   8492					;
   8493					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   8494					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   8495					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   8496					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   8497					;
   8498					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   8499					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   8500					; EQUIPMENT CORPORATION.
   8501					;
   8502					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   8503					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   8504					;
   8505					; VERSION 12-27
   8506					;
   8507					; ALAN D. PECKHAM  15-APR-77
   8508					;
   8509					; MODIFIED BY:
   8510					;
   8511					; R. BELANGER	22-OCT-79	ADD CACHE SWEEP ON BOOT OR RELOAD
   8512					;				TCO 5.1013
   8513					; R. BELANGER	16-JUL-79	ADD KL10 ENVIRONMENTAL REPORTING
   8514					;				TCO 4.2333
   8515					; R. BELANGER	02-MAR-79	ADD REVERSE MEMORY CONFIGURATION
   8516					;				TCO 4.2204
   8517					; R. BELANGER	06-DEC-78	ADD NEW KEEP-ALIVE ERROR PROCESSING
   8518					;				TCO 4.2107
   8519					;
   8520					; R. BELANGER	25-JUL-78	INTEGRATE WITH MOS CONFIGURATOR
   8521					;
   8522					; FUNCTION: THE ROOT SECTION CONTAINS ALL THE GLOBAL DATA ITEMS
   8523					;  AND THE MAIN-LINE OVERLAY CONTROL CODE.
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 186
$POWER	-- POWER FAILURE RESTART

   8525					;
   8526					; EQUATED SYMBOLS
   8527					;
   8528		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
   8529		000012 			LF	=	12		; LINE FEED CHARACTER.
   8530		000040 			SPC	=	40		; SPACE CHARACTER.
   8531		000011 			TAB	=	11		; TAB CHARACTER.
   8532					;
   8533		000256 			XCT	=	256		;  [4.2107] KL10 "XCT" OPCODE
   8534					;
   8535					; LOCAL MACROS
   8536					;
   8537						.MCALL	QIOW$,EXIT$S
   8538					;
   8539					; LOCAL DATA
   8540					;
   8541	001656					.PSECT	DATA,D
   8542	001656				DRTX71:
   8543	001656					I10$	XCT	0,,71	; [4.2107] KL10 "XCT 71"
	001656	   071 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	001661	   160 	   005 			 .BYTE	BY$$3,BY$$4
   8544						.EVEN
   8546	001664				DRTWLB:
   8547	001664					QIOW$	IO.WLB,LPOLUN,1,,DRTSTA,,<DRTBUF,0,0>
	001664	   003 	   011 			.BYTE	3,$$$ARG
	001666	000000G				.WORD	IO.WLB
	001670	000003 				.WORD	LPOLUN
	001672	   001 	   000 			.BYTE	1,
	001674	001706'				.WORD	DRTSTA
	001676	000000 				.WORD
	001700	001712'				.WORD	DRTBUF
	001702	000000 				.WORD	0
	001704	000000 				.WORD	0
   8548	001706				DRTSTA:
   8549	001706	000000 	000000 			.WORD	0,0		; I/O STATUS.
   8550	001712				DRTBUF:
   8551	001712					.BLKB	72.		; TRACK OUTPUT BUFFER.
   8552	002022				DRTBF:
   8553	002022					WD36$	0 0		; BIT BUCKET.
	002022	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002025	   000 	   000 			 .BYTE	BY$$3,BY$$4
   8554						.EVEN
   8556	004705					.PSECT	TEXT,D
   8557	004705				COMCSE::
   8558	004705					MESSAGE	<COMMAND SYNTAX ERROR>
	004705	   103 	   117 	   115 		 .ASCIZ	\COMMAND SYNTAX ERROR\
	004710	   115 	   101 	   116
	004713	   104 	   040 	   123
	004716	   131 	   116 	   124
	004721	   101 	   130 	   040
	004724	   105 	   122 	   122
	004727	   117 	   122 	   000
   8559	004732				TRTMMF:
   8560	004732					ERROR	<MEMORY CONFIGURATION FAILED>
	004732	   077 	   040 	   115 		 .ASCIZ	\? MEMORY CONFIGURATION FAILED\
	004735	   105 	   115 	   117
	004740	   122 	   131 	   040
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 186-1
$POWER	-- POWER FAILURE RESTART

	004743	   103 	   117 	   116
	004746	   106 	   111 	   107
	004751	   125 	   122 	   101
	004754	   124 	   111 	   117
	004757	   116 	   040 	   106
	004762	   101 	   111 	   114
	004765	   105 	   104 	   000
   8561	004770				TRTBTF:
   8562	004770					ERROR	<BOOTSTRAP LOAD FAILED>
	004770	   077 	   040 	   102 		 .ASCIZ	\? BOOTSTRAP LOAD FAILED\
	004773	   117 	   117 	   124
	004776	   123 	   124 	   122
	005001	   101 	   120 	   040
	005004	   114 	   117 	   101
	005007	   104 	   040 	   106
	005012	   101 	   111 	   114
	005015	   105 	   104 	   000
   8563	005020				TRTFME:
   8564	005020					ERROR	<FATAL MEMORY CONFIGURATION ERROR - CODE "_>
	005020	   077 	   040 	   106 		 .ASCIZ	\? FATAL MEMORY CONFIGURATION ERROR - CODE "_\
	005023	   101 	   124 	   101
	005026	   114 	   040 	   115
	005031	   105 	   115 	   117
	005034	   122 	   131 	   040
	005037	   103 	   117 	   116
	005042	   106 	   111 	   107
	005045	   125 	   122 	   101
	005050	   124 	   111 	   117
	005053	   116 	   040 	   105
	005056	   122 	   122 	   117
	005061	   122 	   040 	   055
	005064	   040 	   103 	   117
	005067	   104 	   105 	   040
	005072	   042 	   137 	   000
   8565	005075				TRTEND:
   8566	005075	   042 	   000 			.ASCIZ	/"/
   8567	022444					.PSECT
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 187
GLOBAL DATA STORAGE

   8569						.SBTTL	GLOBAL DATA STORAGE
   8570	000000					.PSECT	GLBL,D,GBL
   8571
   8572					;+
   8573					; WORK AND STORAGE AREA
   8574					;-
   8575
   8576	000000				.ZERO::
   8577	000000	000000 	000000 	000000 		.WORD	0,0,0		; SOURCE OF 36-BIT ZERO
   8578	000006	000000 	000000 	000000 		.WORD	0,0,0		; PLUS EXTRAS FOR C-RAM ZERO.
   8579	000014				.WORK::
   8580	000014	000000 	000000 	000000 		.WORD	0,0,0		; COMMON WORK AREA
   8581
   8582					;+
   8583					; INFORMATION AND CONTROL SWITCHES.
   8584					;-
   8585
   8586	000022				.SPSAV::
   8587	000022	000000 				.WORD	0		; SAVE STACK POINTER HERE
   8588	000024				.DLGSW::
   8589	000024	   000 				.BYTE	0		; DIALOG CONTROL SWITCH.
   8590	000025				.MCBSW::
   8591	000025	   000 				.BYTE	0		; MICROCODE FILENAME SWITCH
   8592	000026				.UFNSW::
   8593	000026	   000 				.BYTE	0		; USER FILE SPECIFIED.
   8594	000027				.DRSW::
   8595	000027	   000 				.BYTE	0		; RAM DIALOG CONTROL.
   8597	000030				.CSDN::
   8598	000030	   001 				.BYTE	1		; [5.1013] SWEEP DONE SWITCH
   8599	000031				.DCSW::
   8600	000031	   000 				.BYTE	0		; CACHE DIALOG CONTROL.
   8602	000032				.DMSW::
   8603	000032	   000 				.BYTE	0		; MEMORY DIALOG CONTROL.
   8604	000033				.DBSW::
   8605	000033	   000 				.BYTE	0		; BOOT DIALOG CONTROL.
   8607	000034				.TRKSW::
   8608	000034	   000 				.BYTE	0		; TRACK CONTROL SWITCH.
   8609	000035				.TRKTT::
   8610	000035	   000 				.BYTE	0		; [5.1005] TERMINAL TRACK CONTROL
   8611	000036				.TRKLP::
   8612	000036	   000 				.BYTE	0		; [5.1005] LP TRACK CONTROL
   8614	000037				.CKSW::
   8615	000037	   000 				.BYTE	0		; CLOCK RUNNING FLAG.
   8616	000040				.DESW::
   8617	000040	   000 				.BYTE	0		; CLOCK RUNNING FOR EXAMINE/DEPOSIT.
   8619	000041				.CASW::
   8620	000041	   000 				.BYTE	0		; CACHE INDICATOR.
   8622	000042				.EASW::
   8623	000042	   000 				.BYTE	0		; EXTENDED ADDRESSING INDICATOR.
   8624	000043				.MFSW::
   8625	000043	   000 				.BYTE	0		; MOS MEMORY INDICATOR
   8626	000044				.MFCT::
   8627	000044	   000 				.BYTE	0		; COUNT OF MF20'S EXPECTED FROM FILE
   8628	000045				.FILSW::
   8629	000045	   000 				.BYTE	0		; WRITE CONFIG FILE SWITCH
   8630	000046				.BTSW::
   8631	000046	   000 				.BYTE	0		; LOAD BOOT SWITCH
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 187-1
GLOBAL DATA STORAGE

   8632						.EVEN
   8633
   8634	000050				$LOG::
   8635	000050	000001 				.WORD	1		; [4.1.1073]ERROR LOGGING FLAG
   8636	000052				$LGERR::
   8637	000052	000000 				.WORD	0		; [4.1.1073]ERROR FLAG
   8638	000054				$LGOPN::
   8639	000054	000000 				.WORD	0		; [4.1.1073]LOGGING FILE OPEN FLAG
   8640
   8641					;+
   8642					;	.KLIWD DEFINITIONS:
   8643					;
   8644					;	KL.KAC		KEEP-ALIVE-CEASED ERROR
   8645					;	KL.LRM		LOAD RAMS
   8647					;	KL.LCA		CONFIGURE CACHE
   8649					;	KL.CFM		CONFIGURE MEMORY
   8650					;	KL.LVB		LOAD BOOT
   8651					;	KL.SPF		RESTART FOR KL POWER FAIL
   8655					;	KL.CFL		CONFIGURE ALL
   8656					;			INSTEAD OF FROM CONFIGURATION FILE
   8657					;	KL.VBN		BOOT - NO PROMPT
   8658					;	KL.VBD		BOOT - DUMP MONITOR
   8659					;
   8660					;	ALL BITS ZERO IMPLIES TO ENTER DIALOG
   8661					;-
   8662
   8663	000056				.KLISV::
   8664	000056	000000 				.WORD	0		; =.KLIWD
   8665	000060				.SNSAV::
   8666	000060	000000 				.WORD	0		; [4.2333] = .CPUSN
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 188
GLOBAL DATA STORAGE

   8669					;+
   8670					; CACHE TABLES
   8671					;-
   8672
   8673	000062				.NCACH::
   8674	000062	   377 				.BYTE	-1		; NUMBER OF CACHES TO USE.
   8675	000063				.CACHN::
   8676	000063					.BLKB	4		; CACHE MODULES TO USE.
   8677						.EVEN
   8678
   8680
   8681					;+
   8682					; CONTROLLER TABLES.
   8683					; THESE TABLES ARE USED AS FOLLOWS:
   8684					;	.CTLTP	- THIS TABLE CONTAINS THE MEMORY TYPE FOR EACH CONTROLLER.
   8685					;	.CFGTB	- THIS TABLE CONTAINS THE CONFIGURATION MASK WORDS
   8686					;		<0 -- NOT TO BE USED
   8687					;		=0 -- DEFAULT (ALL BLOCKS OR MODULES TO BE USED)
   8688					;		>0 -- USE BLOCKS OR MODULES SPECIFIED IN BIT-MASK
   8689					;
   8690					; A PSEUDO-CONTROLLER IS DEFINED FOR THE FORWARD/REVERSE CONFIGURATION FLAG.
   8691					; THIS PSEUDO-CONTROLLER ALWAYS OCCUPIES THE "CTLS+1"TH POSITION IN THE TABLES,
   8692					; AND ITS CONTROLLER TYPE IS -1, SO  THAT IT MAY BE SAVED AND RESTORED FORM THE
   8693					; CONFIGURATION FILE.
   8694					;-
   8695
   8696	000070				.CTLTP::
   8697	000070					.BLKB	CTLS		; CONTROLLER TYPE FOR EACH ADDRESS.
   8698	000130	   001 				.BYTE	1		; [4.2204] PSEUDO-CONTROLLER FOR FWD/REV CONFIGURATION FLAG
   8699						.EVEN
   8700	000132				.CFGTB::
   8701	000132					.BLKW	CTLS		; ALLOCATION BIT-MASK FOR EACH CONTROLLER
   8702	000232				.CFMRV::
   8703	000232	000000 				.WORD	0		; [4.2204] FORWARD/REVERSE CONFIGURATION FLAG
   8704
   8705	000234				BMMSTB::			; BUS-MODE MASKS
   8706	000234	007400 				.WORD	7400
   8707	000236	000360 				.WORD	360
   8708	000240	000017 				.WORD	17
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 189
GLOBAL DATA STORAGE

   8710					;+
   8711					; DPB FOR READ/WRITE DTE20 REGS
   8712					;-
   8713
   8714	000242				.KLREG::
   8715	000242	002411 				.WORD	2411
   8716	000244	   017 	   000 			.BYTE	17,0
   8717	000246	000300'				.WORD	.DTEDT
   8718	000250	000270'				.WORD	.DREG
   8719	000252	000000 				.WORD	0
   8720
   8721	000254				.DFBLK::			; EBSIN
   8722	000254				.DFWBK::
   8723	000254	000000 	000000 	000000 		.WORD	0,0,0		; 3 WORDS TO BE WRITTEN TO EBUS
   8724	000262				.DFRBK::
   8725	000262	000000 	000000 	000000 		.WORD	0,0,0		; 3 WORDS TO BE READ FROM EBUS
   8726	000270				.DREG::
   8727	000270				.DFRG1::
   8728	000270	000000 				.WORD	0		; DTE20 DIAG
   8729	000272				.DFRG2::
   8730	000272	000000 				.WORD	0		; DTE20 DIAG2
   8731	000274				.DFSTA::
   8732	000274	000000 				.WORD	0		; DTE20 STATUS WORD
   8733	000276				.DFRG3::
   8734	000276	000000 				.WORD	0		; DTE20 DIAG3
   8735
   8736	000300				.DTEDT::
   8737	000300	000000 				.WORD	0		; DTE TRANSFER AREA
   8738
   8739					;+
   8740					; TTY BUFFERS
   8741					;-
   8742
   8743		000040 			T.TIL	==	32.		; (MAXIMUM IS 80. CHARACTERS)
   8744	000302				.TTIBF::
   8745	000302					.BLKB	T.TIL		; CTY INPUT BUFFER.
   8746		000111 			T.TOL	==	73.
   8747	000342				.TTOBF::
   8748	000342					.BLKB	T.TOL		; CTY OUTPUT BUFFER.
   8749						.EVEN
   8750
   8751					;+
   8752					; MISC.
   8753					;-
   8754
   8755	000454				.MCBFN::
   8756	000454	000000 	000000 	000000 		.WORD	0,0,0,0		; MICROCODE FILENAME
	000462	000000
   8757	000464	000000 				.WORD	0		; VERSION NUMBER
   8758	000466	   005 	   005 			.BYTE	5,5		; UIC
   8759	000470	054523 	000000 			.WORD	"SY,0		; DEVICE AND UNIT
   8760	000474				.USRFN::
   8761	000474	000000 	000000 	000000 		.WORD	0,0,0,0		; FILE NAME ENTERED BY OPERATOR
	000502	000000
   8762	000504	000000 				.WORD	0		; VERSION NUMBER (LAST VERSION).
   8763	000506	   005 	   005 			.BYTE	5,5		; DIRECTORY UIC.
   8764	000510	054523 	000000 			.WORD	"SY,0		; DEVICE AND UNIT NUMBER.
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 189-1
GLOBAL DATA STORAGE

   8765	000514				.BTADR::
   8766	000514	000000 	000000 	000000 		.WORD	0,0,0		; KL BOOT ADDRESS.
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 190
GLOBAL DATA STORAGE

   8768					;+
   8769					; SYSTEM DEVICE WORK AREAS
   8770					;-
   8771
   8772	000522				.SYSTA::
   8773	000522	000000 	000000 			.WORD	0,0		; OPERATION STATUS.
   8774	000526				.SYISW::
   8775	000526	   000 				.BYTE	0		; INPUT FILE OPEN SWITCH.
   8776	000527				.SYOSW::
   8777	000527	   000 				.BYTE	0		; OUTPUT FILE OPEN SWITCH.
   8778
   8779		001000 			S.YIL	==	1000
   8780	000530				.SYIRC::
   8781	000530	000000 				.WORD	0		; RECORD COUNT.
   8782	000532				.SYIBA::
   8783	000532	000562'				.WORD	.SYIBF		; BUFFER POSITION.
   8784	000534				.SYIBC::
   8785	000534	001000 				.WORD	S.YIL		; BYTES LEFT IN BUFFER.
   8786	000536				.SYIFN::
   8787	000536	000000 	000000 	000000 		.WORD	0,0,0,0,0	; INPUT FILE NAME.
	000544	000000 	000000
   8788	000550	   005 	   005 			.BYTE	5,5
   8789	000552	054523 	000000 			.WORD	"SY,0
   8790	000556				.SYIVB::
   8791	000556	000000 	000000 			.WORD	0,0		; CURRENT INPUT BLOCK NUMBER.
   8792	000562				.SYIBF::
   8793	000562					.BLKW	S.YIL/2		; SYSTEM DEVICE INPUT BUFFER.
   8794
   8795		001000 			S.YOL	==	1000
   8796	001562				.SYORC::
   8797	001562	000000 				.WORD	0		; RECORD COUNT.
   8798	001564				.SYOBA::
   8799	001564	000562'				.WORD	.SYIBF		; BUFFER POSITION.
   8800	001566				.SYOBC::
   8801	001566	001000 				.WORD	S.YIL		; BYTES LEFT IN BUFFER.
   8802	001570				.SYOFN::
   8803	001570	000000 	000000 	000000 		.WORD	0,0,0,0,0	; OUTPUT FILE NAME.
	001576	000000 	000000
   8804	001602	   005 	   005 			.BYTE	5,5
   8805	001604	054523 	000000 			.WORD	"SY,0
   8806	001610				.SYOVB::
   8807	001610	000000 	000000 			.WORD	0,0		; CURRENT OUTPUT BLOCK NUMBER.
   8808	001614				.SYOBF::
   8809	001614					.BLKW	S.YOL/2		; SYSTEM DEVICE OUTPUT BUFFER.
   8810
   8811					;+
   8812					; FILE NAME BLOCK (SET UP TO GET DIRECTORY)
   8813					;-
   8814
   8815	002614				.SYFNB::
   8816	002614	000000 	000000 	000000 		.WORD	0,0,0		; N.FID
   8817	002622	140123 	140123 	000000 		.RAD50	/005005   /	; N.FNAM
   8818	002630	015172 				.RAD50	/DIR/		; N.FTYP
   8819	002632	000000 				.WORD	0		; N.FVER
   8820	002634	000000 				.WORD	0		; N.STAT
   8821	002636	000000 				.WORD	0		; N.NEXT
   8822	002640	177777 	177777 			.WORD	-1,-1		; DIRECTORY FID.
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 190-1
GLOBAL DATA STORAGE

   8823	002644	   005 	   005 			.BYTE	5,5		; OWNER
   8824		002614'			.SYFID	==	.SYFNB		; FILE ID IS IN FIRST TWO WORDS OF FNB
   8825		002622'			.SYFNM	==	.SYFNB+6	; FILENAME.
   8826
   8827					;+
   8828					; THESE ARE THE USER FILE ATTRIBUTES FOR THE CURRENTLY
   8829					; OPEN OUTPUT FILE.
   8830					;-
   8831
   8832	002646				.SYATT::
   8833	002646	   002 				.BYTE	2		; VARIABLE LENGTH RECORDS.
   8834	002647	   000 				.BYTE	0		; NO RECORD ATTRIBUTES.
   8835	002650	000000 				.WORD	0		; LARGEST RECORD IN FILE.
   8836	002652	000000 	000000 			.WORD	0,0		; HIGHEST VIRTUAL BLOCK ALLOCATED.
   8837	002656	000000 	000000 			.WORD	0,0		; HIGHEST VIRTUAL BLOCK USED.
   8838	002662	000000 				.WORD	0		; TO NEXT FREE BYTE IN LAST BLOCK.
   8839
   8840						.EVEN
   8841					;
   8842					; FAULT CONTINUATION DEFINETIONS
   8843					;
   8844		000001 				CES==1			; CLOCK ERROR STOP
   8845		000002 				EPE==2			; EBUS PARITY ERROR
   8846		000003 				DXE==3			; DEPOSIT EXAMINE FAILURE
   8847		000004 				CST==4			; KEEP ALIVE STOPPED
   8848		000005 				PTO==5			; PROTOCOL TIMEOUT
   8849		000006 				FME==6			; FAST MEMORY PARITY ERROR
   8850		000007 				CPE==7			; CRAM PARITY ERROR
   8851		000010 				DPE==10			; DRAM PARITY ERROR
   8852
   8853	002664				KLPCRG::
   8854	002664	000000 	000000 	000000 		.WORD	0,0,0		; KL PC REGISTER GOES HERE
   8855	002672				.ERCOD::
   8856	002672	000000 	000000 	000000 		.WORD	0,0,0		; THE ERROR CODE FROM ABOVE DEFINETIONS HERE
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 191
$START	-- MAIN PROGRAM FLOW CONTROL

   8858						.SBTTL	$START	-- MAIN PROGRAM FLOW CONTROL
   8859	022444					.PSECT
   8860						.ENABL	LSB
   8861
   8862	022444				$START::
   8863	022444	032737 	000000G	000000G		BIT	#KL.ABO,.KLIWD	; [4.1.1049]ABORT RELOADING?
   8864	022452	001403 				BEQ	5$		; [4.1.1049]NO -- GO ON
   8865	022454	005037 	000000G			CLR	.KLIWD		; [4.1.1049]YES -- CLEAR RELOAD FLAG
   8866	022460	000542 				BR	$EXIT1		; [4.1.1049]EXIT
   8867	022462	010637 	000022'		5$:	MOV	SP,.SPSAV	; SAVE THE STACK POINTER
   8868	022466					CALL	$INIT		; DO INITIALIZATION
	022466	004737 	015220'			 JSR	PC,$INIT
   8869	022472	105737 	000000G			TSTB	.KLFCF		; FAULT-CONTINUATION ENABLED ?
   8870	022476	001003 				BNE	7$		; BRANCH IF NOT
   8871	022500					CALL	$KLREC		; CALL THE FAULT CONTINUATION ROUTINE
	022500	004737 	015774'			 JSR	PC,$KLREC
   8872	022504	103530 				BCS	$EXIT1		; BRANCH ON ERROR
   8873	022506				7$:
   8874	022506	032737 	000000G	000056'		BIT	#KL.KAC,.KLISV	; [4.2107] KEEP-ALIVE RETRY??
   8875	022514	001423 				BEQ	20$		; [4.2107] NO -- GO ON
   8876	022516	105237 	000000G		XCT71::	INCB	.NOERR		; [4.2107] YES -- DON'T WANT SPURIOUS CRASHES
   8877	022522	012700 	001656'			MOV	#DRTX71,R0	; [4.2107] POINT TO KL INSTRUCTION
   8878	022526					CALL	$EXCT		; [4.2107] EXECUTE IT
	022526	004737 	027712'			 JSR	PC,$EXCT
   8879	022532	103411 				BCS	10$		; [4.2107] ERROR IF CC-C IS SET
   8880	022534	012700 	011000 			MOV	#.SETRN,R0	; [4.2107] SET THE RUN FLOP
   8881	022540					CALL	$DFXC		; [4.2107] SO
	022540	004737 	013540'			 JSR	PC,$DFXC
   8882	022544	103404 				BCS	10$		; [4.2107] ERROR IF CC-C IS SET
   8883	022546	012700 	012000 			MOV	#.CONBT,R0	; [4.2107] SET THE CONTINUE BUTTON
   8884	022552					CALL	$DFXC		; [4.2107] SO
	022552	004737 	013540'			 JSR	PC,$DFXC
   8885	022556				10$:
   8886	022556	105337 	000000G			DECB	.NOERR		; [4.2107] RESET ERROR INTERLOCK
   8887	022562	000501 				BR	$EXIT1		; [4.2107] AND EXIT
   8888						;
   8889	022564				20$:				; [4.2107]
   8890	022564	000137 	020754'			JMP	$DLGEN		; ENTER DIALOG
   8891
   8892						.DSABL	LSB
   8893
   8894						;
   8895	022570				$CFGRM::
   8896	022570					CALL	$MCBLD		; LOAD RAMS
	022570	004737 	001066'			 JSR	PC,$MCBLD
   8897	022574	103465 				BCS	$ERROR
   8899	022576				$DLGCV::
   8900	022576	000137 	017170'			JMP	$DLGCA		; ENTER CACHE DIALOG.
   8901						;
   8902
   8903						.ENABL	LSB
   8904
   8905	022602				$CFGCA::
   8906	022602	105737 	000031'			TSTB	.DCSW		; IF CONFIGURATION INFO
   8907	022606	003003 				BGT	10$		; NOT SET UP, THEN
   8908	022610					CALL	$GETCA		; GET IT.
	022610	004737 	013672'			 JSR	PC,$GETCA
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 191-1
$START	-- MAIN PROGRAM FLOW CONTROL

   8909	022614	103455 				BCS	$ERROR
   8910	022616				10$:
   8911	022616					CALL	$SETCA		; CONFIGURE THE CACHE.
	022616	004737 	000356'			 JSR	PC,$SETCA
   8912	022622	103452 				BCS	$ERROR
   8914	022624				$DLGMV::
   8915	022624	000137 	017644'			JMP	$DLGMM		; ENTER MEMORY DIALOG.
   8916						;
   8917	022630				$DLGMX::
   8918	022630	103404 				BCS	20$
   8919	022632				$DLGBV::
   8920	022632	000137 	016436'			JMP	$DLGBT		; ENTER BOOT DIALOG.
   8921						;
   8922	022636				$DLGRV::
   8923	022636	000137 	020476'			JMP	$DLGRM		; ENTER RAM DIALOG
   8924						;
   8925	022642				20$:
   8926	022642					PRINT	#TRTMMF		; MEMORY CONFIGURATION FAILED
	022642	012700 	004732'			 MOV	#TRTMMF,R0
	022646	004737 	027034'			 JSR	PC,$TTMSG
   8927	022652	000137 	022750'			JMP	$ERROR
   8928						;
   8929
   8930						.DSABL	LSB
   8931
   8932	022656				$CFGBT::
   8933	022656	105737 	000041'			TSTB	.CASW		; IF NO CACHE, THEN
   8934	022662	002414 				BLT	10$		; LOAD THE BOOT.
   8935	022664	105737 	000062'			TSTB	.NCACH		; OTHERWISE CHECK IF
   8936	022670	002011 				BGE	10$		; CACHE HAS BEEN CONFIGURED
   8937	022672					CALL	$GETCA		; IF NOT, GET LAST CONFIGURATION
	022672	004737 	013672'			 JSR	PC,$GETCA
   8938	022676	103424 				BCS	$ERROR		; AND
   8939	022700	105737 	000062'			TSTB	.NCACH		; IF WE HAVE TO SET IT
   8940	022704	001403 				BEQ	10$
   8941	022706					CALL	$SETCA		; THEN DO SO.
	022706	004737 	000356'			 JSR	PC,$SETCA
   8942	022712	103416 				BCS	$ERROR
   8943	022714				10$:
   8944	022714					CALL	$EXBLD		; LOAD & START BOOT.
	022714	004737 	027252'			 JSR	PC,$EXBLD
   8945	022720	103405 				BCS	20$
   8946	022722	105737 	000024'			TSTB	.DLGSW		; INTERNAL PATH ?
   8947	022726	002014 				BGE	$EXIT
   8948	022730	000137 	017524'			JMP	$DLGEX		; YES, TEST FOR RESTART.
   8949						;
   8950	022734				20$:
   8951	022734					CALL	$PURGE		; PURGE BOOT FILE
	022734	004737 	007704'			 JSR	PC,$PURGE
   8952	022740					PRINT	#TRTBTF
	022740	012700 	004770'			 MOV	#TRTBTF,R0
	022744	004737 	027034'			 JSR	PC,$TTMSG
   8953
   8954	022750				$ERROR::
   8955	022750	105037 	000024'			CLRB	.DLGSW		; ALLOW DIALOG
   8956	022754	000137 	020754'			JMP	$DLGEN		; AND ENTER IT.
   8957						;
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 191-2
$START	-- MAIN PROGRAM FLOW CONTROL

   8958	022760				$EXIT::
   8959	022760					CALL	$FILE		; CHANGE CONFIGURATION FILE AND
	022760	004737 	002716'			 JSR	PC,$FILE
   8960	022764	103771 				BCS	$ERROR
   8961	022766				$EXIT1::			; [4.2107]
   8962	022766					EXIT$S			; EXIT FROM KLINIT
	022766	012746 				MOV	(PC)+,-(SP)
	022770	   063 	   001 			.BYTE	51.,1
	022772	104375 				EMT	375
   8963						;
   8964	022774				$FATAL::
   8965	022774	012700 	005020'			MOV	#TRTFME,R0	; MESSAGE POINTER TO R0
   8966	023000					CALL	$TTDMS		; PRINT THE MESSAGE
	023000	004737 	026766'			 JSR	PC,$TTDMS
   8967	023004	012600 				MOV	(SP)+,R0	; POINTER TO ERROR CODE TEXT
   8968	023006	012701 	000003 			MOV	#3,R1		; THREE CHARACTERS
   8969	023012					CALL	$TTWR		; WRITE THAT
	023012	004737 	027114'			 JSR	PC,$TTWR
   8970	023016	012700 	005075'			MOV	#TRTEND,R0	; POINTER TO END
   8971	023022	012701 	000001 			MOV	#1,R1		; LENGTH OF ONE
   8972	023026					CALL	$TTWR		; WRITE THE CHARACTER
	023026	004737 	027114'			 JSR	PC,$TTWR
   8973	023032					CALL	$TCRLF		; AND END THE LINE
	023032	004737 	026730'			 JSR	PC,$TCRLF
   8974	023036	013706 	000022'			MOV	.SPSAV,SP	; RESET THE STACK POINTER
   8975	023042	105037 	000024'			CLRB	.DLGSW		; RESET DIALOG SWITCH
   8976	023046	000137 	017644'			JMP	$DLGMM		; ENTER MEMORY BOOT DILAOG
   8977						;
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 192
$DTRXX -- DTE20 REGISTER READ/WRITE SUBROUTINES

   8979						.SBTTL	$DTRXX -- DTE20 REGISTER READ/WRITE SUBROUTINES
   8980					;+
   8981					; THESE ROUTINES WILL READ OR WRITE  A DTE-20 REGISTER ACCORDING TO
   8982					; WHICH ROUTINE IS CALLED.
   8983					;
   8984					;	DTRWD1 -- READ OR WRITE DTE-20 DIAG WORD 1
   8985					;	DTRWD2 -- READ OR WRITE DTE-20 DIAG WORD 2
   8986					;	DTRWST -- READ OR WRITE DTE-20 STATUS
   8987					;	DTRWD3 -- READ OR WRITE DTE-20 DIAG WORD 3
   8988					;
   8989					; IF LOCATION "DTETMP" IS .NE. 0, IT IS TAKEN A A POINTER TO THE
   8990					; DATA TO BE WRITTEN INTO THE REGISTER. IF "DTETMP" IS .EQ. 0, THEN
   8991					; A READ OF THE REGISTER IS PERFORMED. ON EITHER A READ OR A WRITE
   8992					; THE RESULT OF THE OPERATION IS RETURNED IN R0 AND IS SAVED IN
   8993					; LOCATION "DREG", AND LOCATION "DTETMP" IS CLEARED.
   8994					;-
   8995
   8996	023052				$DTRW1::
   8997	023052	105037 	000245'			CLRB	.KLREG+3	; DIAG 1 OFFSET = 0
   8998	023056	000413 				BR	DRTDTE		; DO COMMON CODE
   8999						;
   9000	023060				$DTRW2::
   9001	023060	112737 	000002 	000245'		MOVB	#2,.KLREG+3	; DIAG 2 OFFSET = 2
   9002	023066	000407 				BR	DRTDTE		; DO COMMON CODE
   9003						;
   9004	023070				$DTRWS::
   9005	023070	112737 	000004 	000245'		MOVB	#4,.KLREG+3	; STATUS OFFSET = 4
   9006	023076	000403 				BR	DRTDTE		; DO COMMON CODE
   9007						;
   9008	023100				$DTRW3::
   9009	023100	112737 	000006 	000245'		MOVB	#6,.KLREG+3	; DIAG 3 OFFSET = 6
   9010	023106				DRTDTE:
   9011	023106	012737 	000300'	000246'		MOV	#.DTEDT,.KLREG+4 ; SET THE BUFFER POINTER FOR WRITE DATA
   9012	023114	005037 	000270'			CLR	.DREG		; CLEAR RETURN DATA BUFFER
   9013	023120					DIR$	#.KLREG		; DO THE READ OR WRITE
	023120	012746 	000242'			MOV	#.KLREG,-(SP)
	023124	104375 				EMT	375
   9014	023126	103404 				BCS	10$
   9015	023130	005037 	000300'			CLR	.DTEDT		; RESET THE DATA POINTER TO 0 (READ)
   9016	023134	013700 	000270'			MOV	.DREG,R0	; COPY THE REGISTER TO R0
   9017	023140				10$:
   9018	023140					RETURN
	023140	000207 				 RTS	PC
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 193
$RSAVE	-- SAVE REGISTERS FOR ROUTINES

   9020						.SBTTL	$RSAVE	-- SAVE REGISTERS FOR ROUTINES
   9021					;+
   9022					; THIS ROUTINE SAVES ALL REGISTERS ON THE STACK AND PUSHES
   9023					; A RETURN ROUTINE ADDRESS ALSO, SO THAT WHEN THE USER RETURNS
   9024					; THE REGISTERS ARE AUTOMATICALLY RESTORED. THE RETURNED
   9025					; REGISTERS CAN BE MODIFIED: 2(SP)=R0, 4(SP)=R1, ETC.
   9026					;-
   9027
   9028	023142				$RSAVE::
   9029	023142					PUSH	<R4,R3,R2,R1,R0>
	023142	010446 				 MOV	R4,-(SP)
	023144	010346 				 MOV	R3,-(SP)
	023146	010246 				 MOV	R2,-(SP)
	023150	010146 				 MOV	R1,-(SP)
	023152	010046 				 MOV	R0,-(SP)
   9030	023154	004715 				JSR	PC,(R5)
   9031	023156					POP	<R0,R1,R2,R3,R4,R5>
	023156	012600 				 MOV	(SP)+,R0
	023160	012601 				 MOV	(SP)+,R1
	023162	012602 				 MOV	(SP)+,R2
	023164	012603 				 MOV	(SP)+,R3
	023166	012604 				 MOV	(SP)+,R4
	023170	012605 				 MOV	(SP)+,R5
   9032	023172	000207 				RTS	PC
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 194
$ASCIZ	-- TRANSFER ASCII STRING

   9034						.SBTTL	$ASCIZ	-- TRANSFER ASCII STRING
   9035					;+
   9036					; SET AN ASCII STRING INTO AN OUTPUT BUFFER POINTED TO BY R5.
   9037					; THE INPUT STRING IS POINTED TO BY R0 AND MUST BE TERMINATED
   9038					; BY A NULL BYTE. ON EXIT, R0 POINTS PAST THE NULL BYTE, AND
   9039					; R5 POINTS PAST THE INSERTED STRING (NULL BYTE IS NOT INSERTED).
   9040					; EMBEDDED NEGATIVE BYTES ARE NOT COPIED.
   9041					;-
   9042
   9043						.ENABL	LSB
   9044	023174				10$:
   9045	023174	005305 				DEC	R5
   9046	023176				$ASCIZ::
   9047	023176	112025 				MOVB	(R0)+,(R5)+
   9048	023200	003376 				BGT	$ASCIZ
   9049	023202	002774 				BLT	10$
   9050	023204	005305 				DEC	R5
   9051	023206	000207 				RTS	PC
   9052						.DSABL	LSB
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 195
$TRACK	-- SPECIAL TRACK ROUTINE

   9055						.SBTTL	$TRACK	-- SPECIAL TRACK ROUTINE
   9056					;+
   9057					; THIS ROUTINE IS CALLED TO PROVIDE A VISUAL TRACE OF KLINIT'S
   9058					; ACTION. IT REPORTS WITH A 2-CHARACTER IDENTIFICATION, A FUNCTION
   9059					; CODE/OR ADDRESS, AND A SECONDARY ADDRESS (36-BIT ADDRESSES).
   9060					; AN ARGUEMENT BLOCK IS PASSED IN R0:
   9061					;	.WORD	"FN		;2-CHAR IDENTIFICATION
   9062					;	.WORD	ADR1		;ADDR OF FIRST 36-BIT OR FNC CODE
   9063					;	.WORD	ADR2		;ADDR OF SECOND 36-BIT
   9064					; ADR1 AND ADR2 MAY BE ZERO, IN WHICH CASE THE ARGS ARE NOT PRINTED.
   9065					;-
   9066
   9067	023210				$TRACK::
   9068	023210	004537 	023142'			JSR	R5,$RSAVE
   9069	023214	006046 				ROR	-(SP)		; SAVE THE CARRY.
   9070	023216	105737 	000034'			TSTB	.TRKSW		; IF TRACK IS OFF,
   9071	023222	001515 				BEQ	70$		; IGNORE REQUEST.
   9072	023224	012705 	001712'			MOV	#DRTBUF,R5	; SET UP OUT BUF ADDRESS
   9073	023230	010004 				MOV	R0,R4		; AND ARG POINTER.
   9074	023232	112725 	000011 			MOVB	#TAB,(R5)+
   9075	023236	112425 				MOVB	(R4)+,(R5)+	; GET IDENT.
   9076	023240	112425 				MOVB	(R4)+,(R5)+
   9077	023242	112725 	000040 			MOVB	#SPC,(R5)+
   9078	023246	122737 	000106 	001713'		CMPB	#'F,DRTBUF+1	; IS IT A DIAG FUNCTION ?
   9079	023254	001006 				BNE	10$
   9080	023256	005000 				CLR	R0
   9081	023260	153400 				BISB	@(R4)+,R0	; YES, GET NUMBER
   9082	023262	006200 				ASR	R0
   9083	023264					CALL	$TRB2O		; AND PRINT IT.
	023264	004737 	025700'			 JSR	PC,$TRB2O
   9084	023270	000416 				BR	30$
   9085						;
   9086	023272				10$:
   9087	023272	012401 				MOV	(R4)+,R1	; FIRST ADDRESS ?
   9088	023274	001414 				BEQ	30$		; NO, SKIP IT.
   9089	023276	012702 	002022'			MOV	#DRTBF,R2
   9090	023302	012703 	000005 			MOV	#5,R3		; TRANSFER 5 BYTES
   9091	023306	010200 				MOV	R2,R0		; TO WORK AREA
   9092	023310				20$:
   9093	023310	112122 				MOVB	(R1)+,(R2)+
   9094	023312	077302 				SOB	R3,20$
   9095	023314	042762 	177760 	177777 		BIC	#^C17,-1(R2)	; TRIM TO 36 BITS,
   9096	023322					CALL	$WRD22		; AND PRINT.
	023322	004737 	025354'			 JSR	PC,$WRD22
   9097	023326				30$:
   9098	023326	011401 				MOV	(R4),R1		; SECOND WORD ?
   9099	023330	001420 				BEQ	60$		; NO, IGNORE IT.
   9100	023332	012702 	002022'			MOV	#DRTBF,R2
   9101	023336	012703 	000005 			MOV	#5,R3		; SAME AS BEFORE...
   9102	023342	010200 				MOV	R2,R0
   9103	023344				40$:
   9104	023344	112122 				MOVB	(R1)+,(R2)+
   9105	023346	077302 				SOB	R3,40$
   9106	023350	042762 	177760 	177777 		BIC	#^C17,-1(R2)
   9107	023356	005744 				TST	-(R4)
   9108	023360	001402 				BEQ	50$
   9109	023362	112725 	000057 			MOVB	#'/,(R5)+	; EXCEPT FOR SEPERATOR.
KLIRT -- ROOT SECTION	MACRO M1113  11-NOV-81 11:25  PAGE 195-1
$TRACK	-- SPECIAL TRACK ROUTINE

   9110	023366				50$:
   9111	023366					CALL	$WRD36
	023366	004737 	025466'			 JSR	PC,$WRD36
   9112	023372				60$:
   9113	023372	112725 	000015 			MOVB	#CR,(R5)+	; TERMINATE LINE
   9114	023376	112725 	000012 			MOVB	#LF,(R5)+	; AND
   9115	023402	162705 	001712'			SUB	#DRTBUF,R5	; (LENGTH OF LINE)
   9116	023406	010537 	001702'			MOV	R5,DRTWLB+Q.IOPL+2 ; PUT IN DPB
   9117	023412	105737 	000036'			TSTB	.TRKLP		; [5.1005] TRACK ON LP?
   9118	023416	001406 				BEQ	65$		; [5.1005] NO -- CHECK TT
   9119	023420	012737 	000003 	001670'		MOV	#LPOLUN,DRTWLB+Q.IOLU	; [5.1005] YES -- SET LUN
   9120	023426					DIR$	#DRTWLB		; [5.1005] SEND IT
	023426	012746 	001664'			MOV	#DRTWLB,-(SP)
	023432	104375 				EMT	375
   9121	023434	105737 	000035'		65$:	TSTB	.TRKTT		; [5.1005] TRACK ON TT?
   9122	023440	001406 				BEQ	70$		; [5.1005] NO -- EXIT
   9123	023442	012737 	000002 	001670'		MOV	#TTOLUN,DRTWLB+Q.IOLU	; [5.1005] YES -- SET LUN
   9124	023450					DIR$	#DRTWLB		; AND SEND IT.
	023450	012746 	001664'			MOV	#DRTWLB,-(SP)
	023454	104375 				EMT	375
   9125	023456				70$:
   9126	023456	006126 				ROL	(SP)+		; RESTORE THE CARRY.
   9127	023460					RETURN
	023460	000207 				 RTS	PC
   9129						.TITLE	KLIST -- START THE KL BOOT
   9130	023462					IDENT$	6,0
						.IDENT	/006000/
   9131					;
   9132					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   9133					;
   9134					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   9135					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   9136					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   9137					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   9138					;
   9139					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   9140					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   9141					; EQUIPMENT CORPORATION.
   9142					;
   9143					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   9144					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   9145					;
   9146					; VERSION 06-00
   9147					;
   9148					; ALAN D. PECKHAM  7-APR-77
   9149					;
   9150					; MODIFIED BY:
   9151					;
   9152					; FUNCTION: THIS ROUTINE CLEANS UP THE CPU AND STARTS UP THE BOOT
   9153					;  WITH SPECIFIED FUNCTIONS IN AC0.
   9154					;
   9155						.MCALL	MRKT$S,WTSE$S
   9156					; EQUATED SYMBOLS
   9157					;
   9158		000020 			AAX	=	BIT4		; AR/ARX PARITY ENABLE BIT.
   9159		000000 			APR	=	0		; KL DEVICE.
   9160		000004 			CONO	=	4		; KL I/O SUB-FUNCTION CODE.
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 195-2
$TRACK	-- SPECIAL TRACK ROUTINE

   9161		000004 			CM	=	BIT2		; CRAM PARITY ENABLE BIT.
   9162		000003 			DATAO	=	3		; KL I/O SUB-FUNCTION CODE.
   9163		000002 			DM	=	BIT1		; DRAM PARITY ENABLE BIT.
   9164		000010 			FM	=	BIT3		; FM PARITY ENABLE BIT.
   9165		000001 			FS	=	BIT0		; FS PARITY ENABLE BIT.
   9166		000010 			PAG	=	10		; KL DEVICE.
   9167		000004 			PI	=	4		; KL DEVICE.
   9168		000256 			XCT	=	256		; KL EXECUTE OPCODE
   9169					;
   9170					; LOCAL DATA
   9171					;
   9172
   9173	002030					.PSECT	DATA,D
   9174
   9175	002030				DRTX72:	I10$ XCT 0,,72		;EXECUTE KL LOCATION 72
	002030	   072 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002033	   160 	   005 			 .BYTE	BY$$3,BY$$4
   9176						.EVEN
   9177	002036				DSTRT:
   9178	002036					IO10$ CONO APR,,267760	;RESET APR
	002036	   360 	   157 	   001 		 .BYTE	BY$$0,BY$$1,BY$$2
	002041	   002 	   016 			 .BYTE	BY$$3,BY$$4
   9179	002043					IO10$ CONO PI,,10000	;RESET PI SYSTEM
	002043	   000 	   020 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002046	   006 	   016 			 .BYTE	BY$$3,BY$$4
   9180	002050					IO10$ CONO PAG,,0	;PAGING SYSTEM CLEAR
	002050	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002053	   012 	   016 			 .BYTE	BY$$3,BY$$4
   9181	002055					IO10$ DATAO PAG,,0	;USER BASE CLEAR
	002055	   000 	   000 	   200 		 .BYTE	BY$$0,BY$$1,BY$$2
	002060	   011 	   016 			 .BYTE	BY$$3,BY$$4
   9182		000004 			DSTRTL=.-DSTRT/I.10L
   9184	002062				DSTCEN:
   9185	002062					IO10$	CONO PAG,,600000
	002062	   000 	   000 	   003 		 .BYTE	BY$$0,BY$$1,BY$$2
	002065	   012 	   016 			 .BYTE	BY$$3,BY$$4
   9187	002067				DST1B0:
   9188	002067					WD36$	400000 0	;1B0
	002067	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002072	   000 	   010 			 .BYTE	BY$$3,BY$$4
   9189	002074				DST1B1:
   9190	002074					WD36$	200000 0	;1B1
	002074	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002077	   000 	   004 			 .BYTE	BY$$3,BY$$4
   9191	002101				DST3B1:
   9192	002101					WD36$	600000 0	;3B1
	002101	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002104	   000 	   014 			 .BYTE	BY$$3,BY$$4
   9193						.EVEN			; DSTBF NUST START ON EVEN BOUNDRY.
   9194	002106				DSTBF:
   9195	002106					WD36$	0 0		; GENERAL BIT BUCKET.
	002106	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002111	   000 	   000 			 .BYTE	BY$$3,BY$$4
   9196						.EVEN
   9197
   9198	005077					.PSECT	TEXT,D
   9199
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 195-3
$TRACK	-- SPECIAL TRACK ROUTINE

   9200	005077				TSTBSM:
   9201	005077					MESSAGE	<BOOTSTRAP LOADED AND STARTED>
	005077	   102 	   117 	   117 		 .ASCIZ	\BOOTSTRAP LOADED AND STARTED\
	005102	   124 	   123 	   124
	005105	   122 	   101 	   120
	005110	   040 	   114 	   117
	005113	   101 	   104 	   105
	005116	   104 	   040 	   101
	005121	   116 	   104 	   040
	005124	   123 	   124 	   101
	005127	   122 	   124 	   105
	005132	   104 	   000
   9202
   9203						.EVEN
   9204
   9205	005134				FCFMSG:
   9206	005134					ERROR	<FAULT CONTINUATION FAILED>
	005134	   077 	   040 	   106 		 .ASCIZ	\? FAULT CONTINUATION FAILED\
	005137	   101 	   125 	   114
	005142	   124 	   040 	   103
	005145	   117 	   116 	   124
	005150	   111 	   116 	   125
	005153	   101 	   124 	   111
	005156	   117 	   116 	   040
	005161	   106 	   101 	   111
	005164	   114 	   105 	   104
	005167	   000
   9207
   9208	023462					.PSECT
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 196
$TENST	-- START KL BOOT

   9210						.SBTTL	$TENST	-- START KL BOOT
   9211					;+
   9212					; UPDATE THE CONFIGURATION FILE AND START UP THE KL BOOTSTRAP.
   9213					; TRANSFER DUMP AND PROMPT BITS FROM .KLIWD TO AC0 FOR KL BOOT.
   9214					; 	1B0	INDICATES NO PROMPTING
   9215					; 	1B1	INDICATES TO DUMP KL
   9216					; BEGIN EXECUTION AT START+1 TO INFORM THE BOOT THAT THESE
   9217					; SWITCHES ARE SET.
   9218					;
   9219					; INPUTS:
   9220					;	.BTADR	- THE BOOT STARTING ADDRESS.
   9221					;
   9222					; NO OUTPUTS
   9223					; THE RETURN IS TO $ERROR IF UNSUCCESSFUL.
   9224					;-
   9225
   9226						.ENABL	LSB
   9227
   9228	023462				$TENST::
   9229	023462					CALL	$FILE		; CHANGE CONFIGURATION FILE FIRST.
	023462	004737 	002716'			 JSR	PC,$FILE
   9230	023466	103002 				BCC	$TENS1		; BRANCH IF OK
   9231	023470	000137 	024226'			JMP	80$		; TOO FAR TO BRANCH
   9232	023474				$TENS1::
   9233	023474	105737 	000000G			TSTB	.KLFCF		; FAULT CONTINUATION ENABLED ?
   9234	023500	001114 				BNE	5$		; BRANCH IF NOT
   9235	023502	005737 	002672'			TST	.ERCOD		; ANY ERROS TO CONTINUE ON ?
   9236	023506	001511 				BEQ	5$		; BRANCH IF NOT
   9237	023510	032737 	000000G	000056'		BIT	#KL.VBN,.KLISV	; ARE WE LOADING VBOOT ? (NO RESTART)
   9238	023516	001105 				BNE	5$		; BRANCH IF SO
   9239	023520	012700 	000100 			MOV	#100,R0		; DEPOSIT PC REGISTER INTO 100
   9240	023524	012701 	002664'			MOV	#KLPCRG,R1	; ADDRESS OF THE SAVED PC TO R1
   9241	023530					CALL	$DPOST		; DO THE DEPOSIT
	023530	004737 	012636'			 JSR	PC,$DPOST
   9242	023534	103472 				BCS	4$		; BRANCH ON ERROR
   9243	023536	012700 	000101 			MOV	#101,R0		; ERROR CODE IN TO KL LOCATION 101
   9244	023542	012701 	002672'			MOV	#.ERCOD,R1	; ADDRESS OF SAVED ERROR CODE
   9245	023546					CALL	$DPOST		; DEPOSIT IT
	023546	004737 	012636'			 JSR	PC,$DPOST
   9246	023552	103463 				BCS	4$		; BRANCH ON ERROR
   9247	023554	052737 	000000G	000002G		BIS	#EF.FCP,.COMEF+2; SET FAULT CONTINUATION IN PROGRESS
   9248	023562					CALL	..DSEV		; DECLARE A SIG EVENT
	023562	004737 	000000G			 JSR	PC,..DSEV
   9249	023566				XCT72::
   9250	023566	105237 	000000G			INCB	.NOERR		; DON'T CARE ABOUT ERRORS NOW
   9251	023572	012700 	002030'			MOV	#DRTX72,R0	; EXECUTE 72 CODE
   9252	023576					CALL	$EXCT		; DO THE EXECUTE
	023576	004737 	027712'			 JSR	PC,$EXCT
   9253	023602	103447 				BCS	4$		; EXIT IF ERROR
   9254	023604	012700 	011000 			MOV	#.SETRN,R0	; SET THE RUN FLOP
   9255	023610					CALL	$DFXC		; SET IT
	023610	004737 	013540'			 JSR	PC,$DFXC
   9256	023614	103442 				BCS	4$
   9257	023616	012700 	012000 			MOV	#.CONBT,R0	; SET CONTINUE
   9258	023622					CALL	$DFXC
	023622	004737 	013540'			 JSR	PC,$DFXC
   9259	023626	103435 				BCS	4$
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 196-1
$TENST	-- START KL BOOT

   9260	023630	012701 	000024 			MOV	#20.,R1		; SET TO WAIT ATLEAST 5 SECONDS
   9261	023634				W72LOP:
   9262	023634					MRKT$S	#7.,#15.	; WAIT 15 CLOCK TICKS
	023634	005046 				CLR	-(SP)
	023636	005046 				CLR	-(SP)
	023640	012746 	000017 			MOV	#15.,-(SP)
	023644	012746 	000007 			MOV	#7.,-(SP)
	023650	012746 				MOV	(PC)+,-(SP)
	023652	   027 	   005 			.BYTE	23.,5
	023654	104375 				EMT	375
   9263	023656					WTSE$S	#7.		; WAIT FOR EVENT FLAG 7
	023656	012746 	000007 			MOV	#7.,-(SP)
	023662	012746 				MOV	(PC)+,-(SP)
	023664	   051 	   002 			.BYTE	41.,2
	023666	104375 				EMT	375
   9264	023670	032737 	000000G	000002G		BIT	#EF.FCP,.COMEF+2 ; STILL WAITING FOR THE KL ?
   9265	023676	001556 				BEQ	100$		; BRANCH IF NOT
   9266	023700	077123 				SOB	R1,W72LOP	; WAIT SOME MORE
   9267	023702	105237 	000000G			INCB	.NOERR		; SET NO ERROR AGAIN
   9268	023706	105237 	000000G			INCB	.TKTN		; SCHEDULE TASK TERMINATOR
   9269	023712	052737 	000000G	000000G		BIS	#KS.FCF,.KLITK	; SAY WHY IT FAILED
   9270	023720	000545 				BR	100$		; AND EXIT
   9271	023722				4$:
   9272	023722					PRINT	#FCFMSG		; TELL THEM THE BAD NEWS
	023722	012700 	005134'			 MOV	#FCFMSG,R0
	023726	004737 	027034'			 JSR	PC,$TTMSG
   9273									; AND LOAD THE BOOT
   9274	023732				5$:
   9275	023732					CALL	$ZERAC		; CLEAR THE AC'S.
	023732	004737 	000112'			 JSR	PC,$ZERAC
   9276	023736	103532 				BCS	90$
   9277	023740	012701 	000004 			MOV	#DSTRTL,R1
   9278	023744	012700 	002036'			MOV	#DSTRT,R0
   9279	023750				10$:
   9280	023750					CALL	$EXCT		; RESET APR,PI,CLEAR PAGING,USER BASE
	023750	004737 	027712'			 JSR	PC,$EXCT
   9281	023754	103523 				BCS	90$
   9282	023756	062700 	000005 			ADD	#I.10L,R0
   9283	023762	077106 				SOB	R1,10$
   9285	023764	105737 	000041'			TSTB	.CASW		; IF CACHE IS THERE
   9286	023770	003406 				BLE	20$
   9287	023772	105737 	000062'			TSTB	.NCACH		; AND IS TO BE USED
   9288	023776	003403 				BLE	20$
   9289	024000					CALL	$EXCT		; THEN TURN IT ON.
	024000	004737 	027712'			 JSR	PC,$EXCT
   9290	024004	103507 				BCS	90$
   9292	024006				20$:
   9293	024006	105737 	000046'			TSTB	.BTSW		; [4.2275] BOOT KL?
   9294	024012	100433 				BMI	70$		; [4.2275] NO
   9295	024014	013700 	000056'			MOV	.KLISV,R0	; .KLIWD INTO R0.
   9296	024020	032700 	000000G			BIT	#KL.VBN,R0	; TEST .KLIWD BITS
   9297	024024	001411 				BEQ	40$		; AND PICK APPROPRIATE
   9298	024026	032700 	000000G			BIT	#KL.VBD,R0	; WORD TO INSERT
   9299	024032	001003 				BNE	30$		; IN AC0.
   9300	024034	012701 	002067'			MOV	#DST1B0,R1
   9301	024040	000413 				BR	60$
   9302						;
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 196-2
$TENST	-- START KL BOOT

   9303	024042				30$:
   9304	024042	012701 	002101'			MOV	#DST3B1,R1
   9305	024046	000410 				BR	60$
   9306						;
   9307	024050				40$:
   9308	024050	032700 	000000G			BIT	#KL.VBD,R0
   9309	024054	001003 				BNE	50$
   9310	024056	012701 	000000'			MOV	#.ZERO,R1
   9311	024062	000402 				BR	60$
   9312						;
   9313	024064				50$:
   9314	024064	012701 	002074'			MOV	#DST1B1,R1
   9315	024070				60$:
   9316	024070	012700 	000000'			MOV	#.ZERO,R0
   9317	024074					CALL	$DPOS		; PUT IT IN.
	024074	004737 	012654'			 JSR	PC,$DPOS
   9318	024100	103451 				BCS	90$
   9319	024102				70$:
   9320	024102	012701 	002106'			MOV	#DSTBF,R1
   9321	024106	012711 	000003 			MOV	#3,(R1)		; CHECK AR/ARX PARITY AND CAUSE
   9322	024112	012700 	047000 			MOV	#.LDCK2,R0	; PAGE FAIL UCODE TRAP IF ERROR
   9323	024116					CALL	$DFWR		; BIT34 IN .LDCK2
	024116	004737 	013336'			 JSR	PC,$DFWR
   9324	024122	103440 				BCS	90$
   9325	024124	012711 	000016 			MOV	#FM!CM!DM,(R1)	; ENABLE CRAM,DRAM,FS,AR/ARX PARITY
   9326	024130	012700 	046000 			MOV	#.LDCK1,R0
   9327	024134					CALL	$DFWR		; LOAD CONDITION ENABLE REG
	024134	004737 	013336'			 JSR	PC,$DFWR
   9328	024140	103431 				BCS	90$
   9329	024142	012700 	001000 			MOV	#.STRCL,R0	; [4.2275] START CLOCKS
   9330	024146					CALL	$DFXC		; [4.2275]
	024146	004737 	013540'			 JSR	PC,$DFXC
   9331	024152	103424 				BCS	90$		; [4.2275] ERROR IF CC-C IS SET
   9332	024154	105737 	000046'			TSTB	.BTSW		; [4.2275] BOOT KL ?
   9333	024160	100421 				BMI	90$		; [4.2275] NO -- JUST EXIT
   9334	024162	012700 	000514'			MOV	#.BTADR,R0	; GET BOOT ADDRESS AND
   9335	024166	062710 	000001 			ADD	#1,(R0)		; INCREMENT.
   9336	024172	005560 	000002 			ADC	2(R0)
   9337	024176					CALL	$STRKL
	024176	004737 	030002'			 JSR	PC,$STRKL
   9338	024202	103410 				BCS	90$		; IF SUCCESSFUL,
   9339	024204	005037 	000000G			CLR	.NOERR		; ALLOW ERRORS AND
   9340	024210					PRINT	#TSTBSM		; ANNOUNCE THE GOOD NEWS
	024210	012700 	005077'			 MOV	#TSTBSM,R0
	024214	004737 	027034'			 JSR	PC,$TTMSG
   9341	024220					CALL	..DTP2		; START SECONDARY PROTOCOL
	024220	004737 	000000G			 JSR	PC,..DTP2
   9342	024224				90$:
   9343	024224					RETURN
	024224	000207 				 RTS	PC
   9344	024226				80$:
   9345	024226	005726 				TST	(SP)+		; CONFIGURATION WAS NOT SAVED.
   9346	024230	000137 	022750'			JMP	$ERROR
   9347	024234				100$:
   9348	024234	105337 	000000G			DECB	.NOERR		; ALLOW FOR ERRORS
   9349	024240	000137 	022766'			JMP	$EXIT1		; AND EXIT
   9350						;
KLIST -- START THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 196-3
$TENST	-- START KL BOOT

   9351
   9352						.DSABL	LSB
KLITF -- ASCII FILE-NAME TRANSL	MACRO M1113  11-NOV-81 11:25  PAGE 197
$TENST	-- START KL BOOT

   9354						.TITLE	KLITF -- ASCII FILE-NAME TRANSLATION
   9355	024244					IDENT$	5,0
						.IDENT	/005000/
   9356					;
   9357					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   9358					;
   9359					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   9360					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   9361					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   9362					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   9363					;
   9364					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   9365					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   9366					; EQUIPMENT CORPORATION.
   9367					;
   9368					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   9369					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   9370					;
   9371					; VERSION 05-00
   9372					;
   9373					; ALAN D. PECKHAM  27-APR-77
   9374					;
   9375					; MODIFIED BY:
   9376					;
   9377					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
   9378					;  OF FILE-NAMES TO/FROM A BINARY FILENAME BLOCK.
   9379					;
   9380	024244					.PSECT
KLITF -- ASCII FILE-NAME TRANSL	MACRO M1113  11-NOV-81 11:25  PAGE 198
$TRB2F	-- TRANSLATE BINARY TO ASCII FILENAME

   9382						.SBTTL	$TRB2F	-- TRANSLATE BINARY TO ASCII FILENAME
   9383					;+
   9384					; THIS ROUTINE TRANSLATES A FILENAME FROM A FILENAME BLOCK
   9385					; POINTED TO BY R0 INTO AN ASCII STRING AND PUTS THIS STRING INTO
   9386					; THE AREA POINTED TO BY R5. THE PATTERN FOR THE STRING IS:
   9387					;	"DDD:FFFFFFFFF.TTT;VVVVV"
   9388					;
   9389					; INPUTS:
   9390					;	R5	- POINTER TO AREA TO RECIEVE ASCII CHARACTERS.
   9391					;	R0	- POINTER TO FILENAME BLOCK.
   9392					;
   9393					; OUTPUTS:
   9394					;	THE ASCII STRING IS PLACED IN THE BYTES POINTED TO BY R5 AND
   9395					;	R5 IS UPDATED TO POINT AT THE BYTE FOLLOWING THE INSERTED
   9396					;	STRING. R0 IS DESTROYED.
   9397					;-
   9398
   9399	024244				$TRB2F::PUSH	R2		; SAVE R2 AND
	024244	010246 				 MOV	R2,-(SP)
   9400	024246	010002 				MOV	R0,R2		; POINT IT TO THE BLOCK.
   9401	024250	116225 	000014 			MOVB	14(R2),(R5)+	; INSERT THE DEVICE
   9402	024254	116225 	000015 			MOVB	15(R2),(R5)+
   9403	024260	116215 	000016 			MOVB	16(R2),(R5)	; AND THE UNIT NUMBER.
   9404	024264	152725 	000060 			BISB	#'0,(R5)+	; MAKE ASCII.
   9405	024270	112725 	000072 			MOVB	#':,(R5)+	; INSERT SEPERATOR.
   9406	024274	012200 				MOV	(R2)+,R0	; NOW INSERT FILE-NAME.
   9407	024276					CALL	$TRB2R
	024276	004737 	026144'			 JSR	PC,$TRB2R
   9408	024302	012200 				MOV	(R2)+,R0
   9409	024304					CALL	$TRB2R
	024304	004737 	026144'			 JSR	PC,$TRB2R
   9410	024310	012200 				MOV	(R2)+,R0
   9411	024312					CALL	$TRB2R
	024312	004737 	026144'			 JSR	PC,$TRB2R
   9412	024316	112725 	000056 			MOVB	#'.,(R5)+	; INSERT SEPERATOR AND
   9413	024322	012200 				MOV	(R2)+,R0	; THE FILE TYPE.
   9414	024324					CALL	$TRB2R
	024324	004737 	026144'			 JSR	PC,$TRB2R
   9415	024330	112725 	000073 			MOVB	#';,(R5)+	; NOW FOR THE
   9416	024334	011200 				MOV	(R2),R0		; VERSION NUMBER.
   9417	024336					CALL	$TRB2O
	024336	004737 	025700'			 JSR	PC,$TRB2O
   9418	024342					POP	R2
	024342	012602 				 MOV	(SP)+,R2
   9419	024344					RETURN
	024344	000207 				 RTS	PC
KLITF -- ASCII FILE-NAME TRANSL	MACRO M1113  11-NOV-81 11:25  PAGE 199
$TRF2B	-- TRANSLATE ASCII FILE-NAME TO BINARY

   9421						.SBTTL	$TRF2B	-- TRANSLATE ASCII FILE-NAME TO BINARY
   9422					;+
   9423					; THIS ROUTINE TRANSLATES AN ASCII FILE-NAME POINTED TO BY R5
   9424					; INTO A FILENAME BLOCK POINTED TO BY R0.
   9425					;
   9426					; INPUTS:
   9427					;	R5	- POINTER TO ASCII STRING TO EXTRACT FILE-NAME FROM.
   9428					;	R0	- POINTER TO BLOCK TO INSERT FILENAME DATA INTO.
   9429					;
   9430					; OUTPUTS:
   9431					;	(R0)	- FILENAME, FILETYPE, VERSION, UIC=[5,5], AND DEVICE=SY0:.
   9432					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS USED
   9433					;	IN THE TRANSLATION. THE CARRY IS SET ON VERSION OVERFLOW.
   9434					;-
   9435
   9436	024346				$TRF2B::PUSH	R2		; SAVE R2 AND
	024346	010246 				 MOV	R2,-(SP)
   9437	024350	010002 				MOV	R0,R2		; POINT IT TO THE BLOCK.
   9438	024352	012762 	054523 	000014 		MOV	#"SY,14(R2)	; SET DEVICE,
   9439	024360	105062 	000016 			CLRB	16(R2)		; UNIT, AND
   9440	024364	012762 	002405 	000012 		MOV	#2405,12(R2)	; DIRECTORY UIC.
   9441	024372					CALL	$TRR2B		; GET FILE NAME.
	024372	004737 	026036'			 JSR	PC,$TRR2B
   9442	024376	010022 				MOV	R0,(R2)+
   9443	024400					CALL	$TRR2B
	024400	004737 	026036'			 JSR	PC,$TRR2B
   9444	024404	010022 				MOV	R0,(R2)+
   9445	024406					CALL	$TRR2B
	024406	004737 	026036'			 JSR	PC,$TRR2B
   9446	024412	010022 				MOV	R0,(R2)+
   9447	024414	122725 	000056 			CMPB	#'.,(R5)+	; IS THERE A FILE TYPE ?
   9448	024420	001403 				BEQ	10$
   9449	024422	005305 				DEC	R5		; NO FILE TYPE,
   9450	024424	005722 				TST	(R2)+		; LEAVE ALONE.
   9451	024426	000403 				BR	20$
   9452	024430				10$:	CALL	$TRR2B		; GET FILE TYPE.
	024430	004737 	026036'			 JSR	PC,$TRR2B
   9453	024434	010022 				MOV	R0,(R2)+
   9454	024436	122725 	000073 		20$:	CMPB	#';,(R5)+	; IS THERE A VERSION NUMBER ?
   9455	024442	001403 				BEQ	30$
   9456	024444	005305 				DEC	R5		; NO VERSION,
   9457	024446	005012 				CLR	(R2)		; SET FOR CURRENT ONE.
   9458	024450	000403 				BR	40$
   9459	024452				30$:	CALL	$TRO2B		; GET VERSION NUMBER.
	024452	004737 	025762'			 JSR	PC,$TRO2B
   9460	024456	010012 				MOV	R0,(R2)
   9461	024460				40$:	POP	R2
	024460	012602 				 MOV	(SP)+,R2
   9462	024462					RETURN
	024462	000207 				 RTS	PC
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 200
$TRF2B	-- TRANSLATE ASCII FILE-NAME TO BINARY

   9464						.TITLE	KLITI -- ASCII-DECIMAL TRANSLATION
   9465	024464					IDENT$	5,0
						.IDENT	/005000/
   9466					;
   9467					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   9468					;
   9469					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   9470					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   9471					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   9472					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   9473					;
   9474					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   9475					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   9476					; EQUIPMENT CORPORATION.
   9477					;
   9478					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   9479					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   9480					;
   9481					; VERSION 05-00
   9482					;
   9483					; ALAN D. PECKHAM  30-MAR-77
   9484					;
   9485					; MODIFIED BY:
   9486					;
   9487					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
   9488					;  TO/FROM THE ASCII REPRESENTATION OF INTEGERS.
   9489					;
   9490	024464					.PSECT
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 201
$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII

   9492						.SBTTL	$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII
   9493					;+
   9494					; THIS ROUTINE TRANSLATES A BINARY NUMBER IN R0 INTO AN ASCII
   9495					; STRING AND PUTS THIS STRING INTO THE AREA POINTED TO BY R5.
   9496					; THE NUMBER IS CONSIDERED UNSIGNED, AND THE RESULTING STRING
   9497					; IS VARIABLE IN LENGTH WITH A MAXIMUM OF 5 CHARACTERS.
   9498					;
   9499					; INPUTS:
   9500					;	R5	- POINTER TO AREA TO RECIEVE ASCII CHARACTERS.
   9501					;	R0	- BINARY NUMBER TO CONVERT.
   9502					;
   9503					; OUTPUTS:
   9504					;	THE ASCII STRING IS PLACED IN THE BYTES POINTED TO BY R5 AND
   9505					;	R5 IS UPDATED TO POINT AT THE BYTE FOLLOWING THE INSERTED
   9506					;	STRING. R0 IS DESTROYED.
   9507					;-
   9508
   9509	024464				$TDB2I::
   9510	024464					PUSH	<R4,R5>		; SAVE R4 AND R5
	024464	010446 				 MOV	R4,-(SP)
	024466	010546 				 MOV	R5,-(SP)
   9511	024470	012705 	000342'			MOV	#.TTOBF,R5	; POINT TO OUTPUT BUFFER
   9512	024474	010504 				MOV	R5,R4		; COPY TO R4
   9513	024476					CALL	$TRB2I		; CONVERT TO ASCII STRING
	024476	004737 	024506'			 JSR	PC,$TRB2I
   9514	024502					CALLR	$TDB2C		; FINISH UP IN COMMON CODE
	024502	000137 	025666'			 JMP	$TDB2C
   9515						;
   9516
   9517	024506				$TRB2I::
   9518	024506	004237 	024524'			JSR	R2,10$		; SAVE R2 AND POINT TO POWER TABLE.
   9519	024512	023420 	001750 	000144 		.WORD	10000.,1000.,100.,10.,1.
	024520	000012 	000001
   9520	024524	004337 	024560'		10$:	JSR	R3,50$		; THE SAVE R3 AND SET TO
   9521
   9522	024530	022200 				CMP	(R2)+,R0	; SIGNIFICANCE CHECKER.
   9523	024532	101011 				BHI	40$		; IGNORES LEADING ZEROES.
   9524	024534	005742 				TST	-(R2)		; WHOOPS ! THIS ONE IS GOOD,
   9525	024536	010703 			20$:	MOV	PC,R3		; DIGITS ARE NOW TO BE PRINTED.
   9526
   9527	024540	112715 	000060 			MOVB	#'0,(R5)	; SET TO ZERO
   9528	024544	105215 			30$:	INCB	(R5)		; AND GO UP
   9529	024546	161200 				SUB	(R2),R0
   9530	024550	100375 				BPL	30$		; UNTIL TOO FAR,
   9531	024552	062200 				ADD	(R2)+,R0	; THEN BACK UP.
   9532	024554	105325 				DECB	(R5)+
   9533	024556	000207 			40$:	RTS	PC
   9534
   9535	024560	004713 			50$:	JSR	PC,(R3)		; MAIN PROCESSOR -
   9536	024562	004713 				JSR	PC,(R3)		; ALLOW FOR FOUR INSIGNIFICANT DIGITS,
   9537	024564	004713 				JSR	PC,(R3)
   9538	024566	004713 				JSR	PC,(R3)
   9539	024570	004737 	024536'			JSR	PC,20$		; AND THEN FORCE SIGNIFICANCE.
   9540	024574					POP	<R3,R2>		; RESTORE REGISTERS
	024574	012603 				 MOV	(SP)+,R3
	024576	012602 				 MOV	(SP)+,R2
   9541	024600					RETURN			; AND .....
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 201-1
$TRB2I	-- TRANSLATE BINARY WORD TO INTEGER ASCII

	024600	000207 				 RTS	PC
KLITI -- ASCII-DECIMAL TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 202
$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD

   9543						.SBTTL	$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD
   9544					;+
   9545					; THIS ROUTINE TRANSLATES AN ASCII INTEGER NUMBER POINTED
   9546					; TO BY R5 INTO ITS BINARY EQUIVALENT IN R0. R5 IS INCRMENTED
   9547					; PAST THE NUMBER, AND CARRY IS RETURNED ON OVERFLOW.
   9548					;
   9549					; INPUTS:
   9550					;	R5	- POINTER TO ASCII STRING TO EXTRACT INTEGER FROM.
   9551					;
   9552					; OUTPUTS:
   9553					;	R0	- BINARY NUMBER EXTRACTED.
   9554					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS USED
   9555					;	IN THE TRANSLATION. THE CARRY IS SET ON SIGNED OVERFLOW.
   9556					;-
   9557
   9558	024602				$TDI2B::
   9559	024602					PUSH	R5		; SAVE R5
	024602	010546 				 MOV	R5,-(SP)
   9560	024604	012705 	000302'			MOV	#.TTIBF,R5	; INPUT BUFFER POINTER TO R5
   9561	024610					CALL	$TTRD		; PROMT AND READ NUMBER
	024610	004737 	026330'			 JSR	PC,$TTRD
   9562	024614					CALL	$TRB2I		; CONVERT TO DECIMAL NUMBER
	024614	004737 	024506'			 JSR	PC,$TRB2I
   9563	024620					POP	R5		; RESTORE R5
	024620	012605 				 MOV	(SP)+,R5
   9564	024622					RETURN			; RETURN
	024622	000207 				 RTS	PC
   9565
   9566	024624				$TRI2B::
   9567	024624					PUSH	R1
	024624	010146 				 MOV	R1,-(SP)
   9568	024626	005000 				CLR	R0
   9569	024630	112501 			10$:	MOVB	(R5)+,R1
   9570	024632	162701 	000060 			SUB	#'0,R1
   9571	024636	100420 				BMI	30$
   9572	024640	022701 	000011 			CMP	#9.,R1
   9573	024644	103415 				BLO	30$
   9574	024646	022700 	006314 			CMP	#<77777/10.>,R0
   9575	024652	103413 				BLO	40$
   9576	024654	101003 				BHI	20$
   9577	024656	022701 	000007 			CMP	#<77777-<77777/10.*10.>>,R1
   9578	024662	103407 				BLO	40$
   9579	024664	006300 			20$:	ASL	R0
   9580	024666	060001 				ADD	R0,R1
   9581	024670	006300 				ASL	R0
   9582	024672	006300 				ASL	R0
   9583	024674	060100 				ADD	R1,R0
   9584	024676	000754 				BR	10$
   9585	024700	005727 			30$:	TST	(PC)+
   9586	024702	000261 			40$:	SEC
   9587	024704	005305 				DEC	R5
   9588	024706					POP	R1
	024706	012601 				 MOV	(SP)+,R1
   9589	024710					RETURN
	024710	000207 				 RTS	PC
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 203
$TRI2B	-- TRANSLATE ASCII INTEGER TO BINARY WORD

   9591						.TITLE	KLITM -- CRAM/DRAM TRANSLATION
   9592	024712					IDENT$	1,0
						.IDENT	/001000/
   9593					;
   9594					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   9595					;
   9596					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   9597					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   9598					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   9599					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   9600					;
   9601					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   9602					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   9603					; EQUIPMENT CORPORATION.
   9604					;
   9605					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   9606					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   9607					;
   9608					; VERSION 01-00
   9609					;
   9610					;	KEVIN T. LEFEBVRE	3-APR-79
   9611					;
   9612					; MODIFIED BY:
   9613					;
   9614					;
   9615					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
   9616					;   OF THE CRAM/DRAM FILE TO OCTAL TYPE-OUT. IT WAS WRITTEN FOR TCO
   9617					;   4.2209.
   9618					;
   9619					;
   9620					; LOCAL DATA
   9621					;
   9622	002114					.PSECT	DATA,D
   9623	002114	000000 			JCOMM:	.WORD	0
   9624	002116	000000 			SWITCH:	.WORD	0
   9625	002120	002144'			HDTAB:	.WORD	TTJ
   9626	002122	002140'				.WORD	TTP
   9627	002124	002134'				.WORD	TTB
   9628	002126	002130'				.WORD	TTA
   9629	002130	   040 	   101 	   072 	TTA:	.ASCIZ	/ A:/
	002133	   000
   9630	002134	   040 	   102 	   072 	TTB:	.ASCIZ	/ B:/
	002137	   000
   9631	002140	   040 	   120 	   072 	TTP:	.ASCIZ	/ P:/
	002143	   000
   9632	002144	   040 	   112 	   072 	TTJ:	.ASCIZ	/ J:/
	002147	   000
   9633						.EVEN
   9634	024712					.PSECT
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 204
$TRCRM  -- TRANSLATE CRAM FILE ENTRY TO ASCII OCTAL

   9636						.SBTTL	$TRCRM  -- TRANSLATE CRAM FILE ENTRY TO ASCII OCTAL
   9637					;+
   9638					; TRANSLATE THE BINARY WORDS IN BUFFER POINTED TO BY R1 INTO OCTAL
   9639					; DIGITS AND TYPE THEM IN CRAM FORMAT.
   9640					;
   9641					;	FILE FORMAT:  CRAM BIT LOCATIONS
   9642					;
   9643					;	BIT                                           BIT
   9644					;	 16                                            0
   9645					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9646					;	!64!  !66!  !68!  !70!  !72!  !74!  !76!  !78!  ! WORD 1
   9647					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9648					;	!48!49!50!51!52!53!54!55!56!57!58!59!60!  !62!  ! WORD 2
   9649					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9650					;	!32!33!34!35!36!37!38!39!40!41!42!43!44!45!46!47! WORD 3
   9651					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9652					;	!16!17!18!19!20!21!22!23!24!25!26!27!28!29!30!31! WORD 4
   9653					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9654					;	! 0! 1! 2! 3! 4! 5! 6! 7! 8! 9!10!11!12!13!14!15! WORD 5
   9655					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9656					;	!  !  !  !  !  !  !  !  !  !  !80!81!82!83!84!85! WORD 6
   9657					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9658					;
   9659					; THIS ROUTINE WAS ADDED FOR THE EXPANDED CRAM/DRAM ERROR REPORT
   9660					; TCO 4.2209
   9661					;
   9662					; INPUTS:
   9663					;	R1	-DATA BUFFER
   9664					;
   9665					; OUTPUTS:
   9666					;	NONE
   9667					;-
   9668
   9669	024712				$TRCRM::
   9670	024712					CALL	R5,$RSAVE	; SAVE REGISTERS
	024712	004537 	023142'			 JSR	R5,$RSAVE
   9671	024716	010105 				MOV	R1,R5		;BUFFER PTR
   9672	024720	062705 	000010 			ADD	#10,R5		;POINT TO CRAM 0-15
   9673	024724	012703 	000005 			MOV	#5,R3		;WORD COUNTER
   9674	024730	011502 			10$:	MOV	(R5),R2		;GET VALUE
   9675	024732	012701 	000342'			MOV	#.TTOBF,R1	;OUTPUT PTR
   9676	024736	012704 	000001 			MOV	#1,R4		;BITS TO SHIFT
   9677	024742					CALL	TROCT		;GET OCTAL DIGIT
	024742	004737 	025274'			 JSR	PC,TROCT
   9678	024746	012700 	000005 			MOV	#5,R0		;NO. OCTAL DIGITS
   9679	024752	012704 	000003 			MOV	#3,R4		;BITS PER DIGIT
   9680	024756				20$:	CALL	TROCT		;GET DIGIT
	024756	004737 	025274'			 JSR	PC,TROCT
   9681	024762	077003 				SOB	R0,20$		;DONE?
   9682	024764	112721 	000040 			MOVB	#' ,(R1)+	;YES-- END WITH SPACE
   9683	024770	012700 	000342'			MOV	#.TTOBF,R0	;OUTPUT PTR
   9684	024774	012701 	000007 			MOV	#7,R1		;NO. OF CHARACTERS TO TYPE
   9685	025000					CALL	$TTWR		;TYPE THEM
	025000	004737 	027114'			 JSR	PC,$TTWR
   9686	025004	005745 				TST	-(R5)		;NEXT VALUE
   9687	025006	077330 				SOB	R3,10$		;DONE?
   9688	025010	016502 	000014 			MOV	14(R5),R2	;YES-- GET SPEC VALUE
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 204-1
$TRCRM  -- TRANSLATE CRAM FILE ENTRY TO ASCII OCTAL

   9689	025014	012700 	000012 			MOV	#10.,R0		;LEFT JUSTIFY IT
   9690	025020	006302 			30$:	ASL	R2		;SHIFT IT
   9691	025022	077002 				SOB	R0,30$		;DONE?
   9692	025024	012701 	000342'			MOV	#.TTOBF,R1	;YES-- OUTPUT BUFFER
   9693	025030					CALL	TROCT		;FIRST DIGIT
	025030	004737 	025274'			 JSR	PC,TROCT
   9694	025034					CALL	TROCT		;SECOND DIGIT
	025034	004737 	025274'			 JSR	PC,TROCT
   9695	025040	012700 	000342'			MOV	#.TTOBF,R0	;OUTPUT BUFFER
   9696	025044	012701 	000002 			MOV	#2,R1		;NO. OF DIGITS
   9697	025050					CALL	$TTWR		;TYPE THEM
	025050	004737 	027114'			 JSR	PC,$TTWR
   9698	025054					RETURN
	025054	000207 				 RTS	PC
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 205
$TRDRM  -- TRANSLATE DRAM FILE ENTRY TO ASCII OCTAL

   9700						.SBTTL	$TRDRM  -- TRANSLATE DRAM FILE ENTRY TO ASCII OCTAL
   9701					;+
   9702					;  TRANSLATE THE BINARY WORDS IN THE BUFFER POINTED TO BY R1 INTO OCTAL
   9703					;  DIGITS AND TYPE THEM IN DRAM FORMAT WITH THE EVEN ADDRESS FIRST.
   9704					;
   9705					;	FILE FORMAT:  DRAM BIT LOCATIONS
   9706					;
   9707					;	BIT                                           BIT
   9708					;	 16                                            0
   9709					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9710					;	!  !  !A1!A2!A3!B1!B2!B3!  !  !PE!PC!J7!J8!J9!J0! EVEN ADDRESS
   9711					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9712					;	!  !  !A1!A2!A3!B1!B2!B3!  !  !PO!PC!J7!J8!J9!J0! ODD ADDRESS
   9713					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9714					;	!  !  !  !  !  !  !  !  !  !  !  !  !J1!J2!J3!J4! COMMON J
   9715					;	+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
   9716					;
   9717					;	NOTE: J0=J10 (BIT 10 OF J FIELD)
   9718					;
   9719					;  THIS ROUTINE WAS ADDED FOR THE EXPANDED CRAM/DRAM ERROR REPORT
   9720					;  TCO 4.2209
   9721					;
   9722					;  INPUTS:
   9723					;	R1-	DATA BUFFER
   9724					;
   9725					;  OUTPUTS:
   9726					;	NONE
   9727					;-
   9728
   9729	025056				$TRDRM::
   9730	025056					CALL	R5,$RSAVE	;SAVE REGISTERS
	025056	004537 	023142'			 JSR	R5,$RSAVE
   9731	025062	010105 				MOV	R1,R5		;DATA BUFFER POINTER
   9732	025064	016100 	000004 			MOV	4(R1),R0	;J COMMON VALUE
   9733	025070	012702 	000006 			MOV	#6,R2		;PUT IN CORRECT POSITION
   9734	025074	006300 			10$:	ASL	R0		;SHIFT IT
   9735	025076	077202 				SOB	R2,10$		;DONE?
   9736	025100	010037 	002114'			MOV	R0,JCOMM	;YES-- SAVE IT
   9737	025104	005037 	002116'			CLR	SWITCH		;ODD/EVEN ADDRESS SWITCH
   9738	025110	012703 	000006 		20$:	MOV	#6,R3		;FIELD COUNTER
   9739	025114	012704 	000003 			MOV	#3,R4		;BIT SHIFT COUNTER
   9740	025120	011502 				MOV	(R5),R2		;VALUE
   9741	025122	042702 	000020 			BIC	#20,R2		;CLEAR COMPUTED PARITY
   9742	025126	006302 				ASL	R2		;LEFT JUSTIFY
   9743	025130	006302 				ASL	R2		;LEFT JUSTIFY
   9744	025132	016300 	002120'		30$:	MOV	HDTAB(R3),R0	;HEADER ADDRESS
   9745	025136					CALL	$TTDMS		;TYPE HEADER
	025136	004737 	026766'			 JSR	PC,$TTDMS
   9746	025142	005703 				TST	R3		;LAST HEADER?
   9747	025144	001414 				BEQ	40$		;YES-- TYPE J FIELD
   9748	025146	012701 	000342'			MOV	#.TTOBF,R1	;NO-- OUTPUT PTR
   9749	025152					CALL	TROCT		;CONVERT FIELD TO ASCII OCTAL
	025152	004737 	025274'			 JSR	PC,TROCT
   9750	025156	012700 	000342'			MOV	#.TTOBF,R0	;OUTPUT PTR
   9751	025162	012701 	000001 			MOV	#1,R1		;FIELD SIZE
   9752	025166					CALL	$TTWR		;TYPE FIELD VALUE
	025166	004737 	027114'			 JSR	PC,$TTWR
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 205-1
$TRDRM  -- TRANSLATE DRAM FILE ENTRY TO ASCII OCTAL

   9753	025172	005743 				TST	-(R3)		;SUBTRACT 2 FROM HEADER POINTER
   9754	025174	000756 				BR	30$		;NEXT HEADER
   9755	025176	013702 	002114'		40$:	MOV	JCOMM,R2	;GET J COMMON VALUE
   9756	025202	011500 				MOV	(R5),R0		;GET J VALUE FOR ADDRESS
   9757	025204	042700 	177760 			BIC	#177760,R0	;CLEAR JUNK
   9758	025210	050002 				BIS	R0,R2		;GET J FIELD VALUE
   9759	025212	012700 	000004 			MOV	#4,R0		;SHIFT COUNT
   9760	025216	006302 			50$:	ASL	R2		;LEFT JUSTIFY
   9761	025220	077002 				SOB	R0,50$		;DONE?
   9762	025222	012700 	000004 			MOV	#4,R0		;YES-- J FIELD SIZE
   9763	025226	012701 	000342'			MOV	#.TTOBF,R1	;OUTPUT PTR
   9764	025232				60$:	CALL	TROCT		;GET DIGIT
	025232	004737 	025274'			 JSR	PC,TROCT
   9765	025236	077003 				SOB	R0,60$		;DONE?
   9766	025240	012700 	000342'			MOV	#.TTOBF,R0	;YES-- OUTPUT PTR
   9767	025244	012701 	000004 			MOV	#4,R1		;J FIELD SIZE
   9768	025250					CALL	$TTWR		;TYPE FIELD
	025250	004737 	027114'			 JSR	PC,$TTWR
   9769	025254	005737 	002116'			TST	SWITCH		;DONE?
   9770	025260	001004 				BNE	70$		;YES-- EXIT
   9771	025262	005237 	002116'			INC	SWITCH		;FLIP SWITCH
   9772	025266	005725 				TST	(R5)+		;POINT TO NEXT VALUE
   9773	025270	000707 				BR	20$		;TYPE OUT ODD ADDRESS FIELDS
   9774	025272				70$:	RETURN
	025272	000207 				 RTS	PC
KLITM -- CRAM/DRAM TRANSLATION	MACRO M1113  11-NOV-81 11:25  PAGE 206
TROCT  -- TRANSLATE OCTAL VALUE TO ASCII DIGITS

   9776						.SBTTL	TROCT  -- TRANSLATE OCTAL VALUE TO ASCII DIGITS
   9777					;+
   9778					; SHIFT OUT 1 OCTAL DIGIT FROM A LEFT JUSTIFIED VALUE, MAKE ASCII
   9779					; AND STORE IN BUFFER.
   9780					;
   9781					; INPUT:
   9782					;	R2-	VALUE
   9783					;	R4-	NO. OF BITS IN OCTAL DIGIT
   9784					;	R1-	BUFFER PTR
   9785					;
   9786					; OUTPUT:
   9787					;	R1-	UPDATED
   9788					;-
   9789
   9790	025274				TROCT:	PUSH	<R3,R4>		;SAVE R3,R4
	025274	010346 				 MOV	R3,-(SP)
	025276	010446 				 MOV	R4,-(SP)
   9791	025300	005003 				CLR	R3		;TEMP
   9792	025302	006102 			10$:	ROL	R2		;SHIFT OUT BIT
   9793	025304	006103 				ROL	R3		;SHIFT IN BIT
   9794	025306	077403 				SOB	R4,10$		;DONE?
   9795	025310	062703 	000060 			ADD	#'0,R3		;YES-- MAKE ASCII
   9796	025314	110321 				MOVB	R3,(R1)+	;STORE IN BUFFER
   9797	025316					POP	<R4,R3>		;RESTORE R3,R4
	025316	012604 				 MOV	(SP)+,R4
	025320	012603 				 MOV	(SP)+,R3
   9798	025322					RETURN
	025322	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 207
TROCT  -- TRANSLATE OCTAL VALUE TO ASCII DIGITS

   9800						.TITLE	KLITN -- ASCII-KL WORD TRANSLATION
   9801	025324					IDENT$	5,0
						.IDENT	/005000/
   9802					;
   9803					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
   9804					;
   9805					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
   9806					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
   9807					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
   9808					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
   9809					;
   9810					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
   9811					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
   9812					; EQUIPMENT CORPORATION.
   9813					;
   9814					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
   9815					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   9816					;
   9817					; VERSION 05-00
   9818					;
   9819					; ALAN D. PECKHAM 30-MAR-77
   9820					;
   9821					; MODIFIED BY:
   9822					;
   9823					; FUNCTION: THIS MODULE PROVIDES ROUTINES TO DISPLAY KL ADDRESSES
   9824					;  AND WORDS.
   9825					;
   9826					; LOCAL DATA
   9827					;
   9828	002150					.PSECT	DATA,D
   9829	002150	000000 	000000 	000000 	DTNXP:	.WORD	0,0,0		; WORK AREA TO EXPAND 16K BANK NUMBER.
   9830	002156	000000 	000000 	000000 	DTNRB:	.WORD	0,0,0		; WORK AREA FOR ROLLING BITS AROUND.
   9831	025324					.PSECT
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 208
$TENAD	-- DISPLAY KL ADDRESS/16K

   9833						.SBTTL	$TENAD	-- DISPLAY KL ADDRESS/16K
   9834					;+
   9835					; INSERT THE 22 BIT ASCII REPRESENTATION OF THE ADDRESS/16K CONTAINED
   9836					; IN R0. THE PATTERN IS "XXXXXXXX" WHERE X IS AN OCTAL DIGIT.
   9837					;
   9838					; INPUTS:
   9839					;	R5	- POINTER TO WHERE TO INSERT THE ASCII STRING.
   9840					;	R0	- NUMBER OF 16K MEMORY BANK.
   9841					;
   9842					; OUTPUTS:
   9843					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE INSERTED
   9844					;	CHARACTERS.
   9845					;-
   9846
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 210
$WRD22	-- DISPLAY 22 BIT KL WORD

   9915						.SBTTL	$WRD22	-- DISPLAY 22 BIT KL WORD
   9916					;+
   9917					; PATTERN: "XXXXXXXX"
   9918					;-
   9919
   9920	025324				$WDD22::
   9921	025324					PUSH	<R5,R4>		; SAVE R5 AND R4
	025324	010546 				 MOV	R5,-(SP)
	025326	010446 				 MOV	R4,-(SP)
   9922	025330	012705 	000342'			MOV	#.TTOBF,R5	; OUTPUT BUFFER POINTER TO R5
   9923	025334	010504 				MOV	R5,R4		; COPY TO R4
   9924	025336					CALL	$WRD22		; CONVERT THE NUMBER
	025336	004737 	025354'			 JSR	PC,$WRD22
   9925	025342					CALL	$TTDWR		; OUTPUT THE NUMBER
	025342	004737 	027100'			 JSR	PC,$TTDWR
   9926	025346					POP	<R4,R5>		; RESTORE REGISTERS
	025346	012604 				 MOV	(SP)+,R4
	025350	012605 				 MOV	(SP)+,R5
   9927	025352					RETURN			; AND EXIT
	025352	000207 				 RTS	PC
   9928
   9929	025354				$WRD22::
   9930	025354					PUSH	<R2,R1,R0>
	025354	010246 				 MOV	R2,-(SP)
	025356	010146 				 MOV	R1,-(SP)
	025360	010046 				 MOV	R0,-(SP)
   9931	025362					CALL	LTNMV
	025362	004737 	025574'			 JSR	PC,LTNMV
   9932	025366	012702 	000010 			MOV	#8.,R2
   9933	025372	012700 	000003 			MOV	#3,R0
   9934	025376	042761 	177700 	000002 		BIC	#^C77,2(R1)
   9935	025404				10$:	CALL	LTNROL
	025404	004737 	025620'			 JSR	PC,LTNROL
   9936	025410	116100 	000003 			MOVB	3(R1),R0
   9937	025414					CALL	LTNCHR
	025414	004737 	025634'			 JSR	PC,LTNCHR
   9938	025420	012700 	000003 			MOV	#3,R0
   9939	025424	077211 				SOB	R2,10$
   9940	025426					POP	<R0,R1,R2>
	025426	012600 				 MOV	(SP)+,R0
	025430	012601 				 MOV	(SP)+,R1
	025432	012602 				 MOV	(SP)+,R2
   9941	025434					RETURN
	025434	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 211
$WRD36	-- DISPLAY 36 BIT KL WORD

   9943						.SBTTL	$WRD36	-- DISPLAY 36 BIT KL WORD
   9944					;+
   9945					; PATTERN: "XXXXXX XXXXXX"
   9946					;-
   9947
   9948	025436				$WDD36::
   9949	025436					PUSH	<R5,R4>		; SAVE R5 AND R4
	025436	010546 				 MOV	R5,-(SP)
	025440	010446 				 MOV	R4,-(SP)
   9950	025442	012705 	000342'			MOV	#.TTOBF,R5	; OUTPUT BUFFER POINTER TO R5
   9951	025446	010504 				MOV	R5,R4		; COPY TO R4
   9952	025450					CALL	$WRD36		; CONVERT THE NUMBER
	025450	004737 	025466'			 JSR	PC,$WRD36
   9953	025454					CALL	$TTDWR		; OUTPUT THE NUMBER
	025454	004737 	027100'			 JSR	PC,$TTDWR
   9954	025460					POP	<R4,R5>		; RESTORE REGISTERS
	025460	012604 				 MOV	(SP)+,R4
	025462	012605 				 MOV	(SP)+,R5
   9955	025464					RETURN			; AND EXIT
	025464	000207 				 RTS	PC
   9956
   9957	025466				$WRD36::
   9958	025466					PUSH	<R2,R1,R0>
	025466	010246 				 MOV	R2,-(SP)
	025470	010146 				 MOV	R1,-(SP)
	025472	010046 				 MOV	R0,-(SP)
   9959	025474					CALL	LTNMV
	025474	004737 	025574'			 JSR	PC,LTNMV
   9960	025500	012702 	000006 			MOV	#6,R2
   9961	025504	012700 	000007 			MOV	#7,R0
   9962	025510				10$:	CALL	LTNROL
	025510	004737 	025620'			 JSR	PC,LTNROL
   9963	025514	116100 	000005 			MOVB	5(R1),R0
   9964	025520					CALL	LTNCHR
	025520	004737 	025634'			 JSR	PC,LTNCHR
   9965	025524	012700 	000003 			MOV	#3,R0
   9966	025530	077211 				SOB	R2,10$
   9967	025532	112725 	000040 			MOVB	#' ,(R5)+
   9968	025536	012702 	000006 			MOV	#6,R2
   9969	025542				20$:	CALL	LTNROL
	025542	004737 	025620'			 JSR	PC,LTNROL
   9970	025546	116100 	000005 			MOVB	5(R1),R0
   9971	025552					CALL	LTNCHR
	025552	004737 	025634'			 JSR	PC,LTNCHR
   9972	025556	012700 	000003 			MOV	#3,R0
   9973	025562	077211 				SOB	R2,20$
   9974	025564					POP	<R0,R1,R2>
	025564	012600 				 MOV	(SP)+,R0
	025566	012601 				 MOV	(SP)+,R1
	025570	012602 				 MOV	(SP)+,R2
   9975	025572					RETURN
	025572	000207 				 RTS	PC
KLITN -- ASCII-KL WORD TRANSLAT	MACRO M1113  11-NOV-81 11:25  PAGE 212
$WRD36	-- DISPLAY 36 BIT KL WORD

   9977					;+
   9978					; INSERT 36 BIT WORD INTO WORD-ALIGNED WORK AREA.
   9979					;
   9980					; INPUTS:
   9981					;	R0	- POINTER TO 36 BIT WORD TO COPY.
   9982					;
   9983					; OUTPUTS:
   9984					;	R1	- POINTER TO COPY OF 36 BIT WORD POINTED TO BY R0.
   9985					;	R0 AND R2 ARE DESTROYED.
   9986					;-
   9987
   9988	025574	012702 	000006 		LTNMV:	MOV	#6,R2		; MOVE 6 BYTES
   9989	025600	012701 	002156'			MOV	#DTNRB,R1
   9990	025604	112021 			10$:	MOVB	(R0)+,(R1)+	; MOVE DATA TO BE CONVERTED
   9991	025606	077202 				SOB	R2,10$
   9992	025610	042741 	177760 			BIC	#^C17,-(R1)	; ONLY 36 BITS PLEASE
   9993	025614	024141 				CMP	-(R1),-(R1)
   9994	025616					RETURN
	025616	000207 				 RTS	PC
   9995
   9996					;+
   9997					; SHIFT 3 WORDS AT R1 TO THE LEFT BY THE NUMBER OF BITS SPECIFED.
   9998					;
   9999					; INPUTS:
  10000					;	R1	- POINTER TO THE THREE WORDS TO SHIFT.
  10001					;	R0	- NUMBER OF TIMES TO SHIFT. MUST BE >0.
  10002					;
  10003					; OUTPUTS:
  10004					;	R0 IS DESTROYED.
  10005					;-
  10006
  10007	025620	006321 			LTNROL:	ASL	(R1)+
  10008	025622	006121 				ROL	(R1)+
  10009	025624	006111 				ROL	(R1)
  10010	025626	024141 				CMP	-(R1),-(R1)
  10011	025630	077005 				SOB	R0,LTNROL
  10012	025632					RETURN
	025632	000207 				 RTS	PC
  10013
  10014					;+
  10015					; INSERT 3 LEAST SIGNIFICANT BITS FROM R0 AS ASCII CHARACTER TO BYTE
  10016					; POINTED TO BY R5 AND INCREMENT R5.
  10017					;
  10018					; INPUTS:
  10019					;	R5	- POINTER TO BYTE TO RECIEVE DIGIT.
  10020					;	R0	- NUMBER TO PICK BOTTOM OCTAL DIGIT FROM.
  10021					;
  10022					; OUTPUTS:
  10023					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE INSERTED
  10024					;	CHARACTER. R0 IS DESTROYED.
  10025					;-
  10026
  10027	025634	042700 	177770 		LTNCHR:	BIC	#^C7,R0
  10028	025640	062700 	000060 			ADD	#'0,R0
  10029	025644	110025 				MOVB	R0,(R5)+
  10030	025646					RETURN
	025646	000207 				 RTS	PC
KLITO -- ASCII-OCTAL/BINARY TRA	MACRO M1113  11-NOV-81 11:25  PAGE 213
$WRD36	-- DISPLAY 36 BIT KL WORD

  10032						.TITLE	KLITO -- ASCII-OCTAL/BINARY TRANSLATION
  10033	025650					IDENT$	5,2								; ADP01
						.IDENT	/005020/
  10034					;
  10035					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
  10036					;
  10037					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
  10038					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
  10039					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
  10040					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
  10041					;
  10042					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
  10043					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
  10044					; EQUIPMENT CORPORATION.
  10045					;
  10046					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
  10047					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
  10048					;
  10049					; VERSION 05-02									; ADP01
  10050					;
  10051					; ALAN D. PECKHAM  30-MAR-77
  10052					;
  10053					; MODIFIED BY:
  10054					;
  10055					;
  10056					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED IN THE TRANSLATION
  10057					;  TO/FROM THE ASCII REPRESENTATION OF OCTAL NUMBERS.
  10058					;
  10059					;
KLITO -- ASCII-OCTAL/BINARY TRA	MACRO M1113  11-NOV-81 11:25  PAGE 214
$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII

  10061						.SBTTL	$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII
  10062					;+
  10063					; TRANSLATE THE UNSIGNED BINARY NUMBER IN R0 INTO AND ASCII STRING
  10064					; AND PUT IT INTO THE AREA POINTED TO BY R5. THE STRING IS VARIBLE
  10065					; IN LENGTH WITH LEADING ZERO SUPPRESSION AND A MAXIMUM LENGTH OF
  10066					; 6. R5 IS INCREMENTED PAST THE INSERTED STRING.
  10067					;
  10068					; INPUTS:
  10069					;	R5	- POINTER TO AREA TO RECIEVE ASCII CHARACTERS.
  10070					;	R0	- BINARY NUMBER TO CONVERT.
  10071					;
  10072					; OUTPUTS:
  10073					;	THE ASCII STRING IS PLACED IN THE BYTES POINTED TO BY R5 AND
  10074					;	R5 IS UPDATED TO POINT AT THE BYTE FOLLOWING THE INSERTED
  10075					;	STRING. R0 IS DESTROYED.
  10076					;-
  10077
  10078	025650				$TDB2O::
  10079	025650					PUSH	<R4,R5>		; SAVE R4 AND R5
	025650	010446 				 MOV	R4,-(SP)
	025652	010546 				 MOV	R5,-(SP)
  10080	025654	012705 	000342'			MOV	#.TTOBF,R5	; POINT TO OUTPUT BUFFER
  10081	025660	010504 				MOV	R5,R4		; COPY TO R4
  10082	025662					CALL	$TRB2O		; CONVERT TO ASCII STRING
	025662	004737 	025700'			 JSR	PC,$TRB2O
  10083	025666				$TDB2C::
  10084	025666					CALL	$TTDWR		; OUTPUT THE LINE
	025666	004737 	027100'			 JSR	PC,$TTDWR
  10085	025672					POP	<R5,R4>		; RESTORE REGISTERS
	025672	012605 				 MOV	(SP)+,R5
	025674	012604 				 MOV	(SP)+,R4
  10086	025676					RETURN			; AND EXIT
	025676	000207 				 RTS	PC
  10087
  10088	025700				$TRB2O::
  10089	025700					PUSH	<R2,R1>		; SAVE REGISTERS AND
	025700	010246 				 MOV	R2,-(SP)
	025702	010146 				 MOV	R1,-(SP)
  10090	025704	012702 	025726'			MOV	#20$,R2		; SET SIGNIFICANCE CHECKER.
  10091	025710	012701 	002200 			MOV	#2200,R1	; GET INITIAL BIT.
  10092	025714				10$:
  10093	025714	006100 				ROL	R0
  10094	025716	106101 				ROLB	R1		; ROLL BITS IN.
  10095	025720	103375 				BCC	10$		; ANY MORE ?
  10096	025722	001003 				BNE	30$		; NON-ZERO BYTE IS SIGNIFICANT.
  10097	025724	000112 				JMP	(R2)		; HAVE WE MET SIGNIFICANCE ?
  10098						;
  10099	025726				20$:
  10100	025726	005701 				TST	R1		; NO - LAST DIGIT ?
  10101	025730	100004 				BPL	40$		; NO- IGNORE.
  10102	025732				30$:
  10103	025732	010702 				MOV	PC,R2		; SIGNIFICANCE HAS BEEN REACHED.
  10104	025734	152701 	000060 			BISB	#'0,R1		; MAKE IT A DIGIT
  10105	025740	110125 				MOVB	R1,(R5)+	; AND INSERT.
  10106	025742				40$:
  10107	025742	105001 				CLRB	R1		; CLEAR OLD DIGIT
  10108	025744	152701 	000020 			BISB	#20,R1		; AND SET 3-BIT INDICATOR.
KLITO -- ASCII-OCTAL/BINARY TRA	MACRO M1113  11-NOV-81 11:25  PAGE 214-1
$TRB2O	-- TRANSLATE BINARY WORD AS OCTAL ASCII

  10109	025750	006301 				ASL	R1		; FINISHED WITH WORD ?
  10110	025752	103360 				BCC	10$		; NO - CONTINUE, OTHERWISE
  10111	025754					POP	<R1,R2>
	025754	012601 				 MOV	(SP)+,R1
	025756	012602 				 MOV	(SP)+,R2
  10112	025760					RETURN			; WE ARE FINISHED.
	025760	000207 				 RTS	PC
KLITO -- ASCII-OCTAL/BINARY TRA	MACRO M1113  11-NOV-81 11:25  PAGE 215
$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD

  10114						.SBTTL	$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD
  10115					;+
  10116					; THIS ROUTINE TRANSLATES AN ASCII OCTAL NUMBER POINTED
  10117					; TO BY R5 INTO ITS BINARY EQUIVALENT IN R0. R5 IS INCRMENTED
  10118					; PAST THE NUMBER, AND CARRY IS RETURNED ON OVERFLOW.
  10119					;
  10120					; INPUTS:
  10121					;	R5	- POINTER TO ASCII STRING TO EXTRACT OCTAL NUMBER FROM.
  10122					;
  10123					; OUTPUTS:
  10124					;	R0	- BINARY NUMBER EXTRACTED.
  10125					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS USED
  10126					;	IN THE TRANSLATION. THE CARRY IS SET ON OVERFLOW.
  10127					;-
  10128
  10138
  10139	025762				$TRO2B::
  10140	025762					PUSH	R2
	025762	010246 				 MOV	R2,-(SP)
  10141	025764	005000 				CLR	R0		; INITIALIZE RESULT.
  10142	025766	112502 			10$:	MOVB	(R5)+,R2	; GET NEXT CHARACTER				; ADP01
  10143	025770	162702 	000060 			SUB	#'0,R2		; AND MAKE BINARY
  10144	025774	100413 				BMI	20$		; WHILE CHECKING
  10145	025776	022702 	000007 			CMP	#7,R2		; IF OCTAL NUMERIC.
  10146	026002	103410 				BLO	20$		; WE ARE FINISHED IF NOT.
  10147	026004	032700 	160000 			BIT	#160000,R0	; IF RESULT WILL OVERFLOW
  10148	026010	001006 				BNE	30$		; THEN SIGNAL ERROR
  10149	026012	006300 				ASL	R0		; OTHERWISE
  10150	026014	006300 				ASL	R0		; MULTIPLY BY 8
  10151	026016	006300 				ASL	R0		; AND
  10152	026020	060200 				ADD	R2,R0		; ADD NEW DIGIT.
  10153	026022	000761 				BR	10$		; GO BACK FOR MORE.
  10154	026024	005727 			20$:	TST	(PC)+		; PROPER EXIT - CLEAR CARRY.
  10155	026026	000261 			30$:	SEC			; OVERFLOW - SET CARRY.
  10156	026030	005305 				DEC	R5		; BACK UP OVER					; ADP01
  10157	026032					POP	R2		; LAST CHARACTER CHECKED
	026032	012602 				 MOV	(SP)+,R2
  10158	026034					RETURN			; AND EXIT.
	026034	000207 				 RTS	PC
KLITO -- ASCII-OCTAL/BINARY TRA	MACRO M1113  11-NOV-81 11:25  PAGE 216
$TRO2B	-- TRANSLATE ASCII OCTAL NUMBER TO BINARY WORD

  10160
  10161						.TITLE	KLITR -- ASCII-RAD50 CONVERSION
  10162	026036					IDENT$	5,0
						.IDENT	/005000/
  10163					;
  10164					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
  10165					;
  10166					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
  10167					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
  10168					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
  10169					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
  10170					;
  10171					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
  10172					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
  10173					; EQUIPMENT CORPORATION.
  10174					;
  10175					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
  10176					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
  10177					;
  10178					; VERSION 05-00
  10179					;
  10180					; ALAN D. PECKHAM  30-MAR-77
  10181					;
  10182					; MODIFIED BY:
  10183					;
  10184					; FUNCTION: THIS MODULE CONTAINS ROUTINES INVOLVED WITH TRANSLATION
  10185					;  OF RAD50 WORDS TO/FROM ASCII STRINGS.
  10186					;
  10187	026036					.PSECT
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1113  11-NOV-81 11:25  PAGE 217
$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD

  10189						.SBTTL	$TRR2B	-- TRANSLATE ASCII TO RAD50 WORD
  10190					;+
  10191					; TRANSLATE 3 OR LESS CHARACTERS POINTED TO BY R5 INTO A RAD50 WORD
  10192					; AND PLACE IT IN R0. IF A CHARACTER IS ENCOUNTERED DURING TRANSLATION
  10193					; WHICH IS NOT ALPHANUMERIC, SPACES ARE SUBSTITUTED FOR THE REMAINING
  10194					; CHARACTERS OF THE THREE. R5 IS INCREMENTED PAST ANY CHARACTERS
  10195					; WHICH WERE ACCEPTED.
  10196					; **NOTE** THIS ROUTINE ONLY TRANSLATES ALPHANUMERIC CHARACTERS, NOT
  10197					; THE FULL RAD50 CHARACTER SET.
  10198					;
  10199					; INPUTS:
  10200					;	R5	- POINTER TO CHARACTERS TO BE USED IN TRANSLATION.
  10201					;
  10202					; OUTPUTS:
  10203					;	R0	- RAD50 WORD CONTAINING CHARACTERS TRANSLATED.
  10204					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS
  10205					;	INSERTED INTO THE RAD50 WORD.
  10206					;-
  10207
  10208	026036				$TRR2B::PUSH	<R2,R1>		; SAVE REGISTERS AND
	026036	010246 				 MOV	R2,-(SP)
	026040	010146 				 MOV	R1,-(SP)
  10209	026042	005000 				CLR	R0		; INITIALIZE RETURN VALUE.
  10210	026044	012702 	000003 			MOV	#3.,R2		; GET 3 CHARACTERS.
  10211	026050	112501 			10$:	MOVB	(R5)+,R1	; PICK UP THE NEXT
  10212	026052	162701 	000100 			SUB	#100,R1		; AND CHECK FOR ALPHAMERIC.
  10213	026056	003404 				BLE	20$
  10214	026060	022701 	000032 			CMP	#32,R1		; WITHIN A-Z ?
  10215	026064	002014 				BGE	50$		; YES, STICK IT IN.
  10216	026066	000406 				BR	30$
  10217	026070	062701 	000020 		20$:	ADD	#<100-60>,R1	; CHECK FOR NUMERIC.
  10218	026074	002403 				BLT	30$
  10219	026076	022701 	000011 			CMP	#9.,R1		; WITHIN 0-9 ?
  10220	026102	002003 				BGE	40$
  10221	026104	005305 			30$:	DEC	R5		; INVALID CHARACTER, IGNORE.
  10222	026106	012701 	177742 			MOV	#-36,R1		; INSERT A NULL.
  10223	026112	062701 	000036 		40$:	ADD	#36,R1		; INCREASE FOR NUMERIC.
  10224	026116	006300 			50$:	ASL	R0		; MULTIPLY BY 50
  10225	026120	006300 				ASL	R0
  10226	026122	006300 				ASL	R0
  10227	026124	060001 				ADD	R0,R1		; WHILE ADDING IN
  10228	026126	006300 				ASL	R0
  10229	026130	006300 				ASL	R0
  10230	026132	060100 				ADD	R1,R0		; THE NEW CHARACTER.
  10231	026134	077233 				SOB	R2,10$		; DO FOR 3 CHARACTERS
  10232	026136					POP	<R1,R2>		; AND...
	026136	012601 				 MOV	(SP)+,R1
	026140	012602 				 MOV	(SP)+,R2
  10233	026142					RETURN
	026142	000207 				 RTS	PC
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1113  11-NOV-81 11:25  PAGE 218
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

  10235						.SBTTL	$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII
  10236					;+
  10237					; TRANSLATE THE RAD50 WORD IN R0 TO AN ASCIZ STRING AND INSERT THE
  10238					; STRING AT THE AREA POINTED TO BY R5. INCREMENT R5 TO POINT PAST
  10239					; THE INSERTED STRING. THE INVALID RAD50 CODE IS REPRESENTED BY
  10240					; THE UNDERLINE CHARACTER. THE BLANK CHARACTER IS NOT INSERTED.
  10241					;
  10242					; INPUTS:
  10243					;	R5	- POINTER TO BYTES TO RECIEVE ASCII STRING.
  10244					;	R0	- RAD50 WORD FROM WHICH TO EXTRACT THE CHARACTERS.
  10245					;
  10246					; OUTPUTS:
  10247					;	R5 IS UPDATED TO POINT TO THE BYTE FOLLOWING THE CHARACTERS
  10248					;	INSERTED.
  10249					;-
  10250
  10251	026144				$TRB2R::PUSH	<R2,R1,R0>
	026144	010246 				 MOV	R2,-(SP)
	026146	010146 				 MOV	R1,-(SP)
	026150	010046 				 MOV	R0,-(SP)
  10252	026152	012702 	000002 			MOV	#2.,R2		; I DON'T UNDERSTAND THIS ROUTINE.
  10253	026156				10$:	PUSH	R0		; BUT IT DEFINITELY WORKS.
	026156	010046 				 MOV	R0,-(SP)
  10254	026160	005000 				CLR	R0
  10255	026162	011601 			20$:	MOV	(SP),R1
  10256	026164	152701 	000002 			BISB	#2,R1
  10257	026170	010146 				MOV	R1,-(SP)
  10258	026172	006016 				ROR	(SP)
  10259	026174	006216 				ASR	(SP)
  10260	026176	162601 				SUB	(SP)+,R1
  10261	026200	042701 	000037 			BIC	#37,R1
  10262	026204	160116 				SUB	R1,(SP)
  10263	026206	006001 				ROR	R1
  10264	026210	006001 				ROR	R1
  10265	026212	160116 				SUB	R1,(SP)
  10266	026214	060100 				ADD	R1,R0
  10267	026216	021627 	000047 			CMP	(SP),#47
  10268	026222	101357 				BHI	20$		; NOTE: CARRY IS CLEAR ON BRANCH.
  10269	026224	006200 				ASR	R0
  10270	026226	006200 				ASR	R0
  10271	026230	006200 				ASR	R0
  10272	026232	077227 				SOB	R2,10$
  10273	026234	012702 	000003 			MOV	#3.,R2
  10274	026240	022700 	000047 			CMP	#47,R0
  10275	026244	103405 				BLO	40$
  10276	026246	105700 				TSTB	R0
  10277	026250	001422 			30$:	BEQ	90$
  10278	026252	122700 	000035 			CMPB	#35,R0
  10279	026256	001002 				BNE	50$
  10280	026260	012700 	000115 		40$:	MOV	#115,R0
  10281	026264	122700 	000033 		50$:	CMPB	#33,R0
  10282	026270	001403 				BEQ	60$
  10283	026272	103404 				BLO	70$
  10284	026274	062700 	000040 			ADD	#40,R0
  10285	026300	062700 	000016 		60$:	ADD	#16,R0
  10286	026304	062700 	000011 		70$:	ADD	#11,R0
  10287	026310	062700 	000011 		80$:	ADD	#11,R0
KLITR -- ASCII-RAD50 CONVERSION	MACRO M1113  11-NOV-81 11:25  PAGE 218-1
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

  10288	026314	110025 				MOVB	R0,(R5)+
  10289	026316				90$:	POP	R0
	026316	012600 				 MOV	(SP)+,R0
  10290	026320	077225 				SOB	R2,30$
  10291	026322					POP	<R1,R2>
	026322	012601 				 MOV	(SP)+,R1
	026324	012602 				 MOV	(SP)+,R2
  10292	026326					RETURN
	026326	000207 				 RTS	PC
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 219
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

  10294						.TITLE	KLITT -- TTY I/O FUNCTIONS
  10295	026330					IDENT$	5,1
						.IDENT	/005010/
  10296					;
  10297					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
  10298					;
  10299					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
  10300					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
  10301					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
  10302					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
  10303					;
  10304					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
  10305					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
  10306					; EQUIPMENT CORPORATION.
  10307					;
  10308					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
  10309					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
  10310					;
  10311					; VERSION 05-00
  10312					;
  10313					; ALAN D. PECKHAM  15-APR-77
  10314					;
  10315					; MODIFIED BY:
  10316					;
  10317					; FUNCTION: ALL ROUTINES ACCESS THE CONSOLE THROUGH THIS MODULE
  10318					;  TO PROVIDE A UNIFORM INTERFACE TO THE OPERATOR.
  10319					;
  10320					; EQUATED SYMBOLS
  10321					;
  10322		000015 			CR	=	15		; CARRIAGE RETURN CHARACTER.
  10323		000012 			LF	=	12		; LINE FEED CHARACTER.
  10324					;
  10325					; LOCAL MACROS
  10326					;
  10327						.MCALL	QIOW$,WTSE$S,EXIT$S
  10328					;
  10329					; LOCAL DATA
  10330					;
  10331	002164					.PSECT	DATA,D
  10332	002164				DTTRLB:	QIOW$	IO.RLB,TTILUN,1,,DTTSTA,,<.TTIBF,T.TIL>
	002164	   003 	   010 			.BYTE	3,$$$ARG
	002166	000000G				.WORD	IO.RLB
	002170	000001 				.WORD	TTILUN
	002172	   001 	   000 			.BYTE	1,
	002174	002256'				.WORD	DTTSTA
	002176	000000 				.WORD
	002200	000302'				.WORD	.TTIBF
	002202	000040 				.WORD	T.TIL
  10333	002204				DTTWLB:	QIOW$	IO.WLB,TTOLUN,1,,DTTSTA,,<0,0,0>
	002204	   003 	   011 			.BYTE	3,$$$ARG
	002206	000000G				.WORD	IO.WLB
	002210	000002 				.WORD	TTOLUN
	002212	   001 	   000 			.BYTE	1,
	002214	002256'				.WORD	DTTSTA
	002216	000000 				.WORD
	002220	000000 				.WORD	0
	002222	000000 				.WORD	0
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 219-1
$TRB2R	-- TRANSLATE RAD50 WORD TO ASCII

	002224	000000 				.WORD	0
  10334	002226				ATLST:	QIOW$	IO.ATT,LPOLUN,1,0,0,0
	002226	   003 	   006 			.BYTE	3,$$$ARG
	002230	000000G				.WORD	IO.ATT
	002232	000003 				.WORD	LPOLUN
	002234	   001 	   000 			.BYTE	1,0
	002236	000000 				.WORD	0
	002240	000000 				.WORD	0
  10335	002242				DTLST:	QIOW$	IO.DET,LPOLUN,1,0,0,0
	002242	   003 	   006 			.BYTE	3,$$$ARG
	002244	000000G				.WORD	IO.DET
	002246	000003 				.WORD	LPOLUN
	002250	   001 	   000 			.BYTE	1,0
	002252	000000 				.WORD	0
	002254	000000 				.WORD	0
  10336	002256	000000 	000000 		DTTSTA:	.WORD	0,0
  10337	002262	000000 	000000 	000000 	TMPLOG:	.WORD	0,0,0
  10339	002270	000000 			SAVMSG:	.WORD	0
  10340	002272	000000 			SAVLEN:	.WORD	0
  10342	005170					.PSECT	TEXT,D
  10343	005170	   040 			TTSPC:	.ASCII	/ /
  10344	005171	   011 			TTTAB:	.ASCII	/	/
  10345	005172	   057 			TTSLS:	.ASCII	%/%
  10346	005173	   007 			TTBEL:	.BYTE	7
  10347	005174	   015 	   012 		TTTNLN:	.ASCII	<CR><LF>
  10348	005176	   113 	   114 	   111 	TTTPRP:	.ASCII	/KLI>/
	005201	   076
  10349	005202	   113 	   114 	   111 	TTTPRE:	.ASCIZ	/KLI -- /
	005205	   040 	   055 	   055
	005210	   040 	   000
  10350						.EVEN
  10351	026330					.PSECT
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 220
$TTRD	-- READ A LINE FROM THE CONSOLE TTY

  10353						.SBTTL	$TTRD	-- READ A LINE FROM THE CONSOLE TTY
  10354					;+
  10355					; READ A LINE INTO ".TTIBF". IF ESCAPE IS RECIEVED THE TREAT AS ERROR
  10356					; TO RESTART DIALOG. IF OTHER THAN <CR> TERMINATES THE LINE, THEN
  10357					; DO A FAST EXIT.
  10359					; IF 'T+' OR 'T-' IS RECIEVED THEN TURN ON OR OFF TRACKING RESPECTIVELY.
  10361					;
  10362					; NO INPUTS
  10363					;
  10364					; OUTPUTS:
  10365					;	.TTIBF	- CONTAINS THE CHARACTERS READ IN TERMINATED BY A ZERO BYTE.
  10366					;-
  10367
  10368	026330	004537 	023142'		$TTRD::	JSR	R5,$RSAVE
  10370	026334	013737 	002220'	002270'		MOV	DTTWLB+Q.IOPL+0,SAVMSG	; [5.1005]SAVE QUESTION MESSAGE
  10371	026342	013737 	002222'	002272'		MOV	DTTWLB+Q.IOPL+2,SAVLEN	; [5.1005]SAVE QUESTION LENGTH
  10373	026350	012737 	005176'	002220'	10$:	MOV	#TTTPRP,DTTWLB+Q.IOPL+0 ; PROMPT WITH KLI>
  10374	026356	012737 	000004 	002222'		MOV	#4,DTTWLB+Q.IOPL+2
  10375	026364					DIR$	#DTTWLB
	026364	012746 	002204'			MOV	#DTTWLB,-(SP)
	026370	104375 				EMT	375
  10377	026372					CALL	$ECHO1		; [5.1005]ECHO CTY TO LP
	026372	004737 	027220'			 JSR	PC,$ECHO1
  10379	026376					DIR$	#DTTRLB		; PERFORM GIVEN FUNCTION
	026376	012746 	002164'			MOV	#DTTRLB,-(SP)
	026402	104375 				EMT	375
  10380	026404	013701 	002260'			MOV	DTTSTA+2,R1	; SAVE LINE LENGTH
  10381	026410	013700 	002256'			MOV	DTTSTA,R0	; AND STATUS.
  10382	026414	100003 				BPL	20$
  10383	026416	122700 	000000G			CMPB	#IE.EOF,R0	; IF CONTROL-Z
  10384	026422	001415 				BEQ	30$		; CRLF IS AUTOMATIC, OTHERWISE
  10385	026424				20$:
  10387	026424					CALL	$ECHO		; [5.1005]ECHO INPUT TO LP
	026424	004737 	027204'			 JSR	PC,$ECHO
  10389	026430	012737 	005174'	002220'		MOV	#TTTNLN,DTTWLB+Q.IOPL+0 ; PRINT A CRLF
  10390	026436	112737 	000002 	002222'		MOVB	#2,DTTWLB+Q.IOPL+2
  10391	026444					DIR$	#DTTWLB
	026444	012746 	002204'			MOV	#DTTWLB,-(SP)
	026450	104375 				EMT	375
  10393	026452					CALL	$ECHO1		; [5.1005]ECHO CTY TO LP
	026452	004737 	027220'			 JSR	PC,$ECHO1
  10395	026456	022700 	000000G		30$:	CMP	#IS.ESC,R0	; DID HE TYPE AN ESCAPE ?
  10396	026462	001501 				BEQ	60$		; RESTART DIALOG.
  10397	026464	022700 	000000G			CMP	#IS.CR,R0	; DID HE END WITH A CR ?
  10398	026470	001100 				BNE	70$		; NO, EXIT.
  10399	026472	105061 	000302'			CLRB	.TTIBF(R1)	; WITH A NULL BYTE.
  10401	026476	022737 	026524 	000302'		CMP	#"T-,.TTIBF	; TURN OFF TRACK ?
  10402	026504	001422 				BEQ	50$		; YES, GO DO IT.
  10403	026506	022737 	025524 	000302'		CMP	#"T+,.TTIBF	; TURN ON TRACK ?
  10404	026514	001411 				BEQ	40$		; YES, GO DO IT.
  10405	026516	022737 	025514 	000302'		CMP	#"L+,.TTIBF	; [5.1005]TURN ON LP ?
  10406	026524	001415 				BEQ	80$		; [5.1005]YES, GO DO IT.
  10407	026526	022737 	026514 	000302'		CMP	#"L-,.TTIBF	; [5.1005]TURN OFF LP ?
  10408	026534	001433 				BEQ	90$		; [5.1005]YES, GO DO IT.
  10410	026536					RETURN
	026536	000207 				 RTS	PC
  10412	026540	105237 	000035'		40$:	INCB	.TRKTT		; TURN ON TT
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 220-1
$TTRD	-- READ A LINE FROM THE CONSOLE TTY

  10413	026544	105237 	000034'		45$:	INCB	.TRKSW		; [5.1005]TURN ON TRACK AND
  10414	026550	000677 				BR	10$		; GET ANOTHER LINE.
  10415	026552	105037 	000035'		50$:	CLRB	.TRKTT		; TURN OFF TRACK AND
  10416	026556	000432 				BR	95$		; [5.1005]CHECK FOR CLEARING .TRKSW
  10417	026560	105737 	000036'		80$:	TSTB	.TRKLP		; [5.1005]IS LP ON?
  10418	026564	001271 				BNE	10$		; [5.1005]YES, GET ANOTHER LINE
  10419	026566	105237 	000036'			INCB	.TRKLP		; [5.1005]TURN ON LP
  10420	026572					DIR$	#ATLST		; [5.1005]ATTACH LP
	026572	012746 	002226'			MOV	#ATLST,-(SP)
	026576	104375 				EMT	375
  10421	026600	103411 				BCS	90$		; [5.1005]ERROR, CLEAR LP TRACK
  10422	026602	013737 	002270'	002220'		MOV	SAVMSG,DTTWLB+Q.IOPL+0	; [5.1005]QUESTION MESSAGE
  10423	026610	013737 	002272'	002222'		MOV	SAVLEN,DTTWLB+Q.IOPL+2	; [5.1005]QUESTION LENGTH
  10424	026616					CALL	$ECHO1		; [5.1005]ECHO MESSAGE
	026616	004737 	027220'			 JSR	PC,$ECHO1
  10425	026622	000750 				BR	45$		; TURN ON TRACK
  10426	026624	105737 	000036'		90$:	TSTB	.TRKLP		; [5.1005]IS LP OFF?
  10427	026630	001647 				BEQ	10$		; [5.1005]YES, GET ANOTHER LINE
  10428	026632	105037 	000036'			CLRB	.TRKLP		; [5.1005]TURN OFF LP
  10429	026636					DIR$	#DTLST		; [5.1005]DETATCH LP
	026636	012746 	002242'			MOV	#DTLST,-(SP)
	026642	104375 				EMT	375
  10430	026644	105737 	000036'		95$:	TSTB	.TRKLP		; [5.1005]LP ON ?
  10431	026650	001237 				BNE	10$		; [5.1005]YES, GET ANOTHER LINE
  10432	026652	105737 	000035'			TSTB	.TRKTT		; [5.1005]TT ON ?
  10433	026656	001234 				BNE	10$		; [5.1005]YES, GET ANOTHER LINE
  10434	026660	105037 	000034'			CLRB	.TRKSW		; [5.1005]NOTHING ON, CLEAR TRACK
  10435	026664	000631 				BR	10$		; [5.1005]GET ANOTHER LINE
  10437	026666	000137 	022750'		60$:	JMP	$ERROR		; AND RESTART DIALOG.
  10438	026672				70$:	EXIT$S			; WE WANT OUT !
	026672	012746 				MOV	(PC)+,-(SP)
	026674	   063 	   001 			.BYTE	51.,1
	026676	104375 				EMT	375
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 221
$TTRD	-- READ A LINE FROM THE CONSOLE TTY

  10440						.ENABL	LSB
  10441
  10442	026700				$TTSPC::
  10443	026700					PUSH	R0		; SAVE R0
	026700	010046 				 MOV	R0,-(SP)
  10444	026702	012700 	005170'			MOV	#TTSPC,R0	; <SPACE> TO R0
  10445	026706	000417 				BR	10$		; PRINT AND RETURN
  10446						;
  10447	026710				$TTBEL::
  10448	026710					PUSH	R0		; SAVE R0
	026710	010046 				 MOV	R0,-(SP)
  10449	026712	012700 	005173'			MOV	#TTBEL,R0	; <BELL> TO R0
  10450	026716	000413 				BR	10$		; PRINT AND RETURN
  10451						;
  10459	026720				$TTTAB::
  10460	026720					PUSH	R0		; SAVE R0
	026720	010046 				 MOV	R0,-(SP)
  10461	026722	012700 	005171'			MOV	#TTTAB,R0	; <TAB> TO R0
  10462	026726	000407 				BR	10$		; PRINT AND RETURN
  10463						;
  10464	026730				$TCRLF::
  10465	026730					PUSH	<R0,R1>		; SAVE R0 AND R1
	026730	010046 				 MOV	R0,-(SP)
	026732	010146 				 MOV	R1,-(SP)
  10466	026734	012700 	005174'			MOV	#TTTNLN,R0	; <CR><LF> TO R0
  10467	026740	012701 	000002 			MOV	#2,R1		; LENGTH TO R1
  10468	026744	000403 				BR	20$		; PRINT AND RETURN
  10469						;
  10470	026746				10$:
  10471	026746					PUSH	R1		; SAVE R1
	026746	010146 				 MOV	R1,-(SP)
  10472	026750	012701 	000001 			MOV	#1,R1		; LENGTH TO R1
  10473	026754				20$:
  10474	026754					CALL	$TTWR		; PRINT THE CHARACTER(S)
	026754	004737 	027114'			 JSR	PC,$TTWR
  10475	026760					POP	<R1,R0>		; RESTORE REGISTERS
	026760	012601 				 MOV	(SP)+,R1
	026762	012600 				 MOV	(SP)+,R0
  10476	026764					RETURN			; EXIT
	026764	000207 				 RTS	PC
  10477
  10478						.DSABL	LSB
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 222
$TTMSG	-- WRITE A MESSAGE TO THE CONSOLE TTY

  10480						.SBTTL	$TTMSG	-- WRITE A MESSAGE TO THE CONSOLE TTY
  10481					;+
  10482					; COPY A MESSAGE INTO THE OUTPUT BUFFER WITH THE 'KLI -- ' PREFIX
  10483					; AND WRITE IT TO THE CONSOLE.
  10484					;
  10485					; "$TTDMS" WILL STRIP THE DIAGNOSTIC CARRIAGE CONTROL CHARACTERS FROM
  10486					; A TEXT STRING IN ORDER TO TRANSLATE THE MESSAGE.
  10487					;
  10488					;
  10489					; INPUTS:
  10490					;	R0	- ADDRESS OF ASCIZ MESSAGE.
  10491					;
  10492					; NO OUTPUTS
  10493					;-
  10494
  10495	026766				$TTDMS::
  10496	026766					CALL	R5,$RSAVE	; SAVE THE REGISTERS
	026766	004537 	023142'			 JSR	R5,$RSAVE
  10497	026772	012705 	000342'			MOV	#.TTOBF,R5	; OUTPUT BUFFER POINTER TO R5
  10498	026776	010504 				MOV	R5,R4		; COPY TO R4
  10499	027000				10$:
  10500	027000	112001 				MOVB	(R0)+,R1	; GET A BYTE FOM THE INPUT STRING
  10501	027002	001436 				BEQ	$TTDWR		; DONE IF <NULL>
  10502	027004	122701 	000137 			CMPB	#'_,R1		; IS IT AN <UNDERSCORE>??
  10503	027010	001773 				BEQ	10$		; YES -- THROW IT AWAY
  10504	027012	122701 	000134 			CMPB	#'\,R1		; NO -- IS IS A <BACKSLASH>??
  10505	027016	001004 				BNE	20$		; NO -- GO ON
  10506	027020	112725 	000015 			MOVB	#15,(R5)+	; YES -- SUBSTITUTE A <CR>
  10507	027024	012701 	000012 			MOV	#12,R1		; AND A <LF> FOR IT
  10508	027030				20$:
  10509	027030	110125 				MOVB	R1,(R5)+	; LOAD THIS CHARACTER
  10510	027032	000762 				BR	10$		; AND GET THE NEXT
  10511						;
  10512	027034				$TTMSG::
  10513	027034	004537 	023142'			JSR	R5,$RSAVE	;THIS ROUTINE IS SPECIAL
  10514	027040	005002 				CLR	R2		; MARK NORMAL CALL
  10515	027042	012705 	000342'			MOV	#.TTOBF,R5	;FOR THE MESSAGE MACROS.
  10516	027046	010504 				MOV	R5,R4
  10517	027050	010003 				MOV	R0,R3		;(SAVE MESSAGE ADDRESS)
  10518	027052	012700 	005202'			MOV	#TTTPRE,R0	;INSERT KLI IDENTIFIER
  10519	027056					CALL	$ASCIZ		; 'KLI -- '
	027056	004737 	023176'			 JSR	PC,$ASCIZ
  10520	027062	010300 				MOV	R3,R0		;AND THEN MESSAGE.
  10521	027064					CALL	$ASCIZ
	027064	004737 	023176'			 JSR	PC,$ASCIZ
  10522	027070	112725 	000015 			MOVB	#CR,(R5)+	;FOLLOW BY CRLF.
  10523	027074	112725 	000012 			MOVB	#LF,(R5)+
  10524	027100				$TTDWR::
  10525	027100	160405 				SUB	R4,R5		;COMPUTE LENGTH
  10526	027102	010437 	002220'			MOV	R4,DTTWLB+Q.IOPL+0 ;AND PRINT.
  10527	027106	010537 	002222'			MOV	R5,DTTWLB+Q.IOPL+2
  10528	027112	000404 				BR	LTTDIR		;DO THE WRITE.
  10529						;
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 223
$TTWR	-- WRITE A LINE TO THE CONSOLE TTY

  10531						.SBTTL	$TTWR	-- WRITE A LINE TO THE CONSOLE TTY
  10532					;+
  10533					; WRITE OUT AN ASCII STRING TO THE CONSOLE.
  10534					;
  10535					; INPUTS:
  10536					;	R1	- LENGTH OF STRING.
  10537					;	R0	- ADDRESS OF STRING.
  10538					;
  10539					; NO OUTPUTS
  10540					;-
  10541
  10542	027114	010037 	002220'		$TTWR::	MOV	R0,DTTWLB+Q.IOPL+0 ;INSERT MESSAGE ADDRESS,
  10543	027120	010137 	002222'			MOV	R1,DTTWLB+Q.IOPL+2 ;LENGTH,
  10544	027124				LTTDIR:	DIR$	#DTTWLB		;AND PRINT.
	027124	012746 	002204'			MOV	#DTTWLB,-(SP)
	027130	104375 				EMT	375
  10546	027132					CALL	$ECHO1		; [5.1005]ECHO CTY TO LP
	027132	004737 	027220'			 JSR	PC,$ECHO1
  10548	027136	005737 	000054'			TST	$LGOPN		; [4.1.1073]LOG TO ERROR FILE?
  10549	027142	001417 				BEQ	10$		; [4.1.1073]NO -- GO ON
  10550	027144					PUSH	<R1,R2>		; [4.1.1073]YES -- SAVE REGISTERS
	027144	010146 				 MOV	R1,-(SP)
	027146	010246 				 MOV	R2,-(SP)
  10551	027150	013702 	002220'			MOV	DTTWLB+Q.IOPL+0,R2	; [4.1.1073]ADDRESS TO R0
  10552	027154	013701 	002222'			MOV	DTTWLB+Q.IOPL+2,R1	; [4.1.1073]MESSAGE LENGTH TO R1
  10553	027160					CALL	.WRITR		; [4.1.1073]WRITE TO FILE
	027160	004737 	000000G			 JSR	PC,.WRITR
  10554	027164					POP	<R2,R1>		; [4.1.1073]RESTORE R2
	027164	012602 				 MOV	(SP)+,R2
	027166	012601 				 MOV	(SP)+,R1
  10555	027170	005737 	000052'			TST	$LGERR		; [4.1.1073]LOGGING ERROR?
  10556	027174	001402 				BEQ	10$		; [4.1.1073]NO -- GO ON
  10557	027176					CALL	$CLLOG		; [4.1.1073]YES -- CLOSE LOG FILE
	027176	004737 	000000G			 JSR	PC,$CLLOG
  10558	027202				10$:	RETURN
	027202	000207 				 RTS	PC
KLITT -- TTY I/O FUNCTIONS	MACRO M1113  11-NOV-81 11:25  PAGE 224
$ECHO	-- ECHO CTY OUTPUT TO LP

  10561						.SBTTL	$ECHO	-- ECHO CTY OUTPUT TO LP
  10562
  10563					;+
  10564					; WRITE CTY OUTPUT TO LP IF TRACKING ON CTY ENABLED
  10565					;	THIS ROUTINE ADDED FOR TCO 5.1005
  10566					;
  10567					; NO INPUTS
  10568					;
  10569					; NO OUTPUTS
  10570					;-
  10571
  10572	027204				$ECHO::					; ECHO CTY INPUT
  10573	027204	012737 	000302'	002220'		MOV	#.TTIBF,DTTWLB+Q.IOPL+0		; MESSAGE
  10574	027212	013737 	002260'	002222'		MOV	DTTSTA+2,DTTWLB+Q.IOPL+2	; LENGTH
  10575	027220				$ECHO1::				; ECHO CTY OUTPUT
  10576	027220	105737 	000036'			TSTB	.TRKLP			; TRACK ON LP ?
  10577	027224	001411 				BEQ	10$			; NO -- EXIT
  10578	027226	012737 	000003 	002210'		MOV	#LPOLUN,DTTWLB+Q.IOLU	; YES -- SET LP LUN
  10579	027234					DIR$	#DTTWLB			; OUTPUT IT
	027234	012746 	002204'			MOV	#DTTWLB,-(SP)
	027240	104375 				EMT	375
  10580	027242	012737 	000002 	002210'		MOV	#TTOLUN,DTTWLB+Q.IOLU	; RESET TT LUN
  10581	027250				10$:	RETURN				; DONE
	027250	000207 				 RTS	PC
  10583						.TITLE	KLIXB -- LOAD THE KL BOOT
  10584	027252					IDENT$	11,1								; ADP01
						.IDENT	/011010/
  10585					;
  10586					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
  10587					;
  10588					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
  10589					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
  10590					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
  10591					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
  10592					;
  10593					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
  10594					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
  10595					; EQUIPMENT CORPORATION.
  10596					;
  10597					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
  10598					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
  10599					;
  10600					; VERSION 11-01									; ADP01
  10601					;
  10602					; ALAN D. PECKHAM  8-APR-77
  10603					;
  10604					; MODIFIED BY:
  10605					;
  10606					; FUNCTION: THIS MODULE CONTAINS THE ROUTINES WHICH LOAD THE KL BOOT
  10607					;  FROM THE FILE 'BOOT.EXB' OR AN OPERATOR SPECIFIED FILE.
  10608					;
  10609					; EQUATED SYMBOLS
  10610					;
  10611		000000 			APR	=	0		; KL DEVICE.
  10612		000004 			CONO	=	4		; KL I/O SUBFUNCTION CODE.
  10613		001000 			PAGE	=	1000		; PAGE SIZE (POWER OF 2).
  10614		000777 			PGBTS	=	PAGE-1		; PAGE BITS USED IN MASK.
KLIXB -- LOAD THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 224-1
$ECHO	-- ECHO CTY OUTPUT TO LP

  10615					;
  10616					; LOCAL DATA
  10617					;
  10618	002274					.PSECT	DATA,D
  10619	002274				DXBFNM:
  10620	002274	007347 	076400 	000000 		.RAD50	/BOOT     EXB/	; BOOT DEFAULT FILE NAME.
	002302	021402
  10621	002304	000000 				.WORD	0		; GET LATEST VERSION.
  10622	002306	   005 	   005 			.BYTE	5,5
  10623	002310	054523 	000000 			.WORD	"SY,0
  10624	002314				DXBADR:
  10625	002314	000000 	000000 			.WORD	0,0		; CURRENT DEPOSIT ADDRESS.
  10626	002320				DXBDAT:
  10627	002320	000000 	000000 	000000 		.WORD	0,0,0		; DATA WORD TO DEPOSIT.
  10628	002326				DXBCNM:
  10629	002326					IO10$	CONO APR,,22000	; TO CLEAR THE NXM BIT.
	002326	   000 	   044 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002331	   002 	   016 			 .BYTE	BY$$3,BY$$4
  10630						.EVEN
  10631	005212					.PSECT	TEXT,D
  10632	005212				TXBIMM:
  10633	005212					ERROR	<INSUFFICIENT MEMORY FOR BOOTSTRAP>
	005212	   077 	   040 	   111 		 .ASCIZ	\? INSUFFICIENT MEMORY FOR BOOTSTRAP\
	005215	   116 	   123 	   125
	005220	   106 	   106 	   111
	005223	   103 	   111 	   105
	005226	   116 	   124 	   040
	005231	   115 	   105 	   115
	005234	   117 	   122 	   131
	005237	   040 	   106 	   117
	005242	   122 	   040 	   102
	005245	   117 	   117 	   124
	005250	   123 	   124 	   122
	005253	   101 	   120 	   000
  10634	027252					.PSECT
KLIXB -- LOAD THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 225
$EXBLD	-- LOAD THE BOOT

  10636						.SBTTL	$EXBLD	-- LOAD THE BOOT
  10637					;+
  10638					; PROCESS THE KL BOOTSTRAP FILE (.EXB)
  10639					; THIS ROUTINE READS IN A FILE OF BINARY RECORDS.
  10640					; *DATA RECORDS:
  10641					; 	.WORD	4+<5*N>		; BYTE COUNT.
  10642					; 	.BLKW	2		; KL ADDRESS.
  10643					; 	.BLKB	5*N		; KL WORDS.
  10644					; THE KL WORDS WHICH ARE PLACED IN THE FIRST 36 BITS OF 5 -11 BYTES
  10645					; ARE STORED SEQUENTIALLY STARTING AT THE GIVEN ADDRESS.
  10646					; *END OF FILE:
  10647					; 	.WORD	4		; BYTE COUNT.
  10648					; 	.BLKW	2		; KL ADDRESS.
  10649					; THE ADDRESS IS THE START ADDRESS OF THE BOOTSTRAP PROGRAM.
  10650					; THE DATA RECORDS ARE ASSUMED TO BE SORTED BY ADDRESS,
  10651					; SO THAT PAGE CLEARING IS DONE PROPERLY.
  10652					;
  10653					; THE PAGE CLEARING FEATURE REQUIRES THAT ANY PAGES WHICH RECIEVE
  10654					; DATA SHOULD BE CLEARED BEFORE ANY DATA IS STORED. THE PRESENT
  10655					; ALGORITHM AVOIDS WRITING TWICE TO ANY LOCATION (CLEAR & DEPOSIT).
  10656					; A POINTER IS KEPT OF WHERE THE NEXT KL WORD WOULD BE DEPOSITED,
  10657					; AND IS USED TO DETECT GAPS IN DATA/INSTRUCTION STORAGE SO THAT
  10658					; INTERVENING WORDS MAY BE CLEARED.
  10659					;
  10660					; A CHECK IS ALSO MADE TO SEE IF ANY OF THE BOOT IS LOADED INTO
  10661					; NON-EXISTANT MEMORY BY TURNING OFF THE NXM INDICTOR BEFORE THE
  10662					; LOAD AND TESTING IT AFTER THE LOAD TO SEE IF A NXM OCCURRED.
  10663					;
  10664					; INPUTS:
  10665					;	.DBSW	- IF <>0 THEN USE USER FILE NAME.
  10666					;	.DBFNM	- POINTER TO 5 WORD USER FILE NAME.
  10667					;
  10668					; OUTPUTS:
  10669					;	CARRY IS SET IF ERROR OCCURS, OTHERWISE BOOT IS STARTED AND
  10670					;	RETURN IS TO "$EXIT".
  10671					;-
  10672
  10673	027252				$EXBLD::
  10674	027252	105737 	000024'			TSTB	.DLGSW		; ARE WE IN DIALOG MODE??
  10675	027256	100004 				BPL	10$		; YES -- GO ON
  10676	027260	032737 	000000G	000056'		BIT	#KL.LVB,.KLISV	; NO -- MUST BOOT BE LOADED??
  10677	027266	001430 				BEQ	30$		; NO -- JUST EXIT
  10678	027270				10$:
  10680	027270					CALL	$SWEEP		; CLEAR CACHE.
	027270	004737 	006262'			 JSR	PC,$SWEEP
  10681	027274	103425 				BCS	30$
  10682	027276	012700 	002274'			MOV	#DXBFNM,R0	; FILE NAME: BOOT.EXB
  10686	027302	105737 	000026'			TSTB	.UFNSW		; OR
  10687	027306	003402 				BLE	20$
  10688	027310	012700 	000474'			MOV	#.USRFN,R0	; USER FILE NAME.				; ADP01
  10689	027314				20$:
  10690	027314					CALL	$LOOKUP		; FIND THE FILE.
	027314	004737 	007342'			 JSR	PC,$LOOKUP
  10691	027320	103414 				BCS	40$
  10692	027322	012703 	002320'			MOV	#DXBDAT,R3	; INITIALIZE DATA WORD POINTER
  10693	027326	012702 	002316'			MOV	#DXBADR+2,R2	; AND NEXT WORD POINTER.
  10694	027332	005012 				CLR	(R2)		; SET TO ZERO.
KLIXB -- LOAD THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 225-1
$EXBLD	-- LOAD THE BOOT

  10695	027334	005042 				CLR	-(R2)
  10696	027336	012700 	002326'			MOV	#DXBCNM,R0	; NOW TURN OFF THE NXM BIT BY
  10697	027342					CALL	$EXCT		; DOING A CONO APR,,22000.
	027342	004737 	027712'			 JSR	PC,$EXCT
  10698	027346	103023 				BCC	LXBRC
  10699	027350				30$:
  10700	027350					RETURN
	027350	000207 				 RTS	PC
  10701	027352				40$:
  10702	027352	112737 	177777 	000062'		MOVB	#-1,.NCACH	; SET UP TO CONFIGURE CACHE IF "BOOT"
  10703	027360	122737 	000000G	000522'		CMPB	#IE.NSF,.SYSTA	; IF FILE NOT FOUND
  10704	027366	001370 				BNE	30$
  10705	027370					CALLR	$IOERR		; DECLARE THE ERROR.
	027370	000137 	007126'			 JMP	$IOERR
  10706
  10707					;+
  10708					; READ 5 BYTES INTO THE AREA POINTED TO BY R3.
  10709					; R5, R4 AND R0 GET DESTROYED.
  10710					;-
  10711
  10712	027374				LXB5B:
  10713	027374	012705 	000005 			MOV	#5,R5
  10714	027400	010304 				MOV	R3,R4
  10715	027402				10$:
  10716	027402					CALL	$READB		; READ A BYTE AND
	027402	004737 	010200'			 JSR	PC,$READB
  10717	027406	103402 				BCS	20$
  10718	027410	110024 				MOVB	R0,(R4)+	; STICK IN ASSEMBLED WORD.
  10719	027412	077505 				SOB	R5,10$
  10720	027414				20$:
  10721	027414					RETURN
	027414	000207 				 RTS	PC
KLIXB -- LOAD THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 226
$EXBLD	-- LOAD THE BOOT

  10723					;+
  10724					; READ RECORD FROM FILE.
  10725					;-
  10726
  10727	027416				LXBRC:	CALL	$READC		; GET ADDRESS.
	027416	004737 	007776'			 JSR	PC,$READC
  10728	027422	103532 				BCS	90$
  10729	027424	010037 	000514'			MOV	R0,.BTADR
  10730	027430					CALL	$READW
	027430	004737 	010104'			 JSR	PC,$READW
  10731	027434	103525 				BCS	90$
  10732	027436	010037 	000516'			MOV	R0,.BTADR+2
  10733	027442	005737 	000530'			TST	.SYIRC		; IF MORE BYTES IN RECORD
  10734	027446	003070 				BGT	60$		; GO TO LOAD DATA INTO KL.
  10735
  10736					;+
  10737					; END OF FILE REACHED. CLEAR THE REST OF THE PAGE,
  10738					; DE-ACCESS THE FILE, AND START THE BOOT.
  10739					;-
  10740
  10741	027450	032712 	000777 		10$:	BIT	#PGBTS,(R2)	; MUST CLEAR REST OF PAGE.
  10742	027454	001413 				BEQ	20$
  10743	027456	012701 	000000'			MOV	#.ZERO,R1	; IF NOT AT BOUNDRY
  10744	027462	010200 				MOV	R2,R0
  10745	027464					CALL	$DPOS		; CLEAR WORD,
	027464	004737 	012654'			 JSR	PC,$DPOS
  10746	027470	103507 				BCS	90$
  10747	027472	062712 	000001 			ADD	#1,(R2)		; BUMP POINTER,
  10748	027476	005562 	000002 			ADC	2(R2)
  10749	027502	000762 				BR	10$		; AND GO FOR MORE.
  10750	027504	010301 			20$:	MOV	R3,R1
  10751	027506	012700 	110000 			MOV	#<110*1000>,R0	; GET 'APR NXM ER IN'
  10752	027512					CALL	$DFRD
	027512	004737 	013224'			 JSR	PC,$DFRD
  10753	027516	103474 				BCS	90$
  10754	027520	132761 	000020 	000003 		BITB	#20,3(R1)	; TO TEST FOR NXM.
  10755	027526	001004 				BNE	30$
  10756	027530					CALL	$CLOSE		; CLOSE BOOT FILE.
	027530	004737 	006636'			 JSR	PC,$CLOSE
  10757	027534	000137 	023462'			JMP	$TENST		; GO TO START THE BOOT.
  10758	027540				30$:	PRINT	#TXBIMM		; BOOT LOADED IN NONEXISTANT MEMORY !
	027540	012700 	005212'			 MOV	#TXBIMM,R0
	027544	004737 	027034'			 JSR	PC,$TTMSG
  10759	027550	000261 				SEC
  10760	027552					RETURN
	027552	000207 				 RTS	PC
KLIXB -- LOAD THE KL BOOT	MACRO M1113  11-NOV-81 11:25  PAGE 227
$EXBLD	-- LOAD THE BOOT

  10762					;+
  10763					; PROCESS DATA RECORD.
  10764					;-
  10765
  10766	027554	032712 	000777 		40$:	BIT	#PGBTS,(R2)	; IF ON A NEW PAGE
  10767	027560	001011 				BNE	50$
  10768	027562	013722 	000514'			MOV	.BTADR,(R2)+	; PUT US ON THE PAGE
  10769	027566	013712 	000516'			MOV	.BTADR+2,(R2)	; OF THE TARGET ADDRESS
  10770	027572	042742 	000777 			BIC	#PGBTS,-(R2)	; AT THE TOP.
  10771	027576	023712 	000514'			CMP	.BTADR,(R2)
  10772	027602	001421 				BEQ	70$
  10773	027604	012701 	000000'		50$:	MOV	#.ZERO,R1	; STORE A ZERO
  10774	027610	010200 				MOV	R2,R0
  10775	027612					CALL	$DPOS
	027612	004737 	012654'			 JSR	PC,$DPOS
  10776	027616	103434 				BCS	90$
  10777	027620	062712 	000001 			ADD	#1,(R2)		; AND BUMP ADDRESS.
  10778	027624	005562 	000002 			ADC	2(R2)
  10779	027630	023712 	000514'		60$:	CMP	.BTADR,(R2)	; WE MUST CLEAR
  10780	027634	001347 				BNE	40$		; UP TO THE
  10781	027636	023762 	000516'	000002 		CMP	.BTADR+2,2(R2)	; RECORD ADDRESS.
  10782	027644	001343 				BNE	40$
  10783	027646				70$:	CALL	LXB5B
	027646	004737 	027374'			 JSR	PC,LXB5B
  10784	027652	103416 				BCS	90$
  10785	027654	010301 				MOV	R3,R1
  10786	027656	010200 				MOV	R2,R0
  10787	027660					CALL	$DPOS		; STICK IT IN
	027660	004737 	012654'			 JSR	PC,$DPOS
  10788	027664	103411 				BCS	90$
  10789	027666	062712 	000001 			ADD	#1,(R2)		; BUMP ADDRESS AND
  10790	027672	005562 	000002 			ADC	2(R2)
  10791	027676	005737 	000530'			TST	.SYIRC
  10792	027702	001361 				BNE	70$
  10793	027704	000137 	027416'			JMP	LXBRC		; GO TO PICK UP NEW RECORD.
  10794	027710				90$:	RETURN
	027710	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 228
$EXBLD	-- LOAD THE BOOT

  10796						.TITLE	KLIXC -- KL INSTRUCTION EXECUTION
  10797	027712					IDENT$	5,0
						.IDENT	/005000/
  10798					;
  10799					; COPYRIGHT (C)  1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
  10800					;
  10801					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
  10802					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
  10803					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
  10804					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
  10805					;
  10806					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
  10807					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
  10808					; EQUIPMENT CORPORATION.
  10809					;
  10810					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
  10811					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
  10812					;
  10813					; VERSION 05-00
  10814					;
  10815					; ALAN D. PECKHAM  30-MAR-77
  10816					;
  10817					; MODIFIED BY:
  10818					;
  10819					; R. BELANGER	06-DEC-78	NEW KEEP-ALIVE ERROR PROCESSING
  10820					;					TCO 4.2107
  10821					;
  10822					; FUNCTION: THIS MODULE CONTAINS ROUTINES TO ALLOW EXECUTION OF
  10823					;  SINGLE KL INSTRUCTIONS OR THE STARTING OF KL PROGRAMS.
  10824					;
  10825					; LOCAL DATA
  10826					;
  10827	002334					.PSECT	DATA,D
  10828	002334				DXCAD:
  10829	002334					WD36$	0 0		; START ADDRESS BUFFER.
	002334	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002337	   000 	   000 			 .BYTE	BY$$3,BY$$4
  10830	002341				DXCBF:
  10831	002341					WD36$	0 0		; GENERAL BIT BUCKET.
	002341	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002344	   000 	   000 			 .BYTE	BY$$3,BY$$4
  10832	002346				DXCBRC:
  10833	002346					WD36$	0 0		; BURST COUNT BUFFER.
	002346	   000 	   000 	   000 		 .BYTE	BY$$0,BY$$1,BY$$2
	002351	   000 	   000 			 .BYTE	BY$$3,BY$$4
  10834						.EVEN
  10835	005256					.PSECT	TEXT,D
  10836	005256				TXCHLE:
  10837	005256					ERROR	<CANNOT FIND HALT LOOP>
	005256	   077 	   040 	   103 		 .ASCIZ	\? CANNOT FIND HALT LOOP\
	005261	   101 	   116 	   116
	005264	   117 	   124 	   040
	005267	   106 	   111 	   116
	005272	   104 	   040 	   110
	005275	   101 	   114 	   124
	005300	   040 	   114 	   117
	005303	   117 	   120 	   000
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 228-1
$EXBLD	-- LOAD THE BOOT

  10838	005306				TXCSFL:
  10839	005306					ERROR	<CANNOT START KL>
	005306	   077 	   040 	   103 		 .ASCIZ	\? CANNOT START KL\
	005311	   101 	   116 	   116
	005314	   117 	   124 	   040
	005317	   123 	   124 	   101
	005322	   122 	   124 	   040
	005325	   113 	   114 	   000
  10840	027712					.PSECT
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 229
$EXCT	-- EXECUTE KL INSTRUCTION

  10842						.SBTTL	$EXCT	-- EXECUTE KL INSTRUCTION
  10843					;+
  10844					; EXECUTE A SINGLE KL INSTRUCTION BY GETTING THE KL INTO THE
  10845					; HALT LOOP, LOADING THE AR WITH THE INSTRUCTION, PUSHING THE
  10846					; CONTINUE BUTTON, AND STARTING UP THE CLOCK. THE ROUTINE
  10847					; COMPLETES WHEN THE MICROCODE REACHES THE HALT LOOP AGAIN.
  10848					;
  10849					; INPUTS:
  10850					;	R0	- POINTER TO INSTRUCTION TO EXECUTE.
  10851					;
  10852					; OUTPUTS:
  10853					;	CARRY IS SET IF ERROR OCCURS AND MESSAGE IS DISPLAYED.
  10854					;-
  10855
  10856	027712				$EXCT::
  10857	027712	004537 	023142'			JSR	R5,$RSAVE
  10858	027716					TRACK	XC
	027716	004037 	027730'			 JSR	R0,64$
	027722	041530 				 .WORD	"XC
	027724	000000 				 .WORD
	027726	000000 				 .WORD
	027730	004737 	023210'		64$:	 JSR	PC,$TRACK
	027734	012600 				 MOV	(SP)+,R0
  10859	027736					CALL	$LDAR		; LOAD THE AR WITH THE INSTRUCTION.
	027736	004737 	030252'			 JSR	PC,$LDAR
  10860	027742	103416 				BCS	90$
  10861	027744	012700 	012000 			MOV	#.CONBT,R0	; PUSH THE CONTINUE BUTTON
  10862	027750					CALL	$DFXC
	027750	004737 	013540'			 JSR	PC,$DFXC
  10863	027754	103411 				BCS	90$
  10864	027756	012700 	001000 			MOV	#.STRCL,R0	; AND START THE CLOCK
  10865	027762					CALL	$DFXC
	027762	004737 	013540'			 JSR	PC,$DFXC
  10866	027766	103404 				BCS	90$
  10867	027770	012703 	001750 			MOV	#1000.,R3
  10868	027774					CALLR	$WTKL		; WAIT FOR THE HALT LOOP.
	027774	000137 	030172'			 JMP	$WTKL
  10869						;
  10870	030000				90$:
  10871	030000					RETURN
	030000	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 230
$STRKL	-- START THE KL PROCESSOR

  10873						.SBTTL	$STRKL	-- START THE KL PROCESSOR
  10874					;+
  10875					; START THE KL AT THE 22 BIT ADDRESS POINTED TO BY R0.
  10876					; THIS IS DONE BY LOADING THE AR WITH THE ADDRESS, PUSHING
  10877					; THE RUN AND CONTINUE BUTTONS, AND STARTING THE CLOCK.
  10878					; WE STEP THE MICROCODE OUT OF THE HALT LOOP TO MAKE SURE IT
  10879					; IS RUNNING BEFORE WE LEAVE.
  10880					;
  10881					; INPUTS:
  10882					;	R0	- POINTER TO 22 BIT KL ADDRESS.
  10883					;
  10884					; OUTPUTS:
  10885					;	CARRY IS SET ON ERROR AND A MESSAGE IS DISPLAYED.
  10886					;-
  10887
  10888	030002				$STRKL::
  10889	030002	004537 	023142'			JSR	R5,$RSAVE
  10890	030006					TRACK	ST
	030006	004037 	030020'			 JSR	R0,64$
	030012	052123 				 .WORD	"ST
	030014	000000 				 .WORD
	030016	000000 				 .WORD
	030020	004737 	023210'		64$:	 JSR	PC,$TRACK
	030024	012600 				 MOV	(SP)+,R0
  10891	030026	012701 	002334'			MOV	#DXCAD,R1	; POINT TO A SCRATCH AREA
  10892	030032	112021 				MOVB	(R0)+,(R1)+	; LOAD THE ADDRESS
  10893	030034	112021 				MOVB	(R0)+,(R1)+
  10894	030036	111011 				MOVB	(R0),(R1)	; AS A PC WORD
  10895	030040	142711 	177700 			BICB	#^C77,(R1)	; ONLY 22 BITS PLEASE
  10896	030044	012700 	002334'			MOV	#DXCAD,R0	; GET OUR ADDRESS
  10897	030050					CALL	$LDAR		; AND LOAD IT INTO THE AR.
	030050	004737 	030252'			 JSR	PC,$LDAR
  10898	030054	103440 				BCS	80$
  10899	030056	012700 	011000 			MOV	#.SETRN,R0	; SET THE RUN FLOP
  10900	030062					CALL	$DFXC
	030062	004737 	013540'			 JSR	PC,$DFXC
  10901	030066	103433 				BCS	80$
  10902	030070	012700 	012000 			MOV	#.CONBT,R0	; SET THE CONTINUE BUTTON
  10903	030074					CALL	$DFXC
	030074	004737 	013540'			 JSR	PC,$DFXC
  10904	030100	103426 				BCS	80$
  10905	030102	012701 	001750 			MOV	#1000.,R1	; LOOP COUNT TO R1
  10906	030106				10$:
  10907	030106	012700 	002000 			MOV	#.SSCLK,R0	; SINGLE STEP THE M-BOX CLOCK
  10908	030112					CALL	$DFXC
	030112	004737 	013540'			 JSR	PC,$DFXC
  10909	030116	103417 				BCS	80$
  10910	030120					CALL	$DTRW1		; READ DIAG WORD 1
	030120	004737 	023052'			 JSR	PC,$DTRW1
  10911	030124	103414 				BCS	80$
  10912	030126	032700 	001000 			BIT	#DS06,R0	; STILL IN THE HALT LOOP?
  10913	030132	001402 				BEQ	20$		; NO -- GO ON
  10914	030134	077114 				SOB	R1,10$		; YES -- TRY AGAIN
  10915	030136	000407 				BR	80$		; TIMED OUT -- COMPLAIN
  10916						;
  10917	030140				20$:
  10918	030140	032700 	002000 			BIT	#DS05,R0	; OUT OF HALT LOOP -- IS RUN ON?
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 230-1
$STRKL	-- START THE KL PROCESSOR

  10919	030144	001404 				BEQ	80$		; NO -- COMPLAIN
  10920	030146	012700 	001000 			MOV	#.STRCL,R0	; YES -- START THE CLOCK
  10921	030152					CALLR	$DFXC		; AND EXIT.
	030152	000137 	013540'			 JMP	$DFXC
  10922						;
  10923	030156				80$:
  10924	030156					PRINT	#TXCSFL		; NO -- PRINT ERROR MESSAGE
	030156	012700 	005306'			 MOV	#TXCSFL,R0
	030162	004737 	027034'			 JSR	PC,$TTMSG
  10925	030166	000261 				SEC
  10926	030170				90$:
  10927	030170					RETURN			; AND EXIT
	030170	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 231
$WTKL	-- WAIT FOR KL PROGRAM TO HALT

  10929						.SBTTL	$WTKL	-- WAIT FOR KL PROGRAM TO HALT
  10930					;+
  10931					; WAIT FOR THE KL TO REENTER THE HALT LOOP.
  10932					;
  10933					; INPUTS:
  10934					;	R0	- A TIMEOUT VALUE.
  10935					;
  10936					; OUTPUTS:
  10937					;	CARRY IS SET IF THE KL DOES NOT ENTER THE HALT LOOP
  10938					;	BEFORE THE -11 HAS CHECKED THE DTE20 THE NUMBER OF TIMES
  10939					;	SPECIFIED IN R0.
  10940					;-
  10941
  10942	030172				$WTKL::
  10943	030172					TRACK	WT
	030172	004037 	030204'			 JSR	R0,64$
	030176	052127 				 .WORD	"WT
	030200	000000 				 .WORD
	030202	000000 				 .WORD
	030204	004737 	023210'		64$:	 JSR	PC,$TRACK
	030210	012600 				 MOV	(SP)+,R0
  10944	030212					PUSH	<R2,R1,R0>
	030212	010246 				 MOV	R2,-(SP)
	030214	010146 				 MOV	R1,-(SP)
	030216	010046 				 MOV	R0,-(SP)
  10945	030220	010002 				MOV	R0,R2
  10946	030222				10$:
  10947	030222					CALL	$DTRW1		; READ DTE DIAG 1
	030222	004737 	023052'			 JSR	PC,$DTRW1
  10948	030226	103404 				BCS	80$
  10949	030230	032700 	001000 			BIT	#DS06,R0	; ARE WE AT THE HALT LOOP ?
  10950	030234	001002 				BNE	90$		; YES, RETURN.
  10951	030236	077207 				SOB	R2,10$		; NO, TRY AGAIN
  10952	030240				80$:
  10953	030240	000261 				SEC			; OR GIVE UP.
  10954	030242				90$:
  10955	030242					POP	<R0,R1,R2>
	030242	012600 				 MOV	(SP)+,R0
	030244	012601 				 MOV	(SP)+,R1
	030246	012602 				 MOV	(SP)+,R2
  10956	030250					RETURN
	030250	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 232
$LDAR	-- LOAD THE AR REGISTER

  10958						.SBTTL	$LDAR	-- LOAD THE AR REGISTER
  10959					;+
  10960					; PUT THE MICROCODE INTO THE HALT LOOP, STOP IT, PHASE THE CLOCKS,
  10961					; AND LOAD THE AR REGISTER WITH AN INSTRUCTION OR STARTING ADDRESS.
  10962					;
  10963					; INPUTS:
  10964					;	R0	- ADDRESS OF 36 BIT WORD TO LOAD INTO THE AR.
  10965					;
  10966					; OUTPUTS:
  10967					;	CARRY IS SET IF ERROR OCCURS.
  10968					;-
  10969
  10970	030252				$LDAR::
  10971	030252	004537 	023142'			JSR	R5,$RSAVE	; SAVE THE REGISTERS.
  10972	030256					CALL	STPKL		; STOP THE MICROCODE.
	030256	004737 	030306'			 JSR	PC,STPKL
  10973	030262	103410 				BCS	90$
  10974	030264					CALL	$MBPHS		; PHASE THE CLOCKS FOR THE LOAD.
	030264	004737 	030520'			 JSR	PC,$MBPHS
  10975	030270	103405 				BCS	90$
  10976	030272	010001 				MOV	R0,R1		; GET DATA
  10977	030274	012700 	077000 			MOV	#.LDAR,R0	; AND
  10978	030300					CALLR	$DFWR		; STORE IN THE AR.
	030300	000137 	013336'			 JMP	$DFWR
  10979						;
  10980	030304				90$:
  10981	030304					RETURN
	030304	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 233
STPKL	-- HALT THE KL CPU

  10983						.SBTTL	 STPKL	-- HALT THE KL CPU
  10984					;+
  10985					; GET THE KL INTO THE HALT LOOP. THIS IS DONE MERCIFULLY IN CASE
  10986					; IT IS RUNNING.
  10987					;
  10988					; NO INPUTS.
  10989					;
  10990					; OUTPUTS:
  10991					;	CARRY IS SET IF UNABLE TO COMPLY, AND ERROR MESSAGE
  10992					;	IS DISPLAYED.
  10993					;-
  10994
  10995	030306				STPKL:
  10996	030306					TRACK	HA
	030306	004037 	030320'			 JSR	R0,64$
	030312	040510 				 .WORD	"HA
	030314	000000 				 .WORD
	030316	000000 				 .WORD
	030320	004737 	023210'		64$:	 JSR	PC,$TRACK
	030324	012600 				 MOV	(SP)+,R0
  10997	030326					PUSH	<R0,R1>		; SAVE R0 AND R1
	030326	010046 				 MOV	R0,-(SP)
	030330	010146 				 MOV	R1,-(SP)
  10998	030332	012700 	010000 			MOV	#.CLRUN,R0	; CLEAR RUN
  10999	030336					CALL	$DFXC		; CLEAR RUN
	030336	004737 	013540'			 JSR	PC,$DFXC
  11000	030342	103455 				BCS	90$
  11001	030344	012700 	000024 			MOV	#20.,R0		; SET A WAIT VALUE
  11002	030350					CALL	$WTKL		; AND SEE IF WE FALL
	030350	004737 	030172'			 JSR	PC,$WTKL
  11003	030354	103037 				BCC	20$		; INTO THE HALT LOOP.
  11004	030356	012701 	000024 			MOV	#^D20,R1	; LOOP COUNT TO R4
  11005	030362				10$:
  11006	030362	012700 	000310 			MOV	#^D200,R0	; BURST COUNT TO R0
  11007	030366					CALL	$BURST		; BURST THE CLOCK
	030366	004737 	030666'			 JSR	PC,$BURST
  11008	030372	103441 				BCS	90$
  11009	030374					CALL	$DTRW1		; READ DTE-20 DIAG 1
	030374	004737 	023052'			 JSR	PC,$DTRW1
  11010	030400	103436 				BCS	90$
  11011	030402	032700 	001000 			BIT	#DS06,R0	; ARE WE IN THE HALT LOOP NOW?
  11012	030406	001022 				BNE	20$		; YES -- GO ON
  11013	030410	077114 				SOB	R1,10$		; NO -- TRY AGAIN
  11014	030412	032737 	000000G	000056'		BIT	#KL.KAC,.KLISV	; [4.2107] KEEP-ALIVE RETRY??
  11015	030420	001031 				BNE	80$		; [4.2107] YES -- COMPLANI AND EXIT
  11016	030422					CALL	$KLMR		; NO -- KL IS IN TROUBLE - RESET
	030422	004737 	014666'			 JSR	PC,$KLMR
  11017	030426	103423 				BCS	90$
  11018	030430	012700 	001000 			MOV	#.STRCL,R0	; BY RESTARTING MICROCODE.
  11019	030434					CALL	$DFXC
	030434	004737 	013540'			 JSR	PC,$DFXC
  11020	030440	103416 				BCS	90$
  11021	030442	012700 	001750 			MOV	#1000.,R0	; WAIT FOR IT TO ENTER HALT LOOP
  11022	030446					CALL	$WTKL		; AND IF THIS FAILS,
	030446	004737 	030172'			 JSR	PC,$WTKL
  11023	030452	103414 				BCS	80$		; THEN DIE A MISERABLE DEATH.
  11024	030454				20$:
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 233-1
STPKL	-- HALT THE KL CPU

  11025	030454	012700 	000000 			MOV	#.STPCL,R0	; STOP THE CLOCK
  11026	030460					CALL	$DFXC
	030460	004737 	013540'			 JSR	PC,$DFXC
  11027	030464	103404 				BCS	90$
  11028	030466	012700 	004000 			MOV	#.CECLK,R0	; MAKES EBOX CLOCK FALSE
  11029	030472					CALL	$DFXC
	030472	004737 	013540'			 JSR	PC,$DFXC
  11030	030476				90$:
  11031	030476					POP	<R1,R0>		; RESTORE REGISTERS
	030476	012601 				 MOV	(SP)+,R1
	030500	012600 				 MOV	(SP)+,R0
  11032	030502					RETURN			; TO CALLER
	030502	000207 				 RTS	PC
  11033
  11034	030504				80$:
  11035	030504					PRINT	#TXCHLE		; CANNOT FIND HALT LOOP !
	030504	012700 	005256'			 MOV	#TXCHLE,R0
	030510	004737 	027034'			 JSR	PC,$TTMSG
  11036	030514	000261 				SEC
  11037	030516	000767 				BR	90$
  11038						;
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 234
$MBPHS	-- PHASE THE KL CLOCKS

  11040						.SBTTL	$MBPHS	-- PHASE THE KL CLOCKS
  11041					;+
  11042					; PHASE THE CLOCKS TO LOAD THE AR
  11043					; $MBPHS WAITS FOR THREE TEST POINTS TO MATCH UP AND
  11044					; THEN SETS UP FOR A CHANGE COMING A L. THIS MAKES
  11045					; THE AR LOA FUNCTION STRICTLY REPEATABLE.
  11046					;
  11047					; NO INPUTS
  11048					;
  11049					; OUTPUTS:
  11050					;	CARRY IS SET IF ERROR OCCURS.
  11051					;-
  11052
  11053	030520				$MBPHS::
  11054	030520	004537 	023142'			JSR	R5,$RSAVE	; SAVE THE REGISTERS.
  11055	030524	012702 	000030 			MOV	#24.,R2		; DO THIS A MAXIMUM OF 24 TIMES.
  11056	030530	012701 	002341'			MOV	#DXCBF,R1	; SET UP A READ BUFFER.
  11057	030534				10$:
  11058	030534	012700 	102000 			MOV	#<102*1000>,R0	; READ 102
  11059	030540					CALL	$DFRD
	030540	004737 	013224'			 JSR	PC,$DFRD
  11060	030544	103432 				BCS	80$
  11061	030546	132711 	000004 			BITB	#4,(R1)		; CHECK "CLK SYNCH H"
  11062	030552	001421 				BEQ	20$		; MUST BE HIGH
  11063	030554	012700 	144000 			MOV	#<144*1000>,R0	; READ 144
  11064	030560					CALL	$DFRD
	030560	004737 	013224'			 JSR	PC,$DFRD
  11065	030564	103422 				BCS	80$
  11066	030566	132761 	000100 	000003 		BITB	#100,3(R1)	; CHECK "CR ADR 10"
  11067	030574	001010 				BNE	20$		; MUST BE EVEN
  11068	030576	012700 	164000 			MOV	#<164*1000>,R0	; READ 164
  11069	030602					CALL	$DFRD
	030602	004737 	013224'			 JSR	PC,$DFRD
  11070	030606	103411 				BCS	80$
  11071	030610	132711 	000040 			BITB	#40,(R1)	; CHECK "PHASE CHANGE COMING L"
  11072	030614	001410 				BEQ	30$		; MUST BE LOW
  11073	030616				20$:
  11074	030616	012700 	002000 			MOV	#.SSCLK,R0	; STEP THE MBOX CLOCK.
  11075	030622					CALL	$DFXC
	030622	004737 	013540'			 JSR	PC,$DFXC
  11076	030626	103401 				BCS	80$
  11077	030630	077237 				SOB	R2,10$		; AVOID TRYING AD INFINITUM.
  11078	030632				80$:
  11079	030632	000261 				SEC			; ERROR....
  11080	030634				90$:
  11081	030634					RETURN
	030634	000207 				 RTS	PC
  11082	030636				30$:
  11083	030636	012700 	162000 			MOV	#<162*1000>,R0	; READ 162
  11084	030642					CALL	$DFRD
	030642	004737 	013224'			 JSR	PC,$DFRD
  11085	030646	103771 				BCS	80$
  11086	030650	132711 	000010 			BITB	#10,(R1)	; CHECK "A CHANGE COMING A L"
  11087	030654	001767 				BEQ	90$		; IF HIGH, THEN
  11088	030656	012700 	000012 			MOV	#10.,R0		; WE MUST CLOCK THE MBOX
  11089	030662					CALLR	$BURST		; 10. TIMES.
	030662	000137 	030666'			 JMP	$BURST
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 234-1
$MBPHS	-- PHASE THE KL CLOCKS

  11090						;
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 235
$BURST	-- BURST THE M-BOX CLOCK

  11092						.SBTTL	$BURST	-- BURST THE M-BOX CLOCK
  11093					;+
  11094					; STEP THE M-BOX A GIVEN NUMBER OF TICKS USING THE BURST
  11095					; DIAGNOSTIC INSTRUCTION.
  11096					;
  11097					; INPUTS:
  11098					;	R0	- NUMBER OF STEPS TO BURST.
  11099					;
  11100					; OUTPUTS:
  11101					;	CARRY IS SET IF OPERATION WAS UNSUCCESSFUL.
  11102					;-
  11103
  11104	030666	004537 	023142'		$BURST::	JSR	R5,$RSAVE
  11105	030672	010002 				MOV	R0,R2		; SAVE BURST COUNT.
  11106	030674	012700 	000000 			MOV	#.STPCL,R0	; STOP CLOCK FOR SAFETY.
  11107	030700					CALL	$DFXC
	030700	004737 	013540'			 JSR	PC,$DFXC
  11108	030704	103464 				BCS	90$
  11109	030706	012701 	002346'			MOV	#DXCBRC,R1
  11110	030712	012711 	000017 			MOV	#17,(R1)
  11111	030716	162702 	000377 			SUB	#255.,R2	; MORE THAN 255 BURSTS ?
  11112	030722	002422 				BLT	20$
  11113	030724				10$:
  11114	030724	012700 	042000 			MOV	#.LDBRR,R0	; YES, DO A BURST
  11115	030730					CALL	$DFWR
	030730	004737 	013336'			 JSR	PC,$DFWR
  11116	030734	103450 				BCS	90$
  11117	030736	012700 	043000 			MOV	#.LDBRL,R0	; WITH 255, AND
  11118	030742					CALL	$DFWR
	030742	004737 	013336'			 JSR	PC,$DFWR
  11119	030746	103443 				BCS	90$
  11120	030750	012700 	005000 			MOV	#.BRCLK,R0
  11121	030754					CALL	$DFXC
	030754	004737 	013540'			 JSR	PC,$DFXC
  11122	030760	103436 				BCS	90$
  11123	030762	162702 	000377 			SUB	#255.,R2	; COUNT DOWN UNTIL
  11124	030766	002356 				BGE	10$		; LESS THAN 255.
  11125	030770				20$:
  11126	030770	062702 	000377 			ADD	#255.,R2	; ANY LEFT TO DO ?
  11127	030774	001430 				BEQ	90$
  11128	030776	110211 				MOVB	R2,(R1)		; YES, DO LAST BURST.
  11129	031000	142711 	177760 			BICB	#^C17,(R1)
  11130	031004	012700 	042000 			MOV	#.LDBRR,R0
  11131	031010					CALL	$DFWR
	031010	004737 	013336'			 JSR	PC,$DFWR
  11132	031014	103420 				BCS	90$
  11133	031016					SR	R2,4
	031016	006202 				  ASR	R2
	031020	006202 				  ASR	R2
	031022	006202 				  ASR	R2
	031024	006202 				  ASR	R2
  11134	031026	110211 				MOVB	R2,(R1)
  11135	031030	142711 	177760 			BICB	#^C17,(R1)
  11136	031034	012700 	043000 			MOV	#.LDBRL,R0
  11137	031040					CALL	$DFWR
	031040	004737 	013336'			 JSR	PC,$DFWR
  11138	031044	103404 				BCS	90$
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 235-1
$BURST	-- BURST THE M-BOX CLOCK

  11139	031046	012700 	005000 			MOV	#.BRCLK,R0
  11140	031052					CALLR	$DFXC
	031052	000137 	013540'			 JMP	$DFXC
  11141						;
  11142	031056				90$:
  11143	031056					RETURN
	031056	000207 				 RTS	PC
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 236
$BURST	-- BURST THE M-BOX CLOCK

  11145
  11146		022444'				.END	$START
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 236-1
SYMBOL TABLE

AAX   = 000020   	CHKMMC  005074R  	DDDFNA  000360R     002	DGMFNM  001264R     002	DST3B1  002101R     002
APR   = 000000   	CHNPNT= 000001   	DDDRNA  000426R     002	DIAG1 = 174430   	DS04  = 004000
ATLST   002226R     002	CIMNXC  001122R     003	DDLACR  000514R     002	DIAG2 = 174432   	DS05  = 002000
A.LULU= 000002   	CIMNXM  001153R     003	DDLFNA  000464R     002	DIAG3 = 174436   	DS06  = 001000
A.LUNA= 000004   	CLRMR = 000006   	DDLGLN  000456R     002	DIKL10= 000010   	DTECMD= 000451
A.LUNU= 000006   	CM    = 000004   	DDLRAT  000572R     002	DLYCNT= 174400   	DTEFLG= 000444
BAF0  = ****** GX	CNUPE = 000002   	DDLRNA  000542R     002	DM    = 000002   	DTEF11= 000450
BITTBL= ****** GX	CNVCHK  014602R  	DDNACE  000666R     002	DMABM = ****** GX	DTEMTD= 000455
BIT0  = 000001   	CNVWRD  014610R  	DDNCRE  000612R     002	DMANXM= ****** GX	DTEMTI= 000456
BIT00 = 000001   	COMCSE  004705RG    003	DDNDEL  000714R     002	DMA2TS= ****** GX	DTLST   002242R     002
BIT1  = 000002   	CONBUT= 000012   	DDNENA  000636R     002	DMA20 = ****** GX	DTNRB   002156R     002
BIT10 = 002000   	CONFGR= ****** GX	DDNGLN  000604R     002	DMRBF   001422R     002	DTNXP   002150R     002
BIT11 = 004000   	CONFIG= ****** GX	DDNRAT  000730R     002	DMRKW2  001434R     002	DTTRLB  002164R     002
BIT12 = 010000   	CONO  = 000004   	DDPDAI  000742R     002	DMRMMR  001402R     002	DTTSTA  002256R     002
BIT13 = 020000   	CONTI = ****** GX	DDPDAO  000772R     002	DMRMOS  001427R     002	DTTWLB  002204R     002
BIT14 = 040000   	CPE   = 000007 G 	DDPDEL  000756R     002	DMRMRT  001310R     002	DUPE  = 000020
BIT15 = 100000   	CR    = 000015   	DDPRNA  001006R     002	DMRSRL= 000005   	DURE  = 000004
BIT2  = 000004   	CST   = 000004 G 	DDXEXT  001036R     002	DMRSRT  001410R     002	DXBADR  002314R     002
BIT3  = 000010   	CS.EXP= 177670   	DEP   = 010000   	DNILPO  001462R     002	DXBCNM  002326R     002
BIT4  = 000020   	CTLS  = 000040   	DEX   = 000400   	DNISYF  001512R     002	DXBDAT  002320R     002
BIT5  = 000040   	CXMDOL  001470R     003	DEXDON= 000004   	DNISYI  001472R     002	DXBFNM  002274R     002
BIT6  = 000100   	CXMIBM  001663R     003	DEXWD1= 174406   	DNISYO  001502R     002	DXCAD   002334R     002
BIT7  = 000200   	CYCLS = 000002   	DEXWD2= 174404   	DNITTI  001442R     002	DXCBF   002341R     002
BIT8  = 000400   	C.ACHE= 000000   	DEXWD3= 174402   	DNITTO  001452R     002	DXCBRC  002346R     002
BIT9  = 001000   	DACAB   000000R     002	DFCABF  001111R     002	DON10C= 040000   	DXE   = 000003 G
BLKI  = 000000   	DACAD   000012R     002	DFCBF   001102R     002	DON10S= 100000   	DXWRD1= 002000
BLKO  = 000002   	DACBF   000015R     002	DFCFL2  001107R     002	DON11C= 000100   	D$$H11= 000010
BMMSTB  000234RG    004	DACBI   000005R     002	DFCFL3  001110R     002	DON11S= 000200   	D1011 = 000040
BPARER= 000020   	DATAI = 000001   	DFCRFL  001062R     002	DPE   = 000010 G 	EBSEL = 000100
BRCLK = 000005   	DATAO = 000003   	DFCWFL  001072R     002	DPS4  = 040000   	EBUSPC= 000020
BY$$0 = 000000   	DATE  = 000004   	DFDABF  001123R     002	DQBFNM  001522RG    002	EBUSPS= 000004
BY$$1 = 000000   	DBEFRC= ****** GX	DFDDBF  001116R     002	DQSAPR  001612R     002	EDONES= 040000
BY$$2 = 000000   	DCAPGM  000023R     002	DFEAD   001154R     002	DQSCBF  001562R     002	ED.PHY= 000200
BY$$3 = 000000   	DCARCA  000040R     002	DFEBF   001160R     002	DQSCF3  001576R     002	EF.CRI= ****** GX
BY$$4 = 000000   	DCARFL  000101R     002	DFEDPB  001130R     002	DQSCSW  001542R     002	EF.FCP= ****** GX
CCA   = 000014   	DCASIA  000033R     002	DFEEXB  001142R     002	DQSHWT  001620R     002	EF.PR1= ****** GX
CCFAIL= ****** GX	DCAWRF  000064R     002	DFRRDB  001166R     002	DQSMKT  001550R     002	EPE   = 000002 G
CDD   = 000020   	DCBADR  000126R     002	DFUNC = 000200   	DRESET= 000100   	EPTR  = 000000
CECLK = 000004   	DCBAPR  000202R     002	DFWBF   001224R     002	DRSCEN  001634R     002	ERRORX  020402R
CES   = 000001 G 	DCBA17  000177R     002	DFWEDB  001212R     002	DRSPEN  001646R     002	ERR10C= 010000
CFGEXT  005656R  	DCBBF   000172R     002	DFWWDB  001200R     002	DRSPFR  001653R     002	ERR10S= 020000
CFGINM  001206R     003	DCBCBF  000150R     002	DFXXDB  001232R     002	DRSPLD  001641R     002	ERR11C= 000001
CFGINT  005404R  	DCBCNT  000144R     002	DF.DMG= 000004   	DRTBF   002022R     002	ERR11S= 000002
CFGMAC  001425R     003	DCBDAT  000130R     002	DF.DMN= 000007   	DRTBUF  001712R     002	E.FFIL= 000006
CFGMNM  001354R     003	DCBDBF  000164R     002	DF.DOR= 000001   	DRTDTE  023106R  	FCFMSG  005134R     003
CFGMOS  006014R  	DCBFIX  000146R     002	DF.EHG= 000010   	DRTSTA  001706R     002	FITMEM= ****** GX
CFGXMC  004050R  	DCBFNM  000106R     002	DF.EHM= 000011   	DRTWLB  001664R     002	FM    = 000010
CFGXNM  001271R     003	DCFCFN  000220R     002	DF.EMG= 000005   	DRTX71  001656R     002	FME   = 000006 G
CFIMIL  004462R  	DCFLFN  000240R     002	DF.EMN= 000006   	DRTX72  002030R     002	FMRECN= ****** GX
CFIMQ1  000616R     003	DCFRJT  000260R     002	DF.KLR= 000012   	DR.DTE= 000011   	FORPRO= 000020
CFIMQ2  000736R     003	DCOMST= 000001   	DF.KLW= 000013   	DSEND = 000004   	FR.100= 000100
CFIMQ3  001010R     003	DCSRCA  000301R     002	DF.KLX= 000014   	DSTBF   002106R     002	FR.101= 000101
CFIMQ4  001035R     003	DCSSIA  000274R     002	DF.OFF= 000002   	DSTCEN  002062R     002	FR.132= 000132
CFMMQ1  000673R     003	DDCDAI  000306R     002	DF.ON = 000003   	DSTRT   002036R     002	FS    = 000001
CFXMQ1  001533R     003	DDCDAO  000322R     002	DF.PDP= 000016   	DSTRTL= 000004   	FTKLI = 000001
CFXMQ2  001604R     003	DDCWAT  000342R     002	DF.PEX= 000015   	DST1B0  002067R     002	F.TRCK= 000001
CHKIMC  004650R  	DDDDEL  000410R     002	DGCFNM  001244R     002	DST1B1  002074R     002	GAPCNT= ****** GX
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 236-2
SYMBOL TABLE

GAPTAB= ****** GX	KL.ABO= ****** GX	LMRDFN  015064R  	PSWW1 = 000005   	SYOLUN= 000005
G.LUBA= 000004   	KL.CFL= ****** GX	LOAD11= 000004   	PSWW10= 000014   	S.YIL = 001000 G
G.LUCW= 000004   	KL.CFM= ****** GX	LOGLUN= 000006   	PSWW11= 000015   	S.YOL = 001000 G
G.LUFB= 000003   	KL.DEF= ****** GX	LPOLUN= 000003   	PSWW12= 000016   	TAB   = 000011
G.LULU= 000002   	KL.KAC= ****** GX	LQBRBF  016760RG 	PSWW13= 000017   	TCAACD  000077R     003
G.LUNA= 000000   	KL.LCA= ****** GX	LQCCM   017346R  	PSWW2 = 000006   	TCAACE  000026R     003
G.LUNU= 000002   	KL.LRM= ****** GX	LQMRFN  001246R  	PSWW3 = 000007   	TCACEF  000000R     003
HDTAB   002120R     002	KL.LVB= ****** GX	LQRBPS  020730R  	PSWW4 = 000010   	TCASCE  000051R     003
HIBYTE= 177400   	KL.SPF= ****** GX	LQSBPS  021304R  	PSWW5 = 000011   	TCBBAD  000410R     003
HLTNOE  022022R  	KL.VBD= ****** GX	LQSCHE  021624R  	PSWW6 = 000012   	TCBDCW  000117R     003
HRR   = 000540   	KL.VBN= ****** GX	LQSCHO  021600R  	PSWW7 = 000013   	TCBDDW  000151R     003
H.KCAC= ****** GX	KS.CES= ****** GX	LQSCSW  022152R  	PTO   = 000005 G 	TCBFXF  000265R     003
H.KEXT= ****** GX	KS.CPE= ****** GX	LQSHDW  021644R  	PULSE = 000020   	TCBGOD  000416R     003
H.KMOS= ****** GX	KS.CST= ****** GX	LQSHWE  021330R  	QSIZE = 000023   	TCBMLF  000203R     003
H.KPWR= ****** GX	KS.DEX= ****** GX	LQSHWO  022046R  	Q.IOAE= 000012   	TCBMRE  000432R     003
H.KUDF= ****** GX	KS.DPE= ****** GX	LRSTKL  022346R  	Q.IOEF= 000006   	TCBMVF  000233R     003
IE.DFU= ****** GX	KS.EPE= ****** GX	LTNCHR  025634R  	Q.IOFN= 000002   	TCBMVL  000314R     003
IE.EBX= ****** GX	KS.FCF= ****** GX	LTNMV   025574R  	Q.IOLU= 000004   	TCBMVV  000351R     003
IE.EOF= ****** GX	KS.FME= ****** GX	LTNROL  025620R  	Q.IOPL= 000014   	TCBXOR  000424R     003
IE.NSF= ****** GX	KS.PTO= ****** GX	LTTDIR  027124R  	Q.IOPR= 000007   	TCFCFA  000522R     003
IFLOP = 100000   	LCARPT  000754R  	LXBRC   027416R  	Q.IOSB= 000010   	TCFCFE  000555R     003
INIDMA= ****** GX	LCBCRM  001476R  	LXB5B   027374R  	RAMIS0= 010000   	TDEDFU  002140R     003
INTMOD= ****** GX	LCBDRM  002040R  	L$$P20= 000002   	RDATIM  014342RG 	TDEDR   001706R     003
INTROF= 000010   	LCBFL   002504R  	MABRD = ****** GX	RDDONE= ****** GX	TDEIO   002000R     003
INTRON= 000040   	LCBRC   001372R  	MA20  = ****** GX	REPCON= ****** GX	TDENSF  002064R     003
INTSON= 000001   	LCBRME  002364R  	MBINI = ****** GX	REPFIT= ****** GX	TDRRDE  002165R     003
INT10S= 000400   	LCBVFY  002440R  	MB20  = ****** GX	RESDET= ****** GX	TDRRLE  002202R     003
INT11C= 002000   	LCBVR   002542R  	MF20  = ****** GX	RFMAD0= 100000   	TDWRLE  002254R     003
INT11S= 004000   	LCB3W   001216R  	MPE11 = 001000   	RFMAD1= 040000   	TDWWRE  002236R     003
IO.ACE= ****** GX	LCB6W   001224R  	MXTYP = 000004   	RFMAD2= 020000   	TENAD1= 174410
IO.ACR= ****** GX	LCFCPY  003052R  	M.KTAE= 000010   	RFMAD3= 010000   	TENAD2= 174412
IO.ATT= ****** GX	LCFERR  003320R  	M.KTEF= 000002   	RM    = 000010   	TFEDFL  002311R     003
IO.CRE= ****** GX	LCFNXT  003020R  	M.KTMG= 000004   	RTFERR  014562R  	TFEEFL  002332R     003
IO.DAC= ****** GX	LCFPRG  003314R  	M.KTUN= 000006   	RTFERX  014572R  	TFREMS  002353R     003
IO.DEL= ****** GX	LCFRBF  003124R  	NULSTP= 000040   	RTFXIT  014576R  	TFWEMS  002374R     003
IO.DET= ****** GX	LCFRCA  003134R  	NUPE  = 000002   	R$$11D= 000001   	TFXEMS  002416R     003
IO.ENA= ****** GX	LCFREF  003152R  	PAG   = 000010   	SAVLEN  002272R     002	TGCNFL  002442R     003
IO.EXT= ****** GX	LCFRMC  003334R  	PAGE  = 001000   	SAVMSG  002270R     002	TGMNFL  002511R     003
IO.FNA= ****** GX	LCFRMM  003044R  	PCERRM  003177R     003	SCD   = 000040   	TGTCKE  002561R     003
IO.RLB= ****** GX	LCFRTN  003312R  	PC.OVF= 010000   	SECLK = 000003   	TGTIFF  002651R     003
IO.RNA= ****** GX	LCFSKP  003142R  	PERCLR= 001000   	SETIMF  000272R     002	TGTNFL  002623R     003
IO.RVB= ****** GX	LCFWBF  003344R  	PGBTS = 000777   	SETMMF  000273R     002	TGTRFE  002713R     003
IO.WLB= ****** GX	LCFWCA  003610R  	PHYS  = 100000   	SETMR = 000007   	TMFLNM= ****** GX
IO.WVB= ****** GX	LCFWEF  003460R  	PI    = 000004   	SETRUN= 000011   	TMPLOG  002262R     002
IS.CR = ****** GX	LCFWMC  003676R  	PIDENT= 000000   	SETZ  = 000400   	TMRMFL  002751R     003
IS.ESC= ****** GX	LCFWMM  003502R  	PRI7  = 000340   	SPC   = 000040   	TNINDV  002777R     003
I.10L = 000005   	LCTL  = 000037   	PROPNT= 000021   	SSCLK = 000002   	TNIN55  003024R     003
JCOMM   002114R     002	LDAR  = 000077   	PRTOFF= 004000   	STAT  = 174434   	TNIPRI  003062R     003
JRST  = 000254   	LDEIDV  007316R  	PR0   = 000000   	STATUS= 000022   	TNIVER  003146R     003
JUMPE = 000322   	LDRER   010240R  	PR1   = 000040   	STPCLK= 000000   	TOBM  = 000004
KEEPBB= ****** GX	LDWER   010502R  	PR2   = 000100   	STPKL   030306R  	TOD   = 000003
KLI$$E= 000027   	LF    = 000012   	PR3   = 000140   	STRCLK= 000001   	TOIP  = 000002
KLI$$F= 000102   	LFCSAB  012054R  	PR4   = 000200   	SWITCH  002116R     002	TOIT  = 000001
KLI$$K= 000126   	LFDWFN  012240R  	PR5   = 000240   	SWR   = 177570   	TO10  = 000200
KLI$$V= 000012   	LFECKN  013134R  	PR6   = 000300   	SWSLLT= 100000   	TO10AD= 174420
KLPCRG  002664RG    004	LFEMVA  013110R  	PR7   = 000340   	SYFLUN= 000006   	TO10BC= 174414
KLPWRF= 000010   	LFWCKF  013456R  	PS    = 177776   	SYILUN= 000004   	TO10BM= 000001
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 236-3
SYMBOL TABLE

TO10DB= 000400   	TTTPRP  005176R     003	$DLGIM  020432RG 	$PURGE  007704RG 	$WRITW  010516RG
TO10DN= 100000   	TXBIMM  005212R     003	$DLGMB  020446RG 	$RCRAM  011344RG 	$WTKL   030172RG
TO10DT= 174424   	TXCHLE  005256R     003	$DLGMF  020442RG 	$RDERA= 000000   	$XCDT   000206RG
TO10ER= 020000   	TXCSFL  005306R     003	$DLGMM  017644RG 	$RDRAM  012254RG 	$ZERAC  000112RG
TO11  = 000100   	TYPNUM= ****** GX	$DLGMV  022624RG 	$READ   010254RG 	$$    = 000037
TO11AD= 174422   	T.TIL = 000040 G 	$DLGMX  022630RG 	$READB  010200RG 	$$APRI= 000000
TO11BC= 174416   	T.TOL = 000111 G 	$DLGRM  020476RG 	$READC  007776RG 	$$RDER= 000004
TO11BM= 020000   	UNASG1= 000032   	$DLGRV  022636RG 	$READS  010034RG 	$$SBDI= 000004
TO11DB= 004000   	UNASG2= 000033   	$DLGXM  020436RG 	$READW  010104RG 	$$$ARG= 000006
TO11DN= 000200   	UNASG3= 000034   	$DLMB1  020452RG 	$RP04 = 000001   	$$$OST= 000014
TO11DT= 174426   	UNASG4= 000035   	$DLMB2  020460RG 	$RSAVE  023142RG 	$$$T1 = 000014
TO11ER= 000002   	UNASG5= 000036   	$DLWCF  016632RG 	$RX11 = 000001   	.BRCLK= 005000
TQBNFL  003335R     003	UNASG6= 000037   	$DPOS   012654RG 	$SBDIA= 000002   	.BTADR  000514RG    004
TQBOOT  003220R     003	WEP   = 000010   	$DPOST  012636RG 	$SETCA  000356RG 	.BTSW   000046RG    004
TQBWCF  003272R     003	W.10L = 000005   	$DSPPT  020126RG 	$SETFN  007064RG 	.CACHN  000063RG    004
TQCACH  003373R     003	W72LOP  023634R  	$DSW  = ****** GX	$SETIM  004636RG 	.CASW   000041RG    004
TQCCEN  003440R     003	XCONMP= ****** GX	$DTE  = 000001   	$SETMM  005062RG 	.CECLK= 004000
TQEXIT  003504R     003	XCT   = 000256   	$DTRWS  023070RG 	$START  022444RG 	.CFGTB  000132RG    004
TQMCF0  003530R     003	XCT71   022516RG 	$DTRW1  023052RG 	$STRKL  030002RG 	.CFMRV  000232RG    004
TQMCF1  003607R     003	XCT72   023566RG 	$DTRW2  023060RG 	$SWEEP  006262RG 	.CKSW   000037RG    004
TQMNM0  003674R     003	ZSTOP = 040000   	$DTRW3  023100RG 	$TCRLF  026730RG 	.CLRMR= 006000
TQMPCA  003731R     003	$ACRAM  011746RG 	$ECHO   027204RG 	$TDB2C  025666RG 	.CLRUN= 010000
TQRLMC  004036R     003	$ADRAM  012464RG 	$ECHO1  027220RG 	$TDB2I  024464RG 	.COMEF= ****** GX
TQSABO  004523R     003	$APRID= 000000   	$ENTER  007514RG 	$TDB2O  025650RG 	.CONBT= 012000
TQSCAC  004375R     003	$ASCIZ  023176RG 	$ERROR  022750RG 	$TDI2B  024602RG 	.CPUSN= ****** GX
TQSCDH  004414R     003	$BURST  030666RG 	$EXAM   013004RG 	$TENST  023462RG 	.CSDN   000030RG    004
TQSCHN  004342R     003	$CD11 = 000001   	$EXAMD  012774RG 	$TENS1  023474RG 	.CSHRG= 164000
TQSDLG  004104R     003	$CFGBT  022656RG 	$EXAMT  012756RG 	$TOP20= 000001   	.CTLTP  000070RG    004
TQSEXT  004305R     003	$CFGCA  022602RG 	$EXBLD  027252RG 	$TRACK  023210RG 	.DATE3= ****** GX
TQSHRZ  004203R     003	$CFGMM  020146RG 	$EXCT   027712RG 	$TRB2F  024244RG 	.DBSW   000033RG    004
TQSHWP  004213R     003	$CFGRM  022570RG 	$EXIT   022760RG 	$TRB2I  024506RG 	.DCSW   000031RG    004
TQSKSN  004145R     003	$CFGXX  020320RG 	$EXIT1  022766RG 	$TRB2O  025700RG 	.DESW   000040RG    004
TQSMDL  004170R     003	$CFIMD  004012RG 	$EXTEN  011022RG 	$TRB2R  026144RG 	.DFBLK  000254RG    004
TQSMMA  004556R     003	$CFMMD  003760RG 	$FATAL  022774RG 	$TRCRM  024712RG 	.DFRBK  000262RG    004
TQSMMO  004246R     003	$CFXMD  006324RG 	$FE   = 000001   	$TRDRM  025056RG 	.DFRG1  000270RG    004
TQSWRN  004470R     003	$CHKIM  004644RG 	$FILE   002716RG 	$TRF2B  024346RG 	.DFRG2  000272RG    004
TROCT   025274R  	$CHKMM  005070RG 	$F11  = 000001   	$TRI2B  024624RG 	.DFRG3  000276RG    004
TRSPRF  004634R     003	$CLLOG= ****** GX	$GETCA  013672RG 	$TRO2B  025762RG 	.DFSTA  000274RG    004
TRSRSM  004670R     003	$CLOSE  006636RG 	$GETMM  014072RG 	$TRR2B  026036RG 	.DFWBK  000254RG    004
TRTBTF  004770R     003	$CONFG  005274RG 	$GETTF  014342RG 	$TTBEL  026710RG 	.DLGSW  000024RG    004
TRTEND  005075R     003	$DBDTE= 000001   	$INIT   015220RG 	$TTDMS  026766RG 	.DMSW   000032RG    004
TRTFME  005020R     003	$DDFRD  013220RG 	$IOERR  007126RG 	$TTDWR  027100RG 	.DREG   000270RG    004
TRTMMF  004732R     003	$DDFWR  013332RG 	$KLMR   014666RG 	$TTMSG  027034RG 	.DRLTC= 015000
TSTBSM  005077R     003	$DDFXC  013534RG 	$KLREC  015774RG 	$TTRD   026330RG 	.DRSW   000027RG    004
TTA     002130R     002	$DELET  006774RG 	$KLSR   015140RG 	$TTSPC  026700RG 	.DSACF= 066000
TTB     002134R     002	$DFPC   015574RG 	$LDAR   030252RG 	$TTTAB  026720RG 	.DSIOJ= 065000
TTBEL   005173R     003	$DFRD   013224RG 	$LDNGO  000000RG 	$TTWR   027114RG 	.DTEDT  000300RG    004
TTILUN= 000001   	$DFWR   013336RG 	$LGERR  000052RG    004	$WCRAM  011064RG 	.EASW   000042RG    004
TTJ     002144R     002	$DFXC   013540RG 	$LGOPN  000054RG    004	$WDD22  025324RG 	.EIOJA= 067000
TTOLUN= 000002   	$DH11 = 000001   	$LOG    000050RG    004	$WDD36  025436RG 	.ERCOD  002672RG    004
TTP     002140R     002	$DLGBT  016436RG 	$LOOKU  007342RG 	$WDRAM  012074RG 	.FEMOD= ****** GX
TTSLS   005172R     003	$DLGBV  022632RG 	$LP20 = 000001   	$WRD22  025354RG 	.FILSW  000045RG    004
TTSPC   005170R     003	$DLGCA  017170RG 	$MAPMM  006216RG 	$WRD36  025466RG 	.GFNR = 102000
TTTAB   005171R     003	$DLGCT  020406RG 	$MBPHS  030520RG 	$WRITB  010612RG 	.HRDWR= ****** GX
TTTNLN  005174R     003	$DLGCV  022576RG 	$MCBLD  001066RG 	$WRITC  010404RG 	.INICL= 070000
TTTPR   000207R     002	$DLGEN  020754RG 	$OPLOG= ****** GX	$WRITE  010652RG 	.IRLTC= 014000
TTTPRE  005202R     003	$DLGEX  017524RG 	$POWER  022256RG 	$WRITS  010446RG 	.KLERW= ****** GX
KLIXC -- KL INSTRUCTION EXECUTI	MACRO M1113  11-NOV-81 11:25  PAGE 236-4
SYMBOL TABLE

.KLFCF= ****** GX	.LDRJD= 064000   	.RCRM1= 147000   	.SYFID= 002614RG    004	.SYSTA  000522RG    004
.KLISV  000056RG    004	.LDRJV= 063000   	.RCRM2= 146000   	.SYFNB  002614RG    004	.TKTN = ****** GX
.KLITK= ****** GX	.LDRM1= 060000   	.RCRM3= 145000   	.SYFNM= 002622RG    004	.TPSHI  015730RG
.KLIWD= ****** GX	.LDRM2= 061000   	.RCRM4= 144000   	.SYIBA  000532RG    004	.TRKLP  000036RG    004
.KLREG  000242RG    004	.LDRM3= 062000   	.RCSPF= 141000   	.SYIBC  000534RG    004	.TRKSW  000034RG    004
.LCRDL= 052000   	.LDSEL= 044000   	.RDJ14= 134000   	.SYIBF  000562RG    004	.TRKTT  000035RG    004
.LCRDR= 051000   	.MCBFN  000454RG    004	.RDJ71= 135000   	.SYIFN  000536RG    004	.TTIBF  000302RG    004
.LCRM1= 057000   	.MCBSW  000025RG    004	.RDMAB= 133000   	.SYIRC  000530RG    004	.TTOBF  000342RG    004
.LCRM2= 056000   	.MEMRS= 076000   	.SECLK= 003000   	.SYISW  000526RG    004	.UFNSW  000026RG    004
.LCRM3= 055000   	.MFCT   000044RG    004	.SETMR= 007000   	.SYIVB  000556RG    004	.USRFN  000474RG    004
.LCRM4= 054000   	.MFSW   000043RG    004	.SETRN= 011000   	.SYOBA  001564RG    004	.WORK   000014RG    004
.LCRM5= 053000   	.NCACH  000062RG    004	.SNSAV  000060RG    004	.SYOBC  001566RG    004	.WRITR= ****** GX
.LDAR = 077000   	.NOERR= ****** GX	.SPSAV  000022RG    004	.SYOBF  001614RG    004	.WRMBX= 071000
.LDBRL= 043000   	.PCAB1= 150000   	.SSCLK= 002000   	.SYOFN  001570RG    004	.ZERO   000000RG    004
.LDBRR= 042000   	.PCAB2= 151000   	.STPCL= 000000   	.SYORC  001562RG    004	..DSEV= ****** GX
.LDCK1= 046000   	.PCAB3= 152000   	.STRCL= 001000   	.SYOSW  000527RG    004	..DTP2= ****** GX
.LDCK2= 047000   	.PCAB4= 153000   	.SYATT  002646RG    004	.SYOVB  001610RG    004	..DTSP= ****** GX
.LDDIS= 045000

. ABS.	000000	   000
      	031060	   001
DATA  	002354	   002
TEXT  	005330	   003
GLBL  	002700	   004
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  18139 WORDS  ( 71 PAGES)
DYNAMIC MEMORY:  19718 WORDS  ( 75 PAGES)
ELAPSED TIME:  00:05:29
,[50,20]KLIMON/CR/-SP=[50,30]KLIMON.TMP
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

AAX   	= 000020	#195-9158  
APR   	= 000000	 11-558    #55-1940    55-1962    55-1962   #58-2142    58-2161    58-2161   #195-9159   195-9178  
                         195-9178  #224-10611  224-10629  224-10629 
ATLST 	  002226 R	#219-10334  220-10420 
A.LULU	= 000002	#151-6748  #151-6750  #151-6753  #151-6756  #151-6758  #151-6760  
A.LUNA	= 000004	#151-6748  #151-6750  #151-6753  #151-6756  #151-6758  #151-6760  
A.LUNU	= 000006	#151-6748  #151-6750  #151-6753  #151-6756  #151-6758  #151-6760  
BAF0  	= ******  GX	 79-3602    79-3602    85-3937    85-3937   
BITTBL	= ******  GX	 76-3298    78-3531    79-3637    85-3941   
BIT0  	= 000001	#4-187     #8-464      176-8148   195-9165  
BIT00 	= 000001	#156-7013   157-7048  
BIT1  	= 000002	#4-187     #8-464      195-9163  
BIT10 	= 002000	#4-187     #8-464     
BIT11 	= 004000	#4-187     #8-464     
BIT12 	= 010000	#4-187     #8-464     
BIT13 	= 020000	#4-187     #8-464     
BIT14 	= 040000	#4-187     #8-464     
BIT15 	= 100000	#4-187     #8-464      62-2334    76-3215    76-3278    78-3521    79-3622    82-3777    83-3841   
                         84-3893    89-4095    101-4594   103-4679   103-4681   119-5209   144-6244   149-6571   149-6572  
                         149-6579   149-6583   149-6584   171-7741  
BIT2  	= 000004	#4-187     #8-464      195-9161  
BIT3  	= 000010	#4-187     #8-464      195-9164  
BIT4  	= 000020	#4-187     #8-464      195-9158  
BIT5  	= 000040	#4-187     #8-464     
BIT6  	= 000100	#4-187     #8-464     
BIT7  	= 000200	#4-187     #8-464     
BIT8  	= 000400	#4-187     #8-464     
BIT9  	= 001000	#4-187     #8-464     
BLKI  	= 000000	 11-557     11-559    #58-2143    58-2161    58-2161   
BLKO  	= 000002	 11-555    #55-1941    55-1962    55-1962   #173-7918   173-7930   173-7930  
BMMSTB	  000234 RG	 83-3851    89-4128   #188-8705  
BPARER	= 000020	#4-187     #8-464     
BRCLK 	= 000005	#11-550    
BY$$0 	= 000000	#51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766   #51-1767    51-1767    51-1767   #51-1767    51-1767   #51-1768    51-1768   
                         51-1768   #51-1768    51-1768   #51-1769    51-1769    51-1769   #51-1769    51-1769   #55-1956   
                         55-1956    55-1956   #55-1956    55-1956   #55-1957    55-1957    55-1957   #55-1957    55-1957   
                        #55-1958    55-1958    55-1958   #55-1958    55-1958   #55-1959    55-1959    55-1959   #55-1959   
                         55-1959   #55-1960    55-1960    55-1960   #55-1960    55-1960   #55-1961    55-1961    55-1961   
                        #55-1961    55-1961   #55-1962    55-1962    55-1962   #55-1962    55-1962   #55-1963    55-1963   
                         55-1963   #55-1963    55-1963   #58-2159    58-2159    58-2159   #58-2159    58-2159   #58-2160   
                         58-2160    58-2160   #58-2160    58-2160    58-2160   #58-2160    58-2160   #58-2161    58-2161   
                         58-2161   #58-2161    58-2161    58-2161   #58-2161    58-2161   #86-3986    86-3986    86-3986   
                        #86-3986    86-3986   #86-3987    86-3987    86-3987   #86-3987    86-3987   #121-5272   121-5272  
                         121-5272  #121-5272   121-5272  #121-5275   121-5275   121-5275  #121-5275   121-5275  #125-5514  
                         125-5514   125-5514  #125-5514   125-5514  #125-5515   125-5515   125-5515  #125-5515   125-5515  
                        #129-5709   129-5709   129-5709  #129-5709   129-5709  #129-5711   129-5711   129-5711  #129-5711  
                         129-5711  #135-5946   135-5946   135-5946  #135-5946   135-5946  #149-6589   149-6589   149-6589  
                        #149-6589   149-6589   149-6589  #149-6589   149-6589  #149-6598   149-6598   149-6598  #149-6598  
                         149-6598  #149-6599   149-6599   149-6599  #149-6599   149-6599   149-6599  #149-6599   149-6599  
                        #149-6600   149-6600   149-6600  #149-6600   149-6600  #173-7930   173-7930   173-7930  #173-7930  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         173-7930  #173-7939   173-7939   173-7939  #173-7939   173-7939  #181-8357   181-8357   181-8357  
                        #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  
                        #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  #181-8357   181-8357  #181-8359  
                         181-8359   181-8359  #181-8359   181-8359  #181-8360   181-8360   181-8360  #181-8360   181-8360  
                         181-8360  #181-8360   181-8360  #181-8361   181-8361   181-8361  #181-8361   181-8361   181-8361  
                        #181-8361   181-8361  #186-8543   186-8543   186-8543  #186-8543   186-8543   186-8543  #186-8543  
                         186-8543  #186-8553   186-8553   186-8553  #186-8553   186-8553  #195-9175   195-9175   195-9175  
                        #195-9175   195-9175   195-9175  #195-9175   195-9175  #195-9178   195-9178   195-9178  #195-9178  
                         195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178  
                         195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178   195-9178  #195-9179   195-9179  
                         195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179  
                         195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179  #195-9180   195-9180   195-9180  
                        #195-9180   195-9180  #195-9181   195-9181   195-9181  #195-9181   195-9181  #195-9185   195-9185  
                         195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185  
                         195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185  
                        #195-9188   195-9188   195-9188  #195-9188   195-9188  #195-9190   195-9190   195-9190  #195-9190  
                         195-9190  #195-9192   195-9192   195-9192  #195-9192   195-9192  #195-9195   195-9195   195-9195  
                        #195-9195   195-9195  #224-10629  224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629 
                         224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629 
                         224-10629 #228-10829  228-10829  228-10829 #228-10829  228-10829 #228-10831  228-10831  228-10831 
                        #228-10831  228-10831 #228-10833  228-10833  228-10833 #228-10833  228-10833 
BY$$1 	= 000000	#51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766   #51-1767    51-1767    51-1767   #51-1767    51-1767   #51-1768    51-1768   
                         51-1768   #51-1768    51-1768   #51-1769    51-1769    51-1769   #51-1769    51-1769   #55-1956   
                         55-1956    55-1956   #55-1956    55-1956   #55-1957    55-1957    55-1957   #55-1957    55-1957   
                        #55-1958    55-1958    55-1958   #55-1958    55-1958   #55-1959    55-1959    55-1959   #55-1959   
                         55-1959   #55-1960    55-1960    55-1960   #55-1960    55-1960   #55-1961    55-1961    55-1961   
                        #55-1961    55-1961   #55-1962    55-1962    55-1962   #55-1962    55-1962   #55-1963    55-1963   
                         55-1963   #55-1963    55-1963   #58-2159    58-2159    58-2159   #58-2159    58-2159   #58-2160   
                         58-2160    58-2160   #58-2160    58-2160    58-2160   #58-2160    58-2160   #58-2161    58-2161   
                         58-2161   #58-2161    58-2161    58-2161   #58-2161    58-2161   #86-3986    86-3986    86-3986   
                        #86-3986    86-3986   #86-3987    86-3987    86-3987   #86-3987    86-3987   #121-5272   121-5272  
                         121-5272  #121-5272   121-5272  #121-5275   121-5275   121-5275  #121-5275   121-5275  #125-5514  
                         125-5514   125-5514  #125-5514   125-5514  #125-5515   125-5515   125-5515  #125-5515   125-5515  
                        #129-5709   129-5709   129-5709  #129-5709   129-5709  #129-5711   129-5711   129-5711  #129-5711  
                         129-5711  #135-5946   135-5946   135-5946  #135-5946   135-5946  #149-6589   149-6589   149-6589  
                        #149-6589   149-6589   149-6589  #149-6589   149-6589  #149-6598   149-6598   149-6598  #149-6598  
                         149-6598  #149-6599   149-6599   149-6599  #149-6599   149-6599   149-6599  #149-6599   149-6599  
                        #149-6600   149-6600   149-6600  #149-6600   149-6600  #173-7930   173-7930   173-7930  #173-7930  
                         173-7930  #173-7939   173-7939   173-7939  #173-7939   173-7939  #181-8357   181-8357   181-8357  
                        #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  
                        #181-8357   181-8357   181-8357  #181-8357   181-8357   181-8357  #181-8357   181-8357  #181-8359  
                         181-8359   181-8359  #181-8359   181-8359  #181-8360   181-8360   181-8360  #181-8360   181-8360  
                         181-8360  #181-8360   181-8360  #181-8361   181-8361   181-8361  #181-8361   181-8361   181-8361  
                        #181-8361   181-8361  #186-8543   186-8543   186-8543  #186-8543   186-8543   186-8543  #186-8543  
                         186-8543  #186-8553   186-8553   186-8553  #186-8553   186-8553  #195-9175   195-9175   195-9175  
                        #195-9175   195-9175   195-9175  #195-9175   195-9175  #195-9178   195-9178   195-9178  #195-9178  
                         195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178  
                         195-9178   195-9178  #195-9178   195-9178   195-9178  #195-9178   195-9178  #195-9179   195-9179  
                         195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179  
                         195-9179  #195-9179   195-9179   195-9179  #195-9179   195-9179  #195-9180   195-9180   195-9180  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #195-9180   195-9180  #195-9181   195-9181   195-9181  #195-9181   195-9181  #195-9185   195-9185  
                         195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185  
                         195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185   195-9185  #195-9185   195-9185  
                        #195-9188   195-9188   195-9188  #195-9188   195-9188  #195-9190   195-9190   195-9190  #195-9190  
                         195-9190  #195-9192   195-9192   195-9192  #195-9192   195-9192  #195-9195   195-9195   195-9195  
                        #195-9195   195-9195  #224-10629  224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629 
                         224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629  224-10629  224-10629 #224-10629 
                         224-10629 #228-10829  228-10829  228-10829 #228-10829  228-10829 #228-10831  228-10831  228-10831 
                        #228-10831  228-10831 #228-10833  228-10833  228-10833 #228-10833  228-10833 
BY$$2 	= 000000	#51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1766   
                         51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1767    51-1767   #51-1767    51-1767   
                        #51-1767    51-1767   #51-1768    51-1768   #51-1768    51-1768   #51-1769    51-1769    51-1769   
                        #51-1769    51-1769   #51-1769    51-1769   #55-1956    55-1956    55-1956   #55-1956    55-1956   
                        #55-1956    55-1956   #55-1957    55-1957   #55-1957    55-1957   #55-1957    55-1957   #55-1958   
                         55-1958   #55-1958    55-1958   #55-1958    55-1958   #55-1959    55-1959   #55-1959    55-1959   
                        #55-1959    55-1959   #55-1960    55-1960   #55-1960    55-1960   #55-1960    55-1960   #55-1961   
                         55-1961   #55-1961    55-1961   #55-1961    55-1961   #55-1962    55-1962   #55-1962    55-1962   
                        #55-1962    55-1962   #55-1963    55-1963   #55-1963    55-1963   #55-1963    55-1963   #58-2159   
                         58-2159    58-2159   #58-2159    58-2159   #58-2159    58-2159   #58-2160    58-2160   #58-2160   
                         58-2160   #58-2160    58-2160   #58-2161    58-2161   #58-2161    58-2161   #58-2161    58-2161   
                        #58-2161    58-2161   #86-3986    86-3986   #86-3986    86-3986   #86-3986    86-3986   #86-3987   
                         86-3987   #86-3987    86-3987   #86-3987    86-3987   #121-5272   121-5272   121-5272  #121-5272  
                         121-5272  #121-5272   121-5272  #121-5275   121-5275   121-5275  #121-5275   121-5275  #121-5275  
                         121-5275  #125-5514   125-5514   125-5514  #125-5514   125-5514  #125-5514   125-5514  #125-5515  
                         125-5515   125-5515  #125-5515   125-5515  #125-5515   125-5515  #129-5709   129-5709  #129-5709  
                         129-5709  #129-5711   129-5711   129-5711  #129-5711   129-5711  #129-5711   129-5711  #135-5946  
                         135-5946   135-5946  #135-5946   135-5946  #135-5946   135-5946  #149-6589   149-6589   149-6589  
                        #149-6589   149-6589  #149-6589   149-6589  #149-6589   149-6589  #149-6598   149-6598   149-6598  
                        #149-6598   149-6598  #149-6598   149-6598  #149-6599   149-6599   149-6599  #149-6599   149-6599  
                        #149-6599   149-6599  #149-6599   149-6599  #149-6600   149-6600   149-6600  #149-6600   149-6600  
                        #149-6600   149-6600  #173-7930   173-7930  #173-7930   173-7930  #173-7930   173-7930  #173-7939  
                         173-7939   173-7939  #173-7939   173-7939  #173-7939   173-7939  #181-8357   181-8357  #181-8357  
                         181-8357  #181-8357   181-8357  #181-8357   181-8357  #181-8357   181-8357  #181-8357   181-8357  
                        #181-8357   181-8357  #181-8357   181-8357  #181-8359   181-8359   181-8359  #181-8359   181-8359  
                        #181-8359   181-8359  #181-8360   181-8360   181-8360  #181-8360   181-8360  #181-8360   181-8360  
                        #181-8360   181-8360  #181-8361   181-8361  #181-8361   181-8361  #181-8361   181-8361  #186-8543  
                         186-8543  #186-8543   186-8543  #186-8543   186-8543  #186-8543   186-8543  #186-8553   186-8553  
                         186-8553  #186-8553   186-8553  #186-8553   186-8553  #195-9175   195-9175  #195-9175   195-9175  
                        #195-9175   195-9175  #195-9175   195-9175  #195-9178   195-9178  #195-9178   195-9178  #195-9178  
                         195-9178  #195-9178   195-9178  #195-9178   195-9178  #195-9178   195-9178  #195-9178   195-9178  
                        #195-9178   195-9178  #195-9179   195-9179  #195-9179   195-9179  #195-9179   195-9179  #195-9179  
                         195-9179  #195-9179   195-9179  #195-9179   195-9179  #195-9179   195-9179  #195-9180   195-9180  
                        #195-9180   195-9180  #195-9180   195-9180  #195-9181   195-9181  #195-9181   195-9181  #195-9181  
                         195-9181  #195-9185   195-9185  #195-9185   195-9185  #195-9185   195-9185  #195-9185   195-9185  
                        #195-9185   195-9185  #195-9185   195-9185  #195-9185   195-9185  #195-9185   195-9185  #195-9188  
                         195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188  
                         195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188  
                         195-9188  #195-9188   195-9188  #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  
                        #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  
                        #195-9190   195-9190   195-9190  #195-9190   195-9190  #195-9190   195-9190  #195-9192   195-9192  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192  
                         195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192  
                        #195-9192   195-9192  #195-9195   195-9195   195-9195  #195-9195   195-9195  #195-9195   195-9195  
                        #224-10629  224-10629 #224-10629  224-10629 #224-10629  224-10629 #224-10629  224-10629 #224-10629 
                         224-10629 #224-10629  224-10629 #224-10629  224-10629 #228-10829  228-10829  228-10829 #228-10829 
                         228-10829 #228-10829  228-10829 #228-10831  228-10831  228-10831 #228-10831  228-10831 #228-10831 
                         228-10831 #228-10833  228-10833  228-10833 #228-10833  228-10833 #228-10833  228-10833 
BY$$3 	= 000000	#51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   #51-1766    51-1766    51-1766   
                        #51-1766    51-1766   #51-1767    51-1767   #51-1769    51-1769    51-1769   #51-1769    51-1769   
                        #55-1956    55-1956    55-1956   #55-1956    55-1956   #55-1957    55-1957   #55-1958    55-1958   
                        #55-1959    55-1959   #55-1960    55-1960   #55-1961    55-1961   #55-1962    55-1962   #55-1963   
                         55-1963   #58-2159    58-2159    58-2159   #58-2159    58-2159   #58-2161    58-2161   #86-3986   
                         86-3986   #86-3987    86-3987   #121-5272   121-5272   121-5272  #121-5272   121-5272  #121-5275  
                         121-5275   121-5275  #121-5275   121-5275  #125-5514   125-5514   125-5514  #125-5514   125-5514  
                        #125-5515   125-5515   125-5515  #125-5515   125-5515  #129-5711   129-5711   129-5711  #129-5711  
                         129-5711  #135-5946   135-5946   135-5946  #135-5946   135-5946  #149-6589   149-6589   149-6589  
                        #149-6589   149-6589  #149-6598   149-6598   149-6598  #149-6598   149-6598  #149-6599   149-6599  
                         149-6599  #149-6599   149-6599  #149-6600   149-6600   149-6600  #149-6600   149-6600  #173-7930  
                         173-7930  #173-7939   173-7939   173-7939  #173-7939   173-7939  #181-8357   181-8357  #181-8359  
                         181-8359   181-8359  #181-8359   181-8359  #181-8360   181-8360   181-8360  #181-8360   181-8360  
                        #186-8543   186-8543  #186-8553   186-8553   186-8553  #186-8553   186-8553  #195-9175   195-9175  
                        #195-9178   195-9178  #195-9179   195-9179  #195-9180   195-9180  #195-9181   195-9181  #195-9185  
                         195-9185  #195-9188   195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188   195-9188  
                         195-9188  #195-9188   195-9188   195-9188  #195-9188   195-9188   195-9188  #195-9188   195-9188  
                         195-9188  #195-9188   195-9188  #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  
                        #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  #195-9190   195-9190   195-9190  
                        #195-9190   195-9190   195-9190  #195-9190   195-9190  #195-9192   195-9192   195-9192  #195-9192  
                         195-9192   195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192   195-9192  #195-9192  
                         195-9192   195-9192  #195-9192   195-9192   195-9192  #195-9192   195-9192  #195-9195   195-9195  
                         195-9195  #195-9195   195-9195  #224-10629  224-10629 #228-10829  228-10829  228-10829 #228-10829 
                         228-10829 #228-10831  228-10831  228-10831 #228-10831  228-10831 #228-10833  228-10833  228-10833 
                        #228-10833  228-10833 
BY$$4 	= 000000	#51-1766    51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1766   
                         51-1766   #51-1766    51-1766   #51-1766    51-1766   #51-1767    51-1767   #51-1769    51-1769   
                        #51-1769    51-1769   #55-1956    55-1956   #55-1956    55-1956   #55-1957    55-1957   #55-1958   
                         55-1958   #55-1959    55-1959   #55-1960    55-1960   #55-1961    55-1961   #55-1962    55-1962   
                        #55-1963    55-1963   #58-2159    58-2159   #58-2159    58-2159   #58-2161    58-2161   #86-3986   
                         86-3986   #86-3987    86-3987   #121-5272   121-5272  #121-5272   121-5272  #121-5275   121-5275  
                        #121-5275   121-5275  #125-5514   125-5514  #125-5514   125-5514  #125-5515   125-5515  #125-5515  
                         125-5515  #129-5711   129-5711  #129-5711   129-5711  #135-5946   135-5946  #135-5946   135-5946  
                        #149-6589   149-6589  #149-6589   149-6589  #149-6598   149-6598  #149-6598   149-6598  #149-6599  
                         149-6599  #149-6599   149-6599  #149-6600   149-6600  #149-6600   149-6600  #173-7930   173-7930  
                        #173-7939   173-7939  #173-7939   173-7939  #181-8357   181-8357  #181-8359   181-8359  #181-8359  
                         181-8359  #181-8360   181-8360  #181-8360   181-8360  #186-8543   186-8543  #186-8553   186-8553  
                        #186-8553   186-8553  #195-9175   195-9175  #195-9178   195-9178  #195-9179   195-9179  #195-9180  
                         195-9180  #195-9181   195-9181  #195-9185   195-9185  #195-9188   195-9188  #195-9188   195-9188  
                        #195-9188   195-9188  #195-9188   195-9188  #195-9188   195-9188  #195-9188   195-9188  #195-9188  
                         195-9188  #195-9190   195-9190  #195-9190   195-9190  #195-9190   195-9190  #195-9190   195-9190  
                        #195-9190   195-9190  #195-9190   195-9190  #195-9190   195-9190  #195-9192   195-9192  #195-9192  
                         195-9192  #195-9192   195-9192  #195-9192   195-9192  #195-9192   195-9192  #195-9192   195-9192  
                        #195-9192   195-9192  #195-9195   195-9195  #195-9195   195-9195  #224-10629  224-10629 #228-10829 
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         228-10829 #228-10829  228-10829 #228-10831  228-10831 #228-10831  228-10831 #228-10833  228-10833 
                        #228-10833  228-10833 
CCA   	= 000014	#55-1942    55-1957    55-1957   #86-3978    86-3986    86-3986   #173-7917   173-7930   173-7930  
CCFAIL	= ******  GX	 170-7696   170-7704  
CDD   	= 000020	#4-187     #8-464     
CECLK 	= 000004	#11-547    
CES   	= 000001  G	 157-7111  #190-8844  
CFGEXT	  005656 R	 81-3732    81-3732   #83-3830   
CFGINM	  001206 R	#80-3708    82-3816   
CFGINT	  005404 R	 81-3727    81-3727   #82-3755   
CFGMAC	  001425 R	#80-3714    84-3880   
CFGMNM	  001354 R	#80-3712    84-3918   
CFGMOS	  006014 R	 81-3737    81-3737   #84-3871   
CFGXMC	  004050 R	 76-3150   #76-3173   
CFGXNM	  001271 R	#80-3710    83-3854   
CFIMIL	  004462 R	 76-3323   #76-3345   
CFIMQ1	  000616 R	#75-3117    76-3167    76-3334   
CFIMQ2	  000736 R	#75-3121    76-3248   
CFIMQ3	  001010 R	#75-3123    76-3252   
CFIMQ4	  001035 R	#75-3125    76-3357   
CFMMQ1	  000673 R	#75-3119    76-3149    76-3337   
CFXMQ1	  001533 R	#88-4056    89-4077   
CFXMQ2	  001604 R	#88-4058    89-4106   
CHKIMC	  004650 R	 78-3476   #78-3487   
CHKMMC	  005074 R	 79-3576   #79-3589   
CHNPNT	= 000001	#4-187     #8-464     
CIMNXC	  001122 R	#77-3434    78-3495    79-3595   
CIMNXM	  001153 R	#77-3436    78-3540    79-3642   
CLRMR 	= 000006	#11-548    
CM    	= 000004	#195-9161   196-9325  
CNUPE 	= 000002	#4-187     #8-464     
CNVCHK	  014602 R	 146-6464   146-6464  #147-6508  
CNVWRD	  014610 R	 146-6442   146-6442   146-6449   146-6449   146-6455   146-6455  #147-6512  
COMCSE	  004705 RG	 76-3201    76-3330    76-3389    89-4088    89-4135    159-7227   160-7264   163-7399   164-7445  
                         166-7501   169-7619   173-7832   174-8008  #186-8557  
CONBUT	= 000012	#11-552    
CONFGR	= ******  GX	*169-7651  *170-7688  
CONFIG	= ******  GX	 170-7725   170-7725  
CONO  	= 000004	#55-1943    55-1958    55-1958   #86-3979    86-3987    86-3987   #181-8346   181-8357   181-8357  
                        #195-9160   195-9178   195-9178   195-9179   195-9179   195-9180   195-9180   195-9185   195-9185  
                        #224-10612  224-10629  224-10629 
CONTI 	= ******  GX	 78-3502    78-3555   *78-3560    82-3787    84-3878   
CPE   	= 000007  G	 157-7101  #190-8850  
CR    	= 000015	#186-8528   195-9113  #219-10322  219-10347  222-10522 
CST   	= 000004  G	 157-7086  #190-8847  
CS.EXP	= 177670	#4-187     #8-464     
CTLS  	= 000040	#8-427      8-428      72-3017    144-6240   171-7737   188-8697   188-8701  
CXMDOL	  001470 R	#88-4054    89-4071   
CXMIBM	  001663 R	#88-4060    89-4131   
CYCLS 	= 000002	#4-187     #8-464     
C.ACHE	= 000000	#3-177      55-1937    67-2671    69-2783    69-2851    69-2867    69-2908    73-3028    86-3975   
                         140-6113   162-7368   169-7622   173-7844   181-8356   184-8468   187-8596   187-8618   187-8646  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         188-8668   191-8898   195-9183   196-9284   225-10679 
DACAB 	  000000 R	#51-1766   *52-1805    52-1808   *52-1810    52-1812   *53-1843    53-1844   
DACAD 	  000012 R	#51-1768    52-1815    53-1850   
DACBF 	  000015 R	#51-1769    54-1889   
DACBI 	  000005 R	#51-1767    52-1811    53-1845   
DATAI 	= 000001	#55-1944    55-1957    55-1957   #86-3980    86-3986    86-3986   
DATAO 	= 000003	#51-1760    51-1767    51-1767   #195-9162   195-9181   195-9181  
DATE  	= 000004	#4-187     #8-464     
DBEFRC	= ******  GX	*169-7642  *170-7706  
DCAPGM	  000023 R	#55-1955    56-1987   
DCARCA	  000040 R	#55-1958   
DCARFL	  000101 R	#55-1965    56-2009    56-2036    56-2038    56-2040    56-2042   
DCASIA	  000033 R	#55-1957   
DCAWRF	  000064 R	#55-1962    56-1992    56-2050   
DCBADR	  000126 R	#58-2152   *62-2331   *62-2334    62-2337    63-2365    63-2373    64-2449   *64-2472    64-2482   
                         64-2505   
DCBAPR	  000202 R	#58-2161    66-2593   
DCBA17	  000177 R	#58-2160    66-2597   
DCBBF 	  000172 R	#58-2159    66-2596   
DCBCBF	  000150 R	#58-2156    63-2379    63-2410    63-2417    63-2423   
DCBCNT	  000144 R	#58-2154   *60-2239    62-2338   *63-2394   *64-2470   *65-2535    65-2536   
DCBDAT	  000130 R	#58-2153    60-2240   
DCBDBF	  000164 R	#58-2157    64-2456    64-2487    64-2493    64-2499   
DCBFIX	  000146 R	#58-2155   *63-2362    63-2392   *63-2395    63-2401   *63-2433   *64-2446    64-2468   *64-2471   
                         64-2477   *64-2509   
DCBFNM	  000106 R	#58-2148    60-2219   
DCFCFN	  000220 R	#67-2658    69-2793    69-2800   
DCFLFN	  000240 R	#67-2663    69-2902   
DCFRJT	  000260 R	#67-2668    67-2678    69-2815   
DCOMST	= 000001	#4-187     #8-464     
DCSRCA	  000301 R	#86-3987    87-4009   
DCSSIA	  000274 R	#86-3986    87-4006   
DDCDAI	  000306 R	#90-4178    91-4202   
DDCDAO	  000322 R	#90-4179    91-4218   
DDCWAT	  000342 R	 90-4179   #90-4180   
DDDDEL	  000410 R	#92-4264    96-4405   
DDDFNA	  000360 R	#92-4263    96-4401   
DDDRNA	  000426 R	#92-4265    96-4410   
DDLACR	  000514 R	#101-4594   102-4625  
DDLFNA	  000464 R	#101-4593   102-4621  
DDLGLN	  000456 R	#101-4592   102-4617  
DDLRAT	  000572 R	 101-4594  #101-4596  
DDLRNA	  000542 R	#101-4595   102-4637  
DDNACE	  000666 R	#103-4681   104-4715  
DDNCRE	  000612 R	#103-4679   104-4707  
DDNDEL	  000714 R	#103-4682   104-4729  
DDNENA	  000636 R	#103-4680   104-4711  
DDNGLN	  000604 R	#103-4678   104-4703  
DDNRAT	  000730 R	 103-4681  #103-4683  
DDPDAI	  000742 R	#105-4767   106-4784  
DDPDAO	  000772 R	#105-4769   106-4789  
DDPDEL	  000756 R	#105-4768   106-4788  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DDPRNA	  001006 R	#105-4770   106-4794  
DDXEXT	  001036 R	#119-5209   120-5222  
DEP   	= 010000	#4-187     #8-464     
DEX   	= 000400	#4-187     #8-464     
DEXDON	= 000004	#4-187     #8-464     
DEXWD1	= 174406	#4-187     #8-464     
DEXWD2	= 174404	#4-187     #8-464     
DEXWD3	= 174402	#4-187     #8-464     
DFCABF	  001111 R	#121-5275   124-5462  *124-5478  *124-5480  
DFCBF 	  001102 R	#121-5272   122-5299   122-5307  *122-5313   122-5314   122-5315  *122-5315  *122-5330  *122-5331  
                         122-5333  *122-5338  *122-5339  *122-5340  *122-5341  *122-5342   122-5343   123-5372   123-5376  
                         123-5377  *123-5396  *123-5397   123-5398   123-5422   123-5423   123-5427  
DFCFL2	  001107 R	#121-5273   123-5400  *123-5404  *123-5425  
DFCFL3	  001110 R	#121-5274   123-5418  *123-5420  *123-5424  
DFCRFL	  001062 R	#121-5263   123-5370  
DFCWFL	  001072 R	#121-5267   122-5332  
DFDABF	  001123 R	#125-5515   128-5641   128-5642   128-5665  
DFDDBF	  001116 R	#125-5514  *126-5568   126-5569   127-5595  
DFEAD 	  001154 R	 129-5707   129-5708  #129-5709   130-5748   131-5791   132-5807   132-5812  
DFEBF 	  001160 R	 129-5707   129-5708  #129-5711   130-5743   130-5748   131-5791   131-5794  
DFEDPB	  001130 R	#129-5707   130-5749  
DFEEXB	  001142 R	#129-5708   131-5790  
DFRRDB	  001166 R	#133-5869  *134-5894   134-5895   134-5896  
DFUNC 	= 000200	#4-187     #8-464     
DFWBF 	  001224 R	 135-5945  #135-5946  
DFWEDB	  001212 R	#135-5945   137-6000  
DFWWDB	  001200 R	#135-5944  *136-5972   136-5982   136-5983  
DFXXDB	  001232 R	#138-6045  *139-6077   139-6078   139-6079  
DF.DMG	= 000004	#4-187     #8-464     
DF.DMN	= 000007	#4-187     #8-464     
DF.DOR	= 000001	#4-187     #8-464     
DF.EHG	= 000010	#4-187     #8-464     
DF.EHM	= 000011	#4-187     #8-464     
DF.EMG	= 000005	#4-187     #8-464     
DF.EMN	= 000006	#4-187     #8-464     
DF.KLR	= 000012	#4-187     #8-464      133-5869  
DF.KLW	= 000013	#4-187     #8-464      135-5944  
DF.KLX	= 000014	#4-187     #8-464      138-6045  
DF.OFF	= 000002	#4-187     #8-464     
DF.ON 	= 000003	#4-187     #8-464     
DF.PDP	= 000016	#4-187     #8-464      129-5707  
DF.PEX	= 000015	#4-187     #8-464      129-5708   135-5945  
DGCFNM	  001244 R	#140-6117   141-6140  
DGMFNM	  001264 R	#143-6216   144-6248  
DIAG1 	= 174430	#4-187     #8-464     
DIAG2 	= 174432	#4-187     #8-464     
DIAG3 	= 174436	#4-187     #8-464     
DIKL10	= 000010	#4-187     #8-464     
DLYCNT	= 174400	#4-187     #8-464     
DM    	= 000002	#195-9163   196-9325  
DMABM 	= ******  GX	*83-3865   
DMANXM	= ******  GX	 83-3851    89-4129   
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DMA2TS	= ******  GX	 83-3845    89-4069   
DMA20 	= ******  GX	 81-3730    89-4067    171-7762  
DMRBF 	  001422 R	#149-6598   150-6636  
DMRKW2	  001434 R	 149-6569  #149-6600  
DMRMMR	  001402 R	 149-6587  #149-6589  
DMRMOS	  001427 R	#149-6599   150-6663  
DMRMRT	  001310 R	#149-6570   150-6628  
DMRSRL	= 000005	#149-6597   150-6675  
DMRSRT	  001410 R	#149-6592   149-6597   150-6676  
DNILPO	  001462 R	#151-6752   152-6798  
DNISYF	  001512 R	#151-6759   152-6807  
DNISYI	  001472 R	#151-6755   152-6803  
DNISYO	  001502 R	#151-6757   152-6805  
DNITTI	  001442 R	#151-6747   152-6793  
DNITTO	  001452 R	#151-6749   152-6795  
DON10C	= 040000	#4-187     #8-464      150-6624  
DON10S	= 100000	#4-187     #8-464     
DON11C	= 000100	#4-187     #8-464      150-6624  
DON11S	= 000200	#4-187     #8-464     
DPE   	= 000010  G	 157-7106  #190-8851  
DPS4  	= 040000	#4-187     #8-464     
DQBFNM	  001522 RG	 62-2281   #158-7160   161-7287  
DQSAPR	  001612 R	#173-7938   177-8191   177-8194   177-8197   177-8201  
DQSCBF	  001562 R	#173-7934   179-8255   179-8271  
DQSCF3	  001576 R	#173-7936   179-8259  
DQSCSW	  001542 R	#173-7929   180-8295  
DQSHWT	  001620 R	#173-7941   176-8149  
DQSMKT	  001550 R	#173-7932   180-8306  
DRESET	= 000100	#4-187     #8-464      150-6621  
DRSCEN	  001634 R	#181-8357   184-8474  
DRSPEN	  001646 R	#181-8360   184-8481  
DRSPFR	  001653 R	#181-8361   182-8391  
DRSPLD	  001641 R	#181-8359   184-8478  
DRTBF 	  002022 R	#186-8552   195-9089   195-9100  
DRTBUF	  001712 R	 186-8547  #186-8550   195-9072   195-9078   195-9115  
DRTDTE	  023106 R	 192-8998   192-9002   192-9006  #192-9010  
DRTSTA	  001706 R	 186-8547  #186-8548  
DRTWLB	  001664 R	#186-8546  *195-9116  *195-9119   195-9120  *195-9123   195-9124  
DRTX71	  001656 R	#186-8542   191-8877  
DRTX72	  002030 R	#195-9175   196-9251  
DR.DTE	= 000011	#4-187     #8-464      129-5707   129-5708   133-5869   135-5944   135-5945   138-6045  
DSEND 	= 000004	#4-187     #8-464     
DSTBF 	  002106 R	#195-9194   196-9320  
DSTCEN	  002062 R	#195-9184  
DSTRT 	  002036 R	#195-9177   195-9182   196-9278  
DSTRTL	= 000004	#195-9182   196-9277  
DST1B0	  002067 R	#195-9187   196-9300  
DST1B1	  002074 R	#195-9189   196-9314  
DST3B1	  002101 R	#195-9191   196-9304  
DS04  	= 004000	#4-187     #8-464     
DS05  	= 002000	#4-187     #8-464      230-10918 
DS06  	= 001000	#4-187     #8-464      132-5829   230-10912  231-10949  233-11011 
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DTECMD	= 000451	#4-187     #8-464     
DTEFLG	= 000444	#4-187     #8-464     
DTEF11	= 000450	#4-187     #8-464     
DTEMTD	= 000455	#4-187     #8-464     
DTEMTI	= 000456	#4-187     #8-464     
DTLST 	  002242 R	#219-10335  220-10429 
DTNRB 	  002156 R	#207-9830   212-9989  
DTNXP 	  002150 R	#207-9829  
DTTRLB	  002164 R	#219-10332  220-10379 
DTTSTA	  002256 R	 219-10332  219-10333 #219-10336  220-10380  220-10381  224-10574 
DTTWLB	  002204 R	#219-10333  220-10370  220-10371 *220-10373 *220-10374  220-10375 *220-10389 *220-10390  220-10391 
                        *220-10422 *220-10423 *222-10526 *222-10527 *223-10542 *223-10543  223-10544  223-10551  223-10552 
                        *224-10573 *224-10574 *224-10578  224-10579 *224-10580 
DUPE  	= 000020	#4-187     #8-464     
DURE  	= 000004	#4-187     #8-464     
DXBADR	  002314 R	#224-10624  225-10693 
DXBCNM	  002326 R	#224-10628  225-10696 
DXBDAT	  002320 R	#224-10626  225-10692 
DXBFNM	  002274 R	#224-10619  225-10682 
DXCAD 	  002334 R	#228-10828  230-10891  230-10896 
DXCBF 	  002341 R	#228-10830  234-11056 
DXCBRC	  002346 R	#228-10832  235-11109 
DXE   	= 000003  G	 157-7081  #190-8846  
DXWRD1	= 002000	#4-187     #8-464     
D$$H11	= 000010	#1-43      
D1011 	= 000040	#4-187     #8-464     
EBSEL 	= 000100	#4-187     #8-464     
EBUSPC	= 000020	#4-187     #8-464     
EBUSPS	= 000004	#4-187     #8-464     
EDONES	= 040000	#4-187     #8-464     
ED.PHY	= 000200	#8-419      129-5707   129-5708   135-5945  
EF.CRI	= ******  GX	 152-6840  
EF.FCP	= ******  GX	 196-9247   196-9264  
EF.PR1	= ******  GX	 152-6832  
EPE   	= 000002  G	 157-7076  #190-8845  
EPTR  	= 000000	#4-187     #8-464     
ERRORX	  020402 R	 170-7682   170-7722  #170-7730  
ERR10C	= 010000	#4-187     #8-464      150-6624  
ERR10S	= 020000	#4-187     #8-464     
ERR11C	= 000001	#4-187     #8-464      150-6624  
ERR11S	= 000002	#4-187     #8-464     
E.FFIL	= 000006	#8-418     
FCFMSG	  005134 R	#195-9205   196-9272  
FITMEM	= ******  GX	 170-7715   170-7715  
FM    	= 000010	#195-9164   196-9325  
FME   	= 000006  G	 157-7096  #190-8849  
FMRECN	= ******  GX	*170-7667  *170-7686  
FORPRO	= 000020	#4-187     #8-464     
FR.100	= 000100	#156-7014   157-7035  
FR.101	= 000101	#156-7015   157-7026  
FR.132	= 000132	#156-7016   157-7044  
FS    	= 000001	#195-9165  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

FTKLI 	= 000001	#3-181     
F.TRCK	= 000001	#3-179      122-5293   123-5362   124-5459   126-5533   127-5586   128-5640   130-5748   131-5791  
                         134-5896   136-5983   139-6078   150-6617   150-6674   151-6751   152-6797   186-8545   187-8606  
                         194-9053   219-10338  220-10358  220-10369  220-10376  220-10386  220-10392  220-10400  223-10545 
                         224-10560  229-10858  230-10890  231-10943  233-10996 
GAPCNT	= ******  GX	 170-7717  
GAPTAB	= ******  GX	 170-7719  
G.LUBA	= 000004	#101-4592  #103-4678  
G.LULU	= 000002	#101-4592  #103-4678  
G.LUNA	= 000000	 101-4592   103-4678  
HDTAB 	  002120 R	#203-9625   205-9744  
HIBYTE	= 177400	#4-187     #8-464     
HLTNOE	  022022 R	 174-8058   174-8058   176-8110   176-8110  #178-8230  
HRR   	= 000540	#55-1945    55-1960    55-1960   
H.KCAC	= ******  GX	 177-8207  
H.KEXT	= ******  GX	 177-8218  
H.KMOS	= ******  GX	 177-8212  
H.KPWR	= ******  GX	 176-8140   176-8151  
H.KUDF	= ******  GX	 176-8151  
IE.DFU	= ******  GX	 99-4513   
IE.EBX	= ******  GX	 137-6002  
IE.EOF	= ******  GX	 118-5166   220-10383 
IE.NSF	= ******  GX	 60-2246    69-2796    99-4509    102-4634   102-4638   141-6143   144-6251   146-6385   161-7290  
                         225-10703 
IFLOP 	= 100000	#4-187     #8-464     
INIDMA	= ******  GX	 83-3836   
INTMOD	= ******  GX	*82-3805   
INTROF	= 000010	#4-187     #8-464     
INTRON	= 000040	#4-187     #8-464     
INTSON	= 000001	#4-187     #8-464     
INT10S	= 000400	#4-187     #8-464     
INT11C	= 002000	#4-187     #8-464      150-6624  
INT11S	= 004000	#4-187     #8-464     
IO.ACE	= ******  GX	 103-4681  
IO.ACR	= ******  GX	 101-4594  
IO.ATT	= ******  GX	 219-10334 
IO.CRE	= ******  GX	 103-4679  
IO.DAC	= ******  GX	 90-4178    90-4179    105-4767   105-4769  
IO.DEL	= ******  GX	 92-4264    103-4682   105-4768  
IO.DET	= ******  GX	 219-10335 
IO.ENA	= ******  GX	 103-4680  
IO.EXT	= ******  GX	 119-5209  
IO.FNA	= ******  GX	 92-4263    101-4593   152-6816  
IO.RLB	= ******  GX	 219-10332 
IO.RNA	= ******  GX	 92-4265    101-4595   105-4770  
IO.RVB	= ******  GX	 112-4971  
IO.WLB	= ******  GX	 186-8547   219-10333 
IO.WVB	= ******  GX	 118-5156  
IS.CR 	= ******  GX	 220-10397 
IS.ESC	= ******  GX	 220-10395 
I.10L 	= 000005	#6-313      195-9182   196-9282  
JCOMM 	  002114 R	#203-9623  *205-9736   205-9755  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

JRST  	= 000254	#55-1946    55-1963    55-1963   
JUMPE 	= 000322	#55-1947    55-1959    55-1959   
KEEPBB	= ******  GX	*169-7589  
KLI$$E	= 000027	#2-145      151-6769   185-8489  
KLI$$F	= 000102	#3-174      58-2111    58-2111    75-3081    75-3081    77-3394    77-3394    80-3671    80-3671   
                         88-4019    88-4019    142-6183   142-6183   145-6314   145-6314   151-6685   151-6685   151-6769  
                         165-7450   165-7450   167-7530   167-7530   181-8313   181-8313   185-8489   185-8489  
KLI$$K	= 000126	#2-148      151-6769  
KLI$$V	= 000012	#2-144      151-6769   185-8489  
KLPCRG	  002664 RG	 157-7070  #190-8853   196-9240  
KLPWRF	= 000010	#4-187     #8-464     
KL.ABO	= ******  GX	 191-8863  
KL.CFL	= ******  GX	 163-7405   169-7655  
KL.CFM	= ******  GX	 169-7637  
KL.DEF	= ******  GX	 173-7838  
KL.KAC	= ******  GX	 152-6801   191-8874   233-11014 
KL.LCA	= ******  GX	 163-7402  
KL.LRM	= ******  GX	 173-7836   174-8022  
KL.LVB	= ******  GX	 161-7294   170-7702   225-10676 
KL.SPF	= ******  GX	 166-7511   169-7587   170-7701   173-7838  
KL.VBD	= ******  GX	 170-7701   196-9298   196-9308  
KL.VBN	= ******  GX	 170-7702   196-9237   196-9296  
KS.CES	= ******  GX	 157-7109  
KS.CPE	= ******  GX	 157-7099  
KS.CST	= ******  GX	 157-7084  
KS.DEX	= ******  GX	 157-7079  
KS.DPE	= ******  GX	 157-7104  
KS.EPE	= ******  GX	 157-7074  
KS.FCF	= ******  GX	 196-9269  
KS.FME	= ******  GX	 157-7094  
KS.PTO	= ******  GX	 157-7089  
LCARPT	  000754 R	 56-2075   #57-2084   
LCBCRM	  001476 R	 62-2336   #63-2362   
LCBDRM	  002040 R	 62-2333   #64-2446    64-2474   
LCBFL 	  002504 R	 60-2249    62-2347    63-2435    64-2511   #65-2568   
LCBRC 	  001372 R	 60-2243   #62-2329    63-2399    64-2475   
LCBRME	  002364 R	 63-2408    63-2408    64-2484    64-2484   #65-2525   
LCBVFY	  002440 R	 63-2413    63-2413    63-2416    63-2416    63-2426    63-2426    64-2489    64-2489    64-2492   
                         64-2492    64-2502    64-2502   #65-2551   
LCBVR 	  002542 R	 62-2346   #66-2582   
LCB3W 	  001216 R	#61-2262    64-2447    64-2447   
LCB6W 	  001224 R	#61-2264    63-2374    63-2374   
LCFCPY	  003052 R	 69-2813   #69-2826    69-2848    69-2857    69-2929   
LCFERR	  003320 R	 69-2797    69-2802   #69-2922   
LCFNXT	  003020 R	#69-2808    69-2836    69-2865   
LCFPRG	  003314 R	 69-2810    69-2830    69-2833    69-2838    69-2840    69-2864    69-2875    69-2884    69-2889   
                         69-2894    69-2897    69-2899   #69-2920   
LCFRBF	  003124 R	 67-2676   #69-2846   
LCFRCA	  003134 R	 67-2672   #69-2855   
LCFREF	  003152 R	 67-2669    69-2804   #69-2871   
LCFRMC	  003334 R	 67-2677   #69-2927   
LCFRMM	  003044 R	 67-2670   #69-2820   
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LCFRTN	  003312 R	 69-2778    69-2790   #69-2915   
LCFSKP	  003142 R	 69-2822    69-2849   #69-2862    69-2930   
LCFWBF	  003344 R	 69-2888    69-2888   #70-2942   
LCFWCA	  003610 R	 69-2874    69-2874   #73-3030   
LCFWEF	  003460 R	 69-2896    69-2896   #71-2977   
LCFWMC	  003676 R	 69-2893    69-2893   #74-3060   
LCFWMM	  003502 R	 69-2883    69-2883   #72-2993   
LCTL  	= 000037	#8-428     
LDAR  	= 000077	#11-553    
LDEIDV	  007316 R	 99-4535    99-4535   #100-4552  
LDRER 	  010240 R	 108-4854   110-4910   111-4936  #111-4948  
LDWER 	  010502 R	 114-5039   115-5065  #115-5076   116-5102   117-5129  
LF    	= 000012	#186-8529   195-9114  #219-10323  219-10347  222-10523 
LFCSAB	  012054 R	 124-5463   124-5463   124-5471   124-5471  #124-5477  
LFDWFN	  012240 R	 126-5553   126-5563   126-5563  #126-5568  
LFECKN	  013134 R	 130-5741   130-5741   131-5788   131-5788  #132-5819  
LFEMVA	  013110 R	 130-5740   130-5740   131-5787   131-5787  #132-5807  
LFWCKF	  013456 R	 136-5969   136-5969  #137-5996  
LMRDFN	  015064 R	 150-6633   150-6633   150-6646   150-6646  #150-6652  
LOAD11	= 000004	#4-187     #8-464     
LOGLUN	= 000006	#8-426     
LPOLUN	= 000003	#8-422      151-6753   186-8547   195-9119   219-10334  219-10335  224-10578 
LQBRBF	  016760 RG	 159-7204   159-7204  #161-7285   174-8057   174-8057  
LQCCM 	  017346 R	 163-7394  #164-7412   164-7446  
LQMRFN	  001246 R	 60-2216    60-2216   #62-2280   
LQRBPS	  020730 R	 173-7850   173-7850  #173-7868   173-7871  
LQSBPS	  021304 R	 174-8044   174-8044  #175-8091   175-8095  
LQSCHE	  021624 R	 174-8062   174-8062   176-8113   176-8115  #176-8177  
LQSCHO	  021600 R	 174-8066   174-8066   176-8119  #176-8168  
LQSCSW	  022152 R	 174-8024   174-8024   174-8059   174-8059  #180-8292  
LQSHDW	  021644 R	 174-8060   174-8060   176-8114   176-8114  #177-8190  
LQSHWE	  021330 R	 174-8029   174-8029  #176-8110  
LQSHWO	  022046 R	 177-8192   177-8192  #179-8251  
LRSTKL	  022346 R	 182-8390   182-8390  #184-8467  
LTNCHR	  025634 R	 210-9937   210-9937   211-9964   211-9964   211-9971   211-9971  #212-10027 
LTNMV 	  025574 R	 210-9931   210-9931   211-9959   211-9959  #212-9988  
LTNROL	  025620 R	 210-9935   210-9935   211-9962   211-9962   211-9969   211-9969  #212-10007  212-10011 
LTTDIR	  027124 R	 222-10528 #223-10544 
LXBRC 	  027416 R	 225-10698 #226-10727  227-10793 
LXB5B 	  027374 R	#225-10712  227-10783  227-10783 
L$$P20	= 000002	#1-37      
MABRD 	= ******  GX	*82-3809   
MA20  	= ******  GX	 76-3159    81-3722    171-7765  
MBINI 	= ******  GX	 169-7586   169-7586  
MB20  	= ******  GX	 76-3161    81-3724    171-7767  
MF20  	= ******  GX	 76-3144    81-3735    170-7694  
MPE11 	= 001000	#4-187     #8-464     
MXTYP 	= 000004	#67-2653    67-2678    69-2812   
M.KTAE	= 000010	#173-7933  
M.KTEF	= 000002	#173-7933  
M.KTMG	= 000004	#173-7933  
M.KTUN	= 000006	#173-7933  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

NULSTP	= 000040	#4-187     #8-464     
NUPE  	= 000002	#4-187     #8-464     
PAG   	= 000010	#51-1761    51-1767    51-1767   #55-1948    55-1958    55-1958   #86-3981    86-3987    86-3987   
                        #181-8347   181-8357   181-8357  #195-9166   195-9180   195-9180   195-9181   195-9181   195-9185  
                         195-9185  
PAGE  	= 001000	#224-10613  224-10614 
PCERRM	  003177 R	#152-6877   153-6936  
PC.OVF	= 010000	#156-7017   157-7050  
PERCLR	= 001000	#4-187     #8-464      150-6624  
PGBTS 	= 000777	#224-10614  226-10741  227-10766  227-10770 
PHYS  	= 100000	#4-187     #8-464     
PI    	= 000004	 11-556     11-560    #195-9167   195-9179   195-9179  
PIDENT	= 000000	#4-187     #8-464     
PRI7  	= 000340	#4-187     #8-464     
PROPNT	= 000021	#4-187     #8-464     
PRTOFF	= 004000	#4-187     #8-464     
PR0   	= 000000	#4-187     #8-464     
PR1   	= 000040	#4-187     #8-464     
PR2   	= 000100	#4-187     #8-464     
PR3   	= 000140	#4-187     #8-464     
PR4   	= 000200	#4-187     #8-464     
PR5   	= 000240	#4-187     #8-464     
PR6   	= 000300	#4-187     #8-464     
PR7   	= 000340	#4-187     #8-464     
PS    	= 177776	#4-187     #8-464     
PSWW1 	= 000005	#4-187     #8-464     
PSWW10	= 000014	#4-187     #8-464     
PSWW11	= 000015	#4-187     #8-464     
PSWW12	= 000016	#4-187     #8-464     
PSWW13	= 000017	#4-187     #8-464     
PSWW2 	= 000006	#4-187     #8-464     
PSWW3 	= 000007	#4-187     #8-464     
PSWW4 	= 000010	#4-187     #8-464     
PSWW5 	= 000011	#4-187     #8-464     
PSWW6 	= 000012	#4-187     #8-464     
PSWW7 	= 000013	#4-187     #8-464     
PTO   	= 000005  G	 157-7091  #190-8848  
PULSE 	= 000020	#4-187     #8-464     
QSIZE 	= 000023	#4-187     #8-464     
Q.IOAE	= 000012	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        #219-10332 #219-10333 #219-10334 #219-10335 
Q.IOEF	= 000006	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        #219-10332 #219-10333 #219-10334 #219-10335 
Q.IOFN	= 000002	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        #219-10332 #219-10333 #219-10334 #219-10335 
Q.IOLU	= 000004	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        *195-9119  *195-9123  #219-10332 #219-10333 #219-10334 #219-10335 *224-10578 *224-10580 
Q.IOPL	= 000014	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        *195-9116  #219-10332 #219-10333 #219-10334 #219-10335  220-10370  220-10371 *220-10373 *220-10374 
                        *220-10389 *220-10390 *220-10422 *220-10423 *222-10526 *222-10527 *223-10542 *223-10543  223-10551 
                         223-10552 *224-10573 *224-10574 
Q.IOPR	= 000007	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        #219-10332 #219-10333 #219-10334 #219-10335 
Q.IOSB	= 000010	#90-4178   #90-4179   #92-4263   #92-4264   #92-4265   #101-4593  #101-4594  #101-4595  #103-4679  
                        #103-4680  #103-4681  #103-4682  #105-4767  #105-4768  #105-4769  #105-4770  #119-5209  #186-8547  
                        #219-10332 #219-10333 #219-10334 #219-10335 
RAMIS0	= 010000	#4-187     #8-464     
RDATIM	  014342 RG	#146-6375  
RDDONE	= ******  GX	*82-3810   
REPCON	= ******  GX	 170-7669   170-7669  
REPFIT	= ******  GX	 170-7716   170-7716  
RESDET	= ******  GX	 170-7668   170-7668   170-7689   170-7689   170-7707   170-7707   170-7714   170-7714  
RFMAD0	= 100000	#4-187     #8-464     
RFMAD1	= 040000	#4-187     #8-464     
RFMAD2	= 020000	#4-187     #8-464     
RFMAD3	= 010000	#4-187     #8-464     
RM    	= 000010	#4-187     #8-464     
RTFERR	  014562 R	 146-6416   146-6430  #147-6481   147-6518  
RTFERX	  014572 R	 146-6423   146-6469  #147-6486  
RTFXIT	  014576 R	 146-6388   146-6443   146-6450   146-6456   146-6465  #147-6488  
R$$11D	= 000001	#1-46      
SAVLEN	  002272 R	#219-10340 *220-10371  220-10423 
SAVMSG	  002270 R	#219-10339 *220-10370  220-10422 
SCD   	= 000040	#4-187     #8-464     
SECLK 	= 000003	#11-546    
SETIMF	  000272 R	#77-3429   *78-3475   *78-3483    78-3522    78-3558   
SETMMF	  000273 R	#77-3431   *79-3575   *79-3582    79-3623    79-3653   
SETMR 	= 000007	#11-549    
SETRUN	= 000011	#11-551    
SETZ  	= 000400	#55-1949    55-1961    55-1961   
SPC   	= 000040	#186-8530   195-9077  
SSCLK 	= 000002	#11-545    
STAT  	= 174434	#4-187     #8-464     
STATUS	= 000022	#4-187     #8-464     
STPCLK	= 000000	#11-543    
STPKL 	  030306 R	 232-10972  232-10972 #233-10995 
STRCLK	= 000001	#11-544    
SWITCH	  002116 R	#203-9624  *205-9737   205-9769  *205-9771  
SWR   	= 177570	#4-187     #8-464     
SWSLLT	= 100000	#4-187     #8-464     
SYFLUN	= 000006	#8-425      92-4263    92-4264    92-4265    101-4593   101-4595   103-4679   103-4680   105-4770  
                         151-6760  
SYILUN	= 000004	#8-423      90-4178    101-4592   101-4594   105-4767   112-4971   151-6756   152-6816  
SYOLUN	= 000005	#8-424      90-4179    103-4678   103-4681   103-4682   105-4768   105-4769   118-5156   119-5209  
                         151-6758  
S.YIL 	= 001000  G	 112-4971  #190-8779   190-8785   190-8793   190-8801  
S.YOL 	= 001000  G	 104-4723   115-5067   118-5156   118-5163  #190-8795   190-8809  
TAB   	= 000011	#186-8531   195-9074  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TCAACD	  000077 R	#55-1971    57-2084   
TCAACE	  000026 R	#55-1969    57-2087   
TCACEF	  000000 R	#55-1968    56-2076   
TCASCE	  000051 R	#55-1970    57-2090   
TCBBAD	  000410 R	#58-2172    63-2411    64-2488   
TCBDCW	  000117 R	#58-2165    63-2407   
TCBDDW	  000151 R	#58-2166    64-2483   
TCBFXF	  000265 R	#58-2169    63-2403    64-2479   
TCBGOD	  000416 R	#58-2173    63-2415    64-2491   
TCBMLF	  000203 R	#58-2167    65-2569   
TCBMRE	  000432 R	#58-2175    60-2218   
TCBMVF	  000233 R	#58-2168    65-2572   
TCBMVL	  000314 R	#58-2170    66-2584   
TCBMVV	  000351 R	#58-2171    66-2586   
TCBXOR	  000424 R	#58-2174    63-2424    64-2500   
TCFCFA	  000522 R	#67-2682    69-2905   
TCFCFE	  000555 R	#67-2684    69-2923   
TDEDFU	  002140 R	#98-4484    99-4511   
TDEDR 	  001706 R	#98-4481    99-4502   
TDEIO 	  002000 R	#98-4482    99-4515   
TDENSF	  002064 R	#98-4483    99-4507   
TDRRDE	  002165 R	#107-4832   112-4980  
TDRRLE	  002202 R	#107-4834   111-4949  
TDWRLE	  002254 R	#113-5020   115-5077  
TDWWRE	  002236 R	#113-5018   118-5172  
TENAD1	= 174410	#4-187     #8-464     
TENAD2	= 174412	#4-187     #8-464     
TFEDFL	  002311 R	#129-5714   130-5751  
TFEEFL	  002332 R	#129-5715   131-5799  
TFREMS	  002353 R	#133-5872   134-5907  
TFWEMS	  002374 R	#135-5949   136-5985  
TFXEMS	  002416 R	#138-6048   139-6082  
TGCNFL	  002442 R	#140-6122   141-6145  
TGMNFL	  002511 R	#143-6222   144-6253  
TGTCKE	  002561 R	#145-6347   146-6468  
TGTIFF	  002651 R	#145-6351   146-6422  
TGTNFL	  002623 R	#145-6349   146-6387  
TGTRFE	  002713 R	#145-6353   147-6482  
TMFLNM	= ******  GX	 146-6377  
TMPLOG	  002262 R	#219-10337 
TMRMFL	  002751 R	#149-6603   150-6648  
TNINDV	  002777 R	#151-6762   152-6810  
TNIN55	  003024 R	#151-6764   152-6821  
TNIPRI	  003062 R	#151-6766   152-6836  
TNIVER	  003146 R	#151-6768   152-6843  
TOBM  	= 000004	#4-187     #8-464     
TOD   	= 000003	#4-187     #8-464     
TOIP  	= 000002	#4-187     #8-464     
TOIT  	= 000001	#4-187     #8-464     
TO10  	= 000200	#4-187     #8-464     
TO10AD	= 174420	#4-187     #8-464     
TO10BC	= 174414	#4-187     #8-464     
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TO10BM	= 000001	#4-187     #8-464     
TO10DB	= 000400	#4-187     #8-464     
TO10DN	= 100000	#4-187     #8-464     
TO10DT	= 174424	#4-187     #8-464     
TO10ER	= 020000	#4-187     #8-464     
TO11  	= 000100	#4-187     #8-464     
TO11AD	= 174422	#4-187     #8-464     
TO11BC	= 174416	#4-187     #8-464     
TO11BM	= 020000	#4-187     #8-464     
TO11DB	= 004000	#4-187     #8-464     
TO11DN	= 000200	#4-187     #8-464     
TO11DT	= 174426	#4-187     #8-464     
TO11ER	= 000002	#4-187     #8-464     
TQBNFL	  003335 R	#158-7157   161-7297  
TQBOOT	  003220 R	#158-7153   159-7188  
TQBWCF	  003272 R	#158-7155   160-7253  
TQCACH	  003373 R	#162-7372   163-7384  
TQCCEN	  003440 R	#162-7373   164-7412  
TQEXIT	  003504 R	#165-7479   166-7490  
TQMCF0	  003530 R	#168-7571   169-7595  
TQMCF1	  003607 R	#168-7573   169-7598  
TQMNM0	  003674 R	#168-7575   170-7721  
TQMPCA	  003731 R	#168-7577   170-7703  
TQRLMC	  004036 R	#172-7806   173-7817  
TQSABO	  004523 R	#173-7973   174-8077  
TQSCAC	  004375 R	 173-7946  #173-7967  
TQSCDH	  004414 R	#173-7969   176-8178  
TQSCHN	  004342 R	 173-7945  #173-7965  
TQSDLG	  004104 R	#173-7951   174-7991  
TQSEXT	  004305 R	 173-7944  #173-7963  
TQSHRZ	  004203 R	#173-7957   176-8145  
TQSHWP	  004213 R	#173-7959   176-8147  
TQSKSN	  004145 R	#173-7953   176-8121  
TQSMDL	  004170 R	#173-7955   176-8125  
TQSMMA	  004556 R	#173-7975   176-8173  
TQSMMO	  004246 R	 173-7943  #173-7961  
TQSWRN	  004470 R	#173-7971   174-8033   174-8069  
TROCT 	  025274 R	 204-9677   204-9677   204-9680   204-9680   204-9693   204-9693   204-9694   204-9694   205-9749  
                         205-9749   205-9764   205-9764  #206-9790  
TRSPRF	  004634 R	#181-8367   182-8398  
TRSRSM	  004670 R	#181-8374   182-8395  
TRTBTF	  004770 R	#186-8561   191-8952  
TRTEND	  005075 R	#186-8565   191-8970  
TRTFME	  005020 R	#186-8563   191-8965  
TRTMMF	  004732 R	#186-8559   191-8926  
TSTBSM	  005077 R	#195-9200   196-9340  
TTA   	  002130 R	 203-9628  #203-9629  
TTB   	  002134 R	 203-9627  #203-9630  
TTBEL 	  005173 R	#219-10346  221-10449 
TTILUN	= 000001	#8-420      151-6748   219-10332 
TTJ   	  002144 R	 203-9625  #203-9632  
TTOLUN	= 000002	#8-421      151-6750   195-9123   219-10333  224-10580 
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TTP   	  002140 R	 203-9626  #203-9631  
TTSLS 	  005172 R	#219-10345 
TTSPC 	  005170 R	#219-10343  221-10444 
TTTAB 	  005171 R	#219-10344  221-10461 
TTTNLN	  005174 R	#219-10347  220-10389  221-10466 
TTTPR 	  000207 R	#58-2162    65-2552   
TTTPRE	  005202 R	#219-10349  222-10518 
TTTPRP	  005176 R	#219-10348  220-10373 
TXBIMM	  005212 R	#224-10632  226-10758 
TXCHLE	  005256 R	#228-10836  233-11035 
TXCSFL	  005306 R	#228-10838  230-10924 
TYPNUM	= ******  GX	 76-3230    76-3246    78-3491    78-3493   *78-3524    79-3593   *79-3630    82-3764    82-3766   
                         82-3775    82-3782    83-3834    83-3839    84-3886    84-3891    171-7740  
T.TIL 	= 000040  G	#189-8743   189-8745   219-10332 
T.TOL 	= 000111  G	#189-8746   189-8748  
UNASG1	= 000032	#4-187     #8-464     
UNASG2	= 000033	#4-187     #8-464     
UNASG3	= 000034	#4-187     #8-464     
UNASG4	= 000035	#4-187     #8-464     
UNASG5	= 000036	#4-187     #8-464     
UNASG6	= 000037	#4-187     #8-464     
WEP   	= 000010	#4-187     #8-464     
W.10L 	= 000005	#6-314     
W72LOP	  023634 R	#196-9261   196-9266  
XCONMP	= ******  GX	 170-7698  
XCT   	= 000256	#186-8533   186-8543   186-8543  #195-9168   195-9175   195-9175  
XCT71 	  022516 RG	#191-8876  
XCT72 	  023566 RG	#196-9249  
ZSTOP 	= 040000	#4-187     #8-464     
$ACRAM	  011746 RG	 62-2340    62-2340    122-5295   122-5295   123-5363   123-5363  #124-5458  
$ADRAM	  012464 RG	 126-5538   126-5538   127-5590   127-5590  #128-5639  
$APRID	= 000000	#11-557    
$ASCIZ	  023176 RG	#194-9046   194-9048   222-10519  222-10519  222-10521  222-10521 
$BURST	  030666 RG	 54-1886    54-1886    233-11007  233-11007  234-11089 #235-11104 
$CD11 	= 000001	#1-38      
$CFGBT	  022656 RG	 160-7280   174-8071  #191-8932  
$CFGCA	  022602 RG	 163-7408   164-7442   164-7444  #191-8905  
$CFGMM	  020146 RG	 169-7660  #170-7678  
$CFGRM	  022570 RG	 173-7862  #191-8895  
$CFGXX	  020320 RG	 76-3153    76-3324   #170-7711  
$CFIMD	  004012 RG	#76-3158    76-3386    171-7747  
$CFMMD	  003760 RG	#76-3143    171-7753  
$CFXMD	  006324 RG	#89-4066    171-7750  
$CHKIM	  004644 RG	 76-3310    76-3310   #78-3482   
$CHKMM	  005070 RG	 76-3315    76-3315   #79-3581   
$CLLOG	= ******  GX	 62-2345    62-2345    65-2568    65-2568    223-10557  223-10557 
$CLOSE	  006636 RG	 62-2294    62-2294    62-2344    62-2344    69-2898    69-2898   #91-4200    141-6163   141-6163  
                         141-6176   144-6270   144-6270   144-6306   146-6475   147-6487   147-6487   161-7309   161-7309  
                         161-7334   226-10756  226-10756 
$CONFG	  005274 RG	#81-3720    170-7712   170-7712  
$DBDTE	= 000001	#1-44      
$DDFRD	  013220 RG	#134-5888   157-7027   157-7027   157-7036   157-7036   157-7045   157-7045  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$DDFWR	  013332 RG	#136-5964  
$DDFXC	  013534 RG	#139-6062  
$DELET	  006774 RG	 69-2903    69-2903   #96-4400   
$DFPC 	  015574 RG	#153-6902   157-7063   157-7063  
$DFRD 	  013224 RG	 54-1891    54-1891    123-5373   123-5373   123-5428   123-5428   127-5597   127-5597   127-5605  
                         127-5605   127-5618   127-5618  #134-5891   150-6638   150-6638   153-6917   153-6917   179-8269  
                         179-8269   226-10752  226-10752  234-11059  234-11059  234-11064  234-11064  234-11069  234-11069 
                         234-11084  234-11084 
$DFWR 	  013336 RG	 54-1906    54-1906    122-5334   122-5334   122-5345   124-5465   124-5465   124-5473   124-5473  
                         126-5570   128-5667   128-5667  #136-5967   150-6665   150-6665   184-8480   184-8480   184-8483  
                         184-8483   196-9323   196-9323   196-9327   196-9327   232-10978  235-11115  235-11115  235-11118 
                         235-11118  235-11131  235-11131  235-11137  235-11137 
$DFXC 	  013540 RG	 54-1883    54-1883    54-1896    54-1896    54-1902    54-1902    54-1909    62-2343    62-2343   
                         123-5366   123-5366   127-5593   127-5593   128-5670   132-5824   132-5824   137-6007   137-6007  
                        #139-6065   150-6619   150-6619   150-6643   150-6643   150-6655   150-6655   150-6678   150-6678  
                         178-8234   178-8234   179-8263   179-8263   179-8265   179-8265   180-8299   180-8299   180-8302  
                         180-8302   184-8485   191-8881   191-8881   191-8884   191-8884   196-9255   196-9255   196-9258  
                         196-9258   196-9330   196-9330   229-10862  229-10862  229-10865  229-10865  230-10900  230-10900 
                         230-10903  230-10903  230-10908  230-10908  230-10921  233-10999  233-10999  233-11019  233-11019 
                         233-11026  233-11026  233-11029  233-11029  234-11075  234-11075  235-11107  235-11107  235-11121 
                         235-11121  235-11140 
$DH11 	= 000001	#1-42      
$DLGBT	  016436 RG	#159-7181   160-7263   191-8920  
$DLGBV	  022632 RG	 169-7646  #191-8919  
$DLGCA	  017170 RG	#163-7378   164-7423   173-7845   191-8900  
$DLGCT	  020406 RG	 170-7670   170-7710  #171-7736  
$DLGCV	  022576 RG	 169-7626  #191-8899  
$DLGEN	  020754 RG	 166-7508   173-7834  #174-7982   191-8890   191-8956  
$DLGEX	  017524 RG	 160-7277  #166-7485   191-8948  
$DLGIM	  020432 RG	#171-7746   171-7766   171-7768  
$DLGMB	  020446 RG	 76-3192   #171-7755   171-7769  
$DLGMF	  020442 RG	 89-4141   #171-7752  
$DLGMM	  017644 RG	 163-7404  #169-7583   171-7756   191-8915   191-8976  
$DLGMV	  022624 RG	 159-7201  #191-8914  
$DLGMX	  022630 RG	 170-7728  #191-8917  
$DLGRM	  020476 RG	 163-7401  #173-7811   174-8035   191-8923  
$DLGRV	  022636 RG	 169-7629  #191-8922  
$DLGXM	  020436 RG	 76-3163    76-3383   #171-7749   171-7763  
$DLMB1	  020452 RG	 76-3195   #171-7761  
$DLMB2	  020460 RG	 89-4092   #171-7764  
$DLWCF	  016632 RG	 159-7224  #160-7248   166-7505  
$DPOS 	  012654 RG	 52-1820    52-1820    53-1852    53-1852    56-2060    56-2060    130-5734   130-5734  #130-5738  
                         196-9317   196-9317   226-10745  226-10745  227-10775  227-10775  227-10787  227-10787 
$DPOST	  012636 RG	#130-5730   196-9241   196-9241   196-9245   196-9245  
$DSPPT	  020126 RG	 169-7652  #170-7666  
$DSW  	= ******  GX	 99-4504    104-4728  *104-4730   137-6002  
$DTE  	= 000001	#1-45      
$DTRWS	  023070 RG	 150-6626   150-6626  #192-9004  
$DTRW1	  023052 RG	 132-5827   132-5827  #192-8996   230-10910  230-10910  231-10947  231-10947  233-11009  233-11009 
$DTRW2	  023060 RG	 150-6622   150-6622  #192-9000  
$DTRW3	  023100 RG	#192-9008  
$ECHO 	  027204 RG	 220-10387  220-10387 #224-10572 
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$ECHO1	  027220 RG	 220-10377  220-10377  220-10393  220-10393  220-10424  220-10424  223-10546  223-10546 #224-10575 
$ENTER	  007514 RG	 69-2801    69-2801   #104-4702  
$ERROR	  022750 RG	 82-3823    83-3858    84-3926    159-7231   170-7731   182-8399   191-8897   191-8909   191-8912  
                         191-8927   191-8938   191-8942  #191-8954   191-8960   196-9346   220-10437 
$EXAM 	  013004 RG	 66-2598    66-2598    131-5773   131-5773   131-5778   131-5778  #131-5785  
$EXAMD	  012774 RG	#131-5777  
$EXAMT	  012756 RG	#131-5769  
$EXBLD	  027252 RG	 191-8944   191-8944  #225-10673 
$EXCT 	  027712 RG	 66-2594    66-2594    87-4007    87-4007    87-4010    87-4010    184-8475   184-8475   191-8878  
                         191-8878   196-9252   196-9252   196-9280   196-9280   196-9289   196-9289   225-10697  225-10697 
                        #229-10856 
$EXIT 	  022760 RG	 152-6837   166-7518   174-8083   182-8397   191-8947  #191-8958  
$EXIT1	  022766 RG	 191-8866   191-8872   191-8887  #191-8961   196-9349  
$EXTEN	  011022 RG	 118-5168   118-5168  #120-5222  
$FATAL	  022774 RG	#191-8964  
$FE   	= 000001	#1-40      
$FILE 	  002716 RG	#69-2776    182-8387   182-8387   191-8959   191-8959   196-9229   196-9229  
$F11  	= 000001	#1-41      
$GETCA	  013672 RG	#141-6138   191-8908   191-8908   191-8937   191-8937  
$GETMM	  014072 RG	#144-6238   170-7681   170-7681  
$GETTF	  014342 RG	#146-6374  
$INIT 	  015220 RG	#152-6777   191-8868   191-8868  
$IOERR	  007126 RG	 60-2248    60-2248    91-4228    96-4416   #99-4500    102-4643   104-4731   120-5231   146-6391  
                         225-10705 
$KLMR 	  014666 RG	 60-2242    60-2242    132-5821   132-5821   137-6004  #150-6616   177-8215   177-8215   179-8253  
                         179-8253   184-8467   184-8467   233-11016  233-11016 
$KLREC	  015774 RG	#157-7019   191-8871   191-8871  
$KLSR 	  015140 RG	 124-5460   124-5460   128-5663   128-5663  #150-6673  
$LDAR 	  030252 RG	 54-1880    54-1880    180-8296   180-8296   229-10859  229-10859  230-10897  230-10897 #232-10970 
$LDNGO	  000000 RG	#52-1803    56-1988    56-1988   
$LGERR	  000052 RG	#187-8636   223-10555 
$LGOPN	  000054 RG	#187-8638   223-10548 
$LOG  	  000050 RG	#187-8634  
$LOOKU	  007342 RG	 60-2237    60-2237    62-2282    62-2282    69-2794    69-2794   #102-4616   141-6141   141-6141  
                         144-6249   144-6249   146-6383   146-6383   161-7288   161-7288   225-10690  225-10690 
$LP20 	= 000001	#1-36      
$MAPMM	  006216 RG	 84-3898    84-3898   #85-3931   
$MBPHS	  030520 RG	 232-10974  232-10974 #234-11053 
$MCBLD	  001066 RG	#60-2213    191-8896   191-8896  
$OPLOG	= ******  GX	 63-2400    63-2400    64-2476    64-2476   
$POWER	  022256 RG	 166-7521  #182-8387  
$PURGE	  007704 RG	 62-2314    62-2314    65-2574    65-2574    69-2921    69-2921   #106-4782   141-6177   141-6177  
                         144-6309   144-6309   161-7337   161-7337   191-8951   191-8951  
$RCRAM	  011344 RG	 63-2380    63-2380   #123-5361   179-8257   179-8257  
$RDERA	= 000000	#11-559    
$RDRAM	  012254 RG	 64-2457    64-2457   #127-5585  
$READ 	  010254 RG	 102-4633   109-4881   109-4881   110-4913   110-4913   111-4939   111-4939  #112-4965  
$READB	  010200 RG	 62-2301    62-2301    69-2837    69-2837   #111-4934   141-6165   141-6165   141-6171   141-6171  
                         144-6277   144-6277   144-6280   144-6280   147-6517   147-6517   161-7318   161-7318   161-7321  
                         161-7321   225-10716  225-10716 
$READC	  007776 RG	 62-2287    62-2287    62-2329    62-2329    69-2809    69-2809   #108-4852   141-6157   141-6157  
                         144-6265   144-6265   144-6301   144-6301   146-6414   146-6414   161-7303   161-7303   226-10727 
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         226-10727 
$READS	  010034 RG	 62-2297    62-2297    69-2863    69-2863   #109-4877   109-4882   141-6155   141-6155   144-6262  
                         144-6262   144-6298   144-6298   146-6429   146-6429   161-7313   161-7313  
$READW	  010104 RG	 61-2266    61-2266    62-2308    62-2308    108-4857   108-4857   108-4861  #110-4902   144-6283  
                         144-6283   161-7328   161-7328   226-10730  226-10730 
$RP04 	= 000001	#1-39      
$RSAVE	  023142 RG	 52-1803    53-1840    54-1878    65-2525    99-4500    122-5292   123-5361   126-5532   127-5585  
                         128-5639   130-5739   131-5786   146-6376   150-6616   153-6903  #193-9028   195-9068   204-9670  
                         205-9730   220-10368  222-10496  222-10513  229-10857  230-10889  232-10971  234-11054  235-11104 
$RX11 	= 000001	#1-61      
$SBDIA	= 000002	#11-555    
$SETCA	  000356 RG	#56-1987    191-8911   191-8911   191-8941   191-8941  
$SETFN	  007064 RG	 96-4400    96-4400    96-4409    96-4409   #97-4436    102-4616   102-4616   102-4636   102-4636  
                         104-4702   104-4702   106-4792   106-4792  
$SETIM	  004636 RG	#78-3474    82-3770    82-3770    82-3792    82-3792   
$SETMM	  005062 RG	#79-3574    84-3906    84-3906   
$START	  022444 RG	#191-8862   236-11146 
$STRKL	  030002 RG	 52-1826    182-8392   182-8392   196-9337   196-9337  #230-10888 
$SWEEP	  006262 RG	#87-4002    225-10680  225-10680 
$TCRLF	  026730 RG	 65-2561    65-2561    76-3254    76-3254    176-8163   176-8163   191-8973   191-8973  #221-10464 
$TDB2C	  025666 RG	 201-9514  #214-10083 
$TDB2I	  024464 RG	 176-8124   176-8124   176-8144   176-8144  #201-9509  
$TDB2O	  025650 RG	 76-3251    76-3251   #214-10078 
$TDI2B	  024602 RG	#202-9558  
$TENST	  023462 RG	#196-9228   226-10757 
$TENS1	  023474 RG	 160-7276   160-7276   196-9230  #196-9232  
$TOP10	= ******	 1-52       3-165      3-169      60-2221    60-2229    166-7513   166-7523   181-8340   181-8362  
                         181-8368   182-8400   187-8652  
$TOP20	= 000001	#1-34       1-60       3-165      3-173     
$TRACK	  023210 RG	 122-5293   123-5362   124-5459   126-5533   127-5586   128-5640   130-5748   131-5791   134-5896  
                         136-5983   139-6078   150-6617   150-6674  #195-9067   229-10858  230-10890  231-10943  233-10996 
$TRB2F	  024244 RG	 99-4528    99-4528   #198-9399  
$TRB2I	  024506 RG	 201-9513   201-9513  #201-9517   202-9562   202-9562  
$TRB2O	  025700 RG	 65-2532    65-2532    66-2603    66-2603    99-4520    99-4520    195-9083   195-9083   198-9417  
                         198-9417   214-10082  214-10082 #214-10088 
$TRB2R	  026144 RG	 198-9407   198-9407   198-9409   198-9409   198-9411   198-9411   198-9414   198-9414  #218-10251 
$TRCRM	  024712 RG	 65-2560    65-2560   #204-9669  
$TRDRM	  025056 RG	 65-2558    65-2558   #205-9729  
$TRF2B	  024346 RG	 146-6381   146-6381   159-7217   159-7217   173-7856   173-7856   174-8050   174-8050  #199-9436  
$TRI2B	  024624 RG	 76-3365    76-3365    89-4116    89-4116    164-7424   164-7424  #202-9566  
$TRO2B	  025762 RG	 76-3293    76-3293    199-9459   199-9459  #215-10139 
$TRR2B	  026036 RG	 199-9441   199-9441   199-9443   199-9443   199-9445   199-9445   199-9452   199-9452  #217-10208 
$TTBEL	  026710 RG	#221-10447 
$TTDMS	  026766 RG	 65-2553    65-2553    65-2555    65-2555    76-3249    76-3249    76-3253    76-3253    176-8122  
                         176-8122   176-8126   176-8126   176-8146   176-8146   176-8158   176-8158   191-8966   191-8966  
                         205-9745   205-9745  #222-10495 
$TTDWR	  027100 RG	 210-9925   210-9925   211-9953   211-9953   214-10084  214-10084  222-10501 #222-10524 
$TTMSG	  027034 RG	 56-2076    57-2104    60-2218    63-2404    63-2404    64-2480    64-2480    65-2534    65-2573   
                         66-2612    69-2905    69-2923    76-3177    76-3177    76-3201    76-3330    76-3357    76-3389   
                         78-3495    78-3540    79-3595    79-3642    82-3816    83-3854    84-3880    84-3918    89-4071   
                         89-4077    89-4088    89-4106    89-4131    89-4135    99-4536    111-4949   112-4980   115-5077  
                         118-5172   130-5751   131-5799   134-5907   136-5985   139-6082   141-6145   144-6253   146-6387  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         146-6422   146-6468   147-6482   150-6648   152-6810   152-6821   152-6836   152-6843   153-6936  
                         159-7188   159-7227   160-7253   160-7264   161-7297   163-7384   163-7399   164-7412   164-7445  
                         166-7490   166-7501   169-7600   169-7600   169-7619   170-7703   170-7721   173-7817   173-7832  
                         174-7991   174-8008   174-8033   174-8069   174-8077   176-8147   176-8173   176-8178   182-8395  
                         182-8398   191-8926   191-8952   196-9272   196-9340  #222-10512  226-10758  230-10924  233-11035 
$TTRD 	  026330 RG	 76-3178    76-3178    76-3255    76-3255    76-3358    76-3358    89-4078    89-4078    89-4107   
                         89-4107    159-7189   159-7189   160-7254   160-7254   163-7385   163-7385   164-7413   164-7413  
                         166-7491   166-7491   169-7601   169-7601   173-7818   173-7818   174-7992   174-7992   202-9561  
                         202-9561  #220-10368 
$TTSPC	  026700 RG	 176-8138   176-8138  #221-10442 
$TTTAB	  026720 RG	#221-10459 
$TTWR 	  027114 RG	 176-8134   176-8134   176-8136   176-8136   191-8969   191-8969   191-8972   191-8972   204-9685  
                         204-9685   204-9697   204-9697   205-9752   205-9752   205-9768   205-9768   221-10474  221-10474 
                        #223-10542 
$T1091	= ******	 1-48      
$WCRAM	  011064 RG	 63-2369    63-2369    63-2390    63-2390    63-2431    63-2431   #122-5292   179-8260   179-8260  
                         179-8273  
$WDD22	  025324 RG	#210-9920  
$WDD36	  025436 RG	#211-9948  
$WDRAM	  012074 RG	 64-2453    64-2453    64-2507    64-2507   #126-5532  
$WRD22	  025354 RG	 195-9096   195-9096   210-9924   210-9924  #210-9929  
$WRD36	  025466 RG	 195-9111   195-9111   211-9952   211-9952  #211-9957  
$WRITB	  010612 RG	 69-2839    69-2839    70-2954    70-2954    70-2957    70-2957    72-3005    72-3005    72-3008   
                         72-3008    73-3040    73-3040    73-3047    73-3047    74-3068    74-3068    115-5071   115-5071  
                        #117-5127  
$WRITC	  010404 RG	 69-2829    69-2829    70-2948    70-2948    71-2979    71-2979    72-2999    72-2999    73-3034   
                         73-3034    74-3062    74-3062   #114-5037  
$WRITE	  010652 RG	 116-5105   116-5105   117-5132   117-5132  #118-5155   118-5169  
$WRITS	  010446 RG	 91-4216    91-4216   #115-5063  
$WRITW	  010516 RG	 69-2832    69-2832    70-2951    70-2951    70-2965    70-2965    71-2982    72-3002    72-3002   
                         72-3013    72-3013    73-3037    73-3037    74-3065    74-3065    74-3074    74-3074    114-5045  
                         114-5045  #116-5094  
$WTKL 	  030172 RG	 229-10868 #231-10942  233-11002  233-11002  233-11022  233-11022 
$XCDT 	  000206 RG	 52-1813    52-1813    53-1846    53-1846   #54-1878   
$ZERAC	  000112 RG	#53-1840    182-8389   182-8389   196-9275   196-9275  
$$    	= 000037	#52-1813    52-1813   #52-1820    52-1820   #53-1846    53-1846   #53-1852    53-1852   #54-1880   
                         54-1880   #54-1883    54-1883   #54-1886    54-1886   #54-1891    54-1891   #54-1896    54-1896   
                        #54-1902    54-1902   #54-1906    54-1906   #56-1988    56-1988   #56-2060    56-2060   #60-2216   
                         60-2216   #60-2237    60-2237   #60-2242    60-2242   #60-2248    60-2248   #61-2266    61-2266   
                        #62-2282    62-2282   #62-2287    62-2287   #62-2294    62-2294   #62-2297    62-2297   #62-2301   
                         62-2301   #62-2308    62-2308   #62-2314    62-2314   #62-2329    62-2329   #62-2340    62-2340   
                        #62-2343    62-2343   #62-2344    62-2344   #62-2345    62-2345   #63-2369    63-2369   #63-2374   
                         63-2374   #63-2380    63-2380   #63-2390    63-2390   #63-2400    63-2400   #63-2404    63-2404   
                        #63-2408    63-2408   #63-2413    63-2413   #63-2416    63-2416   #63-2426    63-2426   #63-2431   
                         63-2431   #64-2447    64-2447   #64-2453    64-2453   #64-2457    64-2457   #64-2476    64-2476   
                        #64-2480    64-2480   #64-2484    64-2484   #64-2489    64-2489   #64-2492    64-2492   #64-2502   
                         64-2502   #64-2507    64-2507   #65-2532    65-2532   #65-2553    65-2553   #65-2555    65-2555   
                        #65-2558    65-2558   #65-2560    65-2560   #65-2561    65-2561   #65-2568    65-2568   #65-2574   
                         65-2574   #66-2594    66-2594   #66-2598    66-2598   #66-2603    66-2603   #69-2794    69-2794   
                        #69-2801    69-2801   #69-2809    69-2809   #69-2829    69-2829   #69-2832    69-2832   #69-2837   
                         69-2837   #69-2839    69-2839   #69-2863    69-2863   #69-2874    69-2874   #69-2883    69-2883   
                        #69-2888    69-2888   #69-2893    69-2893   #69-2896    69-2896   #69-2898    69-2898   #69-2903   
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         69-2903   #69-2921    69-2921   #70-2948    70-2948   #70-2951    70-2951   #70-2954    70-2954   
                        #70-2957    70-2957   #70-2965    70-2965   #71-2979    71-2979   #72-2999    72-2999   #72-3002   
                         72-3002   #72-3005    72-3005   #72-3008    72-3008   #72-3013    72-3013   #73-3034    73-3034   
                        #73-3037    73-3037   #73-3040    73-3040   #73-3047    73-3047   #74-3062    74-3062   #74-3065   
                         74-3065   #74-3068    74-3068   #74-3074    74-3074   #76-3177    76-3177   #76-3178    76-3178   
                        #76-3249    76-3249   #76-3251    76-3251   #76-3253    76-3253   #76-3254    76-3254   #76-3255   
                         76-3255   #76-3293    76-3293   #76-3310    76-3310   #76-3315    76-3315   #76-3358    76-3358   
                        #76-3365    76-3365   #79-3602    79-3602   #81-3727    81-3727   #81-3732    81-3732   #81-3737   
                         81-3737   #82-3768    82-3768   #82-3770    82-3770   #82-3778    82-3778   #82-3784    82-3784   
                        #82-3792    82-3792   #82-3796    82-3796   #84-3894    84-3894   #84-3898    84-3898   #84-3906   
                         84-3906   #84-3908    84-3908   #85-3937    85-3937   #87-4007    87-4007   #87-4010    87-4010   
                        #89-4078    89-4078   #89-4107    89-4107   #89-4116    89-4116   #91-4216    91-4216   #96-4400   
                         96-4400   #96-4409    96-4409   #99-4520    99-4520   #99-4528    99-4528   #99-4535    99-4535   
                        #102-4616   102-4616  #102-4636   102-4636  #104-4702   104-4702  #106-4792   106-4792  #108-4857  
                         108-4857  #109-4881   109-4881  #110-4913   110-4913  #111-4939   111-4939  #114-5045   114-5045  
                        #115-5071   115-5071  #116-5105   116-5105  #117-5132   117-5132  #118-5168   118-5168  #122-5295  
                         122-5295  #122-5334   122-5334  #123-5363   123-5363  #123-5366   123-5366  #123-5373   123-5373  
                        #123-5428   123-5428  #124-5460   124-5460  #124-5463   124-5463  #124-5465   124-5465  #124-5471  
                         124-5471  #124-5473   124-5473  #126-5538   126-5538  #126-5541   126-5541  #126-5544   126-5544  
                        #126-5563   126-5563  #127-5590   127-5590  #127-5593   127-5593  #127-5597   127-5597  #127-5605  
                         127-5605  #127-5618   127-5618  #128-5663   128-5663  #128-5667   128-5667  #130-5734   130-5734  
                        #130-5740   130-5740  #130-5741   130-5741  #131-5773   131-5773  #131-5778   131-5778  #131-5787  
                         131-5787  #131-5788   131-5788  #132-5821   132-5821  #132-5824   132-5824  #132-5827   132-5827  
                        #136-5969   136-5969  #137-6007   137-6007  #141-6141   141-6141  #141-6155   141-6155  #141-6157  
                         141-6157  #141-6163   141-6163  #141-6165   141-6165  #141-6171   141-6171  #141-6177   141-6177  
                        #144-6249   144-6249  #144-6262   144-6262  #144-6265   144-6265  #144-6270   144-6270  #144-6277  
                         144-6277  #144-6280   144-6280  #144-6283   144-6283  #144-6298   144-6298  #144-6301   144-6301  
                        #144-6309   144-6309  #146-6376   146-6376  #146-6381   146-6381  #146-6383   146-6383  #146-6414  
                         146-6414  #146-6429   146-6429  #146-6442   146-6442  #146-6449   146-6449  #146-6455   146-6455  
                        #146-6464   146-6464  #147-6487   147-6487  #147-6517   147-6517  #150-6619   150-6619  #150-6622  
                         150-6622  #150-6626   150-6626  #150-6633   150-6633  #150-6638   150-6638  #150-6643   150-6643  
                        #150-6646   150-6646  #150-6655   150-6655  #150-6665   150-6665  #150-6678   150-6678  #153-6903  
                         153-6903  #153-6917   153-6917  #153-6924   153-6924  #157-7027   157-7027  #157-7031   157-7031  
                        #157-7036   157-7036  #157-7040   157-7040  #157-7045   157-7045  #157-7063   157-7063  #159-7189  
                         159-7189  #159-7204   159-7204  #159-7217   159-7217  #160-7254   160-7254  #160-7276   160-7276  
                        #161-7288   161-7288  #161-7303   161-7303  #161-7309   161-7309  #161-7313   161-7313  #161-7318  
                         161-7318  #161-7321   161-7321  #161-7328   161-7328  #161-7337   161-7337  #163-7385   163-7385  
                        #164-7413   164-7413  #164-7424   164-7424  #166-7491   166-7491  #169-7586   169-7586  #169-7600  
                         169-7600  #169-7601   169-7601  #170-7668   170-7668  #170-7669   170-7669  #170-7681   170-7681  
                        #170-7689   170-7689  #170-7707   170-7707  #170-7712   170-7712  #170-7714   170-7714  #170-7715  
                         170-7715  #170-7716   170-7716  #170-7725   170-7725  #173-7818   173-7818  #173-7850   173-7850  
                        #173-7856   173-7856  #174-7992   174-7992  #174-8024   174-8024  #174-8029   174-8029  #174-8044  
                         174-8044  #174-8050   174-8050  #174-8057   174-8057  #174-8058   174-8058  #174-8059   174-8059  
                        #174-8060   174-8060  #174-8062   174-8062  #174-8066   174-8066  #176-8110   176-8110  #176-8114  
                         176-8114  #176-8122   176-8122  #176-8124   176-8124  #176-8126   176-8126  #176-8134   176-8134  
                        #176-8136   176-8136  #176-8138   176-8138  #176-8144   176-8144  #176-8146   176-8146  #176-8158  
                         176-8158  #176-8163   176-8163  #177-8192   177-8192  #177-8215   177-8215  #178-8232   178-8232  
                        #178-8234   178-8234  #179-8253   179-8253  #179-8257   179-8257  #179-8260   179-8260  #179-8263  
                         179-8263  #179-8265   179-8265  #179-8269   179-8269  #180-8296   180-8296  #180-8299   180-8299  
                        #180-8302   180-8302  #182-8387   182-8387  #182-8389   182-8389  #182-8390   182-8390  #182-8392  
                         182-8392  #182-8396   182-8396  #184-8467   184-8467  #184-8475   184-8475  #184-8480   184-8480  
                        #184-8483   184-8483  #191-8868   191-8868  #191-8871   191-8871  #191-8878   191-8878  #191-8881  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         191-8881  #191-8884   191-8884  #191-8896   191-8896  #191-8908   191-8908  #191-8911   191-8911  
                        #191-8937   191-8937  #191-8941   191-8941  #191-8944   191-8944  #191-8951   191-8951  #191-8959  
                         191-8959  #191-8966   191-8966  #191-8969   191-8969  #191-8972   191-8972  #191-8973   191-8973  
                        #195-9083   195-9083  #195-9096   195-9096  #195-9111   195-9111  #196-9229   196-9229  #196-9241  
                         196-9241  #196-9245   196-9245  #196-9248   196-9248  #196-9252   196-9252  #196-9255   196-9255  
                        #196-9258   196-9258  #196-9275   196-9275  #196-9280   196-9280  #196-9289   196-9289  #196-9317  
                         196-9317  #196-9323   196-9323  #196-9327   196-9327  #196-9330   196-9330  #196-9337   196-9337  
                        #196-9341   196-9341  #198-9407   198-9407  #198-9409   198-9409  #198-9411   198-9411  #198-9414  
                         198-9414  #198-9417   198-9417  #199-9441   199-9441  #199-9443   199-9443  #199-9445   199-9445  
                        #199-9452   199-9452  #199-9459   199-9459  #201-9513   201-9513  #202-9561   202-9561  #202-9562  
                         202-9562  #204-9670   204-9670  #204-9677   204-9677  #204-9680   204-9680  #204-9685   204-9685  
                        #204-9693   204-9693  #204-9694   204-9694  #204-9697   204-9697  #205-9730   205-9730  #205-9745  
                         205-9745  #205-9749   205-9749  #205-9752   205-9752  #205-9764   205-9764  #205-9768   205-9768  
                        #210-9924   210-9924  #210-9925   210-9925  #210-9931   210-9931  #210-9935   210-9935  #210-9937  
                         210-9937  #211-9952   211-9952  #211-9953   211-9953  #211-9959   211-9959  #211-9962   211-9962  
                        #211-9964   211-9964  #211-9969   211-9969  #211-9971   211-9971  #214-10082  214-10082 #214-10084 
                         214-10084 #220-10377  220-10377 #220-10387  220-10387 #220-10393  220-10393 #220-10424  220-10424 
                        #221-10474  221-10474 #222-10496  222-10496 #222-10519  222-10519 #222-10521  222-10521 #223-10546 
                         223-10546 #223-10553  223-10553 #223-10557  223-10557 #225-10680  225-10680 #225-10690  225-10690 
                        #225-10697  225-10697 #225-10716  225-10716 #226-10727  226-10727 #226-10730  226-10730 #226-10745 
                         226-10745 #226-10752  226-10752 #226-10756  226-10756 #227-10775  227-10775 #227-10783  227-10783 
                        #227-10787  227-10787 #229-10859  229-10859 #229-10862  229-10862 #229-10865  229-10865 #230-10897 
                         230-10897 #230-10900  230-10900 #230-10903  230-10903 #230-10908  230-10908 #230-10910  230-10910 
                        #231-10947  231-10947 #232-10972  232-10972 #232-10974  232-10974 #233-10999  233-10999 #233-11002 
                         233-11002 #233-11007  233-11007 #233-11009  233-11009 #233-11016  233-11016 #233-11019  233-11019 
                        #233-11022  233-11022 #233-11026  233-11026 #233-11029  233-11029 #234-11059  234-11059 #234-11064 
                         234-11064 #234-11069  234-11069 #234-11075  234-11075 #234-11084  234-11084 #235-11107  235-11107 
                        #235-11115  235-11115 #235-11118  235-11118 #235-11121  235-11121 #235-11131  235-11131 #235-11137 
                         235-11137 
$$APRI	= 000000	#11-558    
$$RDER	= 000004	#11-560    
$$SBDI	= 000004	#11-556    
$$$ARG	= 000006	#90-4178    90-4178   #90-4179    90-4179   #90-4179    90-4179   #90-4179    90-4179   #92-4263   
                         92-4263   #92-4263    92-4263   #92-4263    92-4263   #92-4263    92-4263   #92-4263    92-4263   
                        #92-4263    92-4263   #92-4263    92-4263   #92-4264    92-4264   #92-4264    92-4264   #92-4265   
                         92-4265   #92-4265    92-4265   #92-4265    92-4265   #92-4265    92-4265   #92-4265    92-4265   
                        #92-4265    92-4265   #92-4265    92-4265   #101-4593   101-4593  #101-4593   101-4593  #101-4593  
                         101-4593  #101-4593   101-4593  #101-4593   101-4593  #101-4593   101-4593  #101-4593   101-4593  
                        #101-4594   101-4594  #101-4594   101-4594  #101-4594   101-4594  #101-4594   101-4594  #101-4594  
                         101-4594  #101-4594   101-4594  #101-4595   101-4595  #101-4595   101-4595  #101-4595   101-4595  
                        #101-4595   101-4595  #101-4595   101-4595  #101-4595   101-4595  #101-4595   101-4595  #103-4679  
                         103-4679  #103-4679   103-4679  #103-4679   103-4679  #103-4679   103-4679  #103-4679   103-4679  
                        #103-4680   103-4680  #103-4680   103-4680  #103-4680   103-4680  #103-4680   103-4680  #103-4680  
                         103-4680  #103-4680   103-4680  #103-4680   103-4680  #103-4681   103-4681  #103-4681   103-4681  
                        #103-4681   103-4681  #103-4681   103-4681  #103-4681   103-4681  #103-4681   103-4681  #103-4682  
                         103-4682  #105-4767   105-4767  #105-4768   105-4768  #105-4769   105-4769  #105-4770   105-4770  
                        #105-4770   105-4770  #105-4770   105-4770  #105-4770   105-4770  #105-4770   105-4770  #105-4770  
                         105-4770  #105-4770   105-4770  #112-4971   112-4971   112-4971   112-4971   112-4971   112-4971  
                         112-4971   112-4971   112-4971   112-4971   112-4971   112-4971  #118-5156   118-5156   118-5156  
                         118-5156   118-5156   118-5156   118-5156   118-5156   118-5156   118-5156   118-5156   118-5156  
                        #119-5209   119-5209  #119-5209   119-5209  #119-5209   119-5209  #119-5209   119-5209  #119-5209  
                         119-5209  #151-6748   151-6748  #151-6748   151-6748  #151-6748   151-6748  #151-6750   151-6750  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #151-6750   151-6750  #151-6750   151-6750  #151-6753   151-6753  #151-6753   151-6753  #151-6753  
                         151-6753  #151-6756   151-6756  #151-6756   151-6756  #151-6756   151-6756  #151-6758   151-6758  
                        #151-6758   151-6758  #151-6758   151-6758  #151-6760   151-6760  #151-6760   151-6760  #151-6760  
                         151-6760  #152-6816   152-6816   152-6816   152-6816   152-6816   152-6816   152-6816   152-6816  
                         152-6816   152-6816   152-6816   152-6816  #186-8547   186-8547  #186-8547   186-8547  #186-8547  
                         186-8547  #186-8547   186-8547  #196-9262   196-9262   196-9262   196-9262   196-9262   196-9262  
                         196-9262   196-9262   196-9262   196-9262   196-9262  #219-10332  219-10332 #219-10332  219-10332 
                        #219-10332  219-10332 #219-10333  219-10333 #219-10333  219-10333 #219-10333  219-10333 #219-10333 
                         219-10333 #219-10334  219-10334 #219-10335  219-10335 
$$$GLB	= ******	 90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4179   
                         90-4179    90-4179    90-4179    90-4179    90-4179    90-4179    90-4179    92-4263    92-4263   
                         92-4263    92-4263    92-4263    92-4263    92-4263    92-4263    92-4264    92-4264    92-4264   
                         92-4264    92-4264    92-4264    92-4264    92-4264    92-4265    92-4265    92-4265    92-4265   
                         92-4265    92-4265    92-4265    92-4265    101-4592   101-4592   101-4592   101-4593   101-4593  
                         101-4593   101-4593   101-4593   101-4593   101-4593   101-4593   101-4594   101-4594   101-4594  
                         101-4594   101-4594   101-4594   101-4594   101-4594   101-4595   101-4595   101-4595   101-4595  
                         101-4595   101-4595   101-4595   101-4595   103-4678   103-4678   103-4678   103-4679   103-4679  
                         103-4679   103-4679   103-4679   103-4679   103-4679   103-4679   103-4680   103-4680   103-4680  
                         103-4680   103-4680   103-4680   103-4680   103-4680   103-4681   103-4681   103-4681   103-4681  
                         103-4681   103-4681   103-4681   103-4681   103-4682   103-4682   103-4682   103-4682   103-4682  
                         103-4682   103-4682   103-4682   105-4767   105-4767   105-4767   105-4767   105-4767   105-4767  
                         105-4767   105-4767   105-4768   105-4768   105-4768   105-4768   105-4768   105-4768   105-4768  
                         105-4768   105-4769   105-4769   105-4769   105-4769   105-4769   105-4769   105-4769   105-4769  
                         105-4770   105-4770   105-4770   105-4770   105-4770   105-4770   105-4770   105-4770   119-5209  
                         119-5209   119-5209   119-5209   119-5209   119-5209   119-5209   119-5209   151-6748   151-6748  
                         151-6748   151-6748   151-6750   151-6750   151-6750   151-6750   151-6753   151-6753   151-6753  
                         151-6753   151-6756   151-6756   151-6756   151-6756   151-6758   151-6758   151-6758   151-6758  
                         151-6760   151-6760   151-6760   151-6760   173-7933   173-7933   173-7933   173-7933   173-7933  
                         186-8547   186-8547   186-8547   186-8547   186-8547   186-8547   186-8547   186-8547   219-10332 
                         219-10332  219-10332  219-10332  219-10332  219-10332  219-10332  219-10332  219-10333  219-10333 
                         219-10333  219-10333  219-10333  219-10333  219-10333  219-10333  219-10334  219-10334  219-10334 
                         219-10334  219-10334  219-10334  219-10334  219-10334  219-10335  219-10335  219-10335  219-10335 
                         219-10335  219-10335  219-10335  219-10335 
$$$OST	= 000014	#90-4178    90-4178    90-4178   #90-4178    90-4178    90-4178   #90-4178    90-4178    90-4178   
                        #90-4178    90-4178    90-4178   #90-4178    90-4178    90-4178   #90-4178    90-4178    90-4178   
                        #90-4178    90-4178   #90-4179    90-4179    90-4179   #90-4179    90-4179    90-4179   #90-4179   
                         90-4179    90-4179   #90-4179    90-4179    90-4179   #90-4179    90-4179    90-4179   #90-4179   
                         90-4179    90-4179   #90-4179    90-4179   #92-4263    92-4263    92-4263   #92-4263    92-4263   
                         92-4263   #92-4263    92-4263    92-4263   #92-4263    92-4263    92-4263   #92-4263    92-4263   
                         92-4263   #92-4263    92-4263    92-4263   #92-4263    92-4263   #92-4264    92-4264    92-4264   
                        #92-4264    92-4264    92-4264   #92-4264    92-4264    92-4264   #92-4264    92-4264    92-4264   
                        #92-4264    92-4264    92-4264   #92-4264    92-4264    92-4264   #92-4264    92-4264   #92-4265   
                         92-4265    92-4265   #92-4265    92-4265    92-4265   #92-4265    92-4265    92-4265   #92-4265   
                         92-4265    92-4265   #92-4265    92-4265    92-4265   #92-4265    92-4265    92-4265   #92-4265   
                         92-4265   #101-4592   101-4592   101-4592  #101-4592   101-4592   101-4592  #101-4592  #101-4593  
                         101-4593   101-4593  #101-4593   101-4593   101-4593  #101-4593   101-4593   101-4593  #101-4593  
                         101-4593   101-4593  #101-4593   101-4593   101-4593  #101-4593   101-4593   101-4593  #101-4593  
                         101-4593  #101-4594   101-4594   101-4594  #101-4594   101-4594   101-4594  #101-4594   101-4594  
                         101-4594  #101-4594   101-4594   101-4594  #101-4594   101-4594   101-4594  #101-4594   101-4594  
                         101-4594  #101-4594   101-4594  #101-4595   101-4595   101-4595  #101-4595   101-4595   101-4595  
                        #101-4595   101-4595   101-4595  #101-4595   101-4595   101-4595  #101-4595   101-4595   101-4595  
                        #101-4595   101-4595   101-4595  #101-4595   101-4595  #103-4678   103-4678   103-4678  #103-4678  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         103-4678   103-4678  #103-4678  #103-4679   103-4679   103-4679  #103-4679   103-4679   103-4679  
                        #103-4679   103-4679   103-4679  #103-4679   103-4679   103-4679  #103-4679   103-4679   103-4679  
                        #103-4679   103-4679   103-4679  #103-4679   103-4679  #103-4680   103-4680   103-4680  #103-4680  
                         103-4680   103-4680  #103-4680   103-4680   103-4680  #103-4680   103-4680   103-4680  #103-4680  
                         103-4680   103-4680  #103-4680   103-4680   103-4680  #103-4680   103-4680  #103-4681   103-4681  
                         103-4681  #103-4681   103-4681   103-4681  #103-4681   103-4681   103-4681  #103-4681   103-4681  
                         103-4681  #103-4681   103-4681   103-4681  #103-4681   103-4681   103-4681  #103-4681   103-4681  
                        #103-4682   103-4682   103-4682  #103-4682   103-4682   103-4682  #103-4682   103-4682   103-4682  
                        #103-4682   103-4682   103-4682  #103-4682   103-4682   103-4682  #103-4682   103-4682   103-4682  
                        #103-4682   103-4682  #105-4767   105-4767   105-4767  #105-4767   105-4767   105-4767  #105-4767  
                         105-4767   105-4767  #105-4767   105-4767   105-4767  #105-4767   105-4767   105-4767  #105-4767  
                         105-4767   105-4767  #105-4767   105-4767  #105-4768   105-4768   105-4768  #105-4768   105-4768  
                         105-4768  #105-4768   105-4768   105-4768  #105-4768   105-4768   105-4768  #105-4768   105-4768  
                         105-4768  #105-4768   105-4768   105-4768  #105-4768   105-4768  #105-4769   105-4769   105-4769  
                        #105-4769   105-4769   105-4769  #105-4769   105-4769   105-4769  #105-4769   105-4769   105-4769  
                        #105-4769   105-4769   105-4769  #105-4769   105-4769   105-4769  #105-4769   105-4769  #105-4770  
                         105-4770   105-4770  #105-4770   105-4770   105-4770  #105-4770   105-4770   105-4770  #105-4770  
                         105-4770   105-4770  #105-4770   105-4770   105-4770  #105-4770   105-4770   105-4770  #105-4770  
                         105-4770  #119-5209   119-5209   119-5209  #119-5209   119-5209   119-5209  #119-5209   119-5209  
                         119-5209  #119-5209   119-5209   119-5209  #119-5209   119-5209   119-5209  #119-5209   119-5209  
                         119-5209  #119-5209   119-5209  #151-6748   151-6748   151-6748  #151-6748   151-6748   151-6748  
                        #151-6748   151-6748   151-6748  #151-6748  #151-6750   151-6750   151-6750  #151-6750   151-6750  
                         151-6750  #151-6750   151-6750   151-6750  #151-6750  #151-6753   151-6753   151-6753  #151-6753  
                         151-6753   151-6753  #151-6753   151-6753   151-6753  #151-6753  #151-6756   151-6756   151-6756  
                        #151-6756   151-6756   151-6756  #151-6756   151-6756   151-6756  #151-6756  #151-6758   151-6758  
                         151-6758  #151-6758   151-6758   151-6758  #151-6758   151-6758   151-6758  #151-6758  #151-6760  
                         151-6760   151-6760  #151-6760   151-6760   151-6760  #151-6760   151-6760   151-6760  #151-6760  
                        #173-7933   173-7933   173-7933  #173-7933   173-7933   173-7933  #173-7933   173-7933   173-7933  
                        #173-7933   173-7933   173-7933  #173-7933  #186-8547   186-8547   186-8547  #186-8547   186-8547  
                         186-8547  #186-8547   186-8547   186-8547  #186-8547   186-8547   186-8547  #186-8547   186-8547  
                         186-8547  #186-8547   186-8547   186-8547  #186-8547   186-8547  #219-10332  219-10332  219-10332 
                        #219-10332  219-10332  219-10332 #219-10332  219-10332  219-10332 #219-10332  219-10332  219-10332 
                        #219-10332  219-10332  219-10332 #219-10332  219-10332  219-10332 #219-10332  219-10332 #219-10333 
                         219-10333  219-10333 #219-10333  219-10333  219-10333 #219-10333  219-10333  219-10333 #219-10333 
                         219-10333  219-10333 #219-10333  219-10333  219-10333 #219-10333  219-10333  219-10333 #219-10333 
                         219-10333 #219-10334  219-10334  219-10334 #219-10334  219-10334  219-10334 #219-10334  219-10334 
                         219-10334 #219-10334  219-10334  219-10334 #219-10334  219-10334  219-10334 #219-10334  219-10334 
                         219-10334 #219-10334  219-10334 #219-10335  219-10335  219-10335 #219-10335  219-10335  219-10335 
                        #219-10335  219-10335  219-10335 #219-10335  219-10335  219-10335 #219-10335  219-10335  219-10335 
                        #219-10335  219-10335  219-10335 #219-10335  219-10335 
$$$T1 	= 000014	#112-4971   112-4971  #118-5156   118-5156  #151-6748   151-6748   151-6748  #151-6748   151-6748  
                         151-6748  #151-6748   151-6748   151-6748  #151-6750   151-6750   151-6750  #151-6750   151-6750  
                         151-6750  #151-6750   151-6750   151-6750  #151-6753   151-6753   151-6753  #151-6753   151-6753  
                         151-6753  #151-6753   151-6753   151-6753  #151-6756   151-6756   151-6756  #151-6756   151-6756  
                         151-6756  #151-6756   151-6756   151-6756  #151-6758   151-6758   151-6758  #151-6758   151-6758  
                         151-6758  #151-6758   151-6758   151-6758  #151-6760   151-6760   151-6760  #151-6760   151-6760  
                         151-6760  #151-6760   151-6760   151-6760  #152-6816   152-6816  
.BRCLK	= 005000	#4-187     #8-464      235-11120  235-11139 
.BTADR	  000514 RG	#189-8765   196-9334  *226-10729 *226-10732  227-10768  227-10769  227-10771  227-10779  227-10781 
.BTSW 	  000046 RG	 69-2779    69-2847    69-2886   *69-2906    70-2953   *159-7182  *159-7209  *159-7222   160-7274  
                        *161-7299  *161-7320  #187-8630   196-9293   196-9332  
.CACHN	  000063 RG	 56-1996    56-2043    57-2096    73-3044    141-6147   141-6170   164-7428  #188-8675  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 26

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.CASW 	  000041 RG	 87-4003    163-7378   169-7624  *177-8206  *177-8209   184-8470  #187-8619   191-8933   196-9285  
.CECLK	= 004000	#4-187     #8-464      54-1901    149-6583   149-6595   233-11028 
.CFGTB	  000132 RG	 72-3011   *76-3234    76-3348    76-3375   *78-3563   *79-3663    82-3762   *82-3777   *82-3795   
                         83-3832   *83-3841    84-3884   *84-3893   *84-3909   *89-4101   *89-4139    144-6241  *144-6286  
                         171-7738  #188-8700  
.CFMRV	  000232 RG	*169-7585  *169-7649   169-7651   170-7688  #188-8702  
.CKSW 	  000037 RG	 137-5997  *139-6071  *139-6074  *139-6081  #187-8614  
.CLRMR	= 006000	#4-187     #8-464      149-6584   149-6596  
.CLRUN	= 010000	#4-187     #8-464      150-6618   178-8233   233-10998 
.COMEF	= ******  GX	 152-6832  *152-6840  *196-9247   196-9264  
.CONBT	= 012000	#4-187     #8-464      54-1882    180-8298   191-8883   196-9257   229-10861  230-10902 
.CPUSN	= ******  GX	 152-6841  *152-6842  *174-8082   176-8111   176-8123  *176-8179   177-8203  
.CSDN 	  000030 RG	*180-8293  #187-8597  
.CSHRG	= 164000	#4-187     #8-464     
.CTLTP	  000070 RG	 72-2996    72-3007    82-3766    82-3782   *144-6242  *144-6245  *144-6282   144-6289  *171-7740  
                        #188-8696  
.DATE3	= ******  GX	*152-6781   176-8118  
.DBSW 	  000033 RG	*159-7183  *174-8041  #187-8604  
.DCSW 	  000031 RG	 69-2784    69-2856    69-2872   *69-2909    141-6138  *141-6146  *163-7380  *163-7407  *164-7441  
                        *164-7443  #187-8599   191-8906  
.DESW 	  000040 RG	 132-5819  *132-5834  *137-5996  *139-6072  *139-6075  #187-8616  
.DFBLK	  000254 RG	 133-5869   135-5944   138-6045  #189-8721  
.DFRBK	  000262 RG	 134-5896   134-5898   153-6919   157-7029   157-7038   157-7047  #189-8724  
.DFRG1	  000270 RG	#189-8727  
.DFRG2	  000272 RG	#189-8729  
.DFRG3	  000276 RG	#189-8733  
.DFSTA	  000274 RG	#189-8731  
.DFWBK	  000254 RG	 136-5973   136-5983  #189-8722  
.DLGSW	  000024 RG	 81-3742    82-3821    83-3856    84-3922   *152-6778  *152-6786   152-6830   159-7185   160-7250  
                         161-7292   163-7381   166-7486   169-7591   170-7690   173-7813   174-7984  *174-7986  *174-8015  
                         174-8031   176-8116  #187-8588   191-8946  *191-8955  *191-8975   225-10674 
.DMSW 	  000032 RG	 69-2786    69-2821    69-2877   *69-2911    76-3175    76-3346   *81-3721    81-3740   *81-3741   
                        *81-3747   *82-3820   *83-3855   *84-3921    89-4075    89-4104   *144-6255  *169-7584  *169-7658  
                         170-7679   170-7683   170-7709  #187-8602  
.DREG 	  000270 RG	 133-5869   135-5944   138-6045   189-8718  #189-8726  *192-9012   192-9016  
.DRLTC	= 015000	#4-187     #8-464      127-5592  
.DRSW 	  000027 RG	 63-2363    63-2377    63-2427    64-2450    64-2503    65-2570    66-2582   *173-7811  *173-7861  
                        #187-8594  
.DSACF	= 066000	#4-187     #8-464     
.DSIOJ	= 065000	#4-187     #8-464     
.DTEDT	  000300 RG	*150-6621  *150-6624   189-8717  #189-8736   192-9011  *192-9015  
.EASW 	  000042 RG	 60-2226    123-5437   176-8130   176-8169  *177-8217  *177-8220  #187-8622  
.EIOJA	= 067000	#4-187     #8-464      149-6585  
.ERCOD	  002672 RG	*157-7076  *157-7081  *157-7086  *157-7091  *157-7096  *157-7101  *157-7106  *157-7111  #190-8855  
                         196-9235   196-9244  
.FEMOD	= ******  GX	 152-6834  
.FILSW	  000045 RG	 69-2777   *160-7249  *160-7268  *160-7272  *174-7983  *174-8042  #187-8628  
.GFNR 	= 102000	#4-187     #8-464     
.HRDWR	= ******  GX	 176-8140   176-8150  
.INICL	= 070000	#4-187     #8-464      149-6580  
.IRLTC	= 014000	#4-187     #8-464      128-5669  
.KLERW	= ******  GX	 157-7020   157-7074   157-7079   157-7084   157-7089   157-7094   157-7099   157-7104   157-7109  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 27

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.KLFCF	= ******  GX	 191-8869   196-9233  
.KLISV	  000056 RG	*152-6779   152-6801   161-7294   163-7402   163-7405   166-7511   169-7587   169-7637   169-7655  
                        *170-7701  *170-7702   173-7836   173-7838   174-8022  #187-8663   191-8874   196-9237   196-9295  
                         225-10676  233-11014 
.KLITK	= ******  GX	*196-9269  
.KLIWD	= ******  GX	 152-6779  *152-6785   191-8863  *191-8865  
.KLREG	  000242 RG	#189-8714  *192-8997  *192-9001  *192-9005  *192-9009  *192-9011   192-9013  
.LCRDL	= 052000	#4-187     #8-464      124-5464  
.LCRDR	= 051000	#4-187     #8-464      124-5472  
.LCRM1	= 057000	#4-187     #8-464      121-5267  
.LCRM2	= 056000	#4-187     #8-464      121-5268  
.LCRM3	= 055000	#4-187     #8-464      121-5269  
.LCRM4	= 054000	#4-187     #8-464      121-5270  
.LCRM5	= 053000	#4-187     #8-464      122-5344  
.LDAR 	= 077000	#4-187     #8-464      54-1905    128-5666   232-10977 
.LDBRL	= 043000	#4-187     #8-464      149-6577   235-11117  235-11136 
.LDBRR	= 042000	#4-187     #8-464      149-6576   149-6581   235-11114  235-11130 
.LDCK1	= 046000	#4-187     #8-464      149-6573   184-8482   196-9326  
.LDCK2	= 047000	#4-187     #8-464      149-6574   184-8479   196-9322  
.LDDIS	= 045000	#4-187     #8-464      149-6578  
.LDRJD	= 064000	#4-187     #8-464      126-5556  
.LDRJV	= 063000	#4-187     #8-464      126-5559  
.LDRM1	= 060000	#4-187     #8-464      126-5558  
.LDRM2	= 061000	#4-187     #8-464      126-5555  
.LDRM3	= 062000	#4-187     #8-464      126-5550  
.LDSEL	= 044000	#4-187     #8-464      149-6570   150-6659  
.MCBFN	  000454 RG	 60-2236    62-2306    74-3071    173-7852  #189-8755  
.MCBSW	  000025 RG	 60-2214    60-2234   *62-2303    69-2781    69-2891   *69-2907    69-2928    74-3067   *173-7812  
                        *173-7860  #187-8590  
.MEMRS	= 076000	#4-187     #8-464      149-6586  
.MFCT 	  000044 RG	*144-6239  *144-6291   170-7692  #187-8626  
.MFSW 	  000043 RG	 150-6629   150-6661   169-7596   176-8171  *177-8211  *177-8214  #187-8624  
.NCACH	  000062 RG	 56-1990    56-2005    56-2044    57-2085    73-3031   *141-6153  *141-6175  *164-7440   184-8472  
                        #188-8673   191-8935   191-8939   196-9287  *225-10702 
.NOERR	= ******  GX	*178-8231  *182-8394  *191-8876  *191-8886  *196-9250  *196-9267  *196-9339  *196-9348  
.PCAB1	= 150000	#4-187     #8-464     
.PCAB2	= 151000	#4-187     #8-464     
.PCAB3	= 152000	#4-187     #8-464     
.PCAB4	= 153000	#4-187     #8-464     
.RCRM1	= 147000	#4-187     #8-464      121-5263  
.RCRM2	= 146000	#4-187     #8-464      121-5264  
.RCRM3	= 145000	#4-187     #8-464      121-5265  
.RCRM4	= 144000	#4-187     #8-464      121-5266  
.RCSPF	= 141000	#4-187     #8-464      123-5426  
.RDJ14	= 134000	#4-187     #8-464      127-5617  
.RDJ71	= 135000	#4-187     #8-464      127-5596  
.RDMAB	= 133000	#4-187     #8-464      127-5604  
.SECLK	= 003000	#4-187     #8-464      123-5365   179-8262  
.SETMR	= 007000	#4-187     #8-464      139-6069   149-6572   149-6592  
.SETRN	= 011000	#4-187     #8-464      191-8880   196-9254   230-10899 
.SNSAV	  000060 RG	*152-6841   174-8082  #187-8665  
.SPSAV	  000022 RG	#187-8586  *191-8867   191-8974  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 28

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.SSCLK	= 002000	#4-187     #8-464      54-1895    150-6642   230-10907  234-11074 
.STPCL	= 000000	#4-187     #8-464      137-6006   149-6571   149-6594   233-11025  235-11106 
.STRCL	= 001000	#4-187     #8-464      54-1908    62-2342    132-5823   139-6067   149-6579   149-6593   180-8301  
                         184-8484   196-9329   229-10864  230-10920  233-11018 
.SYATT	  002646 RG	 90-4181   *91-4212   *91-4213   *91-4214   *91-4215   *104-4725   114-5040  *114-5042  *120-5226  
                        *120-5227  #190-8832  
.SYFID	= 002614 RG	 92-4264    101-4594   103-4679   103-4681  #190-8824  
.SYFNB	  002614 RG	 92-4263    92-4265    97-4437    101-4593   101-4595   103-4680   105-4770   152-6816   152-6824  
                        *152-6824   152-6825  *152-6825   152-6826  *152-6826  #190-8815   190-8824   190-8825  
.SYFNM	= 002622 RG	#190-8825  
.SYIBA	  000532 RG	*109-4885   110-4903  *110-4906   110-4916  *110-4917   111-4942  *111-4943  *112-4975  #190-8782  
.SYIBC	  000534 RG	 109-4878   109-4880  *109-4886  *110-4907   110-4911  *110-4918   111-4937  *111-4944  *112-4976  
                        #190-8784  
.SYIBF	  000562 RG	 101-4592   102-4619   102-4620   112-4971   112-4975   190-8783  #190-8792   190-8799  
.SYIFN	  000536 RG	 91-4225    101-4597   101-4599  *102-4619  *102-4620  #190-8786  
.SYIRC	  000530 RG	 62-2335    63-2397    64-2473    69-2827    69-2835   *102-4632   108-4853  *108-4856  *108-4859  
                         109-4878  *109-4880   109-4885   109-4886  *109-4887  *110-4905  *110-4909  *111-4935   147-6509  
                        #190-8780   226-10733  227-10791 
.SYISW	  000526 RG	 91-4200   *91-4206   *102-4629   106-4782  *106-4785  #190-8774  
.SYIVB	  000556 RG	*102-4630  *102-4631  *112-4966  *112-4967   112-4971   112-4971  #190-8790  
.SYOBA	  001564 RG	 91-4214   *104-4722   116-5095  *116-5098   116-5108  *116-5109   117-5135  *117-5136  *118-5162  
                        #190-8798  
.SYOBC	  001566 RG	*104-4723   115-5067  *116-5099   116-5103  *116-5110   117-5130  *117-5137  *118-5163  #190-8800  
.SYOBF	  001614 RG	 91-4215    103-4678   104-4705   104-4706   104-4722   118-5156   118-5162  #190-8808  
.SYOFN	  001570 RG	 90-4183    90-4185    91-4227    103-4684   103-4686  *104-4705  *104-4706   106-4791   120-5230  
                        #190-8802  
.SYORC	  001562 RG	 70-2959   *104-4724   114-5038  *114-5044  *114-5047   115-5064  *115-5069  *116-5097  *116-5101  
                        *117-5128  #190-8796  
.SYOSW	  000527 RG	 91-4207   *91-4222   *104-4719   106-4786  *106-4795  #190-8776  
.SYOVB	  001610 RG	 91-4212    91-4213   *104-4720  *104-4721   118-5156   118-5156  *118-5160  *118-5161  #190-8806  
.SYSTA	  000522 RG	 60-2246    69-2796    90-4178    90-4179    91-4204    91-4220    92-4263    92-4264    92-4265   
                         96-4403    96-4407    96-4412    99-4506    101-4593   101-4594   102-4623   102-4627   102-4634  
                         102-4638   103-4679   103-4680   103-4681   104-4709   104-4713   104-4717   112-4971   112-4973  
                         112-4976   118-5156   118-5158   118-5166   119-5209   120-5224   141-6143   144-6251   146-6385  
                         152-6816   152-6818   161-7290  #190-8772   225-10703 
.TKTN 	= ******  GX	*196-9268  
.TPSHI	  015730 RG	 153-6924   153-6924  #154-6941   157-7031   157-7031   157-7040   157-7040  
.TRKLP	  000036 RG	#187-8611   195-9117   220-10417 *220-10419  220-10426 *220-10428  220-10430  224-10576 
.TRKSW	  000034 RG	#187-8607   195-9070  *220-10413 *220-10434 
.TRKTT	  000035 RG	#187-8609   195-9121  *220-10412 *220-10415  220-10432 
.TTIBF	  000302 RG	 76-3179    76-3256    76-3359    89-4079    89-4109    159-7190   160-7255   163-7386   164-7414  
                         166-7492   169-7602   173-7819   174-7993  #189-8744   202-9560   219-10332 *220-10399  220-10401 
                         220-10403  220-10405  220-10407  224-10573 
.TTOBF	  000342 RG	#189-8747   201-9511   204-9675   204-9683   204-9692   204-9695   205-9748   205-9750   205-9763  
                         205-9766   210-9922   211-9950   214-10080  222-10497  222-10515 
.UFNSW	  000026 RG	 70-2944    70-2956   *159-7184  *159-7220  *161-7286  *161-7323  *161-7332  *174-8043  *174-8054  
                        #187-8592   225-10686 
.USRFN	  000474 RG	 70-2962    146-6379   159-7213   161-7326   174-8046  #189-8760   225-10688 
.WORK 	  000014 RG	#187-8579  
.WRITR	= ******  GX	 223-10553  223-10553 
.WRMBX	= 071000	#4-187     #8-464      149-6587  
.ZERO 	  000000 RG	 53-1849    56-2059    63-2367    135-5945   149-6570   149-6573   149-6574   149-6576   149-6577  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 29

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         149-6578   149-6580   149-6581   149-6585   149-6586  #187-8576   196-9310   196-9316   226-10743 
                         227-10773 
..DSEV	= ******  GX	 196-9248   196-9248  
..DTP2	= ******  GX	 182-8396   182-8396   196-9341   196-9341  
..DTSP	= ******  GX	 178-8232   178-8232  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 30

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$ 		#151-6718   151-6748   151-6750   151-6753   151-6756   151-6758   151-6760  
BURST 		#24-984    
CALL  		#4-242     #9-466      52-1813    52-1820    53-1846    53-1852    54-1880    54-1883    54-1886    54-1891   
                 54-1896    54-1902    54-1906    56-1988    56-2060    60-2216    60-2237    60-2242    60-2248    61-2266   
                 62-2282    62-2287    62-2294    62-2297    62-2301    62-2308    62-2314    62-2329    62-2340    62-2343   
                 62-2344    62-2345    63-2369    63-2374    63-2380    63-2390    63-2400    63-2404    63-2408    63-2413   
                 63-2416    63-2426    63-2431    64-2447    64-2453    64-2457    64-2476    64-2480    64-2484    64-2489   
                 64-2492    64-2502    64-2507    65-2532    65-2553    65-2555    65-2558    65-2560    65-2561    65-2568   
                 65-2574    66-2594    66-2598    66-2603    69-2794    69-2801    69-2809    69-2829    69-2832    69-2837   
                 69-2839    69-2863    69-2874    69-2883    69-2888    69-2893    69-2896    69-2898    69-2903    69-2921   
                 70-2948    70-2951    70-2954    70-2957    70-2965    71-2979    72-2999    72-3002    72-3005    72-3008   
                 72-3013    73-3034    73-3037    73-3040    73-3047    74-3062    74-3065    74-3068    74-3074    76-3177   
                 76-3178    76-3249    76-3251    76-3253    76-3254    76-3255    76-3293    76-3310    76-3315    76-3358   
                 76-3365    79-3602    81-3727    81-3732    81-3737    82-3768    82-3770    82-3778    82-3784    82-3792   
                 82-3796    84-3894    84-3898    84-3906    84-3908    85-3937    87-4007    87-4010    89-4078    89-4107   
                 89-4116    91-4216    96-4400    96-4409    99-4520    99-4528    99-4535    102-4616   102-4636   104-4702  
                 106-4792   108-4857   109-4881   110-4913   111-4939   114-5045   115-5071   116-5105   117-5132   118-5168  
                 122-5295   122-5334   123-5363   123-5366   123-5373   123-5428   124-5460   124-5463   124-5465   124-5471  
                 124-5473   126-5538   126-5541   126-5544   126-5563   127-5590   127-5593   127-5597   127-5605   127-5618  
                 128-5663   128-5667   130-5734   130-5740   130-5741   131-5773   131-5778   131-5787   131-5788   132-5821  
                 132-5824   132-5827   136-5969   137-6007   141-6141   141-6155   141-6157   141-6163   141-6165   141-6171  
                 141-6177   144-6249   144-6262   144-6265   144-6270   144-6277   144-6280   144-6283   144-6298   144-6301  
                 144-6309   146-6376   146-6381   146-6383   146-6414   146-6429   146-6442   146-6449   146-6455   146-6464  
                 147-6487   147-6517   150-6619   150-6622   150-6626   150-6633   150-6638   150-6643   150-6646   150-6655  
                 150-6665   150-6678   153-6903   153-6917   153-6924   157-7027   157-7031   157-7036   157-7040   157-7045  
                 157-7063   159-7189   159-7204   159-7217   160-7254   160-7276   161-7288   161-7303   161-7309   161-7313  
                 161-7318   161-7321   161-7328   161-7337   163-7385   164-7413   164-7424   166-7491   169-7586   169-7600  
                 169-7601   170-7668   170-7669   170-7681   170-7689   170-7707   170-7712   170-7714   170-7715   170-7716  
                 170-7725   173-7818   173-7850   173-7856   174-7992   174-8024   174-8029   174-8044   174-8050   174-8057  
                 174-8058   174-8059   174-8060   174-8062   174-8066   176-8110   176-8114   176-8122   176-8124   176-8126  
                 176-8134   176-8136   176-8138   176-8144   176-8146   176-8158   176-8163   177-8192   177-8215   178-8232  
                 178-8234   179-8253   179-8257   179-8260   179-8263   179-8265   179-8269   180-8296   180-8299   180-8302  
                 182-8387   182-8389   182-8390   182-8392   182-8396   184-8467   184-8475   184-8480   184-8483   191-8868  
                 191-8871   191-8878   191-8881   191-8884   191-8896   191-8908   191-8911   191-8937   191-8941   191-8944  
                 191-8951   191-8959   191-8966   191-8969   191-8972   191-8973   195-9083   195-9096   195-9111   196-9229  
                 196-9241   196-9245   196-9248   196-9252   196-9255   196-9258   196-9275   196-9280   196-9289   196-9317  
                 196-9323   196-9327   196-9330   196-9337   196-9341   198-9407   198-9409   198-9411   198-9414   198-9417  
                 199-9441   199-9443   199-9445   199-9452   199-9459   201-9513   202-9561   202-9562   204-9670   204-9677  
                 204-9680   204-9685   204-9693   204-9694   204-9697   205-9730   205-9745   205-9749   205-9752   205-9764  
                 205-9768   210-9924   210-9925   210-9931   210-9935   210-9937   211-9952   211-9953   211-9959   211-9962  
                 211-9964   211-9969   211-9971   214-10082  214-10084  220-10377  220-10387  220-10393  220-10424  221-10474 
                 222-10496  222-10519  222-10521  223-10546  223-10553  223-10557  225-10680  225-10690  225-10697  225-10716 
                 226-10727  226-10730  226-10745  226-10752  226-10756  227-10775  227-10783  227-10787  229-10859  229-10862 
                 229-10865  230-10897  230-10900  230-10903  230-10908  230-10910  231-10947  232-10972  232-10974  233-10999 
                 233-11002  233-11007  233-11009  233-11016  233-11019  233-11022  233-11026  233-11029  234-11059  234-11064 
                 234-11069  234-11075  234-11084  235-11107  235-11115  235-11118  235-11121  235-11131  235-11137 
CALLR 		#4-251     #9-475      52-1826    54-1909    56-2075    71-2982    76-3153    76-3163    76-3192    76-3195   
                 76-3324    76-3383    76-3386    83-3836    89-4092    89-4141    91-4228    96-4416    102-4633   102-4643  
                 104-4731   108-4861   120-5231   122-5345   126-5570   128-5670   137-6004   141-6176   144-6306   146-6391  
                 146-6475   161-7334   170-7728   171-7747   171-7750   171-7753   171-7756   179-8273   184-8485   201-9514  
                 225-10705  229-10868  230-10921  232-10978  234-11089  235-11140 
CLEF$S		#151-6718  #173-7922   180-8304  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 31

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

DFPC  		#23-954    
DFRD  		#12-591    
DFRDT 		#13-612    
DFSCLK		#22-944    
DFWRT 		#14-653    
DFWRTT		#15-693    
DFXCT 		#16-732    
DFXCTT		#17-764    
DIR$  		#4-186     #91-4202   #91-4218   #96-4401   #96-4405   #96-4410   #102-4617  #102-4621  #102-4625  #102-4637  
                #104-4703  #104-4707  #104-4711  #104-4715  #104-4729  #106-4784  #106-4788  #106-4789  #106-4794  #112-4971  
                #112-4971  #118-5156  #118-5156  #120-5222  #130-5749  #131-5790  #134-5895  #136-5982  #137-6000  #139-6079  
                #152-6793  #152-6795  #152-6798  #152-6803  #152-6805  #152-6807  #152-6811  #152-6811  #152-6816  #152-6816  
                #152-6822  #152-6822  #173-7922  #180-8304  #180-8304  #180-8306  #180-8308  #180-8308  #191-8962  #191-8962  
                #192-9013  #195-9120  #195-9124  #196-9262  #196-9262  #196-9263  #196-9263  #220-10375 #220-10379 #220-10391 
                #220-10420 #220-10429 #220-10438 #220-10438 #223-10544 #224-10579 
DPOS  		#18-797    
DPOST 		#19-837    
DTEBAS		#25-998    
ERROR 		#7-391     #55-1968   #58-2165   #58-2166   #58-2167   #58-2168   #58-2169   #67-2685   #77-3435   #77-3437   
                #88-4061   #98-4481   #98-4482   #98-4483   #98-4484   #107-4833  #107-4835  #113-5019  #113-5021  #129-5714  
                #129-5715  #133-5872  #135-5949  #138-6048  #145-6348  #145-6350  #145-6352  #145-6354  #149-6603  #151-6763  
                #151-6765  #151-6767  #152-6878  #168-7576  #173-7970  #173-7976  #181-8367  #186-8560  #186-8562  #186-8564  
                #195-9206  #224-10633 #228-10837 #228-10839 
ERROR$		#5-304     
ERR$  		#91-4202   #91-4218   #96-4401   #96-4405   #96-4410   #102-4617  #102-4621  #102-4625  #102-4637  #104-4703  
                #104-4707  #104-4711  #104-4715  #104-4729  #106-4784  #106-4788  #106-4789  #106-4794  #112-4971  #118-5156  
                #120-5222  #130-5749  #131-5790  #134-5895  #136-5982  #137-6000  #139-6079  #152-6793  #152-6795  #152-6798  
                #152-6803  #152-6805  #152-6807  #152-6811  #152-6816  #152-6822  #180-8304  #180-8306  #180-8308  #191-8962  
                #192-9013  #195-9120  #195-9124  #196-9262  #196-9263  #220-10375 #220-10379 #220-10391 #220-10420 #220-10429 
                #220-10438 #223-10544 #224-10579 
EXAM  		#20-876    
EXAMT 		#21-922    
EXCT  		#28-1060   
EXIT$S		#151-6718   152-6811   152-6822  #186-8537   191-8962  #219-10327  220-10438 
EXOR  		#10-527    
FATAL 		#50-1719   
GLUN$ 		#101-4587   101-4592  #103-4673   103-4678  
IDENT$		#4-201      51-1731    51-1731    55-1912    55-1912    58-2111    58-2111    66-2618    66-2618    75-3081   
                 75-3081    77-3394    77-3394    80-3671    80-3671    86-3951    86-3951    88-4019    88-4019    90-4145   
                 90-4145    92-4231    92-4231    98-4452    98-4452    101-4560   101-4560   103-4646   103-4646   105-4734  
                 105-4734   107-4799   107-4799   113-4985   113-4985   119-5177   119-5177   121-5234   121-5234   125-5484  
                 125-5484   129-5674   129-5674   133-5838   133-5838   135-5913   135-5913   138-6012   138-6012   140-6088  
                 140-6088   142-6183   142-6183   145-6314   145-6314   148-6539   148-6539   151-6685   151-6685   158-7125  
                 158-7125   162-7343   162-7343   165-7450   165-7450   167-7530   167-7530   172-7773   172-7773   173-7877  
                 173-7877   181-8313   181-8313   185-8489   185-8489   195-9130   195-9130   197-9355   197-9355   200-9465  
                 200-9465   203-9592   203-9592   207-9801   207-9801   213-10033  213-10033  216-10162  216-10162  219-10295 
                 219-10295  224-10584  224-10584  228-10797  228-10797 
IO10$ 		#6-332      51-1767    55-1957    55-1958    55-1962    58-2161    86-3986    86-3987    173-7930   181-8357  
                 195-9178   195-9179   195-9180   195-9181   195-9185   224-10629 
I10$  		#6-316     #55-1959   #55-1960   #55-1961   #55-1963   #186-8543  #195-9175  
KLDR$ 		#133-5864   133-5869  
KLDW$ 		#135-5939   135-5944  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 32

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

KLDX$ 		#138-6040   138-6045  
KLIVR$		#151-6719  #151-6769  #151-6769  
LODAR 		#26-1029   
MESSAG		#7-383     #55-1969   #55-1970   #55-1971   #58-2170   #58-2171   #58-2172   #58-2173   #58-2174   #67-2683   
                #75-3118   #75-3120   #75-3122   #75-3124   #75-3126   #151-6769  #158-7154  #158-7156  #162-7372  #162-7373  
                #165-7480  #168-7572  #168-7574  #172-7806  #173-7952  #173-7954  #173-7956  #173-7960  #181-8374  #186-8558  
                #195-9201  
MOV$  		#112-4971  #112-4971  #112-4971  #112-4971  #112-4971  #112-4971  #112-4971  #112-4971  #112-4971  #112-4971  
                #112-4971  #118-5156  #118-5156  #118-5156  #118-5156  #118-5156  #118-5156  #118-5156  #118-5156  #118-5156  
                #118-5156  #118-5156  #152-6816  #152-6816  #152-6816  #152-6816  #152-6816  #152-6816  #152-6816  #152-6816  
                #152-6816  #152-6816  #152-6816  #152-6816  #180-8304  #180-8304  #180-8308  #180-8308  #196-9262  #196-9262  
                #196-9262  #196-9262  #196-9262  #196-9263  #196-9263  
MRESET		#31-1151   
MRKT$ 		#173-7922   173-7933  
MRKT$S		#181-8351  #195-9155   196-9262  
MVB$  		#112-4971   112-4971  #118-5156   118-5156  #152-6816   152-6816  
NBL$  		#151-6748  #151-6748  #151-6750  #151-6750  #151-6753  #151-6753  #151-6756  #151-6756  #151-6758  #151-6758  
                #151-6760  #151-6760  
OFF$  		#90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4178    90-4178   #90-4179   
                 90-4179    90-4179    90-4179    90-4179    90-4179    90-4179    90-4179    90-4179   #92-4263    92-4263   
                 92-4263    92-4263    92-4263    92-4263    92-4263    92-4263    92-4263   #92-4264    92-4264    92-4264   
                 92-4264    92-4264    92-4264    92-4264    92-4264    92-4264   #92-4265    92-4265    92-4265    92-4265   
                 92-4265    92-4265    92-4265    92-4265    92-4265   #101-4592   101-4592   101-4592   101-4592  #101-4593  
                 101-4593   101-4593   101-4593   101-4593   101-4593   101-4593   101-4593   101-4593  #101-4594   101-4594  
                 101-4594   101-4594   101-4594   101-4594   101-4594   101-4594   101-4594  #101-4595   101-4595   101-4595  
                 101-4595   101-4595   101-4595   101-4595   101-4595   101-4595  #103-4678   103-4678   103-4678   103-4678  
                #103-4679   103-4679   103-4679   103-4679   103-4679   103-4679   103-4679   103-4679   103-4679  #103-4680  
                 103-4680   103-4680   103-4680   103-4680   103-4680   103-4680   103-4680   103-4680  #103-4681   103-4681  
                 103-4681   103-4681   103-4681   103-4681   103-4681   103-4681   103-4681  #103-4682   103-4682   103-4682  
                 103-4682   103-4682   103-4682   103-4682   103-4682   103-4682  #105-4767   105-4767   105-4767   105-4767  
                 105-4767   105-4767   105-4767   105-4767   105-4767  #105-4768   105-4768   105-4768   105-4768   105-4768  
                 105-4768   105-4768   105-4768   105-4768  #105-4769   105-4769   105-4769   105-4769   105-4769   105-4769  
                 105-4769   105-4769   105-4769  #105-4770   105-4770   105-4770   105-4770   105-4770   105-4770   105-4770  
                 105-4770   105-4770  #119-5209   119-5209   119-5209   119-5209   119-5209   119-5209   119-5209   119-5209  
                 119-5209  #151-6748   151-6748   151-6748   151-6748   151-6748  #151-6750   151-6750   151-6750   151-6750  
                 151-6750  #151-6753   151-6753   151-6753   151-6753   151-6753  #151-6756   151-6756   151-6756   151-6756  
                 151-6756  #151-6758   151-6758   151-6758   151-6758   151-6758  #151-6760   151-6760   151-6760   151-6760  
                 151-6760  #173-7933   173-7933   173-7933   173-7933   173-7933   173-7933  #186-8547   186-8547   186-8547  
                 186-8547   186-8547   186-8547   186-8547   186-8547   186-8547  #219-10332  219-10332  219-10332  219-10332 
                 219-10332  219-10332  219-10332  219-10332  219-10332 #219-10333  219-10333  219-10333  219-10333  219-10333 
                 219-10333  219-10333  219-10333  219-10333 #219-10334  219-10334  219-10334  219-10334  219-10334  219-10334 
                 219-10334  219-10334  219-10334 #219-10335  219-10335  219-10335  219-10335  219-10335  219-10335  219-10335 
                 219-10335  219-10335 
PBELL 		#45-1578   
PCRLF 		#45-1586   
PFORCE		#33-1204   
PMSG  		#42-1487   
PNORML		#33-1207   
PNTADR		#35-1262   
PNTAL 		#43-1518   
PNTBAK		#33-1210   
PNTDEC		#40-1408   
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 33

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

PNTNBR		#36-1289   
PNTOCS		#39-1376   
PNTOCT		#38-1344   
PNTODT		#41-1441   
PNT36 		#34-1234   
PNT36B		#37-1317   
POP   		#4-269     #9-493     #65-2554   #78-3565   #78-3566   #79-3665   #79-3666   #79-3667   #82-3793   #82-3817   
                #85-3945   #85-3946   #85-3947   #87-4012   #97-4448   #104-4730  #106-4793  #124-5474  #126-5564  #134-5909  
                #136-5987  #137-6008  #139-6084  #146-6382  #150-6681  #154-6963  #157-7065  #157-7118  #193-9031  #198-9418  
                #199-9461  #201-9540  #202-9563  #202-9588  #206-9797  #210-9926  #210-9940  #211-9954  #211-9974  #214-10085 
                #214-10111 #215-10157 #217-10232 #218-10289 #218-10291 #221-10475 #223-10554 #231-10955 #233-11031 
PRDP$ 		#129-5702  #129-5707  
PREX$ 		#129-5702  #129-5708  #135-5939  #135-5945  
PRINT 		#7-395     #56-2076   #57-2104   #60-2218   #65-2534   #65-2573   #66-2612   #69-2905   #69-2923   #76-3201   
                #76-3330   #76-3357   #76-3389   #78-3495   #78-3540   #79-3595   #79-3642   #82-3816   #83-3854   #84-3880   
                #84-3918   #89-4071   #89-4077   #89-4088   #89-4106   #89-4131   #89-4135   #99-4536   #111-4949  #112-4980  
                #115-5077  #118-5172  #130-5751  #131-5799  #134-5907  #136-5985  #139-6082  #141-6145  #144-6253  #146-6387  
                #146-6422  #146-6468  #147-6482  #150-6648  #152-6810  #152-6821  #152-6836  #152-6843  #153-6936  #159-7188  
                #159-7227  #160-7253  #160-7264  #161-7297  #163-7384  #163-7399  #164-7412  #164-7445  #166-7490  #166-7501  
                #169-7619  #170-7703  #170-7721  #173-7817  #173-7832  #174-7991  #174-8008  #174-8033  #174-8069  #174-8077  
                #176-8147  #176-8173  #176-8178  #182-8395  #182-8398  #191-8926  #191-8952  #196-9272  #196-9340  #226-10758 
                #230-10924 #233-11035 
PSLASH		#45-1574   
PSPACE		#45-1570   
PTAB  		#45-1582   
PUSH  		#4-263     #9-487     #65-2551   #78-3488   #78-3489   #79-3590   #79-3591   #79-3592   #82-3791   #82-3815   
                #85-3932   #85-3933   #87-4005   #97-4436   #104-4728  #106-4790  #124-5458  #126-5562  #130-5732  #131-5771  
                #134-5892  #136-5968  #137-6005  #139-6066  #146-6380  #147-6521  #150-6673  #153-6908  #154-6942  #157-7053  
                #157-7062  #193-9029  #198-9399  #199-9436  #201-9510  #202-9559  #202-9567  #206-9790  #210-9921  #210-9930  
                #211-9949  #211-9958  #214-10079 #214-10089 #215-10140 #217-10208 #218-10251 #218-10253 #221-10443 #221-10448 
                #221-10460 #221-10465 #221-10471 #223-10550 #231-10944 #233-10997 
QDPB$ 		#90-4178   #90-4178   #90-4179   #90-4179   #92-4263   #92-4263   #92-4264   #92-4264   #92-4265   #92-4265   
                #101-4593  #101-4593  #101-4594  #101-4594  #101-4595  #101-4595  #103-4679  #103-4679  #103-4680  #103-4680  
                #103-4681  #103-4681  #103-4682  #103-4682  #105-4767  #105-4767  #105-4768  #105-4768  #105-4769  #105-4769  
                #105-4770  #105-4770  #119-5209  #119-5209  #186-8547  #186-8547  #219-10332 #219-10332 #219-10333 #219-10333 
                #219-10334 #219-10334 #219-10335 #219-10335 
QDPB$S		#112-4971   112-4971  #118-5156   118-5156  #152-6816   152-6816  
QIOW$ 		#90-4173    90-4178    90-4179   #92-4258    92-4263    92-4264    92-4265   #101-4587   101-4593   101-4594  
                 101-4595  #103-4673   103-4679   103-4680   103-4681   103-4682  #105-4762   105-4767   105-4768   105-4769  
                 105-4770  #119-5204   119-5209  #186-8537   186-8547  #219-10327  219-10332  219-10333  219-10334  219-10335 
QIOW$S		#107-4827   112-4971  #113-5013   118-5156  #151-6718   152-6816  
REGRST		#32-1188   
REGSAV		#32-1184   
RETURN		#4-255     #9-479     #52-1828   #53-1859   #54-1900   #56-2078   #57-2106   #60-2244   #61-2270   #62-2317   
                #65-2537   #65-2562   #65-2576   #66-2616   #69-2916   #69-2925   #70-2969   #71-2985   #72-3020   #73-3051   
                #74-3078   #78-3567   #79-3668   #81-3751   #82-3811   #82-3826   #83-3867   #84-3914   #84-3924   #85-3948   
                #87-4014   #91-4223   #96-4414   #97-4449   #99-4538   #100-4557  #102-4641  #104-4726  #106-4796  #108-4864  
                #109-4883  #109-4888  #110-4921  #111-4946  #111-4951  #112-4977  #112-4982  #114-5049  #115-5074  #115-5079  
                #116-5113  #117-5139  #118-5164  #118-5170  #118-5174  #120-5228  #122-5346  #123-5445  #124-5475  #124-5481  
                #126-5554  #127-5626  #128-5671  #130-5736  #130-5753  #131-5781  #131-5798  #131-5801  #132-5813  #132-5833  
                #132-5835  #134-5910  #136-5988  #137-6009  #139-6085  #141-6154  #141-6179  #144-6257  #144-6311  #147-6490  
                #147-6534  #150-6650  #150-6669  #150-6682  #152-6845  #153-6934  #154-6964  #157-7116  #161-7340  #173-7875  
KLIMON     CREATED BY  MACRO  ON 11-NOV-81 AT 11:27	PAGE 34

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

                #175-8101  #176-8182  #177-8224  #178-8235  #179-8275  #180-8310  #184-8486  #192-9018  #195-9127  #196-9343  
                #198-9419  #199-9462  #201-9541  #202-9564  #202-9589  #204-9698  #205-9774  #206-9798  #210-9927  #210-9941  
                #211-9955  #211-9975  #212-9994  #212-10012 #212-10030 #214-10086 #214-10112 #215-10158 #217-10233 #218-10292 
                #220-10410 #221-10476 #223-10558 #224-10581 #225-10700 #225-10721 #226-10760 #227-10794 #229-10871 #230-10927 
                #231-10956 #232-10981 #233-11032 #234-11081 #235-11143 
RVP$  		#112-4971  #112-4971  #118-5156  #118-5156  #152-6816  #152-6816  #196-9262  #196-9262  
SL    		#5-278     #10-499     177-8196  
SM    		#29-1090   
SR    		#5-291     #10-513     66-2601    177-8199   235-11133 
TRACK 		#7-404     #122-5293  #123-5362  #124-5459  #126-5533  #127-5586  #128-5640  #130-5748  #131-5791  #134-5896  
                #136-5983  #139-6078  #150-6617  #150-6674  #229-10858 #230-10890 #231-10943 #233-10996 
TTIDEC		#47-1642   
TTILIN		#48-1668   
TTILNW		#49-1694   
TTIOCT		#46-1614   
WARNIN		#7-387     #58-2175   #80-3709   #80-3711   #80-3713   #80-3715   #88-4055   #140-6122  #143-6223  #158-7158  
                #168-7578  #173-7972  #173-7974  
WD22$ 		#6-348      51-1768    58-2160    129-5709   181-8361  
WD36$ 		#6-360     #51-1766   #51-1769   #55-1956   #58-2159   #121-5272  #121-5275  #125-5514  #125-5515  #129-5711  
                #135-5946  #149-6589  #149-6598  #149-6599  #149-6600  #173-7939  #181-8359  #181-8360  #186-8553  #195-9188  
                #195-9190  #195-9192  #195-9195  #228-10829 #228-10831 #228-10833 
WSIG$S		#181-8351  
WTSE$S		#173-7922  #180-8308  #181-8351  #195-9155  #196-9263  #219-10327 
WWADR 		#30-1119   
$DEF  		#4-186     #4-187     #8-462     #8-464     
$PMSG 		#44-1539