Google
 

Trailing-Edge - PDP-10 Archives - bb-m403a-bk - save.lst
Click save.lst to see without markup as text/plain
There are 2 other files named save.lst in the archive. Click here to see a list.
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36
TABLE OF CONTENTS

    19-    2	TITLE PAGE
    20-   76	GENERAL DESCRIPTION OF SAVE FUNCTION
    21-  148	MACROS AND PARAMETERS
    22-  246	DEVICE REGISTER DEFINITIONS
    23-  344	SAVE TASK IMPURE DATA AREA
    24-  400	PURE DATA
    25-  454	PARSE COMMAND LINE
    26-  555	SETUP SAVE FILE
    27-  724	DISMOUNT ALL MOUNTED VOLUMES
    28-  761	SAVE SYSTEM STATE
    29-  868	WRITE SAVE FILE AND BOOT
    30-  885	RESTORE SYSTEM STATE
    31-  936	RESTORE -- SETUP CTY LINE # AND DH-11 TABLES
    32- 1024	RESTORE -- REDIRECT SY0: TO BOOT DEVICE
    33- 1077	RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S
    34- 1135	RESTORE -- CHECK ALL THE DTE-20'S
    35- 1200	RESTORE -- RESTART SYSTEM AND TYPE HERALD
    36- 1243	RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:
    37- 1287	RESTORE -- READ HOM BLOCKS ON BOOT DB
    38- 1378	RESTORE -- CKECK STATE OF KLINIK LINE
    39- 1476	RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT
    40- 1510	COMMAND PARSER ROUTINES
    41- 1594	TYPEOUT ROUTINES
    42- 1792	FILE I/O ROUTINES
    43- 1865	DRIVER TABLES
    44- 1907	RX-11 FLOPPY DISK ROUTINES
    45- 1926	RX-11 BOOTSTRAP
    46- 2097	RX-11 WRITE ROUTINE
    47- 2222	RP04/RP06 DISK ROUTINES
    48- 2255	RP04/RP06 BOOTSTRAP
    49- 2341	RP04/RP06 WRITE ROUTINE
    50- 2399	TC-11 DECTAPE ROUTINES
    51- 2415	TC-11 BOOTSTRAP
    52- 2532	TC-11 WRITE ROUTINE
    53- 2616	CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80
    56- 2735	CHK11 MACRO'S
    59- 2869	DEFINE DEVICE BLOCKS FOR EACH NODE TYPE
    60- 2886	DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS
    66- 3032	CHECK MEMORY - SLIDING BIT PATTERN
    69- 3137	CHECK KW11-L HDW
    72- 3213	CHECK SYSTEM FOR EXISTENCE OF OPTIONS
    74- 3363	BIT SET/BIT CLEAR TEST
    75- 3410	PRINT DEVICE ID ROUTINE
    76- 3445	ROUTINE TO FIND DEVICE INTERRUPT LEVEL
    77- 3478	CHECK INTERRUPTS AND FIND DEVICE LEVEL
    80- 3591	HERE ON AN INTERRUPT WHILE IN CHK11
    81- 3641	CHECK DH11 HDW
    82- 3817	CHECK DL11-E HDW
    83- 3840	CHECK DL11-A HDW
    84- 3862	CHECK DM11-BB HDW
    85- 3903	CHECK DTE20 HARDWARE
    86- 3937	CHECK CD11 HARDWARE
    87- 3961	CHECK LP11 HARDWARE
    88- 3982	CHECK THE LP20 HARDWARE
    89- 4010	CHECK RH11 HARDWARE
    90- 4023	CHECK TC11 HARDWARE
    91- 4052	RX11 CHECKING
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36
TABLE OF CONTENTS

    93- 4080	CK11SC ROUTINE
    98- 4232	END STATEMENT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 17
DTE20 HARDWARE BITS

    701						.LIST	MEB
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 19
DTE20 HARDWARE BITS

      1						.TITLE	SAVE -- MCR FUNCTION 'SAV' FOR RSX-20F
      2						.SBTTL	TITLE PAGE
      3						.IDENT	/014430/
      4					;
      5					;                             COPYRIGHT (C) 1975, 1978 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					;		MODULE: MCR FUNCTION -- SAV
     22					;
     23					;		VERSION: VX14-43
     24					;
     25					;		AUTHOR: TOM PORCHER
     26					;
     27					;		DATE: 10-SEP-75
     28					;
     29					;
     30					;	THIS MODULE CONTAINS:
     31					;
     32					;	-- GENERAL FUNCTIONAL DESCRIPTION
     33					;
     34					;	-- COMMAND PARSER FOR SAV
     35					;
     36					;	-- CODE TO SAVE MACHINE STATE
     37					;
     38					;	-- CODE TO WRITE BOOTSTRAP AND SAVE FILE
     39					;
     40					;	-- CODE TO RESTORE SAVED SYSTEM AND RESTART
     41					;
     42					;	-- RX-11 FLOPPY DISK I/O DRIVER ROUTINES
     43					;
     44					;	-- RP DISK I/O DRIVER ROUTINES
     45					;
     46					;	-- TC-11 DECTAPE I/O DRIVER ROUTINES
     47					;
     48					; MODIFICATIONS:
     49					;
     50					;	NO.	DATE		PROGRAMMER	PURPOSE
     51					;	---	----		----------	-------
     52					;	001	23-MAY-77	R. BELANGER	SUPPORT KLINIK ACTIVITY
     53					;						ON REBOOT.
     54					;	002	31-MAY-77	R. BELANGER	MODIFY TO SAVE ONLY IMAGE
     55					;						OF EXEC AND SAVE TASK.
     56					;	003	01-JUN-77	A. PECKHAM	MODIFY REFERENCE TO SYSTEM
     57					;						VERSION NUMBER.
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 19-1
TITLE PAGE

     58					;	004	01-JUL-77	R. BELANGER	ADD KLINIK EVENT LOGGING
     59					;	005	10-NOV-77	R. BELANGER	ADD CODE TO RESET DL11'S (SETDL)
     60					;	006	09-MAY-78	R. BELANGER	MODIFY "MNTSY" TO MOUNT A
     61					;						SECOND FLOPPY
     62					;	007	25-JUN-79	K. LEFEBVRE	ADD DEFAULT BIT TO
     63					;						.KLIWD INITIALIZATION
     64					;   TCO 4.2333	16-JUL-79	R. BELANGER	ADD KL10 ENVIRONMENTAL
     65					;						REPORTING SUPPORT.
     66					;						BRING SAVE VERSION IN LINE WITH
     67					;						RSX-20F VERSION.
     68					;  TCO 4.1.1091	12-FEB-80	R. BELANGER	FIX MISSING DM-11/BB'S
     69					;  TCO 4.1.1138	08-APR-80	R. BELANGER	RESET KLINIK DL-11E IF
     70					;						NOT ASSERTING CARRIER AT START UP
     71					;	008	13-MAR-81	S. LEAPLINE	ADD CHK11 REPORTING
     72					;	009	08-JUL=81	S. LEAPLINE	ADD WARNING MESSAGE FOR MISSING
     73					;						KLINIK
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 20
TITLE PAGE

     75
     76						.SBTTL	GENERAL DESCRIPTION OF SAVE FUNCTION
     77					;
     78					;+
     79					;
     80					;	SAV IS INVOKED BY THE COMMAND 'MCR SAV' TO THE
     81					; RSX-20F CONSOLE COMMAND LANGUAGE.  IT ACCEPTS ONE LINE FROM THE
     82					; CONSOLE WHICH HAS THE FOLLOWING FORMAT:
     83					;
     84					;	[$<SP>] [<ALPHA> <ALPHA> [$<DIGIT>]] [":"] [$<SP>] ["/" <MODIFIER>] <EOL>
     85					;
     86					;	WHERE	$<THING> MEANS ANY NUMBER OF <THING>S
     87					;		[<THING>] MEANS OPTIONAL <THING>
     88					;		"<THING>" MEANS LITERALLY <THING>
     89					;		<SP> IS SPACE, <EOL> IS ANY END-OF-LINE SEQUENCE,
     90					;		<DIGIT> IS ONE OF 0,1,2,3,4,5,6,7
     91					;		<ALPHA> IS ONE OF A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
     92					;		<MODIFIER> IS ONE OF WB,WS,AB,EX,MO,DM,RH,PI
     93					;
     94					;
     95					; **** NOTE THAT SAVE MUST BE CALLED ONLY WHEN THE SYSTEM IS QUIESCENT,
     96					; **** I.E. WITH NO PENDING INTERRUPTS, AND THE DTE QUEUED PROTOCOL NOT
     97					; **** RUNNING.
     98					;
     99					;	SAVE FINDS THE PHYSICAL DISK ADDRESS OF FILE (5,5) WHICH IS
    100					; THE SYSTEM IMAGE FILE.  IF THE FILE IS NOT ALLOCATED, IT IS ALLOCATED
    101					; TO THE SIZE OF THE CURRENT SYSTEM (.MSIZE) CONTIGUOUSLY.  SAVE
    102					; THEN TURNS OFF THE INTERRUPT SYSTEM (PRIORITY 7) AND SAVES THE
    103					; STATE OF THE SYSTEM HARDWARE (KT-11 IF ANY), THEN COPIES LOW CORE
    104					; (FIRST 256. WORDS) INTO A SAVE AREA.  THE PROPER BOOT FOR THE
    105					; REQUESTED DEVICE IS WRITTEN INTO LOW CORE.  THE SYSTEM IMAGE FILE IS WRITTEN,
    106					; USING THE DISK ROUTINES IN SAVE INSTEAD OF THE SYSTEM DISK DRIVERS TO PRESERVE
    107					; THE INTEGRITY OF THE SYSTEM IMAGE.  IF WRITE BOOT (/WB) WAS SPECIFIED, THE PROPER
    108					; BOOTSTRAP IS ALSO WRITTEN ON BLOCK ZERO OF THE SPECIFIED DEVICE.
    109					; SAVE THEN ENTERS THE RESTORE CODE, AS IF THE SYSTEM HAD JUST BEEN
    110					; LOADED, SPECIFYING NO SYSTEM INITIALIZATION.
    111					;
    112					;	WHEN THE BOOTSTRAP ROM IS INITIATED (BY ONE OF THE BUTTONS)
    113					; BLOCK ZERO OF THE DEVICE IS READ INTO THE FIRST 256. WORDS OF MEMORY.
    114					; THIS CODE THEN READS THE REMAINDER OF THE SYSTEM INTO CORE, READING
    115					; OVER ITSELF, SINCE THE BOOTSTRAP IS ALSO  CONTAINED IN THE FIRST
    116					; BLOCK OF THE SYSTEM IMAGE.  THE BOOTSTRAP THEN TRANSFERS CONTROL
    117					; (IN USER MODE) TO THE RESTORE CODE, CONTINUING EXECUTION OF THE
    118					; SAVE TASK.
    119					;
    120					;	THE SYSTEM STATE IS RESTORED BY FIRST RESTORING LOW CORE FROM
    121					; THE SAVE AREA.  THE KT-11 REGISTERS ARE RESTORED (IF THEY WERE SAVED).
    122					; A POWER-RECOVERY
    123					; IS SIMULATED BY SETTING EV.PR IN .SERFG, AND INTERRUPTS ARE
    124					; RE-ENABLED, AT PRIORITY ZERO.  THE TOPS HOM BLOCKS ARE
    125					; READ FROM RP BOOT UNIT (IF RP BOOT) TO FIND WHERE THE RSX-20F FILE SYSTEM
    126					; IS ON THAT PACK.  WARNINGS ARE PRINTED IF THE HOM BLOCKS CANNOT BE READ,
    127					; THE HOM BLOCKS ARE INCONSISTENT, OR THE RSX-20F FILE SYSTEM IS NOT SET UP.
    128					; IF NO HOM BLOCKS ARE FOUND, THE PACK IS ASSUMED TO BE ENTIRELY AN RSX-20F
    129					; FILE SYSTEM.
    130					;
    131					;	IF THE PARAMETER FROM THE ROM
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 20-1
GENERAL DESCRIPTION OF SAVE FUNCTION

    132					; INDICATES SYSTEM INITIALIZATION IS NECCESARY (BP.LD1!BP.LD0 = 00 OR 11)
    133					; A REQUEST FOR THE SYSTEM INITIALIZATION TASK SYSINI IS MADE.
    134					; A SYSTEM RESTART MESSAGE IS ALSO PRINTED.  THE SAVE TASK THEN EXITS.
    135					;
    136					;	AVAILABLE MODIFIERS:
    137					; /WB	(OFF) WRITE BOOT
    138					; /WS	(ON)  WRITE SAVE FILE
    139					; /AB	(OFF) SAVE TO FIXED DISK ADDRESS (NEAR END OF VOLUME) (ONLY IF FTABS DEFINED)
    140					; /EX	(ON)  EXIT AFTER SAVE COMPLETE
    141					; /MO	(OFF) MOUNT VOLUME BEFORE CREATING SAVE FILE
    142					; /DM	(OFF) DISMOUNT VOLUME AFTER CREATING SAVE FILE
    143					; /RH	(ON)  READ HOM BLOCKS TO FIND RSX-20F FILE SYSTEM
    144					;
    145					;-
    146					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 21
MACROS AND PARAMETERS

    148						.SBTTL	MACROS AND PARAMETERS
    149					;
    150					; ASSEMBLY CONDITIONS
    151					;
    152						.LIST	MEB
    153						.ENABLE	AMA
    154					;
    155					; MISC. .MCALLS
    156					;
    157					.MCALL $DEF,QIOSY$,ALUN$S,QIOW$S,GTIM$S,EXIT$S,RQST$S,CLEF$S,MRKT$S,WTSE$S
    158					.MCALL CALL,RETURN,PUSH,POP,MTPI,MFPI,MFPS,MTPS,.INH,.ENB,.INH6,.ENB6
    159	000000					$DEF
    160	000000					QIOSY$
    161					;
    162					; MACROS
    163					;
    164					.MACRO	TYPE	MSG,ARG
    165						.PSECT	TEXT
    166					$$$=.
    167						.ASCIZ	"MSG"
    168						.PSECT
    169						PUSH	#$$$
    170					.IF NB <ARG>
    171						CALL	TYP'ARG
    172					.IFF
    173						CALL	TYPMSG
    174					.ENDC
    175					.ENDM	TYPE
    176					;
    177					.MACRO	ERROR	MSG
    178						TYPE	<"<11>"MSG"<5>">
    179					.ENDM	ERROR
    180					;
    181					.MACRO	WARN	MSG
    182						TYPE	<"<12>"MSG"<1>">
    183					.ENDM	WARN
    184					;
    185					;
    186					; PARAMETERS
    187					;
    188					; DEFINE "FTABS= 1" TO ALLOW FOR /AB (ABSOLUTE SAVE)
    189					;
    190					; LUN ASSIGNMENTS
    191					;
    192		000001 			CTYLUN=	1			;LUN FOR CTY
    193		000002 			DSKLUN=	2			;LUN FOR SAVE DEVICE
    194					;
    195					; EVENT FLAGS
    196					;
    197		000001 			E.FQIO=	1			; (1) QIO WAIT REQUEST
    198		000001 			 EF.QIO=BIT0
    199					;
    200		000002 			E.FTMO= 2			; +++001 (2) TIME OUT FLAG
    201		000002 			 EF.TMO=BIT1
    202					;
    203		000003 			E.FLOG= 3			; +++004 (3) KLINIK LOG DONE FLAG
    204		000004 			 E.FLOG=BIT2			; +++004
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 21-1
MACROS AND PARAMETERS

    205					;
    206					; BOOTSTRAP ROM PARAMETER BITS
    207					;
    208		100000 			BP.ERR=	BIT15			;INDEFINITE ERROR RETRY
    209		074000 			BP.CLN=	BIT14!BIT13!BIT12!BIT11	;CONSOLE LINE NUMBER (WITHIN DH/DL)
    210		003400 			BP.UNT=	BIT10!BIT9!BIT8		;BOOT UNIT NUMBER OR DH UNIT NUMBER
    211		000200 			BP.RP4=	BIT7			;LOAD FROM RP04/RP06
    212		000170 			BP.CSP=	BIT6!BIT5!BIT4!BIT3	;CONSOLE SPEED IF DH, 1 IF DL, 0 IF DEFAULT
    213		000004 			BP.LD1=	BIT2			;LOAD CONDITION BITS
    214		000002 			BP.LD0=	BIT1			; . . .
    215									; .EQ. 00 -- AUTO DEADSTART ENTIRE SYSTEM
    216									; .EQ. 01 -- DEADSTART RSX20F ONLY
    217									; .EQ. 10 -- REBOOT RSX20F
    218									; .EQ. 11 -- OPERATOR CONTROLLED (RE)START
    219		000001 			BP.SWR=	BIT0			;SWITCH REGISTER BUTTON PUSHED
    220					;
    221					; PS BITS
    222					;
    223		140000 			PS.USR=	BIT15!BIT14
    224		030000 			PS.PUS=	BIT13!BIT12
    225		004000 			PS.REG=	BIT11
    226					;
    227					; WORDS IN HOM BLOCK
    228					;
    229		000000 			HOMNAM=	0			;SIXBIT/HOM/
    230		105755 			 SXBTHM= 105755			; TRUNCATED TO 16 BITS
    231		000061 			HOMFE0=	61			;ADDRESS OF -11 FILE SYSTEM
    232		000062 			HOMFE1=	62			;SIZE OF FILE SYSTEM
    233					;
    234					; EXTEND CONTROL BITS FOR QUEUE I/O FUNCTION IO.EXT
    235					;  IN BYTE I.EXTD+1 OF REQUEST
    236					;
    237		000001 			EX.AC1=	BIT0			;ALLOCATE CONTIGUOUS SPACE
    238		000004 			EX.FCO=	BIT2			;MAKE FILE CONTIGUOUS
    239		000200 			EX.ENA=	BIT7			;ENABLE EXTEND
    240					;
    241					; ACCESS CONTROL BITS FOR QUEUE I/O ACCESS FUNCTIONS
    242					;  IN BYTE I.ACTL OF REQUEST
    243					;
    244		000200 			AC.ENA=	BIT7			;ENABLE ACCESS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 22
DEVICE REGISTER DEFINITIONS

    246						.SBTTL	DEVICE REGISTER DEFINITIONS
    247					;
    248					; RX-11 DEVICE REGISTER DEFINITIONS
    249					;
    250		000006 			RX.LVL=6
    251		177170 			RXCS=	177170			;CONTROL AND STATUS REGISTER
    252		100000 				RXERR=	BIT15		;ERROR
    253		040000 				RXINIT=	BIT14		;INITIALIZE RX-11
    254		000200 				RXTREQ=	BIT7		;TRANSFER REQUEST
    255		000040 				RXDONE=	BIT5		;TRANSFER DONE
    256		000020 				RXUNIT=	BIT4		;UNIT SELECT
    257		000016 				RXFUNC=	BIT3!BIT2!BIT1	;FUNCTION:
    258		000000 					RXFILL=	0*BIT1	; FILL SECTOR BUFFER
    259		000002 					RXEMPT=	1*BIT1	; EMPTY SECTOR BUFFER
    260		000004 					RXWRIT=	2*BIT1	; WRITE SECTOR
    261		000006 					RXREAD=	3*BIT1	; READ SECTOR
    262		000016 					RXRERR=	7*BIT1	; READ ERROR REGISTER
    263		000001 				RXGO=	BIT0		;START FUNCTION
    264		177172 			RXDB=	177172			;MULTI-PURPOSE DATA BUFFER REGISTER (BYTE)
    265					;
    266					; RP04/RP06 DEVICE REGISTER DEFINITIONS
    267					;
    268		176700 			RPCS1=	176700			;CONTROL/STATUS REGISTER 1
    269		040000 				RPTRE=	BIT14		;TRANSFER ERROR
    270		020000 				RPMCPE=	BIT13		;MASSBUS CONTROL PARITY ERROR
    271		004000 				RPDVA=	BIT11		;DRIVE AVAILABLE (TO -11)
    272		000200 				RPRDY=	BIT7		;READY FOR FUNCTION
    273		000076 				RPFUNC=	BIT5!BIT4!BIT3!BIT2!BIT1 ;FUNCTION:
    274		000000 					RPNOOP=	0*BIT1	; NO-OP
    275		000020 					RPPRST=	10*BIT1	; READ-IN PRESET
    276		000060 					RPWRIT=	30*BIT1	; WRITE DATA
    277		000070 					RPREAD=	34*BIT1	; READ DATA
    278		000001 				RPGO=	BIT0		;START FUNCTION
    279		176702 			RPWC=	176702			;WORD COUNT REGISTER
    280		176704 			RPBA=	176704			;UNIBUS ADDRESS REGISTER
    281		176706 			RPDA=	176706			;TRACK (HIGH BYTE) SECTOR (LOW BYTE)
    282		176710 			RPCS2=	176710			;CONTROL/STATUS REGISTER 2
    283		000007 				RPUNIT=	BIT2!BIT1!BIT0	;UNIT #
    284		176712 			RPDS=	176712			;DRIVE STATUS REGISTER
    285		100000 				RPATA=	BIT15		;DRIVE ATTENTION ACTIVE
    286		040000 				RPERR=	BIT14		;DRIVE ERROR
    287		010000 				RPMOL=	BIT12		;MEDIUM ON-LINE
    288		001000 				RPPGM=	BIT9		;PROGRAMMABLE (A/B) MODE
    289		000400 				RPDPR=	BIT8		;DRIVE PRESENT
    290		176726 			RPDT=	176726			;DRIVE TYPE REGISTER
    291		000020 				RPDT04=	20		;TYPE= RP04
    292		000022 				RPDT06=	22		;TYPE= RP06
    293		176732 			RPOF=	176732			;OFFSET REGISTER
    294		010000 				RPFM22=	BIT12		;22-SECTOR FORMAT
    295		004000 				RPECCI=	BIT11		;INHIBIT ERROR CORRECTION
    296		176734 			RPDC=	176734			;DESIRED CYLINDER
    297					;
    298					; TC-11 DECTAPE DEVICE REGISTER DEFINITIONS
    299					;
    300		177340 			TCST=	177340			;STATUS REGISTER
    301		100000 				TCENDZ=	BIT15		;END-ZONE ERROR
    302		177342 			TCCM=	177342			;COMMAND REGISTER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 22-1
DEVICE REGISTER DEFINITIONS

    303		100000 				TCERR=	BIT15		;ERROR
    304		004000 				TCREV=	BIT11		;REVERSE DIRECTION (TOWARD FOWARD END-ZONE)
    305		003400 				TCUNIT=	BIT10!BIT9!BIT8	;UNIT SELECT
    306		000200 				TCRDY=	BIT7		;READY
    307		000016 				TCFUNC=	BIT3!BIT2!BIT1	;FUNCTION:
    308		000000 					TCSATM=	0*BIT1	; STOP ALL TAPE MOTION
    309		000002 					TCRNUM=	1*BIT1	; READ BLOCK NUMBERS
    310		000004 					TCREAD=	2*BIT1	; READ DATA
    311		000010 					TCSTOP=	4*BIT1	; STOP SELECTED TAPE
    312		000014 					TCWRIT=	6*BIT1	; WRITE DATA
    313		000001 				TCGO=	BIT0		;START FUNCTION
    314		177344 			TCWC=	177344			;WORD COUNT REGISTER
    315		177346 			TCBA=	177346			;BUS ADDRESS REGISTER
    316		177350 			TCDT=	177350			;DATA REGISTER
    317					;
    318					; DTE-20 DEVICE REGISTER DEFINITIONS
    319					;
    320		000774 			DTVECA=	774			;DTE-20 #0 INTERRUPT VECTOR (THEY GO DOWN!)
    321		174400 			DTEXPA=	174400			;EXTERNAL PAGE ADDRESS OF DTE #0
    322		000040 			DTEXPZ=	40			;SIZE OF ADDRESS BLOCK FOR DTE
    323					;
    324		000034 			DTSTAT=	34			;STATUS REGISTER
    325		004000 				DT11DB=	BIT11		;(READ/WRITE) TO -11 DOORBELL
    326		002000 				DTCL11=	BIT10		;(WRITE) CLEAR TO -11
    327		000040 				DTINON=	BIT5		;(WRITE) INTERRUPT ENABLE
    328		000010 				DTINOF=	BIT3		;(WRITE) INTERRUPT DISABLE
    329		000010 				DTRSMD=	BIT3		;(READ) RESTRICTED MODE
    330					;
    331					; DH-11 DEVICE REGISTER DEFINITIONS
    332					;
    333		160020 			DHEXPA=	160020			;EXTERNAL PAGE ADDRESS OF FIRST DH-11
    334		000020 			DHEXPZ=	20			;SIZE OF ADDRESS SPACE FOR ONE DH
    335					;
    336					;DM-11/BB REGISTER DEFINITIONS
    337					;
    338		170500 			DMEXPA=170500			; [4.1.1091] EXTERNAL PAGE ADDRESS OF FIRST DM-11/BB
    339					;
    340					; KL-11 LINE CLOCK REGISTER DEFINITION
    341					;
    342		177546 			LKS=	177546
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 23
SAVE TASK IMPURE DATA AREA

    344						.SBTTL	SAVE TASK IMPURE DATA AREA
    345					;
    346					; VARIABLES
    347					;
    348	000000				SPSAVE::	.BLKW	1		;SAVE'S SP IN IMAGE
    349	000002				DRVADR:	.BLKW	1		;ADDRESS OF DRIVER TABLE ENTRY FOR DEVICE
    350	000004				DSKADR:	.BLKW	2		;PHYSICAL DISK ADDRESS OF SAVE FILE
    351	000010				DSKSIZ:	.BLKW	2		;SIZE OF SAVE FILE *** MUST FOLLOW DSKADR ***
    352	000014				MEMSIZ:	.BLKW	1		;SIZE OF SYSTEM IN 32. WORD BLOCKS
    353	000016				RADIX:	.BLKW	1		;OUTPUT RADIX FOR TYPNUM
    354	000020				GTIMBF:	.BLKW	8.		;GET TIME PARAMETERS RETURN BLOCK
    355	000040				CMDCLR:				;START OF AREA TO CLEAR ON STARTUP
    356	000040				PUDADR:	.BLKW	1		;ADDRESS OF SAVE DEVICE PUD ENTRY
    357	000042				DEVNAM:	.BLKW	1		;DEVICE NAME
    358	000044				DEVUNT:	.BLKB	1		;DEVICE UNIT #
    359	000045				PUDIDX:	.BLKB	1		;PUD INDEX FOR THE SAVE DEVICE
    360	000046				WBFLAG:	.BLKB	1		;WRITE BOOT FLAG: 0 DON'T WRITE BOOT
    361									;		  1 WRITE BOOT (/WB SPECFIED)
    362	000047				WSFLAG:	.BLKB	1		;1-- WRITE SAVE FILE
    363					.IF DF FTABS
    364					ABFLAG:	.BLKB	1		;1-- SAVE AT ABSOLUTE PLACE ON DISK
    365					.ENDC ; .IF DF FTABS
    366	000050				EXFLAG:	.BLKB	1		;1-- EXIT WHEN DONE WITH SAVE
    367	000051				MOFLAG:	.BLKB	1		;1-- MOUNT DEVICE BEFORE CREATING SAVE FILE
    368	000052				DMFLAG:	.BLKB	1		;1-- DISMOUNT ALL DEVICES AFTER CREATING SAVE FILE
    369	000053				RHFLAG:	.BLKB	1		;1-- READ HOME BLOCKS
    370	000054				RNFLAG:	.BLKB	1		;1-- RP NOT READY
    371	000055				RPFLAG:	.BLKB	1		;1-- RP NOT IN A/B MODE
    372	000056				QEFLAG:	.BLKB	1		;NON-ZERO-- QIO ERROR CODE FROM FILQIO
    373	000057				ACFLAG:	.BLKB	1		;FLAG ACCESS DONE
    374	000060				WEFLAG:	.BLKB	1		;WRITE ERROR FLAG: 0 WRITE OK
    375									;		   1 WRITE ERROR DURING SAVE
    376	000061				DEFLAG:	.BLKB	1		;DTE-20 # NOT AT PRI 6 (-1 IF ALL OK)
    377	000062				ALTDXF:	.BLKW	1		; +++006 ALTERNATE DX MOUNT FLAG
    378		000024 			CMDCLN=.-CMDCLR			;LENGTH OF AREA TO CLEAR
    379					;
    380					; SAVE AREA FOR LOW CORE
    381					;
    382						.EVEN
    383	000064				LOWCOR:
    384					;
    385					; MISC. BUFFERS (OVERWRITTEN BY LOW CORE)
    386					;
    387	000064				HOMBUF:				;BUFFER FOR HOM BLOCKS
    388	000064				TYPBUF:	.BLKB	100.		;BUFFER FOR CTY OUTPUT
    389	000230				CTYBUF:	.BLKB	80.		;BUFFER FOR INPUT FROM CTY
    390		000120 			CTYBFL=	.-CTYBUF
    391	000350	   000 				.BYTE	0		;TO MAKE ASCIZ ALWAYS
    392						.EVEN
    393	000352					.BLKB	<256.*2.>-<.-LOWCOR> ;REST OF LOW CORE
    394	001064				QIOSTS:	.BLKW	2		;QIO STATUS BLOCK
    395	001070				LOGBUF:				; +++004 KLINIK LOG BUFFER
    396	001070	000004 				.WORD	4		; +++004
    397	001072	000000G				.WORD	DV.LOG		; +++004
    398	001074	000000 				.WORD	0		; +++004
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 24
PURE DATA

    400						.SBTTL	PURE DATA
    401					;
    402					; FILE ID BLOCK
    403					;
    404	001076	000005 	000005 		FIDBLK:	.WORD	5,5		;FILE ID 5, FIL SEQ # 5 IS SYSTEM SAVE FILE
    405					;
    406					; ATTRIBUTE CONTROL BLOCK
    407					;
    408	001102	   367 			ATCBLK:	.BYTE	-9.		;ATTRIBUTE 9 (STATISTICS BLOCK), READ
    409	001103	   010 				.BYTE	8.		;8. BYTES OF STATISTICS (FILE ADDR AND SIZE)
    410	001104	000004'				.WORD	DSKADR		;STORE IN DSKADR AND DSKSIZ
    411	001106	   000 	   000 			.BYTE	0,0		;END OF ATTRIBUTE CONTROL BLOCK
    412					;
    413					; MOUNT/DISMOUNT FUNCTION BLOCKS
    414					;
    415	001110	   001 			MNTBLK:	.BYTE	1		;FUNCTION: MOUNT
    416	001111	   001 				.BYTE	1		;LENGTH OF STRING
    417	001112	001114'				.WORD	1$		;ADDRESS OF STRING
    418	001114	   072 			1$:	.ASCII	/:/
    419						.EVEN
    420					;
    421	001116	   002 			DMTBLK:	.BYTE	2		;FUNCTION: DISMOUNT
    422	001117	   000 				.BYTE	0		;NO STRING
    423					;
    424					; TASK NAME FOR KL INITIALIZATION TASK
    425					;
    426	001120	131574 	043251 		KLINIT:	.RAD50	/...KLI/	;KL INITIALIZATION TASK NAME
    427					;
    428					; TABLE OF SPEED WORDS FOR CONSOLE DH FROM BOOT PARAMETER, BP.SPD
    429					;
    430					.MACRO SPD A,B
    431						 .WORD	<A*BIT10>!<A*BIT6>!<B>
    432					.ENDM SPD
    433	001124				DHSTAB:
    434	001124					SPD	0,0		;(0) CONSOLE NOT SPECIFIED
	001124	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    435	001126					SPD	0,0		;(1) DL-11 LINE, NO SPEED
	001126	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    436	001130					SPD	0,0		;(2) DL-11 LINE, NO SPEED
	001130	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    437	001132					SPD	3,BIT2!BIT1!BIT0 ;(3) 110 BAUD, 8 DATA BITS, 2 STOP BITS
	001132	006307 				 .WORD	<3*BIT10>!<3*BIT6>!<BIT2!BIT1!BIT0>
    438	001134					SPD	4,BIT2!BIT1	;(4) 134.5 BAUD, 7 DATA BITS, 2 STOP BITS
	001134	010406 				 .WORD	<4*BIT10>!<4*BIT6>!<BIT2!BIT1>
    439	001136					SPD	5,BIT2!BIT1!BIT0 ;(5) 150 BAUD, 8 DATA BITS, 2 STOP BITS
	001136	012507 				 .WORD	<5*BIT10>!<5*BIT6>!<BIT2!BIT1!BIT0>
    440	001140					SPD	6,BIT2!BIT1!BIT0 ;(6) 200 BAUD, 8 DATA BITS, 2 STOP BITS
	001140	014607 				 .WORD	<6*BIT10>!<6*BIT6>!<BIT2!BIT1!BIT0>
    441	001142					SPD	7,BIT1!BIT0	;(7) 300 BAUD, 8 DATA BITS, 1 STOP BIT
	001142	016703 				 .WORD	<7*BIT10>!<7*BIT6>!<BIT1!BIT0>
    442	001144					SPD	10,BIT1!BIT0	;(10) 600 BAUD, 8 DATA BITS, 1 STOP BIT
	001144	021003 				 .WORD	<10*BIT10>!<10*BIT6>!<BIT1!BIT0>
    443	001146					SPD	11,BIT1!BIT0	;(11) 1200 BAUD, 8 DATA BITS, 1 STOP BIT
	001146	023103 				 .WORD	<11*BIT10>!<11*BIT6>!<BIT1!BIT0>
    444	001150					SPD	12,BIT1!BIT0	;(12) 1800 BAUD, 8 DATA BITS, 1 STOP BIT
	001150	025203 				 .WORD	<12*BIT10>!<12*BIT6>!<BIT1!BIT0>
    445	001152					SPD	13,BIT1!BIT0	;(13) 2400 BAUD, 8 DATA BITS, 1 STOP BIT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 24-1
PURE DATA

	001152	027303 				 .WORD	<13*BIT10>!<13*BIT6>!<BIT1!BIT0>
    446	001154					SPD	14,BIT1!BIT0	;(14) 4800 BAUD, 8 DATA BITS, 1 STOP BIT
	001154	031403 				 .WORD	<14*BIT10>!<14*BIT6>!<BIT1!BIT0>
    447	001156					SPD	15,BIT1!BIT0	;(15) 9600 BAUD, 8 DATA BITS, 1 STOP BIT
	001156	033503 				 .WORD	<15*BIT10>!<15*BIT6>!<BIT1!BIT0>
    448	001160					SPD	0,0		;(16) DL-11, 8 DATA BITS, NO SPEED
	001160	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    449	001162					SPD	0,0		;(17) DL-11, NO SPEED
	001162	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    450
    451	001164				SAVLMT::			; +++002 SAVE IMAGE LIMITS
    452	001164	000000 	000000 			.LIMIT			; +++002
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 25
PARSE COMMAND LINE

    454						.SBTTL	PARSE COMMAND LINE
    455					;
    456					; REQUEST FOR SAVE BY MCR SAV COMMAND CALLS SAVE HERE
    457					;
    458	001170				SAVE::
    459					;
    460					; SETUP COMMAND DEFAULTS
    461					;
    462	001170	012701 	000040'			MOV	#CMDCLR,R1	;GET START OF AREA TO CLEAR
    463	001174	012705 	000024 			MOV	#CMDCLN,R5	;AND LENGTH OF AREA, IN BYTES
    464	001200				10$:
    465	001200	105021 				CLRB	(R1)+		;CLEAR A BYTE
    466	001202	077502 				SOB	R5,10$		;CLEAR 'EM ALL
    467	001204	105237 	000047'			INCB	WSFLAG		;DEFAULT TO WRITE SAVE FILE
    468	001210	105237 	000050'			INCB	EXFLAG		; AND TO EXIT WHEN DONE
    469	001214	105237 	000053'			INCB	RHFLAG		; AND TO READ HOME BLOCKS
    470	001220	105237 	000052'			INCB	DMFLAG		; AND TO DISMOUNT ALL VOLUMES
    471					;
    472					; SETUP TO READ A LINE FROM THE CTY
    473					;
    474	001224					ALUN$S	#CTYLUN,#"TT,#0	;ASSIGN CTY TO LUN 1
	001224	005046 				CLR	-(SP)
	001226	012746 	052124 			MOV	#"TT,-(SP)
	001232	012746 	000001 			MOV	#CTYLUN,-(SP)
	001236	012746 				MOV	(PC)+,-(SP)
	001240	   007 	   004 			.BYTE	7.,4
	001242	104375 				EMT	375
    475	001244	103530 				BCS	EXITA		;GIVE UP IF NO CTY!!!!
    476	001246					TYPE	^\SAV>\		;TYPE PROMPT MESSAGE
	000000	   123 	   101 	   126 		.ASCIZ	"SAV>"
	000003	   076 	   000
	001246	012746 	000000'			MOV	#$$$,-(SP)
	001252	004737 	006074'			JSR	PC,TYPMSG
    477	001256					QIOW$S	#IO.RLB,#CTYLUN,#E.FQIO,,#QIOSTS,,<#CTYBUF,#CTYBFL>
	001256	012746 	000120 			MOV	#CTYBFL,-(SP)
	001262	012746 	000230'			MOV	#CTYBUF,-(SP)
	001266	005046 				CLR	-(SP)
	001270	012746 	001064'			MOV	#QIOSTS,-(SP)
	001274	005046 				CLR	-(SP)
	001276	112716 	000001 			MOVB	#E.FQIO,(SP)
	001302	012746 	000001 			MOV	#CTYLUN,-(SP)
	001306	012746 	001000 			MOV	#IO.RLB,-(SP)
	001312	012746 				MOV	(PC)+,-(SP)
	001314	   003 	   010 			.BYTE	3,$$$T1
	001316	104375 				EMT	375
    478	001320	103502 				BCS	EXITA		;GIVE UP IF FAILURE
    479	001322	105737 	001064'			TSTB	QIOSTS+0	;ERROR STATUS
    480	001326	002477 				BLT	EXITA		;YES-- THAT'S ENOUGH
    481	001330	122737 	000003 	001065'		CMPB	#'C-100,QIOSTS+1 ;THIS TERMINATED BY ^C?
    482	001336	001473 				BEQ	EXITA		;YES-- GIVE UP FAST
    483	001340					TYPE	<"<1>">		;INSURE A <CR><LF>
	000005	   001 	   000 			.ASCIZ	""<1>""
	001340	012746 	000005'			MOV	#$$$,-(SP)
	001344	004737 	006074'			JSR	PC,TYPMSG
    484	001350	013704 	001066'			MOV	QIOSTS+2,R4	;GET # CHARACTERS TYPED AT ME
    485	001354	105064 	000230'			CLRB	CTYBUF(R4)	;CLEAR LAST BYTE OF INPUT (MAKE ASCIZZZ)
    486	001360	012704 	000230'			MOV	#CTYBUF,R4	;POINT TO START OF INPUT TO PARSE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 25-1
PARSE COMMAND LINE

    487					;
    488					; NOW TO PARSE THE LINE
    489					;
    490	001364					CALL	GETNB		;GET NON-BLANK CHARACTER
	001364	004737 	005742'			JSR	PC,GETNB
    491	001370	001677 				BEQ	SAVE		;BACK TO SAVE IF NULL COMMAND
    492	001372					CALL	GETNAM		;GET A DEVICE NAME
	001372	004737 	005764'			JSR	PC,GETNAM
    493	001376	103471 				BCS	SYNERR		;NO SUCH LUCK
    494	001400	010037 	000042'			MOV	R0,DEVNAM	;SAVE THE TYPED NAME
    495	001404	001411 				BEQ	20$		;NULL NAME-- GO ON FOR MODIFIERS
    496	001406					CALL	GETNUM		;GET UNIT NUMBER OF DEVICE (IF ANY)
	001406	004737 	006030'			JSR	PC,GETNUM
    497	001412	103463 				BCS	SYNERR		;TOO BIG-- COMPLAIN
    498	001414	110037 	000044'			MOVB	R0,DEVUNT	;SAVE THE UNIT NUMBER
    499	001420	122724 	000072 			CMPB	#':,(R4)+	; : FOLLOWING DEVICE?
    500	001424	001401 				BEQ	20$		;YES-- IGNORE IT
    501	001426	105744 				TSTB	-(R4)		;NO-- GO BACK TO LOOK AT IT AGAIN
    502					;
    503					; LOOK FOR ALL MODIFIERS
    504					;
    505	001430				20$:
    506	001430					CALL	GETNB		;SKIP BLANKS AFTER UNIT
	001430	004737 	005742'			JSR	PC,GETNB
    507	001434	001457 				BEQ	CMDONE		;END OF COMMAND-- ALL OK
    508	001436	122700 	000057 			CMPB	#'/,R0		;THIS A MODIFIER?
    509	001442	001047 				BNE	SYNERR		;NO-- BAD CHARACTER
    510	001444	105724 				TSTB	(R4)+		;YES-- SKIP OVER IT
    511	001446	012702 	000001 			MOV	#1,R2		;ASSUME NOT /-(SW)
    512	001452	122714 	000055 			CMPB	#'-,(R4)	;THIS /-(SW)?
    513	001456	001002 				BNE	30$		;NO-- GO ON
    514	001460	105724 				TSTB	(R4)+		;YES-- SKIP OVER -
    515	001462	005002 				CLR	R2		;AND SET TO CLEAR THE FLAG
    516	001464				30$:
    517	001464					CALL	GETNAM		;GET THE MODIFIER
	001464	004737 	005764'			JSR	PC,GETNAM
    518	001470	103434 				BCS	SYNERR		;TOO LONG-- GIVE UP
    519	001472	012701 	001532'			MOV	#MODTBL,R1	;GET ADDRESS OF SWITCH TABLE
    520	001476	012705 	000006 			MOV	#MODTLN,R5	; AND LENGTH OF IT
    521	001502				40$:
    522	001502	020021 				CMP	R0,(R1)+	;THIS MODIFIER MATCH?
    523	001504	001002 				BNE	50$		;NO-- LOOP FOR MORE
    524	001506	110231 				MOVB	R2,@(R1)+	;YES-- SET THE FLAG AS REQUESTED
    525	001510	000747 				BR	20$		;LOOP FOR ALL MODIFIERS
    526					;
    527	001512				50$:
    528	001512	005721 				TST	(R1)+		;NO-- SKIP OVER FLAG ADDRESS
    529	001514	077506 				SOB	R5,40$		;NO-- LOOP FOR ALL MODIFIERS
    530	001516					ERROR	<Illegal modifier /"<2>">
	000007	   011 	   111 	   154 		.ASCIZ	""<11>"Illegal modifier /"<2>""<5>""
	000012	   154 	   145 	   147
	000015	   141 	   154 	   040
	000020	   155 	   157 	   144
	000023	   151 	   146 	   151
	000026	   145 	   162 	   040
	000031	   057 	   002 	   005
	000034	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 25-2
PARSE COMMAND LINE

	001516	012746 	000007'			MOV	#$$$,-(SP)
	001522	004737 	006074'			JSR	PC,TYPMSG
    531	001526				EXITA:
    532	001526	000137 	005732'			JMP	EXIT		;TOO FAR TO HOP
    533					;
    534					; MODIFIER TABLE
    535					;
    536	001532				MODTBL:
    537					.IRP	ARG,<WB,WS,EX,MO,DM,RH>
    538						.ASCII	/ARG/
    539						.EVEN
    540						.WORD	ARG'FLAG
    541					.ENDM
	001532	   127 	   102 			.ASCII	/WB/
	001534	000046'				.WORD	WBFLAG
	001536	   127 	   123 			.ASCII	/WS/
	001540	000047'				.WORD	WSFLAG
	001542	   105 	   130 			.ASCII	/EX/
	001544	000050'				.WORD	EXFLAG
	001546	   115 	   117 			.ASCII	/MO/
	001550	000051'				.WORD	MOFLAG
	001552	   104 	   115 			.ASCII	/DM/
	001554	000052'				.WORD	DMFLAG
	001556	   122 	   110 			.ASCII	/RH/
	001560	000053'				.WORD	RHFLAG
    542					.IF DF FTABS
    543						.ASCII	/AB/
    544						.EVEN
    545						.WORD	ABFLAG
    546					.ENDC ; .IF DF FTABS
    547		000006 			MODTLN=<.-MODTBL>/4
    548					;
    549					; COMMAND ERRORS
    550					;
    551	001562				SYNERR:
    552	001562	010400 				MOV	R4,R0		;POINT INPUT STRING TO OUTPUT STRING
    553	001564					ERROR	<Syntax error: "<4>">
	000035	   011 	   123 	   171 		.ASCIZ	""<11>"Syntax error: "<4>""<5>""
	000040	   156 	   164 	   141
	000043	   170 	   040 	   145
	000046	   162 	   162 	   157
	000051	   162 	   072 	   040
	000054	   004 	   005 	   000
	001564	012746 	000035'			MOV	#$$$,-(SP)
	001570	004737 	006074'			JSR	PC,TYPMSG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 26
SETUP SAVE FILE

    555						.SBTTL	SETUP SAVE FILE
    556					;
    557					; THE COMMAND STRING IS NOW PARSED.  CHECK OUT THE DEVICE HE SPECIFIED.
    558					;
    559	001574				CMDONE:
    560	001574	013701 	000044'			MOV	DEVUNT,R1	;GET SPECIFIED UNIT
    561	001600	013700 	000042'			MOV	DEVNAM,R0	;GET DEVICE SPECIFIED
    562	001604	001003 				BNE	10$		;SPECIFIED-- GO ASSIGN IT
    563	001606	012700 	054523 			MOV	#"SY,R0		;NONE-- DEFAULT TO SYSTEM DEVICE
    564	001612	005001 				CLR	R1		; SY0:
    565					;
    566	001614				10$:
    567	001614					ALUN$S	#DSKLUN,R0,R1	;ASSIGN THE DEVICE TO LUN 2
	001614	010146 				MOV	R1,-(SP)
	001616	010046 				MOV	R0,-(SP)
	001620	012746 	000002 			MOV	#DSKLUN,-(SP)
	001624	012746 				MOV	(PC)+,-(SP)
	001626	   007 	   004 			.BYTE	7.,4
	001630	104375 				EMT	375
    568	001632	103403 				BCS	DNSERR		;OOPS-- DEVICE NOT IN SYSTEM
    569	001634					CALL	FINDEV		;FIND PUD ENTRY ADDRESS FOR DEVICE
	001634	004737 	006654'			JSR	PC,FINDEV
    570	001640	103006 				BCC	DEVCHK		;OK-- CHECK THE DEVICE OUT
    571	001642				DNSERR:
    572	001642	012705 	000042'			MOV	#DEVNAM,R5	;POINT TO DEVICE NAME/UNIT #
    573	001646					ERROR	<Device "<3>" not in system>
	000057	   011 	   104 	   145 		.ASCIZ	""<11>"Device "<3>" not in system"<5>""
	000062	   166 	   151 	   143
	000065	   145 	   040 	   003
	000070	   040 	   156 	   157
	000073	   164 	   040 	   151
	000076	   156 	   040 	   163
	000101	   171 	   163 	   164
	000104	   145 	   155 	   005
	000107	   000
	001646	012746 	000057'			MOV	#$$$,-(SP)
	001652	004737 	006074'			JSR	PC,TYPMSG
    574	001656				DEVCHK:
    575	001656	016505 	000000G			MOV	U.RP(R5),R5	; BUT GET REAL DEVICE
    576	001662	016537 	000000G	000042'		MOV	U.DN(R5),DEVNAM	;SAVE THE REAL DEVICE NAME
    577	001670	116537 	000000G	000044'		MOVB	U.UN(R5),DEVUNT	;SAVE THE REAL UNIT #
    578	001676	012700 	007042'			MOV	#DRVTAB,R0	;GET ADR OF DRIVER TABLE
    579	001702				10$:
    580	001702	026037 	000000 	000042'		CMP	DRVNAM(R0),DEVNAM ;MATCH?
    581	001710	001411 				BEQ	DEVOK		;YES-- GO ON
    582	001712	062700 	000020 			ADD	#DRVSIZ,R0	;BUMP TO NEXT DRIVER ENTRY
    583	001716	020027 	007122'			CMP	R0,#DRVTAB+DRVTBZ ;BEYOND END?
    584	001722	103767 				BLO	10$		;NO-- LOOP UNTIL WE FIND DEVICE
    585	001724					ERROR	<Illegal device "<3>">
	000110	   011 	   111 	   154 		.ASCIZ	""<11>"Illegal device "<3>""<5>""
	000113	   154 	   145 	   147
	000116	   141 	   154 	   040
	000121	   144 	   145 	   166
	000124	   151 	   143 	   145
	000127	   040 	   003 	   005
	000132	   000
	001724	012746 	000110'			MOV	#$$$,-(SP)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 26-1
SETUP SAVE FILE

	001730	004737 	006074'			JSR	PC,TYPMSG
    586	001734				DEVOK:
    587	001734	023727 	000042'	041104 		CMP	DEVNAM,#"DB	;THIS AN RP04/RP06?
    588	001742	001402 				BEQ	10$		;YES-- OK
    589	001744	105037 	000053'			CLRB	RHFLAG		;NO-- DON'T READ HOM BLOCKS
    590	001750				10$:
    591	001750	010037 	000002'			MOV	R0,DRVADR	;SAVE DRIVER TABLE ENTRY ADDRESS
    592	001754	010537 	000040'			MOV	R5,PUDADR	;SAVE THE PUD ADDRESS OF THE SAVE DEVICE
    593	001760	010500 				MOV	R5,R0		;COPY THE PUD ADDRESS
    594	001762	162700 	000000G			SUB	#.PUDBA,R0	;MAKE R0 INDEX INTO THE PUD
    595	001766	012701 	000000G			MOV	#U.SZ,R1	;COMPUTE AN INDEX
    596	001772					CALL	$DIV		; INTO THE PUD
	001772	004737 	000000G			JSR	PC,$DIV
    597	001776	110037 	000045'			MOVB	R0,PUDIDX	;SAVE THE INDEX
    598					;
    599					; MOUNT THE SPECIFIED VOLUME IF /MO TYPED
    600					;
    601	002002				DEVMNT:
    602	002002	105737 	000051'			TSTB	MOFLAG		;/MO?
    603	002006	001424 				BEQ	SETFIL		;NO-- DON'T MOUNT THE DEVICE
    604	002010	005765 	000000G			TST	U.VA(R5)	;IS THE VOLUME MOUNTED?
    605	002014	001015 				BNE	MOUNTD		;YES-- GO ON
    606					;
    607	002016					CALL	FNDACP		;FIND ACP ADDRESS
	002016	004737 	006712'			JSR	PC,FNDACP
    608	002022	010265 	000000G			MOV	R2,U.ACP(R5)	;SAVE THE ADDRESS SO MOUNT DOESN'T COMPLAIN
    609					;
    610	002026	012702 	001110'			MOV	#MNTBLK,R2	;SET TO MOUNT VOLUME
    611	002032					CALL	FILMNT		;DO THE MOUNT
	002032	004737 	006732'			JSR	PC,FILMNT
    612	002036	103010 				BCC	SETFIL		;OK-- GO ON
    613	002040					ERROR	<Mount error "<7>">
	000133	   011 	   115 	   157 		.ASCIZ	""<11>"Mount error "<7>""<5>""
	000136	   165 	   156 	   164
	000141	   040 	   145 	   162
	000144	   162 	   157 	   162
	000147	   040 	   007 	   005
	000152	   000
	002040	012746 	000133'			MOV	#$$$,-(SP)
	002044	004737 	006074'			JSR	PC,TYPMSG
    614	002050				MOUNTD:
    615	002050					WARN	<Device "<3>" already mounted>
	000153	   012 	   104 	   145 		.ASCIZ	""<12>"Device "<3>" already mounted"<1>""
	000156	   166 	   151 	   143
	000161	   145 	   040 	   003
	000164	   040 	   141 	   154
	000167	   162 	   145 	   141
	000172	   144 	   171 	   040
	000175	   155 	   157 	   165
	000200	   156 	   164 	   145
	000203	   144 	   001 	   000
	002050	012746 	000153'			MOV	#$$$,-(SP)
	002054	004737 	006074'			JSR	PC,TYPMSG
    616					;
    617					; SET UP DISK ADDRESS TO SPECIFIC PLACE IF /AB (ABSOLUTE) SPECIFIED
    618					;
    619	002060				SETFIL:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 26-2
SETUP SAVE FILE

    620					.IF DF FTABS
    621						TSTB	ABFLAG		;ABSOLUTE DISK SAVE?
    622						BNE	FILABS		;YES-- SET UP ABSOLUTE FILE
    623					.ENDC ; .IF DF FTABS
    624					;	BR	FILFND		;NO-- FIND FILE (5,5)
    625					;
    626					; FIND SAVE FILE (5,5) AND EXTEND IT IF NECESSARY
    627					;
    628	002060				FILFND:
    629	002060	012701 	001076'			MOV	#FIDBLK,R1	;ADDRESS OF FILE-ID BLOCK FOR (5,5)
    630					;
    631					; DO AN ACCESS FOR EXTEND TO FIND IF FILE EXISTS AND WHERE IT IS
    632					;
    633	002064	012700 	007400 			MOV	#IO.ACE,R0	;SET TO ACCESS FOR EXTEND
    634	002070	012702 	001102'			MOV	#ATCBLK,R2	;SET UP ATTRIBUTE CONTROL BLOCK ADDRESS
    635	002074	005003 				CLR	R3		;NO EXTEND CONTROOL
    636	002076	005004 				CLR	R4		; . .
    637	002100	012705 				MOV	(PC)+,R5	;ENABLE ACCESS
    638	002102	   000 	   200 			.BYTE	0,AC.ENA	; . .
    639	002104					CALL	FILQIO		;DO IT TO (5,5)
	002104	004737 	006746'			JSR	PC,FILQIO
    640	002110	103444 				BCS	15$		;ERROR-- JUST CLOSE FILE
    641					;
    642					; FIND OUT HOW BIG THE SAVE FILE SHOULD BE AND SEE IF IT IS BIG ENOUGH
    643					;  CURRENT SIZE IS RETURNED IN DSKSIZ+0, DSKSIZ+2 BY ACCESS
    644					;
    645	002112	013704 	001166'			MOV	SAVLMT+2,R4	; +++002 GET UPPER TASK LIMIT
    646	002116	062704 	003777 			ADD	#3777,R4	; +++002 ROUND UP
    647	002122	042704 	003777 			BIC	#3777,R4	; +++002 TO NEXT K OF WORDS
    648	002126	000241 				CLC			; +++002 CLEAR SIGN BIT AND
    649	002130	006004 				ROR	R4		; +++002 CONVERT TO 32. WORD BLOCKS
    650	002132	006204 				ASR	R4		; +++002
    651	002134	006204 				ASR	R4		; +++002
    652	002136	006204 				ASR	R4		; +++002
    653	002140	006204 				ASR	R4		; +++002
    654	002142	006204 				ASR	R4		; +++002
    655	002144	010437 	000014'			MOV	R4,MEMSIZ	;SAVE THIS FOR WRITING FILE
    656	002150	006204 				ASR	R4		;CONVERT 32. WORD BLOCKS TO 64. WORD BLOCKS
    657	002152	006204 				ASR	R4		; 128. WORD BLOCKS
    658	002154	006204 				ASR	R4		; 256. WORD BLOCKS
    659	002156	105737 	000010'			TSTB	DSKSIZ+0	;IS FILE BIGGER THAN 2**16 BLOCKS????
    660	002162	003017 				BGT	15$		;YES-- CERTAINLY BIG ENOUGH
    661	002164	163704 	000012'			SUB	DSKSIZ+2,R4	;NO-- FIND HOW MUCH MORE  SPACE WE NEED
    662	002170	003414 				BLE	15$		;BIG ENOUGH-- JUST CLOSE
    663	002172	113737 	000057'	000056'		MOVB	ACFLAG,QEFLAG	;ERROR IF WE WERE HERE BEFORE
    664	002200	001010 				BNE	15$		;SO GIVE ERROR
    665					;
    666					; FILE IS NOT BIG ENOUGH-- DO AN EXTEND ON IT, EXTEND INCREMENT IN R4
    667					;
    668	002202	012700 	011400 			MOV	#IO.EXT,R0	;NOT ENOUGH-- SET TO EXTEND FILE
    669	002206	012703 				MOV	(PC)+,R3	;MAKE FILE CONTIGUOUS,
    670	002210	   000 	   205 			.BYTE	0,EX.ENA!EX.AC1!EX.FCO ; HIGH EXTEND INCREMENT= 0
    671	002212	005002 				CLR	R2		;NO ATTRIB
    672	002214	005005 				CLR	R5		; AND NO ACCESS
    673	002216					CALL	FILQIO		;DO IT TO (5,5), EXTEND INCREMENT IN R4
	002216	004737 	006746'			JSR	PC,FILQIO
    674					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 26-3
SETUP SAVE FILE

    675					; DEACCESS FILE.  R5= 0 IF EXTEND DONE, QEFLAG= -VE IF ERROR OCCURED
    676					;
    677	002222				15$:
    678	002222	012700 	010000 			MOV	#IO.DAC,R0	;DE-ACCESS FILE
    679	002226	005002 				CLR	R2		;NO ATTRIBUTE CONTROL BLOCK
    680	002230	005003 				CLR	R3		;NO EXTEND BITS
    681	002232	005004 				CLR	R4		; . .
    682	002234					CALL	FILQIO		;DO IT TO (5,5)
	002234	004737 	006746'			JSR	PC,FILQIO
    683	002240	103004 				BCC	FILCHK		;NO ERRRORS-- GO CHECK OUT THE FILE
    684	002242					ERROR	<Create SAVE file (5,5) error "<7>">
	000206	   011 	   103 	   162 		.ASCIZ	""<11>"Create SAVE file (5,5) error "<7>""<5>""
	000211	   145 	   141 	   164
	000214	   145 	   040 	   123
	000217	   101 	   126 	   105
	000222	   040 	   146 	   151
	000225	   154 	   145 	   040
	000230	   050 	   065 	   054
	000233	   065 	   051 	   040
	000236	   145 	   162 	   162
	000241	   157 	   162 	   040
	000244	   007 	   005 	   000
	002242	012746 	000206'			MOV	#$$$,-(SP)
	002246	004737 	006074'			JSR	PC,TYPMSG
    685	002252				FILCHK:
    686	002252	105237 	000057'			INCB	ACFLAG		;FLAG ONE ACCESS
    687	002256	005705 				TST	R5		;DID WE DO AN EXTEND?
    688	002260	001677 				BEQ	FILFND		;YES-- GO BACK AND RE-ACCESS
    689	002262	005000 				CLR	R0		;GET HIGH
    690	002264	153700 	000004'			BISB	DSKADR+0,R0	; DISK ADDRESS (WITHOUT SIGN-EXTEND)
    691	002270	013701 	000006'			MOV	DSKADR+2,R1	;AND ALSO LOW PART
    692	002274	001006 				BNE	FILOK		;NON-ZERO-- WE HAVE A FILE
    693	002276	005700 				TST	R0		;ZERO-- HIGH PART ZERO TOO?
    694	002300	001004 				BNE	FILOK		;NO-- FILE MUST BE CONTIGUOUS (LUCKILY)
    695	002302					ERROR	<SAVE file (5,5) not contiguous>
	000247	   011 	   123 	   101 		.ASCIZ	""<11>"SAVE file (5,5) not contiguous"<5>""
	000252	   126 	   105 	   040
	000255	   146 	   151 	   154
	000260	   145 	   040 	   050
	000263	   065 	   054 	   065
	000266	   051 	   040 	   156
	000271	   157 	   164 	   040
	000274	   143 	   157 	   156
	000277	   164 	   151 	   147
	000302	   165 	   157 	   165
	000305	   163 	   005 	   000
	002302	012746 	000247'			MOV	#$$$,-(SP)
	002306	004737 	006074'			JSR	PC,TYPMSG
    696	002312				FILOK:
    697	002312	013705 	000002'			MOV	DRVADR,R5	;GET ADDRESS OF DRIVER TABLE ENTRY
    698	002316					CALL	@DRVSET(R5)	;CALL PROPER ROUTINE TO SET ADDRESS
	002316	004775 	000002 			JSR	PC,@DRVSET(R5)
    699					.IF DF FTABS
    700						BR	FILSET		;SAVE ADDRESSES AND GO ON
    701					;
    702					; SAVE TO ABSOLUTE DISK ADDRESS-- SET UP DSKADR+0, DSKADR+2
    703					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 26-4
SETUP SAVE FILE

    704					FILABS:
    705						MOV	SAVLMT+2,R5	; +++002 GET UPPER TASK LIMIT
    706						ADD	#3777,R5	; +++002 ROUND UP
    707						BIC	#3777,R5	; +++002 TO NEXT K OF WORDS
    708						CLC			; +++002 CLEAR SIGN BIT AND
    709						ROR	R5		; +++002 CONVERT TO 32. WORD BLOCKS
    710						ASR	R5		; +++002
    711						ASR	R5		; +++002
    712						ASR	R5		; +++002
    713						ASR	R5		; +++002
    714						ASR	R5		; +++002
    715						MOV	R5,MEMSIZ	;SAVE THIS FOR WRITING FILE
    716						MOV	DRVADR,R5	;GET ADDRESS OF DRIVER TABLE ENTRY
    717						CALL	@DRVABS(R5)	;CALL PROPER ABSOLUTE SET ROUTINE
    718					.ENDC ; .IF DF FTABS
    719	002322				FILSET:
    720	002322	010037 	000004'			MOV	R0,DSKADR+0	;SAVE THE ADDRESS
    721	002326	010137 	000006'			MOV	R1,DSKADR+2	; BOTH HALVES
    722					;	BR	FILDMO		;GO DISMOUNT (IF /DM)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 27
DISMOUNT ALL MOUNTED VOLUMES

    724						.SBTTL	DISMOUNT ALL MOUNTED VOLUMES
    725					;
    726					; DO DISMOUNT OF ALL VOLUMES IF /DM SPECIFIED
    727					;
    728	002332				FILDMO:
    729	002332	105737 	000052'			TSTB	DMFLAG		;HE WANT IT DISMOUNTED?
    730	002336	001457 				BEQ	SYSAVE		;NO-- JUST GO SAVE SYSTEM
    731	002340	012702 	001116'			MOV	#DMTBLK,R2	;YES-- SET TO DISMOUNT
    732	002344	012705 	000000G			MOV	#.PUDBA,R5	;START AT BEGINNINING OF THE PUD
    733	002350				FILDM1:
    734	002350	020565 	000000G			CMP	R5,U.RP(R5)	;REDIRECTED?
    735	002354	001043 				BNE	FILDMX		;YES-- WE'LL FIND THE REAL ONE
    736	002356	005765 	000000G			TST	U.VA(R5)	;IS VOLUME MOUNTED?
    737	002362	001440 				BEQ	FILDMX		;NO-- JUST GO ON
    738	002364					ALUN$S	#DSKLUN,U.DN(R5),U.UN(R5) ;YES-- ASSIGN THIS DEVICE
	002364	016546 	000000G			MOV	U.UN(R5),-(SP)
	002370	016546 	000000G			MOV	U.DN(R5),-(SP)
	002374	012746 	000002 			MOV	#DSKLUN,-(SP)
	002400	012746 				MOV	(PC)+,-(SP)
	002402	   007 	   004 			.BYTE	7.,4
	002404	104375 				EMT	375
    739	002406	013700 	000000G			MOV	$DSW,R0		;(IN CASE OF ERROR)
    740	002412	103405 				BCS	DMOERR		;OOPS-- THIS CAN'T HAPPEN!!!!
    741					;
    742	002414				FILDM2:
    743	002414					PUSH	R5		;SAVE THE PUD POINTER
	002414	010546 				MOV	R5,-(SP)
    744	002416					CALL	FILMNT		;DO THE DISMOUNT FUNCTION
	002416	004737 	006732'			JSR	PC,FILMNT
    745	002422					POP	R5		;RESTORE THE POINTER
	002422	012605 				MOV	(SP)+,R5
    746	002424	103004 				BCC	FILDM3		;OK-- GO ON TO NEXT ENTRY
    747	002426				DMOERR:
    748	002426					ERROR	<"<3>" dismount error "<7>">
	000310	   011 	   003 	   040 		.ASCIZ	""<11>""<3>" dismount error "<7>""<5>""
	000313	   144 	   151 	   163
	000316	   155 	   157 	   165
	000321	   156 	   164 	   040
	000324	   145 	   162 	   162
	000327	   157 	   162 	   040
	000332	   007 	   005 	   000
	002426	012746 	000310'			MOV	#$$$,-(SP)
	002432	004737 	006074'			JSR	PC,TYPMSG
    749	002436				FILDM3:
    750	002436	005765 	000000G			TST	U.VA(R5)	;DID IT REALLY DISMOUNT THE VOLUME?
    751	002442	001404 				BEQ	FILDM4		;YES-- OK
    752	002444					ERROR	<"<3>" cannot be dismounted>
	000335	   011 	   003 	   040 		.ASCIZ	""<11>""<3>" cannot be dismounted"<5>""
	000340	   143 	   141 	   156
	000343	   156 	   157 	   164
	000346	   040 	   142 	   145
	000351	   040 	   144 	   151
	000354	   163 	   155 	   157
	000357	   165 	   156 	   164
	000362	   145 	   144 	   005
	000365	   000
	002444	012746 	000335'			MOV	#$$$,-(SP)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 27-1
DISMOUNT ALL MOUNTED VOLUMES

	002450	004737 	006074'			JSR	PC,TYPMSG
    753	002454				FILDM4:
    754	002454					TYPE	<["<3>" dismounted]"<1>">
	000366	   133 	   003 	   040 		.ASCIZ	"["<3>" dismounted]"<1>""
	000371	   144 	   151 	   163
	000374	   155 	   157 	   165
	000377	   156 	   164 	   145
	000402	   144 	   135 	   001
	000405	   000
	002454	012746 	000366'			MOV	#$$$,-(SP)
	002460	004737 	006074'			JSR	PC,TYPMSG
    755	002464				FILDMX:
    756	002464	062705 	000000G			ADD	#U.SZ,R5	;OK-- BUMP TO NEXT ENTRY IN THE PUD
    757	002470	020527 	000000G			CMP	R5,#.PUDEA	;AT THE END OF THE PUD?
    758	002474	103725 				BLO	FILDM1		;NOPE-- BACK FOR SOME MORE
    759					;	BR	SYSAVE		;YES-- ON TO SAVE THE SYSTEM
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 28
SAVE SYSTEM STATE

    761						.SBTTL	SAVE SYSTEM STATE
    762					;
    763					; GET CURRENT TIME STUFF FOR TYPE-OUT
    764					;
    765	002476				SYSAVE:
    766	002476					GTIM$S	#GTIMBF		;GET CURRENT TIME PARAMETERS FOR SAVE FILE
	002476	012746 	000020'			MOV	#GTIMBF,-(SP)
	002502	012746 				MOV	(PC)+,-(SP)
	002504	   073 	   002 			.BYTE	59.,2
	002506	104375 				EMT	375
    767					;
    768					; SEE IF QUEUED PROTOCOL IS RUNNING.  IF SO, WE CANNOT CONTINUE.
    769					;
    770	002510	032737 	000000C	000002G		BIT	#EF.PR1!EF.PR2,.COMEF+2 ;IS ANY PROTOCOL RUNNING ?
    771	002516	001404 				BEQ	SYSAV1		;NO-- ALL OK
    772	002520					ERROR	<DTE-20 Protocol running>
	000406	   011 	   104 	   124 		.ASCIZ	""<11>"DTE-20 Protocol running"<5>""
	000411	   105 	   055 	   062
	000414	   060 	   040 	   120
	000417	   162 	   157 	   164
	000422	   157 	   143 	   157
	000425	   154 	   040 	   162
	000430	   165 	   156 	   156
	000433	   151 	   156 	   147
	000436	   005 	   000
	002520	012746 	000406'			MOV	#$$$,-(SP)
	002524	004737 	006074'			JSR	PC,TYPMSG
    773					;
    774					; RAISE PRIORITY TO 7 TO LOCK OUT INTERRUPTS
    775					;
    776	002530				SYSAV1:
    777	002530	012737 	000401 	000000G		MOV	#401,.NOERR	;DIS-ALLOW KL ERROR REPORTING
    778	002536					.INH			;;;AND RAISE TO PRIORITY 7
	002536	013746 	177776 			MOV	PS,-(SP)
	002542	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
    779					;
    780					; TURN THE CLOCK OFF
    781					;
    782	002550	005037 	177546 			CLR	@#LKS		;;;CLEAR CLOCK STATUS
    783					;
    784					; FIX UP BOTH BOOTS TO POINT TO US AND THE RIGHT FILE
    785					;
    786	002554	013705 	000002'			MOV	DRVADR,R5	;;;GET DRIVER TABLE ENTRY ADDRESS
    787	002560	013775 	000014'	000010 		MOV	MEMSIZ,@DRVMSZ(R5) ;;;SET SIZE OF MEMORY
    788	002566	013775 	000004'	000012 		MOV	DSKADR+0,@DRVAD1(R5) ;;;SET FIRST HALF OF DISK ADDRESS
    789	002574	013775 	000006'	000014 		MOV	DSKADR+2,@DRVAD2(R5) ;;; AND SECOND HALF
    790					.IF DF M$$MGE
    791						MOV	UPAR0,@DRVUP0(R5) ;;;ALSO OUR PAGE ADDRESS
    792					.ENDC
    793					;
    794					; SET BOOT PARAMTER IN R0 WITH LOAD FLAGS= 01 (SO KLINIT WON'T BE CALLED)
    795					;
    796	002602	113700 	000044'			MOVB	DEVUNT,R0	;;;GET THE DEVICE UNIT #
    797	002606	000300 				SWAB	R0		;;;SET IT TO BITS 10-8
    798	002610	056500 	000016 			BIS	DRVBTP(R5),R0	;;;SET PROPER BIT IN BOOT PARAMETER WORD
    799	002614	052700 	000002 			BIS	#BP.LD0,R0	;;;SET FLAGS= 01
    800					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 28-1
SAVE SYSTEM STATE

    801					; SAVE KT-11 STUFF, IF ANY
    802					;
    803	002620	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;SET PREVIOUS MODE KERNAL
    804					.IF DF M$$MGE
    805						MOV	#KPDR0,R1	;;;ADDRESS KERNAL DR'S
    806						MOV	#KPAR0,R2	;;; AND KERNAL AR'S
    807						MOV	#UPDR0,R3	;;; USER DR'S
    808						MOV	#UPAR0,R4	;;; AND AR'S
    809						MOV	#8.,R5		;;;8 REGITERS PER SET
    810					30$:
    811						PUSH	<(R1)+,(R2)+,(R3)+,(R4)+> ;;;SAVE ALL ON STACK
    812						SOB	R5,30$		;;;ALL OF 'EM
    813						PUSH	<R1,R2,R3,R4>	;;;SAVE ADDR'S TO RESTORE
    814					;
    815					; SAVE STACK LIMIT AND KERNAL SP
    816					;
    817						PUSH	STKLIM		;;;SAVE STACK LIMIT
    818						MFPI	SP		;;; AND KERNAL STACK
    819					;
    820					; POINT TO ABSOLUTE ZERO, USING UPAR1, FOR COPY OF BOOT
    821					;
    822						MOV	#77406,UPDR1	;;;MAP MAXIMUM SIZE (4096 WORDS)
    823						CLR	UPAR1		;;; TO REAL ABSOLUTE ZERO
    824						MOV	#20000,R1	;;; FROM 20000 IN VIRTUAL SPACE
    825					.IFF
    826	002626	005001 				CLR	R1		;;;ADDRESS ABSOLUTE 0 (NO KT-11)
    827					.ENDC
    828					;
    829					; COPY LOW CORE (FIRST 256. WORDS) TO SAVE AREA LOWCOR, AND
    830					;  COPY PROPER BOOT TO LOW CORE.
    831					;
    832					; NOTE THAT R1 POINTS TO ABSOLUTE ZERO, KT-11 OR NOT
    833					;
    834	002630	013705 	000002'			MOV	DRVADR,R5	;;;GET DRIVER ADDRESS BACK
    835	002634	016503 	000004 			MOV	DRVBOT(R5),R3	;;;GET ADDRESS OF BOOT CODE
    836	002640	012702 	000064'			MOV	#LOWCOR,R2	;;;POINT TO SAVE AREA
    837	002644	012704 	000400 			MOV	#256.,R4	;;;COPY 256. WORDS
    838	002650				41$:
    839	002650	011122 				MOV	(R1),(R2)+	;;;MOVE A WORD TO SAVE AREA
    840	002652	012321 				MOV	(R3)+,(R1)+	;;; AND COPY A WORD OF BOOT
    841	002654	077403 				SOB	R4,41$		;;;COPY ALL 256
    842					;
    843	002656	010041 				MOV	R0,-(R1)	;;;SAVE BOOT PARAMETER AT LOCATION 776
    844	002660					PUSH	<R1,R2>		;;;SAVE POINTERS FOR RESTORE
	002660	010146 				MOV	R1,-(SP)
	002662	010246 				MOV	R2,-(SP)
    845					;
    846					; WHAT'S ON THE STACK?
    847					;
    848					;	SP+00	R2 (RESTORE POINTER TO SAVE AREA)
    849					;	SP+02	R1 (RESTORE POINTER TO LOW CORE)
    850					; KT-11 ONLY:
    851					;	SP+04	KERNAL SP
    852					;	SP+06	STKLIM
    853					;	SP+10	POINTERS TO KT-11 REGISTERS TO RESTORE
    854					;	SP+12
    855					;	SP+14
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 28-2
SAVE SYSTEM STATE

    856					;	SP+16
    857					;	SP+20	KT-11 REGISTERS
    858					;	...
    859					;	SP+116
    860					;
    861					;	SP+NN	(BOTTOM OF STACK) USER PS FROM .INH
    862					;
    863					; SO LET'S SAVE SP IN SPSAVE
    864					;
    865	002664	010637 	000000'			MOV	SP,SPSAVE	;;;SAVE SP UNTIL WE RESTORE
    866					;	BR	WTSAVE		;;;NOW WRITE SAVE FILE AND BOOT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 29
WRITE SAVE FILE AND BOOT

    868						.SBTTL	WRITE SAVE FILE AND BOOT
    869					;
    870					; WRITE SAVE FILE.  DSK ADDRESS IS IN DSKADR+0 AND DSKADR+2
    871					;
    872	002670				WTSAVE:
    873	002670	105337 	000047'			DECB	WSFLAG		;;;WRITE SAVE FILE?
    874	002674	002012 				BGE	10$		;;;YES-- GO DO IT
    875	002676	105337 	000046'			DECB	WBFLAG		;;; /WB SPECIFIED?
    876	002702	002414 				BLT	RESTORE		;;;NO-- ALL DONE WITH SAVE-- BRING SYSTEM BACK UP
    877	002704	005037 	000004'			CLR	DSKADR+0	;;;YES-- WRITE BOOT TO BLOCK 0
    878	002710	005037 	000006'			CLR	DSKADR+2	;;; . . .
    879	002714	012737 	000010 	000014'		MOV	#256.*2/100,MEMSIZ ;;;GET # 100 BYTE BLOCKS TO WRITE
    880	002722				10$:
    881	002722	013705 	000002'			MOV	DRVADR,R5	;;;GET ADDRESS OF DEVICE DRIVER TABLE ENTRY
    882	002726					CALL	@DRVWRT(R5)	;;;CALL PROPER WRITE ROUTINE
	002726	004775 	000006 			JSR	PC,@DRVWRT(R5)
    883	002732	000756 				BR	WTSAVE		;;;GO BACK AND DO WRITE AGAIN
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 30
RESTORE SYSTEM STATE

    885						.SBTTL	RESTORE SYSTEM STATE
    886					;
    887					; TRANSFER HERE ON TWO CONDITIONS:
    888					;	1) FROM BOOTSTRAP WITH FRESHLY BOOT'ED SYSTEM
    889					;	2) FROM SAVE COMPLETING A WRITE OF THE SYSTEM IMAGE
    890					;
    891					; THE ACTION IS THE SAME IN EITHER CASE.
    892					;
    893	002734				RESTORE::
    894	002734	013706 	000000'			MOV	SPSAVE,SP	;;;RESTORE OUR STACK
    895					; SEE IF CHK11 IS TO RUN
    896	002740	017600 	000002 			MOV	@2(SP),R0	;;; GET BOOT PARAMETERS FROM 776
    897	002744	010037 	000000G			MOV	R0,.BTPRM	;;; SAVE IN EXEC
    898	002750	032700 	000001 			BIT	#BP.SWR,R0	;;; SWITCH REGISTER BOOT ?
    899	002754	001411 				BEQ	CKDONE		;;; BRANCH IF NOT
    900	002756	032700 	000006 			BIT	#BP.LD1!BP.LD0,R0 ;;; BITS 1 OR 2 UP ?
    901	002762	001006 				BNE	CKDONE		;;; BRANCH IF NO CHK11
    902	002764					CALL	CHK.11		;;; DO SYSINI
	002764	004737 	011476'			JSR	PC,CHK.11
    903	002770	   122 	   123 	   130 		.ASCIZ	\RSX-20F\
	002773	   055 	   062 	   060
	002776	   106 	   000
    904	003000				CKDONE:
    905					;
    906					; RESTORE LOW CORE FROM SAVE AREA
    907					;
    908	003000	013706 	000000'			MOV	SPSAVE,SP	;;;RESET THE STACK POINTER(CHK11 DESTROYS)
    909	003004					POP	<R2,R1>		;;;RESTORE SAVED POINTERS TO CORE
	003004	012602 				MOV	(SP)+,R2
	003006	012601 				MOV	(SP)+,R1
    910					.IF DF M$$MGE
    911						MOV	#77406,UPDR1	;;;MAP ALL OF
    912						CLR	UPAR1		;;; LOW CORE TO 20000
    913					.IFTF
    914	003010	012100 				MOV	(R1)+,R0	;;;GET BOOT PARAMETER FROM LOCATION 776
    915	003012	012705 	000400 			MOV	#256.,R5	;;;RESTORE ALL 256 WORDS
    916	003016				20$:
    917	003016	014241 				MOV	-(R2),-(R1)	;;;RESTORE A WORD
    918	003020	077502 				SOB	R5,20$		;;;LOOP FOR WHOLE BLOCK
    919					;
    920					; RESTORE KT-11 REGISTERS (IF ANY)
    921					;
    922					.IFT
    923						MTPI	SP		;;;RESTORE KERNAL SP
    924						POP	STKLIM		;;; AND STACK LIMIT
    925					;
    926						POP	<R4,R3,R2,R1>	;;;RESTORE SAVED POINTERS TO KT-11
    927						MOV	#8.,R5		;;;8 REGISTERS PER SET
    928					30$:
    929						POP	<-(R4),-(R3),-(R2),-(R1)> ;;;RESTORE 4 REGISTERS
    930						SOB	R5,30$		;;;LOOP FOR ALL REGISTERS
    931					.ENDC
    932	003022	005037 	000062'			CLR	ALTDXF		;;; +++006 RESET THE FLOPPY FLAG
    933	003026	013700 	000000G			MOV	.BTPRM,R0	;;; R0 NEEDS BOOT PARAMETER
    934					;	BR	SETCTY		;;;ONWARD!!
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 31
RESTORE -- SETUP CTY LINE # AND DH-11 TABLES

    936						.SBTTL	RESTORE -- SETUP CTY LINE # AND DH-11 TABLES
    937					;
    938					; SET THE CTY TO THE LINE INDICATED BY THE BOOT PARAMETER, NOW IN R0
    939					;
    940	003032				SETCTY:
    941	003032	010005 				MOV	R0,R5		;;;ALSO SAVE BOOT PARAM FOR US TO USE
    942	003034	042700 	177607 			BIC	#^C<BP.CSP>,R0	;;;TRIM TO CONSOLE SPEED, BITS 6-3
    943	003040	001450 				BEQ	SETDL		;;; +++005 CTY NOT SPEC-- LEAVE IT ALONE
    944	003042	012704 	000000G			MOV	#DLTBL,R4	;;;ASSUME DL-11
    945	003046	006200 				ASR	R0		;;;SHIFT THE SPEED FIELD
    946	003050	006200 				ASR	R0		;;; OVER TO A WORD INDEX INTO TABLE, BITS 4-1
    947	003052	016003 	001124'			MOV	DHSTAB(R0),R3	;;;GET THE SPEED WORD FOR THE SPECIFIED TYPE
    948	003056	001406 				BEQ	50$		;;;NOT A DH-11-- GO ON FOR DL-11
    949					;
    950	003060	010504 				MOV	R5,R4		;;;DH-11-- GET THE PARAM AGAIN
    951	003062	042704 	174377 			BIC	#^C<BP.UNT>,R4	;;;TRIM TO DH UNIT NUMBER, BITS 10-8
    952	003066	006204 				ASR	R4		;;;SHIFT INTO PLACE, 16*8=128 BYTES PER DH UNIT, BITS 9-7
    953	003070	062704 	000000G			ADD	#DHTBL,R4	;;;GET DH UNIT TABLE ADDRESS
    954	003074				50$:
    955	003074	010500 				MOV	R5,R0		;;;GET THE WORD BACK
    956	003076	042700 	103777 			BIC	#^C<BP.CLN>,R0	;;;GET JUST LINE NUMBER, BITS 14-11
    957	003102	000300 				SWAB	R0		;;;MAKE THAT 8 BYTES PER LINE, BITS 6-3
    958	003104	060004 				ADD	R0,R4		;;;GET TABLE ADDRESS OF NEW CTY
    959					;
    960	003106	006200 				ASR	R0		;;;GET LINE NUMBER *4
    961	003110	006200 				ASR	R0		;;; LINE NUMBER *2, WORD INDEX
    962	003112	016037 	000000G	000000G		MOV	BITTBL(R0),$BTMSK ;;;GET THE BIT FOR THE LINE TO DH BIT MASK FOR CTY
    963	003120	006200 				ASR	R0		;;;GET LINE NUMBER WITHIN DH UNIT
    964	003122	010037 	000000G			MOV	R0,$UNIT	;;;STORE THAT UNIT NUMBER
    965					;
    966	003126	013700 	000000G			MOV	CTYPTR,R0	;;;GET OLD CTY TABLE ENTRY POINTER
    967	003132	042760 	000000G	000000G		BIC	#TT.CTY,STSW1(R0) ;;;MARK NOT THE CTY ANY MORE
    968	003140	010437 	000000G			MOV	R4,CTYPTR	;;;SET THE NEW CTY TABLE ENTRY
    969	003144	010437 	000000C			MOV	R4,.DQPBA+<Q.SZ*<D.CCTY-1>>+Q.DA ;;;SET THE -10 CTY POINTER TO US, ALSO
    970	003150	052764 	000000G	000000G		BIS	#TT.CTY,STSW1(R4) ;;;SET THIS AS THE CTY
    971	003156	010364 	000000G			MOV	R3,STSW0(R4)	;;;SET DH PARAMETERS FROM SPEED
    972					;
    973					; RESET DL11 TABLE FOR CONFIGURATION
    974					;
    975	003162				SETDL:
    976	003162	012737 	000000G	000000C		MOV	#KBS0,DLTBL+TTYEXP ;;; INIT THE EXTERNAL PAGE ADDRESSES
    977	003170	012737 	000000G	000000C		MOV	#KBS1,DLTBL+TTYEXP+10
    978	003176	012737 	175630 	000000C		MOV	#175630,DLTBL+TTYEXP+20
    979	003204	012737 	175640 	000000C		MOV	#175640,DLTBL+TTYEXP+30
    980	003212	012737 	175650 	000000C		MOV	#175650,DLTBL+TTYEXP+40 ;;; SO
    981	003220	013746 	000004 			MOV	@#4,-(SP)	;;; [4.1.1138] SAVE THE TRAP-AT-4 VECTOR
    982	003224	012737 	003254'	000004 		MOV	#10$,@#4	;;; [4.1.1138] SET UP ALTERNATE
    983	003232	012700 	000000G			MOV	#KBS1,R0	;;; [4.1.1138] POINT TO THE KLINIK LINE
    984	003236	032710 	010000 			BIT	#DL.CAR,(R0)	;;; [4.1.1138] IS CARRIER UP??
    985	003242	001005 				BNE	20$		;;; [4.1.1138] YES -- GO ON
    986	003244	005010 				CLR	(R0)		;;; [4.1.1138] NO -- RESET IT
    987	003246	005060 	000004 			CLR	4(R0)		;;; [4.1.1138] SO
    988	003252	000401 				BR	20$		;;; [4.1.1138] RESTORE TRAP VECTOR
    989						;
    990	003254				10$:
    991	003254	032626 				BIT	(SP)+,(SP)+	;;; [4.1.1138] FLUSH TRAP PS/PC
    992	003256				20$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 31-1
RESTORE -- SETUP CTY LINE # AND DH-11 TABLES

    993	003256	012637 	000004 			MOV	(SP)+,@#4	;;; [4.1.1138] RESTORE TRAP VECTOR
    994					;
    995					; RESET DH TABLE SO THAT WE CAN CONFIGURE UP
    996					;
    997	003262				SETDH:
    998	003262	012700 	160020 			MOV	#DHEXPA,R0	;;;GET EXT PAGE ADDR OF FIRST DH
    999	003266	012701 	000000C			MOV	#DHTBL+TTYEXP,R1	;;; AND TABLE ADDRESS FOR SAME
   1000	003272				10$:
   1001	003272	012702 	000020 			MOV	#16.,R2		;;;# LINES PER DH
   1002	003276				20$:
   1003	003276	010011 				MOV	R0,(R1)		;;;SET THIS DH EXTERNAL PAGE ADDRESS
   1004	003300	062701 	000010 			ADD	#8.,R1		;;;BUMP TO NEXT TABLE ENTRY
   1005	003304	077204 				SOB	R2,20$		;;;LOOP FOR ALL LINES IN THIS DH
   1006					;
   1007	003306	062700 	000020 			ADD	#DHEXPZ,R0	;;;BUMP TO NEXT DH
   1008	003312	020127 	000000G			CMP	R1,#TTYEND	;;;END OF TABLE YET?
   1009	003316	103765 				BLO	10$		;;;NO-- DO NEXT DH
   1010					;
   1011					; HERE TO RESET THE DM-11/BB TABLE
   1012					;
   1013	003320				SETDM:
   1014	003320	012700 	170500 			MOV	#DMEXPA,R0	;;; [4.1.1091] EXTERNAL PAGE ADDRESS OF FIRST DM-11/BB
   1015	003324	012701 	000000G			MOV	#DMTBL,R1	;;; [4.1.1091] POINT TO THE DM-11/BB TABLE
   1016	003330	012702 	000010 			MOV	#8.,R2		;;; [4.1.1091] MAX NUMBER OF DM-11/BB'S
   1017	003334				10$:
   1018	003334	010011 				MOV	R0,(R1)		;;; [4.1.1091] SET THE EXTERNAL PAGE ADDRESS
   1019	003336	032121 				BIT	(R1)+,(R1)+	;;; [4.1.1091] BUMP THE TABLE POINTER
   1020	003340	062700 	000010 			ADD	#10,R0		;;; [4.1.1091] AND THE EXTERNAL PAGE ADDRESS
   1021	003344	077205 				SOB	R2,10$		;;; [4.1.1091] LOOP THROUGH ALL DM-11/BB'S
   1022					;	BR	REDSY		;;;CONTINUE . .
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 32
RESTORE -- REDIRECT SY0: TO BOOT DEVICE

   1024						.SBTTL	RESTORE -- REDIRECT SY0: TO BOOT DEVICE
   1025					;
   1026					; IF THIS WAS A SAVE TO SY, REDIRECT SY TO POINT TO BOOT UNIT
   1027					;
   1028	003346				REDSY:
   1029	003346	010501 				MOV	R5,R1		;;;GET BACK THE BOOT PARAM
   1030	003350	106301 				ASLB	R1		;;;SHIFT BITS 6-4 INTO 7-5
   1031	003352	120127 	000060 			CMPB	R1,#3*BIT4	;;;IS SPEED FIELD 0-2?
   1032	003356	103401 				BLO	10$		;;;YES-- UNIT # IS OK
   1033	003360	005001 				CLR	R1		;;;NO-- 3-17-- UNIT # IS ZERO
   1034	003362				10$:
   1035	003362	000301 				SWAB	R1		;;;BRING UNIT # INTO BITS 2-0
   1036	003364	042701 	177770 			BIC	#^C<7>,R1	;;;TRIM TO THREE BITS
   1037					;
   1038	003370	013700 	000042'			MOV	DEVNAM,R0	;;;GET DEVICE NAME
   1039	003374					CALL	FINDEV		;;;ATTEMPT TO FIND BOOT DEVICE
	003374	004737 	006654'			JSR	PC,FINDEV
   1040	003400	103004 				BCC	30$		;;;GOT IT-- OK
   1041	003402	013705 	000040'			MOV	PUDADR,R5	;;;NOT FOUND-- GET OLD PUD ENTRY ADDRESS
   1042	003406	110165 	000000G			MOVB	R1,U.UN(R5)	;;;MAKE IT THE NEW UNIT #
   1043	003412				30$:
   1044	003412	010504 				MOV	R5,R4		;;;SAVE THE PUD ENTRY ADDRESS
   1045	003414	005037 	000040'			CLR	PUDADR		;;;ASSUME FAILURE
   1046	003420	012700 	054523 			MOV	#"SY,R0		;;;GET THE
   1047	003424	005001 				CLR	R1		;;; PUD ENTRY ADDRESS
   1048	003426					CALL	FINDEV		;;;  FOR SY0:
	003426	004737 	006654'			JSR	PC,FINDEV
   1049	003432	103547 				BCS	DTECHK		;;;OOPS-- GIVE UP
   1050	003434	010465 	000000G			MOV	R4,U.RP(R5)	;;;REDIRECT SY0 TO BOOT DEVICE
   1051	003440	010405 				MOV	R4,R5		;;;GET BOOT PUD ENTRY ADDRESS BACK
   1052	003442	010537 	000040'			MOV	R5,PUDADR	;;; AND SAVE IT
   1053					;
   1054					; UPDATE ALL TASKS FROM OLD SAVE DEVICE TO NEW SYSTEM DEVICE
   1055					;
   1056	003446				40$:
   1057	003446	010500 				MOV	R5,R0		;;;COPY THE PUD ADDRESS
   1058	003450	162700 	000000G			SUB	#.PUDBA,R0	;;;MAKE IT INDEX INTO PUD
   1059	003454	012701 	000000G			MOV	#U.SZ,R1	;;;SET ENTRY SIZE AS DIVISOR
   1060	003460					CALL	$DIV		;;;COMPUTE PUD INDEX FOR NEW SY INTO R0
	003460	004737 	000000G			JSR	PC,$DIV
   1061					;
   1062	003464	013703 	000000G			MOV	.STDTA,R3	;;;GET THE ADDRESS OF THE BEGINNING OF SYSTEM TASK DIRECTORY
   1063	003470	010304 				MOV	R3,R4		;;;COPY IT AGAIN
   1064	003472	063704 	000000G			ADD	.STDTZ,R4	;;;FIND ADDRESS OF LAST ENTRY IN STD
   1065	003476				45$:
   1066	003476	012302 				MOV	(R3)+,R2	;;;GET AN STD ENTRY ADDRESS
   1067	003500	032762 	000000G	000000G		BIT	#SF.FX,S.FW(R2)	;;;FIXED TASK (I.E. NOT DISK-LOADED)?
   1068	003506	001006 				BNE	47$		;;;YES-- DON'T CHANGE IT'S DISK
   1069	003510	126237 	000000G	000045'		CMPB	S.DI(R2),PUDIDX	;;;IS THIS TASK FROM ORIGINAL SAVE DEVICE?
   1070	003516	001002 				BNE	47$		;;;NO-- GO ON
   1071	003520	110062 	000000G			MOVB	R0,S.DI(R2)	;;;YES-- UPDATE DISK INDICATOR TO NEW SYSTEM DEVICE
   1072	003524				47$:
   1073	003524	020304 				CMP	R3,R4		;;;AT END OF STD YET?
   1074	003526	101763 				BLOS	45$		;;;NO-- KEEP LOOPING FOR ALL TASKS
   1075					;	BR	RP4CHK		;;;MORE & MORE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 33
RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S

   1077						.SBTTL	RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S
   1078					;
   1079					; CHECK THE RP TO MAKE SURE IT IS ON-LINE AND IN A/B MODE
   1080					;
   1081	003530				RP4CHK:
   1082	003530	105737 	000053'			TSTB	RHFLAG		;;;SHOULD WE CHECK THE RP?
   1083	003534	001417 				BEQ	RP6CHK		;;;NO-- JUST GO ON
   1084	003536	116537 	000000G	176710 		MOVB	U.UN(R5),RPCS2	;;;YES-- SET TO PROPER UNIT #
   1085	003544	032737 	010000 	176712 		BIT	#RPMOL,RPDS	;;;IS THE RP ON-LINE?
   1086	003552	001002 				BNE	35$		;;;YES-- GO ON
   1087	003554	105237 	000054'			INCB	RNFLAG		;;;NO-- REMEMBER THAT IT ISN'T
   1088	003560				35$:
   1089	003560	032737 	001000 	176712 		BIT	#RPPGM,RPDS	;;;PROGRAMMABLE MODE (A/B)?
   1090	003566	001002 				BNE	RP6CHK		;;;YES-- ALL OK
   1091	003570	105237 	000055'			INCB	RPFLAG		;;;NO-- REMEMBER THAT IT ISN'T
   1092					;
   1093					; CHECK TO FIND ALL THE RP06'S MASQUERADING AS RP04'S
   1094					;
   1095	003574				RP6CHK:
   1096	003574	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;INSURE PREVIOUS KERNAL
   1097	003602	012704 	000006 			MOV	#6,R4		;;;POINT TO TIME-OUT TRAP
   1098	003606					MFPI	(R4)		;;;SAVE PS OF TRAP
	003606	011446 				MOV	(R4),-(SP)
   1099	003610					MFPI	-(R4)		;;; AND PC
	003610	014446 				MOV	-(R4),-(SP)
   1100	003612					MTPS	#80$,(R4)+	;;;SET NEW PC
	003612	012724 	003742'			MOV	#80$,(R4)+
   1101	003616					MTPS	@#PS,(R4)	;;; AND PS AS CURRENT STATE
	003616	013714 	177776 			MOV	@#PS,(R4)
   1102	003622	012700 	041104 			MOV	#"DB,R0		;;;WE ARE CHECKING DB'S
   1103	003626	012701 	000007 			MOV	#7,R1		;;; AND THERE ARE 8 OF THEM
   1104	003632				10$:
   1105	003632					CALL	FINDEV		;;;FIND THIS DB UNIT IN PUD
	003632	004737 	006654'			JSR	PC,FINDEV
   1106	003636	103436 				BCS	70$		;;;NOT THERE-- CARRY ON
   1107	003640	012765 	050700 	000000G		MOV	#50700,U.LBN(R5) ;;;ASSUME RP04-- SET LOW PART OF VOLUME SIZE
   1108	003646	112765 	000002 	000000G		MOVB	#2,U.LBH(R5)	;;; AND HIGH PART
   1109	003654	110137 	176710 			MOVB	R1,RPCS2+0	;;;SELECT THIS UNIT
   1110	003660	032737 	001400 	176712 		BIT	#RPDPR!RPPGM,RPDS ;;;DRIVE EXIST FOR US?
   1111	003666	001422 				BEQ	70$		;;;NO-- SKIP IT
   1112	003670	012702 	023420 			MOV	#10000.,R2	;;;SET TIME-OUT COUNT IF PORT BUSY
   1113	003674				20$:
   1114	003674	032737 	004000 	176700 		BIT	#RPDVA,RPCS1	;;;DRIVE AVAILABLE AT THIS TIME?
   1115	003702	001004 				BNE	30$		;;;YES-- CHECK IT OUT
   1116	003704	112737 	000001 	176700 		MOVB	#RPNOOP+RPGO,RPCS1+0 ;;;NO-- DO NOOP TO GET IT
   1117	003712	077210 				SOB	R2,20$		;;;LOOP UNTIL WE HAVE IT
   1118	003714				30$:
   1119	003714	123727 	176726 	000022 		CMPB	RPDT+0,#RPDT06	;;;THIS AN RP06?
   1120	003722	002404 				BLT	70$		;;;NO-- SIZE IS OK
   1121	003724	006365 	000000G			ASL	U.LBN(R5)	;;;YES-- DOUBLE
   1122	003730	106165 	000000G			ROLB	U.LBH(R5)	;;; THE VOLUME SIZE
   1123	003734				70$:
   1124	003734	005301 				DEC	R1		;;;COUNT DOWN TO NEXT UNIT #
   1125	003736	002335 				BGE	10$		;;;NOT DONE-- LOOP FOR ALL 8
   1126	003740	000401 				BR	90$		;;;ALL DONE-- GO ON
   1127					;
   1128	003742				80$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 33-1
RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S

   1129	003742	022626 				CMP	(SP)+,(SP)+	;;;TIME-OUT TRAP-- REMOVE TRAP FROM STACK
   1130	003744				90$:
   1131	003744					MTPI	-(R4)		;;;RESTORE TRAP AT 4 PC
	003744	012644 				MOV	(SP)+,-(R4)
   1132	003746					MTPI	2(R4)		;;; AND PS
	003746	012664 	000002 			MOV	(SP)+,2(R4)
   1133					;	BR	DTECHK		;;;CARRY ON
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 34
RESTORE -- CHECK ALL THE DTE-20'S

   1135						.SBTTL	RESTORE -- CHECK ALL THE DTE-20'S
   1136					;
   1137					; CHECK TO MAKE SURE THAT ALL DTE-20'S ARE AT PRIORITY 6
   1138					;
   1139	003752				DTECHK:
   1140	003752	005000 				CLR	R0		;;;RESET DTE #
   1141	003754	012701 	001000 			MOV	#DTVECA+4,R1	;;;POINT TO HIGHEST DTE VECTOR ADDRESS
   1142	003760	012702 	174400 			MOV	#DTEXPA,R2	;;; ALSO TO EXTERNAL PAGE ADDRESS FOR #0
   1143	003764	005003 				CLR	R3		;;;RESET POINTER TO THE PRIVILEDGED DTE
   1144	003766	105337 	000061'			DECB	DEFLAG		;;;SAY DTE-20 OK
   1145					;
   1146	003772	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;INSURE PREVIOUS KERNAL
   1147	004000	012704 	000006 			MOV	#6,R4		;;;POINT TO TIMEOUT VECTOR
   1148	004004					MFPI	(R4)		;;;SAVE THE PS
	004004	011446 				MOV	(R4),-(SP)
   1149	004006					MFPI	-(R4)		;;; AND PC FOR TIMEOUT
	004006	014446 				MOV	-(R4),-(SP)
   1150	004010					MTPS	#60$,(R4)+	;;;SET WHERE TO GO ON NON-EX DTE
	004010	012724 	004112'			MOV	#60$,(R4)+
   1151	004014					MTPS	@#PS,(R4)	;;; AND HOW TO GET THERE
	004014	013714 	177776 			MOV	@#PS,(R4)
   1152	004020				10$:
   1153	004020					MFPI	-(R1)		;;;SAVE PS OF THIS DTE VECTOR
	004020	014146 				MOV	-(R1),-(SP)
   1154	004022					MFPI	-(R1)		;;; AND PC
	004022	014146 				MOV	-(R1),-(SP)
   1155	004024					MTPS	#50$,(R1)+	;;;WHERE TO GO IF IT INTERRUPTS
	004024	012721 	004104'			MOV	#50$,(R1)+
   1156	004030					MTPS	@#PS,(R1)	;;; AND HOW SUCH
	004030	013711 	177776 			MOV	@#PS,(R1)
   1157					;
   1158	004034	005712 				TST	(R2)		;;;DTE EXIST? (TRAP IF NOT TO 60$)
   1159	004036	032762 	000010 	000034 		BIT	#DTRSMD,DTSTAT(R2) ;;;THIS PRIVILEDGED DTE-20?
   1160	004044	001402 				BEQ	20$		;;;YES-- THIS IS THE ONE
   1161	004046	005703 				TST	R3		;;;NO-- FOUND A DTE YET?
   1162	004050	001001 				BNE	30$		;;;YES-- DON'T REMEMBER THIS ONE
   1163	004052				20$:
   1164	004052	010203 				MOV	R2,R3		;;;FIRST OR PRIV DTE-- SAVE IT
   1165	004054				30$:
   1166	004054	012762 	004040 	000034 		MOV	#DT11DB!DTINON,DTSTAT(R2) ;;;RING OUR DOORBELL (FROM THE INSIDE)
   1167	004062	112737 	000240 	177776 		MOVB	#PR5,@#PS	;;;BRING DOWN TO PRI 5
   1168	004070	110037 	000061'			MOVB	R0,DEFLAG	;;;DID NOT INTERRUPT-- SAVE DTE # NOT AT PRI 6
   1169	004074	024646 				CMP	-(SP),-(SP)	;;;FAKE TRAP ON STACK
   1170	004076	152737 	000340 	177776 		BISB	#PR7,@#PS	;;;RESTORE PRI 7
   1171	004104				50$:
   1172	004104	012762 	002010 	000034 		MOV	#DTINOF!DTCL11,DTSTAT(R2) ;;;CLEAR RINGING DOORBELL
   1173	004112				60$:
   1174	004112	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;; AND PREVIOUS MODE KERNAL
   1175	004120	022626 				CMP	(SP)+,(SP)+	;;;REMOVE TRAP FROM STACK
   1176	004122					MTPI	-(R1)		;;;RESTORE PC FOR DTE VECTOR
	004122	012641 				MOV	(SP)+,-(R1)
   1177	004124					MTPI	2(R1)		;;; AND PS
	004124	012661 	000002 			MOV	(SP)+,2(R1)
   1178	004130	062702 	000040 			ADD	#DTEXPZ,R2	;;;BUMP TO NEXT DTE-20 EXT PAGE ADDR
   1179	004134	005200 				INC	R0		;;; AND COUNT UP
   1180	004136	020027 	000004 			CMP	R0,#4		;;;DONE WITH DTE'S?
   1181	004142	002726 				BLT	10$		;;;NOPE-- BACK FOR ANOTHER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 34-1
RESTORE -- CHECK ALL THE DTE-20'S

   1182					;
   1183	004144	010337 	000000G			MOV	R3,PROTBL	;;; SET UP "DTENM" IN "PROTBL"
   1184	004150	010337 	000000G			MOV	R3,.PRDTE	;;;SAVE THE ADDRESS OF THE PRIV DTE
   1185	004154	001402 				BEQ	95$		;;;NOT THERE-- LEAVE STATUS ZERO, TOO
   1186	004156	062703 	000034 			ADD	#DTSTAT,R3	;;;BUMP TO STATUS
   1187	004162				95$:
   1188	004162	010337 	000000G			MOV	R3,.PRSTA	;;;SAVE THAT ADDR, TOO
   1189					;
   1190	004166					MTPI	-(R4)		;;;RESTORE PC OF TIMEOUT TRAP
	004166	012644 				MOV	(SP)+,-(R4)
   1191	004170					MTPI	2(R4)		;;; AND PS
	004170	012664 	000002 			MOV	(SP)+,2(R4)
   1192	004174	013700 	000000G			MOV	.BTPRM,R0	;;;GET BOOT PARAMETER WORD AND
   1193	004200	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ;;;ISOLATE THE LOAD SWITCHES
   1194	004204	022700 	000004 			CMP	#BP.LD1,R0	;;;IF SWITCHES = 10
   1195	004210	001004 				BNE	SYSTRT		;;;THEN
   1196	004212	005037 	000000G			CLR	.NOERR		;;;ALLOW ERRORS
   1197	004216					CALL	..DTP2		;;;START SECONDARY PROTOCOL AND
	004216	004737 	000000G			JSR	PC,..DTP2
   1198					;	BR	SYSTRT		;;;START SYSTEM GOING
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 35
RESTORE -- RESTART SYSTEM AND TYPE HERALD

   1200						.SBTTL	RESTORE -- RESTART SYSTEM AND TYPE HERALD
   1201					;
   1202					; FORCE POWER-RECOVERY AST BY SETTING EV.PF AND
   1203					;  FAKING AN ENABLE TASK SWITCHING REQUEST (FROM PR3 TO PR0)
   1204					;
   1205	004222				SYSTRT:
   1206	004222	005037 	000000G			CLR	.DATE3		;;;INDICATE THAT THE DATE IS NOW INVALID
   1207	004226	005037 	000000G			CLR	.CPUSN		;;; [TCO 4.2333] INVALIDATE SERIAL NUMBER
   1208	004232	005037 	000000G			CLR	.HRDWR		;;; [TCO 4.2233] AND HARDWARE OPTIONS
   1209	004236	012737 	000000G	000000G		MOV	#EV.PF,.SERFG	;;;SET POWER-RECOVERY SIGNIFICANT EVENT
   1210	004244					CALL	..ENB0		;ENABLE TASK SWITCHING
	004244	004737 	000000G			JSR	PC,..ENB0
   1211					;
   1212					; SEE IF WRITE ERROR OCCURED DURING SAVE (WEFLAG NON-ZERO)
   1213					;
   1214	004250	105737 	000060'			TSTB	WEFLAG		;WRITE SUCCESFUL?
   1215	004254	001404 				BEQ	DTEMSG		;YES-- ALL OK
   1216	004256					ERROR	<Write error>
	000440	   011 	   127 	   162 		.ASCIZ	""<11>"Write error"<5>""
	000443	   151 	   164 	   145
	000446	   040 	   145 	   162
	000451	   162 	   157 	   162
	000454	   005 	   000
	004256	012746 	000440'			MOV	#$$$,-(SP)
	004262	004737 	006074'			JSR	PC,TYPMSG
   1217					;
   1218					; SEE IF DTE-20 PRIORITY CHECK FAILED
   1219					;
   1220	004266				DTEMSG:
   1221	004266	005737 	000000G			TST	.PRDTE		;DID WE FIND A DTE-20
   1222	004272	001007 				BNE	DTPMSG		;YES-- SEE IF OK
   1223	004274	005037 	000000G			CLR	.PRSTA		;IF HE CONTINUES . . .
   1224	004300					TYPE	<"<11>"No DTE-20"<1>">
	000456	   011 	   116 	   157 		.ASCIZ	""<11>"No DTE-20"<1>""
	000461	   040 	   104 	   124
	000464	   105 	   055 	   062
	000467	   060 	   001 	   000
	004300	012746 	000456'			MOV	#$$$,-(SP)
	004304	004737 	006074'			JSR	PC,TYPMSG
   1225	004310	000407 				BR	DTPMS1		;GO FLOP
   1226					;
   1227	004312				DTPMSG:
   1228	004312	113700 	000061'			MOVB	DEFLAG,R0	;WE FAIL THE CHECK?
   1229	004316	002414 				BLT	SYSMSG		;NO-- ALL OK
   1230	004320					TYPE	<"<11>"DTE-20 #"<7>" not at priority level 6"<1>">
	000472	   011 	   104 	   124 		.ASCIZ	""<11>"DTE-20 #"<7>" not at priority level 6"<1>""
	000475	   105 	   055 	   062
	000500	   060 	   040 	   043
	000503	   007 	   040 	   156
	000506	   157 	   164 	   040
	000511	   141 	   164 	   040
	000514	   160 	   162 	   151
	000517	   157 	   162 	   151
	000522	   164 	   171 	   040
	000525	   154 	   145 	   166
	000530	   145 	   154 	   040
	000533	   066 	   001 	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 35-1
RESTORE -- RESTART SYSTEM AND TYPE HERALD

	004320	012746 	000472'			MOV	#$$$,-(SP)
	004324	004737 	006074'			JSR	PC,TYPMSG
   1231	004330				DTPMS1:
   1232	004330					.INH			;;;BACK UP TO NOTHING-NESS
	004330	013746 	177776 			MOV	PS,-(SP)
	004334	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   1233	004342	000777 				BR	.		;;;WAIT FOR SOMEONE TO PICK UP THE PIECES
   1234	004344					.ENB			;;;THE PIECES HAVE BEEN PICKED UP
	004344	012637 	177776 			MOV	(SP)+,@#PS	;;
   1235					;
   1236					; TYPE SYSTEM MESSAGE
   1237					;
   1238	004350				SYSMSG:
   1239	004350	012700 	000000G			MOV	#.VERNO,R0	; +++003 POINT TO VERSION # STRING
   1240	004354					TYPE	<"<1><1>"RSX-20F "<4>" "<6><1><1>"> ; +++003
	000536	   001 	   001 	   122 		.ASCIZ	""<1><1>"RSX-20F "<4>" "<6><1><1>""
	000541	   123 	   130 	   055
	000544	   062 	   060 	   106
	000547	   040 	   004 	   040
	000552	   006 	   001 	   001
	000555	   000
	004354	012746 	000536'			MOV	#$$$,-(SP)
	004360	004737 	006074'			JSR	PC,TYPMSG
   1241					;	BR	MNTSY		;UPWARD
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 36
RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:

   1243						.SBTTL	RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:
   1244					;
   1245					; TYPE REDIRECTED MESSAGE, MOUNT SY IF SO
   1246	004364				MNTSY:				; +++001
   1247	004364	013705 	000040'			MOV	PUDADR,R5	;GET THE PUD ENTRY FOR THE SY DEVICE
   1248	004370	001503 				BEQ	REDHOM		; +++006 GIVE UP IF NONE
   1249	004372	005037 	000062'			CLR	ALTDXF		; +++006 RESET THE FLOPPY FLAG
   1250	004376					TYPE	<[SY0: redirected to "<3>"]"<1>">
	000556	   133 	   123 	   131 		.ASCIZ	"[SY0: redirected to "<3>"]"<1>""
	000561	   060 	   072 	   040
	000564	   162 	   145 	   144
	000567	   151 	   162 	   145
	000572	   143 	   164 	   145
	000575	   144 	   040 	   164
	000600	   157 	   040 	   003
	000603	   135 	   001 	   000
	004376	012746 	000556'			MOV	#$$$,-(SP)
	004402	004737 	006074'			JSR	PC,TYPMSG
   1251	004406				MNTSY1:				; +++006
   1252	004406					ALUN$S	#DSKLUN,U.DN(R5),U.UN(R5) ;ASSIGN THE DEVICE
	004406	016546 	000000G			MOV	U.UN(R5),-(SP)
	004412	016546 	000000G			MOV	U.DN(R5),-(SP)
	004416	012746 	000002 			MOV	#DSKLUN,-(SP)
	004422	012746 				MOV	(PC)+,-(SP)
	004424	   007 	   004 			.BYTE	7.,4
	004426	104375 				EMT	375
   1253	004430	103422 				BCS	MNTSY2		; +++001 OOPS -- SEE IF OTHER FLOPPY MOUNT NEEDED
   1254	004432	005765 	000000G			TST	U.VA(R5)	;VOLUME ALREADY MOUNTED?????
   1255	004436	001060 				BNE	REDHOM		;YES-- SKIP THIS
   1256	004440					CALL	FNDACP		;NO-- FIND ACP FOR DEVICE
	004440	004737 	006712'			JSR	PC,FNDACP
   1257	004444	010265 	000000G			MOV	R2,U.ACP(R5)	;AND SET IT FOR MOUNT
   1258	004450	012702 	001110'			MOV	#MNTBLK,R2	;GOT IT-- POINT TO MOUNT
   1259	004454					PUSH	R5		;  +++006 SAVE R5
	004454	010546 				MOV	R5,-(SP)
   1260	004456					CALL	FILMNT		;MOUNT DEVICE
	004456	004737 	006732'			JSR	PC,FILMNT
   1261	004462					POP	R5		; +++006 RESTORE R5
	004462	012605 				MOV	(SP)+,R5
   1262	004464	103014 				BCC	SYMNTD		;MOUNTED
   1263	004466					WARN	<Mount "<10>" error "<7>">
	000606	   012 	   115 	   157 		.ASCIZ	""<12>"Mount "<10>" error "<7>""<1>""
	000611	   165 	   156 	   164
	000614	   040 	   010 	   040
	000617	   145 	   162 	   162
	000622	   157 	   162 	   040
	000625	   007 	   001 	   000
	004466	012746 	000606'			MOV	#$$$,-(SP)
	004472	004737 	006074'			JSR	PC,TYPMSG
   1264	004476				MNTSY2:
   1265	004476	026527 	000000G	054104 		CMP	U.DN(R5),#"DX	; +++006 MOUNT DX: FAIL??
   1266	004504	001035 				BNE	REDHOM		; +++006 NO -- GO ON
   1267	004506	005737 	000062'			TST	ALTDXF		; +++006 YES -- WAS IT THE BOOT DEVICE??
   1268	004512	001405 				BEQ	SYMNT1		; +++006 YES -- TRY TO MOUNT THE OTHER (AND HOPE...)
   1269	004514	000431 				BR	REDHOM		; +++006 NO -- TRY TO READ HOME BLOCKS
   1270						;
   1271	004516				SYMNTD:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 36-1
RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:

   1272	004516					TYPE	<["<10>" mounted]"<1>">
	000630	   133 	   010 	   040 		.ASCIZ	"["<10>" mounted]"<1>""
	000633	   155 	   157 	   165
	000636	   156 	   164 	   145
	000641	   144 	   135 	   001
	000644	   000
	004516	012746 	000630'			MOV	#$$$,-(SP)
	004522	004737 	006074'			JSR	PC,TYPMSG
   1273	004526				SYMNT1:				; +++006 HERE TO MOUNT "OTHER" FLOPPY
   1274	004526	016500 	000000G			MOV	U.DN(R5),R0	; +++006 DEVICE NAME TO R0
   1275	004532	016501 	000000G			MOV	U.UN(R5),R1	; +++006 DEVICE NUMBER TO R1
   1276	004536	022700 	054104 			CMP	#"DX,R0		; +++006 IS IT A DX??
   1277	004542	001016 				BNE	REDHOM		; +++006 NO -- SEE IF IT HAS HOME BLOCKS
   1278	004544	005101 				COM	R1		; +++006 NO -- FIND THE "OTHER" FLOPPY DEVICE NUMBER
   1279	004546	042701 	177776 			BIC	#^C1,R1		; +++006 EITHER "0" OR "1"
   1280	004552	005237 	000062'			INC	ALTDXF		; +++006 MARK THAT WE LOOKING FOR THE "OTHER" ONE
   1281	004556					CALL	FINDEV		; +++006 FIND ITS "PUD" ENTRY
	004556	004737 	006654'			JSR	PC,FINDEV
   1282	004562	010537 	000040'			MOV	R5,PUDADR	; +++006 SET UP "PUDADR"
   1283	004566	103307 				BCC	MNTSY1		; +++006 ALL OK -- TRY TO MOUNT IT
   1284	004570					WARN	<CANNOT FIND SECOND DX:>
	000645	   012 	   103 	   101 		.ASCIZ	""<12>"CANNOT FIND SECOND DX:"<1>""
	000650	   116 	   116 	   117
	000653	   124 	   040 	   106
	000656	   111 	   116 	   104
	000661	   040 	   123 	   105
	000664	   103 	   117 	   116
	000667	   104 	   040 	   104
	000672	   130 	   072 	   001
	000675	   000
	004570	012746 	000645'			MOV	#$$$,-(SP)
	004574	004737 	006074'			JSR	PC,TYPMSG
   1285					;	BR	REDHOM		;GO READ THE HOM BLOCKS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 37
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1287						.SBTTL	RESTORE -- READ HOM BLOCKS ON BOOT DB
   1288					;
   1289					; READ HOM BLOCKS FROM DB0 TO SEE IF WE HAVE A FILE SYSTEM ON IT
   1290					;
   1291	004600				REDHOM:
   1292	004600	105737 	000053'			TSTB	RHFLAG		;SHOULD WE READ THE HOM BLOCKS?
   1293	004604	001542 				BEQ	RQSKLR		; +++001 NO-- JUST CHECK KLINIK LINE
   1294	004606	105737 	000054'			TSTB	RNFLAG		;RP NOT READY?
   1295	004612	001113 				BNE	RNRERR		;YES-- COMPLAIN
   1296	004614	105737 	000055'			TSTB	RPFLAG		;RP IN PROGRAMMABLE (A/B) MODE?
   1297	004620	001404 				BEQ	REDHM1		;YES-- GO WORK ON IT
   1298	004622					WARN	<"<10>" not in programmable (A/B) mode>
	000676	   012 	   010 	   040 		.ASCIZ	""<12>""<10>" not in programmable (A/B) mode"<1>""
	000701	   156 	   157 	   164
	000704	   040 	   151 	   156
	000707	   040 	   160 	   162
	000712	   157 	   147 	   162
	000715	   141 	   155 	   155
	000720	   141 	   142 	   154
	000723	   145 	   040 	   050
	000726	   101 	   057 	   102
	000731	   051 	   040 	   155
	000734	   157 	   144 	   145
	000737	   001 	   000
	004622	012746 	000676'			MOV	#$$$,-(SP)
	004626	004737 	006074'			JSR	PC,TYPMSG
   1299	004632				REDHM1:
   1300	004632	005003 				CLR	R3		;CLEAR COUNT OF # TIMES WE SAW 'HOM'
   1301	004634	012705 	000001 			MOV	#1,R5		;START WITH HOM BLOCK AT LBN 1
   1302	004640				20$:
   1303	004640	012700 	001000 			MOV	#IO.RLB,R0	;DO A READ LOGICAL BLOCK FUNCTION
   1304	004644	012701 	000064'			MOV	#HOMBUF,R1	; TO THE HOM BLOCK BUFFER
   1305	004650	012702 	001000 			MOV	#512.,R2	;ONE BLOCK'S WORTH
   1306	004654	005004 				CLR	R4		;CLEAR LOW-ORDER LBN
   1307	004656					CALL	FILQIO		;DO IT TO THE DB0
	004656	004737 	006746'			JSR	PC,FILQIO
   1308	004662	103462 				BCS	RHMERR		;ERROR-- GO REPORT IT
   1309					;
   1310	004664	022711 	105755 			CMP	#SXBTHM,(R1)	;IS THIS A SIXBIT/HOM/ BLOCK?
   1311	004670	001013 				BNE	30$		;NO-- LOOK NO FARTHER
   1312	004672	005703 				TST	R3		;YES-- ALREADY SEEN A GOOD HOM BLOCK?
   1313	004674	001010 				BNE	29$		;YES-- DON'T USE THIS ONE
   1314					;
   1315	004676	012701 	000370'			MOV	#HOMBUF+<HOMFE0*4>,R1 ;NO-- ADDRESS OUR WORDS IN HOM BLOCK
   1316	004702	012702 	000000G			MOV	#.RPADR,R2	; AND WHERE TO STORE THEM
   1317	004706	012122 				MOV	(R1)+,(R2)+	;(LH HOMFE0) (.RPADR+0) HIGH-ORDER DISK ADDRESS
   1318	004710	012122 				MOV	(R1)+,(R2)+	;(RH HOMFE0) (.RPADR+2) LOW-ORDER DISK ADDRESS
   1319	004712	012122 				MOV	(R1)+,(R2)+	;(LH HOMFE1) (.RPSIZ+0) HIGH-ORDER SIZE
   1320	004714	012122 				MOV	(R1)+,(R2)+	;(RH HOMFE1) (.RPSIZ+2) LOW-ORDER SIZE
   1321	004716				29$:
   1322	004716	005203 				INC	R3		;SAY WE SAW ANOTHER GOOD HOM BLOCK
   1323	004720				30$:
   1324	004720	005305 				DEC	R5		;WERE WE LOOKING AT
   1325	004722	003003 				BGT	40$		; BLOCK #1?
   1326	004724	012705 	000012 			MOV	#10.,R5		;YES-- ALSO TRY BLOCK 10.
   1327	004730	000743 				BR	20$		;BACK TO LOOK AT IT
   1328					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 37-1
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1329	004732				40$:
   1330	004732	005303 				DEC	R3		;HOW MANY 'HOM' BLOCKS DID WE SEE?
   1331	004734	002447 				BLT	ALLRXF		;0-- DISK IS ALL OURS
   1332	004736	001412 				BEQ	HBCERR		;1-- CONSISTENCY ERROR
   1333	004740	012705 	000004 			MOV	#4,R5		;2-- TOPS FILE SYSTEM
   1334	004744	012701 	000370'			MOV	#HOMBUF+<HOMFE0*4>,R1 ;POINT TO SECOND HOM BLOCK AREA
   1335	004750	012702 	000000G			MOV	#.RPADR,R2	; AND TO WHAT WE GOT FROM FIRST BLOCK
   1336	004754				50$:
   1337	004754	022122 				CMP	(R1)+,(R2)+	;CHECK FOR CONSISTENCY
   1338	004756	001002 				BNE	HBCERR		;OOPS-- HOM BLOCKS DON'T AGREE
   1339	004760	077503 				SOB	R5,50$		;LOOP FOR ALL FOUR WORDS
   1340	004762	000404 				BR	SETRXF		;CHECKS OUT-- JUST CHECK THE FLAG
   1341					;
   1342	004764				HBCERR:
   1343	004764					WARN	<TOPS HOM block consistency error on "<10>">
	000741	   012 	   124 	   117 		.ASCIZ	""<12>"TOPS HOM block consistency error on "<10>""<1>""
	000744	   120 	   123 	   040
	000747	   110 	   117 	   115
	000752	   040 	   142 	   154
	000755	   157 	   143 	   153
	000760	   040 	   143 	   157
	000763	   156 	   163 	   151
	000766	   163 	   164 	   145
	000771	   156 	   143 	   171
	000774	   040 	   145 	   162
	000777	   162 	   157 	   162
	001002	   040 	   157 	   156
	001005	   040 	   010 	   001
	001010	   000
	004764	012746 	000741'			MOV	#$$$,-(SP)
	004770	004737 	006074'			JSR	PC,TYPMSG
   1344					;	BR	SETRXF		;USE GOOD (OR FIRST) HOM BLOCK
   1345					;
   1346	004774				SETRXF:
   1347	004774	005737 	000000G			TST	.RPADR+0	;IS BIT 2 OF HOMFE0 (BIT 15 OF .RPADR+0) SET?
   1348	005000	100442 				BMI	SOMRXF		;YES-- JUST CLEAR THE FLAG
   1349	005002					WARN	<No RSX-20F file system on "<10>">
	001011	   012 	   116 	   157 		.ASCIZ	""<12>"No RSX-20F file system on "<10>""<1>""
	001014	   040 	   122 	   123
	001017	   130 	   055 	   062
	001022	   060 	   106 	   040
	001025	   146 	   151 	   154
	001030	   145 	   040 	   163
	001033	   171 	   163 	   164
	001036	   145 	   155 	   040
	001041	   157 	   156 	   040
	001044	   010 	   001 	   000
	005002	012746 	001011'			MOV	#$$$,-(SP)
	005006	004737 	006074'			JSR	PC,TYPMSG
   1350	005012				NOTRXF:
   1351	005012	012703 	000000G			MOV	#.RPADR,R3	;POINT TO AREA
   1352	005016	005023 				CLR	(R3)+		;CLEAR
   1353	005020	005023 				CLR	(R3)+		; ALL
   1354	005022	005023 				CLR	(R3)+		; FOUR
   1355	005024	005023 				CLR	(R3)+		; WORDS
   1356	005026	000431 				BR	RQSKLR		; +++001 ALL DONE
   1357					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 37-2
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1358	005030				RHMERR:
   1359	005030					WARN	<TOPS HOM block read error "<7>" on "<10>">
	001047	   012 	   124 	   117 		.ASCIZ	""<12>"TOPS HOM block read error "<7>" on "<10>""<1>""
	001052	   120 	   123 	   040
	001055	   110 	   117 	   115
	001060	   040 	   142 	   154
	001063	   157 	   143 	   153
	001066	   040 	   162 	   145
	001071	   141 	   144 	   040
	001074	   145 	   162 	   162
	001077	   157 	   162 	   040
	001102	   007 	   040 	   157
	001105	   156 	   040 	   010
	001110	   001 	   000
	005030	012746 	001047'			MOV	#$$$,-(SP)
	005034	004737 	006074'			JSR	PC,TYPMSG
   1360	005040	000411 				BR	ALLRX1		;ASSUME ALL OF DISK
   1361					;
   1362	005042				RNRERR:
   1363	005042					WARN	<"<10>" not ready>
	001112	   012 	   010 	   040 		.ASCIZ	""<12>""<10>" not ready"<1>""
	001115	   156 	   157 	   164
	001120	   040 	   162 	   145
	001123	   141 	   144 	   171
	001126	   001 	   000
	005042	012746 	001112'			MOV	#$$$,-(SP)
	005046	004737 	006074'			JSR	PC,TYPMSG
   1364	005052	000417 				BR	RQSKLR		; +++001 LEAVE ADDR/SIZE ALONE
   1365					;
   1366	005054				ALLRXF:
   1367	005054					WARN	<No TOPS file system on "<10>">
	001130	   012 	   116 	   157 		.ASCIZ	""<12>"No TOPS file system on "<10>""<1>""
	001133	   040 	   124 	   117
	001136	   120 	   123 	   040
	001141	   146 	   151 	   154
	001144	   145 	   040 	   163
	001147	   171 	   163 	   164
	001152	   145 	   155 	   040
	001155	   157 	   156 	   040
	001160	   010 	   001 	   000
	005054	012746 	001130'			MOV	#$$$,-(SP)
	005060	004737 	006074'			JSR	PC,TYPMSG
   1368	005064				ALLRX1:
   1369	005064	012703 	000000G			MOV	#.RPADR,R3	;ADDRESS WORDS TO SET
   1370	005070	005023 				CLR	(R3)+		;HIGH ADDRESS:0
   1371	005072	012723 	000001 			MOV	#1,(R3)+	;LOW ADDRESS: BLOCK 1
   1372	005076	012723 	000177 			MOV	#177,(R3)+	;HIGH SIZE: MAX TO 24 BITS
   1373	005102	012723 	177777 			MOV	#-1,(R3)+	; LOW SIZE: MAX ALSO
   1374	005106				SOMRXF:
   1375	005106	105037 	000001G			CLRB	.RPADR+1	;CLEAR HIGH BYTE OF HIGH ADDRESS
   1376					;	BR	RQSKLR		; +++001 GO CHECK KLINIK LINE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 38
RESTORE -- CKECK STATE OF KLINIK LINE

   1378						.SBTTL	RESTORE -- CKECK STATE OF KLINIK LINE
   1379					;
   1380					;	CHECK STATE OF KLINIK LINE
   1381					;
   1382	005112				RQSKLR:
   1383	005112					CLEF$S	#E.FTMO		; +++001 RESET TIMEOUT FLAG
	005112	012746 	000002 			MOV	#E.FTMO,-(SP)
	005116	012746 				MOV	(PC)+,-(SP)
	005120	   037 	   002 			.BYTE	31.,2
	005122	104375 				EMT	375
   1384	005124	013705 	000000G			MOV	KLNPTR,R5	; +++001 KLINIK LINE BLOCK POINTER TO R5
   1385	005130	016504 	000000G			MOV	TTYEXP(R5),R4	; +++001 I/O PAGE ADDRESS TO R4
   1386	005134	001002 				BNE	5$		; +++009 BRANCH IF WE HAVE A KLINIK LINE
   1387	005136	000137 	005576'			JMP	KLANXM		; +++009 LET THEM KNOW ABOUT NO KLINIK
   1388	005142	012703 	000055 		5$:	MOV	#^D45,R3	; +++001 SET UP?? COUNTER
   1389	005146	013700 	000000G			MOV	.BTPRM,R0	; +++001 BOOT PARAMETERS TO R0
   1390	005152	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ; +++001 JUST WHAT WE WANT
   1391	005156				10$:
   1392	005156	032714 	010000 			BIT	#DL.CAR,(R4)	; +++001 IS CARRIER UP
   1393	005162	001010 				BNE	20$		; +++001 YES -- GO ON
   1394	005164	032765 	000000C	000000G		BIT	#<TT.CRW!TT.RIP>,STSW1(R5) ; +++001 NO -- IN CARRIER WAIT??
   1395	005172	001002 				BNE	15$		; +++009 TOO FAR TO BRANCH WITH ADDED CODE
   1396	005174	000137 	005606'			JMP	RQSTSK		; +++009
   1397	005200	005203 			15$:	INC	R3		; +++001 YES -- TAKE THIS TICK BACK
   1398	005202	000413 				BR	30$		; +++001 WAIT A BIT MORE
   1399						;
   1400	005204				20$:
   1401	005204	022700 	000004 			CMP	#BP.LD1,R0	; +++001 CAN PROTOCOLS RUN??
   1402	005210	001034 				BNE	35$		; +++001 NO -- SO DON'T EVEN BOTHER
   1403	005212	032737 	000000C	000002G		BIT	#<EF.PR1!EF.PR2>,.COMEF+2
   1404	005220	001561 				BEQ	PRNRUN		; +++001 PROTOCOL STOPPED -- JUST GO AWAY
   1405	005222	032737 	000000G	000002G		BIT	#EF.RKP,.COMEF+2 ; +++001 DID WE GET KLINIK PARAMETERS??
   1406	005230	001024 				BNE	35$		; +++001 YES -- GO ON
   1407	005232				30$:
   1408	005232					MRKT$S	#E.FTMO,#60.	; +++001 WAIT A BIT
	005232	005046 				CLR	-(SP)
	005234	005046 				CLR	-(SP)
	005236	012746 	000074 			MOV	#60.,-(SP)
	005242	012746 	000002 			MOV	#E.FTMO,-(SP)
	005246	012746 				MOV	(PC)+,-(SP)
	005250	   027 	   005 			.BYTE	23.,5
	005252	104375 				EMT	375
   1409	005254					WTSE$S	#E.FTMO		; +++001 WAIT FOR IT
	005254	012746 	000002 			MOV	#E.FTMO,-(SP)
	005260	012746 				MOV	(PC)+,-(SP)
	005262	   051 	   002 			.BYTE	41.,2
	005264	104375 				EMT	375
   1410	005266					CLEF$S	#E.FTMO		; +++001 CLEAR THE FLAG
	005266	012746 	000002 			MOV	#E.FTMO,-(SP)
	005272	012746 				MOV	(PC)+,-(SP)
	005274	   037 	   002 			.BYTE	31.,2
	005276	104375 				EMT	375
   1411	005300	077352 				SOB	R3,10$		; +++001 LOOP TILL DONE
   1412	005302				35$:
   1413	005302					.INH6			; +++001 DISALLOW INTERRRUPTS
	005302	013746 	177776 			MOV	@#PS,-(SP)
	005306	112737 	000300 	177776 		MOVB	#300,@#PS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 38-1
RESTORE -- CKECK STATE OF KLINIK LINE

   1414	005314	032737 	000000G	000002G		BIT	#EF.RKP,.COMEF+2 ;;; +++001 DID WE GET KLINIK PARAMETERS??
   1415	005322	001413 				BEQ	50$		;;; +++001 NO -- DO DEFAULT
   1416	005324	105737 	000000G			TSTB	.KLNMD+0	;;; +++001 YES -- DO WE HAVE PARAMETERS??
   1417	005330	001410 				BEQ	50$		;;; +++001 NO -- DO DEFAULT
   1418	005332				40$:
   1419	005332	113737 	000000G	000000G		MOVB	.KLNMD+0,.KLNSW+0 ;;; +++001 SET THE KLINIK MODE
   1420	005340	003410 				BLE	60$		;;; +++001 EXIT IF USER
   1421	005342	113737 	000001G	000000G		MOVB	.KLNMD+1,.FEMOD	;;; +++001 SET THE CONSOLE MODE
   1422	005350	000404 				BR	60$		;;; +++001 GO TO COMMON EXIT
   1423						;
   1424	005352				50$:
   1425	005352	012737 	003401 	000000G		MOV	#3401,.KLNMD	;;; +++001 SET DEFAULT KLINIK PARAMETERS
   1426	005360	000764 				BR	40$		;;; +++001 SET OTHER PARAMETERS AND EXIT
   1427						;
   1428	005362				60$:
   1429	005362	042765 	000000G	000000G		BIC	#TT.OUT,STSW1(R5)
   1430	005370	105737 	000000G			TSTB	.KLNMD+0	;;; +++001 WHICH MODE??
   1431	005374	002404 				BLT	70$		;;; +++001 GO DO USER STUFF
   1432	005376	052765 	000000G	000000G		BIS	#TT.CTY,STSW1(R5) ;;; +++001 REMOTE -- DECLARE CTY
   1433	005404	000403 				BR	80$		;;; +++001 AND GO ON
   1434						;
   1435	005406				70$:
   1436	005406	042765 	000000G	000000G		BIC	#TT.CTY,STSW1(R5) ;;; +++001 CLEAR CTY BIT
   1437	005414				80$:
   1438	005414					.ENB6			;;; +++001 ALLOW INTERRUPTS
	005414	012637 	177776 			MOV	(SP)+,@#PS
   1439	005420	105737 	000000G			TSTB	.KLNMD+0	; +++001 CHECK MODE
   1440	005424	002411 				BLT	KLAUSR		; +++001 USER -- GO ON
   1441	005426					WARN	<KLINIK LINE ACTIVE IN REMOTE MODE>
	001163	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE ACTIVE IN REMOTE MODE"<1>""
	001166	   111 	   116 	   111
	001171	   113 	   040 	   114
	001174	   111 	   116 	   105
	001177	   040 	   101 	   103
	001202	   124 	   111 	   126
	001205	   105 	   040 	   111
	001210	   116 	   040 	   122
	001213	   105 	   115 	   117
	001216	   124 	   105 	   040
	001221	   115 	   117 	   104
	001224	   105 	   001 	   000
	005426	012746 	001163'			MOV	#$$$,-(SP)
	005432	004737 	006074'			JSR	PC,TYPMSG
   1442	005436					WARN	<KLINIK LINE CONNECTED TO SYSTEM CONSOLE>
	001227	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE CONNECTED TO SYSTEM CONSOLE"<1>""
	001232	   111 	   116 	   111
	001235	   113 	   040 	   114
	001240	   111 	   116 	   105
	001243	   040 	   103 	   117
	001246	   116 	   116 	   105
	001251	   103 	   124 	   105
	001254	   104 	   040 	   124
	001257	   117 	   040 	   123
	001262	   131 	   123 	   124
	001265	   105 	   115 	   040
	001270	   103 	   117 	   116
	001273	   123 	   117 	   114
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 38-2
RESTORE -- CKECK STATE OF KLINIK LINE

	001276	   105 	   001 	   000
	005436	012746 	001227'			MOV	#$$$,-(SP)
	005442	004737 	006074'			JSR	PC,TYPMSG
   1443	005446	000404 				BR	KLAREM		; +++001 EXIT THIS ROUTINE
   1444						;
   1445	005450				KLAUSR:
   1446	005450					WARN	<KLINIK LINE ACTIVE IN USER MODE>
	001301	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE ACTIVE IN USER MODE"<1>""
	001304	   111 	   116 	   111
	001307	   113 	   040 	   114
	001312	   111 	   116 	   105
	001315	   040 	   101 	   103
	001320	   124 	   111 	   126
	001323	   105 	   040 	   111
	001326	   116 	   040 	   125
	001331	   123 	   105 	   122
	001334	   040 	   115 	   117
	001337	   104 	   105 	   001
	001342	   000
	005450	012746 	001301'			MOV	#$$$,-(SP)
	005454	004737 	006074'			JSR	PC,TYPMSG
   1447	005460				KLAREM:
   1448	005460	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ; +++004 AN WE LOG THIS??
   1449	005466	001447 				BEQ	RQSTSK		; +++004 NO -- GO ON
   1450	005470	012700 	001070'			MOV	#LOGBUF,R0	; +++004 YES -- BUFFER POINTER TO R0
   1451	005474	113701 	000000G			MOVB	.KLNMD+0,R1	; +++004 KLINIK MODE TO R1
   1452	005500	002406 				BLT	10$		; +++004 USER -- GO ON
   1453	005502	113701 	000001G			MOVB	.KLNMD+1,R1	; +++004 REMOTE -- GET CONSOLE MODE
   1454	005506	006201 				ASR	R1		; +++004 COMPUTE THE CODE
   1455	005510	005201 				INC	R1		; +++004
   1456	005512	006201 				ASR	R1		; +++004
   1457	005514	005201 				INC	R1		; +++004
   1458	005516				10$:
   1459	005516	110160 	000005 			MOVB	R1,5(R0)	; +++004 SET THE MODE
   1460	005522	112760 	000000G	000004 		MOVB	#K.LRBA,4(R0)	; +++004 SET THE LOG CODE
   1461	005530	012701 	100000G			MOV	#BC.HDS+100000,R1 ; +++004 FUNCTION CODE TO R1
   1462	005534	012702 	000004 			MOV	#E.FLOG,R2	; +++004 EVENT FLAG TO R2
   1463	005540	012703 	000000G			MOV	#D.CKLN,R3	; +++004 DEVICE CODE TO R3
   1464	005544					CALL	..STIN		; +++004 LOG IT
	005544	004737 	000000G			JSR	PC,..STIN
   1465	005550					WTSE$S	#E.FLOG		; +++004 WAIT FOR IT
	005550	012746 	000004 			MOV	#E.FLOG,-(SP)
	005554	012746 				MOV	(PC)+,-(SP)
	005556	   051 	   002 			.BYTE	41.,2
	005560	104375 				EMT	375
   1466	005562	000411 				BR	RQSTSK		; +++001 EXIT THIS ROUTINE
   1467						;
   1468	005564				PRNRUN:
   1469	005564					ERROR	<PROTOCOLS NOT RUNNING>
	001343	   011 	   120 	   122 		.ASCIZ	""<11>"PROTOCOLS NOT RUNNING"<5>""
	001346	   117 	   124 	   117
	001351	   103 	   117 	   114
	001354	   123 	   040 	   116
	001357	   117 	   124 	   040
	001362	   122 	   125 	   116
	001365	   116 	   111 	   116
	001370	   107 	   005 	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 38-3
RESTORE -- CKECK STATE OF KLINIK LINE

	005564	012746 	001343'			MOV	#$$$,-(SP)
	005570	004737 	006074'			JSR	PC,TYPMSG
   1470	005574	000456 				BR	EXIT		; +++001 GO AWAY
   1471						;
   1472	005576				KLANXM:
   1473	005576					WARN	<NO KLINIK LINE> ; +++009 TELL ABOUT NO KLINIK
	001373	   012 	   116 	   117 		.ASCIZ	""<12>"NO KLINIK LINE"<1>""
	001376	   040 	   113 	   114
	001401	   111 	   116 	   111
	001404	   113 	   040 	   114
	001407	   111 	   116 	   105
	001412	   001 	   000
	005576	012746 	001373'			MOV	#$$$,-(SP)
	005602	004737 	006074'			JSR	PC,TYPMSG
   1474					;	BR	RQSTSK		; +++009 REQUEST KLI IF NECESSARY
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 39
RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT

   1476						.SBTTL	RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT
   1477					;
   1478					; REQUEST KL SYSTEM INITIALIZATION TASK IF LOAD FLAGS FROM BOOT = 00 OR 11
   1479					;
   1480	005606				RQSTSK:
   1481	005606	012701 	001120'			MOV	#KLINIT,R1	;ADDRESS OF .RAD50/...KLI/
   1482	005612	013700 	000000G			MOV	.BTPRM,R0	;GET LOAD FLAGS
   1483	005616	012702 	000000C			MOV	#KL.DEF!KL.LRM!KL.LCA!KL.CFM!KL.LVB,R2 ;DEFAULT TO DEFAULT
   1484	005622	032700 	000001 			BIT	#BP.SWR,R0	;FROM SWR BUTTON?
   1485	005626	001002 				BNE	10$		;YES-- OK
   1486	005630	052702 	000000G			BIS	#KL.VBN,R2	;NO-- VBOOT DOESN'T PROMPT
   1487	005634				10$:
   1488	005634	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ;LOAD FLAGS= 00?
   1489	005640	001404 				BEQ	50$		;YES-- REQUEST SYSTEM INITIALIZATION
   1490	005642	022700 	000006 			CMP	#<BP.LD1!BP.LD0>,R0 ;LOAD FLAGS= 11?
   1491	005646	001024 				BNE	EXIT00		;NO-- JUST EXIT
   1492	005650	005002 				CLR	R2		;SET KLI TO ASK DIALOG
   1493	005652				50$:
   1494	005652	010237 	000000G			MOV	R2,.KLIWD	;SET FLAGS TO ...KLI
   1495	005656					RQST$S	R1		;REQUEST TASK
	005656	005046 				CLR	-(SP)
	005660	005046 				CLR	-(SP)
	005662	005046 				CLR	-(SP)
	005664	005046 				CLR	-(SP)
	005666	016146 	000002 			MOV	2(R1),-(SP)
	005672	011146 				MOV	(R1),-(SP)
	005674	012746 				MOV	(PC)+,-(SP)
	005676	   013 	   007 			.BYTE	11.,7
	005700	104375 				EMT	375
   1496	005702	103006 				BCC	EXIT00		;SUCCESS-- JUST LEAVE
   1497	005704	013700 	000000G			MOV	$DSW,R0		;GET THE ERROR CODE
   1498	005710					WARN	<KLI task request error "<7>">
	001414	   012 	   113 	   114 		.ASCIZ	""<12>"KLI task request error "<7>""<1>""
	001417	   111 	   040 	   164
	001422	   141 	   163 	   153
	001425	   040 	   162 	   145
	001430	   161 	   165 	   145
	001433	   163 	   164 	   040
	001436	   145 	   162 	   162
	001441	   157 	   162 	   040
	001444	   007 	   001 	   000
	005710	012746 	001414'			MOV	#$$$,-(SP)
	005714	004737 	006074'			JSR	PC,TYPMSG
   1499	005720				EXIT00:
   1500	005720	105737 	000050'			TSTB	EXFLAG		;SHOULD WE EXIT (/EX)
   1501	005724	001002 				BNE	EXIT		;YES-- DO SO
   1502	005726	000137 	001170'			JMP	SAVE		;NO-- GO BACK TO SAVE
   1503					;
   1504					; ALL DONE-- DO A TASK EXIT, SYSTEM BACK TO STATE BEFORE SAVE
   1505					;
   1506	005732				EXIT:
   1507	005732					EXIT$S			;TASK EXIT
	005732	012746 				MOV	(PC)+,-(SP)
	005734	   063 	   001 			.BYTE	51.,1
	005736	104375 				EMT	375
   1508	005740	000774 				BR	EXIT		;JUST IN CASE . . .
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 40
COMMAND PARSER ROUTINES

   1510						.SBTTL	COMMAND PARSER ROUTINES
   1511					;
   1512					; GENERAL NOTES:
   1513					;
   1514					; R4 IS ALWAYS USED AS A POINTER TO THE COMMAND STRING.  ON CALL,
   1515					; IT POINTS TO THE NEXT CHARACTER TO BE PROCESSED.  ON RETURN, R4
   1516					; ALWAYS POINTS TO THE CHARACTER AFTER THE LAST ONE PROCESSED, I.E.
   1517					; THE NEXT ONE TO BE PROCESSED.
   1518					;
   1519					; NOTE THAT END-OF-LINE IS A ZERO BYTE
   1520					;
   1521					;
   1522					; GETNB -- GET NEXT NON-BLANK CHARACTER
   1523					;
   1524					; RETURNS WITH R4 POINTING TO THE NEXT NON-BLANK CHARACTER
   1525					;	R0 --	NON-BLANK CHARACTER
   1526					;	CC-Z SET IF END-OF-LINE
   1527					;
   1528	005742				GETNB:
   1529	005742	112400 				MOVB	(R4)+,R0	;GET A CHARACTER
   1530	005744	122700 	000040 			CMPB	#' ,R0		;THIS BLANK?
   1531	005750	001774 				BEQ	GETNB		;YES-- LOOK SOME MORE
   1532	005752	122700 	000011 			CMPB	#'	,R0	;OR A TAB?
   1533	005756	001771 				BEQ	GETNB		;YES-- LOOK SOME MORE
   1534	005760				10$:
   1535	005760	105744 				TSTB	-(R4)		;NON-BLANK-- BACK OVER IT (MAY BE EOL)
   1536	005762					RETURN			; FROM GETNB
	005762	000207 				RTS	PC
   1537					;
   1538					; GETNAM -- GET TWO-CHARACTER ALPHABETIC NAME
   1539					;
   1540					; RETURNS AFTER TWO CHARCTERS OR NON-ALPHABETIC
   1541					;	R0 --	(LOW) FIRST CHARACTER (HIGH) SECOND CHARACTER
   1542					;	CC-C SET IF MORE THAN TWO CHARACTERS
   1543					;
   1544	005764				GETNAM:
   1545	005764	005000 				CLR	R0		;CLEAR ANSWER
   1546	005766				10$:
   1547	005766	122714 	000101 			CMPB	#'A,(R4)	;BELOW A?
   1548	005772	101015 				BHI	50$		;YES-- RETURN CC-C CLEAR
   1549	005774	121427 	000132 			CMPB	(R4),#'Z	;OR ABOVE Z?
   1550	006000	101012 				BHI	50$		;YES-- RETURN CC-C CLEAR
   1551	006002	005700 				TST	R0		;GOT A BYTE YET?
   1552	006004	001002 				BNE	20$		;YES-- STORE SECOND BYTE
   1553	006006	112400 				MOVB	(R4)+,R0	;NO-- GET LOW BYTE
   1554	006010	000766 				BR	10$		;LOOP FOR NEXT CHARACTER
   1555					;
   1556	006012				20$:
   1557	006012	000300 				SWAB	R0		;GET HIGH BYTE
   1558	006014	001003 				BNE	40$		;ALREADY THERE-- ERROR
   1559	006016	152400 				BISB	(R4)+,R0	;OK-- SET SECOND CHARACTER
   1560	006020	000300 				SWAB	R0		;RESTORE R0 TO PROPER ORIENTATION
   1561	006022	000761 				BR	10$		;LOOP FOR ANOTHER (?)
   1562					;
   1563	006024				40$:
   1564	006024	000261 				SEC			;ERROR
   1565	006026				50$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 40-1
COMMAND PARSER ROUTINES

   1566	006026					RETURN			; FROM GETNAM
	006026	000207 				RTS	PC
   1567					;
   1568					; GETNUM -- GET OCTAL NUMBER
   1569					;
   1570					; RETURNS WITH NON-DIGIT OR IF MORE THAN A BYTE'S WORTH
   1571					;	R0 --	(LOW) NUMBER
   1572					;	CC-C SET IF LARGER THAN ONE BYTE
   1573					;
   1574	006030				GETNUM:
   1575	006030	005000 				CLR	R0		;CLEAR RESULT
   1576	006032				10$:
   1577	006032	112401 				MOVB	(R4)+,R1	;GET A DIGIT
   1578	006034	162701 	000060 			SUB	#'0,R1		;TRIM DOWN TO DIGIT
   1579	006040	103413 				BLO	40$		;NOT A DIGIT-- GIVE UP
   1580	006042	022701 	000007 			CMP	#7,R1		;TOO HIGH?
   1581	006046	103410 				BLO	40$		;YES-- GIVE UP WITH CC-C CLEAR
   1582		000003 			.REPT 3
   1583						ASLB	R0		;SHIFT OLD NUMBER A BIT
   1584						BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
   1585					.ENDR
	006050	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	006052	103407 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
	006054	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	006056	103405 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
	006060	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	006062	103403 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
   1586	006064	060100 				ADD	R1,R0		;ACCUMULATE THIS DIGIT
   1587	006066	000761 				BR	10$		;FETCH ANOTHER DIGIT
   1588					;
   1589	006070				40$:
   1590	006070	105744 				TSTB	-(R4)		;BACK OVER BAD CHARACTER
   1591	006072				50$:
   1592	006072					RETURN			;FROM GETNUM
	006072	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 41
TYPEOUT ROUTINES

   1594						.SBTTL	TYPEOUT ROUTINES
   1595					;
   1596					; TYPMSG -- TYPE A RANDOM ASCIZ STRING
   1597					;
   1598					; CALL:
   1599					;	PUSH	#<ADDRESS OF ASCIZ STRING>
   1600					;	CALL	TYPMSG
   1601					;
   1602					; SPECIAL CHARACTER CODES IN TEXT:
   1603					;	0 --	END OF TEXT
   1604					;	1 --	TYPE <CR><LF>
   1605					;	2 --	TYPE TWO CHARACTERS FROM R0 (SAVED ON STACK)
   1606					;	3 --	TYPE DEVICE NAME AND UNIT FROM PUD ENTRY (R5)
   1607					;	4 --	TYPE ASCIZ STRING BY R0
   1608					;	5 --	TYPE <CR><LF> AND RETURN TO SAVE
   1609					;	6 --	TYPE SYSTEM DATE
   1610					;	7 --	DECIMAL NUMBER IN R0 (SAVED ON STACK)
   1611					;	10 --	DEVICE NAME AND UNIT FROM PUD ENTRY IN PUDADR
   1612					;	11 --	FATAL ERROR PREFIX
   1613					;	12 --	DIAGNOSTIC ERROR PREFIX
   1614					;
   1615	006074				TYPMSG:
   1616	006074					PUSH	<R3,R2,R1,R0> ;SAVE USED REGISTERS
	006074	010346 				MOV	R3,-(SP)
	006076	010246 				MOV	R2,-(SP)
	006100	010146 				MOV	R1,-(SP)
	006102	010046 				MOV	R0,-(SP)
   1617	006104	016600 	000012 			MOV	12(SP),R0	;GET ADDRESS OF STRING
   1618	006110	012702 	000064'			MOV	#TYPBUF,R2	;POINT TO OUTPUT BUFFER
   1619					;
   1620					; ENTER HERE AT TYPMS1:
   1621					;	R0 --	POINTER TO STRING TO BE OUTPUT (AND FOLLOWING CODE)
   1622					;	R2 --	CURRENT POINTER TO OUTPUT BUFFER FOR LOADING CHARACTERS
   1623					;
   1624	006114				TYPMS1:
   1625	006114	112012 				MOVB	(R0)+,(R2)	;GET A CHARACTER FROM STRING
   1626	006116	122227 	000013 			CMPB	(R2)+,#TYPMAX	;SPECIAL CODE?
   1627	006122	103374 				BHIS	TYPMS1		;NO-- JUST GET NEXT CHARACTER
   1628	006124	114203 				MOVB	-(R2),R3	;YES-- GET THE CODE
   1629	006126	006303 				ASL	R3		;MAKE IT WORDS
   1630	006130	011601 				MOV	(SP),R1		;GET R0 FROM STACK BACK TO R1
   1631	006132					CALL	@TYPTAB(R3)	;CALL ROUTINE TO PROCESS
	006132	004773 	006140'			JSR	PC,@TYPTAB(R3)
   1632	006136	000766 				BR	TYPMS1		;BACK FOR MORE
   1633					;
   1634					; DISPATCH TABLE FOR SPECIAL CODES
   1635					;
   1636	006140				TYPTAB:
   1637	006140	006166'	006260'	006264'		.WORD	TYPDON,TYPCR,TYPTXT,TYPDEV,TYPSTR,TYPSAV,TYPDAT,TYPDEC,TYPSDV,TYPERR,TYPWRN
	006146	006302'	006350'	006252'
	006154	006360'	006476'	006276'
	006162	006336'	006344'
   1638		000013 			TYPMAX=<.-TYPTAB>/2
   1639					;
   1640					; 0 -- END OF MESSAGE
   1641					;
   1642	006166				TYPDON:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 41-1
TYPEOUT ROUTINES

   1643	006166	005726 				TST	(SP)+		;POP THE RETURN ADDRESS OFF TO NOWHERE
   1644	006170	162702 	000064'			SUB	#TYPBUF,R2	;END OF STRING-- FIND LENGTH
   1645	006174					QIOW$S	#IO.WLB,#CTYLUN,#E.FQIO,,,,<#TYPBUF,R2,#0> ;TYPE STRING ON CTY
	006174	005046 				CLR	-(SP)
	006176	010246 				MOV	R2,-(SP)
	006200	012746 	000064'			MOV	#TYPBUF,-(SP)
	006204	005046 				CLR	-(SP)
	006206	005046 				CLR	-(SP)
	006210	005046 				CLR	-(SP)
	006212	112716 	000001 			MOVB	#E.FQIO,(SP)
	006216	012746 	000001 			MOV	#CTYLUN,-(SP)
	006222	012746 	000400 			MOV	#IO.WLB,-(SP)
	006226	012746 				MOV	(PC)+,-(SP)
	006230	   003 	   011 			.BYTE	3,$$$T1
	006232	104375 				EMT	375
   1646	006234	103636 				BCS	EXIT		;GIVE UP IF FAILURE
   1647	006236					POP	<R0,R1,R2,R3> ;RESTORE REGISTERS
	006236	012600 				MOV	(SP)+,R0
	006240	012601 				MOV	(SP)+,R1
	006242	012602 				MOV	(SP)+,R2
	006244	012603 				MOV	(SP)+,R3
   1648	006246					POP	(SP)		;RESTORE PC OVER ADDRESS OF STRING
	006246	012616 				MOV	(SP)+,(SP)
   1649	006250					RETURN			;FROM TYPMSG
	006250	000207 				RTS	PC
   1650					;
   1651					; 5 -- TYPE <CR><LF> AND RETURN TO SAVE
   1652					;
   1653	006252				TYPSAV:
   1654	006252	012766 	001170'	000012 		MOV	#SAVE,12(SP)	;SET RETURN PC TO GO BACK TO SAVE
   1655					;	BR	TYPCR		;FINISH OFF WITH <CR><LF>
   1656					;
   1657					; 1 -- TYPE CRLF
   1658					;
   1659	006260				TYPCR:
   1660	006260	012701 				MOV	(PC)+,R1	;GET <CR> AND <LF>
   1661	006262	   015 	   012 			.BYTE	15,12		; . .
   1662					;	BR	TYPTXT		;TYPE WHAT'S IN R1
   1663					;
   1664					; 2 -- TYPE TEXT IN R0 (SAVED ON STACK)
   1665					;
   1666	006264				TYPTXT:
   1667	006264	110122 				MOVB	R1,(R2)+	;STORE LOW BYTE FIRST
   1668	006266	000301 				SWAB	R1		;GET HIGH BYTE
   1669	006270	001401 				BEQ	90$		;NULL-- IGNORE IT
   1670	006272	110122 				MOVB	R1,(R2)+	;STORE SECOND CHARACTER
   1671	006274				90$:
   1672	006274					RETURN			; FROM TYPTXT
	006274	000207 				RTS	PC
   1673					;
   1674					; 10 -- DEVICE NAME AND UNIT FROM PUDADR
   1675					;
   1676	006276				TYPSDV:
   1677	006276	013705 	000040'			MOV	PUDADR,R5	;GET THE PUD ADDRESS
   1678					;	BR	TYPDEV		;AND TYPE IT
   1679					;
   1680					; 3 -- DEVICE AND UNIT # FROM PUD (R5)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 41-2
TYPEOUT ROUTINES

   1681					;
   1682	006302				TYPDEV:
   1683	006302	016501 	000000G			MOV	U.DN(R5),R1	;GET THE NAME
   1684	006306					CALL	TYPTXT		;TYPE THE NAME
	006306	004737 	006264'			JSR	PC,TYPTXT
   1685	006312	012737 	000010 	000016'		MOV	#8.,RADIX	;SET TO OCTAL
   1686	006320	116501 	000000G			MOVB	U.UN(R5),R1	;GET THE UNIT
   1687	006324					CALL	TYPNUM		;TYPE THE NUMBER
	006324	004737 	006576'			JSR	PC,TYPNUM
   1688	006330	112722 	000072 			MOVB	#':,(R2)+	;MAKE IT A DEVICE
   1689	006334					RETURN			;BACK FOR MORE
	006334	000207 				RTS	PC
   1690					;
   1691					; 11 -- FATAL ERROR PREFIX
   1692					;
   1693	006336				TYPERR:
   1694	006336	012701 	001447'			MOV	#ERRMSG,R1	;GET ERROR STRING
   1695	006342	000402 				BR	TYPSTR		;PUT THE STRING
   1696					;
   1697	001447					.PSECT	TEXT
   1698	001447	   123 	   101 	   126 	ERRMSG:	.ASCIZ	\SAV -- *Fatal* -- \
	001452	   040 	   055 	   055
	001455	   040 	   052 	   106
	001460	   141 	   164 	   141
	001463	   154 	   052 	   040
	001466	   055 	   055 	   040
	001471	   000
   1699	006344					.PSECT
   1700					;
   1701					; 12 -- WARNING ERROR PREFIX
   1702					;
   1703	006344				TYPWRN:
   1704	006344	012701 	001472'			MOV	#WRNMSG,R1	;GET WARNING PREFIX
   1705					;	BR	TYPSTR		; . .
   1706					;
   1707	001472					.PSECT	TEXT
   1708	001472	   123 	   101 	   126 	WRNMSG:	.ASCIZ	\SAV -- *Diag* -- \
	001475	   040 	   055 	   055
	001500	   040 	   052 	   104
	001503	   151 	   141 	   147
	001506	   052 	   040 	   055
	001511	   055 	   040 	   000
   1709	006350					.PSECT
   1710					;
   1711					; 4 -- STRING FROM R1
   1712					;
   1713	006350				TYPSTR:
   1714	006350	112122 				MOVB	(R1)+,(R2)+	;MOVE A CHARACTER
   1715	006352	001376 				BNE	TYPSTR		;LOOP TILL END OF COMMAND
   1716	006354	105742 				TSTB	-(R2)		;BACK OVER NULL BYTE
   1717	006356					RETURN			;BACK FOR MORE
	006356	000207 				RTS	PC
   1718					;
   1719					; 6 -- TYPE SYSTEM DATE
   1720					;
   1721	006360				TYPDAT:
   1722	006360	012737 	000012 	000016'		MOV	#10.,RADIX	;ALL UNDER DECIMAL RADIX
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 41-3
TYPEOUT ROUTINES

   1723	006366	113701 	000026'			MOVB	GTIMBF+G.TIHR,R1 ;GET THE HOUR
   1724	006372					CALL	TYPNUM		;TYPE HOURS
	006372	004737 	006576'			JSR	PC,TYPNUM
   1725	006376	112722 	000072 			MOVB	#':,(R2)+	;SEPERATE . . .
   1726	006402	113701 	000030'			MOVB	GTIMBF+G.TIMI,R1 ;MINUTES
   1727	006406	020127 	000011 			CMP	R1,#9.		;MORE THAN ONE DIGIT?
   1728	006412	003002 				BGT	10$		;YES-- WE WILL HAVE TWO
   1729	006414	112722 	000060 			MOVB	#'0,(R2)+	;NO-- MAKE IT TWO
   1730	006420				10$:
   1731	006420					CALL	TYPNUM		;MINUTES . . . .  . .  . . . . . ...
	006420	004737 	006576'			JSR	PC,TYPNUM
   1732	006424	112722 	000040 			MOVB	#' ,(R2)+	;SPACE-ED OUT DATE
   1733	006430	113701 	000024'			MOVB	GTIMBF+G.TIDA,R1 ;GET DAY OF MONTH
   1734	006434					CALL	TYPNUM		;TYPE IT IN DECIMAL
	006434	004737 	006576'			JSR	PC,TYPNUM
   1735	006440	112722 	000055 			MOVB	#'-,(R2)+	;SEPARATE
   1736	006444	113701 	000022'			MOVB	GTIMBF+G.TIMO,R1 ;GET THE MONTH
   1737	006450	006301 				ASL	R1		; *2
   1738	006452	006301 				ASL	R1		; *4 BYTES FOR EACH NAME
   1739	006454	062701 	006512'			ADD	#MONTAB-4,R1	;POINT TO ASCIZ MONTHS
   1740	006460					CALL	TYPSTR		;TYPE THE STRING
	006460	004737 	006350'			JSR	PC,TYPSTR
   1741	006464	112722 	000055 			MOVB	#'-,(R2)+	;SEPARATE
   1742	006470	013701 	000020'			MOV	GTIMBF+G.TIYR,R1 ;GET THE YEAR
   1743	006474	000440 				BR	TYPNUM		;TYPE IT AND RETURN
   1744					;
   1745					; 7 -- DECIMAL NUMBER IN R0 (SAVED ON STACK)
   1746					;
   1747	006476				TYPDEC:
   1748	006476	012737 	000012 	000016'		MOV	#10.,RADIX	;SET RADIX TO 10
   1749	006504					CALL	TYPNUM		;TYEP THE NUMBER
	006504	004737 	006576'			JSR	PC,TYPNUM
   1750	006510	112722 	000056 			MOVB	#'.,(R2)+	;STORE A . TO INDICATE DECIMAL
   1751	006514					RETURN			;BACK FOR ANOTHER CHAR OF STRING
	006514	000207 				RTS	PC
   1752					;
   1753					; TABLE OF MONTHS
   1754					;
   1755	006516				MONTAB:
   1756					.IRP ARG,<Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec>
   1757						.ASCIZ	/ARG/
   1758						.EVEN
   1759					.ENDM
	006516	   112 	   141 	   156 		.ASCIZ	/Jan/
	006521	   000
	006522	   106 	   145 	   142 		.ASCIZ	/Feb/
	006525	   000
	006526	   115 	   141 	   162 		.ASCIZ	/Mar/
	006531	   000
	006532	   101 	   160 	   162 		.ASCIZ	/Apr/
	006535	   000
	006536	   115 	   141 	   171 		.ASCIZ	/May/
	006541	   000
	006542	   112 	   165 	   156 		.ASCIZ	/Jun/
	006545	   000
	006546	   112 	   165 	   154 		.ASCIZ	/Jul/
	006551	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 41-4
TYPEOUT ROUTINES

	006552	   101 	   165 	   147 		.ASCIZ	/Aug/
	006555	   000
	006556	   123 	   145 	   160 		.ASCIZ	/Sep/
	006561	   000
	006562	   117 	   143 	   164 		.ASCIZ	/Oct/
	006565	   000
	006566	   116 	   157 	   166 		.ASCIZ	/Nov/
	006571	   000
	006572	   104 	   145 	   143 		.ASCIZ	/Dec/
	006575	   000
   1760					;
   1761					; TYPNUM -- TYPE A NUMBER
   1762					;	R1 --	NUMBER TO BE TYPED
   1763					;	RADIX -- OUTPUT RADIX
   1764					;
   1765					; USES R1,R2,R3
   1766					;
   1767	006576				TYPNUM:
   1768	006576	005701 				TST	R1		;NEGATIVE #?
   1769	006600	002003 				BGE	10$		;NO-- OK
   1770	006602	005401 				NEG	R1		;YES-- MAKE IT POSITIVE
   1771	006604	112722 	000055 			MOVB	#'-,(R2)+	; AND STORE -VE IN STRING
   1772	006610				10$:
   1773	006610	005003 				CLR	R3		;CLEAR REMAINDER
   1774	006612				15$:
   1775	006612	020137 	000016'			CMP	R1,RADIX	;CAN WE DIVIDE?
   1776	006616	002404 				BLT	20$		;NO-- DIVIDE DONE
   1777	006620	163701 	000016'			SUB	RADIX,R1	;YES-- FORM REMAINDER
   1778	006624	005203 				INC	R3		; AND QUOTIENT
   1779	006626	000771 				BR	15$		;LOOP TO DIVIDE R1 BY RADIX
   1780					;
   1781	006630				20$:
   1782	006630					PUSH	R1		;SAVE REMAINDER AS A DIGIT
	006630	010146 				MOV	R1,-(SP)
   1783	006632	010301 				MOV	R3,R1		;GO BACK AND DIVIDE AGAIN
   1784	006634	001402 				BEQ	30$		; UNLESS ALL DONE
   1785	006636					CALL	10$		;EXTRACT ANOTHER DIGIT ONTO STACK
	006636	004737 	006610'			JSR	PC,10$
   1786	006642				30$:
   1787	006642					POP	R1		;DONE-- GET A DIGIT FROM STACK
	006642	012601 				MOV	(SP)+,R1
   1788	006644	062701 	000060 			ADD	#'0,R1		;MAKE IT ASCII
   1789	006650	110122 				MOVB	R1,(R2)+	;STORE IT IN OUTPUT STRING
   1790	006652					RETURN			;FOR ANOTHER DIGIT OR THE END
	006652	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 42
FILE I/O ROUTINES

   1792						.SBTTL	FILE I/O ROUTINES
   1793					;
   1794					; FINDEV -- FIND PUD ENTRY FOR DEVICE
   1795					; CALL:
   1796					;	R0 --	DEVICE NAME AS TWO ASCII BYTES
   1797					;	R1 --	UNIT NUMBER AS BINARY BYTE
   1798					; RETURN:
   1799					;	R0-R4	UNCHANGED
   1800					;	R5 --	PUD ENTRY ADDRESS (POSSIBLY REDIRECTED)
   1801					;
   1802	006654				FINDEV:
   1803	006654	012705 	000000G			MOV	#.PUDBA,R5	;POINT TO START OF PUD
   1804	006660				10$:
   1805	006660	026500 	000000G			CMP	U.DN(R5),R0	;NAME MATCH?
   1806	006664	001003 				BNE	20$		;NO-- GO ON
   1807	006666	126501 	000000G			CMPB	U.UN(R5),R1	;UNIT MATCH?
   1808	006672	001406 				BEQ	30$		;YES-- THIS IS IT
   1809	006674				20$:
   1810	006674	062705 	000000G			ADD	#U.SZ,R5	;NO-- BUMP TO NEXT PUD ENTRY
   1811	006700	020527 	000000G			CMP	R5,#.PUDEA	;END YET?
   1812	006704	103765 				BLO	10$		;NO-- LOOP TILL END
   1813	006706	000261 				SEC			;YES-- DEVICE NOT IN SYSTEM
   1814	006710				30$:
   1815	006710					RETURN			;RETURN FROM FINDEV
	006710	000207 				RTS	PC
   1816					;
   1817					; FNDACP -- FIND ACP FOR DEVICE, PUD ADDR IN R5
   1818					;	RETURNS R2= STD ADDR FOR ACP, OR ZERO IF NOT FOUND
   1819					;
   1820	006712				FNDACP:
   1821	006712	012701 	000070'			MOV	#TYPBUF+4,R1	;NO-- GET A SCRACTH AREA
   1822	006716	012741 				MOV	(PC)+,-(R1)	;SET TO
   1823	006720	003310 				 .RAD50	/ACP/		; THE ACP
   1824	006722	016541 	000000G			MOV	U.DACP(R5),-(R1) ; OF THE DEVICE
   1825	006726	000137 	000000G			JMP	..FSTD		;FIND ADR OF THE STD FOR THE ACP
   1826					;
   1827					; FILMNT -- MOUNT/DISMOUNT DEVICE QUEUE I/O REQUEST
   1828					;	R2 -- ADDRESS OF FUNCTION CONTROL BLOCK
   1829					;
   1830	006732				FILMNT:
   1831	006732	012700 	014010 			MOV	#IO.APV,R0	;PRIVILIGED ACP CONTROL (MOUNT/DISMOUNT)
   1832	006736	005001 				CLR	R1		;NO FILE-ID BLOCK
   1833	006740	005003 				CLR	R3		;NO EXTEND
   1834	006742	005004 				CLR	R4		; . .
   1835	006744	005005 				CLR	R5		;NO ACCESS CONTROL
   1836					;	BR	FILQIO		;DO REQUEST AND RETURN
   1837					;
   1838					; FILQIO -- ROUTINE TO DO QIO REQUEST FOR FILE OPERATIONS
   1839					;	R0 --	I/O FUNCTION CODE (IO.XXX)
   1840					;	R1 --	(PARAMETER #1) ADDRESS OF FILE-ID BLOCK
   1841					;	R2 --	(PARAMETER #2) ADDRESS OF ATTRIBUTE CONTROL BLOCK
   1842					;	R3 --	(PARAMETER #3) EXTEND CONTROL BITS
   1843					;	R4 --	(PARAMETER #4) LOW-ORDER EXTEND INCREMENT
   1844					;	R5 --	(PARAMETER #5) ACCESS CONTROL BITS
   1845					;
   1846					; RETURNS CC-C CLEAR, QEFLAG UNCHANGED IF SUCCESS
   1847					;	  CC-C SET,   QEFLAG NON-ZERO IF ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 42-1
FILE I/O ROUTINES

   1848					;	R0 --	ERROR CODE FROM I/O STATUS OR DIRECTIVE STATUS
   1849					;
   1850	006746				FILQIO:
   1851	006746					QIOW$S	R0,#DSKLUN,#E.FQIO,,#QIOSTS,,<R1,R2,R3,R4,R5>
	006746	010546 				MOV	R5,-(SP)
	006750	010446 				MOV	R4,-(SP)
	006752	010346 				MOV	R3,-(SP)
	006754	010246 				MOV	R2,-(SP)
	006756	010146 				MOV	R1,-(SP)
	006760	005046 				CLR	-(SP)
	006762	012746 	001064'			MOV	#QIOSTS,-(SP)
	006766	005046 				CLR	-(SP)
	006770	112716 	000001 			MOVB	#E.FQIO,(SP)
	006774	012746 	000002 			MOV	#DSKLUN,-(SP)
	007000	010046 				MOV	R0,-(SP)
	007002	012746 				MOV	(PC)+,-(SP)
	007004	   003 	   013 			.BYTE	3,$$$T1
	007006	104375 				EMT	375
   1852	007010	113700 	000056'			MOVB	QEFLAG,R0	;DID A PREVIOUS Q I/O FAIL?
   1853	007014	001010 				BNE	20$		;YES-- JUST RETURN THAT
   1854	007016	113700 	000000G			MOVB	$DSW,R0		;NO-- GET DIRECTIVE STATUS
   1855	007022	103403 				BCS	10$		;ERROR-- JUST RETURN THIS
   1856	007024	113700 	001064'			MOVB	QIOSTS+0,R0	;ERROR OCCUR ON QUEUE I/O?
   1857	007030	002003 				BGE	30$		;N0-- JUST GO ON
   1858	007032				10$:
   1859	007032	110037 	000056'			MOVB	R0,QEFLAG	;YES-- SAVE THAT AS ERROR
   1860	007036				20$:
   1861	007036	000261 				SEC			; AND SAY ERROR
   1862	007040				30$:
   1863	007040					RETURN			;FROM FILQIO
	007040	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 43
DRIVER TABLES

   1865						.SBTTL	DRIVER TABLES
   1866					;
   1867					; DRIVER TABLE DRVTAB:
   1868					;	THIS TABLE CONTAINS ALL THE DEVICE-DEPENDENT DATA AND
   1869					;	DISPATCHES FOR THE DEVICES THAT "SAVE" UNDERSTANDS.
   1870					;
   1871					.MACRO DRIVER	NAME,DV,BTPRM
   1872					$$$ADR=.
   1873					DRVNAM=.-$$$ADR
   1874						 .ASCII	/NAME/		;DEVICE NAME IN ASCII
   1875						 .EVEN
   1876					DRVSET=.-$$$ADR
   1877						 .WORD	DV'SET		;DISK ADDRESS SETUP ROUTINE
   1878					.IF DF FTABS
   1879					DRVABS=.-$$$ADR
   1880						 .WORD	DV'ABS		;ABSOLUTE (/AB) SAVE SETUP ROUTINE
   1881					.ENDC ; .IF DF FTABS
   1882					DRVBOT=.-$$$ADR
   1883						 .WORD	DV'BOOT		;ADDRESS OF BOOTSTRAP CODE
   1884					DRVWRT=.-$$$ADR
   1885						 .WORD	DV'WRT		;DEVICE WRITE ROUTINE
   1886					DRVMSZ=.-$$$ADR
   1887						 .WORD	DV'BMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
   1888					DRVAD1=.-$$$ADR
   1889						 .WORD	DV'BAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
   1890					DRVAD2=.-$$$ADR
   1891						 .WORD	DV'BAD2		;ADDRESS FOR SECOND PART . .
   1892					.IF DF M$$MGE
   1893					DRVUP0=.-$$$ADR
   1894						 .WORD	DV'BUP0		;ADDRESS FOR CURRENT CONTENTS OF UPAR0
   1895					.ENDC
   1896					DRVBTP=.-$$$ADR
   1897						 .WORD	BTPRM		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1898					DRVSIZ=.-$$$ADR
   1899					.ENDM DRIVER
   1900					;
   1901	007042				DRVTAB:
   1902	007042					DRIVER	DX,RX,0
	007042	   104 	   130 			 .ASCII	/DX/		;DEVICE DX IN ASCII
	007044	007122'				 .WORD	RXSET		;DISK ADDRESS SETUP ROUTINE
	007046	007132'				 .WORD	RXBOOT		;ADDRESS OF BOOTSTRAP CODE
	007050	007402'				 .WORD	RXWRT		;DEVICE WRITE ROUTINE
	007052	007364'				 .WORD	RXBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	007054	007170'				 .WORD	RXBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	007056	007170'				 .WORD	RXBAD2		;ADDRESS FOR SECOND PART . .
	007060	000000 				 .WORD	0		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1903	007062					DRIVER	DB,RP,BP.RP4
	007062	   104 	   102 			 .ASCII	/DB/		;DEVICE DB IN ASCII
	007064	007614'				 .WORD	RPSET		;DISK ADDRESS SETUP ROUTINE
	007066	007664'				 .WORD	RPBOOT		;ADDRESS OF BOOTSTRAP CODE
	007070	010020'				 .WORD	RPWRT		;DEVICE WRITE ROUTINE
	007072	007766'				 .WORD	RPBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	007074	007702'				 .WORD	RPBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	007076	007710'				 .WORD	RPBAD2		;ADDRESS FOR SECOND PART . .
	007100	000200 				 .WORD	BP.RP4		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1904	007102					DRIVER	DT,TC,0
	007102	   104 	   124 			 .ASCII	/DT/		;DEVICE DT IN ASCII
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 43-1
DRIVER TABLES

	007104	010156'				 .WORD	TCSET		;DISK ADDRESS SETUP ROUTINE
	007106	010162'				 .WORD	TCBOOT		;ADDRESS OF BOOTSTRAP CODE
	007110	010370'				 .WORD	TCWRT		;DEVICE WRITE ROUTINE
	007112	010332'				 .WORD	TCBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	007114	010166'				 .WORD	TCBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	007116	010166'				 .WORD	TCBAD2		;ADDRESS FOR SECOND PART . .
	007120	000000 				 .WORD	0		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1905		000060 			DRVTBZ=.-DRVTAB
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 44
RX-11 FLOPPY DISK ROUTINES

   1907						.SBTTL	RX-11 FLOPPY DISK ROUTINES
   1908					;
   1909					; RXSET -- SET RX-11 ADDRESS
   1910					;
   1911	007122				RXSET:
   1912	007122	006301 				ASL	R1		;SECTOR IS BLOCK
   1913	007124	006301 				ASL	R1		; TIMES 4
   1914					.IF DF FTABS
   1915						BR	RXSETX		;RETURN FROM RXSET
   1916					;
   1917					; RXABS -- RX-11 ABSOLUTE ADDRESS SET-UP
   1918					;
   1919					RXABS:
   1920						MOV	#<58.*26.>,R1	;SET TO END OF DISK
   1921					.ENDC ; .IF DF FTABS
   1922	007126				RXSETX:
   1923	007126	010100 				MOV	R1,R0		;COPY IT AGAIN FOR BOTH PARTS
   1924	007130					RETURN			;RETURN FROM RXSET/RXABS
	007130	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 45
RX-11 BOOTSTRAP

   1926						.SBTTL	RX-11 BOOTSTRAP
   1927					;
   1928					; RX-11 BOOTSTRAP ROUTINE
   1929					;
   1930					; THIS BOOT IS READ IN FROM SECTOR ZERO (TRACK 1 SECTOR 1)
   1931					;  BY THE BM873-YF ROM.
   1932					;
   1933					; THE FOLLOWING STUFF IS RETURNED IN THE REGISTERS BY THE ROM:
   1934					;
   1935					;	R0 --	READ FUNCTION WITH UNIT # SET OR JUST UNIT #
   1936					;	R1 --	ADDRESS OF RXCS
   1937					;	R5 --	BOOTSTRAP PARAMETER (COPY OF SWITCH REGISTER)
   1938					;
   1939	007132				RXBOOT:
   1940	007132	000240 				NOP			;;;THIS IS A BOOTSTRAP
   1941	007134	106200 				ASRB	R0		;;;GET UNIT BIT INTO CC-C IF NO READ FUNC SPECIFIED
   1942	007136	001401 				BEQ	10$		;;;NO READ FUNC-- GO ON
   1943	007140	106300 				ASLB	R0		;;;READ FUNC ALREADY-- SET IT BACK WITH UNIT #
   1944	007142				10$:
   1945	007142	103002 				BCC	20$		;;;UNIT 0 OR READ FUNC ALREADY?
   1946	007144	012700 	000020 			MOV	#RXUNIT,R0	;;;NO-- SELECT UNIT 1
   1947	007150				20$:
   1948	007150	052700 	000007 			BIS	#RXREAD+RXGO,R0	;;;SET READ FUNCTION
   1949	007154	012706 	002000 			MOV	#2000,SP	;;;SETUP TEMPORARY STACK ABOVE FIRST BLOCK
   1950	007160	005004 				CLR	R4		;;;SET ADDRESS TO START READ AT LOC 0
   1951					;
   1952					; SETUP INITIAL RETURN ADDRESS TO DO A CALL ON
   1953					;  RXBBLK TO READ THE FIRST 256. WORDS
   1954					;
   1955	007162					PUSH	#RXBBLX-RXBOOT	;;;SAME AS CALL RXBBLK/BR RXBBLX
	007162	012746 	000200 			MOV	#RXBBLX-RXBOOT,-(SP)
   1956	007166	012702 				MOV	(PC)+,R2	;;;SETUP INITIAL LOGICAL SECTOR #
   1957	007170				RXBAD1:
   1958	007170	000000 			RXBAD2:	 .WORD	0		;;;SET BY SAVE TO POINT TO FILE
   1959					;	BR	RXBBLK		;;;FALL INTO READ BLOCK ROUTINE
   1960					;
   1961					; RXBBLK -- ROUTINE TO READ ONE BLOCK (256. WORDS) TO MEMORY
   1962					;
   1963					;	R0 --	READ FUNCTION WITH UNIT #
   1964					;	R1 --	ADDRESS OF RXCS
   1965					;	R2 --	CURRENT LOGICAL SECTOR # (UPDATED)
   1966					;	R3 --	SCRATCH
   1967					;	R4 --	CURRENT MEMORY ADDRESS (UPDATED)
   1968					;
   1969	007172				RXBBLK:
   1970	007172					CALL	(PC)		;;;DO 4 CALLS
	007172	004717 				JSR	PC,(PC)
   1971	007174					CALL	(PC)		;;; TO READ SECTOR ROUTINE
	007174	004717 				JSR	PC,(PC)
   1972					;
   1973					; READ A SECTOR
   1974					;
   1975	007176					PUSH	R2		;;;SAVE CURRENT SECTOR
	007176	010246 				MOV	R2,-(SP)
   1976	007200	010011 				MOV	R0,(R1)		;;;EXECUTE A READ SECTOR FUNCTION
   1977					;
   1978					; COMPUTE CURRENT PHYSICAL SECTOR # AND TRACK #
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 45-1
RX-11 BOOTSTRAP

   1979					;
   1980	007202	005003 				CLR	R3		;;;RESET TRACK #
   1981	007204					PUSH	#26.		;;;SET UP DIVISOR ON TOP OF STACK
	007204	012746 	000032 			MOV	#26.,-(SP)
   1982	007210				20$:
   1983	007210	005203 				INC	R3		;;;ONE MORE TRACK
   1984	007212	161602 				SUB	(SP),R2		;;;DIVIDE SECTOR BY 26.
   1985	007214	002375 				BGE	20$		;;; TO FIND LOGICAL SECTOR # WITHIN TRACK
   1986	007216	061602 				ADD	(SP),R2		;;;MAKE SECTOR IN RANGE 0. TO 26.
   1987	007220	005303 				DEC	R3		;;; TRACK IN RANGE 0. TO 76.
   1988	007222	022702 	000014 			CMP	#12.,R2		;;;SECTOR GREATER THAN 12.?
   1989	007226	006102 				ROL	R2		;;;IF SO, CC-C SET, INTERLEAVE FACTOR OF 2.
   1990	007230	006303 				ASL	R3		;;;GET 2*TRACK
   1991	007232	060302 				ADD	R3,R2		;;;SKEW BY 2*TRACK
   1992	007234	060302 				ADD	R3,R2		;;; 4*TRACK
   1993	007236	060302 				ADD	R3,R2		;;; 6*TRACK
   1994	007240				30$:
   1995	007240	161602 				SUB	(SP),R2		;;;GET SECTOR IN RANGE -26. TO -1. AGAIN
   1996	007242	002376 				BGE	30$		;;; . .
   1997	007244				31$:
   1998	007244	062602 				ADD	(SP)+,R2	;;;MAKE LOGICAL SECTOR IN RANGE 0. TO 25.
   1999					;
   2000	007246	006203 				ASR	R3		;;;RESTORE TRACK #
   2001	007250	122223 				CMPB	(R2)+,(R3)+	;;;PHYSICAL SECTOR 1. TO 26., TRACK 1. TO 77.
   2002					;
   2003					; SET SECTOR AND TRACK IN RX-11 TO START READ
   2004					;
   2005	007252				40$:
   2006	007252	105711 				TSTB	(R1)		;;;READY FOR SECTOR #?
   2007	007254	100376 				BPL	40$		;;;NO-- WAIT UNTIL IT IS
   2008	007256	110261 	000002 			MOVB	R2,RXDB-RXCS(R1) ;;;YES-- SET SECTOR #
   2009	007262				50$:
   2010	007262	105711 				TSTB	(R1)		;;;READY FOR TRACK?
   2011	007264	100376 				BPL	50$		;;;NO-- WAIT FOR READY
   2012	007266	110361 	000002 			MOVB	R3,RXDB-RXCS(R1) ;;;YES-- SET TRACK #
   2013					;
   2014					; WAIT FOR FUNCTION TO COMPLETE
   2015					;
   2016	007272				60$:
   2017	007272	032711 	100040 			BIT	#RXERR!RXDONE,(R1) ;;;WAIT FOR EROR OR DONE
   2018	007276	001775 				BEQ	60$		;;; . .
   2019	007300	100714 				BMI	RXBOOT		;;;ERROR-- RETRY WHOLE SHIBANG
   2020					;
   2021					; EMPTY SECTOR BUFFER TO MEMORY
   2022					;
   2023	007302	012711 	000003 			MOV	#RXEMPT!RXGO,(R1) ;;;DO AN EMPTY SECTOR BUFFER FUNCTION
   2024	007306				70$:
   2025	007306	132711 	000240 			BITB	#RXTREQ!RXDONE,(R1) ;;;READY WITH A BYTE?
   2026	007312	001775 				BEQ	70$		;;;NO-- WAIT UNTIL IT IS
   2027	007314	100003 				BPL	80$		;;;DONE-- OFF TO NEXT SECTOR
   2028	007316	116124 	000002 			MOVB	RXDB-RXCS(R1),(R4)+ ;;;STORE A BYTE TO MEMORY
   2029	007322	000771 				BR	70$		;;;LOOP TO EMPTY WHOLE BUFFER
   2030					;
   2031					; BUMP SECTOR TO NEXT SECTOR AND RETURN
   2032					;
   2033	007324				80$:
   2034	007324					POP	R2		;;;RESTORE LOGICAL SECTOR #
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 45-2
RX-11 BOOTSTRAP

	007324	012602 				MOV	(SP)+,R2
   2035	007326	005202 				INC	R2		;;;SET TO NEXT SECTOR
   2036	007330					RETURN			;;;RETURN TO READ ANOTHER SECTOR OR DONE
	007330	000207 				RTS	PC
   2037					;
   2038					.IF G <<.-RXBOOT>-128.>
   2039						.ERROR	<.-RXBOOT> ; RX BOOT TOO BIG FOR FIRST SECTOR
   2040					.ENDC
   2041					;
   2042					; HERE AFTER FIRST BLOCK READ. SETUP KT-11 (IF ANY)
   2043					;
   2044	007332				RXBBLX:
   2045	007332	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   2046					.IF DF M$$MGE
   2047						MOV	#77406,R3	;;;SET TO MAP LARST PAGE
   2048						MOV	R3,KPDR0	;;;KERNAL PAGE 0
   2049						MOV	R3,KPDR1	;;; AND 1 (FOR READING)
   2050						MOV	R3,KPDR7	;;; AND EXTERNAL PAGE
   2051						MOV	R3,UPDR0	;;;USER PAGE 0
   2052						MOV	R3,UPDR7	;;; AND USER EXTERNAL PAGE FOR SAVE
   2053						CLR	KPAR0		;;;MAP KP 0 TO ABSOLUTE ZERO
   2054						MOV	(PC)+@(PC)+	;;;USER PAGE TO WHEREEVER SAVE WAS
   2055					RXBUP0:	 .WORD	0,UPAR0		;;;SET BY SAVE
   2056						MOV	#7600,R3	;;;SET TO MAP EXTERNAL PAGE
   2057						MOV	R3,KPAR7	;;; FOR KERNAL
   2058						MOV	R3,UPAR7	;;; AND USER
   2059						MOV	#1,SSR0		;;;ENABLE SEGMENTAION
   2060					.IFTF
   2061					;
   2062					; SETUP STACK AT TOP OF BOOT BLOCK, SAVE BOOT  PARAMETER IN LOC 776
   2063					;
   2064	007340	012706 	001000 			MOV	#1000,SP	;;;SETUP KERNAL STACK
   2065	007344					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	007344	010546 				MOV	R5,-(SP)
   2066					;
   2067	007346	005005 				CLR	R5		;;;CLEAR BLOCK POINTER
   2068	007350	000402 				BR	RXBNX1		;;;FINISH THIS BLOCK AND GET NEXT ONE
   2069					;
   2070					; READ NEXT BLOCK (256. WORDS, 4 SECTORS)
   2071					;
   2072	007352				RXBNXT:
   2073					.IFT
   2074						MOV	R5,KPAR1	;;;SET BLOCK TO MAP TO 20000
   2075						MOV	#20000,R4	;;;START AT BEGINNING OF THIS BLOCK
   2076					.ENDC
   2077	007352					CALL	RXBBLK-RXBOOT	;;;READ A BLOCK
	007352	004737 	000040 			JSR	PC,RXBBLK-RXBOOT
   2078	007356				RXBNX1:
   2079	007356	062705 	000010 			ADD	#256.*2/100,R5	;;;BUMP POINTER BY # 32. WORD BLOCKS IN 4 SECTORS
   2080	007362	022705 				CMP	(PC)+,R5	;;;REACHED MEMORY SIZE YET?
   2081	007364	000000 			RXBMSZ:	 .WORD	0		;;;FILLED BY SAVE TO SIZE OF MEMORY IN 32. WORD BLOCKS
   2082	007366	101371 				BHI	RXBNXT		;;;NO-- READ NEXT BLOCK
   2083					;
   2084					; BOOTSTRAP COMPLETE-- RETURN TO SAVE IN USER MODE
   2085					;
   2086					.IF DF M$$MGE
   2087						PUSH	#PS.USR!PS.REG!PR7 ;;;SET TO USER MODE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 45-3
RX-11 BOOTSTRAP

   2088					.IFF
   2089	007370					PUSH	#PS.REG!PR7	;;;SET TO REGISTER SET 1
	007370	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2090					.ENDC
   2091	007374					PUSH	#RESTORE	;;;USER PC, RESTORE SYSTEM
	007374	012746 	002734'			MOV	#RESTORE,-(SP)
   2092	007400	000002 				RTI			;;;RETURN TO SAVE
   2093					.IF G <<.-RXBOOT>-<128.*4>>
   2094						.ERROR	<.-RXBOOT> ; RX BOOT TOO BIG FOR FIRST BLOCK
   2095					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 46
RX-11 WRITE ROUTINE

   2097						.SBTTL	RX-11 WRITE ROUTINE
   2098					;
   2099					; RXWRT -- WRITE MEMORY TO THE RX-11
   2100					;
   2101					; INPUTS:
   2102					;	DSKADR+0 --	LOGICAL SECTOR TO START WRITE (0.-76.*26.)
   2103					;	DEVUNT --	(BYTE) UNIT # TO WRITE ON
   2104					;	MEMSIZ --	NUMBER OF 32. WORD BLOCKS TO WRITE, STARTING AT
   2105					;			ABSOLUTE ZERO
   2106					;
   2107	007402				RXWRT:
   2108					;
   2109					; SETUP REGISTERS:
   2110					;	R0 --	WRITE FUNCTION WITH PROPER UNIT #
   2111					;	R1 --	ADDRESS OF RXCS
   2112					;	R2 --	LOGICAL SECTOR # TO START WRITE
   2113					;
   2114	007402	113700 	000044'			MOVB	DEVUNT,R0	;;;GET SPECIFIED UNIT #
   2115	007406	001402 				BEQ	10$		;;;ZERO-- OK
   2116	007410	012700 	000020 			MOV	#RXUNIT,R0	;;;NOT ZERO-- ASSUME UNIT 1
   2117	007414				10$:
   2118	007414	052700 	000005 			BIS	#RXWRIT!RXGO,R0	;;;MAKE IT A WRITE FUNCTION
   2119	007420	012701 	177170 			MOV	#RXCS,R1	;;;ADDRESS CONTROL/STATUS REGISTER
   2120	007424	013702 	000004'			MOV	DSKADR+0,R2	;;;GET START SECTOR #
   2121					;
   2122					; SET UP MAP TO ABSOLUTE ZERO
   2123					;
   2124					.IF DF M$$MGE
   2125						MOV	#77406,UPDR1	;;;MAP AS MUCH AS POSSIBLE
   2126					.IFF
   2127	007430	005004 				CLR	R4		;;;CLEAR POINTER TO MEMORY
   2128					.IFTF
   2129	007432	005005 				CLR	R5		;;;CLEAR COUNTER OF 32. WORD BLOCKS WRITTEN
   2130					;
   2131					; WRITE NEXT BLOCK (256. WORDS, 4 SECTORS) TO FLOPPY
   2132					;
   2133	007434				RXWNXT:
   2134					.IFT
   2135						MOV	R5,UPAR1	;;;SET MAP TO CURRENT 32. WORD BLOCK
   2136						MOV	#20000,R4	;;;MAP IT TO 20000
   2137					.ENDC
   2138	007434					CALL	RXWBLK		;;;WRITE A BLOCK (256. WORDS)
	007434	004737 	007454'			JSR	PC,RXWBLK
   2139	007440	062705 	000010 			ADD	#256.*2/100,R5	;;;BUMP TO NEXT 32. WORD BLOCK
   2140	007444	023705 	000014'			CMP	MEMSIZ,R5	;;;FINISHED WITH ALL OF CORE?
   2141	007450	101371 				BHI	RXWNXT		;;;NOT YET-- WRITE NEXT BLOCK
   2142					;
   2143	007452					RETURN			;;;YES-- RETURN FROM RXWRT
	007452	000207 				RTS	PC
   2144					;
   2145					; RXWBLK -- ROUTINE TO WRITE ONE BLOCK (256. WORDS) TO MEMORY
   2146					;
   2147					;	R0 --	WRITE FUNCTION WITH UNIT #
   2148					;	R1 --	ADDRESS OF RXCS
   2149					;	R2 --	CURRENT LOGICAL SECTOR # (UPDATED)
   2150					;	R3 --	SCRATCH
   2151					;	R4 --	CURRENT MEMORY ADDRESS (UPDATED)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 46-1
RX-11 WRITE ROUTINE

   2152					;
   2153	007454				RXWBLK:
   2154	007454					CALL	(PC)		;;;DO 4 CALLS
	007454	004717 				JSR	PC,(PC)
   2155	007456					CALL	(PC)		;;; TO WRITE SECTOR ROUTINE
	007456	004717 				JSR	PC,(PC)
   2156					;
   2157					; FILL SECTOR BUFFER BEFORE WRITE
   2158					;
   2159	007460	012711 	000001 			MOV	#RXFILL!RXGO,(R1) ;;;DO A FILL FUNCTION
   2160	007464				10$:
   2161	007464	132711 	000240 			BITB	#RXTREQ!RXDONE,(R1) ;;;READY FOR A BYTE YET?
   2162	007470	001775 				BEQ	10$		;;;NO-- WAIT UNTIL IT IS
   2163	007472	100003 				BPL	15$		;;;DONE-- GO WRITE
   2164	007474	112461 	000002 			MOVB	(R4)+,RXDB-RXCS(R1) ;;;STORE A BYTE FROM MEMORY IN SECTOR BUFFER
   2165	007500	000771 				BR	10$		;;;LOOP TO FILL BUFFER
   2166					;
   2167					; WRITE A SECTOR
   2168					;
   2169	007502				15$:
   2170	007502					PUSH	R2		;;;SAVE CURRENT SECTOR
	007502	010246 				MOV	R2,-(SP)
   2171	007504	010011 				MOV	R0,(R1)		;;;EXECUTE A WRITE SECTOR FUNCTION
   2172					;
   2173					; COMPUTE CURRENT PHYSICAL SECTOR # AND TRACK #
   2174					;
   2175	007506	005003 				CLR	R3		;;;RESET TRACK #
   2176	007510					PUSH	#26.		;;;SET DIVISOR ON TOP OF STACK
	007510	012746 	000032 			MOV	#26.,-(SP)
   2177	007514				20$:
   2178	007514	005203 				INC	R3		;;;ONE MORE TRACK
   2179	007516	161602 				SUB	(SP),R2		;;;DIVIDE SECTOR BY 26.
   2180	007520	002375 				BGE	20$		;;; TO FIND LOGICAL SECTOR # WITHIN TRACK
   2181	007522	061602 				ADD	(SP),R2		;;;MAKE SECTOR IN RANGE 0. TO 25.
   2182	007524	005303 				DEC	R3		;;; TRACK IN RANGE 0. TO 76.
   2183	007526	022702 	000014 			CMP	#12.,R2		;;;SECTOR GREATER THAN 12.?
   2184	007532	006102 				ROL	R2		;;;IF SO, CC-C SET, INTERLEAVE FACTOR OF 2.
   2185	007534	006303 				ASL	R3		;;;GET 2*TRACK
   2186	007536	060302 				ADD	R3,R2		;;;SKEW BY 2*TRACK
   2187	007540	060302 				ADD	R3,R2		;;; 4*TRACK
   2188	007542	060302 				ADD	R3,R2		;;; 6*TRACK
   2189	007544				30$:
   2190	007544	161602 				SUB	(SP),R2		;;;GET SECTOR IN RANGE -26. TO -1. AGAIN
   2191	007546	002376 				BGE	30$		;;; . .
   2192	007550				31$:
   2193	007550	062602 				ADD	(SP)+,R2	;;;MAKE LOGICAL SECTOR IN RANGE 0. TO 25.
   2194					;
   2195	007552	006203 				ASR	R3		;;;RESTORE TRACK #
   2196	007554	122223 				CMPB	(R2)+,(R3)+	;;;PHYSICAL SECTOR 1. TO 26., TRACK 1. TO 77.
   2197					;
   2198					; SET SECTOR AND TRACK IN RX-11 TO START WRITE
   2199					;
   2200	007556				40$:
   2201	007556	105711 				TSTB	(R1)		;;;READY FOR SECTOR #?
   2202	007560	100376 				BPL	40$		;;;NO-- WAIT UNTIL IT IS
   2203	007562	110261 	000002 			MOVB	R2,RXDB-RXCS(R1) ;;;YES-- SET SECTOR #
   2204	007566				50$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 46-2
RX-11 WRITE ROUTINE

   2205	007566	105711 				TSTB	(R1)		;;;READY FOR TRACK?
   2206	007570	100376 				BPL	50$		;;;NO-- WAIT FOR READY
   2207	007572	110361 	000002 			MOVB	R3,RXDB-RXCS(R1) ;;;YES-- SET TRACK #
   2208					;
   2209					; WAIT FOR FUNCTION TO COMPLETE
   2210					;
   2211	007576				60$:
   2212	007576	032711 	100040 			BIT	#RXERR!RXDONE,(R1) ;;;WAIT FOR EROR OR DONE
   2213	007602	001775 				BEQ	60$		;;; . .
   2214	007604	100560 				BMI	WRTERR		;;;GIVE UP IF ERROR AND COMPLAIN (AFTER RESTORE)
   2215					;
   2216					; BUMP SECTOR TO NEXT SECTOR AND RETURN
   2217					;
   2218	007606					POP	R2		;;;RESTORE LOGICAL SECTOR #
	007606	012602 				MOV	(SP)+,R2
   2219	007610	005202 				INC	R2		;;;SET TO NEXT SECTOR
   2220	007612					RETURN			;;;RETURN TO WRITE ANOTHER SECTOR OR DONE
	007612	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 47
RP04/RP06 DISK ROUTINES

   2222						.SBTTL	RP04/RP06 DISK ROUTINES
   2223					;
   2224					; RPSET -- SET RP DISK ADDRESS
   2225					;
   2226	007614				RPSET:
   2227	007614	012702 	000020 			MOV	#16.,R2		;SET LOOP COUNT
   2228	007620				20$:
   2229	007620	006301 				ASL	R1		;MULTIPY ADDRESS
   2230	007622	006100 				ROL	R0		; BY TWO AND MOVE TRACK & SECTOR TO R0
   2231	007624	020027 	000574 			CMP	R0,#19.*20.	;LESS THAN A CYLINDER OF BLOCKS LEFT?
   2232	007630	103403 				BLO	30$		;YES-- WE ARE DOWN TO LAST CYLINDER
   2233	007632	162700 	000574 			SUB	#19.*20.,R0	;NO-- TRIM OFF ANOTHER CYLINDER
   2234	007636	005201 				INC	R1		;COUNT ANOTHER CYLINDER (OR 2**N CYLINDERS)
   2235	007640				30$:
   2236	007640	077211 				SOB	R2,20$		;LOOP FOR ALL SIXTEEN BITS OF ADDRESS
   2237					;
   2238	007642					PUSH	R1		;SAVE CYLINDER #
	007642	010146 				MOV	R1,-(SP)
   2239	007644	012701 	000024 			MOV	#20.,R1		;SET TO DIVIDE TRACK/SECTOR IN R0 BY
   2240	007650					CALL	$DIV		; NUMBER OF SECTORS PER TRACK
	007650	004737 	000000G			JSR	PC,$DIV
   2241	007654	000300 				SWAB	R0		;MOVE TRACK TO HIGH BYTE
   2242	007656	050001 				BIS	R0,R1		; SECTOR TO LOW BYTE (REMAINDER)
   2243	007660					POP	R0		;RESTORE CYLINDER #
	007660	012600 				MOV	(SP)+,R0
   2244	007662					RETURN			;RETURN FROM RPSET
	007662	000207 				RTS	PC
   2245					;
   2246					; RPABS -- SET RP DISK ABSOLUTE ADDRESS
   2247					;
   2248					.IF DF FTABS
   2249					RPABS:
   2250						MOV	#409.,R0	;SET MAINTAINENCE CYLINDER **** WON'T WORK FOR RP06 ****
   2251						MOV	#<13.*BIT8>!<8.*BIT0>,R1 ; AT TRACK 13, SECTOR 8 (VERY END)
   2252						RETURN			;RETURN FROM RPABS
   2253					.ENDC ; .IF DF FTABS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 48
RP04/RP06 BOOTSTRAP

   2255						.SBTTL	RP04/RP06 BOOTSTRAP
   2256					;
   2257					;
   2258					; RP DISK BOOTSTRAP
   2259					;
   2260					; THIS BOOT IS READ IN FROM BLOCK 0 OF THE RP BY THE BM873-YF ROM.
   2261					;
   2262					; THE ROM RETURNS THE FOLLOWING VALUES IN THE REGISTERS:
   2263					;	R1 --	ADDRESS OF RPCS1
   2264					;	R5 --	BOOTSTRAP PARAMETER (NORMALLY SWITCH REGISTER)
   2265					;
   2266	007664				RPBOOT:
   2267	007664	000240 				NOP			;;;THIS IS A BOOTSTRAP
   2268					;
   2269					; RESET THE RP AND SET UP INITIAL TRACK AND SECTOR ADDRESS
   2270					;
   2271	007666	012711 	000021 			MOV	#RPPRST!RPGO,(R1) ;;;DO READ-IN PRESET
   2272	007672	005004 				CLR	R4		;;;CLEAR COUNTER OF 32. WORD BLOCKS READ
   2273	007674	005061 	000004 			CLR	RPBA-RPCS1(R1)	;;;SET BUS ADDR TO ZERO
   2274		007702'			RPBAD1=	.+2
   2275	007700	012761 	000000 	000034 		MOV	#0,RPDC-RPCS1(R1) ;;;SETUP CYLINDER #
   2276		007710'			RPBAD2=	.+2
   2277	007706	012761 	000000 	000006 		MOV	#0,RPDA-RPCS1(R1) ;;; AND TRACK AND SECTOR
   2278	007714	052761 	004000 	000032 		BIS	#RPECCI,RPOF-RPCS1(R1) ;;;SET ECC INHIBIT
   2279	007722	112711 	000070 			MOVB	#RPREAD,(R1)	;;;SET READ FUNCTION, NO GO
   2280					;
   2281					; READ 1K FROM THE RP TO MEMORY
   2282					;
   2283	007726				RPBNXT:
   2284	007726	012761 	176000 	000002 		MOV	#<-1024.>,RPWC-RPCS1(R1) ;;;SET 1K WORD COUNT
   2285	007734	105211 				INCB	(R1)		;;;DO NEXT READ
   2286	007736				10$:
   2287	007736	105711 				TSTB	(R1)		;;;TRANSFER COMPLETE?
   2288	007740	100376 				BPL	10$		;;;NO-- WAIT FOR DONE
   2289					;
   2290					; CHECK TO MAKE SURE NO ERRORS
   2291					;
   2292	007742	032711 	060000 			BIT	#RPTRE!RPMCPE,(R1) ;;;CONTROLLER ERROR?
   2293	007746	001346 				BNE	RPBOOT		;;;YES-- RETRY
   2294	007750	032761 	140000 	000012 		BIT	#RPATA!RPERR,RPDS-RPCS1(R1) ;;;ATTENTION OR DRIVE ERROR?
   2295	007756	001342 				BNE	RPBOOT		;;;YES-- RETRY
   2296					;
   2297					; SEE IF DONE WITH ALL OF MEMORY
   2298					;
   2299	007760	062704 	000040 			ADD	#1024.*2/100,R4	;;;BUMP # 32. WORD BLOCKS WE'VE READ
   2300	007764	022704 				CMP	(PC)+,R4	;;;FINISHED WITH ALL OF MEMORY YET?
   2301	007766	000000 			RPBMSZ:	 .WORD	0		;;;SET UP BY SAVE TO # 32. WORD BLOCKS OF MEMORY
   2302	007770	101356 				BHI	RPBNXT		;;;NO-- READ SOME MORE
   2303					;
   2304					; BOOTSTRAP COMPLETE-- SETUP KT-11 REGISTERS, IF ANY
   2305					;
   2306	007772	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   2307					.IF DF M$$MGE
   2308						MOV	#77406,R2	;;;SET TO MAP MAX PAGE SIZE
   2309						MOV	R2,KPDR0	;;; FOR KERNAL PAGE 0
   2310						MOV	R2,KPDR7	;;; AND KP 7
   2311						MOV	R2,UPDR0	;;; AND USER PAGE 7
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 48-1
RP04/RP06 BOOTSTRAP

   2312						MOV	R2,UPDR7	;;; EXTERNAL PAGE FOR USER, TOO
   2313						CLR	KPAR0		;;;MAP KERNAL PAGE 0 TO ABSOLUTE 0
   2314						MOV	(PC)+,@(PC)+	;;;SET UP USER PAGE 0
   2315					RPBUP0:	 .WORD	0,UPAR0		;;;SPACE FOR ADDR OF PAGE
   2316						MOV	#7600,R2	;;;POINT TO EXTERNAL PAGE
   2317						MOV	R2,KPAR7	;;; FOR EXEC
   2318						MOV	R2,UPAR7	;;; AND USER
   2319						MOV	#1,SSR0		;;;ENABLE SEGMENTATION
   2320					.ENDC
   2321					;
   2322					; SETUP TEMPORARY KERNAL STACK AT TOP OF BOOT BLOCK, AND SAVE
   2323					;  BOOTSTRAP PARAMETER AT LOCATION 776
   2324					;
   2325	010000	012706 	001000 			MOV	#1000,SP	;;;START STACK AT TOP OF OUR BLOCK
   2326	010004					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	010004	010546 				MOV	R5,-(SP)
   2327					;
   2328					; RETURN TO SAVE TASK IN USER MODE AT SYSTEM RESTORE ENTRY POINT
   2329					;
   2330					.IF DF M$$MGE
   2331						PUSH	#PS.USR!PS.REG!PR7 ;;;USER MODE, PRIORITY 7
   2332					.IFF
   2333	010006					PUSH	#PS.REG!PR7	;;;SET REGISTER SET 1, PRI 7
	010006	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2334					.ENDC
   2335	010012					PUSH	#RESTORE	;;; AND RETURN PC IN USER SPACE
	010012	012746 	002734'			MOV	#RESTORE,-(SP)
   2336	010016	000002 				RTI			;;;BACK TO SAVE.
   2337					.IF G <<.-RPBOOT>-<256.*2>>
   2338						.ERROR	<.-RPBOOT> ;  RP BOOT TOO BIG FOR FIRST BLOCK
   2339					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 49
RP04/RP06 WRITE ROUTINE

   2341						.SBTTL	RP04/RP06 WRITE ROUTINE
   2342					;
   2343					; RPWRT -- WRITE MEMORY TO THE RP DISK
   2344					;
   2345					; INPUTS:
   2346					;	DSKADR+0 --	CYLINDER ADDRESS TO START TRANSFER
   2347					;	DSKADR+2 --	(BYTE) SECTOR TO START
   2348					;	DSKADR+3 --	(BYTE) TRACK TO START
   2349					;	DEVUNT --	(BYTE) UNIT # TO WRITE ON
   2350					;	MEMSIZ --	# OF 32. WORD BLOCKS OF MEMORY TO WRITE
   2351					;
   2352	010020				RPWRT:
   2353	010020	012701 	176700 			MOV	#RPCS1,R1	;;;GET ADDRESS OF RPCS1
   2354	010024	005004 				CLR	R4		;;;CLEAR POINTER TO # 32. WORD BLOCKS WRITTEN
   2355	010026	113761 	000044'	000010 		MOVB	DEVUNT,RPCS2+0-RPCS1(R1);;;SET UNIT #
   2356					;
   2357					; INITIALIZE DRIVE
   2358					;
   2359	010034	032711 	004000 			BIT	#RPDVA,(R1)	;;;IS DRIVE AVAILABLE?
   2360	010040	001442 				BEQ	WRTERR		;;;NO-- GIVE ERROR
   2361	010042	012711 	000021 			MOV	#RPPRST!RPGO,(R1) ;;;DO A READ-IN PRESET
   2362	010046	005061 	000004 			CLR	RPBA-RPCS1(R1)	;;;CLEAR BUS ADDRESS TO START WRITE AT ZERO
   2363	010052	013761 	000004'	000034 		MOV	DSKADR+0,RPDC-RPCS1(R1) ;;;SETUP DESIRED CYLINDER
   2364	010060	013761 	000006'	000006 		MOV	DSKADR+2,RPDA-RPCS1(R1) ;;; AND TRACK AND SECTOR
   2365	010066	052761 	004000 	000032 		BIS	#RPECCI,RPOF-RPCS1(R1) ;;;SET ECC INHIBIT
   2366	010074	112711 	000060 			MOVB	#RPWRIT,(R1)	;;;SET WRITE FUNCTION, NO GO
   2367					;
   2368					; WRITE ONE BLOCK OF MEMORY TO THE RP04
   2369					;
   2370	010100				RPWNXT:
   2371	010100	012761 	177400 	000002 		MOV	#<-256.>,RPWC-RPCS1(R1) ;;;SET -VE WORD COUNT
   2372	010106	105211 				INCB	(R1)		;;;WRITE NEXT BLOCK
   2373	010110				10$:
   2374	010110	105711 				TSTB	(R1)		;;;DONE SET?
   2375	010112	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2376					;
   2377					; CHECK FOR ERRORS DURING TRANSFER
   2378					;
   2379	010114	032711 	060000 			BIT	#RPTRE!RPMCPE,(R1) ;;;CONTROLLER ERROR?
   2380	010120	001012 				BNE	WRTERR		;;;YES-- GIVE UP
   2381	010122	032761 	140000 	000012 		BIT	#RPATA!RPERR,RPDS-RPCS1(R1) ;;;DRIVE ERROR?
   2382	010130	001006 				BNE	WRTERR		;;;YES-- GIVE UP ALSO
   2383					;
   2384					; SEE IF DONE WITH ALL OF MEMORY
   2385					;
   2386	010132	062704 	000010 			ADD	#256.*2/100,R4	;;;ADD A BLOCK'S WORTH OF 32. WORD BLOCKS
   2387	010136	023704 	000014'			CMP	MEMSIZ,R4	;;;DONE WITH ALL OF MEMORY?
   2388	010142	101356 				BHI	RPWNXT		;;;NO-- WRITE NEXT BLOCK
   2389	010144					RETURN			;;;YES-- RETURN FROM RPWRT
	010144	000207 				RTS	PC
   2390					;
   2391					;
   2392					; HERE ON WRITE ERRORS ON EITHER THE RP04 OR THE RX-11
   2393					; JUST RETURN TO RESTORE WITH WEFLAG= 1 TO INDICATE ERROR
   2394					;
   2395	010146				WRTERR:
   2396	010146	105237 	000060'			INCB	WEFLAG		;;;NOTE ERROR IN FLAG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 49-1
RP04/RP06 WRITE ROUTINE

   2397	010152	000137 	002734'			JMP	RESTORE		;;;RESTORE SYSTEM, THEN GIVE ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 50
TC-11 DECTAPE ROUTINES

   2399						.SBTTL	TC-11 DECTAPE ROUTINES
   2400					;
   2401					; TCABS -- SET TC-11 ABSOLUTE BLOCK #
   2402					;
   2403					.IF DF FTABS
   2404					TCABS:
   2405						MOV	#^D<578-<28*4>-1>,R1 ;SET TO END OF TAPE
   2406					;	BR	TCSET		;ONWARD!
   2407					.ENDC ; .IF DF FTABS
   2408					;
   2409					; TCSET -- SET TC-11 BLOCK #
   2410					;
   2411	010156				TCSET:
   2412	010156	010100 				MOV	R1,R0		;JUST COPY LOW BLOCK #
   2413	010160					RETURN			; . .
	010160	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 51
TC-11 BOOTSTRAP

   2415						.SBTTL	TC-11 BOOTSTRAP
   2416					;
   2417					; HERE TO BOOT FROM TC-11
   2418					;
   2419					; REGISTERS LEFT BY BM-873 ROM:
   2420					;	R1 --	ADDRESS OF TCCM
   2421					;	R5 --	BOOT PARAMETER WORD
   2422					;
   2423	010162				TCBOOT:
   2424	010162	000240 				NOP			;;;THIS IS A BOOTSTRAP
   2425					;
   2426					; SELECT UNIT AND SET UP REGISTERS:
   2427					;	R1 --	ADDRESS OF TCCM
   2428					;	R2 --	BLOCK #
   2429					;	R4 --	COUNT OF 32. WORD BLOCKS READ
   2430					;
   2431		010166'			TCBAD1=.+2
   2432		010166'			TCBAD2=.+2
   2433	010164	012702 	000000 			MOV	#0,R2		;;;GET BLOCK #
   2434	010170	010203 				MOV	R2,R3		;;;COPY THE BLOCK #
   2435	010172	162703 	000003 			SUB	#3,R3		;;;BACK TO THREE BLOCK BEFORE IT
   2436	010176	005004 				CLR	R4		;;;RESET # BLOCKS READ
   2437	010200	005061 	000004 			CLR	TCBA-TCCM(R1)	;;;RESET BUS ADDRESS REGISTER
   2438					;
   2439					; SEARCH FOR CURRENT BLOCK ON TAPE
   2440					;
   2441	010204	112711 	000002 			MOVB	#TCRNUM,(R1)	;;;SET READ BLOCK # FUNCTION
   2442	010210				5$:
   2443	010210	052711 	004000 			BIS	#TCREV,(R1)	;;;SET REVERSE MODE
   2444	010214	105211 				INCB	(R1)		;;;START READ BLOCK FUNCTION
   2445	010216				10$:
   2446	010216	105711 				TSTB	(R1)		;;;READY?
   2447	010220	100376 				BPL	10$		;;;NO-- WAIT
   2448	010222	005711 				TST	(R1)		;;;ERROR?
   2449	010224	100007 				BPL	40$		;;;NO-- CHECK OUT BLOCK #
   2450	010226				20$:
   2451	010226	005761 	177776 			TST	TCST-TCCM(R1)	;;;ERROR-- IS IT END-ZONE?
   2452	010232	100353 				BPL	TCBOOT		;;;NO-- RETRY
   2453	010234	032711 	004000 			BIT	#TCREV,(R1)	;;;GOING REVERSE?
   2454	010240	001763 				BEQ	5$		;;;NO-- GO THAT WAY
   2455	010242	000403 				BR	50$		;;;YES-- GO FORWARD
   2456					;
   2457	010244				40$:
   2458	010244	026103 	000006 			CMP	TCDT-TCCM(R1),R3 ;;;PAST BLOCK YET (CURRENT BLOCK LOW)?
   2459	010250	003357 				BGT	5$		;;;NO-- KEEP SEARCHING IN REVERSE
   2460	010252				50$:
   2461	010252	042711 	004000 			BIC	#TCREV,(R1)	;;;GO FORWARD
   2462	010256	105211 				INCB	(R1)		;;;START READ BLOCK # FUNCTION
   2463	010260				60$:
   2464	010260	105711 				TSTB	(R1)		;;;READY?
   2465	010262	100376 				BPL	60$		;;;NO-- WAIT
   2466	010264	005711 				TST	(R1)		;;;ERROR?
   2467	010266	100757 				BMI	20$		;;;YES-- CHECK IT OUT
   2468	010270	026102 	000006 			CMP	TCDT-TCCM(R1),R2 ;;;AT PROPER BLOCK?
   2469	010274	002766 				BLT	50$		;;;NOT YET-- KEEP GOING
   2470	010276	003344 				BGT	5$		;;;OOPS, PAST IT-- GO BACK AGAIN
   2471					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 51-1
TC-11 BOOTSTRAP

   2472					; BLOCK FOUND-- START TRANSFER
   2473					;
   2474	010300	112711 	000004 			MOVB	#TCREAD,(R1)	;;;SET READ FUNCTION, NO GO
   2475					;
   2476					; START NEXT 1.K TRANSFER
   2477					;
   2478	010304				TCBNXT:
   2479	010304	012761 	176000 	000002 		MOV	#<-1024.>,TCWC-TCCM(R1) ;;;SET WORD COUNT
   2480	010312	105211 				INCB	(R1)		;;;SET GO
   2481	010314				10$:
   2482	010314	105711 				TSTB	(R1)		;;;READY?
   2483	010316	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2484	010320	005711 				TST	(R1)		;;;ERRORS?
   2485	010322	100717 				BMI	TCBOOT		;;;YES-- TRY IT ALL AGAIN
   2486					;
   2487					; SEE IF ALL DONE
   2488					;
   2489	010324	062704 	000040 			ADD	#1024.*2/100,R4	;;;BUMP COUNT OF 32. WORD BLOCKS READ
   2490	010330	022704 				CMP	(PC)+,R4	;;;DONE YET?
   2491	010332	000000 			TCBMSZ:	 .WORD	0		;;;SPACE FOR SIZE
   2492	010334	101363 				BHI	TCBNXT		;;;NO-- GET NEXT BLOCK
   2493	010336	112711 	000011 			MOVB	#TCSTOP+TCGO,(R1) ;;;STOP TAPE
   2494					;
   2495					; BOOTSTRAP COMPLETE-- SETUP KT-11 REGISTERS, IF ANY
   2496					;
   2497	010342	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   2498					.IF DF M$$MGE
   2499						MOV	#77406,R2	;;;SET TO MAP MAX PAGE SIZE
   2500						MOV	R2,KPDR0	;;; FOR KERNAL PAGE 0
   2501						MOV	R2,KPDR7	;;; AND KP 7
   2502						MOV	R2,UPDR0	;;; AND USER PAGE 7
   2503						MOV	R2,UPDR7	;;; EXTERNAL PAGE FOR USER, TOO
   2504						CLR	KPAR0		;;;MAP KERNAL PAGE 0 TO ABSOLUTE 0
   2505						MOV	(PC)+,@(PC)+	;;;SET UP USER PAGE 0
   2506					TCBUP0:	 .WORD	0,UPAR0		;;;SPACE FOR ADDR OF PAGE
   2507						MOV	#7600,R2	;;;POINT TO EXTERNAL PAGE
   2508						MOV	R2,KPAR7	;;; FOR EXEC
   2509						MOV	R2,UPAR7	;;; AND USER
   2510						MOV	#1,SSR0		;;;ENABLE SEGMENTATION
   2511					.ENDC
   2512					;
   2513					; SETUP TEMPORARY KERNAL STACK AT TOP OF BOOT BLOCK, AND SAVE
   2514					;  BOOTSTRAP PARAMETER AT LOCATION 776
   2515					;
   2516	010350	012706 	001000 			MOV	#1000,SP	;;;START STACK AT TOP OF OUR BLOCK
   2517	010354					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	010354	010546 				MOV	R5,-(SP)
   2518					;
   2519					; RETURN TO SAVE TASK IN USER MODE AT SYSTEM RESTORE ENTRY POINT
   2520					;
   2521					.IF DF M$$MGE
   2522						PUSH	#PS.USR!PS.REG!PR7 ;;;USER MODE, PRIORITY 7
   2523					.IFF
   2524	010356					PUSH	#PS.REG!PR7	;;;SET REGISTER SET 1, PRI 7
	010356	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2525					.ENDC
   2526	010362					PUSH	#RESTORE	;;; AND RETURN PC IN USER SPACE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 51-2
TC-11 BOOTSTRAP

	010362	012746 	002734'			MOV	#RESTORE,-(SP)
   2527	010366	000002 				RTI			;;;BACK TO SAVE.
   2528					.IF G <<.-TCBOOT>-<256.*2>>
   2529						.ERROR	<.-TCBOOT> ;  TC BOOT TOO BIG FOR FIRST BLOCK
   2530					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 52
TC-11 WRITE ROUTINE

   2532						.SBTTL	TC-11 WRITE ROUTINE
   2533					;
   2534					; TCWRT -- TC-11 DECTAPE WRITE ROUTINE
   2535					;
   2536					; INPUTS:
   2537					;	DSKADR+0 --	BLOCK # TO START TRANSFER AT
   2538					;	DEVUNT --	UNIT # TO SCRIBBLE ON
   2539					;	MEMSIZ --	# OF 32. WORD BLOCKS TO WRITE
   2540					;
   2541					; REGISTERS:
   2542					;	R1 --	ADDRESS OF TCCM
   2543					;	R2 --	BLOCK #
   2544					;	R4 --	COUNT OF 32. WORD BLOCKS WRITTEN
   2545					;
   2546	010370				TCWRT:
   2547	010370	012701 	177342 			MOV	#TCCM,R1	;;;ADDRESS COMMAND REGISTER
   2548	010374	013702 	000004'			MOV	DSKADR+0,R2	;;;GET BLOCK #
   2549	010400	010203 				MOV	R2,R3		;;;COPY THE BLOCK #
   2550	010402	162703 	000003 			SUB	#3,R3		;;;BACK TO THREE BLOCK BEFORE IT
   2551	010406	113761 	000044'	000001 		MOVB	DEVUNT,1(R1)	;;;SELECT PROPER UNIT
   2552	010414	005004 				CLR	R4		;;;RESET # BLOCKS READ
   2553	010416	005061 	000004 			CLR	TCBA-TCCM(R1)	;;;RESET BUS ADDRESS REGISTER
   2554					;
   2555					; SEARCH FOR CURRENT BLOCK ON TAPE
   2556					;
   2557	010422	112711 	000002 			MOVB	#TCRNUM,(R1)	;;;SET READ BLOCK # FUNCTION
   2558	010426				5$:
   2559	010426	052711 	004000 			BIS	#TCREV,(R1)	;;;SET REVERSE MODE
   2560	010432	105211 				INCB	(R1)		;;;START READ BLOCK FUNCTION
   2561	010434				10$:
   2562	010434	105711 				TSTB	(R1)		;;;READY?
   2563	010436	100376 				BPL	10$		;;;NO-- WAIT
   2564	010440	005711 				TST	(R1)		;;;ERROR?
   2565	010442	100007 				BPL	40$		;;;NO-- CHECK OUT BLOCK #
   2566	010444				20$:
   2567	010444	005761 	177776 			TST	TCST-TCCM(R1)	;;;ERROR-- IS IT END-ZONE?
   2568	010450	100244 				BPL	TCBOOT		;;;NO-- RETRY
   2569	010452	032711 	004000 			BIT	#TCREV,(R1)	;;;GOING REVERSE?
   2570	010456	001763 				BEQ	5$		;;;NO-- GO THAT WAY
   2571	010460	000403 				BR	50$		;;;YES-- GO FORWARD
   2572					;
   2573	010462				40$:
   2574	010462	026103 	000006 			CMP	TCDT-TCCM(R1),R3 ;;;PAST BLOCK YET (CURRENT BLOCK LOW)?
   2575	010466	003357 				BGT	5$		;;;NO-- KEEP SEARCHING IN REVERSE
   2576	010470				50$:
   2577	010470	042711 	004000 			BIC	#TCREV,(R1)	;;;GO FORWARD
   2578	010474	105211 				INCB	(R1)		;;;START READ BLOCK # FUNCTION
   2579	010476				60$:
   2580	010476	105711 				TSTB	(R1)		;;;READY?
   2581	010500	100376 				BPL	60$		;;;NO-- WAIT
   2582	010502	005711 				TST	(R1)		;;;ERROR?
   2583	010504	100757 				BMI	20$		;;;YES-- CHECK IT OUT
   2584	010506	026102 	000006 			CMP	TCDT-TCCM(R1),R2 ;;;AT PROPER BLOCK?
   2585	010512	002766 				BLT	50$		;;;NOT YET-- KEEP GOING
   2586	010514	003344 				BGT	5$		;;;OOPS, PAST IT-- GO BACK AGAIN
   2587					;
   2588					; BLOCK FOUND-- START TRANSFER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 52-1
TC-11 WRITE ROUTINE

   2589					;
   2590	010516	112711 	000014 			MOVB	#TCWRIT,(R1)	;;;SET WRITE FUNCTION, NO GO
   2591					;
   2592					; START NEXT 1.K TRANSFER
   2593					;
   2594	010522				TCWNXT:
   2595	010522	012761 	177400 	000002 		MOV	#<-256.>,TCWC-TCCM(R1) ;;;SET WORD COUNT
   2596	010530	105211 				INCB	(R1)		;;;SET GO
   2597	010532				10$:
   2598	010532	105711 				TSTB	(R1)		;;;READY?
   2599	010534	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2600	010536	005711 				TST	(R1)		;;;ERRORS?
   2601	010540	100410 				BMI	TCWERR		;;;YES-- GIVE UP
   2602					;
   2603					; SEE IF ALL DONE
   2604					;
   2605	010542	062704 	000010 			ADD	#256.*2/100,R4	;;;BUMP COUNT OF 32. WORD BLOCKS TRANSFERED
   2606	010546	023704 	000014'			CMP	MEMSIZ,R4	;;;DONE YET?
   2607	010552	101363 				BHI	TCWNXT		;;;NO-- GET NEXT BLOCK
   2608	010554	112711 	000011 			MOVB	#TCSTOP+TCGO,(R1) ;;;STOP TAPE
   2609	010560					RETURN			;;;FROM TCWRT
	010560	000207 				RTS	PC
   2610					;
   2611					; HERE ON ERROR ON TC-11
   2612					;
   2613	010562				TCWERR:
   2614	010562	000137 	010146'			JMP	WRTERR		;;;GIVE UP
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 53
CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80

   2616					.SBTTL	CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80
   2617
   2618		000000 			.REPT 0
   2619
   2620					COPYRIGHT (C) 1977,1978,1979,1980,1981 BY
   2621					DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
   2622
   2623					THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
   2624					ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
   2625					INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
   2626					COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
   2627					OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
   2628					TRANSFERRED.
   2629
   2630					THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
   2631					AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
   2632					CORPORATION.
   2633
   2634					DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
   2635					SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
   2636
   2637					.ENDR
   2638
   2639
   2640
   2641
   2642					; Version 3(67)  13 NOV 79	DMCC/EGF/JBS/LAD/KR/EJW/MM/DRL/KR/DRL/KR/DRL
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 54
CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80

   2644					;	Revision History
   2645
   2646					; 1(13)	08-Sep-76 JBS	Started revision history
   2647					; 1(14)	19-Oct-76 KR	Added DZ11 code and support to count devices below it
   2648					;			Also added more timing before RESET, and CPU type
   2649					;			checking
   2650					;			as well as fixing bug in core reporting on 11/34
   2651					; 1(15)	03-Nov-76 KR	fixed bug in 11/05 CPU determination
   2652					; 1(16)	04-NOV-76 JBS	INCLUDED EJW'S DTE CHECKING
   2653					; 1(17)	29-DEC-76 JBS	INCLUDED SOME DN61-S CODE
   2654					; 1(20)	21-JAN-77 JBS	REMOVED USE OF SPL INSTRUCTION
   2655					; 1(21) 25-JAN-77 JBS	STARTED ADDING DN20 CODE (INCOMPLETE)
   2656					; 1(22) 28-JAN-77 JBS	SUPPORT DS11 ONLY ON DC75 (CONFLICT WITH LP20)
   2657					; 1(23) 31-JAN-77 JBS	ASSUME NOT DN20 ADDRESSING UNLESS REQUESTED
   2658					; 1(24) 01-FEB-77 JBS	MINOR LISTING CLEANUP
   2659					; 1(25) 14-FEB-77 JBS	UPDATED LEGAL NOTICE AS PER 005-003-286-03
   2660					; 1(26)	09-MAR-77 JBS	STORE DTE20 ADDRESSES AND VECTORS
   2661					;			 AND DO SOME LISTING CLEANUP
   2662					; 1(27) 21-MAR-77 JBS	REMOVE KGLOAD MACRO
   2663					;
   2664					; 1(30) 01-APR-77 JBS	CHANGE NAME TO DN61
   2665					; 1(31)	06-APR-77 MM	SAVE INTERRUPT VECTOR LOCATION
   2666					;			IN A DIFFERENT GLOBAL CELL DTEDTO
   2667					; 1(32) 12-APR-77 JBS	FIX SUPPRESSION OF KG11-A MESSAGE
   2668					; 1(33)	14-APR-77 JBS	FIX DUP11 VECTOR CALCULATION
   2669					;			 AND ADD KMC11
   2670					; 1(34) 17-MAY-77 JBS	REMOVE EXPLICIT REFERENCES TO PS REGISTER AND
   2671					;			 FILL VECTOR SPACE TO 1200 INSTEAD OF 1000.
   2672					; 1A(35) 27-JUN-77 JBS	IMPROVE KMC11 CHECKING AND START IT
   2673					;			 IF REQUESTED.
   2674					; 1A(36) 30-JUN-77 JBS	IMPROVE KMC11 CHECKING AGAIN AND LOAD ITS
   2675					;  TO 1A(37)		 CRAM IF REQUESTED.
   2676					; 2(40)	18-JUL-77 JBS	CHANGE VERSION NUMBER TO 2, DONT LOAD
   2677					;			 KMC11 CRAM IF SIZE11 DID.
   2678					; 2(41)	12-SEP-77 JBS	DONT LOAD MORE THAN 2000 OCTAL
   2679					;			 WORDS OF KMC11 CRAM (I.E., DONT LOAD
   2680					;			 THE VERSION NUMBER).
   2681					; 2(42)	13-SEP-77 JBS	REMOVE ALL REFERENCES TO REGISTER 'P'.
   2682					; 2(43)	14-OCT-77 JBS	FIX KMC11 STARTING LOOP TO START MORE
   2683					;			 THAN ONE KMC11
   2684					; 2(44) 16-JAN-78 DRL	FILL ONLY TO 1000 NOT 1200 FOR VECTORS
   2685					;			 (THIS PREVENTS SCREWING DDT.P11)
   2686					; 3(45) 16-JAN-78 DRL	CORRECT DC75 CONDITIONALS
   2687					;			 UPDATA VERSION NUMBER
   2688					;			 TAKE OUT EXTRA DC75 CODE
   2689					;			 FIX DL10 TESTS
   2690					; 3(46) 23-JAN-78 DRL	RESTRUCTURE DEVICE MACROS, AND
   2691					;			 FIX WAY CODE IS INCLUDED OR NOT
   2692					; 3(47) 2-Mar-78 KR	Add code to check all of memory, using
   2693					;			 memory management if present
   2694					; 3(50) 5-Mar-78 KR	Add code to distinguish types of KMC11's on DN20
   2695					; 3(51) 21-JUN-78 DRL	Fix timing problems for dz11's
   2696					; 3(52) 7-jul-78 drl	Add LP20 code
   2697					; 3(53) 3-AUG-78 DRL	Make the LP20 code a little smarter
   2698					; 3(54) 5-Sep-78 KR	Add DMC11 code, and make DZ11 code skip echo test
   2699					;			if interrupt didn't occur (since it will
   2700					;			always fail as well)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 54-1
CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80

   2701					; 3(55) 12-Sep-78	Allow DL10 on other than 100000
   2702					; 3(57) 26-Sep-78	Put back .BLKB at CKBLK
   2703					; 3(60) 27-NOV-78 DRL	FEATURE TEST THE CONTINUE ON ERROR STUFF
   2704					; 3(64) 26-JUN-79 DRL	FIX DMC BUG (MR NOT SET AT RIGHT TIME)
   2705					;			FIX TYPO FOR DL11 CODE
   2706
   2707		000067 			VRCHK1=067
   2708		000004 			ERRINT=4
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 55
CHK11 -  ONCE ONLY SYSTEM DIAGNOSTIC  25 NOV 80

   2710					; THIS CODE IS EXECUTED ONCE AND THEN OVERLAID WITH TABLES
   2711					;
   2712					; CALL TO CHK11 IS AS FOLLOWS:
   2713					;	JSR	PC,CHK.11
   2714					;	.ASCIZ	\PROGRAM NAME\
   2715					;	RETURNS BY JUMP TO 'BEGIN'
   2716					;	OR TO  'CKDONE' IF THIS IS DEFINED
   2717					;
   2718					;	CHK11 WILL DETERMINE WHAT HARDWARE IS PRESENT
   2719					;	  AND WILL PERFORM A FEW SIMPLE DIAGNOSTIC TESTS OF THE HDW
   2720					;
   2721					;	FOR DEV = < DH11, DM11BB, DP11, DQ11, DS11, DU11>
   2722					;	CHK11 WILL:	JSR PC,CKA'DEV
   2723					;			WITH (R3) = DEVICE VECTOR
   2724					;			AND (R4) = DEVICE ADR
   2725					;			AND (R1) = DEVICE ADR
   2726					;	ONCE FOR EACH DEVICE AND A FINAL:
   2727					;			JSR	PC,CKA'DEV WITH (R4)=0
   2728					;
   2729					; ALL SYMBOLS BEGINING CHK OR CK ARE RESERVED FOR CHK11
   2730	010566					ND	FLOATV,300	;FIRST FLOATING VECTOR
   2731	010566					ND	FLOATD,160000	;FLOATING DEVICES BEGIN HERE + 10
   2732	010566					ND	CKDONE,BEGIN
   2733	010566					ND	BEGIN,CKDONE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 56
CHK11 MACRO'S

   2735					.SBTTL		CHK11 MACRO'S
   2736
   2737					;THIS MACRO IS USED FOR TYPING TEXT AND/OR FOR
   2738					;ERROR REPORTING.
   2739					;
   2740					;	ARG	BITS	;WHAT TO DO ON A TRAP
   2741		000001 					CKEFAT=	B0	;FATAL ERROR - HALT
   2742		000002 					CKEPC=	B1	;PRINT ADDRESS OF ERROR TRAP
   2743		000004 					CKEMSG=	B2	;PRINT THE MESSAGE FOLLOWING CK11SC
   2744		000010 					CKEDID=	B3	;PRINT DEVICE ID AND REG
   2745		000020 					CKEMSE=	B4	;PRINT THE MESSAGE POINTED TO BY
   2746									; THE ADDRESS FOLLOWING THE TRAP.
   2747		000040 					CKENCL=	B5	;PRINT TEXT WITH OUT CR+LF
   2748		000100 					CKEGB=	B6	;PRINT ADR/REG=XXXXX GD=XXXXX  BD=XXXXX XOR=XXXXX
   2749		000200 					CKEWRN=B7	;address is virtual, print physical [3(47)]
   2750					;
   2751					;	ARG	MSG	;TEXT TO BE OUTPUT
   2752					;
   2753					;	ARG	COMENT	;ADD A COMMENT TO TRAP
   2754					;
   2755					;	ARG	STOPCD	;ON A FATAL ERROR VALUE TO BE PUT IN R0
   2756					;
   2757					.MACRO	CK11SC	BITS,MSG,COMENT,STOPCD
   2758					.NCHR	CKZZZX,<MSG>
   2759					.IIF NB,STOPCD,	MOV	#STOPCD,CKSPCD	;VALUE TO DISPLAY IN R0,
   2760										;AND DATA LIGHTS ON FATAL ERROR
   2761					.IIF	EQ,CKZZZX,	TRAP	BITS		;COMENT
   2762					.IF	NE,CKZZZX
   2763					.IF	EQ,<BITS&CKEMSE>
   2764						TRAP	BITS!CKEMSG		;COMENT
   2765					;	ASCIZ	<MSG>
   2766					.ENDC
   2767					.IF	NE,<BITS&CKEMSE>
   2768						TRAP	BITS&<^CCKEMSG>		;COMENT
   2769						.WORD	MSG			;ADR OF MESSAGE
   2770					.ENDC
   2771					.ENDC
   2772					.ENDM	CK11SC
   2773
   2774
   2775
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 57
CHK11 MACRO'S

   2777					;THIS MACRO IS USED TO CHECK INTERRUPT CONDITIONS
   2778					;
   2779					;	ARG	ENBADR		;DEVICE ADR TO ENABLE INTERRUPTS
   2780					;
   2781					;	ARG	INTADR		;DEVICE ADR TO GENERATE AN INTERRUPT
   2782					;
   2783					;	ARG	ENLBIT		;BIT TO ENABLE INTERRUPTS
   2784					;
   2785					;	ARG	INTBIT		;BITS TO CHECK INTERRUPT CONDITIONS
   2786					;
   2787					;	ARG	BITCLR		;BITS TO CLEAR INTERRUPT CONDITIONS
   2788					;				;IF CLEARING INTERRUPT BITS WON'T CLEAR
   2789					;				;THEM.  [EXAMPLE - DL10]
   2790					;
   2791					;	ARG	INTSUB		;subroutine to cause interrupt, if normal bit
   2792					;				;setting doesnt work. Otherwise 0.
   2793					;
   2794					.MACRO	$CKINT	ENBADR,INTADR,ENLBIT,INTBIT,BITCLR,INTSUB
   2795					.IIF	NB,ENBADR,	MOV	ENBADR,R1			;LOAD ENABLE ADR
   2796					.IIF	NB,INTADR,	MOV	INTADR,R2			;LOAD INTERRUPT ADR
   2797						JSR	R5,CKINT		;GO CHECK INTERRUPTS
   2798						.WORD	ENLBIT			;ENABLE BITS -  ENLBIT
   2799						.WORD	INTBIT			;INTERRUPT BITS -  INTBIT
   2800					.IIF	B,BITCLR,	.WORD	0			;NO SPECIAL CLEAR BITS
   2801					.IIF	NB,BITCLR,	.WORD	BITCLR			;BITS TO CLEAR DEVICE - BITCLR
   2802					.IIF	B,INTSUB,	.WORD	0			;no interrupt SUB,routine needed
   2803					.IIF	NB,INTSUB,	.WORD	INTSUB			;subroutine to generate interrupt
   2804					.ENDM	$CKINT
   2805
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 58
CHK11 MACRO'S

   2807					;THIS MACRO IS USED TO TO CALL THE ROUTINE TO CHECK A DEVICE
   2808					;AND ASSIGN THE FLOATING ADDRESS AND VECTORS IF THE DEVICE
   2809					;IS THE TYPE THAT REQUIRES IT.
   2810					;
   2811					;	ARG	A		;DEVICE ADDRESS OR 0 IF FLOATING DEVICE
   2812					;
   2813					;	ARG	MAXN		;MAXIMUM NUMBER OF DEVICES
   2814					;
   2815					;	ARG	VI		;VECTOR INCREMENT
   2816					;
   2817					;	ARG	HI		;HARDWARE INCREMENT
   2818					;
   2819					;	ARG	VM		;VECTOR MULTIPLE
   2820					;
   2821					;	ARG	NAM		;ADDRESS OF DEVICE NAME
   2822					;
   2823					;	ARG	FV		;FIRST VECTOR ADR (FIXED DEV ONLY)
   2824					;
   2825					.MACRO	DEVICE	A,MAXN,VI,HI,VM,NAM,FV
   2826
   2827					;DETERMINE HOW MANY NAM'11S IN SYSTEM
   2828
   2829						JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR NAM'11
   2830						.WORD	A			;1ST NAM'11 ADR IS A
   2831						.BYTE	<MAXN>,<VI>		;MAXIMUM NUMBER OF NAM'11 IS MAXN,
   2832										; VECTOR INCREMENT IS VI
   2833						.BYTE	<HI>,<VM>		;HARDWARE INCREMENT IS HI,
   2834										; 1ST VECTOR MULTIPLE IS VM
   2835						.WORD	0			;WILL BECOME NUMBER OF DEVICES
   2836						.WORD	CKN'NAM'11			;ADDRESS OF ASCIZ \NAM'11\
   2837						.IIF DF CK'NAM'11,CK'NAM'$$=CK'NAM'11	;IF DEFINED, USE THE PROC
   2838						.IIF NDF CK'NAM'11,CK'NAM'$$=CKPOPJ	;ELSE JUST EXIT
   2839						.WORD	CK'NAM'$$			;ADDRESS OF ROUTINE TO CHECK
   2840											; DEVICE (CK'NAM'11)
   2841						.IIF DF CKA'NAM'11,CKA'NAM'$$=CKA'NAM'11 ;IF PROGRAM ENTRY DEFINED, USE IT
   2842						.IIF NDF CKA'NAM'11,CKA'NAM'$$=CKPOPJ	;ELSE JUST EXIT
   2843						.WORD	CKA'NAM'$$			;CALL FOR MAIN PROGRAM (CKA'NAM'11)
   2844						.WORD	0			;FREE ENTRY
   2845						.WORD	0			;WILL CONTAIN NUMBER OF NAM'11 FOUND
   2846						.WORD	0			;WILL CONTAIN FIRST NAM'11 VECTOR ADR
   2847					.IIF NDF,NAM'.LVL,NAM'.LVL=0
   2848						.WORD	NAM'.LVL*40		;CONTAINS NAM'11 PI LEVEL
   2849						.WORD	FV			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2850					.ENDM	DEVICE
   2851
   2852
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 59
CHK11 MACRO'S

   2854					;THIS MACRO IS USED FOR SAVING GOOD, BAD, AND ADR ON THE STACK
   2855					;PRIOR TO CALLING "CHKERR".
   2856					;
   2857					;	ARG	GD		;GOOD DATA
   2858					;
   2859					;	ARG	BD		;BAD DATA
   2860					;
   2861					;	ARG	ADR		;ADDRESS WHERE IT HAPPENED
   2862					;
   2863					.MACRO	CKSERR	GD,BD,ADR
   2864						MOV	GD,-(SP)			;SAVE GOOD (GD) ON STACK
   2865						MOV	BD,-(SP)			;SAVE BAD (BD) ON STACK
   2866						MOV	ADR,-(SP)		;SAVE ADDRESS (ADR) ON STACK
   2867					.ENDM	CKSERR
   2868
   2869						.SBTTL		DEFINE DEVICE BLOCKS FOR EACH NODE TYPE
   2870
   2871					;	THE CHOICES ARE:
   2872					;		1	DC75
   2873					;		2	DN80/81/82
   2874					;		3	DN85/87
   2875					;		4	DN87S
   2876					;		5	DN20/21/22/200
   2877					;
   2878					;	EACH OF THESE ASSIGNS VECTORS AND CSR'S IN A DIFFERENT MANNER.
   2879
   2880	010566				CKCDEV:		;NOTHING BUT DEVICE MACROS MAY EXIST BETWEEN THE LABELS
   2881							;CKCDEV AND CKCEND, AS THESE MACROS CAUSE CODE & TABLES
   2882							;TO BE BUILD. ALSO, THE SYMBOL CKCADD MUST BE DEFINED
   2883							; TO BE .-CKCDEV AFTER THE FIRST DEVICE MACRO FOR EACH
   2884							; TYPE OF SYSTEM (I.E. THE LENGTH OF THE DEVICE MACRO).
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 60
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2886					.SBTTL		DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS
   2887
   2888	010566				DEVICE	CTISTS,1,0,0,0,KL,CTOVEC	;OPR TTY (DL11-C)
	010566	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR KL11
	010572	177560 				.WORD	CTISTS			;1ST KL11 ADR IS CTISTS
	010574	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF KL11 IS 1,
	010576	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	010600	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	010602	011346'				.WORD	CKNKL11			;ADDRESS OF ASCIZ \KL11\
	010604	016406'				.WORD	CKKL$$			;ADDRESS OF ROUTINE TO CHECK
	010606	012302'				.WORD	CKAKL$$			;CALL FOR MAIN PROGRAM (CKAKL11)
	010610	000000 				.WORD	0			;FREE ENTRY
	010612	000000 				.WORD	0			;WILL CONTAIN NUMBER OF KL11 FOUND
	010614	000000 				.WORD	0			;WILL CONTAIN FIRST KL11 VECTOR ADR
	010616	000200 				.WORD	KL.LVL*40		;CONTAINS KL11 PI LEVEL
	010620	000064 				.WORD	CTOVEC			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2889		000034 			CKCADD=.-CKCDEV
   2890	010622				DEVICE	175610,1,0,0,0,RD,304		;TTY INTERFACE (DL11-E) KLINIK
	010622	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR RD11
	010626	175610 				.WORD	175610			;1ST RD11 ADR IS 175610
	010630	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF RD11 IS 1,
	010632	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	010634	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	010636	011361'				.WORD	CKNRD11			;ADDRESS OF ASCIZ \RD11\
	010640	016342'				.WORD	CKRD$$			;ADDRESS OF ROUTINE TO CHECK
	010642	012302'				.WORD	CKARD$$			;CALL FOR MAIN PROGRAM (CKARD11)
	010644	000000 				.WORD	0			;FREE ENTRY
	010646	000000 				.WORD	0			;WILL CONTAIN NUMBER OF RD11 FOUND
	010650	000000 				.WORD	0			;WILL CONTAIN FIRST RD11 VECTOR ADR
	010652	000200 				.WORD	RD.LVL*40		;CONTAINS RD11 PI LEVEL
	010654	000304 				.WORD	304			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2891	010656				DEVICE	175630,3,<-10>,10,0,DL,744	;ASYNC I/O (DL11-E)
	010656	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR DL11
	010662	175630 				.WORD	175630			;1ST DL11 ADR IS 175630
	010664	   003 	   370 			.BYTE	<3>,<-10>		;MAXIMUM NUMBER OF DL11 IS 3,
	010666	   010 	   000 			.BYTE	<10>,<0>		;HARDWARE INCREMENT IS 10,
	010670	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	010672	011377'				.WORD	CKNDL11			;ADDRESS OF ASCIZ \DL11\
	010674	016342'				.WORD	CKDL$$			;ADDRESS OF ROUTINE TO CHECK
	010676	012302'				.WORD	CKADL$$			;CALL FOR MAIN PROGRAM (CKADL11)
	010700	000000 				.WORD	0			;FREE ENTRY
	010702	000000 				.WORD	0			;WILL CONTAIN NUMBER OF DL11 FOUND
	010704	000000 				.WORD	0			;WILL CONTAIN FIRST DL11 VECTOR ADR
	010706	000200 				.WORD	DL.LVL*40		;CONTAINS DL11 PI LEVEL
	010710	000744 				.WORD	744			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2892	010712				DEVICE	CD.STS,1,0,0,0,CD,CD.VEC	;CARD READER (CD11)
	010712	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR CD11
	010716	177160 				.WORD	CD.STS			;1ST CD11 ADR IS CD.STS
	010720	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF CD11 IS 1,
	010722	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	010724	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	010726	011334'				.WORD	CKNCD11			;ADDRESS OF ASCIZ \CD11\
	010730	017122'				.WORD	CKCD$$			;ADDRESS OF ROUTINE TO CHECK
	010732	012302'				.WORD	CKACD$$			;CALL FOR MAIN PROGRAM (CKACD11)
	010734	000000 				.WORD	0			;FREE ENTRY
	010736	000000 				.WORD	0			;WILL CONTAIN NUMBER OF CD11 FOUND
	010740	000000 				.WORD	0			;WILL CONTAIN FIRST CD11 VECTOR ADR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 60-1
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

	010742	000300 				.WORD	CD.LVL*40		;CONTAINS CD11 PI LEVEL
	010744	000230 				.WORD	CD.VEC			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2893	010746				DEVICE	LP.STS,2,<-10>,10,0,LP,LP.VEC	;LINE PRINTER (LP11)
	010746	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR LP11
	010752	177514 				.WORD	LP.STS			;1ST LP11 ADR IS LP.STS
	010754	   002 	   370 			.BYTE	<2>,<-10>		;MAXIMUM NUMBER OF LP11 IS 2,
	010756	   010 	   000 			.BYTE	<10>,<0>		;HARDWARE INCREMENT IS 10,
	010760	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	010762	011433'				.WORD	CKNLP11			;ADDRESS OF ASCIZ \LP11\
	010764	017232'				.WORD	CKLP$$			;ADDRESS OF ROUTINE TO CHECK
	010766	012302'				.WORD	CKALP$$			;CALL FOR MAIN PROGRAM (CKALP11)
	010770	000000 				.WORD	0			;FREE ENTRY
	010772	000000 				.WORD	0			;WILL CONTAIN NUMBER OF LP11 FOUND
	010774	000000 				.WORD	0			;WILL CONTAIN FIRST LP11 VECTOR ADR
	010776	000200 				.WORD	LP.LVL*40		;CONTAINS LP11 PI LEVEL
	011000	000200 				.WORD	LP.VEC			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2894	011002				DEVICE	RXCS,1,0,0,0,RX,264		;RX11 FLOPPY CONTROLLER
	011002	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR RX11
	011006	177170 				.WORD	RXCS			;1ST RX11 ADR IS RXCS
	011010	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF RX11 IS 1,
	011012	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	011014	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011016	011467'				.WORD	CKNRX11			;ADDRESS OF ASCIZ \RX11\
	011020	017552'				.WORD	CKRX$$			;ADDRESS OF ROUTINE TO CHECK
	011022	012302'				.WORD	CKARX$$			;CALL FOR MAIN PROGRAM (CKARX11)
	011024	000000 				.WORD	0			;FREE ENTRY
	011026	000000 				.WORD	0			;WILL CONTAIN NUMBER OF RX11 FOUND
	011030	000000 				.WORD	0			;WILL CONTAIN FIRST RX11 VECTOR ADR
	011032	000300 				.WORD	RX.LVL*40		;CONTAINS RX11 PI LEVEL
	011034	000264 				.WORD	264			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2895	011036				DEVICE	TC.STS,1,0,0,0,TC,TC.VEC	;DEC TAPE CONTROL (TC11)
	011036	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR TC11
	011042	177340 				.WORD	TC.STS			;1ST TC11 ADR IS TC.STS
	011044	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF TC11 IS 1,
	011046	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	011050	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011052	011462'				.WORD	CKNTC11			;ADDRESS OF ASCIZ \TC11\
	011054	017460'				.WORD	CKTC$$			;ADDRESS OF ROUTINE TO CHECK
	011056	012302'				.WORD	CKATC$$			;CALL FOR MAIN PROGRAM (CKATC11)
	011060	000000 				.WORD	0			;FREE ENTRY
	011062	000000 				.WORD	0			;WILL CONTAIN NUMBER OF TC11 FOUND
	011064	000000 				.WORD	0			;WILL CONTAIN FIRST TC11 VECTOR ADR
	011066	000300 				.WORD	TC.LVL*40		;CONTAINS TC11 PI LEVEL
	011070	000214 				.WORD	TC.VEC			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2896	011072				DEVICE	176700,1,0,0,0,RH,254		;FANCY DISK CONTROLER (RH11)
	011072	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR RH11
	011076	176700 				.WORD	176700			;1ST RH11 ADR IS 176700
	011100	   001 	   000 			.BYTE	<1>,<0>		;MAXIMUM NUMBER OF RH11 IS 1,
	011102	   000 	   000 			.BYTE	<0>,<0>		;HARDWARE INCREMENT IS 0,
	011104	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011106	011455'				.WORD	CKNRH11			;ADDRESS OF ASCIZ \RH11\
	011110	017456'				.WORD	CKRH$$			;ADDRESS OF ROUTINE TO CHECK
	011112	012302'				.WORD	CKARH$$			;CALL FOR MAIN PROGRAM (CKARH11)
	011114	000000 				.WORD	0			;FREE ENTRY
	011116	000000 				.WORD	0			;WILL CONTAIN NUMBER OF RH11 FOUND
	011120	000000 				.WORD	0			;WILL CONTAIN FIRST RH11 VECTOR ADR
	011122	000000 				.WORD	RH.LVL*40		;CONTAINS RH11 PI LEVEL
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 60-2
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

	011124	000254 				.WORD	254			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2897	011126				DEVICE	174400,4,<-4>,40,0,TE,774	;TEN/ELEVEN INTERFACE
	011126	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR TE11
	011132	174400 				.WORD	174400			;1ST TE11 ADR IS 174400
	011134	   004 	   374 			.BYTE	<4>,<-4>		;MAXIMUM NUMBER OF TE11 IS 4,
	011136	   040 	   000 			.BYTE	<40>,<0>		;HARDWARE INCREMENT IS 40,
	011140	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011142	011416'				.WORD	CKNTE11			;ADDRESS OF ASCIZ \TE11\
	011144	016672'				.WORD	CKTE$$			;ADDRESS OF ROUTINE TO CHECK
	011146	012302'				.WORD	CKATE$$			;CALL FOR MAIN PROGRAM (CKATE11)
	011150	000000 				.WORD	0			;FREE ENTRY
	011152	000000 				.WORD	0			;WILL CONTAIN NUMBER OF TE11 FOUND
	011154	000000 				.WORD	0			;WILL CONTAIN FIRST TE11 VECTOR ADR
	011156	000300 				.WORD	TE.LVL*40		;CONTAINS TE11 PI LEVEL
	011160	000774 				.WORD	774			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2898	011162				DEVICE	160020,10,20,20,0,DH,330	;MULTIPLEX TTY INTERFACE (DH11)
	011162	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR DH11
	011166	160020 				.WORD	160020			;1ST DH11 ADR IS 160020
	011170	   010 	   020 			.BYTE	<10>,<20>		;MAXIMUM NUMBER OF DH11 IS 10,
	011172	   020 	   000 			.BYTE	<20>,<0>		;HARDWARE INCREMENT IS 20,
	011174	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011176	011341'				.WORD	CKNDH11			;ADDRESS OF ASCIZ \DH11\
	011200	015256'				.WORD	CKDH$$			;ADDRESS OF ROUTINE TO CHECK
	011202	012302'				.WORD	CKADH$$			;CALL FOR MAIN PROGRAM (CKADH11)
	011204	000000 				.WORD	0			;FREE ENTRY
	011206	000000 				.WORD	0			;WILL CONTAIN NUMBER OF DH11 FOUND
	011210	000000 				.WORD	0			;WILL CONTAIN FIRST DH11 VECTOR ADR
	011212	000240 				.WORD	DH.LVL*40		;CONTAINS DH11 PI LEVEL
	011214	000330 				.WORD	330			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2899	011216				DEVICE	170500,10,20,10,0,DM,320	;MODEM CONTROL INTERFACE (DM11)
	011216	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR DM11
	011222	170500 				.WORD	170500			;1ST DM11 ADR IS 170500
	011224	   010 	   020 			.BYTE	<10>,<20>		;MAXIMUM NUMBER OF DM11 IS 10,
	011226	   010 	   000 			.BYTE	<10>,<0>		;HARDWARE INCREMENT IS 10,
	011230	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011232	011406'				.WORD	CKNDM11			;ADDRESS OF ASCIZ \DM11\
	011234	016456'				.WORD	CKDM$$			;ADDRESS OF ROUTINE TO CHECK
	011236	012302'				.WORD	CKADM$$			;CALL FOR MAIN PROGRAM (CKADM11)
	011240	000000 				.WORD	0			;FREE ENTRY
	011242	000000 				.WORD	0			;WILL CONTAIN NUMBER OF DM11 FOUND
	011244	000000 				.WORD	0			;WILL CONTAIN FIRST DM11 VECTOR ADR
	011246	000200 				.WORD	DM.LVL*40		;CONTAINS DM11 PI LEVEL
	011250	000320 				.WORD	320			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
   2900	011252				DEVICE	L20STS,2,<-4>,20,0,L2,L2.VEC	;LP20 CONTROLLER
	011252	004537 	013164'			JSR	R5,CHKDEV		;ADJUST FLOATING VECTOR FOR L211
	011256	175400 				.WORD	L20STS			;1ST L211 ADR IS L20STS
	011260	   002 	   374 			.BYTE	<2>,<-4>		;MAXIMUM NUMBER OF L211 IS 2,
	011262	   020 	   000 			.BYTE	<20>,<0>		;HARDWARE INCREMENT IS 20,
	011264	000000 				.WORD	0			;WILL BECOME NUMBER OF DEVICES
	011266	011440'				.WORD	CKNL211			;ADDRESS OF ASCIZ \L211\
	011270	017326'				.WORD	CKL2$$			;ADDRESS OF ROUTINE TO CHECK
	011272	012302'				.WORD	CKAL2$$			;CALL FOR MAIN PROGRAM (CKAL211)
	011274	000000 				.WORD	0			;FREE ENTRY
	011276	000000 				.WORD	0			;WILL CONTAIN NUMBER OF L211 FOUND
	011300	000000 				.WORD	0			;WILL CONTAIN FIRST L211 VECTOR ADR
	011302	000200 				.WORD	L2.LVL*40		;CONTAINS L211 PI LEVEL
	011304	000754 				.WORD	L2.VEC			;DEVICE FIRST VECTOR (FIXED DEV ONLY)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 60-3
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2901	011306				CKCEND:		; END OF DEVICE TABLES
   2902	011306	000207 				RTS	PC
   2903
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 61
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2905					;
   2906					; GLOBAL CELLS FOR CHECK11
   2907					;
   2908	011310				CHKFLG:	.BLKW	1		;CHK11 FLAGS
   2909		000001 				CKFERR=	B0		;ERROR DETECTED
   2910		000002 				CHKMMO=	B1		;memory management on [3(47)]
   2911		100000 				CKFIDT=	B15		;ID ALREADY TYPED
   2912	011312				CKDEVN:	.BLKW	1		;UNIT # CURRENTLY BEING TESTED
   2913	011314				CKDNAM:	.BLKW	1		;ADR OF DEVICE NAME(.ASCIZ)
   2914	011316				PHYLIM:	.BLKW	1		;HIGHEST MEMORY LIMIT
   2915
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 62
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2917					.MACRO DEVTXT	DEV,LAB,TEXTX
   2918					.IF NB,<DEV>
   2919							LAB:	.ASCIZ	\TEXTX\
   2920					.IFF;.IF NB,<DEV>
   2921					LAB:	.ASCIZ	\TEXTX\
   2922					.ENDC;.IF NB,<DEV>
   2923					.ENDM DEVTXT
   2924	011320				DEVTXT	CI,CKNCI1,<CTY I>
	011320	   103 	   124 	   131 			CKNCI1:	.ASCIZ	\CTY I\
	011323	   040 	   111 	   000
   2925	011326				DEVTXT	CO,CKNCO1,<CTY O>
	011326	   103 	   124 	   131 			CKNCO1:	.ASCIZ	\CTY O\
	011331	   040 	   117 	   000
   2926	011334				DEVTXT	CD,CKNCD1,<CD11>
	011334	   103 	   104 	   061 			CKNCD1:	.ASCIZ	\CD11\
	011337	   061 	   000
   2927	011341				DEVTXT	DH,CKNDH1,<DH11>
	011341	   104 	   110 	   061 			CKNDH1:	.ASCIZ	\DH11\
	011344	   061 	   000
   2928	011346				DEVTXT	KL,CKNKL1,<DL11-C CTY>
	011346	   104 	   114 	   061 			CKNKL1:	.ASCIZ	\DL11-C CTY\
	011351	   061 	   055 	   103
	011354	   040 	   103 	   124
	011357	   131 	   000
   2929	011361				DEVTXT	RD,CKNRD1,<DL11-E KLINIK>
	011361	   104 	   114 	   061 			CKNRD1:	.ASCIZ	\DL11-E KLINIK\
	011364	   061 	   055 	   105
	011367	   040 	   113 	   114
	011372	   111 	   116 	   111
	011375	   113 	   000
   2930	011377				DEVTXT	DL,CKNDL1,<DL11-E>
	011377	   104 	   114 	   061 			CKNDL1:	.ASCIZ	\DL11-E\
	011402	   061 	   055 	   105
	011405	   000
   2931	011406				DEVTXT	DM,CKNDM1,<DM11-BB>
	011406	   104 	   115 	   061 			CKNDM1:	.ASCIZ	\DM11-BB\
	011411	   061 	   055 	   102
	011414	   102 	   000
   2932	011416				DEVTXT	TE,CKNTE1,<DTE20>
	011416	   104 	   124 	   105 			CKNTE1:	.ASCIZ	\DTE20\
	011421	   062 	   060 	   000
   2933	011424				DEVTXT	KW,CKNKW1,<KW11-L>
	011424	   113 	   127 	   061 			CKNKW1:	.ASCIZ	\KW11-L\
	011427	   061 	   055 	   114
	011432	   000
   2934	011433				DEVTXT	LP,CKNLP1,<LP11>
	011433	   114 	   120 	   061 			CKNLP1:	.ASCIZ	\LP11\
	011436	   061 	   000
   2935	011440				DEVTXT	L2,CKNL21,<LP20>
	011440	   114 	   120 	   062 			CKNL21:	.ASCIZ	\LP20\
	011443	   060 	   000
   2936	011445				DEVTXT	MM,CKNMM1,<MF11-UP>
	011445	   115 	   106 	   061 			CKNMM1:	.ASCIZ	\MF11-UP\
	011450	   061 	   055 	   125
	011453	   120 	   000
   2937	011455				DEVTXT	RH,CKNRH1,<RH11>
	011455	   122 	   110 	   061 			CKNRH1:	.ASCIZ	\RH11\
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 62-1
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

	011460	   061 	   000
   2938	011462				DEVTXT	TC,CKNTC1,<TC11>
	011462	   124 	   103 	   061 			CKNTC1:	.ASCIZ	\TC11\
	011465	   061 	   000
   2939	011467				DEVTXT	RX,CKNRX1,<RX11>
	011467	   122 	   130 	   061 			CKNRX1:	.ASCIZ	\RX11\
	011472	   061 	   000
   2940						.EVEN
   2941	011474				CK.CAL:	.BLKW	1		;ADR OF JSR PC,CHK.11 IN MAIN PROGRAM
   2942
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 63
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2944	011476	000005 			CHK.11::RESET				;CLEAR THE WORLD
   2945	011500	012737 	000340 	177776 		MOV	#BR7,@#PS		;PROCESSOR LEVEL TO 7
   2946	011506	012637 	011474'			MOV	(SP)+,CK.CAL		;SAVE CALLING ADDRESS
   2947	011512	012737 	000300 	015252'		MOV	#FLOATV,CHKFLV		;FLOATING INT VEC BEGIN HERE
   2948	011520	012737 	160000 	015254'		MOV	#FLOATD,CHKFLD		;FLOATING DEV ADR'S BEGIN HERE
   2949	011526	005037 	011310'			CLR	CHKFLG			;CLEAR CHK11 FLAGS
   2950	011532	005037 	020470'			CLR	CKSPCD			;CLEAR STOP CODE; NON 0 ON FATAL
   2951										; ERROR PUTS C(CKSPCD) IN R0.
   2952
   2953					;INITIALIZE VECTOR SPACE
   2954					;
   2955	011536	013703 	000014 		CKINTS:	MOV	14,R3			;SAVE ODT ADDRESS
   2956	011542	005000 				CLR	R0			;START LOADING AT ADR 0
   2957	011544	012701 	015064'			MOV	#CHKINT,R1		;WHERE TO GO ON INTERRUPT
   2958	011550	012702 	000340 			MOV	#BR7,R2			;INTERRUPT PS
   2959	011554	010120 			11$:	MOV	R1,(R0)+		;SET INTERRUPT VECTOR
   2960	011556	010220 				MOV	R2,(R0)+		;SET INTERRUPT LEVEL
   2961	011560	005202 				INC	R2
   2962	011562	032700 	000077 			BIT	#77,R0			;HAVE WE HIT A LIMIT ?
   2963	011566	001004 				BNE	12$
   2964	011570	062701 	000012 			ADD	#CHKITL,R1		;YES SO CHANGE VECTOR
   2965	011574	012702 	000340 			MOV	#BR7,R2			;RESET PS
   2966	011600				12$:
   2967	011600	020027 	001000 			CMP	R0,#1000		;FILL VECTORS UP TO 1000
   2968	011604	002763 				BLT	11$			;MORE TO DO.
   2969	011606	012737 	017670'	000034 		MOV	#CHKERR,TRPVEC		;WHERE TO GO ON ERROR TRAP
   2970	011614	010337 	000014 			MOV	R3,14			;RESTORE ODT ADDRESS
   2971
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 64
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   2973					;NOW CHECK THE CTY
   2974					;
   2975	011620	012737 	011664'	000004 		MOV	#13$,NXMVEC		;WHERE TO TRAP IF NO CTY
   2976	011626	042737 	100000 	011310'		BIC	#CKFIDT,CHKFLG		;SO WE PRINT DEV ID
   2977	011634	005737 	177564 			TST	CTOSTS			;CHECK CTY TRANSMIT STATUS REGISTER
   2978	011640	005737 	177566 			TST	CTOCHR
   2979	011644	005737 	177560 			TST	CTISTS
   2980	011650	005737 	177562 			TST	CTICHR
   2981	011654	012737 	017620'	000004 		MOV	#CKBUST,NXMVEC		;WHERE TO GO ON ILLEGAL NXM TRAP
   2982	011662	000407 				BR	14$
   2983	011664	012700 	000005 		13$:	MOV	#S..CTY,R0		;NO CTY STOP CODE
   2984	011670	000000 				HALT
   2985	011672	012700 	011664'			MOV	#13$,R0			;ADR OF ERROR
   2986	011676	000000 				HALT				;DISPLAY ADDRESS
   2987	011700	000771 				BR	13$			;MAKE HIM START AGAIN
   2988
   2989	011702	012704 	177564 		14$:	MOV	#CTOSTS,R4		;CTY PUN STATUS
   2990	011706	010437 	020472'			MOV	R4,CHKCHR+CKDA		;DEV ADR
   2991	011712	010401 				MOV	R4,R1			;CHKBIT NEEDS ADR IN R1
   2992	011714	012737 	000064 	020474'		MOV	#CTOVEC,CHKCHR+CKDV	;CTY PUN VECTOR
   2993	011722	012737 	011326'	011314'		MOV	#CKNCO1,CKDNAM		;NAME ADDRESS
   2994	011730	005037 	011312'			CLR	CKDEVN			;DEVICE 0
   2995	011734	004537 	014034'			JSR	R5,CHKBIT		;CHECK THE FOLLOWING BITS FOR R/W
   2996	011740	000104 				CO.INE!CO..MM			;BITS TO CHECK FOR R/W
   2997	011742	012714 	000100 			MOV	#CO.INE,(R4)		;ENABLE INTERRUPTS
   2998	011746	004537 	014312'			JSR	R5,CHKINL		;CHECK INTERRUPT AND FIND DEV LEVEL
   2999	011752	177777 				-1				;TIME LOOP CONSTANT
   3000	011754	005014 				CLR	(R4)			;CLR DEV OUT
   3001
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 65
DEVICE MACROS FOR ALL POSSIBLE CONFIGURATIONS

   3003					;NOW CHECK THE KBRD SECTION
   3004					;
   3005	011756	042737 	100000 	011310'	CHKBRD:	BIC	#CKFIDT,CHKFLG		;SO WE PRINT DEV ID
   3006	011764	012704 	177560 			MOV	#CTISTS,R4		;KBRD STATUS REG
   3007	011770	010437 	020472'			MOV	R4,CHKCHR+CKDA		;DEV ADR
   3008	011774	010401 				MOV	R4,R1			;CHKBIT NEEDS ADR IN R1
   3009	011776	012737 	000060 	020474'		MOV	#CTIVEC,CHKCHR+CKDV	;VECTOR ADR
   3010	012004	012737 	011320'	011314'		MOV	#CKNCI1,CKDNAM		;ADR OF DEV NAME
   3011	012012	004537 	014034'			JSR	R5,CHKBIT		;CHECK THE FOLLOWING BITS
   3012	012016	000100 				CI.INE				;BITS TO CHECK R/W
   3013
   3014	012020				11$:	CK11SC	<0>,<Initializing >
	012020	104404 				TRAP	0!CKEMSG		;
   3015	012022	   111 	   156 	   151 		.ASCIZ	\Initializing \
	012025	   164 	   151 	   141
	012030	   154 	   151 	   172
	012033	   151 	   156 	   147
	012036	   040 	   000
   3016						.EVEN
   3017	012040	013700 	011474'			MOV	CK.CALL,R0		;GET ADDR OF .ASCIZ \PROG NANME\
   3018	012044	004737 	020512'			JSR	PC,CKTTXT		;TYPE PROGRAM NAME
   3019					;
   3020	012050	005000 			CHKCOR:	CLR	R0			;START SMALL
   3021	012052	012737 	012070'	000004 		MOV	#12$,NXMVEC		;SET BUS TRAP VECTOR
   3022	012060	005710 			11$:	TST	(R0)			;check this location [1(14)]
   3023	012062	062700 	000002 			ADD	#2,R0			;point to next location [1(14)]
   3024	012066	000774 				BR	11$
   3025	012070	062706 	000004 		12$:	ADD	#4,SP			;FLUSH STACK
   3026	012074	010037 	011316'		13$:	MOV	R0,PHYLIM		;SAVE ADR OF 1ST NXM LOCATION
   3027					.IIF DF,CKAMEM,JSR PC,CKAMEM		;PRINT LAST MEM LOCATION
   3028					;
   3029					;			; CONTINUED ON NEXT PAGE
   3030					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 66
CHECK MEMORY - SLIDING BIT PATTERN

   3032					.SBTTL		CHECK MEMORY - SLIDING BIT PATTERN
   3033
   3034					;HERE TO PERFORM A SIMPLE TEST ON FREE CORE.
   3035					;THE PATTERN USED IS A SLIDING BIT, WITH THE
   3036					;BIT IN EACH OF THE 16 BIT POSITIONS AND THE
   3037					;LAST PATTERN BEING ALL 0'S.
   3038					;
   3039	012100				CKCOR:
   3040	012100	005000 				CLR	R0			;FIRST ADR TO CHECK
   3041	012102	012701 	012176'			MOV	#11$,R1			;LIMIT TO CHECK
   3042	012106	004737 	012176'			JSR	PC,11$			;CHECK LOW CORE
   3043	012112	012700 	000000G			MOV	#.FESTB,R0		;BEGIN CHECKING HERE NOW
   3044	012116	012701 	012100'			MOV	#CKCOR,R1		;AND STOP HERE
   3045	012122	004737 	012176'			JSR	PC,11$
   3046	012126	004037 	020552'			JSR	R0,CKTCRL		;PRINT AMOUNT OF CORE
   3047	012132	   040 	   040 	   040 		.ASCIZ	\   \
	012135	   000
   3048						.EVEN
   3049	012136	013700 	011316'			MOV	PHYLIM,R0		;GET AMOUNT
   3050	012142	004737 	020600'			JSR	PC,CKTOCT		;PRINT IT
   3051	012146	004037 	020556'			JSR	R0,CKTSTR		;FOLLOWED BY MSG:
   3052	012152	   040 	   142 	   171 		.ASCIZ	\ bytes of memory\
	012155	   164 	   145 	   163
	012160	   040 	   157 	   146
	012163	   040 	   155 	   145
	012166	   155 	   157 	   162
	012171	   171 	   000
   3053						.EVEN
   3054	012174	000443 				BR	CKMPAR			;ALL OK
   3055
   3056	012176	012702 	000001 		11$:	MOV	#1,R2			;FIRST PATTERN
   3057	012202	011003 				MOV	@R0,R3			;SAVE CURRENT DATA
   3058	012204	010210 			12$:	MOV	R2,@R0			;PUT PATTERN IN MEMORY
   3059	012206	005110 				COM	@R0			;COMPLEMENT IT
   3060	012210	005110 				COM	@R0			; AND AGAIN
   3061	012212	020210 				CMP	R2,@R0			;DID IT GO ?
   3062	012214	001410 				BEQ	13$			;YES.
   3063	012216					CKSERR	R2,<(R0)>,R0		;SAVE GD,BD,ADR
	012216	010246 				MOV	R2,-(SP)			;SAVE GOOD (R2) ON STACK
	012220	011046 				MOV	(R0),-(SP)			;SAVE BAD ((R0)) ON STACK
	012222	010046 				MOV	R0,-(SP)		;SAVE ADDRESS (R0) ON STACK
   3064	012224					CK11SC	<CKEMSE!CKEFAT!CKEPC!CKEGB>,<CKMG01>,<MEMORY ERROR>,<S..MEM>
	012224	012737 	000006 	020470'	.IIF NB,S..MEM,	MOV	#S..MEM,CKSPCD	;VALUE TO DISPLAY IN R0,
	012232	104523 				TRAP	CKEMSE!CKEFAT!CKEPC!CKEGB&<^CCKEMSG>		;MEMORY ERROR
	012234	020750'				.WORD	CKMG01			;ADR OF MESSAGE
   3065	012236	006302 			13$:	ASL	R2			;SHIFT PATTERN
   3066	012240	001361 				BNE	12$
   3067	012242	103760 				BCS	12$
   3068	012244	010310 				MOV	R3,@R0			;RESTORE DATA
   3069	012246	005110 				COM	@R0			;COMPLEMENT IT
   3070	012250	005110 				COM	@R0			; AND AGAIN
   3071	012252	020320 				CMP	R3,(R0)+		;BE SURE IT WENT
   3072	012254	001410 				BEQ	14$
   3073	012256					CKSERR	R3,<-(R0)>,R0		;SAVE GD,BD,ADR
	012256	010346 				MOV	R3,-(SP)			;SAVE GOOD (R3) ON STACK
	012260	014046 				MOV	-(R0),-(SP)			;SAVE BAD (-(R0)) ON STACK
	012262	010046 				MOV	R0,-(SP)		;SAVE ADDRESS (R0) ON STACK
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 66-1
CHECK MEMORY - SLIDING BIT PATTERN

   3074	012264					CK11SC	<CKEMSE!CKEFAT!CKEPC!CKEGB>,<CKMG01>,<MEMORY ERROR>,<S..MEM>
	012264	012737 	000006 	020470'	.IIF NB,S..MEM,	MOV	#S..MEM,CKSPCD	;VALUE TO DISPLAY IN R0,
	012272	104523 				TRAP	CKEMSE!CKEFAT!CKEPC!CKEGB&<^CCKEMSG>		;MEMORY ERROR
	012274	020750'				.WORD	CKMG01			;ADR OF MESSAGE
   3075	012276	020001 			14$:	CMP	R0,R1
   3076	012300	001336 				BNE	11$			;LOOP BACK FOR REST OF MEMORY
   3077	012302	000207 			CKPOPJ:	RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 67
CHECK MEMORY - SLIDING BIT PATTERN

   3079					;HERE TO CHECK THE MEMORY PARITY OPTION
   3080	012304				CKMPAR:					;START CHECKING CORE HERE
   3081	012304	012737 	011445'	011314'		MOV	#CKNMM1,CKDNAM		;SAVE NAME OF "DEVICE"
   3082	012312	005037 	011312'			CLR	CKDEVN			;"UNIT" IS 0
   3083	012316	012701 	172100 			MOV	#MP.REG,R1		;OPTION REGISTER
   3084	012322	010137 	020472'			MOV	R1,CHKCHR+CKDA		;SAVE ADR IN CASE NEED TO TYPE IT
   3085	012326	013746 	000004 			MOV	NXMVEC,-(SP)
   3086	012332	012737 	000114 	020474'		MOV	#MP.VEC,CHKCHR+CKDV	;VECTOR FOR INTERRUPTS
   3087	012340	005037 	020476'			CLR	CHKCHR+CKPI		;NO PRIORITY LEVEL
   3088	012344	012737 	012536'	000004 		MOV	#14$,NXMVEC		;IN CASE PARITY OPTION NOT INSTALLED
   3089	012352	005037 	172100 			CLR	MP.REG			;TRY TO CLEAR MEMORY PARITY REGISTER
   3090	012356	011637 	000004 			MOV	(SP),NXMVEC		;RESTORE TRAP VECTOR
   3091	012362	004537 	014034'			JSR	R5,CHKBIT		;CHECK READ/WRITE BITS
   3092	012366	107745 				107745
   3093					;NOW CHECK INTERRUPTS FROM PARITY CONTROL
   3094					; THIS IS DIFFICULT CUZ SETTING MP.ENB & MP.ERR WON'T CAUSE INTERRUPT
   3095	012370	005000 				CLR	R0			;VECTOR WE TOOK WILL APPEAR HERE
   3096	012372	012711 	000004 			MOV	#MP.WWP,@R1		;WE WANT TO WRITE WRONG PARITY
   3097	012376	013737 	012304'	012304'		MOV	CKMPAR,CKMPAR		;WRITE A BAD WORD
   3098
   3099	012404	005011 				CLR	@R1			;BUT ONLY ONE WORD !
   3100	012406	005737 	012304'			TST	CKMPAR			;TRY FOR AN INTERRUPT
   3101	012412	000240 				NOP				;IN CASE SLOW
   3102	012414	005700 				TST	R0			;SEE IF WE GOT ONE
   3103	012416	001402 				BEQ	11$
   3104	012420					CK11SC	<CKEMSE!CKEDID!CKEPC>,CKMG07,<INTERRUPTED WHEN NOT ENABLED>
	012420	104432 				TRAP	CKEMSE!CKEDID!CKEPC&<^CCKEMSG>		;INTERRUPTED WHEN NOT ENABLED
	012422	021120'				.WORD	CKMG07			;ADR OF MESSAGE
   3105	012424	012711 	000001 		11$:	MOV	#MP.ENB,@R1		;NOW LETS GET THE INTERRUPT
   3106	012430	005737 	012304'			TST	CKMPAR
   3107	012434	005011 				CLR	@R1			;DISABLE FURTHER INTERRUPTS
   3108	012436	013737 	012304'	012304'		MOV	CKMPAR,CKMPAR		;WRITE BACK RIGHT
   3109	012444	005700 				TST	R0			;DID WE GET THE INTERRUPT ?
   3110	012446	001003 				BNE	12$
   3111	012450					CK11SC	<CKEDID!CKEMSE!CKEPC>,CKMG04,<INTERRUPT DID NOT OCCUR>
	012450	104432 				TRAP	CKEDID!CKEMSE!CKEPC&<^CCKEMSG>		;INTERRUPT DID NOT OCCUR
	012452	021022'				.WORD	CKMG04			;ADR OF MESSAGE
   3112	012454	000433 				BR	15$
   3113
   3114	012456	020037 	020474'		12$:	CMP	R0,CHKCHR+CKDV		;WAS INTERRUPT RIGHT?
   3115	012462	001410 				BEQ	13$			;YES.
   3116	012464					CKSERR	<CHKCHR+CKDV>,R0,<#CKMPAR>	;GD,BD,ADR
	012464	013746 	020474'			MOV	CHKCHR+CKDV,-(SP)			;SAVE GOOD (CHKCHR+CKDV) ON STACK
	012470	010046 				MOV	R0,-(SP)			;SAVE BAD (R0) ON STACK
	012472	012746 	012304'			MOV	#CKMPAR,-(SP)		;SAVE ADDRESS (#CKMPAR) ON STACK
   3117	012476					CK11SC	<CKEMSE!CKEDID!CKEPC!CKEGB>,CKMG05,<interrupted to wrong vector>
	012476	104532 				TRAP	CKEMSE!CKEDID!CKEPC!CKEGB&<^CCKEMSG>		;interrupted to wrong vector
	012500	021052'				.WORD	CKMG05			;ADR OF MESSAGE
   3118	012502	000420 				BR	15$			;DONE.
   3119
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 68
CHECK MEMORY - SLIDING BIT PATTERN

   3121					; COME HERE IF PARITY OPTION IS PRESENT AND WORKING
   3122
   3123	012504	004037 	020552'		13$:	JSR	R0,CKTCRL		;PRINT MESSAGE ABOUT IT
   3124	012510	   040 	   040 	   040 		.ASCIZ	\     MF11-UP\
	012513	   040 	   040 	   115
	012516	   106 	   061 	   061
	012521	   055 	   125 	   120
	012524	   000
   3125						.EVEN
   3126	012526	012737 	000001 	172100 		MOV	#MP.ENB,MP.REG		;ENABLE PARITY ERRORS
   3127					.IIF DF,CKAMF1,JSR PC,CKAMF1		;DO MAIN LINE CHECKING
   3128	012534	000403 				BR	15$			;ALL DONE.
   3129
   3130					;HERE IF WE GET A BUS TRAP WHILE ACCESSING THE PARITY CONTROL REG
   3131	012536	012626 			14$:	MOV	(SP)+,(SP)+		;CLEAN OFF STACK
   3132	012540					CK11SC	<CKEDID!CKEPC!CKEMSE>,CKMG06,<not found>
	012540	104432 				TRAP	CKEDID!CKEPC!CKEMSE&<^CCKEMSG>		;not found
	012542	021106'				.WORD	CKMG06			;ADR OF MESSAGE
   3133
   3134	012544	012637 	000004 		15$:	MOV	(SP)+,NXMVEC
   3135
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 69
CHECK KW11-L HDW

   3137					.SBTTL		CHECK KW11-L HDW
   3138
   3139					;HERE TO BE SURE CLOCK IS PRESENT AND TICKS
   3140
   3141	012550	012737 	011424'	011314'	CHKCLK:	MOV	#CKNKW1,CKDNAM		;SET UP FOR NAME
   3142	012556	042737 	100000 	011310'		BIC	#CKFIDT,CHKFLG		;SO WE PRINT DEV ID
   3143	012564	012704 	177546 			MOV	#CLKWRD,R4		;SET UP DEV ADR
   3144	012570	010437 	020472'			MOV	R4,CHKCHR+CKDA		;SET UP DEVICE ADR
   3145	012574	012737 	000100 	020474'		MOV	#CLKVEC,CHKCHR+CKDV	;SET UP VECTOR ADR
   3146	012602	005037 	011312'			CLR	CKDEVN			;DEVICE NUMBER
   3147	012606	012737 	012734'	000004 		MOV	#13$,NXMVEC		;SET BUS TRAP IN CASE CLOCK IS NOT PRESENT
   3148	012614	005714 				TST	(R4)			;TRAP IF NOT INSTALLED
   3149	012616	012737 	017620'	000004 		MOV	#CKBUST,NXMVEC		;WHERE TO GO ON BUS TRAP
   3150	012624	013746 	000100 			MOV	CLKVEC,-(SP)		;SAVE WHERE TO GO ON INT
   3151	012630	012737 	012760'	000100 		MOV	#14$,CLKVEC		;SETUP INTERRUPT VECTOR
   3152	012636	012737 	000003 	012772'		MOV	#3,CHKTIM		;TIME 3 TICKS
   3153	012644	012737 	000000 	177776 		MOV	#0,@#PS			;LET INTERRUPTS HAPPEN
   3154	012652	012714 	000100 			MOV	#KW.INE,(R4)		;ENABLE THE CLOCK
   3155	012656	001417 				BEQ	12$			;IF COUNTED OUT ALREADY EVIL
   3156	012660	005000 				CLR	R0			;INITIALIZE WATCHDOG COUNTER
   3157	012662	005737 	012772'			TST	CHKTIM			;see if count expired now [1(14)]
   3158	012666	001413 				BEQ	12$			;yes, too fast [1(14)]
   3159	012670	005737 	012772'		11$:	TST	CHKTIM
   3160	012674	001437 				BEQ	CKCLK9			;BRANCH IF TIMED OUT ALREADY
   3161	012676	077004 				SOB	R0,11$
   3162	012700					CK11SC	<CKEFAT!CKEPC!CKEDID>,<Slow>,<NO RESPONSE FROM KW11>,<S..KW1>
	012700	012737 	000007 	020470'	.IIF NB,S..KW1,	MOV	#S..KW1,CKSPCD	;VALUE TO DISPLAY IN R0,
	012706	104417 				TRAP	CKEFAT!CKEPC!CKEDID!CKEMSG		;NO RESPONSE FROM KW11
   3163	012710	   123 	   154 	   157 		.ASCIZ	\Slow\
	012713	   167 	   000
   3164						.EVEN
   3165	012716				12$:	CK11SC	<CKEFAT!CKEPC!CKEDID>,<Fast>,<KW11 TICKING TO FAST>,<S..KW1>
	012716	012737 	000007 	020470'	.IIF NB,S..KW1,	MOV	#S..KW1,CKSPCD	;VALUE TO DISPLAY IN R0,
	012724	104417 				TRAP	CKEFAT!CKEPC!CKEDID!CKEMSG		;KW11 TICKING TO FAST
   3166	012726	   106 	   141 	   163 		.ASCIZ	\Fast\
	012731	   164 	   000
   3167						.EVEN
   3168	012734				13$:	CK11SC	<CKEFAT!CKEPC!CKEDID>,<Not Present>,<CAN' ACCESS KW11>,<S..KW1>
	012734	012737 	000007 	020470'	.IIF NB,S..KW1,	MOV	#S..KW1,CKSPCD	;VALUE TO DISPLAY IN R0,
	012742	104417 				TRAP	CKEFAT!CKEPC!CKEDID!CKEMSG		;CAN' ACCESS KW11
   3169	012744	   116 	   157 	   164 		.ASCIZ	\Not Present\
	012747	   040 	   120 	   162
	012752	   145 	   163 	   145
	012755	   156 	   164 	   000
   3170						.EVEN
   3171
   3172					;HERE ON A KW11 INTERRUPT
   3173	012760	005337 	012772'		14$:	DEC	CHKTIM			;COUNT OUT TIMER
   3174	012764	001001 				BNE	15$
   3175	012766	005014 				CLR	(R4)			;TURN OFF CLOCK
   3176	012770	000002 			15$:	RTI				;DISMISS INTERRUPT
   3177
   3178	012772	000000 			CHKTIM:	.WORD	0
   3179					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 70
CHECK KW11-L HDW

   3181					;
   3182	012774	012737 	000340 	177776 	CKCLK9:	MOV	#BR7,@#PS		;SET TO LEVEL 7
   3183	013002	012714 	000100 			MOV	#KW.INE,(R4)		;ENABLE INT
   3184	013006	012637 	000100 			MOV	(SP)+,CLKVEC		;RESTORE WHERE TO GO ON INT
   3185	013012	004537 	014312'			JSR	R5,CHKINL		;FIND THE INT LEVEL
   3186	013016	177777 				-1				;DELAY TO WAIT FOR INT
   3187	013020	042737 	000100 	177546 		BIC	#KW.INE,CLKWRD		;DISABLE CLK INTS
   3188	013026	004037 	020552'			JSR	R0,CKTCRL		;INDICATE CLOCK PRESENT
   3189	013032	   040 	   040 	   040 		.ASCIZ	\     KW11-L\
	013035	   040 	   040 	   113
	013040	   127 	   061 	   061
	013043	   055 	   114 	   000
   3190						.EVEN
   3191	013046	022737 	000300 	020476'		CMP	#300,CHKCHR+CKPI	;CHECK FOR CORRECT PRIORITY
   3192	013054	001431 				BEQ	CHK.96			;BRANCH IF OK
   3193	013056					CKSERR	<#200>,<CHKCHR+CKPI>,<#CLKVEC>
	013056	012746 	000200 			MOV	#200,-(SP)			;SAVE GOOD (#200) ON STACK
	013062	013746 	020476'			MOV	CHKCHR+CKPI,-(SP)			;SAVE BAD (CHKCHR+CKPI) ON STACK
	013066	012746 	000100 			MOV	#CLKVEC,-(SP)		;SAVE ADDRESS (#CLKVEC) ON STACK
   3194	013072					CK11SC	<CKEFAT!CKEMSG>,<Interrupted to wrong PI level>,,<S..KW1>
	013072	012737 	000007 	020470'	.IIF NB,S..KW1,	MOV	#S..KW1,CKSPCD	;VALUE TO DISPLAY IN R0,
	013100	104405 				TRAP	CKEFAT!CKEMSG!CKEMSG		;
   3195	013102	   111 	   156 	   164 		.ASCIZ	\Interrupted to Wrong PI level\
	013105	   145 	   162 	   162
	013110	   165 	   160 	   164
	013113	   145 	   144 	   040
	013116	   164 	   157 	   040
	013121	   127 	   162 	   157
	013124	   156 	   147 	   040
	013127	   120 	   111 	   040
	013132	   154 	   145 	   166
	013135	   145 	   154 	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 71
CHECK KW11-L HDW

   3197					;
   3198					; NOW CHECK ALL REMAINING DEVICES
   3199					;
   3200	013140				CHK.96::
   3201	013140	004737 	010566'			JSR	PC,CKCDEV		;CALL DEVICE TABLES ROUTINES
   3202					;
   3203					; WAIT A WHILE THEN DO A UNIBUS RESET
   3204					;
   3205	013144	012701 	000010 			MOV	#10,R1			;COUNTER
   3206	013150	005000 			15$:	CLR	R0			; "  "
   3207	013152	077001 			16$:	SOB	R0,16$			;LOOP A WHILE
   3208	013154	077103 				SOB	R1,15$			;AGAIN
   3209	013156	000005 				RESET				;RESET THE WORLD
   3210	013160	000137 	003000'			JMP	CKDONE			;ALL DONE
   3211
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 72
CHECK SYSTEM FOR EXISTENCE OF OPTIONS

   3213					.SBTTL		CHECK SYSTEM FOR EXISTENCE OF OPTIONS
   3214
   3215					;HERE TO CHECK SYSTEM FOR EXISTENCE OF OPTIONS
   3216					; CALL	JSR	R5,CHKDEV
   3217					;	(0)	.WORD	1ST DEVICE ADR
   3218					;	(2)	.BYTE	MAX #,VECTOR INC
   3219					;	(4)	.BYTE	HDW INC,1ST VEC MULTIPLE
   3220					;	(6)	.WORD	<ADR OF NUMBER OF DEVICES OR ZERO>
   3221					;	(10)	.WORD	<ADR OF .ASCIZ \NAME\>
   3222					;	(12)	.WORD	<ADR OF ROUTINE TO VERIFY OPERATION>
   3223					;	(14)	.WORD	<ADR OF MAIN PROGRAM ROUTINE FOR DEVICE>
   3224					;	(16)	.WORD	<ADR OF TABLE WHICH CONTAINS MAIN PROG VECTORS OR 0>
   3225					;	(20)	.WORD	<# OF DEVICES FOUND>
   3226					;	(22)	.WORD	<FIRST VECTOR FOUND>
   3227					;	(24)	.WORD	<PI LEVEL>
   3228					;	(26)	.WORD	<FIRST DEV VECTOR FOR FIXED TYPE DEV>
   3229					;	RETURN
   3230
   3231	013164	016537 	000010 	011314'	CHKDEV:	MOV	10(R5),CKDNAM		;REMEMBER DEVICE NAME
   3232	013172	005002 				CLR	R2			;INITIALIZE COUNTER FOR DEVICES
   3233	013174	013703 	015252'			MOV	CHKFLV,R3		;COPY FOR USE
   3234	013200	105765 	000005 			TSTB	5(R5)			;SEE IF FIXED TYPE DEV
   3235	013204	001002 				BNE	11$			;BRANCH IF NOT
   3236	013206	016503 	000026 			MOV	26(R5),R3		;VECTOR TO USE
   3237	013212	011504 			11$:	MOV	@R5,R4			;GET HDW ADR FOR 1ST DEVICE
   3238	013214	001005 				BNE	12$			;BRANCH IF NOT A FLOATING DEVICE
   3239	013216	062737 	000010 	015254'		ADD	#10,CHKFLD		;ADVANCE TO NEXT FLOAT DEVICE SLOT
   3240	013224	013704 	015254'			MOV	CHKFLD,R4		;COPY FOR USE
   3241	013230	012737 	013330'	000004 	12$:	MOV	#15$,NXMVEC		;SET BUS TRAP VECTOR
   3242	013236	005714 			13$:	TST	(R4)			;CHECK TO SEE IF DEVICE IS PRESENT
   3243	013240	012737 	017620'	000004 		MOV	#CKBUST,NXMVEC		;SET FOR ILLEGAL BUS TRAP
   3244	013246	005702 				TST	R2			;IS THIS THE FIRST OF ITS KIND ?
   3245	013250	001012 				BNE	14$			;BRANCH IF NOT FIRST
   3246	013252	005065 	000020 			CLR	20(R5)			;CLEAR NUMBER OF DEV FOUND
   3247	013256	005065 	000022 			CLR	22(R5)			;CLEAR FIRST VECTOR ADR
   3248					;	CLR	24(R5)			;CLEAR PI LEVEL
   3249	013262	116501 	000005 			MOVB	5(R5),R1		;GET MULTIPLE VECTOR BEGINS ON
   3250	013266	001403 				BEQ	14$			;BRANCH IF FIXED DEV (LPT)
   3251	013270	005301 				DEC	R1
   3252	013272	060103 				ADD	R1,R3
   3253	013274	040103 				BIC	R1,R3
   3254	013276	005265 	000020 		14$:	INC	20(R5)			;COUNT DEVICE AND REMEMBER IT
   3255	013302	005202 			20$:	INC	R2
   3256	013304	116501 	000003 			MOVB	3(R5),R1		;GET VECTOR INCREMENT
   3257	013310	060103 				ADD	R1,R3
   3258	013312	116501 	000004 			MOVB	4(R5),R1		;GET HDW INCREMENT
   3259	013316	060104 				ADD	R1,R4			;ADVANCE FLOATING DEVICE ADR POINTER
   3260	013320	120265 	000002 			CMPB	R2,2(R5)		;HAVE WE CHECK ALL POSSIBLE ?
   3261	013324	001341 				BNE	12$			;IF NOT LOOP BACK FOR REST
   3262	013326	000405 				BR	16$
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 73
CHECK SYSTEM FOR EXISTENCE OF OPTIONS

   3264	013330	012737 	017620'	000004 	15$:	MOV	#CKBUST,NXMVEC
   3265	013336	022626 				CMP	(SP)+,(SP)+		;POP OFF ADR AND STATUS
   3266	013340	000760 				BR	20$			;SEE IF POSSIBLE HOLE IN DEVICE
   3267	013342	005765 	000006 		16$:	TST	6(R5)			;DO WE HAVE ADR FOR NUMBER ?
   3268	013346	001402 				BEQ	17$			;IF NOT DON'T STUFF
   3269	013350	010275 	000006 			MOV	R2,@6(R5)		;PUT NUMBER FOR SOMEONE TO FIND
   3270	013354	005765 	000020 		17$:	TST	20(R5)			;WERE THERE ANY OF THESE ?
   3271	013360	001566 				BEQ	CHKD02
   3272	013362					CK11SC	0,<	>		;TYPE CR/LF/TAB
	013362	104404 				TRAP	0!CKEMSG		;
   3273	013364	   011 	   000 			.ASCIZ	\	\
   3274						.EVEN
   3275	013366	016500 	000020 			MOV	20(R5),R0			;NUMBER OF DEVICES WE FOUND
   3276	013372	004737 	020600'			JSR	PC,CKTOCT		;TYPE OUT THE NUMBER
   3277	013376	004037 	020556'			JSR	R0,CKTSTR		;TYPE A BLANK
   3278	013402	   040 	   000 			.BYTE	040,0
   3279	013404	013700 	011314'			MOV	CKDNAM,R0		;GET ADR OF ASCIZ STRING
   3280	013410	004737 	020512'			JSR	PC,CKTTXT		;TYPE DEVICE NAME
   3281	013414	032765 	000076 	000020 		BIT	#76,20(R5)		;HOW MANY ?
   3282	013422	001403 				BEQ	CHKDV1
   3283	013424					CK11SC	<CKENCL>,<'s>
	013424	104444 				TRAP	CKENCL!CKEMSG		;
   3284	013426	   047 	   163 	   000 		.ASCIZ	\'s\
   3285						.EVEN
   3286						.ENABL	LSB
   3287	013432	010346 			CHKDV1:	MOV	R3,-(SP)
   3288	013434	010446 				MOV	R4,-(SP)
   3289	013436	016546 	000020 			MOV	20(R5),-(SP)		;SAVE NUMBER OF DEVICES FOUND
   3290	013442	005037 	011312'			CLR	CKDEVN			;CHECK UNIT 0 FIRST
   3291	013446	016503 	000026 			MOV	26(R5),R3		;GET FIRST VECTOR FOR POSSIBLE FIXED
   3292	013452	116500 	000005 			MOVB	5(R5),R0		;GET VECTOR MULTIPLE
   3293	013456	001405 				BEQ	11$			;BRANCH IF FIXED
   3294	013460	013703 	015252'			MOV	CHKFLV,R3		;GET VECTOR FOR 1ST UNIT
   3295	013464	005300 				DEC	R0
   3296	013466	060003 				ADD	R0,R3
   3297	013470	040003 				BIC	R0,R3
   3298	013472	011504 			11$:	MOV	(R5),R4			;GET HDW ADR FOR FIRST UNIT
   3299	013474	001002 				BNE	12$
   3300	013476	013704 	015254'			MOV	CHKFLD,R4		;FLOATING DEVICE
   3301	013502	005037 	020476'		12$:	CLR	CHKCHR+CKPI		;ROUTINE WILL SET PI LEVEL
   3302	013506	016500 	000012 			MOV	12(R5),R0		;ADR OF ROUTINE TO VERIFY DEVICE
   3303	013512	001467 				BEQ	13$			;BRANCH IF NO ROUTINE TO VERIFY
   3304	013514	042737 	100000 	011310'		BIC	#CKFIDT,CHKFLG		;HAVEN'T TYPED ID YET
   3305	013522	010437 	020472'			MOV	R4,CHKCHR+CKDA		;SAVE DEVICE ADDRESS
   3306	013526	010337 	020474'			MOV	R3,CHKCHR+CKDV		;SAVE VECTOR ADDRESS IN CHARACTERISTICS TABLE
   3307	013532	010401 				MOV	R4,R1			;PUT DEV ADR IN R1 SINCE MOST
   3308										; ROUTINES WILL USE IT.
   3309	013534	005037 	020500'			CLR	CHKCHR+CKFLG		;CLEAR FLAGS AND LET DEVICE CHECK ROUTINE SET THEM
   3310	013540	012737 	000340 	177776 		MOV	#BR7,@#PS		;MAKE SURE WE'RE AT LEVEL 7
   3311	013546	012737 	014000'	000004 		MOV	#NONDEV,NXMVEC		;SEE IF THERE WAS A HOLE
   3312	013554	005711 				TST	(R1)			;WAS THERE ?
   3313	013556	012737 	017620'	000004 		MOV	#CKBUST,NXMVEC		;NO IF WE GOT HERE
   3314	013564	004710 				JSR	PC,(R0)			;CALL TO DEVICE CHECK
   3315	013566	005765 	000022 			TST	22(R5)			;SEE IF VECTOR ADR SET YET
   3316	013572	001037 				BNE	13$			;BRANCH IF SET
   3317	013574	013765 	020474'	000022 		MOV	CHKCHR+CKDV,22(R5)	;SET FIRST VECTOR FOUND
   3318	013602	005737 	020476'			TST	CHKCHR+CKPI		;MAKE SURE IT INTERRUPTED
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 73-1
CHECK SYSTEM FOR EXISTENCE OF OPTIONS

   3319	013606	001431 				BEQ	13$			;BRANCH IF NOT
   3320	013610	023765 	020476'	000024 		CMP	CHKCHR+CKPI,24(R5)	;CORRECT PI LEVEL ?
   3321	013616	001425 				BEQ	13$			;BRANCH IF SO
   3322	013620					CKSERR	<24(R5)>,<CHKCHR+CKPI>,<26(R5)>
	013620	016546 	000024 			MOV	24(R5),-(SP)			;SAVE GOOD (24(R5)) ON STACK
	013624	013746 	020476'			MOV	CHKCHR+CKPI,-(SP)			;SAVE BAD (CHKCHR+CKPI) ON STACK
	013630	016546 	000026 			MOV	26(R5),-(SP)		;SAVE ADDRESS (26(R5)) ON STACK
   3323	013634					CK11SC	<CKEDID!CKEGB!CKEMSG>,<INTERRUPT TO WRONG PI LEVEL>
	013634	104514 				TRAP	CKEDID!CKEGB!CKEMSG!CKEMSG		;
   3324	013636	   111 	   156 	   164 		.ASCIZ	\Interrupt to Wrong PI level\
	013641	   145 	   162 	   162
	013644	   165 	   160 	   164
	013647	   040 	   164 	   157
	013652	   040 	   127 	   162
	013655	   157 	   156 	   147
	013660	   040 	   120 	   111
	013663	   040 	   154 	   145
	013666	   166 	   145 	   154
	013671	   000
   3325	013672	012700 	020472'		13$:	MOV	#CHKCHR,R0		;POINT TO THE CHARACTERISTIC TABLE
   3326	013676	004775 	000014 			JSR	PC,@14(R5)		;CALL TO MAIN PROGRAM
   3327	013702	116500 	000003 		14$:	MOVB	3(R5),R0		;GET VECTOR INCREMENT
   3328	013706	060003 				ADD	R0,R3
   3329	013710	116500 	000004 			MOVB	4(R5),R0		;HDW INCREMENT
   3330	013714	060004 				ADD	R0,R4
   3331	013716	005237 	011312'			INC	CKDEVN			;ON TO NEXT DEVICE NUMBER
   3332	013722	021637 	011312'			CMP	(SP),CKDEVN
   3333	013726	001265 				BNE	12$
   3334	013730	012602 				MOV	(SP)+,R2
   3335	013732	012604 				MOV	(SP)+,R4
   3336	013734	012603 				MOV	(SP)+,R3
   3337
   3338	013736				CHKD02:	;SAVE	<R3,R4>
   3339						;CLR	R4			;FLAG NO MORE DEVICES
   3340						;JSR	PC,@14(R5)		;CALL MAIN PROGRAM
   3341						;RESTORE	<R4,R3>
   3342
   3343					;HERE WHEN DONE CHECKING DEVICE
   3344	013736	105765 	000005 			TSTB	5(R5)			;SEE IF FIXED DEV
   3345	013742	001413 				BEQ	CHKD01			;BRANCH IF FIXED  (LIKE LPT)
   3346	013744	013746 	015252'			MOV	CHKFLV,-(SP)		;RESET FLOATING VECTOR
   3347	013750	010337 	015252'			MOV	R3,CHKFLV
   3348	013754	012603 				MOV	(SP)+,R3
   3349	013756	011500 				MOV	(R5),R0			;WAS THIS A FLOATING DEVICE ?
   3350	013760	001004 				BNE	CHKD01			;BRANCH IF NOT
   3351	013762	013700 	015254'			MOV	CHKFLD,R0		;COPY ADR OF FIRST DEVICE
   3352	013766	010437 	015254'			MOV	R4,CHKFLD
   3353	013772	062705 	000030 		CHKD01:	ADD	#CKCADD-4,R5
   3354	013776	000205 				RTS	R5
   3355
   3356	014000	022626 			NONDEV:	CMP	(SP)+,(SP)+		;GET RID OF THE TRAP INFO
   3357	014002					CK11SC	<CKEWRN!CKEDID!CKEMSG>,<Device does NOT exist>
	014002	104614 				TRAP	CKEWRN!CKEDID!CKEMSG!CKEMSG		;
   3358	014004	   104 	   145 	   166 		.ASCIZ	\Device does NOT exist\
	014007	   151 	   143 	   145
	014012	   040 	   144 	   157
	014015	   145 	   163 	   040
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 73-2
CHECK SYSTEM FOR EXISTENCE OF OPTIONS

	014020	   116 	   117 	   124
	014023	   040 	   145 	   170
	014026	   151 	   163 	   164
	014031	   000
   3359						.EVEN
   3360	014032	000717 				BR	13$
   3361						.DSABL	LSB
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 74
BIT SET/BIT CLEAR TEST

   3363					.SBTTL		BIT SET/BIT CLEAR TEST
   3364
   3365					;HERE TO CHECK WE CAN SET/CLEAR VARIOUS BITS
   3366					;
   3367					; CALL	MOV	#<ADR OF ASCIZ \NAME\>,CKDNAM
   3368					;	MOV	<DEVICE NUMBER>,CKDEVN
   3369					;	MOV	<DEVICE REGISTER ADDRESS>,R1
   3370					;	JSR	R5,CHKBIT
   3371					;	<ALL BITS TO TEST>
   3372					;
   3373	014034	010046 			CHKBIT:	MOV	R0,-(SP)
   3374	014036	012737 	000340 	177776 		MOV	#BR7,@#PS		;DISABLE INTERRUPTS
   3375	014044	011500 				MOV	(R5),R0			;GET BITS TO CHECK
   3376	014046	040011 				BIC	R0,(R1)			;TRY AND CLEAR ALL OF THEM
   3377	014050	030011 				BIT	R0,(R1)			;SEE IF ALL OF THEM CLEARED?
   3378	014052	001410 				BEQ	11$			;BRANCH IF ALL CLEAR
   3379	014054	005046 				CLR	-(SP)			;WHAT THE RESULT SHOULD BE
   3380	014056	011146 				MOV	(R1),-(SP)		;PUT C(DEV REG) ON STACK
   3381	014060	010046 				MOV	R0,-(SP)			;BUT ONLY CERTAIN BITS ARE BAD CANDIDATES
   3382	014062	005116 				COM	(SP)			;GET RID OF ONES
   3383	014064	042616 				BIC	(SP)+,(SP)		; THAT WE'RE NOT INTERESTED IN
   3384	014066	010146 				MOV	R1,-(SP)			;SAVE THE DEVICE ADR
   3385	014070					CK11SC	<CKEMSE!CKEPC!CKEDID!CKEGB>,<CKMG02>,<BITS WOULD NOT CLEAR>
	014070	104532 				TRAP	CKEMSE!CKEPC!CKEDID!CKEGB&<^CCKEMSG>		;BITS WOULD NOT CLEAR
	014072	020760'				.WORD	CKMG02			;ADR OF MESSAGE
   3386	014074	012700 	000001 		11$:	MOV	#1,R0			;START WITH B0 AND GO UNTIL B15 IS DONE
   3387	014100	031500 			12$:	BIT	(R5),R0			;WANT THIS BIT CHECKED?
   3388	014102	001420 				BEQ	14$			;BRANCH IF NOT, AND MAKE NEW BIT
   3389	014104	050011 				BIS	R0,(R1)			;TRY TO SET THE BIT
   3390	014106	030011 				BIT	R0,(R1)			;SEE IF THE BIT SET
   3391	014110	001005 				BNE	13$			;BRANCH IF IT SET
   3392	014112	010046 				MOV	R0,-(SP)			;SAVE GOOD
   3393	014114	005046 				CLR	-(SP)			;GOOD SHOUD BE 0 FOR THAT BIT
   3394	014116	010146 				MOV	R1,-(SP)			;DEV ADR WHERE IT HAPPENED
   3395	014120					CK11SC	<CKEMSE!CKEPC!CKEDID!CKEGB>,<CKMG03>,<BIT WOULD NOT SET>
	014120	104532 				TRAP	CKEMSE!CKEPC!CKEDID!CKEGB&<^CCKEMSG>		;BIT WOULD NOT SET
	014122	021002'				.WORD	CKMG03			;ADR OF MESSAGE
   3396	014124	040011 			13$:	BIC	R0,(R1)			;NOW THAT ITS SET TRY TO CLEAR IT
   3397	014126	030011 				BIT	R0,(R1)			;SEE IF IT CLEARED
   3398	014130	001405 				BEQ	14$			;BRANCH IF IT CLEARED AND GET NEW BIT
   3399	014132	005046 				CLR	-(SP)			;GOOD SHOUD BE 0
   3400	014134	010046 				MOV	R0,-(SP)			;SINCE IT DIDN'T CLEAR THIS BIT IS BAD
   3401	014136	010146 				MOV	R1,-(SP)			;DEV ADR THAT FAILED
   3402	014140					CK11SC	<CKEMSE!CKEPC!CKEDID!CKEGB>,<CKMG02>,<BIT WOULD NOT CLEAR>
	014140	104532 				TRAP	CKEMSE!CKEPC!CKEDID!CKEGB&<^CCKEMSG>		;BIT WOULD NOT CLEAR
	014142	020760'				.WORD	CKMG02			;ADR OF MESSAGE
   3403	014144	006300 			14$:	ASL	R0			;MAKE NEW BIT POSITION
   3404	014146	001354 				BNE	12$			;BRANCH IF THERE IS A BIT
   3405	014150	012600 				MOV	(SP)+,R0
   3406	014152	005725 				TST	(R5)+			;GO OVER BITS FOLLOWING JSR
   3407	014154	000205 				RTS	R5			;EXIT
   3408
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 75
PRINT DEVICE ID ROUTINE

   3410					.SBTTL		PRINT DEVICE ID ROUTINE
   3411
   3412	014156	032737 	100000 	011310'	CKDIDT:	BIT	#CKFIDT,CHKFLG		;HAVE WE ALREADY TYPE DEVICE ID ?
   3413	014164	001051 				BNE	11$
   3414	014166	004737 	020540'			JSR	PC,CKCRLF		;EXTRA CR + LF
   3415	014172	004037 	020552'			JSR	R0,CKTCRL
   3416	014176	   007 	   000 			.BYTE	007,0
   3417	014200	032776 	000200 	000002 		BIT	#CKEWRN,@2(SP)		;WARN ?
   3418	014206	001004 				BNE	5$
   3419	014210					CK11SC	CKENCL,<? >
	014210	104444 				TRAP	CKENCL!CKEMSG		;
   3420	014212	   077 	   040 	   000 		.ASCIZ	\? \
   3421						.EVEN
   3422	014216	000403 				BR	10$
   3423	014220				5$:	CK11SC	CKENCL,<% >
	014220	104444 				TRAP	CKENCL!CKEMSG		;
   3424	014222	   045 	   040 	   000 		.ASCIZ	\% \
   3425						.EVEN
   3426	014226	013700 	011314'		10$:	MOV	CKDNAM,R0		;GET ASCIZ \DEVICE NAME\
   3427	014232	004737 	020512'			JSR	PC,CKTTXT		;TYPE DEVICE NAME
   3428	014236					CK11SC	<CKENCL>,< #>
	014236	104444 				TRAP	CKENCL!CKEMSG		;
   3429	014240	   040 	   043 	   000 		.ASCIZ	\ #\
   3430						.EVEN
   3431	014244	013700 	011312'			MOV	CKDEVN,R0		;GET UNIT NUMBER
   3432	014250	004737 	020600'			JSR	PC,CKTOCT		;TYPE UNIT NUMBER
   3433	014254					CK11SC	<CKENCL>,<(Adr = >
	014254	104444 				TRAP	CKENCL!CKEMSG		;
   3434	014256	   050 	   101 	   144 		.ASCIZ	\(Adr = \
	014261	   162 	   040 	   075
	014264	   040 	   000
   3435						.EVEN
   3436	014266	013700 	020472'			MOV	CHKCHR+CKDA,R0		;GET DEVICE ADDR
   3437	014272	004737 	020600'			JSR	PC,CKTOCT		;TYPE IT
   3438	014276					CK11SC	<CKENCL>,<)>
	014276	104444 				TRAP	CKENCL!CKEMSG		;
   3439	014300	   051 	   000 			.ASCIZ	\)\
   3440						.EVEN
   3441	014302	052737 	100000 	011310'		BIS	#CKFIDT,CHKFLG		;REMEMBER WE TYPED DEVICE ID
   3442	014310	000207 			11$:	RTS	PC
   3443
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 76
ROUTINE TO FIND DEVICE INTERRUPT LEVEL

   3445					.SBTTL		ROUTINE TO FIND DEVICE INTERRUPT LEVEL
   3446					;
   3447					;CALL	JSR R5,CHKINL			;WITH DEVICE READY TO INT BUT
   3448					;					; WITH THE PS SET TO LEVEL 7.
   3449					;
   3450	014312	010046 			CHKINL:	MOV	R0,-(SP)		;SAVE R0
   3451	014314	010146 				MOV	R1,-(SP)		;SAVE R1
   3452	014316	010246 				MOV	R2,-(SP)		;SAVE R2
   3453	014320	012702 	000300 			MOV	#300,R2			;START BY CHECKING LEVEL 6.
   3454	014324	011501 			11$:	MOV	(R5),R1			;GET TIME TO WAIT
   3455	014326	005000 				CLR	R0			;WILL BE SET BY INT ROUTINE IF INT
   3456	014330	010237 	177776 			MOV	R2,@#PS			;LOWER PS LEVEL
   3457	014334	005700 			12$:	TST	R0			;SEE IF INT YET
   3458	014336	001012 				BNE	13$			;NON 0 SAYS INTERRUPT
   3459	014340	077103 				SOB	R1,12$			;TIME AND WAIT
   3460	014342	012737 	000340 	177776 		MOV	#BR7,@#PS		;TIMED OUT SO SET LEVEL 7 AND LOWER AND TRY AGAIN
   3461	014350	162702 	000040 			SUB	#40,R2			;MAKE LEVEL LOWER BY 1
   3462	014354	002363 				BGE	11$			;BRANCH IF LEVEL 0 NOT CHECKED YET
   3463	014356					CK11SC	<CKEMSE!CKEDID!CKEPC>,<CKMG04>,<DEVICE NEVER INTERRUPTED>
	014356	104432 				TRAP	CKEMSE!CKEDID!CKEPC&<^CCKEMSG>		;DEVICE NEVER INTERRUPTED
	014360	021022'				.WORD	CKMG04			;ADR OF MESSAGE
   3464	014362	000415 				BR	15$			;EXIT
   3465	014364	020037 	020474'		13$:	CMP	R0,CHKCHR+CKDV		;SEE IF SAME AS WHAT IT SHOULD BE
   3466	014370	001406 				BEQ	14$			;BRANCH IF CORRECT VECTOR
   3467	014372					CKSERR	<CHKCHR+CKDV>,<R0>,<R4>
	014372	013746 	020474'			MOV	CHKCHR+CKDV,-(SP)			;SAVE GOOD (CHKCHR+CKDV) ON STACK
	014376	010046 				MOV	R0,-(SP)			;SAVE BAD (R0) ON STACK
	014400	010446 				MOV	R4,-(SP)		;SAVE ADDRESS (R4) ON STACK
   3468	014402					CK11SC	<CKEMSE!CKEPC!CKEDID!CKEGB>,<CKMG05>,<Device INTERRUPTED to WRONG VECTOR>
	014402	104532 				TRAP	CKEMSE!CKEPC!CKEDID!CKEGB&<^CCKEMSG>		;Device INTERRUPTED to WRONG VECTOR
	014404	021052'				.WORD	CKMG05			;ADR OF MESSAGE
   3469	014406	062702 	000040 		14$:	ADD	#40,R2			;MAKE THE DEVICE LEVEL
   3470	014412	010237 	020476'			MOV	R2,CHKCHR+CKPI		;SAVE LEVEL DEVICE INTERRUPTED AT
   3471	014416	012602 			15$:	MOV	(SP)+,R2		;RESTORE R2
   3472	014420	012601 				MOV	(SP)+,R1		;RESTORE R1
   3473	014422	012600 				MOV	(SP)+,R0		;RESTORE R0
   3474	014424	005725 				TST	(R5)+			;SKIP OVER TIME DELAY CONSTANT
   3475	014426	000205 				RTS	R5			;RETURN WITH DEVICE LEVEL SAVED IN CHARACTERISTICS TABLE
   3476
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 77
CHECK INTERRUPTS AND FIND DEVICE LEVEL

   3478					.SBTTL		CHECK INTERRUPTS AND FIND DEVICE LEVEL
   3479
   3480					;ROUTINE TO CHECK INTERRUPTS AND FIND DEVICE LEVEL
   3481					;
   3482					; CALL	MOV	ENABLE ADR,R1
   3483					;	MOV	INT ADR,R2
   3484					;	JSR	R5,CKINT
   3485					;	ENABLE BIT
   3486					;	INTERRUPT BITS
   3487					;	SPECIAL CLEAR BITS
   3488					;	0 if BIS sufficient to generate interrupt, else address
   3489					;		of subroutine
   3490					;
   3491	014430	010346 			CKINT:	MOV	R3,-(SP)
   3492	014432	010446 				MOV	R4,-(SP)
   3493	014434	005037 	020476'			CLR	CHKCHR+CKPI		;START WITH PI OF 0 (NO DEV)
   3494	014440	005037 	015062'			CLR	CKFLAG
   3495	014444	012704 	000001 			MOV	#1,R4			;STARTING POSITION OF SLIDING INT BIT
   3496	014450	012703 	000340 		CKINT1:	MOV	#BR7,R3			;START CHECKING AT THIS LEVEL
   3497	014454	010337 	177776 		CKINT2:	MOV	R3,@#PS			;SET PS
   3498	014460	005000 				CLR	R0			;SET TO 0 SO IF INT HAPPENS WE KNOW IT
   3499	014462	030465 	000002 		CKINT3:	BIT	R4,2(R5)		;IS THERE A BIT TO TEST?
   3500	014466	001002 				BNE	11$			;BRANCH IF BIT IN POSITION
   3501	014470	000137 	015026'			JMP	CKINT7			;MAKE NEW BIT POSITION
   3502	014474	005765 	000006 		11$:	TST	6(R5)			;subroutine supplied?
   3503	014500	001403 				BEQ	12$			;no, do normal
   3504	014502	004775 	000006 			JSR	PC,@6(R5)		;yes, use it
   3505	014506	000403 				BR	13$			;and continue
   3506	014510	051511 			12$:	BIS	(R5),(R1)		;SET INTERRUPT ENABLE
   3507	014512	050412 				BIS	R4,(R2)			;SET INTERRUPT BIT
   3508	014514	000240 				NOP				;ALLOW 1 EXTRA INST TIME FOR INT
   3509	014516				13$:
   3510	014516	012737 	000340 	177776 		MOV	#BR7,@#PS		;LET NO INT HAPPEN
   3511	014524	041511 				BIC	(R5),(R1)		;CLEAR INT ENABLE
   3512	014526	005765 	000004 			TST	4(R5)			;SEE IF SPECIAL CLEAR
   3513	014532	001403 				BEQ	14$			;BRANCH IF NOT
   3514	014534	056512 	000004 			BIS	4(R5),(R2)		;SPECIAL CLEAR
   3515	014540	000402 				BR	15$			;CONTINUE
   3516	014542	046512 	000002 		14$:	BIC	2(R5),(R2)		;CLEAR INT BITS
   3517	014546	005700 			15$:	TST	R0			;IF R0 IS NON 0 IT SHOULD BE THE
   3518										; VECTOR ADR. IF 0 NO INT HAPPENED.
   3519	014550	001006 				BNE	16$			;BRANCH IF INTERRUPT
   3520	014552	162703 	000040 			SUB	#40,R3			;MAKE PS VALUE 1 LEVEL LESS
   3521	014556	002336 				BGE	CKINT2			;BRANCH IF NEW LEVEL OK
   3522	014560					CK11SC	<CKEMSE!CKEPC!CKEDID>,<CKMG04>,<DEVICE NEVER INTERRUPTED>
	014560	104432 				TRAP	CKEMSE!CKEPC!CKEDID&<^CCKEMSG>		;DEVICE NEVER INTERRUPTED
	014562	021022'				.WORD	CKMG04			;ADR OF MESSAGE
   3523	014564	000532 				BR	CKINTF			;EXIT WITH FAILURE RETURN
   3524					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 78
CHECK INTERRUPTS AND FIND DEVICE LEVEL

   3526					;
   3527					; HERE WHEN THE DEVICE HAS INTERRUPTED
   3528					;
   3529	014566	005737 	015062'		16$:	TST	CKFLAG		;FIRST TIME THROUGH?
   3530	014572	001014 				BNE	17$		;NO.
   3531	014574	005337 	015062'			DEC	CKFLAG		;YES, DON'T DO THIS AGAIN.
   3532	014600	010337 	020476'			MOV	R3,CHKCHR+CKPI	;STORE PRIORITY INTERRUPT LEVEL
   3533	014604	062737 	000040 	020476'		ADD	#40,CHKCHR+CKPI
   3534	014612	005737 	020474'			TST	CHKCHR+CKDV	;VECTOR SPECIFIED?
   3535	014616	001002 				BNE	17$		;YES, IT BETTER BE RIGHT.
   3536	014620	010037 	020474'			MOV	R0,CHKCHR+CKDV	;NO, SPECIFY IT NOW.
   3537	014624	020037 	020474'		17$:	CMP	R0,CHKCHR+CKDV	;IS VECTOR RIGHT?
   3538	014630	001412 				BEQ	18$		;YES.
   3539	014632	010046 				MOV	R0,-(SP)	;SAVE RIGHT ADDR
   3540	014634					CKSERR	<CHKCHR+CKDV>,R0,<R2> ;GD,BD,ADR
	014634	013746 	020474'			MOV	CHKCHR+CKDV,-(SP)			;SAVE GOOD (CHKCHR+CKDV) ON STACK
	014640	010046 				MOV	R0,-(SP)			;SAVE BAD (R0) ON STACK
	014642	010246 				MOV	R2,-(SP)		;SAVE ADDRESS (R2) ON STACK
   3541	014644					CK11SC	<CKEMSE!CKEPC!CKEDID!CKEGB>,<CKMG05>,<DEVICE INTERRUPTED TO WRONG VECTOR>
	014644	104532 				TRAP	CKEMSE!CKEPC!CKEDID!CKEGB&<^CCKEMSG>		;DEVICE INTERRUPTED TO WRONG VECTOR
	014646	021052'				.WORD	CKMG05			;ADR OF MESSAGE
   3542	014650	012637 	020474'			MOV	(SP)+,CHKCHR+CKDV ;SET VECTOR RIGHT
   3543	014654	000470 				BR	CKINTE		;EXIT
   3544					;
   3545	014656	010300 			18$:	MOV	R3,R0			;GET PRESENT LEVEL
   3546	014660	062700 	000040 			ADD	#40,R0			;MAKE IT THE DEVICE LEVEL
   3547	014664	020037 	020476'			CMP	R0,CHKCHR+CKPI		;CHECK LEVEL AGAINST LAST TIME
   3548	014670	001424 				BEQ	CKINT6			;BRANCH IF LEVEL CHECKS
   3549	014672					CKSERR	<CHKCHR+CKPI>,R0,R4
	014672	013746 	020476'			MOV	CHKCHR+CKPI,-(SP)			;SAVE GOOD (CHKCHR+CKPI) ON STACK
	014676	010046 				MOV	R0,-(SP)			;SAVE BAD (R0) ON STACK
	014700	010446 				MOV	R4,-(SP)		;SAVE ADDRESS (R4) ON STACK
   3550	014702					CK11SC	<CKEPC!CKEDID!CKEGB>,<Interrupt to Wrong PI Level>,<INTERRUPT TO WRONG PI LEVEL>
	014702	104516 				TRAP	CKEPC!CKEDID!CKEGB!CKEMSG		;INTERRUPT TO WRONG PI LEVEL
   3551	014704	   111 	   156 	   164 		.ASCIZ	\Interrupt to Wrong PI Level\
	014707	   145 	   162 	   162
	014712	   165 	   160 	   164
	014715	   040 	   164 	   157
	014720	   040 	   127 	   162
	014723	   157 	   156 	   147
	014726	   040 	   120 	   111
	014731	   040 	   114 	   145
	014734	   166 	   145 	   154
	014737	   000
   3552						.EVEN
   3553	014740	000436 				BR	CKINTE			;EXIT
   3554					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 79
CHECK INTERRUPTS AND FIND DEVICE LEVEL

   3556					;
   3557	014742	012737 	000000 	177776 	CKINT6:	MOV	#0,@#PS			;CHECK WITH LEVEL 0 AND
   3558	014750	005000 				CLR	R0			; NO INT ENABLE BITS SET
   3559	014752	050412 				BIS	R4,(R2)			;  AND INT BIT SET THAT NO INT OCCURRS
   3560	014754	000240 				NOP				;PAUSE
   3561	014756	000240 				NOP				;PAUSE
   3562	014760	012737 	000340 	177776 		MOV	#BR7,@#PS		;DON'T LET AN INT HAPPEN
   3563	014766	005700 				TST	R0			;SEE IF ONE HAPPENED
   3564	014770	001403 				BEQ	11$			;BRANCH IF NO INT
   3565	014772					CK11SC	<CKEMSE!CKEDID!CKEPC>,CKMG07,<INTERRUPT WHEN NOT ENABLED>
	014772	104432 				TRAP	CKEMSE!CKEDID!CKEPC&<^CCKEMSG>		;INTERRUPT WHEN NOT ENABLED
	014774	021120'				.WORD	CKMG07			;ADR OF MESSAGE
   3566	014776	000425 				BR	CKINTF			;EXIT WITH FAILURE RETURN
   3567	015000	005765 	000004 		11$:	TST	4(R5)			;SEE IF SPECIAL CLEAR
   3568	015004	001403 				BEQ	12$			;BRANCH IF NOT
   3569	015006	056512 	000004 			BIS	4(R5),(R2)		;SPECIAL CLEAR  (DL10 FOR ONE)
   3570	015012	000401 				BR	13$			;CONTINUE
   3571	015014	040412 			12$:	BIC	R4,(R2)			;CLEAR INT BITS
   3572	015016	006304 			13$:	ASL	R4			;MAKE NEW BIT POSITION
   3573	015020	001406 				BEQ	CKINTE			;BRANCH IF DONE
   3574	015022	000137 	014450'			JMP	CKINT1			;TEST NEW BIT
   3575	015026	006304 			CKINT7:	ASL	R4			;MAKE NEW INT BIT POSITION
   3576	015030	001402 				BEQ	CKINTE			;BRANCH IF NO NEW BIT POSITION
   3577	015032	000137 	014462'			JMP	CKINT3			;BRANCH IF NEW BIT POSITION
   3578	015036	062705 	000010 		CKINTE:	ADD	#10,R5			;FOR CORRECT RETURN
   3579	015042	000241 				CLC				;FLAG SUCCESS
   3580	015044				CKINTG:					;COMMON RETURN CODE
   3581	015044	012604 				MOV	(SP)+,R4
   3582	015046	012603 				MOV	(SP)+,R3
   3583	015050	000205 				RTS	R5			;RETURN
   3584
   3585	015052	062705 	000010 		CKINTF:	ADD	#10,R5			;FOR CORRECT RETURN ADDRESS
   3586	015056	000261 				SEC				;TO INDICATE FAILURE
   3587	015060	000771 				BR	CKINTG			;GO TO COMMON RETURN CODE
   3588
   3589	015062	000000 			CKFLAG:	0
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 80
HERE ON AN INTERRUPT WHILE IN CHK11

   3591					.SBTTL		HERE ON AN INTERRUPT WHILE IN CHK11
   3592
   3593					;HERE FROM AN INTERRUPT WHILE IN CHK11
   3594					; WILL RETURN VECTOR ADDRESS IN R0 (RANGE 0 TO 1174)
   3595					;
   3596	015064	013700 	177776 		CHKINT:	MOV	@#PS,R0			;GET PROCESSOR STATUS
   3597	015070	004737 	015230'			JSR	PC,11$			;COMPUTE INTERRUPT ADDRESS
   3598	015074	000000 				.WORD	0000			;THESE INTERRUPTS ARE 0000-0074
   3599		000012 			CHKITL=.-CHKINT				;LENGTH OF INTERRUPT BLOCK
   3600	015076	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3601	015102	004737 	015230'			JSR	PC,11$
   3602	015106	000100 				.WORD	0100
   3603	015110	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3604	015114	004737 	015230'			JSR	PC,11$
   3605	015120	000200 				.WORD	0200
   3606	015122	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3607	015126	004737 	015230'			JSR	PC,11$
   3608	015132	000300 				.WORD	0300
   3609	015134	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3610	015140	004737 	015230'			JSR	PC,11$
   3611	015144	000400 				.WORD	0400
   3612	015146	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3613	015152	004737 	015230'			JSR	PC,11$
   3614	015156	000500 				.WORD	0500
   3615	015160	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3616	015164	004737 	015230'			JSR	PC,11$
   3617	015170	000600 				.WORD	0600
   3618	015172	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3619	015176	004737 	015230'			JSR	PC,11$
   3620	015202	000700 				.WORD	0700
   3621	015204	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3622	015210	004737 	015230'			JSR	PC,11$
   3623	015214	001000 				.WORD	1000
   3624	015216	013700 	177776 			MOV	@#PS,R0			;GET PROCESSOR STATUS
   3625	015222	004737 	015230'			JSR	PC,11$
   3626	015226	001100 				.WORD	1100
   3627					;
   3628					; HERE AFTER AN INTERRUPT TO COMPUTE THE ADDRESS FROM THE THE LOW
   3629					;  FOUR BITS OF THE PS AND THE WORD AFTER THE JSR ABOVE.
   3630					;
   3631	015230	042700 	177760 		11$:	BIC	#^C17,R0		;STRIP EXTRA BITS
   3632	015234	006300 				ASL	R0			;MULTIPLY BY 4
   3633	015236	006300 				ASL	R0
   3634	015240	063600 				ADD	@(SP)+,R0		;MAKES VECTOR ADR
   3635	015242	012766 	000340 	000002 		MOV	#BR7,2(SP)		;SO DON'T TRAP BACK AGAIN
   3636	015250	000002 				RTI
   3637
   3638	015252				CHKFLV:	.BLKW	1			;CURRENT FLOATING DEVICE VECTOR
   3639	015254				CHKFLD:	.BLKW	1			;CURRENT FLOATING DEVICE ADR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 81
CHECK DH11 HDW

   3641					.SBTTL		CHECK DH11 HDW
   3642
   3643					;CALL	MOV	#<VECTOR ADR>,R3
   3644					;	MOV	#<HDW ADR>,R4
   3645					;	MOV	#<HDW ADR>,R1
   3646					;	JSR	PC,CKDH11
   3647	015256	010346 			CKDH11:	MOV	R3,-(SP)	;SAVE REGISTER
   3648	015260	004537 	014034'			JSR	R5,CHKBIT	;CHECK RD/WRT BITS
   3649	015264	131177 				131177			;READ/WRITE BITS
   3650	015266	005721 				TST	(R1)+		;ADVANCE TO NXT REC CHAR REG
   3651	015270	005721 				TST	(R1)+		;ADVANCE TO LINE PARAMETER REG(XX4)
   3652	015272	004537 	014034'			JSR	R5,CHKBIT	;CHECK RD/WRT BITS
   3653	015276	177767 				177767			;READ/WRITE BITS
   3654	015300	005721 				TST	(R1)+		;ADVANCE TO CURRENT ADR REG(XX6)
   3655	015302	005002 				CLR	R2		;START CHECK AT LINE 0
   3656	015304	010214 			11$:	MOV	R2,(R4)		;SELECT THE LINE
   3657	015306	004537 	014034'			JSR	R5,CHKBIT	;CHECK RD/WRT BITS
   3658	015312	177777 				-1			;READ/WRITE BITS
   3659	015314	005202 				INC	R2		;NEXT LINE TO CHECK
   3660	015316	020227 	000017 			CMP	R2,#17		;DONE
   3661	015322	003770 				BLE	11$		;CHECK LINES 0-17
   3662	015324	005721 				TST	(R1)+		;ADVANCE TO BYTE COUNT REG(X10)
   3663	015326	005002 				CLR	R2		;START CHECK AT LINE 0
   3664	015330	010214 			12$:	MOV	R2,(R4)		;SELECT THE LINE
   3665	015332	004537 	014034'			JSR	R5,CHKBIT	;CHECK RD/WRT BITS
   3666	015336	177777 				-1			;READ/WRITE BITS
   3667	015340	005202 				INC	R2		;NEXT LINE TO CHECK
   3668	015342	020227 	000017 			CMP	R2,#17		;ALL LINES CHECKED?
   3669	015346	003770 				BLE	12$		;CHECK ALL 20 LINES
   3670	015350	005721 				TST	(R1)+		;ADVANCE TO BAR REG(XX12)
   3671	015352	005721 				TST	(R1)+		;ADVANCE TO BREAK REG(X14)
   3672	015354	004537 	014034'			JSR	R5,CHKBIT	;CHECK BITS
   3673	015360	177777 				-1			;READ/WRITE BITS
   3674	015362	005721 				TST	(R1)+		;ADVANCE TO SILO STATUS REG(X16)
   3675	015364	004537 	014034'			JSR	R5,CHKBIT	;CHECK READ/WRITE BITS
   3676	015370	000077 				77
   3677	015372					$CKINT	R4,R4,<DH.RIE!DH..MM>,<DH..RI>
	015372	010401 			.IIF	NB,R4,	MOV	R4,R1			;LOAD ENABLE ADR
	015374	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	015376	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	015402	001100 				.WORD	DH.RIE!DH..MM			;ENABLE BITS -  DH.RIE!DH..MM
	015404	000200 				.WORD	DH..RI			;INTERRUPT BITS -  DH..RI
	015406	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	015410	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   3678	015412					$CKINT	,,<DH.SIE!DH..MM>,<DH..SI>
	015412	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	015416	011000 				.WORD	DH.SIE!DH..MM			;ENABLE BITS -  DH.SIE!DH..MM
	015420	040000 				.WORD	DH..SI			;INTERRUPT BITS -  DH..SI
	015422	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	015424	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   3679	015426	062737 	000004 	020474'		ADD	#4,CHKCHR+CKDV		;MAKE EXPECTED VECTOR FOR XMIT
   3680	015434					$CKINT	,,<DH.TIE>,<DH..TI>
	015434	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	015440	020000 				.WORD	DH.TIE			;ENABLE BITS -  DH.TIE
	015442	100000 				.WORD	DH..TI			;INTERRUPT BITS -  DH..TI
	015444	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	015446	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 81-1
CHECK DH11 HDW

   3681	015450	010337 	020474'			MOV	R3,CHKCHR+CKDV		;PUT VECTOR ADDRESS IN TABLE
   3682
   3683	015454				CKDH1A:
   3684	015454	010337 	016340'			MOV	R3,DHXMII		;ADR TO COME TO ON XMIT INT
   3685	015460	062737 	000004 	016340'		ADD	#4,DHXMII		;
   3686	015466	012700 	021156'			MOV	#CKBLK,R0		;LOAD A BUFFER WITH COUNT PATTERN
   3687	015472	012701 	000400 			MOV	#400,R1			;LOAD 400 CHARACTERS
   3688	015476	005002 				CLR	R2			;START WITH 0
   3689	015500	110220 			11$:	MOVB	R2,(R0)+		;STORE THE COUNT PATTERN
   3690	015502	105202 				INCB	R2			;NEW PATTERN
   3691	015504	077103 				SOB	R1,11$			;BUFFER LOADED?
   3692	015506	005003 				CLR	R3			;START WITH LINE 0
   3693	015510	012702 	000001 			MOV	#1,R2			;LINE BIT  (LINE 0)
   3694	015514	005037 	016336'		CKDH1B:	CLR	DHDATA			;FIRST RCV'D SHOULD BE 0
   3695	015520	012701 	177400 			MOV	#-400,R1
   3696	015524	052714 	004000 			BIS	#DH..MC,(R4)		;CLEAR THE DH
   3697	015530	052714 	031100 			BIS	#DH..MM!DH.SIE!DH.TIE!DH.RIE,(R4)	;ENABLE INTS
   3698	015534	050314 				BIS	R3,(R4)			;LOAD THE LINE NUMBER
   3699	015536	012764 	033567 	000004 		MOV	#B6!B8!B9!B10!B12!B13!DH.2SB!DH.CL8!DH.PEN!DH..OP,DH.LPR(R4) ;SEL 8BIT,9600,PAR,ODD
   3700	015544	010164 	000010 			MOV	R1,DH.BCR(R4)		;LENGTH TO XMIT
   3701	015550	012764 	021156'	000006 		MOV	#CKBLK,DH.CAR(R4)	;ADR WHERE THE DATA IS
   3702	015556	012764 	000004 	000016 		MOV	#4,DH.SSR(R4)		;ALARM LEVEL TO 4
   3703	015564	005000 			CKDH1E:	CLR	R0			;INT RETURNS ADR IN HERE
   3704	015566	005001 				CLR	R1			;TIMER
   3705	015570	010264 	000012 			MOV	R2,DH.BAR(R4)		;SET LINE ACTIVE
   3706	015574	012737 	000000 	177776 	11$:	MOV	#0,@#PS			;LEVEL TO 0 FOR INTS
   3707	015602	000240 				NOP				;LET AN INTERRUPT HAPPEN
   3708	015604	012737 	000340 	177776 		MOV	#BR7,@#PS		;DON'T LET ONE HAPPEN
   3709	015612	020037 	020474'			CMP	R0,CHKCHR+CKDV		;SEE IF RCV INT YET
   3710	015616	001467 				BEQ	16$			;BRANCH IF RCV INT
   3711	015620	020037 	016340'			CMP	R0,DHXMII		;SEE IF XMIT INT
   3712	015624	001427 				BEQ	13$			;BRANCH IF XMIT INT
   3713	015626	005700 				TST	R0			;SEE IF ANY INTERRUPT
   3714	015630	001413 				BEQ	12$			;BRANCH IF NO INTERRUPT
   3715	015632					CKSERR	<CHKCHR+CKDV>,R0,R3
	015632	013746 	020474'			MOV	CHKCHR+CKDV,-(SP)			;SAVE GOOD (CHKCHR+CKDV) ON STACK
	015636	010046 				MOV	R0,-(SP)			;SAVE BAD (R0) ON STACK
	015640	010346 				MOV	R3,-(SP)		;SAVE ADDRESS (R3) ON STACK
   3716	015642					CK11SC	<CKEPC!CKEGB!CKEDID>,<Ill Int>,<ILLEGAL INT WHILE WAITING FOR DH11 INT>
	015642	104516 				TRAP	CKEPC!CKEGB!CKEDID!CKEMSG		;ILLEGAL INT WHILE WAITING FOR DH11 INT
   3717	015644	   111 	   154 	   154 		.ASCIZ	\Ill Int\
	015647	   040 	   111 	   156
	015652	   164 	   000
   3718						.EVEN
   3719	015654	000137 	016270'			JMP	CKDH1D			;DON'T TEST ANY MORE
   3720	015660	077133 			12$:	SOB	R1,11$			;TIME-OUT
   3721	015662					CK11SC	<CKEPC!CKEDID>,<No Int>,<NO DH11 INTERRUPT>
	015662	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;NO DH11 INTERRUPT
   3722	015664	   116 	   157 	   040 		.ASCIZ	\No Int\
	015667	   111 	   156 	   164
	015672	   000
   3723						.EVEN
   3724	015674	004737 	016302'			JSR	PC,CKDHPL		;REPORT LINE NUMBER
   3725	015700	000137 	016270'			JMP	CKDH1D			;DON'T TEST ANY MORE
   3726	015704	032714 	002000 		13$:	BIT	#DH.NXM,(R4)		;SEE IF NXM
   3727	015710	001411 				BEQ	14$			;BRANCH IF NO NXM
   3728	015712					CK11SC	<CKEPC!CKEDID>,<Xmit Nxm>,<TRANSMIT NXM ON DH>
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 81-2
CHECK DH11 HDW

	015712	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;TRANSMIT NXM ON DH
   3729	015714	   130 	   155 	   151 		.ASCIZ	\Xmit Nxm\
	015717	   164 	   040 	   116
	015722	   170 	   155 	   000
   3730						.EVEN
   3731	015726	004737 	016302'			JSR	PC,CKDHPL		;REPORT LINE NUMBER
   3732	015732	000556 				BR	CKDH1D			;DON'T TEST ANY MORE
   3733	015734	032714 	100000 		14$:	BIT	#DH..TI,(R4)		;BETTER HAVE XMIT INT
   3734	015740	001013 				BNE	15$			;BRANCH IF WE DO
   3735	015742					CK11SC	<CKEPC!CKEDID>,<Ill Xmit Int>,<INT TO XMIT BUT FOR NO REASON>
	015742	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;INT TO XMIT BUT FOR NO REASON
   3736	015744	   111 	   154 	   154 		.ASCIZ	\Ill Xmit Int\
	015747	   040 	   130 	   155
	015752	   151 	   164 	   040
	015755	   111 	   156 	   164
	015760	   000
   3737						.EVEN
   3738	015762	004737 	016302'			JSR	PC,CKDHPL		;REPORT LINE NUMBER
   3739	015766	000540 				BR	CKDH1D			;DON'T TEST ANY MORE
   3740	015770	042714 	100000 		15$:	BIC	#DH..TI,(R4)		;CLEAR XMIT INT
   3741	015774	000673 				BR	CKDH1E			;
   3742	015776	032714 	040000 		16$:	BIT	#DH..SI,(R4)		;SEE IF SILO OVERFLOW
   3743	016002	001411 				BEQ	CKDH1C			;BRANCH IF SILO HAD ROOM
   3744	016004					CK11SC	<CKEPC!CKEDID>,<Silo Full>,<SILO OVERFLOW>
	016004	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;SILO OVERFLOW
   3745	016006	   123 	   151 	   154 		.ASCIZ	\Silo Full\
	016011	   157 	   040 	   106
	016014	   165 	   154 	   154
	016017	   000
   3746						.EVEN
   3747	016020	004737 	016302'			JSR	PC,CKDHPL		;REPORT LINE NUMBER
   3748	016024	000521 				BR	CKDH1D			;DON'T TEST ANY MORE
   3749	016026	042714 	000200 		CKDH1C:	BIC	#DH..RI,(R4)		;CLEAR RCV INT (MUST FOR MAINT MODE)
   3750	016032	016400 	000002 			MOV	DH.NRC(R4),R0		;GET STUFF FROM SILO
   3751	016036	032700 	070000 			BIT	#DH.DOV!DH..FE!DH..PE,R0	;SEE IF ANY ERROR BITS WITH DATA
   3752	016042	001424 				BEQ	11$			;BRANCH IF NO ERRORS WITH THE DATA
   3753	016044	013746 	016336'			MOV	DHDATA,-(SP)		;MAKE THE GOOD
   3754	016050	010346 				MOV	R3,-(SP)			;PUT LINE # IN
   3755	016052	000316 				SWAB	(SP)			;GET IT IN THE (LB)
   3756	016054	052616 				BIS	(SP)+,(SP)		;LINE # NOW IN GOOD
   3757	016056	052716 	100000 			BIS	#DH.VDP,(SP)		;GOOD INCLUDES VALID DATA PRESENT
   3758	016062	010046 				MOV	R0,-(SP)			;THE BAD
   3759	016064	010346 				MOV	R3,-(SP)			;THE LINE UNDER TEST
   3760	016066					CK11SC	<CKEGB!CKEPC!CKEDID>,<Data Err Bit Set>,<ERROR BITS WITH THE DATA>
	016066	104516 				TRAP	CKEGB!CKEPC!CKEDID!CKEMSG		;ERROR BITS WITH THE DATA
   3761	016070	   104 	   141 	   164 		.ASCIZ	\Data Err Bit Set\
	016073	   141 	   040 	   105
	016076	   162 	   162 	   040
	016101	   102 	   151 	   164
	016104	   040 	   123 	   145
	016107	   164 	   000
   3762						.EVEN
   3763	016112	000466 				BR	CKDH1D			;DON'T TEST ANY MORE
   3764	016114	032700 	100000 		11$:	BIT	#DH.VDP,R0		;SEE IF VALID DATA
   3765	016120	001014 				BNE	12$			;BRANCH IF VALID DATA
   3766	016122					CK11SC	<CKEPC!CKEDID>,<Not Valid Data>,<NOT VALID DATA BIT SET>
	016122	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;NOT VALID DATA BIT SET
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 81-3
CHECK DH11 HDW

   3767	016124	   116 	   157 	   164 		.ASCIZ	\Not Valid Data\
	016127	   040 	   126 	   141
	016132	   154 	   151 	   144
	016135	   040 	   104 	   141
	016140	   164 	   141 	   000
   3768						.EVEN
   3769	016144	004737 	016302'			JSR	PC,CKDHPL		;REPORT LINE NUMBER
   3770	016150	000447 				BR	CKDH1D			;DON'T TEST ANY MORE
   3771	016152	042700 	170000 		12$:	BIC	#B15!B14!B13!B12,R0	;CLEAR DATA ERROR BITS
   3772	016156	000300 				SWAB	R0			;FOR CHECKING LINE #
   3773	016160	120003 				CMPB	R0,R3			;SEE IF LINE #OK
   3774	016162	001415 				BEQ	13$			;BRANCH IF IT IS
   3775	016164	010346 				MOV	R3,-(SP)			;LEGAL LINE NUMBER
   3776	016166	005046 				CLR	-(SP)			;0 FOR BYTE MOVE
   3777	016170	110016 				MOVB	R0,(SP)			;THE ILLEGAL LINE NUMBER
   3778	016172	010346 				MOV	R3,-(SP)			;LINE UNDER TEST
   3779	016174					CK11SC	<CKEGB!CKEPC!CKEDID>,<Ill Line Num>,<ILLEGAL LINE NUMBER>
	016174	104516 				TRAP	CKEGB!CKEPC!CKEDID!CKEMSG		;ILLEGAL LINE NUMBER
   3780	016176	   111 	   154 	   154 		.ASCIZ	\Ill Line Num\
	016201	   040 	   114 	   151
	016204	   156 	   145 	   040
	016207	   116 	   165 	   155
	016212	   000
   3781						.EVEN
   3782	016214	000425 				BR	CKDH1D			;DON'T TEST ANY MORE
   3783	016216	000300 			13$:	SWAB	R0			;FOR CHECKING THE DATA
   3784	016220	120037 	016336'			CMPB	R0,DHDATA		;SEE IF CORRECT DATA
   3785	016224	001414 				BEQ	14$			;BRANCH IF DATA OK
   3786	016226	013746 	016336'			MOV	DHDATA,-(SP)		;GOOD DATA
   3787	016232	005046 				CLR	-(SP)			;FOR BYTE MOVE
   3788	016234	110016 				MOVB	R0,(SP)			;THE BAD DATA
   3789	016236	010346 				MOV	R3,-(SP)			;THE LINE #
   3790	016240					CK11SC	<CKEGB!CKEPC!CKEDID>,<Data Err>,<DATA ERROR>
	016240	104516 				TRAP	CKEGB!CKEPC!CKEDID!CKEMSG		;DATA ERROR
   3791	016242	   104 	   141 	   164 		.ASCIZ	\Data Err\
	016245	   141 	   040 	   105
	016250	   162 	   162 	   000
   3792						.EVEN
   3793	016254	000405 				BR	CKDH1D			;DON'T TEST ANY MORE
   3794	016256	105237 	016336'		14$:	INCB	DHDATA			;NEW PATTERN EXPECTED
   3795	016262	001402 				BEQ	15$			;BRANCH IF LINE DONE
   3796	016264	000137 	015564'			JMP	CKDH1E			;
   3797
   3798	016270				15$:
   3799	016270	005203 			CKDH1D:	INC	R3			;NEW LINE NUMBER
   3800	016272	006302 				ASL	R2			;NEW BIT FOR NEXT LINE
   3801	016274	001414 				BEQ	CKDH1F			;BRANCH IF TEST ALL DONE
   3802	016276	000137 	015514'			JMP	CKDH1B			;
   3803
   3804	016302				CKDHPL:	CK11SC	0,<		Line #>
	016302	104404 				TRAP	0!CKEMSG		;
   3805	016304	   011 	   011 	   114 		.ASCIZ	\		Line #\
	016307	   151 	   156 	   145
	016312	   040 	   043 	   000
   3806						.EVEN
   3807	016316	010300 				MOV	R3,R0			;LINE NUMBER TO R0 FOR CALL
   3808	016320	004737 	020600'			JSR	PC,CKTOCT		;PRINT LINE NUMBER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 81-4
CHECK DH11 HDW

   3809	016324	000207 				RTS	PC			;RETURN
   3810
   3811	016326	052714 	004000 		CKDH1F:	BIS	#DH..MC,(R4)		;MASTER CLEAR
   3812	016332	012603 				MOV	(SP)+,R3	;GET R3 BACK
   3813	016334	000207 				RTS	PC			;DH CHARACTER TEST DONE
   3814	016336	000000 			DHDATA:	0
   3815	016340	000000 			DHXMII:	0
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 82
CHECK DL11-E HDW

   3817					.SBTTL		CHECK DL11-E HDW
   3818
   3819					;CALL	MOV	#<VECTOR ADR>,R3
   3820					;	MOV	#<HDW ADR>,R4
   3821					;	MOV	#<HDW ADR>,R1
   3822					;	JSR	PC,CKDL11
   3823					;
   3824	016342				CKRD11:
   3825	016342	010346 			CKDL11:	MOV	R3,-(SP)
   3826	016344	004537 	014034'			JSR	R5,CHKBIT		;CHECK READ/WRITE BITS
   3827	016350	000156 				000156
   3828	016352	005721 				TST	(R1)+			;ADVANCE TO RECEIVE DATA REGISTER
   3829	016354	005721 				TST	(R1)+			;ADVANCE TO TRANSMIT STATUS REGISTER
   3830	016356	004537 	014034'			JSR	R5,CHKBIT
   3831	016362	000105 				000105
   3832	016364	012711 	000100 			MOV	#CO.INE,(R1)		;CAUSE AN INTERRUPT
   3833	016370	004537 	014312'			JSR	R5,CHKINL		;CHECK THE PI LEVEL
   3834	016374	177777 				.WORD	-1
   3835	016376	042711 	000100 			BIC	#CO.INE,(R1)		;CLEAR THE INTERRUPT
   3836	016402	012603 				MOV	(SP)+,R3
   3837	016404	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 83
CHECK DL11-E HDW

   3839
   3840					.SBTTL		CHECK DL11-A HDW
   3841
   3842					;CALL	MOV	#<VECTOR ADR>,R3
   3843					;	MOV	#<HDW ADR>,R4
   3844					;	MOV	#<HDW ADR>,R1
   3845					;	JSR	PC,CKKL11
   3846					;
   3847	016406	010346 			CKKL11:	MOV	R3,-(SP)
   3848	016410	004537 	014034'			JSR	R5,CHKBIT		;CHECK READ/WRITE BITS
   3849	016414	000100 				.WORD	000100
   3850	016416	005721 				TST	(R1)+			;ADVANCE TO RECEIVE DATA REGISTER
   3851	016420	005721 				TST	(R1)+			;ADVANCE TO TRANSMIT STATUS REGISTER
   3852	016422	004537 	014034'			JSR	R5,CHKBIT
   3853	016426	000104 				.WORD	000104
   3854	016430	012764 	000100 	000004 		MOV	#CO.INE,4(R4)	;ENABLE PENDING OUTPUT INTERRUPT
   3855	016436	004537 	014312'			JSR	R5,CHKINL	;TEST INTERURPTS
   3856	016442	177777 				.WORD	-1		;TIMEOUT COUNTER
   3857	016444	042764 	000100 	000004 		BIC	#CO.INE,4(R4)	;DISABLE THAT INTERRUPT
   3858	016452	012603 				MOV	(SP)+,R3
   3859	016454	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 84
CHECK DL11-A HDW

   3861
   3862					.SBTTL		CHECK DM11-BB HDW
   3863
   3864					;CALL	MOV	#<VECTOR ADR>,R3
   3865					;	MOV	#<HDW ADR>,R4
   3866					;	MOV	#<HDW ADR>,R1
   3867					;	JSR	PC,CKDM11
   3868	016456	004537 	014034'		CKDM11:	JSR	R5,CHKBIT		;CHECK FOLLOWING BITS
   3869	016462	001357 				DM.ALI!DM.DNE!DM..MM!DM.ENB!DM.IEN
   3870	016464					$CKINT	,R4,<DM.IEN>,<DM.DNE>
	016464	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	016466	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	016472	000100 				.WORD	DM.IEN			;ENABLE BITS -  DM.IEN
	016474	000200 				.WORD	DM.DNE			;INTERRUPT BITS -  DM.DNE
	016476	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	016500	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   3871	016502	004737 	016552'			JSR	PC,CKDMCS		;CLEAR SCAN AND CHECK IT CLEARED
   3872	016506	052714 	000040 			BIS	#DM.ENB,(R4)		;ENABLE SCAN
   3873	016512	032714 	000020 			BIT	#DM.BSY,(R4)		;SEE IF BSY SET
   3874	016516	001012 				BNE	11$			;BRANCH IF IT DID
   3875	016520					CK11SC	<CKEPC!CKEDID>,<Busy did not Set>,<BUSY DID NOT SET>
	016520	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;BUSY DID NOT SET
   3876	016522	   102 	   165 	   163 		.ASCIZ	\Busy did not Set\
	016525	   171 	   040 	   144
	016530	   151 	   144 	   040
	016533	   156 	   157 	   164
	016536	   040 	   123 	   145
	016541	   164 	   000
   3877						.EVEN
   3878	016544	004737 	016552'		11$:	JSR	PC,CKDMCS		;CLEAR SCAN AND CHECKED IT CLEARED
   3879	016550	000207 				RTS	PC
   3880
   3881	016552	012702 	001357 		CKDMCS:	MOV	#DM.DNE!DM..MM!DM.IEN!DM.ENB!DM.ALI,R2	;BITS WHICH SHOULD GET CLEARED
   3882	016556	012700 	000100 			MOV	#100,R0			;TIME OUT FOR BUSY
   3883	016562	052714 	004000 			BIS	#DM.SCN,(R4)		;CLEAR SCAN
   3884	016566	032714 	000020 		11$:	BIT	#DM.BSY,(R4)		;SEE IF BUSY CLEAR YET
   3885	016572	001414 				BEQ	12$			;BRANCH IF IT IS
   3886	016574	077004 				SOB	R0,11$			;TIME OUT WAITING FOR BSY TO CLEAR
   3887	016576					CK11SC	<CKEPC!CKEDID>,<Busy did not Clear>,<CLEARING SCAN FAILED TO CLEAR BUSY>
	016576	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;CLEARING SCAN FAILED TO CLEAR BUSY
   3888	016600	   102 	   165 	   163 		.ASCIZ	\Busy did not Clear\
	016603	   171 	   040 	   144
	016606	   151 	   144 	   040
	016611	   156 	   157 	   164
	016614	   040 	   103 	   154
	016617	   145 	   141 	   162
	016622	   000
   3889						.EVEN
   3890	016624	030114 			12$:	BIT	R1,(R4)			;SEE IF THEY ARE ALL CLEAR
   3891	016626	001420 				BEQ	14$			;BRANCH IF THEY ARE ALL CLEAR
   3892	016630	011400 				MOV	(R4),R0			;GET DM11 STATUS
   3893	016632	005102 				COM	R2			;MASK OUT NON INTERESTING BITS
   3894	016634	040200 				BIC	R2,R0			;
   3895	016636	005046 				CLR	-(SP)			;GOOD
   3896	016640	010046 				MOV	R0,-(SP)			;BAD
   3897	016642	010446 				MOV	R4,-(SP)			;ADR
   3898	016644					CK11SC	<CKEGB!CKEPC!CKEDID>,<Clear Scan Error>,<CLR SCAN FAILED TO CLEAR A BIT>
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 84-1
CHECK DM11-BB HDW

	016644	104516 				TRAP	CKEGB!CKEPC!CKEDID!CKEMSG		;CLR SCAN FAILED TO CLEAR A BIT
   3899	016646	   103 	   154 	   145 		.ASCIZ	\Clear Scan Error\
	016651	   141 	   162 	   040
	016654	   123 	   143 	   141
	016657	   156 	   040 	   105
	016662	   162 	   162 	   157
	016665	   162 	   000
   3900						.EVEN
   3901	016670	000207 			14$:	RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 85
CHECK DTE20 HARDWARE

   3903					.SBTTL		CHECK DTE20 HARDWARE
   3904					;
   3905					;	JSR	PC,CKTE11
   3906	016672				CKTE11:
   3907									; [1(17)]
   3908					.IIF DF,DTEBAD,MOV R1,DTEBAD	;SAVE DTE20 BASE ADR [1(26)]
   3909	016672	004537 	014034'			JSR	R5,CHKBIT	;CHECK DLYCNT IN DTE'S RAM
   3910	016676	177777 				177777			; SINCE WE CAN ACCESS ALL THE BITS
   3911	016700	062701 	000034 			ADD	#TE.STW-TE.DYC,R1 ;POINT TO STATUS REGISTER
   3912					.IIF DF,DTPSTA,MOV R1,DTPSTA	;SAVE THE POINTER TO STAT REG [1(26)]
   3913	016704	012711 	000040 			MOV	#TS.EEE,@R1	;ENABLE INTERRUPTS
   3914	016710	032711 	000001 			BIT	#TS.IEN,@R1	;DOES DTE AGREE?
   3915	016714	001022 				BNE	11$		;YEP
   3916	016716					CK11SC	<CKEPC!CKEDID>,<Setting TS.EEE didn't set TS.IEN>
	016716	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;
   3917	016720	   123 	   145 	   164 		.ASCIZ	\Setting TS.EEE didn't set TS.IEN\
	016723	   164 	   151 	   156
	016726	   147 	   040 	   124
	016731	   123 	   056 	   105
	016734	   105 	   105 	   040
	016737	   144 	   151 	   144
	016742	   156 	   047 	   164
	016745	   040 	   163 	   145
	016750	   164 	   040 	   124
	016753	   123 	   056 	   111
	016756	   105 	   116 	   000
   3918						.EVEN
   3919	016762				11$:	$CKINT	,R1,<TS.EEE>,<TS.RES>,<TS.DEI>
	016762	010102 			.IIF	NB,R1,	MOV	R1,R2			;LOAD INTERRUPT ADR
	016764	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	016770	000040 				.WORD	TS.EEE			;ENABLE BITS -  TS.EEE
	016772	004000 				.WORD	TS.RES			;INTERRUPT BITS -  TS.RES
	016774	000010 			.IIF	NB,TS.DEI,	.WORD	TS.DEI			;BITS TO CLEAR DEVICE - TS.DEI
	016776	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   3920	017000	032711 	000001 			BIT	#TS.IEN,@R1	;WHICH SHOULD TURN THIS OFF
   3921	017004	001423 				BEQ	12$		;OKAY
   3922	017006					CK11SC	<CKEPC!CKEDID>,<Setting TS.DEI didn't clear TS.IEN>
	017006	104416 				TRAP	CKEPC!CKEDID!CKEMSG		;
   3923	017010	   123 	   145 	   164 		.ASCIZ	\Setting TS.DEI didn't clear TS.IEN\
	017013	   164 	   151 	   156
	017016	   147 	   040 	   124
	017021	   123 	   056 	   104
	017024	   105 	   111 	   040
	017027	   144 	   151 	   144
	017032	   156 	   047 	   164
	017035	   040 	   143 	   154
	017040	   145 	   141 	   162
	017043	   040 	   124 	   123
	017046	   056 	   111 	   105
	017051	   116 	   000
   3924						.EVEN
   3925	017054	032711 	000010 		12$:	BIT	#TS.RM,@R1	;WE SHOULD BE RESTRICTED
   3926	017060	001015 				BNE	13$		;WE ARE, FINE
   3927	017062					CK11SC	<CKEDID!CKEWRN>,<DTE20 is not restricted>
	017062	104614 				TRAP	CKEDID!CKEWRN!CKEMSG		;
   3928	017064	   104 	   124 	   105 		.ASCIZ	\DTE20 is not restricted\
	017067	   062 	   060 	   040
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 85-1
CHECK DTE20 HARDWARE

	017072	   151 	   163 	   040
	017075	   156 	   157 	   164
	017100	   040 	   162 	   145
	017103	   163 	   164 	   162
	017106	   151 	   143 	   164
	017111	   145 	   144 	   000
   3929	017114	012741 	000100 		13$:	MOV	#TS.RST,-(R1)	;REALLY INITIALIZE DTE20
   3930					.IIF DF,DTEDTO,MOV R3,DTEDTO	;SAVE PTR TO INTP VECTOR ADR [1(26)]
   3931									;DTEDTO GLOBAL CELL IS
   3932									; ALSO USED TO HOLD
   3933									; DEPOSIT/EXAMINE TIMEOUTS
   3934	017120	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 86
CHECK DTE20 HARDWARE

   3936
   3937					.SBTTL		CHECK CD11 HARDWARE
   3938					;
   3939					;	JSR	PC,CKCD11
   3940					;
   3941	017122				CKCD11:
   3942	017122	032711 	010000 			BIT	#CD.OFL,(R1)		;OFF LINE ?
   3943	017126	001012 				BNE	10$			;BRANCH IF NOT
   3944	017130					CK11SC	0,<NOT READY>
	017130	104404 				TRAP	0!CKEMSG		;
   3945	017132	   011 	   103 	   104 		.ASCIZ	\	CD20 off line\
	017135	   062 	   060 	   040
	017140	   157 	   146 	   146
	017143	   040 	   154 	   151
	017146	   156 	   145 	   000
   3946						.EVEN
   3947	017152	000207 				RTS	PC
   3948	017154				10$:
   3949	017154	004537 	014034'			JSR	R5,CHKBIT		;CHECK HARDWARE BITS
   3950	017160	000102 				CD.PAK!CD.INE
   3951	017162					$CKINT	R4,R4,<CD.INE>,,,<CKCD20>
	017162	010401 			.IIF	NB,R4,	MOV	R4,R1			;LOAD ENABLE ADR
	017164	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	017166	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	017172	000100 				.WORD	CD.INE			;ENABLE BITS -  CD.INE
	017174	000000 				.WORD				;INTERRUPT BITS -
	017176	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	017200	017204'			.IIF	NB,CKCD20,	.WORD	CKCD20			;SUBROUTINE TO GENERATE INTERRUPT
   3952	017202	000207 				RTS	PC
   3953	017204				CKCD20:
   3954	017204	012711 	000400 			MOV	#CD.PWR,(R1)		;CLEAR THE CD
   3955	017210	012761 	177777 	000002 		MOV	#-1,2(R1)		;READ ONE COLUMN
   3956	017216	012761 	160000 	000004 		MOV	#160000,4(R1)		;INTO NON-EXISTENT MEM
   3957	017224	012714 	000061 			MOV	#CD.XAD!CD.GO,(R4)	;START IT GOING
   3958	017230	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 87
CHECK CD11 HARDWARE

   3960
   3961					.SBTTL		CHECK LP11 HARDWARE
   3962					;
   3963					;	JSR	PC,CKLP11
   3964					;
   3965	017232				CKLP11:
   3966	017232	032714 	100000 			BIT	#LP.ERR,(R4)		;SEE IF DEV READY
   3967	017236	001420 				BEQ	11$				;BRANCH IF RDY
   3968	017240					CK11SC	<CKEMSG>,< LP11 #>
	017240	104404 				TRAP	CKEMSG!CKEMSG		;
   3969	017242	   040 	   114 	   120 		.ASCIZ	\ LP11 #\
	017245	   061 	   061 	   040
	017250	   043 	   000
   3970						.EVEN
   3971	017252	013700 	011312'			MOV	CKDEVN,R0			;DEV NUMBER
   3972	017256	004737 	020600'			JSR	PC,CKTOCT			;PRINT DEV NUM
   3973	017262					CK11SC	CKENCL,< Not ready.>
	017262	104444 				TRAP	CKENCL!CKEMSG		;
   3974	017264	   040 	   116 	   157 		.ASCIZ	\ Not ready.\
	017267	   164 	   040 	   162
	017272	   145 	   141 	   144
	017275	   171 	   056 	   000
   3975						.EVEN
   3976	017300	004537 	014034'		11$:	JSR	R5,CHKBIT			;CHECK HDW BITS
   3977	017304	000100 				LP.INE
   3978	017306					$CKINT	,R4,<LP.INE>,<LP.DNE>
	017306	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	017310	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	017314	000100 				.WORD	LP.INE			;ENABLE BITS -  LP.INE
	017316	000200 				.WORD	LP.DNE			;INTERRUPT BITS -  LP.DNE
	017320	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	017322	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   3979	017324	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 88
CHECK LP11 HARDWARE

   3981
   3982					.SBTTL		CHECK THE LP20 HARDWARE
   3983
   3984
   3985	017326	032714 	100000 		CKL211:	BIT	#L2.ERR,(R4)		; IS THE DEVICE OK ?
   3986	017332	001420 				BEQ	11$			;  YES
   3987	017334					CK11SC	CKEMSG,< LP20 # >
	017334	104404 				TRAP	CKEMSG!CKEMSG		;
   3988	017336	   040 	   114 	   120 		.ASCIZ	\ LP20 #\
	017341	   062 	   060 	   040
	017344	   043 	   000
   3989						.EVEN
   3990	017346	013700 	011312'			MOV	CKDEVN,R0		; GET DEVICE NUMBER
   3991	017352	004737 	020600'			JSR	PC,CKTOCT		; OUTPUT IT
   3992	017356					CK11SC	CKENCL,< Not ready.>
	017356	104444 				TRAP	CKENCL!CKEMSG		;
   3993	017360	   040 	   116 	   157 		.ASCIZ	\ Not ready.\
	017363	   164 	   040 	   162
	017366	   145 	   141 	   144
	017371	   171 	   056 	   000
   3994						.EVEN
   3995	017374	004537 	014034'		11$:	JSR	R5,CHKBIT		;CHECK SOME BITS
   3996	017400	000100 				LP.INE
   3997	017402					$CKINT	R4,R4,<L2.ENB>,,,<CKL220>
	017402	010401 			.IIF	NB,R4,	MOV	R4,R1			;LOAD ENABLE ADR
	017404	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	017406	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	017412	000100 				.WORD	L2.ENB			;ENABLE BITS -  L2.ENB
	017414	000000 				.WORD				;INTERRUPT BITS -
	017416	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	017420	017424'			.IIF	NB,CKL220,	.WORD	CKL220			;SUBROUTINE TO GENERATE INTERRUPT
   3998	017422	000207 				RTS	PC
   3999
   4000	017424				CKL220:
   4001	017424	052714 	000004 			BIS	#L2.TM,(R4)
   4002	017430	012764 	017452'	000004 		MOV	#TSTCHR,4(R4)		;ADDRESS OF TEST DATA
   4003	017436	012764 	177774 	000006 		MOV	#-4,6(R4)		;BYTE COUNT
   4004	017444	052714 	000001 			BIS	#1,(R4)			;SET GO
   4005	017450	000207 				RTS	PC			;SHOULD INTERRUPT
   4006
   4007	017452	   011 	   011 	   011 	TSTCHR:	.BYTE	11,11,11,11
	017455	   011
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 89
CHECK THE LP20 HARDWARE

   4009
   4010					.SBTTL		CHECK RH11 HARDWARE
   4011
   4012					;CALL	MOV	#<VECTOR ADR>,R3
   4013					;	MOV	#<HDW ADR>,R4
   4014					;	MOV	#<HDW ADR>,R1
   4015					;	JSR	PC,CKRH11
   4016					;
   4017	017456				CKRH11:;BIS	#1,CHKRP+4+0	;GROSS KLUDGE TO PREVENT CHKDEV FROM
   4018	017456	000207 				RTS	PC		; FINDING WHAT LOOKS LIKE AN RP.
   4019									; (THE DEVICE REGISTERS OVERLAP)
   4020
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 90
CHECK RH11 HARDWARE

   4022
   4023					.SBTTL		CHECK TC11 HARDWARE
   4024
   4025					;CALL	MOV	#<VECTOR ADR>,R3
   4026					;	MOV	#<HDW ADR>,R4
   4027					;	MOV	#<HDW ADR>,R1
   4028					;	JSR	PC,CKTC11
   4029					;
   4030	017460				CKTC11:
   4031	017460	004537 	014034'			JSR	R5,CHKBIT	;TEST FOLLOWING BITS
   4032	017464	000003 				TC.D17!TC.D16
   4033	017466	005721 				TST	(R1)+		;ADVANCE TO COMMAND REGISTER
   4034	017470	004537 	014034'			JSR	R5,CHKBIT		;TEST FOLLOWING BITS
   4035	017474	037560 				TC..MM!TC..DI!TC.REV!TC.US7!TC.INE!TC.A17!TC.A16
   4036	017476	005721 				TST	(R1)+		;ADVANCE TO WORD COUNT REG
   4037	017500	004537 	014034'			JSR	R5,CHKBIT	;TEST FOLLOWING BITS
   4038	017504	177777 				-1
   4039	017506	005721 				TST	(R1)+		;ADVANCE TO BUS ADDR REG
   4040	017510	004537 	014034'			JSR	R5,CHKBIT		;TEST THE FOLLOWING BITS
   4041	017514	177777 				-1
   4042	017516	005721 				TST	(R1)+		;ADVANCE TO DATA REGISTER
   4043	017520	004537 	014034'			JSR	R5,CHKBIT	;CHECK FOLLOWING BITS
   4044	017524	177777 				-1
   4045	017526	010401 				MOV	R4,R1		;SET UP ADR FOR INT CHK
   4046	017530	005721 				TST	(R1)+		;ADVANCE TO COMMAND REG
   4047	017532	010102 				MOV	R1,R2		;SET UP FOR INT CHK
   4048	017534					$CKINT	,,<TC.INE>,<TC.RDY>
	017534	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	017540	000100 				.WORD	TC.INE			;ENABLE BITS -  TC.INE
	017542	000200 				.WORD	TC.RDY			;INTERRUPT BITS -  TC.RDY
	017544	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	017546	000000 			.IIF	B,,	.WORD	0			;NO INTERRUPT SUB,ROUTINE NEEDED
   4049	017550	000207 				RTS	PC
   4050
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 91
RX11 CHECKING

   4052						.SBTTL	RX11 CHECKING
   4053
   4054	017552				CKRX11:
   4055	017552	010346 				MOV	R3,-(SP)	;SAVE REGISTER
   4056	017554	004537 	014034'			JSR	R5,CHKBIT	;CHECK THE FOLLOWING BITS
   4057	017560	000100 				.WORD	100
   4058	017562					$CKINT	R4,R4,<100>,,,<CKRX20>
	017562	010401 			.IIF	NB,R4,	MOV	R4,R1			;LOAD ENABLE ADR
	017564	010402 			.IIF	NB,R4,	MOV	R4,R2			;LOAD INTERRUPT ADR
	017566	004537 	014430'			JSR	R5,CKINT		;GO CHECK INTERRUPTS
	017572	000100 				.WORD	100			;ENABLE BITS -  100
	017574	000000 				.WORD				;INTERRUPT BITS -
	017576	000000 			.IIF	B,,	.WORD	0			;NO SPECIAL CLEAR BITS
	017600	017606'			.IIF	NB,CKRX20,	.WORD	CKRX20			;SUBROUTINE TO GENERATE INTERRUPT
   4059	017602	012603 				MOV	(SP)+,R3
   4060	017604	000207 				RTS	PC
   4061
   4062	017606				CKRX20:
   4063	017606	012714 	000016 			MOV	#RXRERR,(R4)
   4064	017612	052714 	000001 			BIS	#RXGO,(R4)
   4065	017616	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 92
RX11 CHECKING

   4067
   4068					;HERE ON A UNEXPECTED BUS TRAP
   4069					;
   4070	017620				CKBUST:	CK11SC	<CKEDID!CKEPC>,<Trap from>
	017620	104416 				TRAP	CKEDID!CKEPC!CKEMSG		;
   4071	017622	   124 	   162 	   141 		.ASCIZ	\Trap from\
	017625	   160 	   040 	   146
	017630	   162 	   157 	   155
	017633	   000
   4072						.EVEN
   4073	017634	011600 				MOV	(SP),R0			;GET PC OF NEXT INST
   4074	017636	162700 	000002 			SUB	#2,R0			;MAKE PC WITHIN BAD INST
   4075	017642	004737 	020564'			JSR	PC,CKTBOC		;PRINT THE PC WHERE WE WERE DID IN
   4076	017646					CK11SC	<CKENCL!CKEFAT>,< to Adr 4>,<ILLEGAL BUS TRAP>,<S..NXM>
	017646	012737 	000001 	020470'	.IIF NB,S..NXM,	MOV	#S..NXM,CKSPCD	;VALUE TO DISPLAY IN R0,
	017654	104445 				TRAP	CKENCL!CKEFAT!CKEMSG		;ILLEGAL BUS TRAP
   4077	017656	   040 	   164 	   157 		.ASCIZ	\ to Adr 4\
	017661	   040 	   101 	   144
	017664	   162 	   040 	   064
	017667	   000
   4078						.EVEN
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 93
CK11SC ROUTINE

   4080					.SBTTL		CK11SC ROUTINE
   4081
   4082					;HERE ON ERROR IN CHK11
   4083					;
   4084					;AT HALT TIME R0 CONTAINS ADDRESS OF TRAP
   4085					;
   4086	017670				CHKERR:					;here on error trap
   4087	017670	013746 	000004 			MOV	NXMVEC,-(SP)		;save NXM vector [3(47)]
   4088	017674	012737 	017734'	000004 		MOV	#2$,NXMVEC		;where to go if MM doesn't exist [3(47)]
   4089	017702	042737 	000002 	011310'		BIC	#CHKMMO,CHKFLG		;clear indicator [3(47)]
   4090	017710	032737 	000001 	177572 		BIT	#1,MM.SR0		;see if memory management on [3(47)]
   4091	017716	001403 				BEQ	3$			;skip if not [3(47)]
   4092	017720	052737 	000002 	011310'		BIS	#CHKMMO,CHKFLG		;remember it [3(47)]
   4093	017726	005037 	177572 		3$:	CLR	MM.SR0			;turn it off [3(47)]
   4094	017732	000402 				BR	4$			;continue [3(47)]
   4095	017734	062706 	000004 		2$:	ADD	#4,SP			;adjust stack [3(47)]
   4096	017740	012637 	000004 		4$:	MOV	(SP)+,NXMVEC		;restore previous state [3(47)]
   4097	017744	010046 				MOV	R0,-(SP)
   4098	017746	016646 	000002 			MOV	2(SP),-(SP)		;GET ADDRESS OF
   4099	017752	162716 	000002 			SUB	#2,(SP)			; THE TRAP INSTRUCTION.
   4100	017756	032776 	000010 	000000 		BIT	#CKEDID,@(SP)		;PRINT DEVICE ID+REG MSG
   4101	017764	001405 				BEQ	11$			;BRANCH IF NOT
   4102	017766	052737 	000001 	011310'		BIS	#CKFERR,CHKFLG		;REMEMBER WE HAD AN ERROR
   4103	017774	004737 	014156'			JSR	PC,CKDIDT		;
   4104	020000	032776 	000002 	000000 	11$:	BIT	#CKEPC,@(SP)		;TYPE PC MESSAGE?
   4105	020006	001423 				BEQ	12$			;NO, SEE IF SOMETHING ELSE
   4106	020010					CK11SC	0,<	 Error detected at PC>	;
	020010	104404 				TRAP	0!CKEMSG		;
   4107	020012	   011 	   040 	   105 		.ASCIZ	\	 Error detected at PC\
	020015	   162 	   162 	   157
	020020	   162 	   040 	   144
	020023	   145 	   164 	   145
	020026	   143 	   164 	   145
	020031	   144 	   040 	   141
	020034	   164 	   040 	   120
	020037	   103 	   000
   4108						.EVEN
   4109	020042	052737 	000001 	011310'		BIS	#CKFERR,CHKFLG		;REMEMBER WE HAD AN ERROR
   4110	020050	011600 				MOV	(SP),R0			;GET ADDRESS
   4111	020052	004737 	020564'			JSR	PC,CKTBOC		;PRINT SPACE AND ADDRESS
   4112	020056	032776 	000004 	000000 	12$:	BIT	#CKEMSG,@(SP)		;PRINT INLINE ERROR MESSAGE
   4113	020064	001423 				BEQ	15$			;BRANCH IF NO
   4114	020066	032776 	000040 	000000 		BIT	#CKENCL,@(SP)		;SEE IF NO CRLF
   4115	020074	001002 				BNE	13$			;BRANCH IF NO CRLF
   4116	020076	004737 	020540'			JSR	PC,CKCRLF		;CR+LF
   4117	020102	032776 	000110 	000000 	13$:	BIT	#CKEDID!CKEGB,@(SP)	;IF DEV ID OR GD BD GIVE SPACES FOR FORMAT
   4118	020110	001403 				BEQ	14$			;
   4119	020112					CK11SC	CKENCL,<		>
	020112	104444 				TRAP	CKENCL!CKEMSG		;
   4120	020114	   011 	   011 	   000 		.ASCIZ	\		\
   4121						.EVEN
   4122	020120	016600 	000004 		14$:	MOV	4(SP),R0			;GET ADDRESS OF MESSAGE
   4123	020124	004737 	020512'			JSR	PC,CKTTXT		;RETURN R0 POINTS TO LOC
   4124										; FOLLOWING MESSAGE
   4125	020130	010066 	000004 			MOV	R0,4(SP)			;PUT RETURN PC ON STACK
   4126	020134	032776 	000020 	000000 	15$:	BIT	#CKEMSE,@(SP)		;PRINT MSG AT END
   4127	020142	001424 				BEQ	18$			;BRANCH IF NOT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 93-1
CK11SC ROUTINE

   4128	020144	032776 	000040 	000000 		BIT	#CKENCL,@(SP)		;SEE IF NO CRLF
   4129	020152	001002 				BNE	16$			;BRANCH IF NO CRLF
   4130	020154	004737 	020540'			JSR	PC,CKCRLF		;CR+LF
   4131	020160	032776 	000110 	000000 	16$:	BIT	#CKEDID!CKEGB,@(SP)	;SEE IF CKEDID OR CKEGB SET, IF SO GIVE SPACES FOR FORMAT
   4132	020166	001403 				BEQ	17$			;BRANCH IF JUST TEXT
   4133	020170					CK11SC	CKENCL,<		>	;2 TAB
	020170	104444 				TRAP	CKENCL!CKEMSG		;
   4134	020172	   011 	   011 	   000 		.ASCIZ	\		\
   4135						.EVEN
   4136	020176	017600 	000004 		17$:	MOV	@4(SP),R0		;GET ADDRESS OF THE MESSAGE
   4137	020202	004737 	020512'			JSR	PC,CKTTXT		;PRINT THE MESSAGE
   4138	020206	062766 	000002 	000004 		ADD	#2,4(SP)			;MAKE RETURN PC
   4139	020214	032776 	000100 	000000 	18$:	BIT	#CKEGB,@(SP)		;SEE IF GOOD BAD PRINT OUT
   4140	020222	001450 				BEQ	CHKER0			;BRANCH IF NOT THIS
   4141	020224					CK11SC	0,<		Adr/Reg =>
	020224	104404 				TRAP	0!CKEMSG		;
   4142	020226	   011 	   011 	   101 		.ASCIZ	\		Adr/Reg =\
	020231	   144 	   162 	   057
	020234	   122 	   145 	   147
	020237	   040 	   075 	   000
   4143						.EVEN
   4144	020242	016600 	000010 			MOV	10(SP),R0		;GET ADR OFF THE STACK
   4145	020246				20$:					; [3(47)]
   4146	020246	004737 	020564'			JSR	PC,CKTBOC		;PRINT ADR
   4147	020252				25$:					;%
   4148	020252					CK11SC	<CKENCL>,<  GD =>
	020252	104444 				TRAP	CKENCL!CKEMSG		;
   4149	020254	   040 	   040 	   107 		.ASCIZ	\  GD =\
	020257	   104 	   040 	   075
	020262	   000
   4150						.EVEN
   4151	020264	016600 	000014 			MOV	14(SP),R0		;GET "GOOD"
   4152	020270	004737 	020564'			JSR	PC,CKTBOC		;PRINT IT
   4153	020274					CK11SC	<CKENCL>,<  BD =>
	020274	104444 				TRAP	CKENCL!CKEMSG		;
   4154	020276	   040 	   040 	   102 		.ASCIZ	\  BD =\
	020301	   104 	   040 	   075
	020304	   000
   4155						.EVEN
   4156	020306	016600 	000012 			MOV	12(SP),R0		;PRINT BAD STUFF
   4157	020312	004737 	020564'			JSR	PC,CKTBOC		;PRINT BAD
   4158	020316					CK11SC	CKENCL,<  XOR =>
	020316	104444 				TRAP	CKENCL!CKEMSG		;
   4159	020320	   040 	   040 	   130 		.ASCIZ	\  XOR =\
	020323	   117 	   122 	   040
	020326	   075 	   000
   4160						.EVEN
   4161	020330	016646 	000014 			MOV	14(SP),-(SP)		;GET GOOD
   4162	020334	074016 				XOR	R0,(SP)			;LEAVE ONLY QUESTIONABLE BITS
   4163	020336	012600 				MOV	(SP)+,R0			;PRINT THEM
   4164	020340	004737 	020564'			JSR	PC,CKTBOC		;
   4165	020344	032776 	000001 	000000 	CHKER0:	BIT	#CKEFAT,@(SP)		;FATAL ERROR - HALT REQUIRED?
   4166	020352	001423 				BEQ	CHKER2			;BRANCH IN NOT FATAL
   4167	020354	052737 	000001 	011310'		BIS	#CKFERR,CHKFLG		;REMEMBER WE HAD AN ERROR
   4168	020362					CK11SC	0,<		Fatal Error>
	020362	104404 				TRAP	0!CKEMSG		;
   4169	020364	   011 	   011 	   106 		.ASCIZ	\		Fatal Error\
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 93-2
CK11SC ROUTINE

	020367	   141 	   164 	   141
	020372	   154 	   040 	   105
	020375	   162 	   162 	   157
	020400	   162 	   000
   4170						.EVEN
   4171	020402	013700 	020470'			MOV	CKSPCD,R0		;PUT STOPCODE IN R0, IF 0 ITS NOT A STOPCODE TO BE DISPLAYED
   4172	020406	001401 				BEQ	CHKER3			;IF 0
   4173	020410	000000 				HALT				;STOP CODE IN R0, PRESS CONTINUE
   4174										; GIVES ADR WE CAME FROM
   4175	020412	012600 			CHKER3:	MOV	(SP)+,R0			;ADDRESS OF TRAP IN R0
   4176	020414	000000 				HALT				;FATAL ERROR - R0 CONTAINS ERROR ADDRESS
   4177	020416	000137 	003000'			JMP	BEGIN			;IF CONTINUE DO PROGRAM AGAIN.
   4178	020422	032736 	000100 		CHKER2:	BIT	#CKEGB,@(SP)+		;SEE IF THERE WAS A GD-BD PRINT
   4179	020426	001002 				BNE	CHKER1			;IF YES, CLEAR STACK
   4180	020430	012600 				MOV	(SP)+,R0
   4181	020432	000406 				BR	CHKER9			;go exit [3(47)]
   4182	020434	012600 			CHKER1:	MOV	(SP)+,R0
   4183	020436	012666 	000004 			MOV	(SP)+,4(SP)		;PC
   4184	020442	012666 	000004 			MOV	(SP)+,4(SP)		;PS
   4185	020446	005726 				TST	(SP)+			;CLEAN THE STACK
   4186	020450				CHKER9:					;here to exit CHKERR [3(47)]
   4187	020450	032737 	000002 	011310'		BIT	#CHKMMO,CHKFLG		;was memory management on? [3(47)]
   4188	020456	001402 				BEQ	10$			;no, skip [3(47)]
   4189	020460	005237 	177572 			INC	MM.SR0			;yes, turn it back on [3(47)]
   4190	020464				10$:					;dismiss trap [3(47)]
   4191	020464	000002 				RTI				;return
   4192
   4193	020466	000000 			CHKX:	.WORD	0			;extension for address [3(47)]
   4194	020470	000000 			CKSPCD:	.WORD	0			;CONTAINS STOPCODE ON FATAL ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 94
CK11SC ROUTINE

   4196		000000 				CKDA=	0			;DEVICE ADDRESS OFFSET
   4197		000002 				CKDV=	2			;DEVICE VECTOR OFFSET
   4198		000004 				CKPI=	4			;DEVICE PI LEVEL OFFSET
   4199		000006 				CKFLG=	6			;DEVICE FLAGS OFFSET
   4200		000010 				CKSPC=	10			;SPECIAL CHAR OFFSET
   4201	020472				CHKCHR:	.BLKW	1			;DEVICE ADDRESS
   4202	020474					.BLKW	1			;DEVICE VECTOR
   4203	020476					.BLKW	1			;DEVICE PI LEVEL
   4204	020500					.BLKW	1			;DEVICE FLAGS
   4205										; B0-B5 = # OF DQ11 SPECIAL CHAR
   4206										; B15 = INTERRUPTED ON SYNC
   4207	020502					.BLKW	4			;SPECIAL CHARACTERS
   4208
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 95
CK11SC ROUTINE

   4210
   4211	020512					.CKTTS
	020512	010146 				MOV	R1,-(SP)
	020514	112001 			10$:	MOVB	(R0)+,R1		;GET THE NEXT CHARACTER
	020516	001403 				BEQ	20$			;BRANCH IF END (NULL)
	020520	004737 	020650'			JSR	PC,CKTCHR		;TYPE CHAR
	020524	000773 				BR	10$			;GET NEXT CHAR
	020526	005200 			20$:	INC	R0			;
	020530	042700 	000001 			BIC	#B0,R0			;POINT TO EVEN LOC
	020534	012601 				MOV	(SP)+,R1
	020536	000207 				RTS	PC			;RETURN TO CALLER
	020540	004037 	020556'		CKCRLF:	JSR	R0,CKTSTR
	020544	   015 	   012 	   000 		.ASCIZ	<15><12>
	020550	000207 				RTS	PC
	020552	004737 	020540'		CKTCRL:	JSR	PC,CKCRLF		;FIRST TYPE A CR/LF
	020556	004737 	020512'		CKTSTR:	JSR	PC,CKTTXT		;GO TYPE STRING
	020562	000200 				RTS	R0
	020564	010146 				MOV	R1,-(SP)
	020566	012701 	000040 			MOV	#040,R1
	020572	004737 	020650'			JSR	PC,CKTCHR
	020576	000401 				BR	CKTOC1
	020600	010146 				MOV	R1,-(SP)
	020602	010046 				MOV	R0,-(SP)
	020604	004737 	020614'			JSR	PC,CKTOC2
	020610	012600 				MOV	(SP)+,R0
	020612	000750 				BR	CKTRR1
	020614	010046 				MOV	R0,-(SP)
	020616	006000 				ROR	R0
	020620	006000 				ROR	R0
	020622	006000 				ROR	R0
	020624	042700 	160000 			BIC	#160000,R0
	020630	001402 				BEQ	20$
	020632	004737 	020614'			JSR	PC,CKTOC2
	020636	012601 				MOV	(SP)+,R1
	020640	042701 	177770 			BIC	#^C7,R1
	020644	052701 	000060 			BIS	#60,R1
	020650	120127 	000040 		CKTCHR:	CMPB	R1,#40			;DOES THIS NEED FILLER ?
	020654	103015 				BHIS	20$
	020656	120127 	000011 			CMPB	R1,#11			;IS CHAR A TAB (11)
	020662	001005 				BNE	10$			;BRANCH IF NOT A TAB
	020664	004037 	020556'			JSR	R0,CKTSTR		;GIVE SPACES FOR IT
	020670	   040 	   040 	   040 		.BYTE	40,40,40,0		;SUBSTITUTE SPACES FOR TAB
	020673	   000
	020674	000207 				RTS	PC
	020676	004737 	020702'		10$:	JSR	PC,12$			;TYPE CHAR FIRST THEN PAD IT WITH 4 NULLS
	020702	004737 	020710'		12$:	JSR	PC,20$
	020706	005001 				CLR	R1
	020710	110137 	177566 		20$:	MOVB	R1,CTOCHR		;TYPE CHAR
	020714	105737 	177564 		30$:	TSTB	CTOSTS			;TEST FOR STILL BUSY
	020720	100375 				BPL	30$
	020722	000207 				RTS	PC
	020724	005737 	177562 		CKGCHR:	TST	CTICHR			;CLEAR BUFFER
	020730	105737 	177560 		10$:	TSTB	CTISTS			;WAIT FOR CHAR
	020734	100375 				BPL	10$			;
	020736	113701 	177562 			MOVB	CTICHR,R1		;
	020742	042701 	177600 			BIC	#^C177,R1		;KEEP ONLY INTERESTING BITS
	020746	000740 				BR	CKTCHR			;TYPE IT BACK TO HIM
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 96
CK11SC ROUTINE

   4213	020750	   115 	   145 	   155 	CKMG01:	.ASCIZ	\Mem Err\
	020753	   040 	   105 	   162
	020756	   162 	   000
   4214	020760	   102 	   151 	   164 	CKMG02:	.ASCIZ	\Bit did not Clear\
	020763	   040 	   144 	   151
	020766	   144 	   040 	   156
	020771	   157 	   164 	   040
	020774	   103 	   154 	   145
	020777	   141 	   162 	   000
   4215	021002	   102 	   151 	   164 	CKMG03:	.ASCIZ	\Bit did not set\
	021005	   040 	   144 	   151
	021010	   144 	   040 	   156
	021013	   157 	   164 	   040
	021016	   163 	   145 	   164
	021021	   000
   4216	021022	   111 	   156 	   164 	CKMG04:	.ASCIZ	\Interrupt did not Occur\
	021025	   145 	   162 	   162
	021030	   165 	   160 	   164
	021033	   040 	   144 	   151
	021036	   144 	   040 	   156
	021041	   157 	   164 	   040
	021044	   117 	   143 	   143
	021047	   165 	   162 	   000
   4217	021052	   111 	   156 	   164 	CKMG05:	.ASCIZ	\Interrupted to Wrong Vector\
	021055	   145 	   162 	   162
	021060	   165 	   160 	   164
	021063	   145 	   144 	   040
	021066	   164 	   157 	   040
	021071	   127 	   162 	   157
	021074	   156 	   147 	   040
	021077	   126 	   145 	   143
	021102	   164 	   157 	   162
	021105	   000
   4218	021106	   156 	   157 	   164 	CKMG06:	.ASCIZ	\not found\
	021111	   040 	   146 	   157
	021114	   165 	   156 	   144
	021117	   000
   4219	021120	   151 	   156 	   164 	CKMG07:	.ASCIZ	\interrupted when not enabled\
	021123	   145 	   162 	   162
	021126	   165 	   160 	   164
	021131	   145 	   144 	   040
	021134	   167 	   150 	   145
	021137	   156 	   040 	   156
	021142	   157 	   164 	   040
	021145	   145 	   156 	   141
	021150	   142 	   154 	   145
	021153	   144 	   000
   4220
   4221						.EVEN
   4222	021156				CKBLK:	.BLKB	400			;Buffer for DH11 and DZ11 tests
   4223		021156'			CKDZTR=CKBLK				;address of receive expected character table for DZ11
   4224		021176'			CKDZTX=CKDZTR+20				;address of next char to transmit
   4225		021216'			CKDZTE=CKDZTX+20				;address of error table
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 97
CK11SC ROUTINE

   4227
   4228
   4229					.LIST ME
   4230
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98
END STATEMENT

   4232						.SBTTL	END STATEMENT
   4233		001170'				.END	SAVE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98-1
SYMBOL TABLE

ACFLAG  000057R  	B8    = 000400   	CKALP$= 012302R  	CKINTG  015044R  	CKTOC1  020602R
AC.ENA= 000200   	B9    = 001000   	CKAL2$= 012302R  	CKINTS  011536R  	CKTOC2  020614R
ALLRXF  005054R  	CDD   = 000020   	CKARD$= 012302R  	CKINT1  014450R  	CKTRR0  020610R
ALLRX1  005064R  	CD.CHK= 040000   	CKARH$= 012302R  	CKINT2  014454R  	CKTRR1  020534R
ALTDXF  000062R  	CD.DAT= 177162   	CKARX$= 012302R  	CKINT3  014462R  	CKTSTR  020556R
ATCBLK  001102R  	CD.DTE= 004000   	CKATC$= 012302R  	CKINT6  014742R  	CKTTXT  020512R
BC.HDS= ****** GX	CD.DTL= 002000   	CKATE$= 012302R  	CKINT7  015026R  	CKZZZX= 000015
BEGIN = 003000R  	CD.EOF= 020000   	CKBLK   021156R  	CKKL$$= 016406R  	CK.CAL  011474R
BITTBL= ****** GX	CD.ERR= 100000   	CKBUST  017620R  	CKKL11  016406R  	CLKENB= 000100
BIT0  = 000001   	CD.GO = 000001   	CKCADD= 000034   	CKLP$$= 017232R  	CLKLVL= 000006
BIT1  = 000002   	CD.HEM= 000004   	CKCDEV  010566R  	CKLP11  017232R  	CLKVEC= 000100
BIT10 = 002000   	CD.INE= 000100   	CKCD$$= 017122R  	CKL2$$= 017326R  	CLKWRD= 177546
BIT11 = 004000   	CD.LVL= 000006   	CKCD11  017122R  	CKL211  017326R  	CMDCLN= 000024
BIT12 = 010000   	CD.NXM= 001000   	CKCD20  017204R  	CKL220  017424R  	CMDCLR  000040R
BIT13 = 020000   	CD.OFL= 010000   	CKCEND  011306R  	CKMG01  020750R  	CMDONE  001574R
BIT14 = 040000   	CD.ONL= 000010   	CKCLK9  012774R  	CKMG02  020760R  	CNUPE = 000002
BIT15 = 100000   	CD.PAK= 000002   	CKCOR   012100R  	CKMG03  021002R  	CO.INE= 000100
BIT2  = 000004   	CD.PWR= 000400   	CKCRLF  020540R  	CKMG04  021022R  	CO..MM= 000004
BIT3  = 000010   	CD.RDY= 000200   	CKDA  = 000000   	CKMG05  021052R  	CS.EXP= 177670
BIT4  = 000020   	CD.STS= 177160   	CKDEVN  011312R  	CKMG06  021106R  	CTICHR= 177562
BIT5  = 000040   	CD.VEC= 000230   	CKDHPL  016302R  	CKMG07  021120R  	CTILVL= 000004
BIT6  = 000100   	CD.XAD= 000060   	CKDH$$= 015256R  	CKMPAR  012304R  	CTISTS= 177560
BIT7  = 000200   	CD0DAT= 177162   	CKDH1A  015454R  	CKNCD1  011334R  	CTIVEC= 000060
BIT8  = 000400   	CD0STS= 177160   	CKDH1B  015514R  	CKNCI1  011320R  	CTOCHR= 177566
BIT9  = 001000   	CHKBIT  014034R  	CKDH1C  016026R  	CKNCO1  011326R  	CTOLVL= 000004
BPARER= 000020   	CHKBRD  011756R  	CKDH1D  016270R  	CKNDH1  011341R  	CTOSTS= 177564
BP.CLN= 074000   	CHKCHR  020472R  	CKDH1E  015564R  	CKNDL1  011377R  	CTOVEC= 000064
BP.CSP= 000170   	CHKCLK  012550R  	CKDH1F  016326R  	CKNDM1  011406R  	CTYBFL= 000120
BP.ERR= 100000   	CHKCOR  012050R  	CKDH11  015256R  	CKNKL1  011346R  	CTYBUF  000230R
BP.LD0= 000002   	CHKDEV  013164R  	CKDIDT  014156R  	CKNKW1  011424R  	CTYLUN= 000001
BP.LD1= 000004   	CHKDV1  013432R  	CKDL$$= 016342R  	CKNLP1  011433R  	CTYPTR= ****** GX
BP.RP4= 000200   	CHKD01  013772R  	CKDL11  016342R  	CKNL21  011440R  	CYCLS = 000002
BP.SWR= 000001   	CHKD02  013736R  	CKDMCS  016552R  	CKNMM1  011445R  	DATE  = 000004
BP.UNT= 003400   	CHKERR  017670R  	CKDM$$= 016456R  	CKNRD1  011361R  	DCOMST= 000001
BR0   = 000000   	CHKER0  020344R  	CKDM11  016456R  	CKNRH1  011455R  	DEFLAG  000061R
BR1   = 000040   	CHKER1  020434R  	CKDNAM  011314R  	CKNRX1  011467R  	DEP   = 010000
BR2   = 000100   	CHKER2  020422R  	CKDONE  003000R  	CKNTC1  011462R  	DEVCHK  001656R
BR3   = 000140   	CHKER3  020412R  	CKDV  = 000002   	CKNTE1  011416R  	DEVMNT  002002R
BR4   = 000200   	CHKER9  020450R  	CKDZTE= 021216R  	CKPI  = 000004   	DEVNAM  000042R
BR5   = 000240   	CHKFLD  015254R  	CKDZTR= 021156R  	CKPOPJ  012302R  	DEVOK   001734R
BR6   = 000300   	CHKFLG  011310R  	CKDZTX= 021176R  	CKRD$$= 016342R  	DEVUNT  000044R
BR7   = 000340   	CHKFLV  015252R  	CKEDID= 000010   	CKRD11  016342R  	DEX   = 000400
B.DM11= 170500   	CHKINL  014312R  	CKEFAT= 000001   	CKRH$$= 017456R  	DEXDON= 000004
B0    = 000001   	CHKINT  015064R  	CKEGB = 000100   	CKRH11  017456R  	DEXWD1= 174406
B1    = 000002   	CHKITL= 000012   	CKEMSE= 000020   	CKRX$$= 017552R  	DEXWD2= 174404
B10   = 002000   	CHKMMO= 000002   	CKEMSG= 000004   	CKRX11  017552R  	DEXWD3= 174402
B11   = 004000   	CHKTIM  012772R  	CKENCL= 000040   	CKRX20  017606R  	DFUNC = 000200
B12   = 010000   	CHKX    020466R  	CKEPC = 000002   	CKSPC = 000010   	DF.DMG= 000004
B13   = 020000   	CHK.11  011476RG 	CKEWRN= 000200   	CKSPCD  020470R  	DF.DMN= 000007
B14   = 040000   	CHK.96  013140RG 	CKFERR= 000001   	CKTBOC  020564R  	DF.DOR= 000001
B15   = 100000   	CHNPNT= 000001   	CKFIDT= 100000   	CKTCHR  020650R  	DF.EHG= 000010
B2    = 000004   	CI.INE= 000100   	CKFLAG  015062R  	CKTCRL  020552R  	DF.EHM= 000011
B3    = 000010   	CKACD$= 012302R  	CKFLG = 000006   	CKTC$$= 017460R  	DF.EMG= 000005
B4    = 000020   	CKADH$= 012302R  	CKGCHR  020724R  	CKTC11  017460R  	DF.EMN= 000006
B5    = 000040   	CKADL$= 012302R  	CKINT   014430R  	CKTE$$= 016672R  	DF.KLR= 000012
B6    = 000100   	CKADM$= 012302R  	CKINTE  015036R  	CKTE11  016672R  	DF.KLW= 000013
B7    = 000200   	CKAKL$= 012302R  	CKINTF  015052R  	CKTOCT  020600R  	DF.KLX= 000014
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98-2
SYMBOL TABLE

DF.OFF= 000002   	DL.BRK= 000001   	DRVAD2= 000014   	ERR11C= 000001   	IE.ABO= 177761
DF.ON = 000003   	DL.CAR= 010000   	DRVBOT= 000004   	ERR11S= 000002   	IE.ACT= 177771
DF.PDP= 000016   	DL.CTS= 020000   	DRVBTP= 000016   	EV.PF = ****** GX	IE.ADP= 177636
DF.PEX= 000015   	DL.DIE= 000040   	DRVMSZ= 000010   	EXFLAG  000050R  	IE.ALN= 177736
DGUTS = 000000   	DL.DSC= 100000   	DRVNAM= 000000   	EXIT    005732R  	IE.AST= 177660
DHBASE= 160020   	DL.DTR= 000002   	DRVSET= 000002   	EXITA   001526R  	IE.BAD= 177777
DHDATA  016336R  	DL.ERR= 100000   	DRVSIZ= 000020   	EXIT00  005720R  	IE.BBE= 177710
DHEXPA= 160020   	DL.LVL= 000004   	DRVTAB  007042R  	EX.AC1= 000001   	IE.BDI= 177714
DHEXPZ= 000020   	DL.OVR= 040000   	DRVTBZ= 000060   	EX.ENA= 000200   	IE.BDR= 177716
DHRFER= 020000   	DL.RGO= 004000   	DRVWRT= 000006   	EX.FCO= 000004   	IE.BDV= 177711
DHROVR= 040000   	DL.RIE= 000100   	DR.DTE= 000011   	E.FLOG= 000004   	IE.BHD= 177700
DHSTAB  001124R  	DL.RNG= 040000   	DSEND = 000004   	E.FQIO= 000001   	IE.BLK= 177754
DHTBL = ****** GX	DL.ROK= 000200   	DSKADR  000004R  	E.FTMO= 000002   	IE.BNM= 177712
DHXMII  016340R  	DL.RTS= 000004   	DSKLUN= 000002   	FIDBLK  001076R  	IE.BTF= 177675
DH.AEE= 100000   	DL.XIE= 000100   	DSKSIZ  000010R  	FILCHK  002252R  	IE.BTP= 177725
DH.BAR= 000012   	DL.XOK= 000200   	DS04  = 004000   	FILDMO  002332R  	IE.BVR= 177701
DH.BCR= 000010   	DL..FE= 020000   	DS05  = 002000   	FILDMX  002464R  	IE.BYT= 177755
DH.BRK= 000014   	DL..MM= 000004   	DS06  = 001000   	FILDM1  002350R  	IE.CKP= 177766
DH.CAR= 000006   	DL..PE= 010000   	DTCL11= 002000   	FILDM2  002414R  	IE.CKS= 177742
DH.CL5= 000000   	DL..RC= 000377   	DTECHK  003752R  	FILDM3  002436R  	IE.CLO= 177732
DH.CL6= 000001   	DL..RE= 000001   	DTECMD= 000451   	FILDM4  002454R  	IE.CON= 177752
DH.CL7= 000002   	DL..XC= 000377   	DTEFLG= 000444   	FILFND  002060R  	IE.DAA= 177770
DH.CL8= 000003   	DL.2RC= 002000   	DTEF11= 000450   	FILMNT  006732R  	IE.DAO= 177763
DH.CNX= 000400   	DL.2XM= 000010   	DTEMSG  004266R  	FILOK   002312R  	IE.DFU= 177750
DH.DOV= 040000   	DMBASE= 170500   	DTEMTD= 000455   	FILQIO  006746R  	IE.DNA= 177771
DH.LPR= 000004   	DMEXPA= 170500   	DTEMTI= 000456   	FILSET  002322R  	IE.DNR= 177775
DH.LVL= 000005   	DMFLAG  000052R  	DTEXPA= 174400   	FINDEV  006654R  	IE.DUN= 177767
DH.NRC= 000002   	DMOERR  002426R  	DTEXPZ= 000040   	FLOATD= 160000   	IE.DUP= 177707
DH.NXM= 002000   	DMTBL = ****** GX	DTINOF= 000010   	FLOATV= 000300   	IE.EBX= 177776
DH.PEN= 000020   	DMTBLK  001116R  	DTINON= 000040   	FNDACP  006712R  	IE.EOF= 177766
DH.RIE= 000100   	DM.ALI= 000017   	DTPMSG  004312R  	FORPRO= 000020   	IE.EOT= 177702
DH.SIE= 010000   	DM.BSY= 000020   	DTPMS1  004330R  	FTASRT= 000001   	IE.EOV= 177765
DH.SSR= 000016   	DM.CAR= 000100   	DTRSMD= 000010   	FTECHO= 000000   	IE.EXP= 177676
DH.TIE= 020000   	DM.CTS= 000040   	DTSTAT= 000034   	FTETR = 000000   	IE.FEX= 177717
DH.VDP= 100000   	DM.DNE= 000200   	DTVECA= 000774   	FTGLOM= 000000   	IE.FHE= 177705
DH..FE= 020000   	DM.DTR= 000002   	DT11DB= 004000   	FT.CHK= 000001   	IE.FOP= 177713
DH..HD= 040000   	DM.ENB= 000040   	DUPE  = 000020   	FT.DDT= 000000   	IE.HFU= 177744
DH..MC= 004000   	DM.IEN= 000100   	DURE  = 000004   	FT.D75= 000000   	IE.HWR= 177772
DH..MM= 001000   	DM.INI= 002000   	DV.LOG= ****** GX	FT.HLP= 000001   	IE.IDU= 177644
DH..OP= 000040   	DM.LE = 000001   	DXWRD1= 002000   	GETNAM  005764R  	IE.IEF= 177637
DH..PE= 010000   	DM.LVL= 000004   	D.CCTY= ****** GX	GETNB   005742R  	IE.IFC= 177776
DH..RI= 000200   	DM.RNG= 000200   	D.CKLN= ****** GX	GETNUM  006030R  	IE.IFU= 177747
DH..SI= 040000   	DM.RTS= 000004   	D1011 = 000040   	GTIMBF  000020R  	IE.ILL= 177726
DH..TI= 100000   	DM.SCN= 004000   	EBSEL = 000100   	G.TICP= 000016   	IE.ILU= 177640
DH.2SB= 000004   	DM.SR = 000020   	EBUSPC= 000020   	G.TICT= 000014   	IE.INS= 177776
DIAG1 = 174430   	DM.ST = 000010   	EBUSPS= 000004   	G.TIDA= 000004   	IE.IPR= 177641
DIAG2 = 174432   	DM.STP= 000400   	EDONES= 040000   	G.TIHR= 000006   	IE.ISQ= 177703
DIAG3 = 174436   	DM..MM= 001000   	EF.PR1= ****** GX	G.TIMI= 000010   	IE.ITI= 177643
DIKL10= 000010   	DNSERR  001642R  	EF.PR2= ****** GX	G.TIMO= 000002   	IE.ITS= 177770
DLDADR= 175610   	DON10C= 040000   	EF.QIO= 000001   	G.TISC= 000012   	IE.LCK= 177745
DLDSIZ= 000010   	DON10S= 100000   	EF.RKP= ****** GX	G.TIYR= 000000   	IE.LNL= 177646
DLRBUF= 000002   	DON11C= 000100   	EF.TMO= 000002   	HBCERR  004764R  	IE.MBK= 177721
DLRSTS= 000000   	DON11S= 000200   	EPTR  = 000000   	HIBYTE= 177400   	IE.MOD= 177753
DLTBL = ****** GX	DPS4  = 040000   	ERRINT= 000004   	HOMBUF  000064R  	IE.NBF= 177731
DLXBUF= 000006   	DRESET= 000100   	ERRMSG  001447R     002	HOMFE0= 000061   	IE.NBK= 177727
DLXSTS= 000004   	DRVADR  000002R  	ERR10C= 010000   	HOMFE1= 000062   	IE.NFI= 177704
DLYCNT= 174400   	DRVAD1= 000012   	ERR10S= 020000   	HOMNAM= 000000   	IE.NLN= 177733
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98-3
SYMBOL TABLE

IE.NNC= 177674   	IO.ENA= 006000   	IO.STP= 016400   	L2.BCM= 007777   	MNTSY1  004406R
IE.NOD= 177751   	IO.EOF= 003000   	IO.SYN= 003040   	L2.DB = 000377   	MNTSY2  004476R
IE.NSF= 177746   	IO.ESA= 002500   	IO.TRM= 002410   	L2.DEL= 002000   	MODTBL  001532R
IE.OFL= 177677   	IO.EXT= 011400   	IO.UNL= 000042   	L2.DH = 002000   	MODTLN= 000006
IE.ONP= 177773   	IO.FDX= 003020   	IO.WAT= 013400   	L2.DL = 000010   	MOFLAG  000051R
IE.OVR= 177756   	IO.FNA= 004400   	IO.WLB= 000400   	L2.DNR= 000100   	MONTAB  006516R
IE.PRI= 177760   	IO.HDX= 003010   	IO.WLS= 000410   	L2.DON= 000200   	MOUNTD  002050R
IE.RAC= 177724   	IO.HIS= 015000   	IO.WLV= 000500   	L2.DR = 010000   	MPE11 = 001000
IE.RAT= 177723   	IO.INL= 002400   	IO.WVB= 011000   	L2.DTE= 000002   	MP.ENB= 000001
IE.RBG= 177730   	IO.ITI= 017000   	IO.XMT= 014400   	L2.ENB= 000100   	MP.ERR= 100000
IE.RCN= 177722   	IO.KIL= 000012   	IO.XNA= 014410   	L2.ERE= 001000   	MP.LVL= 000007
IE.RER= 177740   	IO.LED= 012000   	IQ.Q  = 000002   	L2.ERR= 100000   	MP.REG= 172100
IE.RNM= 177715   	IO.LOV= 001010   	IQ.X  = 000001   	L2.GER= 000001   	MP.VEC= 000114
IE.RSU= 177757   	IO.LTK= 000050   	IS.BV = 000005   	L2.GO = 000001   	MP.WWP= 000004
IE.SDP= 177635   	IO.MCS= 013400   	IS.CLR= 000000   	L2.INI= 000400   	NONDEV  014000R
IE.SNC= 177735   	IO.MDA= 016000   	IS.CR = 006401   	L2.INT= 004000   	NOTRXF  005012R
IE.SPC= 177772   	IO.MDI= 014400   	IS.ESC= 015401   	L2.LDP= 010000   	NULSTP= 000040
IE.SQC= 177734   	IO.MDO= 015400   	IS.PND= 000000   	L2.LPE= 000040   	NUPE  = 000002
IE.SRE= 177762   	IO.MLO= 006000   	IS.RDD= 000002   	L2.LVL= 000004   	NXMVEC= 000004
IE.STK= 177706   	IO.MOD= 003000   	IS.SET= 000002   	L2.MPE= 000020   	OB0   = 000001
IE.ULN= 177773   	IO.MSO= 005000   	IS.SUC= 000001   	L2.MST= 000004   	OB1   = 000002
IE.UPN= 177777   	IO.RAL= 001010   	KBS0  = ****** GX	L2.ONL= 004000   	OB10  = 000400
IE.VER= 177774   	IO.RAT= 013000   	KBS1  = ****** GX	L2.OVF= 004000   	OB11  = 001000
IE.WAC= 177743   	IO.RBC= 003000   	KLANXM  005576R  	L2.PCM= 007777   	OB12  = 002000
IE.WAT= 177741   	IO.RCI= 015000   	KLAREM  005460R  	L2.PEN= 000002   	OB13  = 004000
IE.WER= 177737   	IO.RCV= 015000   	KLAUSR  005450R  	L2.PI = 000400   	OB14  = 010000
IE.WLK= 177764   	IO.RDB= 001200   	KLINIT  001120R  	L2.PNR= 020000   	OB15  = 020000
IE.2DV= 177720   	IO.RDN= 000022   	KLNPTR= ****** GX	L2.POL= 000200   	OB16  = 040000
IFLOP = 100000   	IO.REL= 013400   	KLPWRF= 000010   	L2.PZE= 040000   	OB17  = 100000
INTROF= 000010   	IO.RHD= 001010   	KL.CFM= ****** GX	L2.RDB= 007777   	OB2   = 000004
INTRON= 000040   	IO.RLB= 001000   	KL.DEF= ****** GX	L2.RPB= 010000   	OB3   = 000010
INTSON= 000001   	IO.RLV= 001100   	KL.LCA= ****** GX	L2.RPE= 000010   	OB4   = 000020
INT10S= 000400   	IO.RNA= 005400   	KL.LRM= ****** GX	L2.SPR= 040000   	OB5   = 000040
INT11C= 002000   	IO.RNC= 001004   	KL.LVB= ****** GX	L2.TB0= 000400   	OB6   = 000100
INT11S= 004000   	IO.RNE= 001020   	KL.LVL= 000004   	L2.TB1= 001000   	OB7   = 000200
IO.ACE= 007400   	IO.RTC= 003400   	KL.VBN= ****** GX	L2.TB2= 002000   	PASS  = 000002
IO.ACR= 006400   	IO.RTI= 016400   	KPAR0 = 172340   	L2.TM = 000004   	PDP11 = 000040
IO.ACW= 007000   	IO.RTK= 000060   	KW.INE= 000100   	L2.TRN= 001000   	PERCLR= 001000
IO.ADS= 014000   	IO.RVB= 010400   	KW.TIC= 000200   	L2.UCD= 020000   	PHYLIM  011316R
IO.APC= 014000   	IO.RWD= 002400   	K.LRBA= ****** GX	L2.VD = 100000   	PHYS  = 100000
IO.APV= 014010   	IO.RWU= 002540   	LKS   = 177546   	L2.VEC= 000754   	PIDENT= 000000
IO.ATT= 001400   	IO.R1C= 002400   	LOAD11= 000004   	L20ADR= 000004   	PRI7  = 000340
IO.CCI= 014000   	IO.SAO= 004000   	LOGBUF  001070R  	L20BCT= 000006   	PRNRUN  005564R
IO.CCT= 002460   	IO.SCS= 013000   	LOWCOR  000064R  	L20BUF= 000014   	PROPNT= 000021
IO.CLN= 003400   	IO.SDI= 013000   	LP.DAT= 177516   	L20CHK= 000017   	PROTBL= ****** GX
IO.CON= 015400   	IO.SDO= 012400   	LP.DNE= 000200   	L20COL= 000015   	PRTOFF= 004000
IO.CRC= 001020   	IO.SEC= 002520   	LP.ERR= 100000   	L20CRA= 000000   	PR0   = 000000
IO.CRE= 012000   	IO.SEM= 002440   	LP.INE= 000100   	L20CRB= 000002   	PR1   = 000040
IO.CTI= 015400   	IO.SHT= 002410   	LP.LVL= 000004   	L20PCT= 000010   	PR2   = 000100
IO.CTL= 016400   	IO.SLO= 005400   	LP.STS= 177514   	L20PDA= 000016   	PR3   = 000140
IO.DAC= 010000   	IO.SMO= 002560   	LP.VEC= 000200   	L20RAM= 000012   	PR4   = 000200
IO.DCI= 014400   	IO.SNM= 002450   	LP0DAT= 177516   	L20STS= 175400   	PR5   = 000240
IO.DCT= 002470   	IO.SPB= 002420   	LP0STS= 177514   	L21STS= 175420   	PR6   = 000300
IO.DEL= 012400   	IO.SPF= 002440   	LP1DAT= 177522   	MEMSIZ  000014R  	PR7   = 000340
IO.DET= 002000   	IO.SSO= 004400   	LP1STS= 177520   	MM.SR0= 177572   	PS    = 177776
IO.DIS= 016000   	IO.SST= 002430   	L2.A16= 000020   	MNTBLK  001110R  	PSWW1 = 000005
IO.DTI= 016000   	IO.STC= 002500   	L2.A17= 000040   	MNTSY   004364R  	PSWW10= 000014
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98-4
SYMBOL TABLE

PSWW11= 000015   	RPFM22= 010000   	SETDL   003162R  	TCUNIT= 003400   	TE.DG1= 000030
PSWW12= 000016   	RPFUNC= 000076   	SETDM   003320R  	TCWC  = 177344   	TE.DG2= 000032
PSWW13= 000017   	RPGO  = 000001   	SETFIL  002060R  	TCWERR  010562R  	TE.DG3= 000036
PSWW2 = 000006   	RPMCPE= 020000   	SETRXF  004774R  	TCWNXT  010522R  	TE.DYC= 000000
PSWW3 = 000007   	RPMOL = 010000   	SF.FX = ****** GX	TCWRIT= 000014   	TE.EAD= 000022
PSWW4 = 000010   	RPNOOP= 000000   	SOMRXF  005106R  	TCWRT   010370R  	TE.EBC= 000016
PSWW5 = 000011   	RPOF  = 176732   	SPSAVE  000000RG 	TC.A16= 000020   	TE.EDT= 000026
PSWW6 = 000012   	RPPGM = 001000   	STAT  = 174434   	TC.A17= 000040   	TE.LVL= 000006
PSWW7 = 000013   	RPPRST= 000020   	STATUS= 000022   	TC.BAR= 177346   	TE.NNN= 000004
PS.PUS= 030000   	RPRDY = 000200   	STKLEN= 000200   	TC.CLK= 000100   	TE.STW= 000034
PS.REG= 004000   	RPREAD= 000070   	STSW0 = ****** GX	TC.CMD= 177342   	TE.VEC= 000774
PS.USR= 140000   	RPSET   007614R  	STSW1 = ****** GX	TC.DAT= 177350   	TE.XAD= 000020
PUDADR  000040R  	RPTRE = 040000   	SWR   = 177570   	TC.DT0= 000020   	TE.XA1= 000010
PUDIDX  000045R  	RPUNIT= 000007   	SWSLLT= 100000   	TC.DT1= 000010   	TE.XA2= 000012
PULSE = 000020   	RPWC  = 176702   	SXBTHM= 105755   	TC.DT2= 000004   	TE.XBC= 000014
QEFLAG  000056R  	RPWNXT  010100R  	SYMNTD  004516R  	TC.D16= 000001   	TE.XDT= 000024
QIOSTS  001064R  	RPWRIT= 000060   	SYMNT1  004526R  	TC.D17= 000002   	TE.XW1= 000006
QSIZE = 000023   	RPWRT   010020R  	SYNERR  001562R  	TC.ERR= 100000   	TE.XW2= 000004
Q.DA  = ****** GX	RP4CHK  003530R  	SYSAVE  002476R  	TC.ILO= 010000   	TE.XW3= 000002
Q.SZ  = ****** GX	RP6CHK  003574R  	SYSAV1  002530R  	TC.INE= 000100   	TOBM  = 000004
RADIX   000016R  	RQSKLR  005112R  	SYSMSG  004350R  	TC.LVL= 000006   	TOD   = 000003
RAMIS0= 010000   	RQSTSK  005606R  	SYSTRT  004222R  	TC.MMT= 000040   	TOIP  = 000002
RD.LVL= 000004   	RXBAD1  007170R  	S.DI  = ****** GX	TC.MTE= 020000   	TOIT  = 000001
REDHM1  004632R  	RXBAD2  007170R  	S.FW  = ****** GX	TC.NXM= 000400   	TO10  = 000200
REDHOM  004600R  	RXBBLK  007172R  	S..AMC= 000000   	TC.PAR= 040000   	TO10AD= 174420
REDSY   003346R  	RXBBLX  007332R  	S..BDT= 000011   	TC.RDA= 000006   	TO10BC= 174414
RESTOR  002734RG 	RXBMSZ  007364R  	S..CHK= 000012   	TC.RDY= 000200   	TO10BM= 000001
RFMAD0= 100000   	RXBNXT  007352R  	S..CNK= 000003   	TC.REV= 004000   	TO10DB= 000400
RFMAD1= 040000   	RXBNX1  007356R  	S..CTY= 000005   	TC.RMT= 000002   	TO10DN= 100000
RFMAD2= 020000   	RXBOOT  007132R  	S..DCP= 000013   	TC.SAT= 000000   	TO10DT= 174424
RFMAD3= 010000   	RXCS  = 177170   	S..DL1= 000002   	TC.SST= 000010   	TO10ER= 020000
RHFLAG  000053R  	RXDB  = 177172   	S..DTE= 000002   	TC.STS= 177340   	TO11  = 000100
RHMERR  005030R  	RXDONE= 000040   	S..ILS= 000004   	TC.UPS= 000200   	TO11AD= 174422
RH.LVL= 000000   	RXEMPT= 000002   	S..KW1= 000007   	TC.US0= 000000   	TO11BC= 174416
RM    = 000010   	RXERR = 100000   	S..MEM= 000006   	TC.US1= 000400   	TO11BM= 020000
RNFLAG  000054R  	RXFILL= 000000   	S..NCN= 000010   	TC.US2= 001000   	TO11DB= 004000
RNRERR  005042R  	RXFUNC= 000016   	S..NXM= 000001   	TC.US3= 001400   	TO11DN= 000200
RPATA = 100000   	RXGO  = 000001   	TCBA  = 177346   	TC.US4= 002000   	TO11DT= 174426
RPBA  = 176704   	RXINIT= 040000   	TCBAD1= 010166R  	TC.US5= 002400   	TO11ER= 000002
RPBAD1= 007702R  	RXREAD= 000006   	TCBAD2= 010166R  	TC.US6= 003000   	TRPVEC= 000034
RPBAD2= 007710R  	RXRERR= 000016   	TCBMSZ  010332R  	TC.US7= 003400   	TSTCHR  017452R
RPBMSZ  007766R  	RXSET   007122R  	TCBNXT  010304R  	TC.VEC= 000214   	TS.CET= 000001
RPBNXT  007726R  	RXSETX  007126R  	TCBOOT  010162R  	TC.WCR= 177344   	TS.DEI= 000010
RPBOOT  007664R  	RXTREQ= 000200   	TCCM  = 177342   	TC.WRA= 000016   	TS.DEP= 010000
RPCS1 = 176700   	RXUNIT= 000020   	TCDT  = 177350   	TC.WTM= 000012   	TS.EBM= 020000
RPCS2 = 176710   	RXWBLK  007454R  	TCENDZ= 100000   	TC..BM= 002000   	TS.EEE= 000040
RPDA  = 176706   	RXWNXT  007434R  	TCERR = 100000   	TC..DI= 010000   	TS.EET= 000002
RPDC  = 176734   	RXWRIT= 000004   	TCFUNC= 000016   	TC..DM= 001000   	TS.EEX= 000400
RPDPR = 000400   	RXWRT   007402R  	TCGO  = 000001   	TC..EZ= 100000   	TS.EIS= 002000
RPDS  = 176712   	RX.LVL= 000006   	TCRDY = 000200   	TC..MM= 020000   	TS.ENT= 000100
RPDT  = 176726   	R$$11M= 000001   	TCREAD= 000004   	TC..RD= 000004   	TS.EPE= 000020
RPDT04= 000020   	R$$20F= 000001   	TCREV = 004000   	TC..SE= 004000   	TS.ETD= 000200
RPDT06= 000022   	SAVE    001170RG 	TCRNUM= 000002   	TC..WR= 000014   	TS.IEN= 000001
RPDVA = 004000   	SAVLMT  001164RG 	TCSATM= 000000   	TENAD1= 174410   	TS.IFB= 100000
RPECCI= 004000   	SCD   = 000040   	TCSET   010156R  	TENAD2= 174412   	TS.MPE= 001000
RPERR = 040000   	SETCTY  003032R  	TCST  = 177340   	TE.BAS= 174400   	TS.PEX= 100000
RPFLAG  000055R  	SETDH   003262R  	TCSTOP= 000010   	TE.BNX= 000040   	TS.POF= 004000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1113  04-AUG-81 12:36  PAGE 98-5
SYMBOL TABLE

TS.RES= 004000   	TYPSTR  006350R  	$DIV  = ****** GX	.INICL= 070000   	.PRDTE= ****** GX
TS.RM = 000010   	TYPTAB  006140R  	$DSW  = ****** GX	.IRLTC= 014000   	.PRSTA= ****** GX
TS.RST= 000100   	TYPTXT  006264R  	$UNIT = ****** GX	.KLIWD= ****** GX	.PUDBA= ****** GX
TS.TBM= 000001   	TYPWRN  006344R  	$$    = 000037   	.KLNMD= ****** GX	.PUDEA= ****** GX
TS.XDN= 000004   	UNASG1= 000032   	$$MSG = 000000   	.KLNSW= ****** GX	.RCRM1= 147000
TS.XEC= 010000   	UNASG2= 000033   	$$$   = 001414R     002	.LCRDL= 052000   	.RCRM2= 146000
TS.XEE= 004000   	UNASG3= 000034   	$$$ADR= 007102R  	.LCRDR= 051000   	.RCRM3= 145000
TS.XER= 020000   	UNASG4= 000035   	$$$ARG= 000005   	.LCRM1= 057000   	.RCRM4= 144000
TS.XNT= 100000   	UNASG5= 000036   	$$$OST= 000020   	.LCRM2= 056000   	.RCSPF= 141000
TS.XTS= 040000   	UNASG6= 000037   	$$$T1 = 000013   	.LCRM3= 055000   	.RDJ14= 134000
TS.ZST= 040000   	U.ACP = ****** GX	$$$T2 = 000001   	.LCRM4= 054000   	.RDJ71= 135000
TTYEND= ****** GX	U.DACP= ****** GX	.BRCLK= 005000   	.LCRM5= 053000   	.RDMAB= 133000
TTYEXP= ****** GX	U.DN  = ****** GX	.BTPRM= ****** GX	.LDAR = 077000   	.RPADR= ****** GX
TT.CRW= ****** GX	U.LBH = ****** GX	.CECLK= 004000   	.LDBRL= 043000   	.SECLK= 003000
TT.CTY= ****** GX	U.LBN = ****** GX	.CLRMR= 006000   	.LDBRR= 042000   	.SERFG= ****** GX
TT.OUT= ****** GX	U.RP  = ****** GX	.CLRUN= 010000   	.LDCK1= 046000   	.SETMR= 007000
TT.RIP= ****** GX	U.SZ  = ****** GX	.COMEF= ****** GX	.LDCK2= 047000   	.SETRN= 011000
TYPBUF  000064R  	U.UN  = ****** GX	.CONBT= 012000   	.LDDIS= 045000   	.SSCLK= 002000
TYPCR   006260R  	U.VA  = ****** GX	.CPUSN= ****** GX	.LDRJD= 064000   	.STDTA= ****** GX
TYPDAT  006360R  	VRCHK1= 000067   	.CSHRG= 164000   	.LDRJV= 063000   	.STDTZ= ****** GX
TYPDEC  006476R  	VRS   = 000022   	.DATE3= ****** GX	.LDRM1= 060000   	.STPCL= 000000
TYPDEV  006302R  	WBFLAG  000046R  	.DQPBA= ****** GX	.LDRM2= 061000   	.STRCL= 001000
TYPDON  006166R  	WEFLAG  000060R  	.DRLTC= 015000   	.LDRM3= 062000   	.VERNO= ****** GX
TYPERR  006336R  	WEP   = 000010   	.DSACF= 066000   	.LDSEL= 044000   	.WRMBX= 071000
TYPMAX= 000013   	WRNMSG  001472R     002	.DSIOJ= 065000   	.MEMRS= 076000   	..DTP2= ****** GX
TYPMSG  006074R  	WRTERR  010146R  	.EIOJA= 067000   	.NOERR= ****** GX	..ENB0= ****** GX
TYPMS1  006114R  	WSFLAG  000047R  	.FEMOD= ****** GX	.PCAB1= 150000   	..FSTD= ****** GX
TYPNUM  006576R  	WTSAVE  002670R  	.FESTB= ****** GX	.PCAB2= 151000   	..STIN= ****** GX
TYPSAV  006252R  	ZSTOP = 040000   	.GFNR = 102000   	.PCAB3= 152000   	...GBL= 000000
TYPSDV  006276R  	$BTMSK= ****** GX	.HRDWR= ****** GX	.PCAB4= 153000

. ABS.	000000	   000
      	021556	   001
TEXT  	001514	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  15048 WORDS  ( 59 PAGES)
DYNAMIC MEMORY:  16246 WORDS  ( 62 PAGES)
ELAPSED TIME:  00:02:53
[52,10]SAVE,[52,20]SAVE/-SP/CR=[52,30]RSXDC,SAVE
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ACFLAG	  000057 R	#23-373     26-663    *26-686    
AC.ENA	= 000200	#21-244     26-638    
ALLRXF	  005054 R	 37-1331   #37-1366   
ALLRX1	  005064 R	 37-1360   #37-1368   
ALTDXF	  000062 R	#23-377    *30-932    *36-1249    36-1267   *36-1280   
ATCBLK	  001102 R	#24-408     26-634    
BC.HDS	= ******  GX	 38-1461   
BEGIN 	= 003000 R	 55-2733    93-4177   
BITTBL	= ******  GX	 31-962    
BIT0  	= 000001	#21-159     21-198     21-219     21-237     22-263     22-278     22-283     22-313     24-437    
                         24-439     24-440     24-441     24-442     24-443     24-444     24-445     24-446     24-447    
BIT1  	= 000002	#21-159     21-201     21-214     22-257     22-258     22-259     22-260     22-261     22-262    
                         22-273     22-274     22-275     22-276     22-277     22-283     22-307     22-308     22-309    
                         22-310     22-311     22-312     24-437     24-438     24-439     24-440     24-441     24-442    
                         24-443     24-444     24-445     24-446     24-447    
BIT10 	= 002000	#21-159     21-210     22-305     22-326     24-434     24-435     24-436     24-437     24-438    
                         24-439     24-440     24-441     24-442     24-443     24-444     24-445     24-446     24-447    
                         24-448     24-449    
BIT11 	= 004000	#21-159     21-209     21-225     22-271     22-295     22-304     22-325    
BIT12 	= 010000	#21-159     21-209     21-224     22-287     22-294    
BIT13 	= 020000	#21-159     21-209     21-224     22-270    
BIT14 	= 040000	#21-159     21-209     21-223     22-253     22-269     22-286    
BIT15 	= 100000	#21-159     21-208     21-223     22-252     22-285     22-301     22-303    
BIT2  	= 000004	#21-159     21-204     21-213     21-238     22-257     22-273     22-283     22-307     24-437    
                         24-438     24-439     24-440    
BIT3  	= 000010	#21-159     21-212     22-257     22-273     22-307     22-328     22-329    
BIT4  	= 000020	#21-159     21-212     22-256     22-273     32-1031   
BIT5  	= 000040	#21-159     21-212     22-255     22-273     22-327    
BIT6  	= 000100	#21-159     21-212     24-434     24-435     24-436     24-437     24-438     24-439     24-440    
                         24-441     24-442     24-443     24-444     24-445     24-446     24-447     24-448     24-449    
BIT7  	= 000200	#21-159     21-211     21-239     21-244     22-254     22-272     22-306    
BIT8  	= 000400	#21-159     21-210     22-289     22-305    
BIT9  	= 001000	#21-159     21-210     22-288     22-305    
BPARER	= 000020	#21-159    
BP.CLN	= 074000	#21-209     31-956    
BP.CSP	= 000170	#21-212     31-942    
BP.ERR	= 100000	#21-208    
BP.LD0	= 000002	#21-214     28-799     30-900     34-1193    38-1390    39-1488    39-1490   
BP.LD1	= 000004	#21-213     30-900     34-1193    34-1194    38-1390    38-1401    39-1488    39-1490   
BP.RP4	= 000200	#21-211     43-1903   
BP.SWR	= 000001	#21-219     30-898     39-1484   
BP.UNT	= 003400	#21-210     31-951    
BR0   	= 000000	#3-154     
BR1   	= 000040	#3-155     
BR2   	= 000100	#3-156     
BR3   	= 000140	#3-157     
BR4   	= 000200	#3-158     
BR5   	= 000240	#3-159     
BR6   	= 000300	#3-160     
BR7   	= 000340	#3-161      63-2945    63-2958    63-2965    70-3182    73-3310    74-3374    76-3460    77-3496   
                         77-3510    79-3562    80-3635    81-3708   
B.DM11	= 170500	#8-312     
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

B0    	= 000001	#3-118      3-136      4-188      6-248      6-250      7-265      7-283      7-294      7-304     
                         8-321      8-324      15-498     16-587     16-588     16-591     56-2741    61-2909    95-4211   
B1    	= 000002	#3-119      3-137      4-187      6-249      6-250      7-266      7-283      7-304      8-321     
                         8-325      15-497     15-518     15-520     15-522     15-524     16-586     56-2742    61-2910   
B10   	= 002000	#3-128      3-146      4-179      6-219      7-272      8-314      15-488     15-509     15-510    
                         15-511     15-512     16-576     81-3699   
B11   	= 004000	#3-129      3-147      4-178      6-220      7-273      8-313      15-487     15-504     16-548    
                         16-574     16-575    
B12   	= 010000	#3-130      3-148      4-177      6-221      6-239      7-274      7-284      15-486     15-503    
                         16-547     16-573     81-3699    81-3771   
B13   	= 020000	#3-131      3-149      4-176      6-222      6-235      6-238      7-275      7-285      15-485    
                         15-502     16-557     16-572     81-3699    81-3771   
B14   	= 040000	#3-132      3-150      4-175      6-223      6-234      6-237      6-243      7-276      7-286     
                         15-484     16-556     16-571     81-3771   
B15   	= 100000	#3-133      3-151      4-174      6-224      6-236      6-242      7-277      7-287      11-377    
                         15-483     15-501     16-549     16-555     16-570     61-2911    81-3771   
B2    	= 000004	#3-120      3-138      4-186      5-209      6-246      7-267      7-283      7-295      7-304     
                         8-321      15-496     15-519     15-520     15-523     15-524     16-585     56-2743   
B3    	= 000010	#3-121      3-139      4-185      7-268      7-283      7-304      8-321      8-329      15-495    
                         15-521     15-522     15-523     15-524     16-583     16-584     56-2744   
B4    	= 000020	#3-122      3-140      4-184      6-245      7-283      7-304      8-320      8-330      15-494    
                         15-516     16-582     56-2745   
B5    	= 000040	#3-123      3-141      4-184      6-244      7-269      7-283      7-304      8-319      8-331     
                         15-493     15-515     16-581     56-2747   
B6    	= 000100	#3-124      3-142      4-183      5-204      5-208      6-215      7-270      7-283      7-296     
                         7-304      8-318      8-332      10-365     10-366     11-379     15-492     15-514     16-565    
                         16-580     56-2748    81-3699   
B7    	= 000200	#3-125      3-143      4-182      6-216      7-271      7-283      7-297      7-304      8-317     
                         8-333      10-367     11-378     15-491     15-513     16-579     56-2749   
B8    	= 000400	#3-126      3-144      4-181      6-217      8-316      15-490     15-506     15-508     15-510    
                         15-512     16-578     81-3699   
B9    	= 001000	#3-127      3-145      4-180      6-218      8-315      15-489     15-507     15-508     15-511    
                         15-512     16-577     81-3699   
CDD   	= 000020	#21-159    
CD.CHK	= 040000	#4-175     
CD.DAT	= 177162	#4-190     
CD.DTE	= 004000	#4-178     
CD.DTL	= 002000	#4-179     
CD.EOF	= 020000	#4-176     
CD.ERR	= 100000	#4-174     
CD.GO 	= 000001	#4-188      86-3957   
CD.HEM	= 000004	#4-186     
CD.INE	= 000100	#4-183      86-3950    86-3951   
CD.LVL	= 000006	#4-166      60-2892    60-2892   
CD.NXM	= 001000	#4-180     
CD.OFL	= 010000	#4-177      86-3942   
CD.ONL	= 000010	#4-185     
CD.PAK	= 000002	#4-187      86-3950   
CD.PWR	= 000400	#4-181      86-3954   
CD.RDY	= 000200	#4-182     
CD.STS	= 177160	#4-172      60-2892   
CD.VEC	= 000230	#4-167      60-2892   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CD.XAD	= 000060	#4-184      86-3957   
CD0DAT	= 177162	#4-170      4-190     
CD0STS	= 177160	#4-169      4-170      4-172     
CHKBIT	  014034 R	 64-2995    65-3011    67-3091   #74-3373    81-3648    81-3652    81-3657    81-3665    81-3672   
                         81-3675    82-3826    82-3830    83-3848    83-3852    84-3868    85-3909    86-3949    87-3976   
                         88-3995    90-4031    90-4034    90-4037    90-4040    90-4043    91-4056   
CHKBRD	  011756 R	#65-3005   
CHKCHR	  020472 R	*64-2990   *64-2992   *65-3007   *65-3009   *67-3084   *67-3086   *67-3087    67-3114    67-3116   
                        *69-3144   *69-3145    70-3191    70-3193   *73-3301   *73-3305   *73-3306   *73-3309    73-3317   
                         73-3318    73-3320    73-3322    73-3325    75-3436    76-3465    76-3467   *76-3470   *77-3493   
                        *78-3532   *78-3533    78-3534   *78-3536    78-3537    78-3540   *78-3542    78-3547    78-3549   
                        *81-3679   *81-3681    81-3709    81-3715   #94-4201   
CHKCLK	  012550 R	#69-3141   
CHKCOR	  012050 R	#65-3020   
CHKDEV	  013164 R	 60-2888    60-2890    60-2891    60-2892    60-2893    60-2894    60-2895    60-2896    60-2897   
                         60-2898    60-2899    60-2900   #72-3231   
CHKDV1	  013432 R	 73-3282   #73-3287   
CHKD01	  013772 R	 73-3345    73-3350   #73-3353   
CHKD02	  013736 R	 73-3271   #73-3338   
CHKERR	  017670 R	 63-2969   #93-4086   
CHKER0	  020344 R	 93-4140   #93-4165   
CHKER1	  020434 R	 93-4179   #93-4182   
CHKER2	  020422 R	 93-4166   #93-4178   
CHKER3	  020412 R	 93-4172   #93-4175   
CHKER9	  020450 R	 93-4181   #93-4186   
CHKFLD	  015254 R	*63-2948   *72-3239    72-3240    73-3300    73-3351   *73-3352   #80-3639   
CHKFLG	  011310 R	#61-2908   *63-2949   *64-2976   *65-3005   *69-3142   *73-3304    75-3412   *75-3441   *93-4089   
                        *93-4092   *93-4102   *93-4109   *93-4167    93-4187   
CHKFLV	  015252 R	*63-2947    72-3233    73-3294    73-3346   *73-3347   #80-3638   
CHKINL	  014312 R	 64-2998    70-3185   #76-3450    82-3833    83-3855   
CHKINT	  015064 R	 63-2957   #80-3596    80-3599   
CHKITL	= 000012	 63-2964   #80-3599   
CHKMMO	= 000002	#61-2910    93-4089    93-4092    93-4187   
CHKTIM	  012772 R	*69-3152    69-3157    69-3159   *69-3173   #69-3178   
CHKX  	  020466 R	#93-4193   
CHK.11	  011476 RG	 30-902     30-902    #63-2944   
CHK.96	  013140 RG	 70-3192   #71-3200   
CHNPNT	= 000001	#21-159    
CI.INE	= 000100	#5-204      65-3012   
CKACD$	= 012302 R	#60-2892    60-2892   
CKACD1	= ******	 60-2892    60-2892   
CKADH$	= 012302 R	#60-2898    60-2898   
CKADH1	= ******	 60-2898    60-2898   
CKADL$	= 012302 R	#60-2891    60-2891   
CKADL1	= ******	 60-2891    60-2891   
CKADM$	= 012302 R	#60-2899    60-2899   
CKADM1	= ******	 60-2899    60-2899   
CKAKL$	= 012302 R	#60-2888    60-2888   
CKAKL1	= ******	 60-2888    60-2888   
CKALP$	= 012302 R	#60-2893    60-2893   
CKALP1	= ******	 60-2893    60-2893   
CKAL2$	= 012302 R	#60-2900    60-2900   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CKAL21	= ******	 60-2900    60-2900   
CKAMEM	= ******	 65-3027   
CKAMF1	= ******	 68-3127   
CKARD$	= 012302 R	#60-2890    60-2890   
CKARD1	= ******	 60-2890    60-2890   
CKARH$	= 012302 R	#60-2896    60-2896   
CKARH1	= ******	 60-2896    60-2896   
CKARX$	= 012302 R	#60-2894    60-2894   
CKARX1	= ******	 60-2894    60-2894   
CKATC$	= 012302 R	#60-2895    60-2895   
CKATC1	= ******	 60-2895    60-2895   
CKATE$	= 012302 R	#60-2897    60-2897   
CKATE1	= ******	 60-2897    60-2897   
CKBLK 	  021156 R	 81-3686    81-3701   #96-4222    96-4223   
CKBUST	  017620 R	 64-2981    69-3149    72-3243    73-3264    73-3313   #92-4070   
CKCADD	= 000034	#60-2889    73-3353   
CKCDEV	  010566 R	#59-2880    60-2889    71-3201   
CKCD$$	= 017122 R	#60-2892    60-2892   
CKCD11	  017122 R	 60-2892    60-2892    60-2892   #86-3941   
CKCD20	  017204 R	 86-3951   #86-3953   
CKCEND	  011306 R	#60-2901   
CKCLK9	  012774 R	 69-3160   #70-3182   
CKCOR 	  012100 R	#66-3039    66-3044   
CKCRLF	  020540 R	 75-3414    93-4116    93-4130   #95-4211    95-4211   
CKDA  	= 000000	*64-2990   *65-3007   *67-3084   *69-3144   *73-3305    75-3436   #94-4196   
CKDEVN	  011312 R	#61-2912   *64-2994   *67-3082   *69-3146   *73-3290   *73-3331    73-3332    75-3431    87-3971   
                         88-3990   
CKDHPL	  016302 R	 81-3724    81-3731    81-3738    81-3747    81-3769   #81-3804   
CKDH$$	= 015256 R	#60-2898    60-2898   
CKDH1A	  015454 R	#81-3683   
CKDH1B	  015514 R	#81-3694    81-3802   
CKDH1C	  016026 R	 81-3743   #81-3749   
CKDH1D	  016270 R	 81-3719    81-3725    81-3732    81-3739    81-3748    81-3763    81-3770    81-3782    81-3793   
                        #81-3799   
CKDH1E	  015564 R	#81-3703    81-3741    81-3796   
CKDH1F	  016326 R	 81-3801   #81-3811   
CKDH11	  015256 R	 60-2898    60-2898    60-2898   #81-3647   
CKDIDT	  014156 R	#75-3412    93-4103   
CKDL$$	= 016342 R	#60-2891    60-2891   
CKDL11	  016342 R	 60-2891    60-2891    60-2891   #82-3825   
CKDMCS	  016552 R	 84-3871    84-3878   #84-3881   
CKDM$$	= 016456 R	#60-2899    60-2899   
CKDM11	  016456 R	 60-2899    60-2899    60-2899   #84-3868   
CKDNAM	  011314 R	#61-2913   *64-2993   *65-3010   *67-3081   *69-3141   *72-3231    73-3279    75-3426   
CKDONE	  003000 R	 30-899     30-901    #30-904     55-2732    71-3210   
CKDV  	= 000002	*64-2992   *65-3009   *67-3086    67-3114    67-3116   *69-3145   *73-3306    73-3317    76-3465   
                         76-3467    78-3534   *78-3536    78-3537    78-3540   *78-3542   *81-3679   *81-3681    81-3709   
                         81-3715   #94-4197   
CKDZTE	= 021216 R	#96-4225   
CKDZTR	= 021156 R	#96-4223    96-4224   
CKDZTX	= 021176 R	#96-4224    96-4225   
CKEDID	= 000010	#56-2744    67-3104    67-3104    67-3104    67-3111    67-3111    67-3111    67-3117    67-3117   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         67-3117    68-3132    68-3132    68-3132    69-3162    69-3162    69-3162    69-3165    69-3165   
                         69-3165    69-3168    69-3168    69-3168    73-3323    73-3323    73-3323    73-3357    73-3357   
                         73-3357    74-3385    74-3385    74-3385    74-3395    74-3395    74-3395    74-3402    74-3402   
                         74-3402    76-3463    76-3463    76-3463    76-3468    76-3468    76-3468    77-3522    77-3522   
                         77-3522    78-3541    78-3541    78-3541    78-3550    78-3550    78-3550    79-3565    79-3565   
                         79-3565    81-3716    81-3716    81-3716    81-3721    81-3721    81-3721    81-3728    81-3728   
                         81-3728    81-3735    81-3735    81-3735    81-3744    81-3744    81-3744    81-3760    81-3760   
                         81-3760    81-3766    81-3766    81-3766    81-3779    81-3779    81-3779    81-3790    81-3790   
                         81-3790    84-3875    84-3875    84-3875    84-3887    84-3887    84-3887    84-3898    84-3898   
                         84-3898    85-3916    85-3916    85-3916    85-3922    85-3922    85-3922    85-3927    85-3927   
                         85-3927    92-4070    92-4070    92-4070    93-4100    93-4117    93-4131   
CKEFAT	= 000001	#56-2741    66-3064    66-3064    66-3064    66-3074    66-3074    66-3074    69-3162    69-3162   
                         69-3162    69-3165    69-3165    69-3165    69-3168    69-3168    69-3168    70-3194    70-3194   
                         70-3194    92-4076    92-4076    92-4076    93-4165   
CKEGB 	= 000100	#56-2748    66-3064    66-3064    66-3064    66-3074    66-3074    66-3074    67-3117    67-3117   
                         67-3117    73-3323    73-3323    73-3323    74-3385    74-3385    74-3385    74-3395    74-3395   
                         74-3395    74-3402    74-3402    74-3402    76-3468    76-3468    76-3468    78-3541    78-3541   
                         78-3541    78-3550    78-3550    78-3550    81-3716    81-3716    81-3716    81-3760    81-3760   
                         81-3760    81-3779    81-3779    81-3779    81-3790    81-3790    81-3790    84-3898    84-3898   
                         84-3898    93-4117    93-4131    93-4139    93-4178   
CKEMSE	= 000020	#56-2745    65-3014    65-3014    66-3064    66-3064    66-3064    66-3064    66-3064    66-3074   
                         66-3074    66-3074    66-3074    66-3074    67-3104    67-3104    67-3104    67-3104    67-3104   
                         67-3111    67-3111    67-3111    67-3111    67-3111    67-3117    67-3117    67-3117    67-3117   
                         67-3117    68-3132    68-3132    68-3132    68-3132    68-3132    69-3162    69-3162    69-3165   
                         69-3165    69-3168    69-3168    70-3194    70-3194    73-3272    73-3272    73-3283    73-3283   
                         73-3323    73-3323    73-3357    73-3357    74-3385    74-3385    74-3385    74-3385    74-3385   
                         74-3395    74-3395    74-3395    74-3395    74-3395    74-3402    74-3402    74-3402    74-3402   
                         74-3402    75-3419    75-3419    75-3423    75-3423    75-3428    75-3428    75-3433    75-3433   
                         75-3438    75-3438    76-3463    76-3463    76-3463    76-3463    76-3463    76-3468    76-3468   
                         76-3468    76-3468    76-3468    77-3522    77-3522    77-3522    77-3522    77-3522    78-3541   
                         78-3541    78-3541    78-3541    78-3541    78-3550    78-3550    79-3565    79-3565    79-3565   
                         79-3565    79-3565    81-3716    81-3716    81-3721    81-3721    81-3728    81-3728    81-3735   
                         81-3735    81-3744    81-3744    81-3760    81-3760    81-3766    81-3766    81-3779    81-3779   
                         81-3790    81-3790    81-3804    81-3804    84-3875    84-3875    84-3887    84-3887    84-3898   
                         84-3898    85-3916    85-3916    85-3922    85-3922    85-3927    85-3927    86-3944    86-3944   
                         87-3968    87-3968    87-3973    87-3973    88-3987    88-3987    88-3992    88-3992    92-4070   
                         92-4070    92-4076    92-4076    93-4106    93-4106    93-4119    93-4119    93-4126    93-4133   
                         93-4133    93-4141    93-4141    93-4148    93-4148    93-4153    93-4153    93-4158    93-4158   
                         93-4168    93-4168   
CKEMSG	= 000004	#56-2743    65-3014    66-3064    66-3074    67-3104    67-3111    67-3117    68-3132    69-3162   
                         69-3165    69-3168    70-3194    70-3194    70-3194    70-3194    73-3272    73-3283    73-3323   
                         73-3323    73-3323    73-3323    73-3357    73-3357    73-3357    73-3357    74-3385    74-3395   
                         74-3402    75-3419    75-3423    75-3428    75-3433    75-3438    76-3463    76-3468    77-3522   
                         78-3541    78-3550    79-3565    81-3716    81-3721    81-3728    81-3735    81-3744    81-3760   
                         81-3766    81-3779    81-3790    81-3804    84-3875    84-3887    84-3898    85-3916    85-3922   
                         85-3927    86-3944    87-3968    87-3968    87-3968    87-3968    87-3973    88-3987    88-3987   
                         88-3987    88-3987    88-3992    92-4070    92-4076    93-4106    93-4112    93-4119    93-4133   
                         93-4141    93-4148    93-4153    93-4158    93-4168   
CKENCL	= 000040	#56-2747    73-3283    73-3283    73-3283    75-3419    75-3419    75-3419    75-3423    75-3423   
                         75-3423    75-3428    75-3428    75-3428    75-3433    75-3433    75-3433    75-3438    75-3438   
                         75-3438    87-3973    87-3973    87-3973    88-3992    88-3992    88-3992    92-4076    92-4076   
                         92-4076    93-4114    93-4119    93-4119    93-4119    93-4128    93-4133    93-4133    93-4133   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         93-4148    93-4148    93-4148    93-4153    93-4153    93-4153    93-4158    93-4158    93-4158   
CKEPC 	= 000002	#56-2742    66-3064    66-3064    66-3064    66-3074    66-3074    66-3074    67-3104    67-3104   
                         67-3104    67-3111    67-3111    67-3111    67-3117    67-3117    67-3117    68-3132    68-3132   
                         68-3132    69-3162    69-3162    69-3162    69-3165    69-3165    69-3165    69-3168    69-3168   
                         69-3168    74-3385    74-3385    74-3385    74-3395    74-3395    74-3395    74-3402    74-3402   
                         74-3402    76-3463    76-3463    76-3463    76-3468    76-3468    76-3468    77-3522    77-3522   
                         77-3522    78-3541    78-3541    78-3541    78-3550    78-3550    78-3550    79-3565    79-3565   
                         79-3565    81-3716    81-3716    81-3716    81-3721    81-3721    81-3721    81-3728    81-3728   
                         81-3728    81-3735    81-3735    81-3735    81-3744    81-3744    81-3744    81-3760    81-3760   
                         81-3760    81-3766    81-3766    81-3766    81-3779    81-3779    81-3779    81-3790    81-3790   
                         81-3790    84-3875    84-3875    84-3875    84-3887    84-3887    84-3887    84-3898    84-3898   
                         84-3898    85-3916    85-3916    85-3916    85-3922    85-3922    85-3922    92-4070    92-4070   
                         92-4070    93-4104   
CKEWRN	= 000200	#56-2749    73-3357    73-3357    73-3357    75-3417    85-3927    85-3927    85-3927   
CKFERR	= 000001	#61-2909    93-4102    93-4109    93-4167   
CKFIDT	= 100000	#61-2911    64-2976    65-3005    69-3142    73-3304    75-3412    75-3441   
CKFLAG	  015062 R	*77-3494    78-3529   *78-3531   #79-3589   
CKFLG 	= 000006	*73-3309   #94-4199   
CKGCHR	  020724 R	#95-4211   
CKINT 	  014430 R	#77-3491    81-3677    81-3678    81-3680    84-3870    85-3919    86-3951    87-3978    88-3997   
                         90-4048    91-4058   
CKINTE	  015036 R	 78-3543    78-3553    79-3573    79-3576   #79-3578   
CKINTF	  015052 R	 77-3523    79-3566   #79-3585   
CKINTG	  015044 R	#79-3580    79-3587   
CKINTS	  011536 R	#63-2955   
CKINT1	  014450 R	#77-3496    79-3574   
CKINT2	  014454 R	#77-3497    77-3521   
CKINT3	  014462 R	#77-3499    79-3577   
CKINT6	  014742 R	 78-3548   #79-3557   
CKINT7	  015026 R	 77-3501   #79-3575   
CKKL$$	= 016406 R	#60-2888    60-2888   
CKKL11	  016406 R	 60-2888    60-2888    60-2888   #83-3847   
CKLP$$	= 017232 R	#60-2893    60-2893   
CKLP11	  017232 R	 60-2893    60-2893    60-2893   #87-3965   
CKL2$$	= 017326 R	#60-2900    60-2900   
CKL211	  017326 R	 60-2900    60-2900    60-2900   #88-3985   
CKL220	  017424 R	 88-3997   #88-4000   
CKMG01	  020750 R	 66-3064    66-3074   #96-4213   
CKMG02	  020760 R	 74-3385    74-3402   #96-4214   
CKMG03	  021002 R	 74-3395   #96-4215   
CKMG04	  021022 R	 67-3111    76-3463    77-3522   #96-4216   
CKMG05	  021052 R	 67-3117    76-3468    78-3541   #96-4217   
CKMG06	  021106 R	 68-3132   #96-4218   
CKMG07	  021120 R	 67-3104    79-3565   #96-4219   
CKMPAR	  012304 R	 66-3054   #67-3080    67-3097   *67-3097    67-3100    67-3106    67-3108   *67-3108    67-3116   
CKNCD1	  011334 R	 60-2892   #62-2926   
CKNCI1	  011320 R	#62-2924    65-3010   
CKNCO1	  011326 R	#62-2925    64-2993   
CKNDH1	  011341 R	 60-2898   #62-2927   
CKNDL1	  011377 R	 60-2891   #62-2930   
CKNDM1	  011406 R	 60-2899   #62-2931   
CKNKL1	  011346 R	 60-2888   #62-2928   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CKNKW1	  011424 R	#62-2933    69-3141   
CKNLP1	  011433 R	 60-2893   #62-2934   
CKNL21	  011440 R	 60-2900   #62-2935   
CKNMM1	  011445 R	#62-2936    67-3081   
CKNRD1	  011361 R	 60-2890   #62-2929   
CKNRH1	  011455 R	 60-2896   #62-2937   
CKNRX1	  011467 R	 60-2894   #62-2939   
CKNTC1	  011462 R	 60-2895   #62-2938   
CKNTE1	  011416 R	 60-2897   #62-2932   
CKPI  	= 000004	*67-3087    70-3191    70-3193   *73-3301    73-3318    73-3320    73-3322   *76-3470   *77-3493   
                        *78-3532   *78-3533    78-3547    78-3549   #94-4198   
CKPOPJ	  012302 R	 60-2888    60-2890    60-2891    60-2892    60-2893    60-2894    60-2895    60-2896    60-2897   
                         60-2898    60-2899    60-2900   #66-3077   
CKRD$$	= 016342 R	#60-2890    60-2890   
CKRD11	  016342 R	 60-2890    60-2890    60-2890   #82-3824   
CKRH$$	= 017456 R	#60-2896    60-2896   
CKRH11	  017456 R	 60-2896    60-2896    60-2896   #89-4017   
CKRX$$	= 017552 R	#60-2894    60-2894   
CKRX11	  017552 R	 60-2894    60-2894    60-2894   #91-4054   
CKRX20	  017606 R	 91-4058   #91-4062   
CKSPC 	= 000010	#94-4200   
CKSPCD	  020470 R	*63-2950   *66-3064   *66-3074   *69-3162   *69-3165   *69-3168   *70-3194   *92-4076    93-4171   
                        #93-4194   
CKTBOC	  020564 R	 92-4075    93-4111    93-4146    93-4152    93-4157    93-4164   #95-4211   
CKTCHR	  020650 R	 95-4211    95-4211   #95-4211    95-4211   
CKTCRL	  020552 R	 66-3046    68-3123    70-3188    75-3415   #95-4211   
CKTC$$	= 017460 R	#60-2895    60-2895   
CKTC11	  017460 R	 60-2895    60-2895    60-2895   #90-4030   
CKTE$$	= 016672 R	#60-2897    60-2897   
CKTE11	  016672 R	 60-2897    60-2897    60-2897   #85-3906   
CKTOCT	  020600 R	 66-3050    73-3276    75-3432    75-3437    81-3808    87-3972    88-3991   #95-4211   
CKTOC1	  020602 R	 95-4211   #95-4211   
CKTOC2	  020614 R	 95-4211   #95-4211    95-4211   
CKTRR0	  020610 R	#95-4211   
CKTRR1	  020534 R	#95-4211    95-4211   
CKTSTR	  020556 R	 66-3051    73-3277    95-4211   #95-4211    95-4211   
CKTTXT	  020512 R	 65-3018    73-3280    75-3427    93-4123    93-4137   #95-4211    95-4211   
CKZZZX	= 000015	#65-3014    65-3014    65-3014   #66-3064    66-3064    66-3064   #66-3074    66-3074    66-3074   
                        #67-3104    67-3104    67-3104   #67-3111    67-3111    67-3111   #67-3117    67-3117    67-3117   
                        #68-3132    68-3132    68-3132   #69-3162    69-3162    69-3162   #69-3165    69-3165    69-3165   
                        #69-3168    69-3168    69-3168   #70-3194    70-3194    70-3194   #73-3272    73-3272    73-3272   
                        #73-3283    73-3283    73-3283   #73-3323    73-3323    73-3323   #73-3357    73-3357    73-3357   
                        #74-3385    74-3385    74-3385   #74-3395    74-3395    74-3395   #74-3402    74-3402    74-3402   
                        #75-3419    75-3419    75-3419   #75-3423    75-3423    75-3423   #75-3428    75-3428    75-3428   
                        #75-3433    75-3433    75-3433   #75-3438    75-3438    75-3438   #76-3463    76-3463    76-3463   
                        #76-3468    76-3468    76-3468   #77-3522    77-3522    77-3522   #78-3541    78-3541    78-3541   
                        #78-3550    78-3550    78-3550   #79-3565    79-3565    79-3565   #81-3716    81-3716    81-3716   
                        #81-3721    81-3721    81-3721   #81-3728    81-3728    81-3728   #81-3735    81-3735    81-3735   
                        #81-3744    81-3744    81-3744   #81-3760    81-3760    81-3760   #81-3766    81-3766    81-3766   
                        #81-3779    81-3779    81-3779   #81-3790    81-3790    81-3790   #81-3804    81-3804    81-3804   
                        #84-3875    84-3875    84-3875   #84-3887    84-3887    84-3887   #84-3898    84-3898    84-3898   
                        #85-3916    85-3916    85-3916   #85-3922    85-3922    85-3922   #85-3927    85-3927    85-3927   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #86-3944    86-3944    86-3944   #87-3968    87-3968    87-3968   #87-3973    87-3973    87-3973   
                        #88-3987    88-3987    88-3987   #88-3992    88-3992    88-3992   #92-4070    92-4070    92-4070   
                        #92-4076    92-4076    92-4076   #93-4106    93-4106    93-4106   #93-4119    93-4119    93-4119   
                        #93-4133    93-4133    93-4133   #93-4141    93-4141    93-4141   #93-4148    93-4148    93-4148   
                        #93-4153    93-4153    93-4153   #93-4158    93-4158    93-4158   #93-4168    93-4168    93-4168   
CK.CAL	  011474 R	#62-2941   *63-2946    65-3017   
CLKENB	= 000100	#10-366    
CLKLVL	= 000006	#10-357    
CLKVEC	= 000100	#10-361     69-3145    69-3150   *69-3151   *70-3184    70-3193   
CLKWRD	= 177546	#10-363     69-3143   *70-3187   
CMDCLN	= 000024	#23-378     25-463    
CMDCLR	  000040 R	#23-355     23-378     25-462    
CMDONE	  001574 R	 25-507    #26-559    
CNUPE 	= 000002	#21-159    
CO.INE	= 000100	#5-208      64-2996    64-2997    82-3832    82-3835    83-3854    83-3857   
CO..MM	= 000004	#5-209      64-2996   
CS.EXP	= 177670	#21-159    
CTICHR	= 177562	#5-198      5-199      64-2980    95-4211    95-4211   
CTILVL	= 000004	#5-203     
CTISTS	= 177560	#5-197      5-198      60-2888    64-2979    65-3006    95-4211   
CTIVEC	= 000060	#5-202      5-205      65-3009   
CTOCHR	= 177566	#5-200      64-2978   *95-4211   
CTOLVL	= 000004	#5-206     
CTOSTS	= 177564	#5-199      5-200      64-2977    64-2989    95-4211   
CTOVEC	= 000064	#5-205      60-2888    64-2992   
CTYBFL	= 000120	#23-390     25-477    
CTYBUF	  000230 R	#23-389     23-390     25-477    *25-485     25-486    
CTYLUN	= 000001	#21-192     25-474     25-477     41-1645   
CTYPTR	= ******  GX	 31-966    *31-968    
CYCLS 	= 000002	#21-159    
DATE  	= 000004	#21-159    
DCOMST	= 000001	#21-159    
DEFLAG	  000061 R	#23-376    *34-1144   *34-1168    35-1228   
DEP   	= 010000	#21-159    
DEVCHK	  001656 R	 26-570    #26-574    
DEVMNT	  002002 R	#26-601    
DEVNAM	  000042 R	#23-357    *25-494     26-561     26-572    *26-576     26-580     26-587     32-1038   
DEVOK 	  001734 R	 26-581    #26-586    
DEVUNT	  000044 R	#23-358    *25-498     26-560    *26-577     28-796     46-2114    49-2355    52-2551   
DEX   	= 000400	#21-159    
DEXDON	= 000004	#21-159    
DEXWD1	= 174406	#21-159    
DEXWD2	= 174404	#21-159    
DEXWD3	= 174402	#21-159    
DFUNC 	= 000200	#21-159    
DF.DMG	= 000004	#21-159    
DF.DMN	= 000007	#21-159    
DF.DOR	= 000001	#21-159    
DF.EHG	= 000010	#21-159    
DF.EHM	= 000011	#21-159    
DF.EMG	= 000005	#21-159    
DF.EMN	= 000006	#21-159    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DF.KLR	= 000012	#21-159    
DF.KLW	= 000013	#21-159    
DF.KLX	= 000014	#21-159    
DF.OFF	= 000002	#21-159    
DF.ON 	= 000003	#21-159    
DF.PDP	= 000016	#21-159    
DF.PEX	= 000015	#21-159    
DGUTS 	= 000000	 1-45       1-46      
DHBASE	= 160020	#6-212     
DHDATA	  016336 R	*81-3694    81-3753    81-3784    81-3786   *81-3794   #81-3814   
DHEXPA	= 160020	#22-333     31-998    
DHEXPZ	= 000020	#22-334     31-1007   
DHRFER	= 020000	#6-235     
DHROVR	= 040000	#6-234     
DHSTAB	  001124 R	#24-433     31-947    
DHTBL 	= ******  GX	 31-953     31-999    
DHXMII	  016340 R	*81-3684   *81-3685    81-3711   #81-3815   
DH.AEE	= 100000	#6-242     
DH.BAR	= 000012	#6-229     *81-3705   
DH.BCR	= 000010	#6-228     *81-3700   
DH.BRK	= 000014	#6-230     
DH.CAR	= 000006	#6-227     *81-3701   
DH.CL5	= 000000	#6-247     
DH.CL6	= 000001	#6-248     
DH.CL7	= 000002	#6-249     
DH.CL8	= 000003	#6-250      81-3699   
DH.CNX	= 000400	#6-217     
DH.DOV	= 040000	#6-237      81-3751   
DH.LPR	= 000004	#6-226     *81-3699   
DH.LVL	= 000005	#6-213      60-2898    60-2898   
DH.NRC	= 000002	#6-225      81-3750   
DH.NXM	= 002000	#6-219      81-3726   
DH.PEN	= 000020	#6-245      81-3699   
DH.RIE	= 000100	#6-215      81-3677    81-3697   
DH.SIE	= 010000	#6-221      81-3678    81-3697   
DH.SSR	= 000016	#6-231     *81-3702   
DH.TIE	= 020000	#6-222      81-3680    81-3697   
DH.VDP	= 100000	#6-236      81-3757    81-3764   
DH..FE	= 020000	#6-238      81-3751   
DH..HD	= 040000	#6-243     
DH..MC	= 004000	#6-220      81-3696    81-3811   
DH..MM	= 001000	#6-218      81-3677    81-3678    81-3697   
DH..OP	= 000040	#6-244      81-3699   
DH..PE	= 010000	#6-239      81-3751   
DH..RI	= 000200	#6-216      81-3677    81-3749   
DH..SI	= 040000	#6-223      81-3678    81-3742   
DH..TI	= 100000	#6-224      81-3680    81-3733    81-3740   
DH.2SB	= 000004	#6-246      81-3699   
DIAG1 	= 174430	#21-159    
DIAG2 	= 174432	#21-159    
DIAG3 	= 174436	#21-159    
DIKL10	= 000010	#21-159    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DLDADR	= 175610	#7-254     
DLDSIZ	= 000010	#7-255     
DLRBUF	= 000002	#7-280     
DLRSTS	= 000000	#7-262     
DLTBL 	= ******  GX	 31-944    *31-976    *31-977    *31-978    *31-979    *31-980    
DLXBUF	= 000006	#7-301     
DLXSTS	= 000004	#7-291     
DLYCNT	= 174400	#21-159    
DL.BRK	= 000001	#7-294     
DL.CAR	= 010000	#7-274      31-984     38-1392   
DL.CTS	= 020000	#7-275     
DL.DIE	= 000040	#7-269     
DL.DSC	= 100000	#7-277     
DL.DTR	= 000002	#7-266     
DL.ERR	= 100000	#7-287     
DL.LVL	= 000004	#7-256      7-257      60-2891    60-2891   
DL.OVR	= 040000	#7-286     
DL.RGO	= 004000	#7-273     
DL.RIE	= 000100	#7-270     
DL.RNG	= 040000	#7-276     
DL.ROK	= 000200	#7-271     
DL.RTS	= 000004	#7-267     
DL.XIE	= 000100	#7-296     
DL.XOK	= 000200	#7-297     
DL..FE	= 020000	#7-285     
DL..MM	= 000004	#7-295     
DL..PE	= 010000	#7-284     
DL..RC	= 000377	#7-283     
DL..RE	= 000001	#7-265     
DL..XC	= 000377	#7-304     
DL.2RC	= 002000	#7-272     
DL.2XM	= 000010	#7-268     
DMBASE	= 170500	#8-308     
DMEXPA	= 170500	#22-338     31-1014   
DMFLAG	  000052 R	#23-368    *25-470     25-541     27-729    
DMOERR	  002426 R	 27-740    #27-747    
DMTBL 	= ******  GX	 31-1015   
DMTBLK	  001116 R	#24-421     27-731    
DM.ALI	= 000017	#8-321      84-3869    84-3881   
DM.BSY	= 000020	#8-320      84-3873    84-3884   
DM.CAR	= 000100	#8-332     
DM.CTS	= 000040	#8-331     
DM.DNE	= 000200	#8-317      84-3869    84-3870    84-3881   
DM.DTR	= 000002	#8-325     
DM.ENB	= 000040	#8-319      84-3869    84-3872    84-3881   
DM.IEN	= 000100	#8-318      84-3869    84-3870    84-3881   
DM.INI	= 002000	#8-314     
DM.LE 	= 000001	#8-324     
DM.LVL	= 000004	#8-310      60-2899    60-2899   
DM.RNG	= 000200	#8-333     
DM.RTS	= 000004	 8-326     
DM.SCN	= 004000	#8-313      84-3883   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DM.SR 	= 000020	#8-330     
DM.ST 	= 000010	#8-329     
DM.STP	= 000400	#8-316     
DM..MM	= 001000	#8-315      84-3869    84-3881   
DNSERR	  001642 R	 26-568    #26-571    
DON10C	= 040000	#21-159    
DON10S	= 100000	#21-159    
DON11C	= 000100	#21-159    
DON11S	= 000200	#21-159    
DPS4  	= 040000	#21-159    
DRESET	= 000100	#21-159    
DRVADR	  000002 R	#23-349    *26-591     26-697     28-786     28-834     29-881    
DRVAD1	= 000012	 28-788    #43-1902   #43-1903   #43-1904   
DRVAD2	= 000014	 28-789    #43-1902   #43-1903   #43-1904   
DRVBOT	= 000004	 28-835    #43-1902   #43-1903   #43-1904   
DRVBTP	= 000016	 28-798    #43-1902   #43-1903   #43-1904   
DRVMSZ	= 000010	 28-787    #43-1902   #43-1903   #43-1904   
DRVNAM	= 000000	 26-580    #43-1902   #43-1903   #43-1904   
DRVSET	= 000002	 26-698     26-698    #43-1902   #43-1903   #43-1904   
DRVSIZ	= 000020	 26-582    #43-1902   #43-1903   #43-1904   
DRVTAB	  007042 R	 26-578     26-583    #43-1901    43-1905   
DRVTBZ	= 000060	 26-583    #43-1905   
DRVWRT	= 000006	 29-882     29-882    #43-1902   #43-1903   #43-1904   
DR.DTE	= 000011	#21-159    
DSEND 	= 000004	#21-159    
DSKADR	  000004 R	#23-350     24-410     26-690     26-691    *26-720    *26-721     28-788     28-789    *29-877    
                        *29-878     46-2120    49-2363    49-2364    52-2548   
DSKLUN	= 000002	#21-193     26-567     27-738     36-1252    42-1851   
DSKSIZ	  000010 R	#23-351     26-659     26-661    
DS04  	= 004000	#21-159    
DS05  	= 002000	#21-159    
DS06  	= 001000	#21-159    
DTCL11	= 002000	#22-326     34-1172   
DTEBAD	= ******	 85-3908   
DTECHK	  003752 R	 32-1049   #34-1139   
DTECMD	= 000451	#21-159    
DTEDTO	= ******	 85-3930   
DTEFLG	= 000444	#21-159    
DTEF11	= 000450	#21-159    
DTEMSG	  004266 R	 35-1215   #35-1220   
DTEMTD	= 000455	#21-159    
DTEMTI	= 000456	#21-159    
DTEXPA	= 174400	#22-321     34-1142   
DTEXPZ	= 000040	#22-322     34-1178   
DTINOF	= 000010	#22-328     34-1172   
DTINON	= 000040	#22-327     34-1166   
DTPMSG	  004312 R	 35-1222   #35-1227   
DTPMS1	  004330 R	 35-1225   #35-1231   
DTPSTA	= ******	 85-3912   
DTRSMD	= 000010	#22-329     34-1159   
DTSTAT	= 000034	#22-324     34-1159   *34-1166   *34-1172    34-1186   
DTVECA	= 000774	#22-320     34-1141   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DT11DB	= 004000	#22-325     34-1166   
DUPE  	= 000020	#21-159    
DURE  	= 000004	#21-159    
DV.LOG	= ******  GX	 23-397    
DXWRD1	= 002000	#21-159    
D.CCTY	= ******  GX	*31-969    
D.CKLN	= ******  GX	 38-1463   
D1011 	= 000040	#21-159    
EBSEL 	= 000100	#21-159    
EBUSPC	= 000020	#21-159    
EBUSPS	= 000004	#21-159    
EDONES	= 040000	#21-159    
EF.PR1	= ******  GX	 28-770     38-1403    38-1448   
EF.PR2	= ******  GX	 28-770     38-1403   
EF.QIO	= 000001	#21-198    
EF.RKP	= ******  GX	 38-1405    38-1414   
EF.TMO	= 000002	#21-201    
EPTR  	= 000000	#21-159    
ERRINT	= 000004	#54-2708   
ERRMSG	  001447 R	 41-1694   #41-1698   
ERR10C	= 010000	#21-159    
ERR10S	= 020000	#21-159    
ERR11C	= 000001	#21-159    
ERR11S	= 000002	#21-159    
EV.PF 	= ******  GX	 35-1209   
EXFLAG	  000050 R	#23-366    *25-468     25-541     39-1500   
EXIT  	  005732 R	 25-532     38-1470    39-1501   #39-1506    39-1508    41-1646   
EXITA 	  001526 R	 25-475     25-478     25-480     25-482    #25-531    
EXIT00	  005720 R	 39-1491    39-1496   #39-1499   
EX.AC1	= 000001	#21-237     26-670    
EX.ENA	= 000200	#21-239     26-670    
EX.FCO	= 000004	#21-238     26-670    
E.FLOG	= 000004	#21-203    #21-204     38-1462    38-1465   
E.FQIO	= 000001	#21-197     25-477     41-1645    42-1851   
E.FTMO	= 000002	#21-200     38-1383    38-1408    38-1409    38-1410   
FIDBLK	  001076 R	#24-404     26-629    
FILCHK	  002252 R	 26-683    #26-685    
FILDMO	  002332 R	#27-728    
FILDMX	  002464 R	 27-735     27-737    #27-755    
FILDM1	  002350 R	#27-733     27-758    
FILDM2	  002414 R	#27-742    
FILDM3	  002436 R	 27-746    #27-749    
FILDM4	  002454 R	 27-751    #27-753    
FILFND	  002060 R	#26-628     26-688    
FILMNT	  006732 R	 26-611     26-611     27-744     27-744     36-1260    36-1260   #42-1830   
FILOK 	  002312 R	 26-692     26-694    #26-696    
FILQIO	  006746 R	 26-639     26-639     26-673     26-673     26-682     26-682     37-1307    37-1307   #42-1850   
FILSET	  002322 R	#26-719    
FINDEV	  006654 R	 26-569     26-569     32-1039    32-1039    32-1048    32-1048    33-1105    33-1105    36-1281   
                         36-1281   #42-1802   
FLOATD	= 160000	 55-2731    63-2948   
FLOATV	= 000300	 55-2730    63-2947   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

FNDACP	  006712 R	 26-607     26-607     36-1256    36-1256   #42-1820   
FORPRO	= 000020	#21-159    
FTABS 	= ******	 23-363     25-542     26-620     26-699     43-1902    43-1903    43-1904    44-1914    47-2248   
                         50-2403   
FTASRT	= 000001	 1-64      
FTECHO	= 000000	 1-61      
FTETR 	= 000000	 1-60      
FTGLOM	= 000000	 1-54      
FT.CHK	= 000001	 1-63      
FT.DDT	= 000000	 1-59      
FT.D75	= 000000	 10-355     10-356    
FT.HLP	= 000001	 1-53      
GETNAM	  005764 R	 25-492     25-492     25-517     25-517    #40-1544   
GETNB 	  005742 R	 25-490     25-490     25-506     25-506    #40-1528    40-1531    40-1533   
GETNUM	  006030 R	 25-496     25-496    #40-1574   
GTIMBF	  000020 R	#23-354     28-766     41-1723    41-1726    41-1733    41-1736    41-1742   
G.TICP	= 000016	#28-766    
G.TICT	= 000014	#28-766    
G.TIDA	= 000004	#28-766     41-1733   
G.TIHR	= 000006	#28-766     41-1723   
G.TIMI	= 000010	#28-766     41-1726   
G.TIMO	= 000002	#28-766     41-1736   
G.TISC	= 000012	#28-766    
G.TIYR	= 000000	#28-766     41-1742   
HBCERR	  004764 R	 37-1332    37-1338   #37-1342   
HIBYTE	= 177400	#21-159    
HOMBUF	  000064 R	#23-387     37-1304    37-1315    37-1334   
HOMFE0	= 000061	#21-231     37-1315    37-1334   
HOMFE1	= 000062	#21-232    
HOMNAM	= 000000	#21-229    
IFLOP 	= 100000	#21-159    
INTROF	= 000010	#21-159    
INTRON	= 000040	#21-159    
INTSON	= 000001	#21-159    
INT10S	= 000400	#21-159    
INT11C	= 002000	#21-159    
INT11S	= 004000	#21-159    
IO.ACE	= 007400	 26-633    
IO.APV	= 014010	 42-1831   
IO.DAC	= 010000	 26-678    
IO.EXT	= 011400	 26-668    
IO.RLB	= 001000	 25-477     37-1303   
IO.WLB	= 000400	 41-1645   
KBS0  	= ******  GX	 31-976    
KBS1  	= ******  GX	 31-977     31-983    
KLANXM	  005576 R	 38-1387   #38-1472   
KLAREM	  005460 R	 38-1443   #38-1447   
KLAUSR	  005450 R	 38-1440   #38-1445   
KLINIT	  001120 R	#24-426     39-1481   
KLNPTR	= ******  GX	 38-1384   
KLPWRF	= 000010	#21-159    
KL.CFM	= ******  GX	 39-1483   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

KL.DEF	= ******  GX	 39-1483   
KL.LCA	= ******  GX	 39-1483   
KL.LRM	= ******  GX	 39-1483   
KL.LVB	= ******  GX	 39-1483   
KL.LVL	= 000004	#7-258      60-2888    60-2888   
KL.VBN	= ******  GX	 39-1486   
KPAR0 	= 172340	#1-28      
KW.INE	= 000100	#10-365     69-3154    70-3183    70-3187   
KW.TIC	= 000200	#10-367    
K.LRBA	= ******  GX	 38-1460   
LKS   	= 177546	#22-342    *28-782    
LOAD11	= 000004	#21-159    
LOGBUF	  001070 R	#23-395     38-1450   
LOWCOR	  000064 R	#23-383     23-393     28-836    
LP.DAT	= 177516	#11-382    
LP.DNE	= 000200	#11-378     87-3978   
LP.ERR	= 100000	#11-377     87-3966   
LP.INE	= 000100	#11-379     87-3977    87-3978    88-3996   
LP.LVL	= 000004	#11-371     60-2893    60-2893   
LP.STS	= 177514	#11-375     60-2893   
LP.VEC	= 000200	#11-372     60-2893   
LP0DAT	= 177516	#11-381     11-382     11-386    
LP0STS	= 177514	#11-374     11-375     11-381    
LP1DAT	= 177522	#11-387    
LP1STS	= 177520	#11-386     11-387    
L2.A16	= 000020	#12-414    
L2.A17	= 000040	#12-413    
L2.BCM	= 007777	#13-443    
L2.DB 	= 000377	#13-455    
L2.DEL	= 002000	#13-452    
L2.DH 	= 002000	#12-408    
L2.DL 	= 000010	#12-415    
L2.DNR	= 000100	#12-430    
L2.DON	= 000200	#12-411    
L2.DR 	= 010000	#12-406    
L2.DTE	= 000002	#12-435    
L2.ENB	= 000100	#12-412     88-3997   
L2.ERE	= 001000	#12-409    
L2.ERR	= 100000	#12-403     88-3985   
L2.GER	= 000001	#12-436    
L2.GO 	= 000001	#12-418    
L2.INI	= 000400	#12-410    
L2.INT	= 004000	#13-451    
L2.LDP	= 010000	#12-424    
L2.LPE	= 000040	#12-431    
L2.LVL	= 000004	#12-397     60-2900    60-2900   
L2.MPE	= 000020	#12-432    
L2.MST	= 000004	#12-434    
L2.ONL	= 004000	#12-407    
L2.OVF	= 004000	#12-425    
L2.PCM	= 007777	#13-446    
L2.PEN	= 000002	#12-417    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

L2.PI 	= 000400	#13-454    
L2.PNR	= 020000	#12-423    
L2.POL	= 000200	#12-429    
L2.PZE	= 040000	#12-404    
L2.RDB	= 007777	#13-450    
L2.RPB	= 010000	#13-449    
L2.RPE	= 000010	#12-433    
L2.SPR	= 040000	#12-422    
L2.TB0	= 000400	#12-428    
L2.TB1	= 001000	#12-427    
L2.TB2	= 002000	#12-426    
L2.TM 	= 000004	#12-416     88-4001   
L2.TRN	= 001000	#13-453    
L2.UCD	= 020000	#12-405    
L2.VD 	= 100000	#12-421    
L2.VEC	= 000754	#12-398     60-2900   
L20ADR	= 000004	#13-440     13-442    
L20BCT	= 000006	#13-442     13-445    
L20BUF	= 000014	#13-457     13-459    
L20CHK	= 000017	#13-463    
L20COL	= 000015	#13-459     13-461    
L20CRA	= 000000	#12-402     12-420    
L20CRB	= 000002	#12-420     13-440    
L20PCT	= 000010	#13-445     13-448    
L20PDA	= 000016	#13-461     13-463    
L20RAM	= 000012	#13-448     13-457    
L20STS	= 175400	#12-399     60-2900   
L21STS	= 175420	#12-400    
MEMSIZ	  000014 R	#23-352    *26-655     28-787    *29-879     46-2140    49-2387    52-2606   
MM.SR0	= 177572	#1-29       93-4090   *93-4093   *93-4189   
MNTBLK	  001110 R	#24-415     26-610     36-1258   
MNTSY 	  004364 R	#36-1246   
MNTSY1	  004406 R	#36-1251    36-1283   
MNTSY2	  004476 R	 36-1253   #36-1264   
MODTBL	  001532 R	 25-519    #25-536     25-547    
MODTLN	= 000006	 25-520    #25-547    
MOFLAG	  000051 R	#23-367     25-541     26-602    
MONTAB	  006516 R	 41-1739   #41-1755   
MOUNTD	  002050 R	 26-605    #26-614    
MPE11 	= 001000	#21-159    
MP.ENB	= 000001	#14-475     67-3105    68-3126   
MP.ERR	= 100000	#14-472    
MP.LVL	= 000007	#14-468    
MP.REG	= 172100	#14-470     67-3083   *67-3089   *68-3126   
MP.VEC	= 000114	#14-467     67-3086   
MP.WWP	= 000004	#14-474     67-3096   
M$$MGE	= ******	 28-790     28-804     30-910     43-1902    43-1903    43-1904    45-2046    45-2086    46-2124   
                         48-2307    48-2330    51-2498    51-2521   
NONDEV	  014000 R	 73-3311   #73-3356   
NOTRXF	  005012 R	#37-1350   
NULSTP	= 000040	#21-159    
NUPE  	= 000002	#21-159    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

NXMVEC	= 000004	#1-30      *64-2975   *64-2981   *65-3021    67-3085   *67-3088   *67-3090   *68-3134   *69-3147   
                        *69-3149   *72-3241   *72-3243   *73-3264   *73-3311   *73-3313    93-4087   *93-4088   *93-4096   
OB0   	= 000001	#3-136     
OB1   	= 000002	#3-137     
OB10  	= 000400	#3-144     
OB11  	= 001000	#3-145     
OB12  	= 002000	#3-146     
OB13  	= 004000	#3-147     
OB14  	= 010000	#3-148     
OB15  	= 020000	#3-149     
OB16  	= 040000	#3-150     
OB17  	= 100000	#3-151     
OB2   	= 000004	#3-138     
OB3   	= 000010	#3-139     
OB4   	= 000020	#3-140     
OB5   	= 000040	#3-141     
OB6   	= 000100	#3-142     
OB7   	= 000200	#3-143     
PASS  	= 000002	 1-84       1-85      #1-85      
PDP11 	= 000040	 1-68      
PERCLR	= 001000	#21-159    
PHYLIM	  011316 R	#61-2914   *65-3026    66-3049   
PHYS  	= 100000	#21-159    
PIDENT	= 000000	#21-159    
PRI7  	= 000340	#21-159    
PRNRUN	  005564 R	 38-1404   #38-1468   
PROPNT	= 000021	#21-159    
PROTBL	= ******  GX	*34-1183   
PRTOFF	= 004000	#21-159    
PR0   	= 000000	#21-159    
PR1   	= 000040	#21-159    
PR2   	= 000100	#21-159    
PR3   	= 000140	#21-159    
PR4   	= 000200	#21-159    
PR5   	= 000240	#21-159     34-1167   
PR6   	= 000300	#21-159    
PR7   	= 000340	#21-159     28-778     34-1170    35-1232    45-2045    45-2089    48-2306    48-2333    51-2497   
                         51-2524   
PS    	= 177776	#21-159     28-778    *28-778    *28-803    *33-1096    33-1101   *34-1146    34-1151    34-1156   
                        *34-1167   *34-1170   *34-1174    35-1232   *35-1232   *35-1234    38-1413   *38-1413   *38-1438   
                        *45-2045   *48-2306   *51-2497   *63-2945   *69-3153   *70-3182   *73-3310   *74-3374   *76-3456   
                        *76-3460   *77-3497   *77-3510   *79-3557   *79-3562    80-3596    80-3600    80-3603    80-3606   
                         80-3609    80-3612    80-3615    80-3618    80-3621    80-3624   *81-3706   *81-3708   
PSWW1 	= 000005	#21-159    
PSWW10	= 000014	#21-159    
PSWW11	= 000015	#21-159    
PSWW12	= 000016	#21-159    
PSWW13	= 000017	#21-159    
PSWW2 	= 000006	#21-159    
PSWW3 	= 000007	#21-159    
PSWW4 	= 000010	#21-159    
PSWW5 	= 000011	#21-159    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PSWW6 	= 000012	#21-159    
PSWW7 	= 000013	#21-159    
PS.PUS	= 030000	#21-224     28-803     33-1096    34-1146    34-1174   
PS.REG	= 004000	#21-225     45-2089    48-2333    51-2524   
PS.USR	= 140000	#21-223    
PUDADR	  000040 R	#23-356    *26-592     32-1041   *32-1045   *32-1052    36-1247   *36-1282    41-1677   
PUDIDX	  000045 R	#23-359    *26-597     32-1069   
PULSE 	= 000020	#21-159    
QEFLAG	  000056 R	#23-372    *26-663     42-1852   *42-1859   
QIOSTS	  001064 R	#23-394     25-477     25-479     25-481     25-484     42-1851    42-1856   
QSIZE 	= 000023	#21-159    
Q.DA  	= ******  GX	*31-969    
Q.SZ  	= ******  GX	*31-969    
RADIX 	  000016 R	#23-353    *41-1685   *41-1722   *41-1748    41-1775    41-1777   
RAMIS0	= 010000	#21-159    
RD.LVL	= 000004	#7-257      7-258      60-2890    60-2890   
REDHM1	  004632 R	 37-1297   #37-1299   
REDHOM	  004600 R	 36-1248    36-1255    36-1266    36-1269    36-1277   #37-1291   
REDSY 	  003346 R	#32-1028   
RESTOR	  002734 RG	 29-876    #30-893     45-2091    48-2335    49-2397    51-2526   
RFMAD0	= 100000	#21-159    
RFMAD1	= 040000	#21-159    
RFMAD2	= 020000	#21-159    
RFMAD3	= 010000	#21-159    
RHFLAG	  000053 R	#23-369    *25-469     25-541    *26-589     33-1082    37-1292   
RHMERR	  005030 R	 37-1308   #37-1358   
RH.LVL	= 000000	 60-2896    60-2896   
RM    	= 000010	#21-159    
RNFLAG	  000054 R	#23-370    *33-1087    37-1294   
RNRERR	  005042 R	 37-1295   #37-1362   
RPATA 	= 100000	#22-285     48-2294    49-2381   
RPBA  	= 176704	#22-280    *48-2273   *49-2362   
RPBAD1	= 007702 R	 43-1903   #48-2274   
RPBAD2	= 007710 R	 43-1903   #48-2276   
RPBMSZ	  007766 R	 43-1903   #48-2301   
RPBNXT	  007726 R	#48-2283    48-2302   
RPBOOT	  007664 R	 43-1903   #48-2266    48-2293    48-2295    48-2337   
RPCS1 	= 176700	#22-268     33-1114   *33-1116   *48-2273   *48-2275   *48-2277   *48-2278   *48-2284    48-2294   
                         49-2353   *49-2355   *49-2362   *49-2363   *49-2364   *49-2365   *49-2371    49-2381   
RPCS2 	= 176710	#22-282    *33-1084   *33-1109   *49-2355   
RPDA  	= 176706	#22-281    *48-2277   *49-2364   
RPDC  	= 176734	#22-296    *48-2275   *49-2363   
RPDPR 	= 000400	#22-289     33-1110   
RPDS  	= 176712	#22-284     33-1085    33-1089    33-1110    48-2294    49-2381   
RPDT  	= 176726	#22-290     33-1119   
RPDT04	= 000020	#22-291    
RPDT06	= 000022	#22-292     33-1119   
RPDVA 	= 004000	#22-271     33-1114    49-2359   
RPECCI	= 004000	#22-295     48-2278    49-2365   
RPERR 	= 040000	#22-286     48-2294    49-2381   
RPFLAG	  000055 R	#23-371    *33-1091    37-1296   
RPFM22	= 010000	#22-294    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RPFUNC	= 000076	#22-273    
RPGO  	= 000001	#22-278     33-1116    48-2271    49-2361   
RPMCPE	= 020000	#22-270     48-2292    49-2379   
RPMOL 	= 010000	#22-287     33-1085   
RPNOOP	= 000000	#22-274     33-1116   
RPOF  	= 176732	#22-293    *48-2278   *49-2365   
RPPGM 	= 001000	#22-288     33-1089    33-1110   
RPPRST	= 000020	#22-275     48-2271    49-2361   
RPRDY 	= 000200	#22-272    
RPREAD	= 000070	#22-277     48-2279   
RPSET 	  007614 R	 43-1903   #47-2226   
RPTRE 	= 040000	#22-269     48-2292    49-2379   
RPUNIT	= 000007	#22-283    
RPWC  	= 176702	#22-279    *48-2284   *49-2371   
RPWNXT	  010100 R	#49-2370    49-2388   
RPWRIT	= 000060	#22-276     49-2366   
RPWRT 	  010020 R	 43-1903   #49-2352   
RP4CHK	  003530 R	#33-1081   
RP6CHK	  003574 R	 33-1083    33-1090   #33-1095   
RQSKLR	  005112 R	 37-1293    37-1356    37-1364   #38-1382   
RQSTSK	  005606 R	 38-1396    38-1449    38-1466   #39-1480   
RXBAD1	  007170 R	 43-1902   #45-1957   
RXBAD2	  007170 R	 43-1902   #45-1958   
RXBBLK	  007172 R	#45-1969    45-2077    45-2077   
RXBBLX	  007332 R	 45-1955   #45-2044   
RXBMSZ	  007364 R	 43-1902   #45-2081   
RXBNXT	  007352 R	#45-2072    45-2082   
RXBNX1	  007356 R	 45-2068   #45-2078   
RXBOOT	  007132 R	 43-1902   #45-1939    45-1955    45-2019    45-2038    45-2077    45-2077    45-2093   
RXCS  	= 177170	#22-251    *45-2008   *45-2012    45-2028    46-2119   *46-2164   *46-2203   *46-2207    60-2894   
RXDB  	= 177172	#22-264    *45-2008   *45-2012    45-2028   *46-2164   *46-2203   *46-2207   
RXDONE	= 000040	#22-255     45-2017    45-2025    46-2161    46-2212   
RXEMPT	= 000002	#22-259     45-2023   
RXERR 	= 100000	#22-252     45-2017    46-2212   
RXFILL	= 000000	#22-258     46-2159   
RXFUNC	= 000016	#22-257    
RXGO  	= 000001	#22-263     45-1948    45-2023    46-2118    46-2159    91-4064   
RXINIT	= 040000	#22-253    
RXREAD	= 000006	#22-261     45-1948   
RXRERR	= 000016	#22-262     91-4063   
RXSET 	  007122 R	 43-1902   #44-1911   
RXSETX	  007126 R	#44-1922   
RXTREQ	= 000200	#22-254     45-2025    46-2161   
RXUNIT	= 000020	#22-256     45-1946    46-2116   
RXWBLK	  007454 R	 46-2138    46-2138   #46-2153   
RXWNXT	  007434 R	#46-2133    46-2141   
RXWRIT	= 000004	#22-260     46-2118   
RXWRT 	  007402 R	 43-1902   #46-2107   
RX.LVL	= 000006	#22-250     60-2894    60-2894   
R$$11M	= 000001	#1-27      
R$$20F	= 000001	#1-26      
SAVE  	  001170 RG	#25-458     25-491     39-1502    41-1654    98-4233   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

SAVLMT	  001164 RG	#24-451     26-645    
SCD   	= 000040	#21-159    
SETCTY	  003032 R	#31-940    
SETDH 	  003262 R	#31-997    
SETDL 	  003162 R	 31-943    #31-975    
SETDM 	  003320 R	#31-1013   
SETFIL	  002060 R	 26-603     26-612    #26-619    
SETRXF	  004774 R	 37-1340   #37-1346   
SF.FX 	= ******  GX	 32-1067   
SOMRXF	  005106 R	 37-1348   #37-1374   
SPSAVE	  000000 RG	#23-348    *28-865     30-894     30-908    
STAT  	= 174434	#21-159    
STATUS	= 000022	#21-159    
STKLEN	= 000200	 1-62      
STSW0 	= ******  GX	*31-971    
STSW1 	= ******  GX	*31-967    *31-970     38-1394   *38-1429   *38-1432   *38-1436   
SWR   	= 177570	#21-159    
SWSLLT	= 100000	#21-159    
SXBTHM	= 105755	#21-230     37-1310   
SYMNTD	  004516 R	 36-1262   #36-1271   
SYMNT1	  004526 R	 36-1268   #36-1273   
SYNERR	  001562 R	 25-493     25-497     25-509     25-518    #25-551    
SYSAVE	  002476 R	 27-730    #28-765    
SYSAV1	  002530 R	 28-771    #28-776    
SYSMSG	  004350 R	 35-1229   #35-1238   
SYSTRT	  004222 R	 34-1195   #35-1205   
S.DI  	= ******  GX	 32-1069   *32-1071   
S.FW  	= ******  GX	 32-1067   
S..AMC	= 000000	#2-89      
S..BDT	= 000011	#2-100     
S..CHK	= 000012	#2-101     
S..CNK	= 000003	#2-93      
S..CTY	= 000005	#2-95       64-2983   
S..DCP	= 000013	#2-102     
S..DL1	= 000002	#2-91      
S..DTE	= 000002	#2-92      
S..ILS	= 000004	#2-94      
S..KW1	= 000007	#2-97       69-3162    69-3165    69-3168    70-3194   
S..MEM	= 000006	#2-96       66-3064    66-3074   
S..NCN	= 000010	#2-98      
S..NXM	= 000001	#2-90       92-4076   
TCBA  	= 177346	#22-315    *51-2437   *52-2553   
TCBAD1	= 010166 R	 43-1904   #51-2431   
TCBAD2	= 010166 R	 43-1904   #51-2432   
TCBMSZ	  010332 R	 43-1904   #51-2491   
TCBNXT	  010304 R	#51-2478    51-2492   
TCBOOT	  010162 R	 43-1904   #51-2423    51-2452    51-2485    51-2528    52-2568   
TCCM  	= 177342	#22-302    *51-2437    51-2451    51-2458    51-2468   *51-2479    52-2547   *52-2553    52-2567   
                         52-2574    52-2584   *52-2595   
TCDT  	= 177350	#22-316     51-2458    51-2468    52-2574    52-2584   
TCENDZ	= 100000	#22-301    
TCERR 	= 100000	#22-303    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 20

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TCFUNC	= 000016	#22-307    
TCGO  	= 000001	#22-313     51-2493    52-2608   
TCRDY 	= 000200	#22-306    
TCREAD	= 000004	#22-310     51-2474   
TCREV 	= 004000	#22-304     51-2443    51-2453    51-2461    52-2559    52-2569    52-2577   
TCRNUM	= 000002	#22-309     51-2441    52-2557   
TCSATM	= 000000	#22-308    
TCSET 	  010156 R	 43-1904   #50-2411   
TCST  	= 177340	#22-300     51-2451    52-2567   
TCSTOP	= 000010	#22-311     51-2493    52-2608   
TCUNIT	= 003400	#22-305    
TCWC  	= 177344	#22-314    *51-2479   *52-2595   
TCWERR	  010562 R	 52-2601   #52-2613   
TCWNXT	  010522 R	#52-2594    52-2607   
TCWRIT	= 000014	#22-312     52-2590   
TCWRT 	  010370 R	 43-1904   #52-2546   
TC.A16	= 000020	#15-516     90-4035   
TC.A17	= 000040	#15-515     90-4035   
TC.BAR	= 177346	#15-528    
TC.CLK	= 000100	#15-492    
TC.CMD	= 177342	#15-500    
TC.DAT	= 177350	#15-530    
TC.DT0	= 000020	#15-494    
TC.DT1	= 000010	#15-495    
TC.DT2	= 000004	#15-496    
TC.D16	= 000001	#15-498     90-4032   
TC.D17	= 000002	#15-497     90-4032   
TC.ERR	= 100000	#15-501    
TC.ILO	= 010000	#15-486    
TC.INE	= 000100	#15-514     90-4035    90-4048   
TC.LVL	= 000006	#15-480     60-2895    60-2895   
TC.MMT	= 000040	#15-493    
TC.MTE	= 020000	#15-485    
TC.NXM	= 000400	#15-490    
TC.PAR	= 040000	#15-484    
TC.RDA	= 000006	#15-520    
TC.RDY	= 000200	#15-513     90-4048   
TC.REV	= 004000	#15-504     90-4035   
TC.RMT	= 000002	#15-518    
TC.SAT	= 000000	#15-517    
TC.SST	= 000010	#15-521    
TC.STS	= 177340	#15-482     60-2895   
TC.UPS	= 000200	#15-491    
TC.US0	= 000000	#15-505    
TC.US1	= 000400	#15-506    
TC.US2	= 001000	#15-507    
TC.US3	= 001400	#15-508    
TC.US4	= 002000	#15-509    
TC.US5	= 002400	#15-510    
TC.US6	= 003000	#15-511    
TC.US7	= 003400	#15-512     90-4035   
TC.VEC	= 000214	#15-479     60-2895   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 21

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TC.WCR	= 177344	#15-526    
TC.WRA	= 000016	#15-524    
TC.WTM	= 000012	#15-522    
TC..BM	= 002000	#15-488    
TC..DI	= 010000	#15-503     90-4035   
TC..DM	= 001000	#15-489    
TC..EZ	= 100000	#15-483    
TC..MM	= 020000	#15-502     90-4035   
TC..RD	= 000004	#15-519    
TC..SE	= 004000	#15-487    
TC..WR	= 000014	#15-523    
TENAD1	= 174410	#21-159    
TENAD2	= 174412	#21-159    
TE.BAS	= 174400	#16-538    
TE.BNX	= 000040	#16-539    
TE.DG1	= 000030	#16-563    
TE.DG2	= 000032	#16-564    
TE.DG3	= 000036	#16-590    
TE.DYC	= 000000	#16-541     85-3911   
TE.EAD	= 000022	#16-560    
TE.EBC	= 000016	#16-553    
TE.EDT	= 000026	#16-562    
TE.LVL	= 000006	#16-534     60-2897    60-2897   
TE.NNN	= 000004	#16-537    
TE.STW	= 000034	#16-568     85-3911   
TE.VEC	= 000774	#16-535    
TE.XAD	= 000020	#16-559    
TE.XA1	= 000010	#16-545    
TE.XA2	= 000012	#16-551    
TE.XBC	= 000014	#16-552    
TE.XDT	= 000024	#16-561    
TE.XW1	= 000006	#16-544    
TE.XW2	= 000004	#16-543    
TE.XW3	= 000002	#16-542    
TOBM  	= 000004	#21-159    
TOD   	= 000003	#21-159    
TOIP  	= 000002	#21-159    
TOIT  	= 000001	#21-159    
TO10  	= 000200	#21-159    
TO10AD	= 174420	#21-159    
TO10BC	= 174414	#21-159    
TO10BM	= 000001	#21-159    
TO10DB	= 000400	#21-159    
TO10DN	= 100000	#21-159    
TO10DT	= 174424	#21-159    
TO10ER	= 020000	#21-159    
TO11  	= 000100	#21-159    
TO11AD	= 174422	#21-159    
TO11BC	= 174416	#21-159    
TO11BM	= 020000	#21-159    
TO11DB	= 004000	#21-159    
TO11DN	= 000200	#21-159    
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 22

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TO11DT	= 174426	#21-159    
TO11ER	= 000002	#21-159    
TRPVEC	= 000034	#1-31      *63-2969   
TSTCHR	  017452 R	 88-4002   #88-4007   
TS.CET	= 000001	#16-588    
TS.DEI	= 000010	#16-584     85-3919   
TS.DEP	= 010000	#16-547    
TS.EBM	= 020000	#16-557    
TS.EEE	= 000040	#16-581     85-3913    85-3919   
TS.EET	= 000002	#16-586    
TS.EEX	= 000400	#16-578    
TS.EIS	= 002000	#16-576    
TS.ENT	= 000100	#16-580    
TS.EPE	= 000020	#16-582    
TS.ETD	= 000200	#16-579    
TS.IEN	= 000001	#16-587     85-3914    85-3920   
TS.IFB	= 100000	#16-555    
TS.MPE	= 001000	#16-577    
TS.PEX	= 100000	#16-549    
TS.POF	= 004000	#16-548    
TS.RES	= 004000	#16-575     85-3919   
TS.RM 	= 000010	#16-583     85-3925   
TS.RST	= 000100	#16-565     85-3929   
TS.TBM	= 000001	#16-591    
TS.XDN	= 000004	#16-585    
TS.XEC	= 010000	#16-573    
TS.XEE	= 004000	#16-574    
TS.XER	= 020000	#16-572    
TS.XNT	= 100000	#16-570    
TS.XTS	= 040000	#16-571    
TS.ZST	= 040000	#16-556    
TTYEND	= ******  GX	 31-1008   
TTYEXP	= ******  GX	*31-976    *31-977    *31-978    *31-979    *31-980     31-999     38-1385   
TT.CRW	= ******  GX	 38-1394   
TT.CTY	= ******  GX	 31-967     31-970     38-1432    38-1436   
TT.OUT	= ******  GX	 38-1429   
TT.RIP	= ******  GX	 38-1394   
TYPBUF	  000064 R	#23-388     41-1618    41-1644    41-1645    42-1821   
TYPCR 	  006260 R	 41-1637   #41-1659   
TYPDAT	  006360 R	 41-1637   #41-1721   
TYPDEC	  006476 R	 41-1637   #41-1747   
TYPDEV	  006302 R	 41-1637   #41-1682   
TYPDON	  006166 R	 41-1637   #41-1642   
TYPERR	  006336 R	 41-1637   #41-1693   
TYPMAX	= 000013	 41-1626   #41-1638   
TYPMSG	  006074 R	 25-476     25-476     25-483     25-483     25-530     25-530     25-553     25-553     26-573    
                         26-573     26-585     26-585     26-613     26-613     26-615     26-615     26-684     26-684    
                         26-695     26-695     27-748     27-748     27-752     27-752     27-754     27-754     28-772    
                         28-772     35-1216    35-1216    35-1224    35-1224    35-1230    35-1230    35-1240    35-1240   
                         36-1250    36-1250    36-1263    36-1263    36-1272    36-1272    36-1284    36-1284    37-1298   
                         37-1298    37-1343    37-1343    37-1349    37-1349    37-1359    37-1359    37-1363    37-1363   
                         37-1367    37-1367    38-1441    38-1441    38-1442    38-1442    38-1446    38-1446    38-1469   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 23

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         38-1469    38-1473    38-1473    39-1498    39-1498   #41-1615   
TYPMS1	  006114 R	#41-1624    41-1627    41-1632   
TYPNUM	  006576 R	 41-1687    41-1687    41-1724    41-1724    41-1731    41-1731    41-1734    41-1734    41-1743   
                         41-1749    41-1749   #41-1767   
TYPSAV	  006252 R	 41-1637   #41-1653   
TYPSDV	  006276 R	 41-1637   #41-1676   
TYPSTR	  006350 R	 41-1637    41-1695   #41-1713    41-1715    41-1740    41-1740   
TYPTAB	  006140 R	 41-1631    41-1631   #41-1636    41-1638   
TYPTXT	  006264 R	 41-1637   #41-1666    41-1684    41-1684   
TYPWRN	  006344 R	 41-1637   #41-1703   
UNASG1	= 000032	#21-159    
UNASG2	= 000033	#21-159    
UNASG3	= 000034	#21-159    
UNASG4	= 000035	#21-159    
UNASG5	= 000036	#21-159    
UNASG6	= 000037	#21-159    
U.ACP 	= ******  GX	*26-608    *36-1257   
U.DACP	= ******  GX	 42-1824   
U.DN  	= ******  GX	 26-576     27-738     36-1252    36-1265    36-1274    41-1683    42-1805   
U.LBH 	= ******  GX	*33-1108   *33-1122   
U.LBN 	= ******  GX	*33-1107   *33-1121   
U.RP  	= ******  GX	 26-575     27-734    *32-1050   
U.SZ  	= ******  GX	 26-595     27-756     32-1059    42-1810   
U.UN  	= ******  GX	 26-577     27-738    *32-1042    33-1084    36-1252    36-1275    41-1686    42-1807   
U.VA  	= ******  GX	 26-604     27-736     27-750     36-1254   
VRCHK1	= 000067	#54-2707   
VRS   	= 000022	#1-38      
WBFLAG	  000046 R	#23-360     25-541    *29-875    
WEFLAG	  000060 R	#23-374     35-1214   *49-2396   
WEP   	= 000010	#21-159    
WRNMSG	  001472 R	 41-1704   #41-1708   
WRTERR	  010146 R	 46-2214    49-2360    49-2380    49-2382   #49-2395    52-2614   
WSFLAG	  000047 R	#23-362    *25-467     25-541    *29-873    
WTSAVE	  002670 R	#29-872     29-883    
ZSTOP 	= 040000	#21-159    
$BTMSK	= ******  GX	*31-962    
$DIV  	= ******  GX	 26-596     26-596     32-1060    32-1060    47-2240    47-2240   
$DSW  	= ******  GX	 27-739     39-1497    42-1854   
$UNIT 	= ******  GX	*31-964    
$$    	= 000037	#25-476     25-476    #25-483     25-483    #25-490     25-490    #25-492     25-492    #25-496    
                         25-496    #25-506     25-506    #25-517     25-517    #25-530     25-530    #25-553     25-553    
                        #26-569     26-569    #26-573     26-573    #26-585     26-585    #26-596     26-596    #26-607    
                         26-607    #26-611     26-611    #26-613     26-613    #26-615     26-615    #26-639     26-639    
                        #26-673     26-673    #26-682     26-682    #26-684     26-684    #26-695     26-695    #26-698    
                         26-698    #27-744     27-744    #27-748     27-748    #27-752     27-752    #27-754     27-754    
                        #28-772     28-772    #29-882     29-882    #30-902     30-902    #32-1039    32-1039   #32-1048   
                         32-1048   #32-1060    32-1060   #33-1105    33-1105   #34-1197    34-1197   #35-1210    35-1210   
                        #35-1216    35-1216   #35-1224    35-1224   #35-1230    35-1230   #35-1240    35-1240   #36-1250   
                         36-1250   #36-1256    36-1256   #36-1260    36-1260   #36-1263    36-1263   #36-1272    36-1272   
                        #36-1281    36-1281   #36-1284    36-1284   #37-1298    37-1298   #37-1307    37-1307   #37-1343   
                         37-1343   #37-1349    37-1349   #37-1359    37-1359   #37-1363    37-1363   #37-1367    37-1367   
                        #38-1441    38-1441   #38-1442    38-1442   #38-1446    38-1446   #38-1464    38-1464   #38-1469   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 24

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         38-1469   #38-1473    38-1473   #39-1498    39-1498   #41-1631    41-1631   #41-1684    41-1684   
                        #41-1687    41-1687   #41-1724    41-1724   #41-1731    41-1731   #41-1734    41-1734   #41-1740   
                         41-1740   #41-1749    41-1749   #41-1785    41-1785   #45-1970    45-1970   #45-1971    45-1971   
                        #45-2077    45-2077   #46-2138    46-2138   #46-2154    46-2154   #46-2155    46-2155   #47-2240   
                         47-2240   
$$$   	= 001414 R	#25-476     25-476    #25-483     25-483    #25-530     25-530    #25-553     25-553    #26-573    
                         26-573    #26-585     26-585    #26-613     26-613    #26-615     26-615    #26-684     26-684    
                        #26-695     26-695    #27-748     27-748    #27-752     27-752    #27-754     27-754    #28-772    
                         28-772    #35-1216    35-1216   #35-1224    35-1224   #35-1230    35-1230   #35-1240    35-1240   
                        #36-1250    36-1250   #36-1263    36-1263   #36-1272    36-1272   #36-1284    36-1284   #37-1298   
                         37-1298   #37-1343    37-1343   #37-1349    37-1349   #37-1359    37-1359   #37-1363    37-1363   
                        #37-1367    37-1367   #38-1441    38-1441   #38-1442    38-1442   #38-1446    38-1446   #38-1469   
                         38-1469   #38-1473    38-1473   #39-1498    39-1498   
$$$ADR	= 007102 R	#43-1902    43-1902    43-1902    43-1902    43-1902    43-1902    43-1902    43-1902    43-1902   
                         43-1902   #43-1903    43-1903    43-1903    43-1903    43-1903    43-1903    43-1903    43-1903   
                         43-1903    43-1903   #43-1904    43-1904    43-1904    43-1904    43-1904    43-1904    43-1904   
                         43-1904    43-1904    43-1904   
$$$ARG	= 000005	#25-474     25-474    #25-474     25-474    #25-474     25-474    #25-474     25-474     25-474    
                         25-474     25-474     25-474     25-474     25-474     25-474     25-474     25-474    #25-477    
                         25-477     25-477     25-477     25-477     25-477     25-477     25-477     25-477     25-477    
                         25-477     25-477    #26-567     26-567    #26-567     26-567    #26-567     26-567    #26-567    
                         26-567     26-567     26-567     26-567     26-567     26-567     26-567     26-567     26-567    
                         26-567    #27-738     27-738    #27-738     27-738    #27-738     27-738    #27-738     27-738    
                         27-738     27-738     27-738     27-738     27-738     27-738     27-738     27-738     27-738    
                        #36-1252    36-1252   #36-1252    36-1252   #36-1252    36-1252   #36-1252    36-1252    36-1252   
                         36-1252    36-1252    36-1252    36-1252    36-1252    36-1252    36-1252    36-1252   #38-1408   
                         38-1408    38-1408    38-1408    38-1408    38-1408    38-1408    38-1408    38-1408    38-1408   
                         38-1408   #41-1645    41-1645    41-1645    41-1645    41-1645    41-1645    41-1645    41-1645   
                         41-1645    41-1645    41-1645    41-1645   #42-1851    42-1851    42-1851    42-1851    42-1851   
                         42-1851    42-1851    42-1851    42-1851    42-1851    42-1851    42-1851   
$$$GLB	= ******	 28-766     28-766     28-766     28-766     28-766     28-766     28-766     28-766    
$$$OST	= 000020	#28-766     28-766     28-766    #28-766     28-766     28-766    #28-766     28-766     28-766    
                        #28-766     28-766     28-766    #28-766     28-766     28-766    #28-766     28-766     28-766    
                        #28-766     28-766     28-766    #28-766     28-766     28-766    #28-766    
$$$T1 	= 000013	#25-477     25-477    #41-1645    41-1645   #42-1851    42-1851   
$$$T2 	= 000001	#39-1495    39-1495   
.BRCLK	= 005000	#21-159    
.BTPRM	= ******  GX	*30-897     30-933     34-1192    38-1389    39-1482   
.CECLK	= 004000	#21-159    
.CLRMR	= 006000	#21-159    
.CLRUN	= 010000	#21-159    
.COMEF	= ******  GX	 28-770     38-1403    38-1405    38-1414    38-1448   
.CONBT	= 012000	#21-159    
.CPUSN	= ******  GX	*35-1207   
.CSHRG	= 164000	#21-159    
.DATE3	= ******  GX	*35-1206   
.DQPBA	= ******  GX	*31-969    
.DRLTC	= 015000	#21-159    
.DSACF	= 066000	#21-159    
.DSIOJ	= 065000	#21-159    
.EIOJA	= 067000	#21-159    
.FEMOD	= ******  GX	*38-1421   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 25

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.FESTB	= ******  GX	 66-3043   
.GFNR 	= 102000	#21-159    
.HRDWR	= ******  GX	*35-1208   
.INICL	= 070000	#21-159    
.IRLTC	= 014000	#21-159    
.KLIWD	= ******  GX	*39-1494   
.KLNMD	= ******  GX	 38-1416    38-1419    38-1421   *38-1425    38-1430    38-1439    38-1451    38-1453   
.KLNSW	= ******  GX	*38-1419   
.LCRDL	= 052000	#21-159    
.LCRDR	= 051000	#21-159    
.LCRM1	= 057000	#21-159    
.LCRM2	= 056000	#21-159    
.LCRM3	= 055000	#21-159    
.LCRM4	= 054000	#21-159    
.LCRM5	= 053000	#21-159    
.LDAR 	= 077000	#21-159    
.LDBRL	= 043000	#21-159    
.LDBRR	= 042000	#21-159    
.LDCK1	= 046000	#21-159    
.LDCK2	= 047000	#21-159    
.LDDIS	= 045000	#21-159    
.LDRJD	= 064000	#21-159    
.LDRJV	= 063000	#21-159    
.LDRM1	= 060000	#21-159    
.LDRM2	= 061000	#21-159    
.LDRM3	= 062000	#21-159    
.LDSEL	= 044000	#21-159    
.MEMRS	= 076000	#21-159    
.NOERR	= ******  GX	*28-777    *34-1196   
.PCAB1	= 150000	#21-159    
.PCAB2	= 151000	#21-159    
.PCAB3	= 152000	#21-159    
.PCAB4	= 153000	#21-159    
.PRDTE	= ******  GX	*34-1184    35-1221   
.PRSTA	= ******  GX	*34-1188   *35-1223   
.PUDBA	= ******  GX	 26-594     27-732     32-1058    42-1803   
.PUDEA	= ******  GX	 27-757     42-1811   
.RCRM1	= 147000	#21-159    
.RCRM2	= 146000	#21-159    
.RCRM3	= 145000	#21-159    
.RCRM4	= 144000	#21-159    
.RCSPF	= 141000	#21-159    
.RDJ14	= 134000	#21-159    
.RDJ71	= 135000	#21-159    
.RDMAB	= 133000	#21-159    
.RPADR	= ******  GX	 37-1316    37-1335    37-1347    37-1351    37-1369   *37-1375   
.SECLK	= 003000	#21-159    
.SERFG	= ******  GX	*35-1209   
.SETMR	= 007000	#21-159    
.SETRN	= 011000	#21-159    
.SSCLK	= 002000	#21-159    
.STDTA	= ******  GX	 32-1062   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 26

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.STDTZ	= ******  GX	 32-1064   
.STPCL	= 000000	#21-159    
.STRCL	= 001000	#21-159    
.VERNO	= ******  GX	 35-1239   
.WRMBX	= 071000	#21-159    
..DTP2	= ******  GX	 34-1197    34-1197   
..ENB0	= ******  GX	 35-1210    35-1210   
..FSTD	= ******  GX	 42-1825   
..STIN	= ******  GX	 38-1464    38-1464   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 27

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$S		#21-157    #25-474    #26-567    #27-738    #36-1252   
CALL  		#1-23      #21-158     25-476     25-483     25-490     25-492     25-496     25-506     25-517     25-530    
                 25-553     26-569     26-573     26-585     26-596     26-607     26-611     26-613     26-615     26-639    
                 26-673     26-682     26-684     26-695     26-698     27-744     27-748     27-752     27-754     28-772    
                 29-882     30-902     32-1039    32-1048    32-1060    33-1105    34-1197    35-1210    35-1216    35-1224   
                 35-1230    35-1240    36-1250    36-1256    36-1260    36-1263    36-1272    36-1281    36-1284    37-1298   
                 37-1307    37-1343    37-1349    37-1359    37-1363    37-1367    38-1441    38-1442    38-1446    38-1464   
                 38-1469    38-1473    39-1498    41-1631    41-1684    41-1687    41-1724    41-1731    41-1734    41-1740   
                 41-1749    41-1785    45-1970    45-1971    45-2077    46-2138    46-2154    46-2155    47-2240   
CKSERR		#59-2863    66-3063    66-3073    67-3116    70-3193    73-3322    76-3467    78-3540    78-3549    81-3715   
CK11SC		#56-2757    65-3014    66-3064    66-3074    67-3104    67-3111    67-3117    68-3132    69-3162    69-3165   
                 69-3168    70-3194    73-3272    73-3283    73-3323    73-3357    74-3385    74-3395    74-3402    75-3419   
                 75-3423    75-3428    75-3433    75-3438    76-3463    76-3468    77-3522    78-3541    78-3550    79-3565   
                 81-3716    81-3721    81-3728    81-3735    81-3744    81-3760    81-3766    81-3779    81-3790    81-3804   
                 84-3875    84-3887    84-3898    85-3916    85-3922    85-3927    86-3944    87-3968    87-3973    88-3987   
                 88-3992    92-4070    92-4076    93-4106    93-4119    93-4133    93-4141    93-4148    93-4153    93-4158   
                 93-4168   
CLEF$S		#21-157     38-1383    38-1410   
DEVICE		#58-2825   #60-2888   #60-2890   #60-2891   #60-2892   #60-2893   #60-2894   #60-2895   #60-2896   #60-2897   
                #60-2898   #60-2899   #60-2900   
DEVTXT		#62-2917   #62-2924   #62-2925   #62-2926   #62-2927   #62-2928   #62-2929   #62-2930   #62-2931   #62-2932   
                #62-2933   #62-2934   #62-2935   #62-2936   #62-2937   #62-2938   #62-2939   
DIR$  		#25-474     25-474    #25-477     25-477    #26-567     26-567    #27-738     27-738    #28-766     28-766    
                #36-1252    36-1252   #38-1383    38-1383   #38-1408    38-1408   #38-1409    38-1409   #38-1410    38-1410   
                #38-1465    38-1465   #39-1495    39-1495   #39-1507    39-1507   #41-1645    41-1645   #42-1851    42-1851   
DRIVER		#43-1871   #43-1902   #43-1903   #43-1904   
ERROR 		#21-177    #25-530    #25-553    #26-573    #26-585    #26-613    #26-684    #26-695    #27-748    #27-752    
                #28-772    #35-1216   #38-1469   
ERR$  		#25-474    #25-477    #26-567    #27-738    #28-766    #36-1252   #38-1383   #38-1408   #38-1409   #38-1410   
                #38-1465   #39-1495   #39-1507   #41-1645   #42-1851   
EXIT$S		#21-157    #39-1507   
GTIM$S		#21-157    #28-766    
MFPI  		#21-158     33-1098    33-1099    34-1148    34-1149    34-1153    34-1154   
MFPS  		#21-158    
MOV$  		#25-474    #25-474     25-474     25-474     25-474    #25-477    #25-477     25-477     25-477     25-477    
                 25-477     25-477     25-477    #26-567    #26-567     26-567     26-567     26-567    #27-738    #27-738    
                 27-738     27-738     27-738    #28-766     28-766    #36-1252   #36-1252    36-1252    36-1252    36-1252   
                #38-1383    38-1383   #38-1408    38-1408    38-1408    38-1408    38-1408   #38-1409    38-1409   #38-1410   
                 38-1410   #38-1465    38-1465   #39-1495    39-1495   #41-1645   #41-1645    41-1645    41-1645    41-1645   
                 41-1645    41-1645    41-1645    41-1645   #42-1851   #42-1851    42-1851    42-1851    42-1851    42-1851   
                 42-1851    42-1851    42-1851    42-1851    42-1851   
MRKT$S		#21-157     38-1408   
MTPI  		#21-158     33-1131    33-1132    34-1176    34-1177    34-1190    34-1191   
MTPS  		#21-158     33-1100    33-1101    34-1150    34-1151    34-1155    34-1156   
MVB$  		#25-477     25-477    #39-1495    39-1495   #41-1645    41-1645   #42-1851    42-1851   
NBL$  		#25-474    #25-474    #26-567    #26-567    #27-738    #27-738    #36-1252   #36-1252   
ND    		#17-594     55-2730    55-2731    55-2732    55-2733   
OFF$  		#28-766     28-766     28-766     28-766     28-766     28-766     28-766     28-766     28-766    
POP   		#21-158     27-745     30-909     36-1261    41-1647    41-1648    41-1787    45-2034    46-2218    47-2243   
                 95-4211    95-4211    95-4211   
PUSH  		#21-158    #25-476    #25-483    #25-530    #25-553    #26-573    #26-585    #26-613    #26-615    #26-684    
                #26-695    #27-743    #27-748    #27-752    #27-754    #28-772    #28-844    #35-1216   #35-1224   #35-1230   
SAVE       CREATED BY  MACRO  ON 4-AUG-81 AT 12:38	PAGE 28

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

                #35-1240   #36-1250   #36-1259   #36-1263   #36-1272   #36-1284   #37-1298   #37-1343   #37-1349   #37-1359   
                #37-1363   #37-1367   #38-1441   #38-1442   #38-1446   #38-1469   #38-1473   #39-1498   #41-1616   #41-1782   
                #45-1955   #45-1975   #45-1981   #45-2065   #45-2089   #45-2091   #46-2170   #46-2176   #47-2238   #48-2326   
                #48-2333   #48-2335   #51-2517   #51-2524   #51-2526   #95-4211   #95-4211   #95-4211   #95-4211   #95-4211   
QDPB$S		#25-477    #25-477    #41-1645   #41-1645   #42-1851   #42-1851   
QIOSY$		#21-157     21-160    
QIOW$S		#21-157     25-477     41-1645    42-1851   
RETURN		#1-23      #21-158     40-1536    40-1566    40-1592    41-1649    41-1672    41-1689    41-1717    41-1751   
                 41-1790    42-1815    42-1863    44-1924    45-2036    46-2143    46-2220    47-2244    49-2389    50-2413   
                 52-2609   
RFA$  		#39-1495    39-1495    39-1495   
RQST$S		#21-157     39-1495   
RVP$  		#25-474    #25-474    #25-477    #25-477    #26-567    #26-567    #27-738    #27-738    #36-1252   #36-1252   
                #38-1408   #38-1408   #41-1645   #41-1645   #42-1851   #42-1851   
SPD   		#24-430    #24-434    #24-435    #24-436    #24-437    #24-438    #24-439    #24-440    #24-441    #24-442    
                #24-443    #24-444    #24-445    #24-446    #24-447    #24-448    #24-449    
STOPCD		#2-107     
TYPE  		#21-164     25-476     25-483     25-530     25-553     26-573     26-585     26-613     26-615     26-684    
                 26-695     27-748     27-752     27-754     28-772     35-1216    35-1224    35-1230    35-1240    36-1250   
                 36-1263    36-1272    36-1284    37-1298    37-1343    37-1349    37-1359    37-1363    37-1367    38-1441   
                 38-1442    38-1446    38-1469    38-1473    39-1498   
WARN  		#21-181    #26-615    #36-1263   #36-1284   #37-1298   #37-1343   #37-1349   #37-1359   #37-1363   #37-1367   
                #38-1441   #38-1442   #38-1446   #38-1473   #39-1498   
WTSE$S		#21-157    #38-1409   #38-1465   
$CKINT		#57-2794   #81-3677   #81-3678   #81-3680   #84-3870   #85-3919   #86-3951   #87-3978   #88-3997   #90-4048   
                #91-4058   
$DEF  		#21-157    #21-159    
.CKTTS		#17-598     95-4211   
.ENB  		#21-158    #35-1234   
.ENB6 		#21-158    #38-1438   
.INH  		#21-158    #28-778    #35-1232   
.INH6 		#21-158    #38-1413