Google
 

Trailing-Edge - PDP-10 Archives - bb-m403a-bk - driver.l20
There are 3 other files named driver.l20 in the archive. Click here to see a list.
ARITH -- 16 BIT ARITHMETIC SIMU	MACRO M1113  11-NOV-81 11:19
TABLE OF CONTENTS

     6-  187	ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT
    21- 2168	TITLE PAGE
    22- 2203	COMMON PARAMETERS AND MACROS
    23- 2290	LP-20 DEVICE REGISTER DEFINITIONS
    24- 2360	COMMON DEVICE PARAMETER MODULE
    25- 2393	DEVICE STATUS BIT DEFINITIONS
    26- 2448	LP-20 COMMON DATA MODULE
    27- 2482	COMMON VARIABLES
    28- 2490	LP-20 DEVICE TABLES
    29- 2526	LP-20 DRIVER TASK MODULE
    30- 2570	LPINI	(INITIALIZE LP-20 TASK)
    31- 2628	LPLOOP	(LP-20 DRIVER TASK LOOP)
    32- 2655	LPIOD	(LP TASK I/O DONE)
    33- 2865	LPNIR	(LP TASK QUEUE I/O REQUEST)
    34- 2996	LPMKT	(LP TASK MARK-TIME REQUEST)
    35- 3068	SSTSLP	(SEND LP-20 STATUS TO -10)
    36- 3303	TESTLP	(START LP-20 GOING ON THREADED LIST)
    37- 3375	INITLP	(INITALIZE ALL LP'S)
    38- 3413	LP-20 INTERRUPT SERVICE MODULE
    39- 3445	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
    40- 3564	LP-20 COMMON SUBROUTINES MODULE
    40- 3603	..STLP	(START LP-20 OUTPUT)
    41- 3725	..SPLP	(STOP LP-20 OUTPUT)
    42- 3791	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
    43- 3828	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
    44- 3891	..DOLP	(INITIATE LP-20 TRANSFER)
    45- 3986	TITLE PAGE
    46- 4021	COMMON PARAMETERS AND MACROS
    47- 4049	CD-11 DEVICE REGISTER BIT DEFINITIONS
    48- 4077	CD-11 DRIVER COMMON DATA MODULE
    49- 4109	COMMON DATABASE DEFINITIONS
    50- 4141	CD-11 DRIVER TASK MODULE
    51- 4175	TASK INITIALIZATION
    52- 4210	CRLOOP (MAIN PROCESSING LOOP)
    53- 4329	SSTSCR	(SEND CD-11 STATUS TO -10)
    54- 4474	INITCR	(INITIALIZE CD-11)
    55- 4488	CD-11 DRIVER COMMON SUBROUTINES MODULE
    56- 4526	$CDINT	(CD-11 INTERRUPT SERVICE)
    57- 4555	..STCR	(START CD-11)
    58- 4584	..SPCR	(STOP CD-11)
    59- 4607	..AKCR	(READ CARD)
    60- 4637	TITLE PAGE
    61- 4681	MACROS AND PARAMETERS
    62- 4770	TASK DATA
    63- 4820	FIND THE TASK FILE
    64- 4985	INITIALIZE TASK FILE
    65- 5037	SETUP STD ENTRY
    66- 5145	SETUP LOGICAL UNIT TABLE FOR TASK
    67- 5263	RE-REQUEST TASK
    68- 5288	TASK FILE I/O ROUTINES
    69- 5377	ERROR PROCESSING
    70- 5467	END STATEMENT
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1113  11-NOV-81 11:19  PAGE 1


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


     58					.ENDC			; $TOP10
     59
     60					.IF DF	$TOP20
     61		000001 				$RX11	=1	; INCLUDE FLOPPY DRIVER
     62					.ENDC			; $TOP20
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  11-NOV-81 11:19  PAGE 2


     64						.TITLE	RSX20F	-- RESIDENT EXECUTIVE (SYSTEM DEFINITION)
     65						.IDENT	/014450/
     66						.ENABL	AMA
     67						.LIST	MEB
     68						.NLIST	CND
     69					;
     70					;                             COPYRIGHT (C) 1975, 1978 BY
     71					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     72					;
     73					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     74					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     75					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     76					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     77					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     78					;
     79					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     80					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     81					;       CORPORATION.
     82					;
     83					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     84					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     85					;
     86					; R.  MCLEAN   19-MAR-75
     87					;
     88					;  VERSION 14-45
     89					;
     90					; MODIFIED BY:
     91					;
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  11-NOV-81 11:19  PAGE 3


     93					;
     94					; SET VERSION OF RSX20F EXEC HERE
     95					;
     96		000014 			RSX$$V	=	14		; VERSION 14
     97		000045 			RSX$$E	=	45		; EDIT 45
     98					;
     99					; RELEASE VERSION
    100					;
    101		000126 			RSX$$K	=	'V		; KEY FOR RELEASE-TYPE
    102									; "V" -- RELEASE
    103									; "X" -- EXPERIMENTAL
    104									; "Y" -- FIELD/LOAD TEST
    105		000000 			RSX$$F	=	0		; DEFINE FORM AS NULL
    114		000102 			RSX$$F	=	'B		; TOPS-20 FORM OF THE EXEC.
    119					;
    120					; DTE-20 REGISTER OFFSETS
    121					;
    122		000036 			DAG3	=36
    123		000034 			STATD	=34
    124		000032 			DAG2	=32
    125		000030 			DAG1	=30
    126		000022 			T11AD	=22
    127		000020 			T10AD	=20
    128		000016 			T11BC	=16
    129		000010 			TNAD1	=10
    130		000012 			TNAD2	=12
    131		000006 			DXWD1	=6
    132		000004 			DXWD2	=4
    133		000002 			DXWD3	=2
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1113  11-NOV-81 11:19  PAGE 4


    135					;+
    136					; MACRO TO SET IDENT FOR EXEC MODULES.
    137					; FORMAT OF CALL IS:
    138					;	IDENT$	VERSION,EDIT
    139					; OR
    140					;	IDENT$	VERSION,EDIT,RSX$$F
    141					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    142					;-
    143
    144						.MACRO	IDENT$ VER,EDT,FRM,NUM
    145						.IF	B,NUM
    146						.IF	B,FRM
    147						IDENT$	\VER,\EDT,0,0
    148						.IFF
    149						.IF	EQ,<FRM-'A>
    150						IDENT$	\VER,\EDT,A,0
    151						.IFF
    152						.IF	EQ,<FRM-'B>
    153						IDENT$	\VER,\EDT,B,0
    154						.IFF
    155						IDENT$	\VER,\EDT,E,0
    156						.ENDC
    157						.ENDC
    158						.ENDC
    159						.MEXIT
    160						.IFF
    161						.IF	GE,VER-10
    162						.IF	GE,EDT-10
    163						.LIST
    164						.IDENT	/'FRM'VER'EDT'0/
    165						.NLIST
    166						.IFF
    167						.LIST
    168						.IDENT	/'FRM'VER'0'EDT'0/
    169						.NLIST
    170						.ENDC
    171						.IFF
    172						.IF	GE,EDT-10
    173						.LIST
    174						.IDENT	/'FRM'0'VER'EDT'0/
    175						.NLIST
    176						.IFF
    177						.LIST
    178						.IDENT	/'FRM'0'VER'0'EDT'0/
    179						.NLIST
    180						.ENDC
    181						.ENDC
    182						.ENDC
    183						.ENDM	IDENT$
ARITH -- 16 BIT ARITHMETIC SIMU	MACRO M1113  11-NOV-81 11:19  PAGE 6


    186						.TITLE	ARITH -- 16 BIT ARITHMETIC SIMULATOR
    187						.SBTTL	ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT
    188						.IDENT	/001000/
    189
    190					;
    191					;                             COPYRIGHT (C) 1972, 1978 BY
    192					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    193					;
    194					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
    195					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
    196					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
    197					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
    198					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
    199					;
    200					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
    201					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
    202					;       CORPORATION.
    203					;
    204					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
    205					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
    206					;
    207					; VERSION 01-00
    208					;
    209					; D. N. CUTLER 10-FEB-72
    210
    211
    212						.MCALL	RETURN
    213
    214
    215					;+
    216					; **-$MUL-INTEGER MULTIPLY MAGNITUDE NUMBERS
    217					;
    218					; INPUTS:
    219					;
    220					;	R0=MULTIPLIER.
    221					;	R1=MULTIPLICAND.
    222					;
    223					; OUTPUTS:
    224					;
    225					;	DOUBLE WORD RESULT IS RETURNED WITH THE
    226					;	HIGH PART IN R0 AND THE LOW PART IN R1.
    227					;
    228					;	REGISTERS R2, R3, R4, AND R5 ARE PRESERVED ACROSS CALL.
    229					;-
    230
    231						.ENABL	LSB
    232	000000	010046 			$MUL::	MOV	R0,-(SP)	;SAVE R0 FOR ADDS
    233	000002	012746 	000021 			MOV	#21,-(SP)	;SET REPEAT COUNT
    234	000006	005000 				CLR	R0		;CLEAR HIGH PART
    235	000010	006000 			10$:	ROR	R0		;DOUBLE RIGHT SHIFT
    236	000012	006001 				ROR	R1		;
    237	000014	103003 				BCC	20$		;IF CC DO NOT ADD
    238	000016	066600 	000002 			ADD	2(SP),R0	;
    239	000022	000241 				CLC			;CLEAR CARRY INDICATOR
    240	000024	005316 			20$:	DEC	(SP)		;DECREMENT REPEAT COUNT
    241	000026	003370 				BGT	10$		;IF GT MORE TO GO
    242	000030	000415 				BR	50$		;EXIT TO CALLER
ARITH -- 16 BIT ARITHMETIC SIMU	MACRO M1113  11-NOV-81 11:19  PAGE 6-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    243
    244					;+
    245					; **-$DIV-INTEGER DIVIDE MAGNITUDE NUMBERS
    246					;
    247					; INPUTS:
    248					;
    249					;	R0=DIVIDEND.
    250					;	R1=DIVISOR.
    251					;
    252					; OUTPUTS:
    253					;
    254					;	QUOTIENT IS RETURNED IN R0 AND REMAINDER IN R1.
    255					;
    256					;	REGISTERS R2, R3, R4, AND R5 ARE PRESERVED ACROSS CALL.
    257					;-
    258
    259	000032	012746 	000020 		$DIV::	MOV	#20,-(SP)	;SET LOOP COUNT
    260	000036	010146 				MOV	R1,-(SP)	;SAVE DIVISOR FOR SUBTRACTS
    261	000040	005001 				CLR	R1		;CLEAR REMAINDER
    262	000042	006300 			30$:	ASL	R0		;DOUBLE LEFT SHIFT
    263	000044	006101 				ROL	R1		;
    264	000046	020116 				CMP	R1,(SP)		;SUBTRACT OUT DIVISOR?
    265	000050	103402 				BLO	40$		;IF LO NO
    266	000052	161601 				SUB	(SP),R1		;SUBTRACT OUT DIVISOR
    267	000054	005200 				INC	R0		;ADD IN LOW BIT
    268	000056	005366 	000002 		40$:	DEC	2(SP)		;DECREMENT REPEAT COUNT
    269	000062	003367 				BGT	30$		;IF GT MORE TO GO
    270	000064	022626 			50$:	CMP	(SP)+,(SP)+	;CLEAN STACK
    271	000066					RETURN			;
	000066	000207 				RTS	PC
    272						.DSABL	LSB
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 7
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    274						.TITLE	DBDRV -- RP04/RP06 DRIVER
    275						.IDENT	/014440/
    276						.LIST	MEB
    277					;
    278					;
    279					;
    280					;                             COPYRIGHT (C) 1974, 1978 BY
    281					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    282					;
    283					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
    284					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
    285					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
    286					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
    287					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
    288					;
    289					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
    290					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
    291					;       CORPORATION.
    292					;
    293					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
    294					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
    295					;
    296					;
    297					;
    298					;
    299					;		AUTHOR:   D. N. CUTLER
    300					;		DATE:     2-JUL-74
    301					;		VERSION:  14-44
    302					;
    303					;
    304					;
    305					; MODIFICATIONS:
    306					;
    307					;	NO.		DATE		PROGRAMMER
    308					;	---		----		----------
    309					;	001		17-JUN-75	R. MCLEAN
    310					;	002		19-JUL-76	J. MASSE
    311					;	003		28-MAR-77	A. PECKHAM	FIX POWER FAIL RECOVERY
    312					;	004		27-JUL-77	R. BELANGER	ADD 18-BIT ECC CORRECTION
    313					;   TCO 5.1003		14-SEP-79	R. BELANGER	FIX BUG IN DUAL-PORT LOGIC
    314					;   TCO 5.1009		15-0CT-79	R. BELANGER	ADD RH-11 ERROR LOGGING
    315					;   TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
    316					;   RCO 5.0000		04-AUG-81	D. DEUFEL/S. LEAPLINE
    317					;							FIX BUG IN ECC CORRECTION
    318					;
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 8
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    320					;
    321					; CONDITIONAL ASSEMBLY SWITCH DEFINITIONS
    322					;
    323
    324		000001 			$DIRAC	=1
    325
    326					;R$$JPO	=1			; IF DEFINED, INCLUDE TRACK OFFSETTING
    327
    328		000001 			R$$E18 =1			; +++004 IF DEFINED, INCLUDE 18-BIT ECC CORRECTION
    329
    330					;R$$E16 =1			; +++004 IF DEFINED, INCLUDE 16-BIT ECC CORRECTION
    331
    332					;
    333					; MACRO LIBRARY CALLS
    334					;
    335
    336						.MCALL	WTSE$,CLEF$,MRKT$,QIOW$,DIR$,CALL,RETURN,.STKM,QIOSY$,WSIG$S
    337
    338	000070					QIOSY$
    339
    340
    341
    342					; DEVICE REGISTER AND STATUS BIT DEFINITIONS
    343
    344
    345		176700 			RPEXP=176700			; RPCS1 EXTERNAL PAGE ADDRESS
    346
    347
    348
    349		000000 			RPCS1=0				; CONTROL STATUS REGISTER 1
    350
    351		040000 			TRE=40000			; TRANSFER ERROR
    352		020000 			MCPE=20000			; MASSBUS CONTROL PARITY ERROR
    353		004000 			DVA=4000			; DRIVE AVAILABLE
    354
    355
    356
    357		000002 			RPWC=2				; WORD COUNT REGISTER
    358
    359		000004 			RPBA=4				; BUFFER ADDRESS REGISTER
    360
    361		000006 			RPDA=6				; DESIRED TRACK/SECTOR REGISTER
    362
    363
    364
    365		000010 			RPCS2=10			; CONTROL STATUS REGISTER 2
    366
    367		100000 			DLT=100000			; DATA LATE ERROR
    368		040000 			WCE=40000			; WRITE CHECK ERROR
    369		020000 			UPE=20000			; UNIBUS PARITY ERROR
    370		010000 			NED=10000			; NONEXISTENT DISK ERROR
    371		004000 			NEM=4000			; NONEXISTENT MEMORY ERROR
    372		002000 			PGE=2000			; PROGRAMMING ERROR
    373		001000 			MXF=1000			; MISSED TRANSFER ERROR
    374		000400 			MDPE=400			; MASSBUS DATA PARITY ERROR
    375
    376
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 8-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    377
    378		000012 			RPDS=12				; DRIVE STATUS REGISTER
    379
    380		040000 			ERR=40000			; ERROR SUMMARY BIT
    381		010000 			MOL=10000			; MEDIUM ONLINE
    382		004000 			WRL=4000			; WRITE LOCKED DRIVE
    383		001000 			PGM=1000			; PROGRAM MODE
    384		000200 			DRY=200				; DRIVE READY
    385		000100 			VV=100				; VOLUME VALID
    386
    387
    388
    389		000014 			RPER1=14			; ERROR SUMMARY REGISTER
    390
    391		100000 			DCK=100000			; DATA CHECK ERROR
    392		040000 			UNS=40000			; DRIVE UNSAFE
    393		020000 			OPI=20000			; OPERATION INCOMPLETE
    394		010000 			DTE=10000			; DRIVE TIMING ERROR
    395		004000 			WLE=4000			; WRITE LOCK ERROR
    396		002000 			IAE=2000			; INVALID DISK ADDRESS
    397		001000 			AOE=1000			; ADDRESS OVERFLOW
    398		000400 			HCRC=400			; HEADER CRC ERROR
    399		000200 			HCE=200				; HEADER COMPARE ERROR
    400		000100 			ECH=100				; ECC HARD ERROR
    401		000040 			WCF=40				; WRITE CLOCK FAILURE
    402		000020 			FER=20				; FORMAT ERROR
    403		000010 			CPE=10				; CONTROL BUS PARITY ERROR
    404		000004 			RMR=4				; REGISTER MODIFY REFUSED
    405		000002 			ILR=2				; ILLEGAL REGISTER
    406		000001 			ILF=1				; ILLEGAL FUNCTION
    407
    408
    409
    410		000016 			RPAS=16				; ATTENTION SUMMARY REGISTER
    411
    412		000020 			RPLA=20				; LOOKAHEAD REGISTER
    413
    414		000022 			RPDBR=22			; DATA BUFFER REGISTER
    415
    416		000024 			RPMR=24				; MAINTENENCE REGISTER
    417
    418		000026 			RPDT=26				; DRIVE TYPE REGISTER
    419
    420		000030 			RPSN=30				; DRIVE SERIAL NUMBER
    421
    422
    423		000032 			RPOF=32				; DRIVE OFFSET REGISTER
    424
    425		010000 			FMT22=10000			; FORMAT (1=16 BIT)
    426		004000 			ECI=4000			; ECC INHIBIT
    427		002000 			HCI=2000			; HEADER COMPARE INHIBIT
    428
    429
    430		000034 			RPDC=34				; DESIRED CYLINDER NUMBER
    431
    432		000044 			RPEC1=44			; ECC POSITION REGISTER
    433
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 8-2
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    434		000046 			RPEC2=46			; ECC PATTERN REGISTER
    435
    436					;
    437					; ERROR RETRY COUNT
    438					;
    439
    440		000010 			RETRY=8.			; CONTROLLER ERROR RETRY COUNT
    441
    442
    443					; LOCAL DATA
    444					;
    445					;
    446
    447	000070				RPHD::
    448	000070					.STKM	0,0,0,0,0,0,0,DBINI,174000,RPSTK
	000136	000000 	000000 	000000 		.WORD	0,0,0,0
	000144	000000
	000164	174000 	000512'	000350'		.WORD	174000,DBINI,RPSTK
	000220	000005 				.WORD	5
	000222	000000G				.WORD	TTPEN
	000224	000000 				.WORD	0
	000226	000000 				.WORD	0
	000230	000000 				.WORD	0
	000232	000000 				.WORD	0
	000234	000000 				.WORD	0
	000236	000000 				.WORD	0
	000240	000000 				.WORD	0
	000242	000000 				.WORD	0
	000244	000000 				.WORD	0
	000246	000000 				.WORD	0
	000350	000000 				.WORD	0
	000352	000000 				.WORD	0
	000354	000000 				.WORD	0
	000356	000000 				.WORD	0
	000360	000000 				.WORD	0
	000362	000000 				.WORD	0
	000364	000512'				.WORD	DBINI
	000366	174000 				.WORD	174000
    449
    450	000370				DBIOD:
    451	000370					WTSE$	E.IOD
	000370	   051 	   002 			.BYTE	41.,2
	000372	000000G				.WORD	E.IOD
    452
    453	000374				CLIOD:
    454	000374					CLEF$	E.IOD		; CLEAR I/O DONE FLAG
	000374	   037 	   002 			.BYTE	31.,2
	000376	000000G				.WORD	E.IOD
    455
    456	000400				RPWLO:
    457	000400					WTSE$	E.NIR		; WAIT FOR QIO
	000400	   051 	   002 			.BYTE	41.,2
	000402	000000G				.WORD	E.NIR
    458
    459	000404				MKDNR::
    460	000404					MRKT$	1,74.*10,0,0	; WAIT FOR FIX
	000404	   027 	   005 			.BYTE	23.,5
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 8-3
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

	000406	000001 				.WORD	1
	000410	001120 				.WORD	74.*10
	000412	000000 				.WORD	0
	000414	000000 				.WORD	0
    461
    462	000416				WFDNR::
    463	000416					WTSE$	1		; WAIT
	000416	   051 	   002 			.BYTE	41.,2
	000420	000001 				.WORD	1
    464
    465	000422				MSGDPB:
    466	000422					QIOW$	IO.WVB,1,1,1,0,0,<,MSGSIZ>
	000422	   003 	   010 			.BYTE	3,$$$ARG
	000424	011000 				.WORD	IO.WVB
	000426	000001 				.WORD	1
	000430	   001 	   001 			.BYTE	1,1
	000432	000000 				.WORD	0
	000434	000000 				.WORD	0
	000436	000000 				.WORD
	000440	000016 				.WORD	MSGSIZ
    467
    468	000442				DNMSG:
    469	000442	   015 	   012 	   104 		.ASCII	<15><12>"DB NOT RDY"<15><12>
	000445	   102 	   040 	   116
	000450	   117 	   124 	   040
	000453	   122 	   104 	   131
	000456	   015 	   012
    470
    471	000460				DUNS:
    472	000460	   015 	   012 	   104 		.ASCII	<15><12>"DB UNSAFE "<15><12>
	000463	   102 	   040 	   125
	000466	   116 	   123 	   101
	000471	   106 	   105 	   040
	000474	   015 	   012
    473						.EVEN
    474
    475		000016 			MSGSIZ	=14.			; MESSAGE SIZE
    476
    497
    499
    500	000476				ECCWRD:
    501	000476	000000 	000000 	000000 		.WORD	0,0,0
    502	000504				ECCMSK:
    503	000504	000000 	000000 	000000 		.WORD	0,0,0
    504
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 9
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    507					;
    508					;+
    509					; **-DBINI-RH11-RP04 DISK PACK CONTROLLER INITIATOR
    510					;
    511					; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST
    512					; IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPAGATE THE EXECU-
    513					; TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY, THEN AN ATTEMPT
    514					; IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS
    515					; EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL, THEN THE NEXT I/O OPER-
    516					; ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED.
    517					;
    518					; INPUTS:
    519					;
    520					;
    521					; OUTPUTS:
    522					;
    523					;	IF THE SPECIFIED CONTROLLER IS NOT BUSY AND AN I/O REQUEST IS WAIT-
    524					;	ING TO BE PROCESSED, THEN THE REQUEST IS DEQUEUED AND THE I/O OPER-
    525					;	ATION IS INITIATED.
    526					;-
    527
    528						.ENABL	LSB
    529
    530	000512				DBINI:
    531	000512					DIR$	#RPWLO		; WAIT FOR SOMETHING TO DO
	000512	012746 	000400'			MOV	#RPWLO,-(SP)
	000516	104375 				EMT	375
    532	000520	012700 	041104 			MOV	#"DB,R0		; DQ THE REQUEST
    533	000524					CALL	..DQRN
	000524	004737 	000000G			JSR	PC,..DQRN
    534	000530	103770 				BCS	DBINI		; NOTHING GO BACK TO SLEEP
    535
    550
    551	000532				4$:
    552	000532	010137 	000000G			MOV	R1,RPRNA	; SAVE THE REQUST NODE ADDRESS
    553	000536	010337 	000000G			MOV	R3,RPCNT	; SAVE THE TRANSFER SIZE
    554	000542	010237 	000000G			MOV	R2,RPUNIT	; SAVE UNIT NUMBER
    555	000546	010537 	000002G			MOV	R5,RPBUF+2	; SAVE THE XFER ADDRESS
    556	000552	006304 				ASL	R4		; SHIF TO CORRECT POSITION
    557	000554	006304 				ASL	R4
    558	000556	006304 				ASL	R4
    559	000560	006304 				ASL	R4
    560	000562	010437 	000000G			MOV	R4,RPBUF	; SAVE ADDRESS (HIGH ORDER)
    561	000566	052737 	000171 	000000G		BIS	#171,RPBUF	; ASSUME READ LOGICAL FUNCTION
    562	000574	122761 	000002 	000001G		CMPB	#IO.RLB/256.,R.FC+1(R1) ; READ LOGICAL FUNCTION?
    563	000602	001412 				BEQ	10$		; IF EQ YES
    564	000604	122761 	000001 	000001G		CMPB	#IO.WLB/256.,R.FC+1(R1)
    565	000612	001403 				BEQ	5$
    566	000614	012703 	177776 			MOV	#IE.IFC,R3
    567	000620	000553 				BR	46$
    568						;
    569	000622				5$:
    570	000622	162737 	000010 	000000G		SUB	#10,RPBUF	; CONVERT TO WRITE LOGICAL FUNCTION
    571	000630				10$:
    572	000630	012737 	000010 	000000G		MOV	#RETRY,RPRTC	; SET RETRY COUNT
    573
    580
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 9-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    581	000636	005002 				CLR	R2
    582	000640	156102 	000006G			BISB	R.PB+6(R1),R2
    583	000644	016100 	000010G			MOV	R.PB+10(R1),R0
    584	000650	010103 				MOV	R1,R3		; SAVE NODE ADDRESS
    585	000652	012701 	000020 			MOV	#16.,R1
    586
    587	000656				20$:
    588	000656	006300 				ASL	R0
    589	000660	006102 				ROL	R2		;
    590	000662	020227 	000574 			CMP	R2,#19.*20.	; PARTIAL REMAINDER LARGER THAN DIVISOR?
    591	000666	103403 				BLO	30$		; IF LO NO
    592	000670	162702 	000574 			SUB	#19.*20.,R2
    593	000674	005200 				INC	R0
    594	000676				30$:
    595	000676	005301 				DEC	R1
    596	000700	003366 				BGT	20$		; IF GT YES
    597	000702	010063 	000006G			MOV	R0,R.PB+6(R3)
    598	000706	010200 				MOV	R2,R0		; SET DIVIDEND TO TRACK/SECTOR REMAINDER
    599	000710	012701 	000024 			MOV	#20.,R1		; SET DIVISOR TO NUMBER OF SECTORS/TRACK
    600	000714					CALL	$DIV		; CALCULATE TRACK AND SECTOR
	000714	004737 	000032'			JSR	PC,$DIV
    601	000720	000300 				SWAB	R0		; SWAP TRACK TO HIGH BYTE
    602	000722	050100 				BIS	R1,R0		; MERGE TRACK
    603	000724	010063 	000010G			MOV	R0,R.PB+10(R3)
    604
    605					;
    606					; INITIATE I/O OPERATION
    607					;
    608
    609	000730				40$:
    610	000730	012703 	176710 			MOV	#RPEXP+RPCS2,R3	; GET ADDRESS OF CSR
    611	000734	012713 	000040 			MOV	#40,@R3		; CLEAR RH11+CONTROLLER
    612	000740	113713 	000000G			MOVB	RPUNIT,@R3
    613	000744	012703 	176700 			MOV	#RPEXP,R3
    614	000750				41$:
    615	000750	012713 	000023 			MOV	#23,@R3		; [5.1003] EXECUTE PACK ACK FUNCTION TO SET VV
    616	000754	032737 	000340 	177776 		BIT	#340,@#PS	; IN INTERRUPT SERVICE?
    617	000762	001007 				BNE	42$		; LEAVE IT ALONE -- MUST HAVE PORT HERE
    618	000764	032713 	004000 			BIT	#DVA,@R3	; DRIVE AVAILABLE?
    619	000770	001004 				BNE	42$		; YES -- USE IT
    620	000772					WSIG$S			; NO -- BETTER WAIT FOR IT
	000772	012746 				MOV	(PC)+,-(SP)
	000774	   061 	   001 			.BYTE	49.,1
	000776	104375 				EMT	375
    621	001000	000763 				BR	41$		; MAKE ANOTHER TRY
    622						;
    623	001002				42$:
    624	001002	012713 	000023 			MOV	#23,@R3		; PACK ACK AGAIN
    625	001006	032713 	004000 			BIT	#DVA,@R3	; WATCH FOR TIMING AND MISSING DRIVE
    626	001012	001756 				BEQ	41$		; MISSED IT -- TRY AGAIN
    627	001014				43$:
    628	001014	013702 	000000G			MOV	RPRNA,R2	; GET ADDRESS OF I/O PACKET
    629	001020	012703 	176710 			MOV	#RPEXP+RPCS2,R3	; POINT TO SECOND CSR
    630	001024	113713 	000000G			MOVB	RPUNIT,@R3 	; SELECT PROPER DRIVE
    631	001030	016243 	000010G			MOV	R.PB+10(R2),-(R3) ; INSERT TRACK/SECTOR ADDRESS
    632	001034	013743 	000002G			MOV	RPBUF+2,-(R3) 	; INSERT BUFFER ADDRESS
    633	001040	013743 	000000G			MOV	RPCNT,-(R3)	; INSERT NUMBER OF BYTES TO TRANSFER
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 9-2
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    634	001044	006013 				ROR	@R3		; CONVERT TO WORD COUNT
    635	001046	005413 				NEG	@R3		; MAKE NEGATIVE WORD COUNT
    636	001050	005743 				TST	-(R3)		; POINT TO BEGINNING
    637
    648
    649	001052	012700 	000375 			MOV	#IE.DNR&377,R0	; ASSUME DRIVE NOT READY
    650	001056	016301 	000012 			MOV	RPDS(R3),R1	; GET CURRENT DRIVE STATUS
    651	001062	005101 				COM	R1		; COMPLEMENT STATUS
    652	001064	032701 	010300 			BIT	#MOL!DRY!VV,R1	; DRIVE READY?
    653	001070	001035 				BNE	47$		; IF NE NO
    654	001072	032763 	040000 	000014 		BIT	#UNS,RPER1(R3)	; DRIVE UNSAFE?
    655	001100	001052 				BNE	49$		; IF NE YES
    656	001102	016263 	000006G	000034 		MOV	R.PB+6(R2),RPDC(R3) ; SET DESIRED CYLINDER ADDRESS
    657	001110	013713 	000000G			MOV	RPBUF,@R3	; START FUNCTION
    658	001114	032737 	000340 	177776 		BIT	#340,@#PS	; CHECK FOR RESTART FROM INTERRUPT SERVICE LEVEL
    659	001122	001136 				BNE	85$		; YES -- RETURN FROM INTERRUPT
    660	001124					DIR$	#DBIOD		; WAIT FOR I/O DONE
	001124	012746 	000370'			MOV	#DBIOD,-(SP)
	001130	104375 				EMT	375
    661	001132					DIR$	#CLIOD		; CLEAR I/O DONE FLAG
	001132	012746 	000374'			MOV	#CLIOD,-(SP)
	001136	104375 				EMT	375
    662	001140	013701 	000000G			MOV	RPRNA,R1	; FIND THE REQUEST NODE
    663	001144	013703 	000000G			MOV	RPBUF,R3	; FIND THE I/O STATUS
    664	001150				46$:
    665	001150	013704 	000002G			MOV	RPBUF+2,R4	; BOTH HALVES
    666	001154					CALL	..IODN		; FINISH I/O
	001154	004737 	000000G			JSR	PC,..IODN
    667	001160	000137 	000512'			JMP	DBINI		; WAIT FOR NEXT
    668						;
    669	001164				47$:
    670	001164	012737 	000442'	000436'		MOV	#DNMSG,MSGDPB+Q.IOPL  ; SET FOR NOT READY MESSAGE
    671
    672	001172				48$:
    673	001172	032737 	000340 	177776 		BIT	#340,@#PS	; CHECK FOR ENTRY FROM PRI
    674	001200	001060 				BNE	60$		; YES -- GO RE-TRY
    675	001202					DIR$	#MSGDPB		; COMPLAIN
	001202	012746 	000422'			MOV	#MSGDPB,-(SP)
	001206	104375 				EMT	375
    676	001210					DIR$	#MKDNR		; WAIT FOR FIX
	001210	012746 	000404'			MOV	#MKDNR,-(SP)
	001214	104375 				EMT	375
    677	001216					DIR$	#WFDNR		; WAIT
	001216	012746 	000416'			MOV	#WFDNR,-(SP)
	001222	104375 				EMT	375
    678	001224	000641 				BR	40$		; AND TRY AGAIN
    679						;
    680	001226				49$:
    681	001226	012737 	000460'	000436'		MOV	#DUNS,MSGDPB+Q.IOPL  ; SET FOR UNSAFE MESSAGE
    682	001234	000756 				BR	48$		; TYPE MESSAGE
    683						;
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    685					;
    686					;+
    687					; **-.DBINT-RH11-RP04 DISK PACK CONTROLLER INTERRUPTS
    688					;-
    689					;
    690
    691	001236				.DBINT::
    692	001236	010046 				MOV	R0,-(SP)	;;; SAVE REGISTERS
    693	001240	010146 				MOV	R1,-(SP)
    694	001242	010246 				MOV	R2,-(SP)
    695	001244	010346 				MOV	R3,-(SP)
    696	001246	012702 	176700 			MOV	#RPEXP,R2	;;; GET ADDRESS OF CSR
    697
    704
    705	001252	012700 	000001 			MOV	#IS.SUC&377,R0	;;; ASSUME SUCCESSFUL TRANSFER
    706	001256	032712 	060000 			BIT	#TRE!MCPE,@R2	;;; ANY ERRORS?
    707	001262	001432 				BEQ	70$		;;; IF EQ NO
    708	001264	012700 	000374 			MOV	#IE.VER&377,R0	;;; ASSUME UNRECOVERABLE ERROR
    709	001270	016201 	000014 			MOV	RPER1(R2),R1	;;; GET CONTENTS OF ERROR REGISTER
    710	001274	032701 	047007 			BIT	#UNS!WLE!IAE!AOE!RMR!ILR!ILF,R1	;;; HARD ERROR?
    711	001300	001004 				BNE	50$		;;; IF NE YES
    712	001302	032762 	014000 	000010 		BIT	#NED!NEM,RPCS2(R2) ;;; HARD ERROR?
    713	001310	001453 				BEQ	100$		;;; IF EQ NO
    714	001312				50$:
    715	001312	032701 	004000 			BIT	#WLE,R1		;;; WRITE LOCK ERROR?
    716	001316	001403 				BEQ	52$		;;; IF EQ NO
    717	001320	012700 	000364 			MOV	#IE.WLK&377,R0	;;; SET WRITE LOCK ERROR
    718	001324	000415 				BR	80$		;;;
    719						;
    720	001326				52$:
    721	001326	032701 	003000 			BIT	#IAE!AOE,R1	;;; CHECK FOR ILLEGAL CYL
    722	001332	001412 				BEQ	80$		;;; NO --  UNRECOVERABLE ERROR
    723	001334	012700 	000354 			MOV	#IE.BLK&377,R0	;;; SET ILLEGAL BLOCK
    724	001340	000407 				BR	80$		;;; AND RETURN
    725						;
    737
    738					;
    739					; DEVICE TIMEOUT RESULTS IN THE CURRENT OPERATION BEING REPEATED. TIMEOUTS ARE
    740					; USUALLY CAUSED BY POWERFAILURE BUT MAY ALSO BE THE RESULT OF A HARDWARE FAILURE
    741					;
    742
    743	001342				60$:
    744	001342	105337 	000000G			DECB	RPRTC		;;; RETRY FUNCTION?
    745
    751
    752	001346	003032 				BGT	82$		;;; IF GT YES
    753
    755
    756	001350				70$:
    757	001350	013701 	000000G			MOV	RPRNA,R1	;;; GET ADDRESS OF I/O PACKET
    758	001354	016101 	000002G			MOV	R.PB+2(R1),R1	;;; SET FINAL VALUE OF SECOND STATUS WORD
    759	001360				80$:				;;; REF LABEL
    760	001360	012712 	000013 			MOV	#13,@R2		;;; RELEASE DUAL PORT
    761	001364	010037 	000000G			MOV	R0,RPBUF	;;; SAVE THE STATUS
    762	001370	010137 	000002G			MOV	R1,RPBUF+2
    763	001374	052737 	000000G	000020G		BIS	#EF.IOD,RPTSK+A.EF ;;; SET I/O DONE
    764	001402					CALL	..DSEV		;;; DECLARE SIG EVENT
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

	001402	004737 	000000G			JSR	PC,..DSEV
    765	001406	105737 	000000G			TSTB	RPBUF+0		;;; [5.1009] DID WE GET AN ERROR??
    766	001412	100002 				BPL	85$		;;; [5.1009] NO -- GO ON
    767	001414					CALL	300$		;;; [5.1009] YES -- QUEUE UP AN ERROR LOG REQUEST
	001414	004737 	001750'			JSR	PC,300$
    768	001420				85$:
    769	001420	012603 				MOV	(SP)+,R3	;;; RESTORE REGISTERS
    770	001422	012602 				MOV	(SP)+,R2
    771	001424	012601 				MOV	(SP)+,R1
    772	001426	012600 				MOV	(SP)+,R0
    773	001430	000137 	000000G			JMP	@#..INTX	;;; RETURN FROM INTERRUPTS
    774						;
    775	001434				82$:
    776	001434	000137 	000730'			JMP	40$
    777						;
    784
    785	001440				100$:
    786	001440	032762 	163400 	000010 		BIT	#DLT!WCE!UPE!PGE!MXF!MDPE,RPCS2(R2) ;;; CONTROLLER ERROR?
    787	001446	001335 				BNE	60$		;;; IF NE YES
    788
    795
    796	001450	005701 				TST	R1		;;; DATA CHECK ERROR?
    797	001452	100333 				BPL	60$		;;; IF PL NO
    798
    800
    801	001454	032701 	000100 			BIT	#ECH,R1		;;; ECC HARD ERROR?
    802	001460	001330 				BNE	60$		;;; IF NE YES
    803
    805
    806					;
    807					; START ECC CORRECTION PROCEDURE
    808					;
    809					; FIRST CALCULATE THE BYTE OFFSET TO THE START OF BLOCK TRANSFERED
    810					;
    811
    812	001462				105$:
    813	001462	016203 	000002 			MOV	RPWC(R2),R3	;;; GET NEGATIVE NUMBER OF WORDS REMAINING
    814	001466	006303 				ASL	R3		;;; CONVERT TO NEGATIVE BYTES REMAINING
    815	001470	063703 	000000G			ADD	RPCNT,R3	;;; CALCULATE NUMBER OF BYTES TRANSFERED
    816
    825
    826	001474	005303 				DEC	R3		;;; CALCULATE OFFSET TO START OF BLOCK
    827	001476				107$:
    828	001476	042703 	000777 			BIC	#777,R3		;;; CLEAR RESIDUE
    829
    837
    839
    840					;
    841					; 18-BIT ECC CORRECTION ROUTINES
    842					;
    843					; THE WORD IN ERROR AND THE WORD FOLLOWING IT ARE SET UP AS A TRIPLET
    844					; (TWO 18-BIT WORDS) AS IS THE ECC CORRECTION MASK FROM THE CONTROLLER.
    845					; THE MASK TRIPLET IS POSITIONED OVER THE DATA TRIPLET, CORRECTION IS
    846					; APPLIED, AND THE TWO DATA WORDS RETUNED TO THE BUFFER. THE CURRENT
    847					; OPERATION THEN PROCEEDS NORMALLY.
    848					;
    849	001502	016200 	000044 			MOV	RPEC1(R2),R0	;;; LOOK AT POSITION REGISTER
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10-2
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    850	001506	001003 				BNE	109$		;;; 5.000 BRANCH IF OK
    851	001510	112700 	000374 			MOVB	#IE.VER&377,R0	;;; 5.000 INDICATE ERROR
    852	001514	000721 				BR	80$		;;; AND EXIT
    853	001516	005300 			109$:	DEC	R0		;;; MINUS 1
    854	001520	012701 	000022 			MOV	#^D18,R1	;;; DIVIDE BY 18.
    855	001524					CALL	$DIV		;;; SO
	001524	004737 	000032'			JSR	PC,$DIV
    856					;
    857					; COMPUTE THE ADDRESS OF THE WORD IN ERROR
    858					;
    859					;	R0 -- WORD OFFSET IN TRANSFER
    860					;	R1 -- SHIFT COUNT FOR ECC MASK
    861					;	R2 -- BASE OF CONTROLLER REGISTERS
    862					;	R3 -- OFFSET INTO TRANSFER BUFFER
    863					;
    864	001530	006300 				ASL	R0		;;; CONVERT TO BYTE OFFSET
    865	001532	063703 	000002G			ADD	RPBUF+2,R3	;;; BUFFER ADDRESS TO R3
    866	001536	060003 				ADD	R0,R3		;;; POINT TO WORD IN ERROR
    867					;
    868					; CONSTRUCT THE CORRECTION MASK TRIPLET
    869					;
    870	001540	012700 	000512'			MOV	#ECCMSK+6,R0	;;; POINT TO THE MASK BUFFER
    871	001544	005040 				CLR	-(R0)		;;; CLEAR IT OUT
    872	001546	005040 				CLR	-(R0)		;;; SO
    873	001550	016240 	000046 			MOV	RPEC2(R2),-(R0)	;;; SET THE MASK WORD IN THE BUFFER
    874	001554					CALL	141$		;;; SHIFT IT INTO CORRECT POSITION
	001554	004737 	001704'			JSR	PC,141$
    875					;
    876					; CONSTRUCT THE ERROR DATA TRIPLET
    877					;
    878	001560	005723 				TST	(R3)+		;;; POINT TO THE SECOND ERROR WORD
    879	001562	012700 	000504'			MOV	#ECCWRD+6,R0	;;; POINT TO THE ECC WORD BUFFER
    880	001566	005040 				CLR	-(R0)		;;; CLEAR IT OUT
    881	001570	005040 				CLR	-(R0)		;;; SO
    882	001572	011340 				MOV	(R3),-(R0)	;;; SET SECOND ERROR WORD IN BUFFER
    883	001574	012701 	000022 			MOV	#^D18,R1	;;; SHIFT IT INTO THE HIGH 18. BITS
    884	001600					CALL	141$		;;; SO
	001600	004737 	001704'			JSR	PC,141$
    885	001604	014310 				MOV	-(R3),(R0)	;;; SET THE FIRST ERROR WORD IN THE BUFFER
    886	001606	012701 	000504'			MOV	#ECCMSK,R1	;;; POINT TO THE SHIFTED MASK
    887					;
    888					; APPLY CORRECTION TO EACH WORD IN THE DATA TRIPLET
    889					;
    890	001612					CALL	130$		;;; CORRECT BITS 00 THRU 16
	001612	004737 	001672'			JSR	PC,130$
    891	001616					CALL	130$		;;; CORRECT BITS 17 THRU 32
	001616	004737 	001672'			JSR	PC,130$
    892	001622					CALL	130$		;;; CORRECT BITS 33 THRU 36
	001622	004737 	001672'			JSR	PC,130$
    893					;
    894					; REPLACE THE ERROR WORDS WITH THOSE JUST CORRECTED
    895					;
    896	001626	162700 	000006 			SUB	#6,R0		;;; BACK THE POINTER UP
    897	001632	011023 				MOV	(R0),(R3)+	;;; SET FIRST CORRECTED WORD IN BUFFER
    898	001634	012701 	177756 			MOV	#-^D18,R1	;;; SHIFT COUNT TO R1
    899	001640					CALL	141$		;;; SHIFT SECOND CORRECTED WORD DOWN
	001640	004737 	001704'			JSR	PC,141$
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10-3
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

    900	001644	011013 				MOV	(R0),(R3)	;;; SET SECOND CORRECTED WORD IN BUFFER
    901					;
    902					; CONTINUE OR TERMINATE PREVIOUS OPERATION
    903					;
    904
    906
    954
    955					;
    956					; SIXTH FINISH OR CONTINUE PREVIOUS FUNCTION
    957					;
    958
    959	001646	012700 	000001 			MOV	#IS.SUC&377,R0	;;; ASSUME SUCCESSFUL TRANSFER
    960	001652	112712 	000011 			MOVB	#11,@R2		;;; CLEAR DRIVE ERRORS
    961
    967
    968	001656	005762 	000002 			TST	RPWC(R2)	;;; ANY MORE WORDS TO TRANSFER?
    969
    971
    972	001662	001632 				BEQ	70$		;;; IF EQ NO
    973
    982
    983	001664	113712 	000000G			MOVB	RPBUF,@R2	;;; RESTART PREVIOUS OPERATION
    984	001670	000653 				BR	85$
    985						;
    987
    988					;
    989					; APPLY CORRECTION TO ONE WORD IN THE ERROR TRIPLET
    990					;
    991					; INPUTS:
    992					;
    993					;	R0 POINTS TO WORD IN DATA TRIPLET TO BE CORRECTED
    994					;	R1 POINTS TO WORD IN MASK TRIPLET TO BE APPLIED TO DATA
    995					;
    996					; OUTPUTS:
    997					;
    998					;	R0 POINTS TO THE NEXT WORD IN THE DATA TRIPLET
    999					;	R1 POINTS TO THE NEXT WORD IN THE MASK TRIPLET
   1000					;
   1001	001672				130$:
   1002	001672	011146 				MOV	(R1),-(SP)	;;; CURRENT MASK TO STACK
   1003	001674	041016 				BIC	(R0),(SP)	;;; .NOT. MASK .AND. DATA
   1004	001676	042110 				BIC	(R1)+,(R0)	;;; .NOT. DATA .AND. MASK
   1005	001700	052620 				BIS	(SP)+,(R0)+	;;; DATA .OR. MASK
   1006	001702				140$:
   1007	001702					RETURN			;;; FOR MORE
	001702	000207 				RTS	PC
   1008					;
   1009					; SHIFT A TRIPLET EITHER RIGHT OR LEFT
   1010					;
   1011					; INPUTS:
   1012					;
   1013					;	R0 POINTS TO TRIPLET TO BE SHIFTED
   1014					;	R1 HAS SHIFT COUNT -
   1015					;		.GT. 0 => SHIFT LEFT
   1016					;		.EQ. 0 => NO SHIFT
   1017					;		.LT. 0 => SHIFT RIGHT
   1018					;
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10-4
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1019					; NO REGISTERS ALTERED
   1020					;
   1021	001704				141$:
   1022	001704	010146 				MOV	R1,-(SP)	;;; SAVE SHIFT COUNT
   1023	001706	100407 				BMI	143$		;;; SHIFT RIGHT IF NEGATIVE
   1024	001710	001415 				BEQ	145$		;;; GO AWAY IF .EQ. 0
   1025	001712				142$:
   1026	001712	006320 				ASL	(R0)+		;;; SHIFT AWAY TO THE LEFT
   1027	001714	006120 				ROL	(R0)+		;;; PROPAGATE CARRY
   1028	001716	006110 				ROL	(R0)		;;; FOR ALL THREE WORDS
   1029	001720	024040 				CMP	-(R0),-(R0)	;;; BACK THE POINTER UP
   1030	001722	077105 				SOB	R1,142$		;;; LOOP TILL DONE
   1031	001724	000407 				BR	145$		;;; EXIT
   1032						;
   1033	001726				143$:
   1034	001726	005401 				NEG	R1		;;;  SO "SOB" WORKS
   1035	001730				144$:
   1036	001730	022020 				CMP	(R0)+,(R0)+	;;; 5.000 ADVANCE THE POINTER
   1037	001732	000241 				CLC			;;; 5.000 CLEAR THE CARRY BIT
   1038	001734	006010 				ROR	(R0)		;;; 5.000
   1039	001736	006040 				ROR	-(R0)		;;; 5.000
   1040	001740	006040 				ROR	-(R0)		;;; 5.000
   1041	001742	077106 				SOB	R1,144$		;;; TRY FOR MORE
   1042	001744				145$:
   1043	001744	012601 				MOV	(SP)+,R1	;;; RESTORE SHIFT COUNT
   1044	001746					RETURN			;;; TO CALLER
	001746	000207 				RTS	PC
   1045
   1047
   1067
   1068					;
   1069					; OFFSET RECOVERY
   1070					;
   1071
   1150	001750				300$:
   1151	001750	005737 	000002G			TST	.COMEF+2	;;; [4.1.1105] PRIMARY PROTOCOL RUNNING??
   1152	001754	100037 				BPL	340$		;;; [4.1.1105] NO -- JUST EXIT
   1153	001756	022737 	000002 	000000G		CMP	#2,.RPELC	;;; [5.1009] YES -- IS THERE SPACE IN THE QUEUE
   1154	001764	001433 				BEQ	340$		;;; [5.1009] NO -- EXIT
   1155	001766	012701 	000052 			MOV	#52,R1		;;; [5.1009] YES -- ALLOCATE A PACKET
   1156	001772					CALL	..ALCB		;;; [5.1009] SO
	001772	004737 	000000G			JSR	PC,..ALCB
   1157	001776	103426 				BCS	340$		;;; [5.1009] ERROR IF CC-C IS SET
   1158	002000	005237 	000000G			INC	.RPELC		;;; [5.1009] COUNT THIS NODE
   1159	002004	012702 	000000G			MOV	#.RPELQ,R2	;;; [5.1009] LISTHEAD POINTER TO R2
   1160	002010				310$:
   1161	002010	011203 				MOV	(R2),R3		;;; [5.1009] FIND THE END OF THE LIST
   1162	002012	001402 				BEQ	320$		;;; [5.1009] FOUND IT -- GO ON
   1163	002014	010303 				MOV	R3,R3		;;; [5.1009] NOT YET
   1164	002016	000774 				BR	310$		;;; [5.1009] TRY AGAIN
   1165						;
   1166	002020				320$:
   1167	002020	010012 				MOV	R0,(R2)		;;; [5.1009] LINK NEW NODE
   1168	002022	005020 				CLR	(R0)+		;;; [5.1009] MARK END OF LIST
   1169	002024	010120 				MOV	R1,(R0)+	;;; [5.1009] SET NODE SIZE
   1170	002026	012720 	000046 			MOV	#46,(R0)+	;;; [5.1009] SET TRANSFER SIZE
   1171	002032	012720 	000300 			MOV	#DV.LOG!DV.URE,(R0)+ ;;; [5.1009] SET STANDARD STATUS
DBDRV -- RP04/RP06 DRIVER	MACRO M1113  11-NOV-81 11:19  PAGE 10-5
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1172	002036	012701 	176700 			MOV	#RPEXP,R1	;;; [5.1009] POINT TO BASE OF DEVICE REGISTERS
   1173	002042	010120 				MOV	R1,(R0)+	;;; [5.1009] SET THAT IN PACKET
   1174	002044	012702 	000020 			MOV	#20,R2		;;; [5.1009] SET SIZE OF DEVICE
   1175	002050				330$:
   1176	002050	012120 				MOV	(R1)+,(R0)+	;;; [5.1009] LOAD UP THE PACKET
   1177	002052	077202 				SOB	R2,330$		;;; [5.1009] SO
   1178	002054				340$:
   1179	002054					RETURN			;;; [5.1009] TO CALLER
	002054	000207 				RTS	PC
   1180						.DSABL	LSB
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 12
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1442						.TITLE	DXDRV
   1443						.IDENT	/007000/
   1444					;
   1445					;                             COPYRIGHT (C) 1975, 1978 BY
   1446					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   1447					;
   1448					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   1449					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   1450					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   1451					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   1452					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   1453					;
   1454					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   1455					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   1456					;       CORPORATION.
   1457					;
   1458					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   1459					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   1460					;
   1461					;
   1462					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR RELIABILITY
   1463					; OF ITS  SOFTWARE ON  EQUIPMENT WHICH  IS NOT SUPPLIED BY DEC.
   1464					;
   1465					;
   1466					; VERSION:	07-00
   1467					; BY:		H. LEV
   1468					; RSX20F --	R. MCLEAN
   1469					; DATE:		16-JUN-75
   1470					;
   1471					;
   1472					; RX01 - RX11  FLOPPY DISK DRIVER
   1473					;
   1474					; FUNCTIONS RECOGNIZED:
   1475					;	IO.RPB	- READ PHYSICAL BLOCK (MAY READ ANY SECTOR ON DISK)
   1476					;	IO.WPB	- WRITE PHYSICAL BLOCK (MAY WRITE ANY SECTOR ON DISK)
   1477					;	IO.WDD	- WRITE DELETED DATA - WRITE ANY SECTOR ON DISK
   1478					;		  SETTING THE DELETED DATA MARK IN SECTOR HEADER
   1479					;	THE FOLLOWING TWO FUNCTION CODES OPERATE ON 256 WORD BLOCKS
   1480					;	OF DATA (4 SECTORS)  THE DRIVER AUTOMATICALLY INTERLEAVES
   1481					;	AND SKEWS SECTORS TO OPTIMIZE THE TRANSFER OF DATA
   1482					;	SO THAT A LONG READ/WRITE MAY BE DONE WITHOUT LOOSING
   1483					;	A REVOLUTION OF THE DISK.  THE INTERLEAVE FACTOR IS 2
   1484					;	AND THE SKEW FACTOR IS 6.
   1485					;	IO.RLB	- READ LOGICAL BLOCKS OF 256. WORDS
   1486					;	IO.WLB	- WRITE LOGICAL BLOCKS OF 256. WORDS.
   1487					;
   1488					;	IF DELETED DATA IS READ, THE STATUS CODE RETURNED WILL
   1489					;	BE IS.RDD, OTHERWISE IT IS IS.SUC
   1490					;
   1491					;
   1492					; MODIFICATIONS:
   1493					;
   1494					;	NO.	DATE		PROGRAMMER	PURPOSE
   1495					;	---	----		----------	-------
   1496					;	001	15-MAR-77	R. BELANGER	CONDITIONALLY ASSEMBLE
   1497					;						FLOPPY DRIVER
   1498					;	002	22-OCT-77	R. BELANGER	REMOVE CONDITIONALS
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 13
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1500						.MCALL	QIOSY$,$DEF
   1501	002056					QIOSY$
   1502						.MCALL	.STKM,WTSE$,DIR$,CALL,RETURN
   1503	002056					$DEF
   1504					;
   1505					;
   1506					; EQUATED SYMBOLS
   1507					;
   1508		000020 			A.EF=20		;LOCAL DEFINITION BECAUSE OF NO COMPLEX GLOBLS
   1509		177170 			DXEXP=177170	;EXTERNAL PAGE ADDRESS
   1510					;
   1511		000010 			RETRY	=	8.		; ERROR RETRY COUNT
   1512		000040 			PHYBLK	=	40		; PHYSICAL BLOCK SUBFUNCTION CODE
   1513					;
   1514					;
   1515					; RX11 DEVICE REGISTER OFFSETS AND BIT DEFINITIONS
   1516					;
   1517					;
   1518		000000 			RXCS	=	0		; CONTROL STATUS REGISTER
   1519		000002 			RXDB	=	2		; DATA BUFFER
   1520		000020 			UNIT	=	20		; UNIT SELECT BIT
   1521		000040 			DONE	=	40		; RX11 DONE
   1522		000100 			INTEBL	=	100		; INTERRUPT ENABLE
   1523		000200 			TR	=	200		; RX11 TRANSFER READY BIT (CPU-SILO)
   1524		040000 			INIT	=	40000		; INITIALIZE RX11
   1525					;
   1526					;
   1527					; FUNCTION CODES
   1528					;
   1529		000001 			GO	=	1		; GO BIT
   1530		000001 			FILL	=	0!GO		; FILL SILO
   1531		000003 			EMPTY	=	2!GO		; EMPTY SILO
   1532		000005 			WRITE	=	4!GO		; WRITE A SECTOR
   1533		000007 			READ	=	6!GO		; READ A SECTOR
   1534		000015 			WRTDD	=	14!GO		; WRITE DELETED DATA
   1535					;
   1536	002056				DXHD::	.STKM	0,0,0,0,0,0,0,DXINI,174000,DXSTK
	002124	000000 	000000 	000000 		.WORD	0,0,0,0
	002132	000000
	002152	174000 	002366'	002336'		.WORD	174000,DXINI,DXSTK
	002206	000005 				.WORD	5
	002210	000000G				.WORD	TTPEN
	002212	000000 				.WORD	0
	002214	000000 				.WORD	0
	002216	000000 				.WORD	0
	002220	000000 				.WORD	0
	002222	000000 				.WORD	0
	002224	000000 				.WORD	0
	002226	000000 				.WORD	0
	002230	000000 				.WORD	0
	002232	000000 				.WORD	0
	002234	000000 				.WORD	0
	002336	000000 				.WORD	0
	002340	000000 				.WORD	0
	002342	000000 				.WORD	0
	002344	000000 				.WORD	0
	002346	000000 				.WORD	0
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 13-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

	002350	000000 				.WORD	0
	002352	002366'				.WORD	DXINI
	002354	174000 				.WORD	174000
   1537					;
   1538	002356				WFPKT:	WTSE$	E.NIR
	002356	   051 	   002 			.BYTE	41.,2
	002360	000000G				.WORD	E.NIR
   1539					;
   1540	002362				DXIOD:	WTSE$	E.IOD
	002362	   051 	   002 			.BYTE	41.,2
	002364	000000G				.WORD	E.IOD
   1541					;
   1542					;
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 14
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1544					;+
   1545					; *** - DXINI  FLOPPY DISK CONTROLLER INITIATOR
   1546					;
   1547					; THIS ROUTINE IS ENTERED FROM THE QIO DIRECTIVE WHEN AN I/O REQUEST
   1548					; IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPOGATE THE
   1549					; EXECUTION OF THE DRIVER.  IF THE SPECIFIED CONTROLLER IS NOT BUSY,
   1550					; THEN AN ATTEMPT IS MADE TO DEQUEUE THE NEXT I/O REQUEST.  OTHERWISE
   1551					; A RETURN TO THE CALLER IS EXECUTED.  IF THE DEQUEUE ATTEMPT IS SUCCESSFUL
   1552					; THE NEXT I/O OPERATION IS INITIATED.  A RETURN TO THE CALLER IS THEN
   1553					; EXECUTED.
   1554					;
   1555					; INPUTS:
   1556					;	R5 - ADDRESS OF UCB WHICH IS ASSOCIATED WITH CONTROLLER TO BE INITIATED
   1557					;
   1558					; OUTPUTS:
   1559					;	IF THE CONTROLLER ASSOCIATED WITH THE SPECIFIED UCB IS NOT
   1560					;	BUSY AND AN I/O REQUEST IS WAITING TO BE PROCESSED, THE REQUEST
   1561					;	IS DEQUEUED AND THE DRIVER INITIATES THE REQUESTED FUNCTION.
   1562					;
   1563					;-
   1564						.ENABL	LSB
   1565	002366				DXINI:	DIR$	#WFPKT		;WAIT FOR PACKET TO DO SOME WORK
	002366	012746 	002356'			MOV	#WFPKT,-(SP)
	002372	104375 				EMT	375
   1566	002374	012700 	054104 		5$:	MOV	#"DX,R0		;TRY TO DQ
   1567	002400					CALL	..DQRN		;DQ A PACKET
	002400	004737 	000000G			JSR	PC,..DQRN
   1568	002404	103770 				BCS	DXINI
   1569	002406	005702 				TST	R2
   1570	002410	001402 				BEQ	7$
   1571	002412	012702 	000020 			MOV	#UNIT,R2
   1572	002416	010237 	000000G		7$:	MOV	R2,DXUNIT	;SAVE UNIT NUMBER
   1573	002422	010537 	000000G			MOV	R5,DXBUF	;SAVE ADDRESS OF BUFFER
   1574	002426	010337 	000000G			MOV	R3,DXCNT	;SAVE BYTE COUNT
   1575	002432	010137 	000000G			MOV	R1,DXPKT	;SAVE THE PACKET
   1576	002436	122761 	000002 	000001G		CMPB	#IO.RLB/256.,R.FC+1(R1)	;CHECK FOR VALID FUNCTION
   1577	002444	001404 				BEQ	6$
   1578	002446	122761 	000001 	000001G		CMPB	#IO.WLB/256.,R.FC+1(R1)
   1579	002454	001062 				BNE	ILFCD
   1580	002456				6$:
   1581					;
   1582					; USAGE OF WORDS IN DXVCB
   1583					;	DXVCB+2 - LOGICAL OR PHYSICAL SECTOR NUMBER
   1584					;	DXVCB+4 - BYTES TO TRANSFER ON CURRENT SECTOR
   1585					;	DXVCB+6 - CURRENT FUNCTION CODE
   1586					;	DXVCB+10 - PHYSICAL SECTOR NUMBER(1-26.)
   1587					;	DXVCB+11 - PHYSICAL TRACK NUMBER (0-77.)
   1588					;	DXVCB+12 - STATUS REGISTER AFTER INTERRUPT
   1589					;
   1590					;
   1591					;
   1592					; INITIALIZE DRIVER
   1593					;
   1594	002456	012737 	000010 	000000G	10$:	MOV	#RETRY,DXRTC ; SET RETRY COUNT
   1595	002464	105761 	000006G			TSTB	R.PB+6(R1)	; HIGH BLOCK SPECIFIED?
   1596	002470	001161 				BNE	180$		;NO
   1597					;
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 14-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1598					; SET UP FIRST BLOCK OR SECTOR NUMBER
   1599					;
   1600	002472	016100 	000010G		20$:	MOV	R.PB+10(R1),R0	; GET PHYSICAL OR LOGICAL BLOCK NUMBER
   1601	002476	132761 	000040 	000000G		BITB	#PHYBLK,R.FC(R1) ; IS IT READ/WRITE PHYSICAL
   1602	002504	001002 				BNE	30$		; YES
   1603	002506	006300 				ASL	R0		; CONVERT TO LOGICAL SECTOR NUMBER
   1604	002510	006300 				ASL	R0		; WHICH IS LBN*4
   1605	002512	010037 	000002G		30$:	MOV	R0,DXVCB+2	; STORE IT
   1606	002516	016137 	000000G	000006G		MOV	R.FC(R1),DXVCB+6 ; SAVE FUNCTION CODE
   1607	002524	012703 	177170 		35$:	MOV	#DXEXP,R3	; GET CSR ADDRESS
   1608	002530					CALL	TRKSEC		; CONVERT BLOCK NUMBER TO TRACK/SECTOR
	002530	004737 	003272'			JSR	PC,TRKSEC
   1609	002534	103537 				BCS	180$		; BAD BLOCK NUMBER
   1610	002536	012702 	000007 			MOV	#READ,R2	; ASSUME READ FUNCTION
   1611	002542	122737 	000001 	000007G		CMPB	#IO.WLB/256.,DXVCB+7 ; WRITE?
   1612	002550	001064 				BNE	95$		; NO
   1613					;
   1614					; FILL SILO BEFORE WRITE
   1615					;
   1616	002552					CALL	SETBUF		; SET UP BUFFER POINTER AND MAPPING REGISTER
	002552	004737 	003442'			JSR	PC,SETBUF
   1617	002556	010304 				MOV	R3,R4		; COPY CSR ADDRESS
   1618	002560	012724 	000001 			MOV	#FILL,(R4)+	; SET FILL BUFFER FUNCTION
   1619	002564	005002 			70$:	CLR	R2		; ASSUME NO DATA TO TRANSFER
   1620	002566	005301 				DEC	R1		; MORE DATA TO TRANSFER?
   1621	002570	002401 				BLT	74$		; NO
   1622	002572	112002 				MOVB	(R0)+,R2	; YES, GET NEXT BYTE
   1623	002574	132713 	000240 		74$:	BITB	#TR!DONE,@R3	; IS CONTROLLER READY FOR NEXT BYTE
   1624	002600	100402 				BMI	76$		; YES
   1625	002602	001774 				BEQ	74$		; NO, WAIT UNTIL IT IS
   1626	002604	000402 				BR	90$		; YES, SILO FULL
   1627	002606	110214 			76$:	MOVB	R2,@R4		; NO, PUT NEXT BYTE IN SILO
   1628	002610	000765 				BR	70$		; AND WAIT TILL IT'S ACCEPTED
   1629					;
   1630	002612	005701 			90$:	TST	R1		; TRANSFERED ALL REQUESTED BYTES
   1631	002614	100432 				BMI	140$		; YES
   1632	002616	000137 	003250'			JMP	DXRTY		;NO, ERROR
   1633					;
   1634	002622	012703 	000376 		ILFCD:	MOV	#IE.IFC&377,R3		;NO -- ILLEGAL FUNCTION
   1635	002626	000467 				BR	157$
   1636					;
   1637					;
   1638					; EMPTY SILO AFTER READ
   1639					;
   1640	002630	010304 			100$:	MOV	R3,R4		; GET CSR ADDRESS
   1641	002632	012724 	000003 			MOV	#EMPTY,(R4)+	; SET EMPTY BUFFER FUNCTION
   1642	002636					CALL	SETBUF		; SET BUFFER POINTER AND MAPPING REGISTER
	002636	004737 	003442'			JSR	PC,SETBUF
   1643	002642	132713 	000240 		110$:	BITB	#TR!DONE,@R3	; NEXT BYTE READY FOR US?
   1644	002646	100402 				BMI	114$		; YES
   1645	002650	001774 				BEQ	110$		; NO, WAIT TILL IT IS
   1646	002652	000405 				BR	120$		; NO, SILO IS EMPTY
   1647					;
   1648	002654	111402 			114$:	MOVB	@R4,R2		; GET NEXT BYTE
   1649	002656	005301 				DEC	R1		; DO WE WANT IT?
   1650	002660	002770 				BLT	110$		; NO
   1651	002662	110220 				MOVB	R2,(R0)+	; YES, PUT IT IN BUFFER
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 14-2
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1652	002664	000766 				BR	110$		; GET NEXT BYTE
   1653					;
   1654	002666	005701 			120$:	TST	R1		; ALL BYTES TRANSFERED?
   1655	002670	003167 				BGT	DXRTY		; NO, ERROR
   1656	002672					CALL	NXTSEC		; UPDATE TO NEXT SECTOR
	002672	004737 	003420'			JSR	PC,NXTSEC
   1657	002676	001523 				BEQ	193$		; ALL DONE
   1658	002700	000711 				BR	35$		; CONTINUE
   1659					;
   1660					; INITIATE TRANSFER BETWEEN SILO AND DISK
   1661					;
   1662	002702	012702 	000005 		140$:	MOV	#WRITE,R2	; DEFAULT WRITE FUNCTION
   1663	002706	032737 	000004 	000006G		BIT	#4,DXVCB+6	; WRITE DELETED DATA?
   1664	002714	001402 				BEQ	150$		; NO
   1665	002716	012702 	000015 			MOV	#WRTDD,R2	; YES, SET WRITE DELETED DATA
   1666	002722				95$:
   1667	002722	053702 	000000G		150$:	BIS	DXUNIT,R2	; YES, SET TO SELECT UNIT
   1668	002726	010213 			152$:	MOV	R2,@R3		; INITIATE FUNCTION
   1669	002730					CALL	TRWAIT		; WAIT FOR REQUEST FOR SECTOR
	002730	004737 	003472'			JSR	PC,TRWAIT
   1670	002734	103545 				BCS	DXRTY		; ERROR
   1671	002736	113763 	000010G	000002 		MOVB	DXVCB+10,RXDB(R3) ; GIVE SECTOR NUMBER TO CONTROLLER
   1672	002744					CALL	TRWAIT		; WAIT
	002744	004737 	003472'			JSR	PC,TRWAIT
   1673	002750	103537 				BCS	DXRTY		; ERROR
   1674	002752	113763 	000011G	000002 		MOVB	DXVCB+11,RXDB(R3) ; GIVE TRACK NUMBER TO  CONTROLLER
   1675	002760				155$:
   1676	002760	052713 	000100 			BIS	#INTEBL,@R3	; ENABLE INTERRUPT
   1677					;
   1678	002764	032737 	000340 	177776 		BIT	#340,@#PS	;AT A PRIORITY?
   1679	002772	001116 				BNE	220$		;YES -- THEN EXIT INTERRUPT SERVICE
   1680	002774					DIR$	#DXIOD		;WAIT FOR I/O DONE
	002774	012746 	002362'			MOV	#DXIOD,-(SP)
	003000	104375 				EMT	375
   1681	003002	013703 	000000G			MOV	DXVCB,R3	;FIND THE I/O STATUS
   1682	003006	013704 	000002G		157$:	MOV	DXVCB+2,R4
   1683	003012	013701 	000000G			MOV	DXPKT,R1
   1684	003016					CALL	..IODN		;FINISH I/O
	003016	004737 	000000G			JSR	PC,..IODN
   1685	003022	042737 	000000G	000020G		BIC	#EF.IOD,DXTSK+A.EF	;CLEAR EVENT FLAG
   1686	003030	000137 	002366'			JMP	DXINI		;AND TRY AGAIN
   1687					;
   1688	003034	012703 	000354 		180$:	MOV	#IE.BLK&377,R3	;SET ILLEGAL BLOCK
   1689	003040	032737 	000340 	177776 	185$:	BIT	#340,@#PS		;FROM INT SERV?
   1690	003046	001757 				BEQ	157$		;NO -- RETURN TO CALLER
   1691	003050	000456 				BR	210$		;AND REPORT ERROR
   1692					;
   1693	003052	012703 	000374 		190$:	MOV	#IE.VER&377,R3		;RETURN UNRECOVERABLE ERROR
   1694	003056	000770 				BR	185$
   1695					;
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 15
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1697					;+
   1698					; *** - $DXINT  - RX11 FLOPPY DISK INTERRUPT ENTRY POINT
   1699					;
   1700					;-
   1701	003060				$DXINT::			;;;
   1702	003060	010046 				MOV	R0,-(SP)	;;;SAVE REGISTERS
   1703	003062	010146 				MOV	R1,-(SP)
   1704	003064	010246 				MOV	R2,-(SP)
   1705	003066	010346 				MOV	R3,-(SP)
   1706	003070	010446 				MOV	R4,-(SP)
   1707	003072	010546 				MOV	R5,-(SP)
   1708					;
   1709					;
   1710	003074	012703 	177170 			MOV	#DXEXP,R3	;;; GET CSR ADDRESS
   1711	003100	016337 	000002 	000012G		MOV	2(R3),DXVCB+12 ;;; SAVE STATUS
   1712	003106	042713 	000100 			BIC	#INTEBL,@R3	;;; DISABLE INTERRUPTS
   1713	003112	005713 				TST	@R3		; ANY ERRORS?
   1714	003114	100455 				BMI	DXRTY		; YES
   1715	003116	106237 	000001G			ASRB	DXRTC+1		; INITIALIZE IN PROGRESS
   1716	003122	103407 				BCS	166$		;YES
   1717	003124	122737 	000002 	000007G	160$:	CMPB	#IO.RLB/256.,DXVCB+7 ; READ?
   1718	003132	001636 				BEQ	100$		; YES, GO EMPTY SILO
   1719	003134					CALL	NXTSEC		; NO, UPDATE TO NEXT SECTOR
	003134	004737 	003420'			JSR	PC,NXTSEC
   1720	003140	001414 				BEQ	195$		; ALL DONE
   1721	003142	000137 	002524'		166$:	JMP	35$		; WRITE MORE DATA
   1722					;
   1723					;
   1724	003146	032737 	000040 	000006G	193$:	BIT	#PHYBLK,DXVCB+6 ; IS THIS A READ PHYSICAL?
   1725	003154	001406 				BEQ	195$		; NO, THEN IGNORE DELETED DATA MARK
   1726	003156	012703 	000002 			MOV	#IS.RDD&377,R3	; YES, DEFAULT ON READ TO DELETED DATA
   1727	003162	032737 	000100 	000012G		BIT	#100,DXVCB+12 ; WAS DELETED DATA READ?
   1728	003170	001002 				BNE	200$		; YES
   1729	003172	012703 	000001 		195$:	MOV	#IS.SUC&377,R3	; NO, SET NORMAL SUCCESS
   1730	003176	013700 	000000G		200$:	MOV	DXPKT,R0	; GET I/O PACKET ADDRESS
   1731	003202	016000 	000002G			MOV	R.PB+2(R0),R0	; SET BYTES TRANSFERED
   1732	003206	010037 	000002G		210$:	MOV	R0,DXVCB+2	;SAVE DEVICE STATUS
   1733	003212	010337 	000000G			MOV	R3,DXVCB
   1734	003216	052737 	000000G	000020G		BIS	#EF.IOD,DXTSK+A.EF	;START TASK
   1735	003224					CALL	..DSEV		;DECLARE SIG EVENT
	003224	004737 	000000G			JSR	PC,..DSEV
   1736	003230	012605 			220$:	MOV	(SP)+,R5
   1737	003232	012604 				MOV	(SP)+,R4
   1738	003234	012603 				MOV	(SP)+,R3	;RESTORE REGISTERS
   1739	003236	012602 				MOV	(SP)+,R2
   1740	003240	012601 				MOV	(SP)+,R1
   1741	003242	012600 				MOV	(SP)+,R0
   1742	003244	000137 	000000G			JMP	@#..INTX
   1743					;
   1744					;
   1745					;
   1746					;
   1747					;
   1748					;
   1749					;
   1750					; RETRY LAST FUNCTION
   1751					;
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 15-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1752	003250	105337 	000000G		DXRTY:	DECB	DXRTC		; ANY RETRIES LEFT?
   1753	003254	001676 				BEQ	190$		; NO, ERROR
   1754	003256	112737 	000001 	000001G		MOVB	#1,DXRTC+1	; YES, SET INITIALIZE IN PROGRESS
   1755	003264	012713 	040000 			MOV	#INIT,@R3	; INITIALIZE RX01 DRIVES
   1756	003270	000633 				BR	155$		; AND DO IT
   1757						.DSABL	LSB
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 16
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1759					;+
   1760					; *** - TRKSEC  -  CONVERT LOGICAL OR PHYSICAL BLOCK NUMBER TO
   1761					;	TRACK-SECTOR PAIR
   1762					; FROM ALGORITHM BY J GILBERT MODIFIED BY H. JACOBS
   1763					;
   1764					; INPUT:
   1765					;	DXVCB+2 - LOGICAL SECTOR OR PHYSICAL SECTOR
   1766					;
   1767					; OUTPUT:
   1768					;	DXVCB+10 - SECTOR (1-26.)
   1769					;	DXVCB+11 - TRACK (0-77.)
   1770					;	C CLEAR - VALID BLOCK
   1771					;	C SET - BAD BLOCK NUMBER (PHYSICAL OR LOGICAL)
   1772					;
   1773					;-
   1774	003272	013701 	000002G		TRKSEC:	MOV	DXVCB+2,R1	; GET LOGICAL BLOCK OR PHYSICAL BLOCK
   1775	003276	012700 	000010 			MOV	#8.,R0		; SET LOOP COUNT
   1776	003302	012702 	006400 			MOV	#6400,R2	; SET DIVISOR
   1777	003306	020201 			1$:	CMP	R2,R1		; DOES 26 GO INTO DIVIDEND?
   1778	003310	101002 				BHI	2$		; BRANCH IF NOT, C CLEAR
   1779	003312	160201 				SUB	R2,R1		; SUBTRACT 26 FROM DIVIDEND
   1780	003314	000261 				SEC			; SET CARRY
   1781	003316	006101 			2$:	ROL	R1		; SHIFT DIVIDEND AND QUOTIENT
   1782	003320	005300 				DEC	R0		; DONE?
   1783	003322	003371 				BGT	1$		; NO, LOOP
   1784	003324	110100 				MOVB	R1,R0		; GET TRACK NUMBER
   1785	003326	105001 				CLRB	R1		; CLEAR TRACK NUMBER
   1786	003330	000301 				SWAB	R1		; SHIFT DONE SECTOR NUMBER
   1787	003332	032737 	000040 	000006G		BIT	#PHYBLK,DXVCB+6 ; IS IT PHYSICAL BLOCK NUMBER?
   1788	003340	001016 				BNE	10$		; YES
   1789	003342	022701 	000014 			CMP	#12.,R1		; NO, C=1 IF 13<=R1<=25
   1790	003346	006101 				ROL	R1		; DOUBLE FOR INTERLEAVE FACTOR
   1791	003350	006300 				ASL	R0		; ADD TRACK -TRACK SKEW
   1792	003352	060001 				ADD	R0,R1		; SKEW BY 2*TRACK
   1793	003354	060001 				ADD	R0,R1		; SKEW BY 4*TRACK
   1794	003356	060001 				ADD	R0,R1		; SKEW BY 6*TRACK
   1795	003360	006200 				ASR	R0		; RESTORE TRACK NUMBER
   1796	003362	012702 	000032 			MOV	#26.,R2		; SET MODULUS
   1797	003366	160201 			5$:	SUB	R2,R1		; MODULO SECTOR INTO RANGE -26. TO -1.
   1798	003370	002376 				BGE	5$		; LOOP TILL REMAINDER GOES NEG
   1799	003372	060201 				ADD	R2,R1		; CONVERT TO RANGE 0-25.
   1800	003374	005200 				INC	R0		; LBN0 STARTS ON TRACK 1
   1801	003376	005201 			10$:	INC	R1		; CONVERT TO RANGE 1-26.
   1802	003400	010137 	000010G			MOV	R1,DXVCB+10 	; SAVE SECTOR NUMBER
   1803	003404	110037 	000011G			MOVB	R0,DXVCB+11 	; SAVE TRACK NUMBER
   1804	003410	022737 	046400 	000010G		CMP	#77.*256.,DXVCB+10 ; IS IT VALID TRACK/SECTOR?
   1805	003416					RETURN			;
	003416	000207 				RTS	PC
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 17
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1807					;
   1808					;+
   1809					; *** - NXTSEC  -  UPDATE BLOCK NUMBER , BUFFER ADDRESS
   1810					;			AND BUFFER POINTER
   1811					;
   1812					; INPUT:
   1813					;	DXVCB+2 - CURRENT BLOCK NUMBER
   1814					;	DXVCB+4 - BYTES TRANSFERRED DURING LAST FUNCTION
   1815					;	DXCNT - BYTES LEFT TO TRANSFER
   1816					;	DXBUF - BUFFER ADDRESS
   1817					;
   1818					; OUTPUT:
   1819					;	DXVCB+2 - UPDATED BLOCK NUMBER
   1820					;	DXBUF - UPDATED BY 128. BYTES
   1821					;	DXCNT - UPDATED BY NUMBER OF WORDS TRANSFERED
   1822					;	Z SET - ALL BYTES TRANSFERED
   1823					;	Z CLEAR - MORE BYTES TO TRANSFER
   1824					;	C CLEAR - VALID TRACK/SECTOR
   1825					;	C SET - BAD BLOCK NUMBER
   1826					;
   1827					;+
   1828	003420	005237 	000002G		NXTSEC:	INC	DXVCB+2		; UPDATE BLOCK NUMBER
   1829					;
   1830	003424	062737 	000200 	000000G		ADD	#128.,DXBUF ; UPDATE BUFFER POINTER
   1831					;
   1832	003432	163737 	000004G	000000G		SUB	DXVCB+4,DXCNT 	; UPDATE BYTES LEFT TO TRANSFER
   1833	003440					RETURN			;
	003440	000207 				RTS	PC
   1834					;
   1835					;+
   1836					; *** - SETBUF  -  SET UP BUFFER POINTER FOR CPU - SILO TRANSFERS
   1837					;
   1838					; INPUT:
   1839					;
   1840					; OUTPUT:
   1841					;	R0 - BUFFER ADDRESS
   1842					;	R1 - BYTES TO TRANSFER
   1843					;	IF MAPPED SYSTEM KISAR6 IS MAPPED TO BUFFER AND R1 IS BASE 140000
   1844					;
   1845					;-
   1846	003442	013700 	000000G		SETBUF:	MOV	DXBUF,R0	; GET BUFFER ADDRESS
   1847	003446	012701 	000200 			MOV	#128.,R1	; DEFAULT TO 128. BYTE TRANSFER
   1848	003452	023701 	000000G			CMP	DXCNT,R1	; 128. BYTES LEFT TO TRANSFER?
   1849	003456	103002 				BHIS	10$		; YES
   1850	003460	013701 	000000G			MOV	DXCNT,R1	; NO, GET RESIDUAL COUNT
   1851	003464	010137 	000004G		10$:	MOV	R1,DXVCB+4	; STORE COUNT OF BYTES TO TRANSFER
   1852					;
   1853	003470					RETURN			;
	003470	000207 				RTS	PC
   1854					;+
   1855					; *** - WAIT FOR TRANSFER REQUEST AND DONE
   1856					;
   1857					; INPUT:
   1858					;
   1859					; OUTPUT:
   1860					;	CC - TRANSFER REQUESTED
   1861					;	CS - NO TRANSFER REQUESTED
DXDRV	MACRO M1113  11-NOV-81 11:19  PAGE 17-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1862					;
   1863					;-
   1864	003472	000241 			TRWAIT:	CLC			; DEFAULT TO TRANSFER REQUESTED
   1865	003474	132713 	000240 		10$:	BITB	#TR!DONE,@R3	; CONTROLLER DONE?
   1866	003500	100402 				BMI	20$		; YES, AND TRANSFER REQUEST IS UP
   1867	003502	001774 				BEQ	10$		; NO, WAIT
   1868	003504	000261 				SEC			; SET NO TRANSFER REQUEST
   1869	003506				20$:	RETURN			;
	003506	000207 				RTS	PC
   1870
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 18
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1873						.TITLE	FEDRV
   1874						.IDENT	/014220/
   1875		000001 			$DIRAC=1
   1876					;
   1877					;                             COPYRIGHT (C) 1975, 1978 BY
   1878					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   1879					;
   1880					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   1881					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   1882					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   1883					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   1884					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   1885					;
   1886					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   1887					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   1888					;       CORPORATION.
   1889					;
   1890					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   1891					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   1892					;
   1893					; VERSION 14-22
   1894					;
   1895					;	R. MCLEAN 25-JUN-75
   1896					;	A. PECKHAM 30-NOV-76
   1897					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
   1898					;
   1899					; FE PSEUDO DRIVER
   1900					;
   1901					; MACRO LIBRARY CALLS
   1902					;
   1903					;
   1904						.MCALL	.STKM,WTLO$,DIR$,.INH0,.ENB0,.ENB6,.INH6,.ENB,.INH
   1905						.MCALL	CALL,CALLR,RETURN
   1906					;
   1907					; EQUATED SYMBOLS
   1908					;
   1909		100000 			EF.SEP=100000	;SECONDARY PROTOCOL FLAG
   1910		000400 			EF.TEF=400	;DONE EVENT FLAG
   1911					;
   1912					; DIRECTIVES
   1913					;
   1914	003510				WFEF1:	WTLO$	1,EF.SEP!EF.NIR!EF.TEF	 ;WAIT FOR SOMETHING TO DO
	003510	   053 	   003 			.BYTE	43.,3
	003512	000001 				.WORD	1
	003514	000000C				.WORD	EF.SEP!EF.NIR!EF.TEF
   1915					;
   1916					;	DATA AREAS
   1917					;
   1918					;	FETBL SWITCHES
   1919					;
   1920		040000 			FE.DET=040000	;MORE DATA -11 TO -10 TO BE SENT
   1921		020000 			FE.DTE=020000	;MORE DATA -10 TO -11 EXPECTED
   1922		004000 			FE.SER=004000	;SERVICING -11 TRANSFER REQUEST
   1923		002000 			FE.STR=002000	;SERVICING -10 TRANSFER REQUEST
   1924
   1925	003516				FEHD::	.STKM	0,0,0,0,0,0,0,FEDRV,174000,FESTK
	003564	000000 	000000 	000000 		.WORD	0,0,0,0
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 18-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

	003572	000000
	003612	174000 	004016'	003776'		.WORD	174000,FEDRV,FESTK
	003646	000005 				.WORD	5
	003650	000000G				.WORD	TTPEN
	003652	000000 				.WORD	0
	003654	000000 				.WORD	0
	003656	000000 				.WORD	0
	003660	000000 				.WORD	0
	003662	000000 				.WORD	0
	003664	000000 				.WORD	0
	003666	000000 				.WORD	0
	003670	000000 				.WORD	0
	003672	000000 				.WORD	0
	003674	000000 				.WORD	0
	003776	000000 				.WORD	0
	004000	000000 				.WORD	0
	004002	000000 				.WORD	0
	004004	000000 				.WORD	0
	004006	000000 				.WORD	0
	004010	000000 				.WORD	0
	004012	004016'				.WORD	FEDRV
	004014	174000 				.WORD	174000
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 19
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1927	004016				FEDRV:	DIR$	#WFEF1		;WAIT TO GET STARTED
	004016	012746 	003510'			MOV	#WFEF1,-(SP)
	004022	104375 				EMT	375
   1928	004024					.INH0			;LOCK OUT DTE INTERRUPTS
	004024	013746 	177776 			MOV	@#PS,-(SP)
	004030	112737 	000140 	177776 		MOVB	#140,@#PS
   1929	004036	013700 	000020G		1$:	MOV	FETSK+A.EF,R0	;;;PICK UP THE EVENT FLAGS
   1930	004042	001434 				BEQ	5$		;;;EXIT IF NOTHING
   1931	004044	005037 	000020G			CLR	FETSK+A.EF	;;;CLEAR EVENT FLAGS
   1932	004050	005737 	000002G			TST	.COMEF+2	;;; [4.1.1105] PRIMARY PROTOCOL IN USE?
   1933	004054	100002 				BPL	2$		;;; [4.1.1105] NO -- BETTER DUMP REQUEST'S
   1934	004056	005700 				TST	R0		;;;SECONDARY PROTOCOL CHANGE?
   1935	004060	100025 				BPL	5$		;;;NO -- CONTINUE
   1936					;
   1937					;	PRIMARY PROTOCOL HAS DIED - CLEAR OUT THE REQUEST QUEUE
   1938					;
   1939	004062	013701 	000000G		2$:	MOV	NODADR,R1	;;;GET CURRENT NODE
   1940	004066	005037 	000000G			CLR	NODADR		;;;DON'T BLOCK FE DRIVER
   1941	004072	005037 	000000G			CLR	STSWD		;;;CLEAR STATUS WORD BLOCK
   1942	004076	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;;;NO ACTION ON FE0
   1943	004104	005701 				TST	R1		;;;WERE WE PROCESSING A NODE ?
   1944	004106	001005 				BNE	4$		;;;YES -- DO IT FIRST
   1945	004110	012700 	042506 		3$:	MOV	#"FE,R0		;;;PICK A NODE FROM THE QUEUE
   1946	004114					CALL	..DQRN		;;;DQ
	004114	004737 	000000G			JSR	PC,..DQRN
   1947	004120	103746 				BCS	1$
   1956	004122				4$:
   1958					;
   1959					;
   1960	004122	012703 	177761 		7$:	MOV	#IE.ABO,R3	;;;RETURN ABORTED
   1961	004126					CALL	..IODN		;;;FINISH I/O
	004126	004737 	000000G			JSR	PC,..IODN
   1962	004132	000766 				BR	3$		;;;AND TRY NEXT REQUEST
   1963					;
   1964					;	CHECK FOR EVENTS
   1965					;
   1966	004134				5$:	.ENB0			;;;ENABLE INTERRUPTS
	004134	004737 	000000G			JSR	PC,..ENB0
   1967	004140	032700 	000400 			BIT	#EF.TEF,R0	;CHECK TO SEE IF DONE
   1968	004144	001104 				BNE	IODN
   1969					;
   1970					;	MUST BE I/O REQUEST
   1971					;
   1972	004146	005737 	000000G			TST	NODADR		;BLOCKED?
   1973	004152	001321 				BNE	FEDRV		;YES -- DON'T DO ANYTHING ON QIO NOW
   1974	004154	012700 	042506 			MOV	#"FE,R0		;DQ FROM FE DRIVER
   1975	004160					CALL	..DQRN		;DQ
	004160	004737 	000000G			JSR	PC,..DQRN
   1976	004164	103714 				BCS	FEDRV		;NOTHING -- WAIT
   1977	004166	052737 	004000 	000000G		BIS	#FE.SER,FETBL+0	;FE0 BEING USED FOR -11 REQUEST
   1978	004174	010137 	000000G			MOV	R1,NODADR	;SAVE THE ADDRESS OF THE NODE
   1979	004200	010537 	000000G			MOV	R5,ADRSAV	;SAVE THE ADDRESS
   1980	004204	010337 	000000G			MOV	R3,BYTESA	;SAVE THE BYTE COUNT
   1981	004210	012702 	000000G			MOV	#TO10PK,R2	;SET UP PACKET ADDRESS
   1982	004214	010200 				MOV	R2,R0		;SAVE THE ADDRESS OF THE BUFFER
   1983	004216	012722 	000014 			MOV	#14,(R2)+	;STORE SIZE
   1984	004222	016122 	000000G			MOV	R.FC(R1),(R2)+	;SET UP THE FUNCTION CODE
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 19-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   1985	004226	005003 				CLR	R3		;FIND THE LUN
   1986	004230	156103 	000000G			BISB	R.LU(R1),R3	;SET UP THE LUT NUMBER
   1987	004234	001005 				BNE	10$		;EXEC REQUEST?
   1988	004236	012722 	041104 			MOV	#"DB,(R2)+	;DECLARE DB
   1989	004242	013722 	000000G			MOV	.RPUNT,(R2)+	;SET UNIT NUMBER
   1990	004246	000424 				BR	77$		;AND FINISH
   1991	004250	016104 	000000G		10$:	MOV	R.AT(R1),R4	;FIND THE ATL
   1992	004254	016404 	000000G			MOV	A.HA(R4),R4	;FIND THE HEADER ADDRESS
   1993	004260	006303 				ASL	R3		;MULTIPLY THE LUN BY 2
   1994	004262	006303 				ASL	R3
   1995	004264	060304 				ADD	R3,R4		;POINT TO CORRECT ENTRY
   1996	004266	016404 	177776G			MOV	H.LUT-2(R4),R4	;FIND THE LUT (FINALLY)
   1997	004272	016404 	000000G			MOV	U.RP(R4),R4	;DO REDIRECT
   1998	004276	012422 				MOV	(R4)+,(R2)+	;STORE THE DEVICE (ASCII CHARACTER)
   1999	004300	011422 				MOV	(R4),(R2)+	;STORE THE UNIT
   2000	004302	116104 	000000G			MOVB	R.DP(R1),R4	;FIND THE DPB SIZE
   2001	004306	162704 	000007 			SUB	#7,R4		;SUB PERMINENT ONES
   2002	004312	001002 				BNE	77$		;GOT A GOOD BYTE COUNT
   2003	004314	005037 	000000G			CLR	BYTESA		;NO CLEAR OUT BYTE COUNT
   2004	004320	016122 	000006G		77$:	MOV	R.PB+6(R1),(R2)+ ;STORE THE BLOCK NUMBER
   2005	004324	016122 	000010G			MOV	R.PB+10(R1),(R2)+
   2006	004330	013722 	000000G			MOV	BYTESA,(R2)+	;SET BYTE COUNT
   2007	004334	001403 				BEQ	78$		;IF MORE DATA MUST GO OUT
   2008	004336	052737 	040000 	000000G		BIS	#FE.DET,FETBL+0	;THEN SO INDICATE
   2009	004344				78$:	CALL	SNSTR		;START INDIRECT FUNCTION
	004344	004737 	004420'			JSR	PC,SNSTR
   2010	004350	005037 	000000G			CLR	STSWD
   2011	004354	000620 				BR	FEDRV		;AND WAIT
   2012
   2013	004356	013703 	000000G		IODN:	MOV	STSWD,R3	;SET I/O DONE
   2014	004362	013704 	000002G			MOV	STSWD+2,R4
   2015	004366	013701 	000000G			MOV	NODADR,R1	;SET NODE ADDRESS
   2016	004372	005037 	000000G			CLR	NODADR		;CLEAR INCASE OF ABORT
   2017	004376	005037 	000000G			CLR	STSWD		;CLEAR STATUS WORD
   2018	004402					CALL	..IODN		;SET I/O DONE
	004402	004737 	000000G			JSR	PC,..IODN
   2019	004406	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;WE ARE FINISHED WITH -11 REQUEST
   2020	004414	000137 	004016'			JMP	FEDRV		;AND RETURN
   2021
   2022	004420	012701 	100000G		SNSTR:	MOV	#BC.STR+100000,R1 ;SET UP STRING DATA
   2023	004424	005002 				CLR	R2		;NO EVENT FLAG
   2024	004426	012703 	000000G			MOV	#D.FEPD,R3	;FE DEVICE
   2025	004432					CALLR	..STIN		;START INDIRECT
	004432	000137 	000000G			JMP	..STIN
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 20
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   2027					;
   2028					;	THE -10 HAS SENT AN ACK TO US - CONTINUE THE OPERATION
   2029					;	IF IT WAS A WRITE.
   2030					;
   2031	004436	032712 	040000 		.FEACK::BIT	#FE.DET,(R2)	;IS THERE DATA TO SEND ?
   2032	004442	001436 				BEQ	30$		;NO, IGNORE THE ACK.
   2033	004444	010046 				MOV	R0,-(SP)	;SAVE R0
   2034	004446	013700 	000000G			MOV	ADRSAV,R0	;PICK UP THE ADDRESS
   2035	004452	012701 	000100 			MOV	#64.,R1		;SET THE COUNT
   2036	004456	020137 	000000G			CMP	R1,BYTESA	;TOO BIG ??
   2037	004462	101402 				BLOS	10$		;NO - USE THIS COUNT
   2038	004464	013701 	000000G			MOV	BYTESA,R1	;YES - SEND WHAT'S LEFT
   2039	004470	060137 	000000G		10$:	ADD	R1,ADRSAV	;SET NEW ADDRESS
   2040	004474	160137 	000000G			SUB	R1,BYTESA	;AND BYTES LEFT
   2041	004500	001002 				BNE	20$		;IF NO MORE AFTER THIS
   2042	004502	042712 	040000 			BIC	#FE.DET,(R2)	;THEN SO INDICATE
   2043	004506				20$:	.INH6			;LOCK OUT INTERRUPTS
	004506	013746 	177776 			MOV	@#PS,-(SP)
	004512	112737 	000300 	177776 		MOVB	#300,@#PS
   2044	004520	014046 				MOV	-(R0),-(SP)	;;;SAVE MEMORY HERE
   2045	004522	010110 				MOV	R1,@R0		;;;STORE FIRST WORD TO10
   2046	004524					CALL	SNSTR		;;;START FUNCTION
	004524	004737 	004420'			JSR	PC,SNSTR
   2047	004530	012610 				MOV	(SP)+,@R0	;;;RESTORE FIRST WORD
   2048	004532					.ENB6			;;;ENABLE INTERRUPTS
	004532	012637 	177776 			MOV	(SP)+,@#PS
   2049	004536	012600 				MOV	(SP)+,R0	;RESTORE
   2050	004540				30$:	RETURN			;RETURN TO CALLER
	004540	000207 				RTS	PC
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 21
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   2052					;
   2053					;	START FE DEVICE QUEUE ENTRY
   2054					;
   2055					;	R0 -> THREAD BLOCK ENTRY
   2056					;	R2 -> FETBL ENTRY
   2057					;
   2058	004542	122760 	000000G	000007 	.FEST::	CMPB	#BC.STR,7(R0)	;FUNCTION STRING?
   2059	004550	001077 				BNE	IOABT		;NO -- ABORT I/O IN PROGRESS
   2060	004552	005005 				CLR	R5		;FIND THE BYTE SIZE
   2061	004554	156005 	000006 			BISB	6(R0),R5
   2062	004560	016004 	000004 			MOV	4(R0),R4	;SET UP THE NODE ADDRESS
   2063	004564	032712 	020000 			BIT	#FE.DTE,(R2)	;ARE WE EXPECTING DATA ?
   2064	004570	001040 				BNE	70$		;YES, INSERT IN BUFFER.
   2065	004572	012401 				MOV	(R4)+,R1	;CHECK TO SEE WHICH DIRECTION THIS FUNCTION IS
   2066	004574	100102 				BPL	FCN		;REQUEST TO DO A FUNCTION -- SPECIAL
   2067	004576	013703 	000000G			MOV	NODADR,R3	;A RETURN FUNCTION -
   2068	004602	066301 	000000G			ADD	R.FC(R3),R1	;IS IT THE LAST ONE WE SENT ?
   2069	004606	001100 				BNE	FCNBD		;NO -- ILLEGAL REQUEST -- QUIT
   2070	004610	122763 	000003 	000001G		CMPB	#IO.ATT/400,R.FC+1(R3) ;ACP FUNCTION CODE?
   2071	004616	001006 				BNE	40$		;NO -- LEAVE ADDRESSES ALONE
   2072	004620	016337 	000012G	000000G		MOV	R.PB+12(R3),BYTESA ;SET UP TO BYTE COUNT
   2073	004626	016337 	000004G	000000G		MOV	R.PB+4(R3),ADRSAV ;ALSO ADDRESS
   2074	004634	022424 			40$:	CMP	(R4)+,(R4)+	;MOVE OVER DEVICE/UNIT
   2075	004636	012437 	000000G			MOV	(R4)+,STSWD	;SAVE THE I/O STATUS
   2076	004642	012437 	000002G			MOV	(R4)+,STSWD+2	;BOTH HALVES
   2077	004646	052712 	020000 			BIS	#FE.DTE,(R2)	;INDICATE WE ARE EXPECTING DATA
   2078	004652	021437 	000000G			CMP	@R4,BYTESA	;BYTESIZE CORRECT?
   2079	004656	103002 				BHIS	50$		;YES -- CONTINUE
   2080	004660	011437 	000000G			MOV	@R4,BYTESA	;NO -- SET NEW ONE
   2081	004664	162705 	000014 		50$:	SUB	#14,R5		;SUBTRACT FIXED HEADER SIZE
   2082	004670	001410 				BEQ	60$		;AND QUIT IF NOTHING TO DO
   2083	004672	112477 	000000G		70$:	MOVB	(R4)+,@ADRSAV	;MOVE A BYTE
   2084	004676	005237 	000000G			INC	ADRSAV		;UPDATE BYTE POINTER
   2085	004702	005337 	000000G			DEC	BYTESA		;UPDATE BYTE COUNT
   2086	004706	001404 				BEQ	65$		;(IN CASE OF MISCOUNT)
   2087	004710	077510 				SOB	R5,70$		;AND DO UNTIL DONE
   2088	004712	005737 	000000G		60$:	TST	BYTESA		;ANYTHING TO DO?
   2089	004716	001005 				BNE	DONSTR		;YES -- DON'T SET I/O DONE FLAG
   2090	004720	042712 	020000 		65$:	BIC	#FE.DTE,(R2)	;NO MORE DATA EXPECTED
   2091	004724	052737 	000400 	000020G		BIS	#EF.TEF,FETSK+A.EF ;SET I/O DONE
   2092	004732				DONSTR:	CALL	..DECN		; RETURN NODE
	004732	004737 	000000G			JSR	PC,..DECN
   2093	004736	012703 	000000G			MOV	#D.FEPD,R3	;ACK THIS FUNCTION
   2094	004742	010205 				MOV	R2,R5
   2095	004744					CALLR	..SACK
	004744	000137 	000000G			JMP	..SACK
   2096
   2097	004750	013701 	000000G		IOABT:	MOV	NODADR,R1	;NODE IN PROGRESS?
   2101	004754	001766 				BEQ	DONSTR		;NO -- CONTINUE
   2103	004756	005037 	000000G			CLR	NODADR		;YES -- FIX IT WITH IE.ABO
   2104	004762	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;FINISHED WITH -11 REQUEST
   2105	004770	012703 	177761 			MOV	#IE.ABO,R3
   2106	004774					CALL	..IODN		;QUIT IT
	004774	004737 	000000G			JSR	PC,..IODN
   2110	005000	000754 				BR	DONSTR		;AND DECLARE DONE
   2111					;
   2112					;	THIS IS A FUNCTION REQUEST FROM THE -10
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 21-1
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   2113					;
   2114	005002	022714 	042515 		FCN:	CMP	#"ME,(R4)	;IS IT MEMORY?
   2115	005006	001401 				BEQ	MEFCN		;YUP -- MUST BE OK
   2116	005010	000004 			FCNBD:	IOT			;NOPE -- CRASH
   2117
   2118	005012	052712 	002000 		MEFCN:	BIS	#FE.STR,(R2)	;WE ARE SERVICING -10 REQUEST
   2119	005016	012737 	000014 	000000G		MOV	#14,DNBLK	;INIT RETURN PACKET SIZE
   2120	005024	010137 	000000G			MOV	R1,DNFCN	;SET FUNCTION
   2121	005030	005437 	000000G			NEG	DNFCN		;AND NEGATE.
   2122	005034	012437 	000002G			MOV	(R4)+,DNFCN+2	;SAVE FUNCTION DEVICE
   2123	005040	012737 	000001 	000000G		MOV	#IS.SUC,DNSTS	;ASSUME A SUCCESSFUL ACCESS
   2124	005046	022424 				CMP	(R4)+,(R4)+	;MOVE OVER UNIT AND HIGH ORDER ADDRES
   2125	005050	012403 				MOV	(R4)+,R3	;PICK UP ADDRESS
   2126	005052	012405 				MOV	(R4)+,R5	;AND BYTE COUNT
   2127	005054	010537 	000002G			MOV	R5,DNSTS+2	;SAVE BYTE COUNT
   2128	005060					.INH			;LOCK OUT INTERRUPTS
	005060	013746 	177776 			MOV	PS,-(SP)
	005064	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2129	005072	013746 	000004 			MOV	@#4,-(SP)	;;;SAVE LOC 4
   2130	005076	012737 	005242'	000004 		MOV	#90$,@#4	;;;GO TO ILL MEM ROUTINE
   2131	005104	022701 	000400 			CMP	#IO.WLB,R1	;;;WRITE LOGICAL BLOCK?
   2132	005110	001003 				BNE	30$		;;;READ MEMORY REQUEST
   2133	005112	112423 			20$:	MOVB	(R4)+,(R3)+	;;;MOVE BYTES
   2134	005114	077502 				SOB	R5,20$		;;;UNTIL DONE
   2135	005116	000417 				BR	60$		;;;RETURN SUCCESS
   2136
   2137	005120	122760 	000014 	000006 	30$:	CMPB	#14,6(R0)	;;;ALL IN THIS PACKET?
   2138	005126	001010 				BNE	50$		;;;NO -- BAD FUNCTION
   2139	005130	012704 	000000G			MOV	#BLKTT,R4	;;;SET UP A PACKET TO ADD TO FUNCTION
   2140	005134	112324 			40$:	MOVB	(R3)+,(R4)+	;;;MOVE CORRESPONDING  BYTES
   2141	005136	077502 				SOB	R5,40$		;;;UNTIL DONE
   2142	005140	063737 	000002G	000000G		ADD	DNSTS+2,DNBLK	;;;INCLUDE RETURN BYTES IN PACKET
   2143	005146	000405 				BR	70$		;;;SET RETURN FUNCTION
   2144
   2145	005150	012737 	177777 	000000G	50$:	MOV	#IE.BAD,DNSTS	;;;RETURN BAD FUNCTION
   2146	005156	005037 	000002G		60$:	CLR	DNSTS+2		;;;NO BYTES TRANSFERRED
   2147	005162	012637 	000004 		70$:	MOV	(SP)+,@#4	;;;RESET LOC 4
   2148	005166					.ENB			;;;ENABLE INTERRUPTS
	005166	012637 	177776 			MOV	(SP)+,@#PS	;;
   2149	005172	013737 	000002G	000004G		MOV	DNSTS+2,DNSTS+4	;RETURN COUNT
   2150	005200	010203 				MOV	R2,R3		;COMPUTE FE NUMBER
   2151	005202	162703 	000000G			SUB	#FETBL,R3
   2152	005206	006203 				ASR	R3		;AND
   2153	005210	110337 	000001G			MOVB	R3,DNBLK+1	;SET IN RETURN PACKET
   2154	005214	010246 				MOV	R2,-(SP)	;SAVE FETBL POINTER
   2155	005216	010046 				MOV	R0,-(SP)	;AND STRING POINTER
   2156	005220	012700 	000000G			MOV	#DNBLK,R0	;SET DONE BLOCK ADDRESS
   2157	005224					CALL	SNSTR		;SEND STRING
	005224	004737 	004420'			JSR	PC,SNSTR
   2158	005230	012600 				MOV	(SP)+,R0	;RESTORE
   2159	005232	012602 				MOV	(SP)+,R2
   2160	005234	042712 	002000 			BIC	#FE.STR,(R2)	;FINISHED WITH -10 REQUEST
   2161	005240	000634 				BR	DONSTR		;AND QUIT
   2162
   2163	005242	022626 			90$:	CMP	(SP)+,(SP)+	;REMOVE TRAP STUFF
   2164	005244	012737 	177774 	000000G		MOV	#IE.VER,DNSTS	;RETURN RECOVERABLE ERROR
   2165	005252	000741 				BR	60$
FEDRV	MACRO M1113  11-NOV-81 11:19  PAGE 21-2
ARITHMETIC SIMULATOR -- COPYRIGHT STATEMENT

   2166
   2167						.TITLE	LPDRV	(LP-20 LINEPRINTER DRIVER FOR RSX10F)
   2168						.SBTTL	TITLE PAGE
   2169						.IDENT	/001000/
   2170					;
   2171					;                             COPYRIGHT (C) 1975, 1978 BY
   2172					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2173					;
   2174					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2175					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2176					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2177					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2178					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2179					;
   2180					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2181					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2182					;       CORPORATION.
   2183					;
   2184					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2185					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2186					;
   2187					;		MODULE: COMMON DEFINITIONS
   2188					;
   2189					;		VERSION: 01-00
   2190					;
   2191					;		AUTHOR: TOM PORCHER
   2192					;
   2193					;		DATE: 4-JUN-75
   2194					;
   2195					;
   2196					;	THIS MODULE CONTAINS:
   2197					;
   2198					;	1) COMMON PARAMETERS AND MACROS
   2199					;
   2200					;	2) LP-20 DEVICE REGISTER DEFINITIONS
   2201					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 22
COMMON PARAMETERS AND MACROS

   2203						.SBTTL	COMMON PARAMETERS AND MACROS
   2204					;
   2205					; PARAMETERS
   2206					;
   2207					;L$$P20=	2			;TWO LINEPRINTERS
   2208		000214 			LPALOC=	140.			;LINE ALLOCATION FOR EACH LP
   2209		000012 			LPRTRY=	10.			;# RETRYS ON ERRORS AND HUNG
   2210					;
   2211					; EVENT FLAGS
   2212					;
   2213		000001 			E.FLPD=	1			;(1) INTERRUPT LEVEL I/O DONE
   2214		000001 			 EF.LPD=BIT0
   2215		000002 			E.FLPC=	2			;(2) MARK-TIME
   2216		000002 			 EF.LPC=BIT1
   2217		000003 			E.FLPQ=	3			;(3) CTY OUTPUT QUEUE I/O REQUESTS
   2218		000004 			 EF.LPQ=BIT2
   2219									;(4) RESERVED FOR E.NIR (EXEC FLAG)
   2220		000005 			E.FLPS=	5			;(5) STATUS REQUEST (LOCAL TO SSTSLP)
   2221		000020 			 EF.LPS=BIT4
   2222		000006 			E.FLPW=	6			;(6) WAIT FOR LP-20 TO SETTLE AFTER FLUSH
   2223		000040 			 EF.LPW=BIT5
   2224					;
   2225					; MISC. MCALL'S
   2226					;
   2227					.MCALL QIOSY$,ALUN$,MRKT$,QIOW$,SPRA$S,SVTK$S,WSIG$S,WTLO$S,WTSE$S,DIR$
   2228					.MCALL $DEF,CALL,RETURN,.INH0,.INH,.ENB0,.ENB,PUSH,POP,.STKM
   2229	005254					$DEF
   2230	005254					QIOSY$
   2231						.ENABLE	AMA
   2232						.LIST	MEB
   2233					;
   2234					; COMMON MACROS
   2235					;
   2236					.MACRO SAVE LIST
   2237						PUSH	<LIST>
   2238					  .MACRO RESTORE
   2239					    $$$=0
   2240					    .IRP ITEM,<LIST>
   2241					      $$$=$$$+1
   2242					    .ENDM
   2243					    .REPT $$$
   2244					      $$$$=0
   2245					      .IRP ITEM,<LIST>
   2246					        $$$$=$$$$+1
   2247					        .IF EQ $$$$-$$$
   2248						  POP	ITEM
   2249					        .ENDC
   2250					      .ENDM
   2251					      $$$=$$$-1
   2252					    .ENDR
   2253					  .ENDM
   2254					.ENDM
   2255					;
   2256					; BITS IN T.HCBC WORD IN THREAD BLOCK
   2257					;
   2258		100000 			TB.DON=	BIT15			;THREAD BLOCK DONE *** MUST BE SIGN BIT ***
   2259		040000 			TB.ABO=	BIT14			;ABORTED BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 22-1
COMMON PARAMETERS AND MACROS

   2260		020000 			TB.EOF=	BIT13			;BLOCK REPRESENTS EOF
   2261		010000 			TB.LPC=	BIT12			;LOAD PAGE COUNTER FUNCTION
   2262		004000 			TB.RMD=	BIT11			;TRANSLATION RAM DATA
   2263		002000 			TB.VFD=	BIT10			;VFU DATA
   2264		036000 			TB.SFN=	TB.EOF!TB.LPC!TB.RMD!TB.VFD ;SPECIAL FUNCTIONS
   2265					;
   2266					; QUEUE I/O -- THREAD BLOCK VALUES
   2267					;
   2268		000004 			PBTHRD=	4			;R.PB+4 IS START OF THREAD BLOCK
   2269					;
   2270		177774 			T.HEMA=	0-PBTHRD		;(BYTE) EXTENDED MEMORY ADDRESS BITS 4 & 5
   2271		177775 			T.HVFC=	1-PBTHRD		;(BYTE) VERTICAL FORMAT CONTROL CHARACTER
   2272		177776 			T.HIBC=	2-PBTHRD		;(WORD) INITIAL BYTE COUNT
   2273					;
   2274					;
   2275					; STUFF THAT SHOULD BE GLOBAL, BUT MACY11 DOESN'T LIKE COMPLEX GLOBALS
   2276					;
   2277		000377 			LOBYTE=	377
   2278		177400 			HIBYTE=	^C<LOBYTE>
   2279					;
   2280					;
   2281		000074 			.CYLTM=^D60
   2282					.MACRO	.INH4
   2283						MOV	@#PS,-(SP)
   2284						MOVB	#PR4,@#PS
   2285					.ENDM
   2286					.MACRO	.ENB4
   2287						MOV	(SP)+,@#PS
   2288					.ENDM
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 23
LP-20 DEVICE REGISTER DEFINITIONS

   2290						.SBTTL	LP-20 DEVICE REGISTER DEFINITIONS
   2291					;
   2292					;
   2293					; LP-20 DEVICE REGISTER DEFINITIONS
   2294					;
   2295					; *** NOTE THAT ALL OFFSETS AND ADDRESSES ARE RELATIVE TO LPCSRA ***
   2296					;
   2297					;LPEXPA==175400			;EXTERNAL PAGE ADDRESS OF LPCSRA
   2298					;LPEXPZ==20			;SIZE OF EXTERNAL PAGE ADDRESSES IN BYTES
   2299					;
   2300		000000 			LPCSRA==0			;CONTROL AND STATUS REGISTER A
   2301		100000 				ERR=	BIT15
   2302		040000 				PAGZRO=	BIT14
   2303		020000 				CHRINT=	BIT13
   2304		010000 				VFURDY=	BIT12
   2305		004000 				ONLINE=	BIT11
   2306		002000 				DELHLD=	BIT10
   2307		001000 				RSTERR=	BIT9
   2308		000400 				LOINIT=	BIT8
   2309					;
   2310		000200 				DONE=	BIT7
   2311		000100 				INTENB=	BIT6
   2312		000040 				BUSA17=	BIT5
   2313		000020 				BUSA16=	BIT4
   2314		000010 				MODE01=	BIT3
   2315		000004 				MODE00=	BIT2
   2316		000001 					TSTMOD=	1
   2317		000002 					VFULOD=	2
   2318		000003 					RAMLOD=	3
   2319		000002 				PARENB=	BIT1
   2320		000001 				GO=	BIT0
   2321					;
   2322		000002 			LPCSRB==2			;CONTROL AND STATUS REGISTER B
   2323					; BITS	15-13	NOT USED
   2324		010000 				LPTPBT=	BIT12
   2325		004000 				OPTVFU=	BIT11
   2326		002000 				TEST02=	BIT10
   2327		001000 				TEST01=	BIT9
   2328		000400 				TEST00=	BIT8
   2329					;
   2330		000200 				OFFLIN=	BIT7
   2331		000100 				VFUERR=	BIT6
   2332		000040 				LPTPAR=	BIT5
   2333		000020 				MEMPAR=	BIT4
   2334		000010 				RAMPAR=	BIT3
   2335		000004 				SYNTIM=	BIT2
   2336		000002 				DEMTIM=	BIT1
   2337		000001 				GOERR=	BIT0
   2338					;
   2339		000004 			LPBSAD==4			;BUS ADDRESS REGISTER
   2340					;
   2341		000006 			LPBCTR==6			;BYTE COUNT (2'S COMPLEMENT)
   2342					; BITS	15-12	NOT USED
   2343					;	11-0	BYTE COUNT
   2344					;
   2345		000010 			LPPCTR==10			;PAGE COUNTER
   2346					; BITS	15-12	NOT USED
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 23-1
LP-20 DEVICE REGISTER DEFINITIONS

   2347					;	11-0	PAGE COUNT
   2348					;
   2349		000012 			LPRAMD==12			;RAM DATA REGISTER
   2350					; BITS	15-13	NOT USED
   2351					;	12	RAM PARITY
   2352					;	11-0	RAM DATA
   2353					;
   2354		000014 			LPCBUF==14			;(BYTE) CHARACTER BUFFER REGISTER
   2355		000015 			LPCCTR==15			;(BYTE) COLUMN COUNT REGISTER
   2356					;
   2357		000016 			LPTDAT==16			;(BYTE) PRINTER DATA REGISTER
   2358		000017 			LPCKSM==17			;(BYTE) CHECKSUM REGISTER
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 24
COMMON DEVICE PARAMETER MODULE

   2360						.SBTTL	COMMON DEVICE PARAMETER MODULE
   2361					;
   2362					;                             COPYRIGHT (C) 1975, 1978 BY
   2363					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2364					;
   2365					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2366					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2367					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2368					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2369					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2370					;
   2371					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2372					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2373					;       CORPORATION.
   2374					;
   2375					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2376					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2377					;
   2378					;
   2379					;		MODULE: COMMON DEVICE PARAMETERS
   2380					;
   2381					;		VERSION: 01-00
   2382					;
   2383					;		AUTHOR: TOM PORCHER
   2384					;
   2385					;		DATE: 25-AUG-75
   2386					;
   2387					;
   2388					;	THIS MODULE CONTAINS:
   2389					;
   2390					;	1) DEVICE STATUS BIT DEFINITIONS
   2391					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 25
DEVICE STATUS BIT DEFINITIONS

   2393						.SBTTL	DEVICE STATUS BIT DEFINITIONS
   2394					;
   2395					; GENERAL FORM OF STATUS BLOCK
   2396					;
   2397					; WORD	0	STANDARD STAUS BITS (DV.XXX)
   2398					; 	1	DEVICE-DEPENDENT BITS (DD.XXX)
   2399					;	2	(HIGH BYTE) # BYTES OF DEVICE-DEPENDENT INFO TO FOLLOW
   2400					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS TO FOLLOW
   2401					;	3-...	DEVICE DEPENDENT INFO (# BYTES IN WORD 2)
   2402					;	.-...	DEVICE REGISTERS (# BYTES IN WORD 2)
   2403					;
   2404					;
   2405					; STANDARD BITS (FIRST WORD OF STATUS)
   2406					;
   2407		000001 			DV.NXD=	BIT0			;NON-EX DEVICE
   2408		000002 			DV.OFL=	BIT1			;OFF-LINE
   2409		000004 			DV.OIR=	BIT2			;HARDWARE ERROR. OPERATOR INTERVENTION REQUIRED.
   2410		000010 			DV.SCN=	BIT3			;SOFTWARE CONDITON. ACKNOWLEDGE REQUIRED.
   2411		000020 			DV.IOP=	BIT4			;I/O IN PROGRESS
   2412		000040 			DV.EOF=	BIT5			;END-OF-FILE ENCOUNTERED
   2413		000100 			DV.LOG=	BIT6			;ERROR LOGGING REQUIRED
   2414		000200 			DV.URE=	BIT7			;UN-RECOVERABLE ERROR
   2415		000400 			DV.F11=	BIT8			;ERROR ON FROM -11 REQUEST
   2416		001000 			DV.HNG=	BIT9			;DEVICE HUNG
   2417					;
   2418					;
   2419					; DEVICE-DEPENDENT BITS (SECOND WORD OF STATUS)
   2420					;
   2421					; LP-20 LINEPRINTER
   2422					;
   2423		000001 			DD.PGZ=	BIT0			;PAGE COUNTER PASSED ZERO
   2424		000002 			DD.CHI=	BIT1			;CHARACTER INTERRUPT (FROM RAM)
   2425		000004 			DD.VFE=	BIT2			;VFU ERROR-- PAPER RE-ALIGNMENT REQUIRED
   2426		000010 			DD.LER=	BIT3			;ERROR FINDING/READING VF AND RAM FILE
   2427		000020 			DD.OVF=	BIT4			;PRINTER HAS OPTICAL VFU (AS OPPOSED TO DAVFU)
   2428		000040 			DD.RME=	BIT5			;RAM PARITY ERROR-- RELOAD REQUIRED
   2429					;
   2430					; DEVICE DEPNDENT INFO FOR LP-20 (2 BYTES):
   2431					; WORD	3	(LOW BYTE) ACCUMULATED CHECKSUM
   2432					;		(HIGH BYTE) RETRY COUNT
   2433					;
   2434					;	4-13	LP-20 DEVICE REGISTERS (16. BYTES)
   2435					;
   2436					;
   2437					; CD-11 CARD READER
   2438					;
   2439		000001 			DD.RCK=	BIT0			;READ (PHOTO) CHECK
   2440		000002 			DD.PCK=	BIT1			;PICK CHECK
   2441		000004 			DD.SCK=	BIT2			;STACK CHECK
   2442		000010 			DD.HEM=	BIT3			;HOPPER EMPTY
   2443		000020 			DD.SFL=	BIT4			;STACKER FULL
   2444					;
   2445					; DEVICE-DEPENDENT INFO FOR CD-11 (0 BYTES)
   2446					; WORD	3-6	DEVICE REGISTERS FOR CD-11 (8. BYTES)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 26
LP-20 COMMON DATA MODULE

   2448						.SBTTL	LP-20 COMMON DATA MODULE
   2449					;
   2450					;                             COPYRIGHT (C) 1975, 1978 BY
   2451					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2452					;
   2453					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2454					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2455					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2456					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2457					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2458					;
   2459					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2460					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2461					;       CORPORATION.
   2462					;
   2463					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2464					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2465					;
   2466					;		MODULE: LP-20 COMMON DATA
   2467					;
   2468					;		VERSION: 01-00
   2469					;
   2470					;		AUTHOR: TOM PORCHER
   2471					;
   2472					;		DATE: 7-JUN-75
   2473					;
   2474					;
   2475					;	THIS MODULE CONTAINS:
   2476					;
   2477					;	1) COMMON VARIABLES
   2478					;
   2479					;	2) DEVICE TABLES
   2480					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 27
COMMON VARIABLES

   2482						.SBTTL	COMMON VARIABLES
   2483					;
   2484					; LP DRIVER TASK HEAD
   2485					;
   2486					;
   2487	005254				LPHD::	.STKM	0,0,0,0,0,0,0,LPINI,174000,LPSTK
	005322	000000 	000000 	000000 		.WORD	0,0,0,0
	005330	000000
	005350	174000 	005644'	005534'		.WORD	174000,LPINI,LPSTK
	005404	000005 				.WORD	5
	005406	000000G				.WORD	TTPEN
	005410	000000 				.WORD	0
	005412	000000 				.WORD	0
	005414	000000 				.WORD	0
	005416	000000 				.WORD	0
	005420	000000 				.WORD	0
	005422	000000 				.WORD	0
	005424	000000 				.WORD	0
	005426	000000 				.WORD	0
	005430	000000 				.WORD	0
	005432	000000 				.WORD	0
	005534	000000 				.WORD	0
	005536	000000 				.WORD	0
	005540	000000 				.WORD	0
	005542	000000 				.WORD	0
	005544	000000 				.WORD	0
	005546	000000 				.WORD	0
	005550	005644'				.WORD	LPINI
	005552	174000 				.WORD	174000
   2488					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 28
LP-20 DEVICE TABLES

   2490						.SBTTL	LP-20 DEVICE TABLES
   2491
   2492					;
   2493					;	LP-20 STATUS BITS
   2494					;
   2495		100000 				LP.HNG=	BIT15		;LP DID NOT COMPLETE I/O IN 20 SEC
   2496									;SET BY MARK-TIME REQUEST
   2497									;CLEARED BY ..DOLP
   2498		040000 				LP.SST=	BIT14		;SEND STATUS OF THIS LP TO -10
   2499									;SET BY INTERRUPT SERVICE
   2500									;CHECKED BY TASK
   2501		020000 				LP.PZI=	BIT13		;PAGE-ZERO INTERRUPT ENABLE
   2502									;SET FROM RAM/VF LOAD FILE
   2503									;CHECKED ON PAGZRO INTERRUPTS
   2504		010000 				LP.MCH=	BIT12		;MULTI-CHARACTER PRINT OPERATION IN PROGRESS
   2505									; (ARROW MODE). SET ON UNDCHR INTERRUPT,
   2506									; CLEARED WHEN DONE SET.
   2507		004000 				LP.WAT=	BIT11		;THIS LP IS WAITING FOR A RESPONSE
   2508									; FROM THE -10, DUE TO PAGZRO, ERROR
   2509									; ON SOMETHING LIKE THAT. SET BY INTERRUPT
   2510									; SERVICE, CLEARED BY 'CONTINUE'
   2511									; FUNCTION FROM -10.
   2512		002000 				LP.CLR=	BIT10		;CLEAR RAM REQUIRED (DUE TO ERROR)
   2513									; SET BY SSTSLP, CHECKED AND CLEARED BY TESTLP
   2514		001000 				LP.LIP=	BIT9		;LOAD OF VFU AND RAM IN PROGRESS, SET
   2515									; BY START OF LOAD (IN LPIOD) AND CLEARED BY
   2516									; TRANSFER COMPLETE FOR RAM/VFU DATA.
   2517		000400 				LP.F10=	BIT8		;FROM-10 REQUEST HAS BEEN QUEUED
   2518									; SET BY ..STLP AND SPECIAL FUNCTIONS
   2519									; CLEARED WHEN QUEUE IS EMPTY OR ..SPLP
   2520		000200 				LP.EOF=	BIT7		;END-OF-FILE. SET BY EOF FUNCTION ENCOUNTERED
   2521									; IN THREADED LIST BY INTERRUPT SERVICE.
   2522									; CHECKED AND CLEARED BY TESTLP WHEN
   2523									; CHECKSUM IS CLEARED.
   2524		000003 				LP.UNT=	BIT1!BIT0	;(LOW BITS) UNIT # OF THIS LP.
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 29
LP-20 DRIVER TASK MODULE

   2526						.SBTTL	LP-20 DRIVER TASK MODULE
   2527					;
   2528					;                             COPYRIGHT (C) 1975, 1978 BY
   2529					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2530					;
   2531					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2532					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2533					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2534					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2535					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2536					;
   2537					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2538					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2539					;       CORPORATION.
   2540					;
   2541					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2542					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2543					;
   2544					;		MODULE: LP-20 DRIVER TASK
   2545					;
   2546					;		VERSION: 14-43
   2547					;
   2548					;		AUTHOR: TOM PORCHER
   2549					;
   2550					;		DATE: 4-JUN-75
   2551					;
   2552					;
   2553					;	THIS MODULE CONTAINS:
   2554					;
   2555					;	1) LPINI (LP-20 INITIALIZATION)
   2556					;
   2557					;	2) LPLOOP (LP-20 DRIVER TASK LOOP)
   2558					;
   2559					;	MODIFICATIONS:
   2560					;
   2561					;	NO.	DATE		PROGRAMMER	REASON
   2562					;	---	----		----------	------
   2563					;	001	28-FEB-77	A. PECKHAM	CHANGE LENGTH OF VFU RECORDS
   2564					;						TO 145 FROM 140
   2565					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
   2566					; RCO 810804	04-AUG-81	S. LEAPLINE	RESET R0 WHEN BUFFER ALLOCATE
   2567					;						FAILS
   2568					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 30
LPINI	(INITIALIZE LP-20 TASK)

   2570						.SBTTL	LPINI	(INITIALIZE LP-20 TASK)
   2571					;
   2572					;+
   2573					;
   2574					;	THIS IS THE LP-20 USER-LEVEL TASK. IT HANDLES QIO
   2575					; REQUESTS, OUTPUT ACKNOWLEDGEMNETS, AND HUNG-CHECKING.
   2576					;
   2577					;	LPINI IS CALLED WHEN THE TASK IS STARTED. IT RESETS THE
   2578					; LP-20 AND LOADS THE STANDARD VERTICAL FORMAT AND TRANSLATION
   2579					; RAM.  THE 10-SECOND MARK-TIME REQUEST IS ALSO ENTERED.
   2580					;
   2581					;-
   2582					;
   2583					;
   2584					; DIRECTIVE PARAMETER BLOCKS
   2585					;
   2586	005554				LPMRKT:
   2587	005554					MRKT$	E.FLPC,10.*.CYLTM,10.*.CYLTM ;MARK-TIME REQUEST FOR 10 SECONDS
	005554	   027 	   005 			.BYTE	23.,5
	005556	000002 				.WORD	E.FLPC
	005560	001130 				.WORD	10.*.CYLTM
	005562	001130 				.WORD	10.*.CYLTM
	005564	000000 				.WORD
   2588	005566				MKSCDP:
   2589	005566					MRKT$	E.FLPW,.CYLTM,0		;WAIT FOR 1 SECOND
	005566	   027 	   005 			.BYTE	23.,5
	005570	000006 				.WORD	E.FLPW
	005572	000074 				.WORD	.CYLTM
	005574	000000 				.WORD	0
	005576	000000 				.WORD
   2590					;
   2591	005600				LPSSTV:
   2592	005600	005602'				.WORD	LPTRP4		;WHERE TO GO ON TRAP-AT-4
   2593					;
   2594					; HERE ON A TRAP TO 4 (HOPEFULLY AN EXPECTED NON-EX LP)
   2595					;
   2596	005602				LPTRP4:
   2597	005602	021627 	007172'			CMP	(SP),#LPDINT	;THIS FROM MARK-TIME?
   2598	005606	001404 				BEQ	10$		;YES-- OK
   2599	005610	021627 	010620'			CMP	(SP),#LPDCLR	;HOW ABOUT INIT?
   2600	005614	001401 				BEQ	10$		;YES-- OK
   2601	005616	000004 				IOT			;***** FATAL-- BAD TRAP AT 4
   2602					;
   2603	005620				10$:
   2604	005620	005062 	000000G			CLR	LPCSA(R2)	;NON-EX LP-- SAY SO
   2605	005624	005003 				CLR	R3		; BOTH WAYS
   2606	005626	052766 	000001 	000002 		BIS	#BIT0,2(SP)	;SET CARRY ON STACK
   2607	005634	000002 				RTI			;RETURN TO INTERRUPTED ROUTINE
   2608					;
   2609					; HERE ON POWER-RECOVERY AST
   2610					;
   2611	005636				LPWRUP:
   2612	005636					CALL	INITLP		;INIT ALL LP'S
	005636	004737 	010550'			JSR	PC,INITLP
   2613	005642	000002 				RTI			;RETURN FROM AST
   2614					;
   2615					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 30-1
LPINI	(INITIALIZE LP-20 TASK)

   2616					; LPINI -- INITIALIZE LP'S
   2617					;
   2618	005644				LPINI:
   2619	005644	013737 	000000G	000000G		MOV	.CRTSK,LPEVFG	;SAVE OUR TASK ADDRESS
   2620	005652	062737 	000020 	000000G		ADD	#A.EF,LPEVFG	;MAKE THAT ADDR OF OUR EVENT FLAGS
   2621	005660	052777 	000060 	000000G		BIS	#EF.LPW!EF.LPS,@LPEVFG ;SAY STATUS BUFFER AVAILABLE AND NOT WAITING
   2622	005666					DIR$	#LPMRKT		;ENTER MARK-TIME REQUEST FOR 10 SECONDS
	005666	012746 	005554'			MOV	#LPMRKT,-(SP)
	005672	104375 				EMT	375
   2623	005674					SVTK$S	#LPSSTV,#1	;ENABLE FOR TRAP-AT-4 RECOGNITION
	005674	012746 	000001 			MOV	#1,-(SP)
	005700	012746 	005600'			MOV	#LPSSTV,-(SP)
	005704	012746 				MOV	(PC)+,-(SP)
	005706	   071 	   003 			.BYTE	57.,3
	005710	104375 				EMT	375
   2624	005712					SPRA$S	#LPWRUP		;SETUP POWER-UP AST
	005712	012746 	005636'			MOV	#LPWRUP,-(SP)
	005716	012746 				MOV	(PC)+,-(SP)
	005720	   155 	   002 			.BYTE	109.,2
	005722	104375 				EMT	375
   2625	005724					CALL	INITLP		;INIT ALL THE LP'S
	005724	004737 	010550'			JSR	PC,INITLP
   2626					;	BR	LPLOOP		;FALL INTO NORMAL PROCESSING LOOP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 31
LPLOOP	(LP-20 DRIVER TASK LOOP)

   2628						.SBTTL	LPLOOP	(LP-20 DRIVER TASK LOOP)
   2629					;
   2630					;+
   2631					;
   2632					;	LPLOOP WAITS FOR AND DISPATCHES ON THE LP EVENT FLAGS,
   2633					; EF.LPD (INTERRUPT LEVEL I/O DONE), EF.NIR (QUEUE I/O REQUEST),
   2634					; AND EF.LPC (10 SECOND MARK-TIME REQUEST), IN THAT ORDER.
   2635					;
   2636					;-
   2637					;
   2638					;
   2639	005730				LPLOOP:
   2640	005730					WTLO$S	1,#EF.LPC!EF.LPD!EF.NIR ;WAIT FOR CLOCK (10 SECONDS)
	005730	012746 	000000C			MOV	#EF.LPC!EF.LPD!EF.NIR,-(SP)
	005734	012746 	000001 			MOV	#1,-(SP)
	005740	012746 				MOV	(PC)+,-(SP)
	005742	   053 	   003 			.BYTE	43.,3
	005744	104375 				EMT	375
   2641									; OR I/O DONE FROM ISR
   2642									; OR QIO REQUEST TO DO.
   2643	005746					.INH			;A FLAG SET-- LOCK OUT LP INTERRUPTS
	005746	013746 	177776 			MOV	PS,-(SP)
	005752	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2644	005760	017737 	000000G	000000G		MOV	@LPEVFG,LPCEVF	;GET CURRENT EVENT FLAGS
   2645	005766	042777 	000000C	000000G		BIC	#EF.LPC!EF.LPD!EF.NIR,@LPEVFG ;CLEAR THE FLAGS WE WAITED FOR
   2646	005774					.ENB			;RETORE IRPS
	005774	012637 	177776 			MOV	(SP)+,@#PS	;;
   2647	006000	005737 	000000G			TST	.LPPFL		;POWER FAIL?
   2648	006004	001404 				BEQ	10$		;NO -- CONTINUE
   2649	006006					CALL	INITLP
	006006	004737 	010550'			JSR	PC,INITLP
   2650	006012	005037 	000000G			CLR	.LPPFL
   2651	006016				10$:
   2652					;
   2653					;	BR	LPIOD		;TRY FOR EF.IOD (I/O DONE) FIRST
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 32
LPIOD	(LP TASK I/O DONE)

   2655						.SBTTL	LPIOD	(LP TASK I/O DONE)
   2656					;
   2657					;+
   2658					;
   2659					;	LPIOD IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.LPD IS SET.
   2660					; THIS IS SET BY THE INTERRUPT SEVICE WHENEVER IT IS DONE WITH A BUFFER
   2661					; OR STATUS INFORMATION IS TO BE SENT TO THE -10 (IE. LP JUST CAME
   2662					; ONLINE).
   2663					;
   2664					;	EACH LP'S THREADED OUTPUT LIST IS SCANNED FOR DONE BUFFERS
   2665					; (INDICATED BY T.HCBC NEGATIVE). THESE ARE RETURNED TO THE FREE POOL,
   2666					; AND, IN THE CASE OF QUEUE I/O REQUESTS, ..IODN IS CALLED TO TELL
   2667					; THE REQUESTOR THAT I/O HAS BEEN COMPLETED. IF A QUEUE I/O REQUEST
   2668					; IS STOPPED IN THE MIDDLE OF A TRANSFER BECAUSE OF ERROR, THE
   2669					; ERROR INDICATION IS GIVEN TO ..IODN, AND THE REQUEST IS ABORTED.
   2670					;
   2671					;	AFTER THE THREADED LIST SCAN, THE LP STATUS IS SENT TO THE
   2672					; -10 (BY CALLING SSTSLP) IF THE LP.SST FLAG IS SET.
   2673					;
   2674					;	IF A BUFFER WAS COMPLETED, AND THERE IS EITHER NONE
   2675					; OR ONE BUFFER TO OUTPUT, A REQUEST TO SEND IS SENT TO THE -10
   2676					; (BY CALLING ..SACK).
   2677					;
   2678					;-
   2679					;
   2680	006016				LPIOD:
   2681	006016	032737 	000001 	000000G		BIT	#EF.LPD,LPCEVF	;I/O DONE?
   2682	006024	001504 				BEQ	99$		;NO-- TRY NEXT FLAG IN CHAIN
   2683	006026	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS LPTBL (UNIT 0)
   2684	006032					PUSH	#L$$P20		;STACK COUNT OF LP'S TO LOOK AT
	006032	012746 	000002 			MOV	#L$$P20,-(SP)
   2685	006036				10$:
   2686	006036	005005 				CLR	R5		;AND INDICATE NO BUFFERS DONE
   2687	006040	016203 	000000G			MOV	LPCSA(R2),R3	;GET THE EXT PAGE ADDR OF THIS LP
   2688					;
   2689					; LOOP THROUGH THREADED LIST FOR THIS LP
   2690					;
   2691	006044				20$:
   2692	006044	016200 	000000G			MOV	LPTHD(R2),R0	;GET START OF LIST
   2693	006050	001411 				BEQ	80$		;DONE-- GO AWAY
   2694					;
   2695					; LOOK AT THIS THREAD BLOCK TO SEE IF DONE
   2696					;
   2697	006052				30$:
   2698	006052	005760 	000000G			TST	T.HCBC(R0)	;SEE IF DONE
   2699	006056	002471 				BLT	40$		;DONE-- PROCESS
   2700	006060	005762 	000000G			TST	LPITH(R2)	;IS I/O IN PROGRESS ON THIS BLOCK?
   2701	006064	001003 				BNE	80$		;YES-- WE ARE DONE WITH WHAT IS DONE
   2702					;
   2703					; LP STOPPED ON THIS ACTIVE THREAD BLOCK
   2704					;
   2705	006066	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS?
   2706	006072	001063 				BNE	40$		;YES-- TERMINATE IT, SINCE I/O STOPPED
   2707					;
   2708					; END OF LIST-- SEE IF WE SHOULD SEND STATUS AND/OR ACK
   2709					;
   2710	006074				80$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 32-1
LPIOD	(LP TASK I/O DONE)

   2711	006074	032712 	040000 			BIT	#LP.SST,(R2)	;TIME TO SEND STATUS?
   2712	006100	001402 				BEQ	81$		;NO-- HOW BOUT ACK?
   2713	006102					CALL	SSTSLP		;YES-- SEND STATUS TO -10
	006102	004737 	007360'			JSR	PC,SSTSLP
   2714	006106				81$:
   2715	006106	005700 				TST	R0		;ANYTHING LEFT TO DO?
   2716	006110	001411 				BEQ	84$		;NO-- SEND ACK
   2717	006112	032712 	004000 			BIT	#LP.WAT,(R2)	;ARE WE WAITING FOR RESPONSE?
   2718	006116	001026 				BNE	86$		;YES-- DON'T START OUPUT
   2719	006120	005762 	000000G			TST	LPITH(R2)	;NO-- IS LP GOING ALREADY?
   2720	006124	001023 				BNE	86$		;YES-- LEAVE IT GO
   2721	006126					CALL	TESTLP		;NO-- SEE IF LP CAN BE STARTED
	006126	004737 	010360'			JSR	PC,TESTLP
   2722	006132	000420 				BR	86$		;SEE IF ACK NEEDED
   2723					;
   2724					; QUEUE IS EMPTY-- RESET ALL FLAGS
   2725					;
   2726	006134				84$:
   2727	006134					.INH			;;;MAKE SURE DTE DOESN'T GIVE US SOMETHING
	006134	013746 	177776 			MOV	PS,-(SP)
	006140	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2728	006146	016200 	000000G			MOV	LPTHD(R2),R0	;;;GET THREAD POINTER
   2729	006152	001006 				BNE	85$		;;;OOPS-- LET'S GO AWAY, WE GOT SOMETHING
   2730	006154	032777 	000001 	000000G		BIT	#EF.LPD,@LPEVFG	;;;WILL WE BE BACK AGAIN?
   2731	006162	001002 				BNE	85$		;;;YES-- CATCH FLAGS NEXT TIME
   2732	006164	042712 	115400 			BIC	#LP.F10!LP.WAT!LP.LIP!LP.MCH!LP.HNG,(R2) ;;;SURELY OFF NOW
   2733	006170				85$:
   2734	006170					.ENB			;RESTORE INTERRUPTS
	006170	012637 	177776 			MOV	(SP)+,@#PS	;;
   2735	006174				86$:
   2736	006174	005705 				TST	R5		;DID WE REMOVE A BUFFER?
   2737	006176	001412 				BEQ	90$		;NO-- DON'T SEND ACK
   2738	006200	005700 				TST	R0		;YES-- ANY LEFT?
   2739	006202	001402 				BEQ	87$		;NONE-- SEND ACK
   2740	006204	005710 				TST	@R0		;IS THIS LAST BUFFER?
   2741	006206	001006 				BNE	90$		;NO-- SEND NOTHING
   2742	006210				87$:
   2743	006210	012700 	000000G			MOV	#LPTBL,R0	;ADDRESS BASE ADDR OF TABLE FOR ..SACK
   2744	006214	012703 	000000G			MOV	#D.CLPT,R3	;SAY LPT DEVICE CODE
   2745	006220					CALL	..SACK		;SEND THE ACK
	006220	004737 	000000G			JSR	PC,..SACK
   2746					;
   2747					; DONE WITH LP-- GET ANOTHER
   2748					;
   2749	006224				90$:
   2750	006224	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN TABLE
   2751	006230	005316 				DEC	(SP)		;DECREMENT COUNT
   2752	006232	003301 				BGT	10$		;BACK FOR MORE
   2753	006234	005726 				TST	(SP)+		;CLEAN STACK
   2754	006236				99$:
   2755	006236	000137 	006676'			JMP	LPNIR		;DONE-- TRY NEXT EVENT-FLAG
   2756					;
   2757					; THREAD BLOCK DONE-- REMOVE FROM LIST & DEALLOCATE
   2758					;
   2759	006242				40$:
   2760	006242	005703 				TST	R3		;LP EXIST???
   2761	006244	001564 				BEQ	49$		;NO-- GIVE UP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 32-2
LPIOD	(LP TASK I/O DONE)

   2762	006246	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS (I.E. NOW COMPLETE)
   2763	006252	001424 				BEQ	41$		;NO-- GO ON
   2764					;
   2765	006254	042712 	001000 			BIC	#LP.LIP,(R2)	;YES-- NO LONGER SO
   2766	006260	042713 	000014 			BIC	#MODE00!MODE01,(R3) ;CLEAR LOAD MODE BITS
   2767	006264					PUSH	<R0,R3>		;SAVE EPA
	006264	010046 				MOV	R0,-(SP)
	006266	010346 				MOV	R3,-(SP)
   2768	006270	016200 	000000G			MOV	LPRMA(R2),R0	;GET RAM BUFFER ADDR
   2769	006274	016201 	000000G			MOV	LPRMZ(R2),R1	; AND DATA SIZE
   2770	006300	012703 	000000G			MOV	#.BGBUF,R3	;WE GOT IT FROM THE BIG BUFFER
   2771	006304					CALL	..DEC2		;RETURN THE BUFFER
	006304	004737 	000000G			JSR	PC,..DEC2
   2772	006310					POP	<R3,R0>		;RESTORE EPA
	006310	012603 				MOV	(SP)+,R3
	006312	012600 				MOV	(SP)+,R0
   2773	006314	005062 	000000G			CLR	LPRMA(R2)	;NO LONGER THERE
   2774	006320	005062 	000000G			CLR	LPRMC(R2)	; . .
   2775	006324				41$:
   2776	006324	016004 	000000G			MOV	T.HCBC(R0),R4	;GET COMPLETION STATUS
   2777	006330	032704 	040000 			BIT	#TB.ABO,R4	;ABORTED?
   2778	006334	001130 				BNE	49$		;YES-- LEAVE NOW
   2779	006336	032704 	036000 			BIT	#TB.SFN,R4	;SPECIAL FUNCTION?
   2780	006342	001525 				BEQ	49$		;NO-- GO ON
   2781					;
   2782	006344	032704 	020000 			BIT	#TB.EOF,R4	;EOF?
   2783	006350	001430 				BEQ	42$		;NO-- JUST GO ON
   2784	006352	016260 	000000G	000000G		MOV	LPRMA(R2),T.HCAD(R0) ;RAM/VFU DATA PRESENT?
   2785	006360	001003 				BNE	411$		;YES-- DO RAM/VFU LOAD
   2786	006362	052712 	040200 			BIS	#LP.EOF!LP.SST,(R2) ;NO-- NOTE THAT EOF HAS OCCURED
   2787	006366	000513 				BR	49$		;THAT'S IT FOR EOF IF NO RAM/VFU DATA
   2788	006370				411$:
   2789	006370	016260 	000000G	000000G		MOV	LPRMC(R2),T.HCBC(R0) ;SET BYTE COUNT= LAST ADDRESS
   2790	006376	166060 	000000G	000000G		SUB	T.HCAD(R0),T.HCBC(R0) ;MAKE IT A BYTE COUNT
   2791	006404	052712 	001000 			BIS	#LP.LIP,(R2)	;NOTE LOAD NOW IN PRGRESS
   2792	006410	052713 	000010 			BIS	#VFULOD*MODE00,(R3) ;ASSUME VFU LOAD
   2793	006414	026227 	000000G	001000 		CMP	LPRMZ(R2),#1000	;TRNASLATION RAM DATA?
   2794	006422	001224 				BNE	80$		;NO-- MUST BE VFU DATA
   2795	006424	052713 	000014 			BIS	#RAMLOD*MODE00,(R3) ;YES-- SET RAM LOAD MODE
   2796	006430	000621 				BR	80$		;START LP GOING ON THIS BLOCK
   2797	006432				42$:
   2798	006432	032704 	010000 			BIT	#TB.LPC,R4	;LOAD PAGE COUNTER FUNCTION?
   2799	006436	001413 				BEQ	43$		;NO-- GO ON
   2800	006440	042712 	020000 			BIC	#LP.PZI,(R2)	;ASSUME NO INTERRUPT ENABLE
   2801	006444	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS OF FUNCTION DATA
   2802	006450	016163 	000002 	000010 		MOV	2(R1),LPPCTR(R3) ;SET PAGE COUNTER
   2803	006456	002057 				BGE	49$		;BIT15=0-- NO INTERRUPT
   2804	006460	052712 	020000 			BIS	#LP.PZI,(R2)	;BIT15=1-- INTERRUPT ENABLE
   2805	006464	000454 				BR	49$		;ALL DONE
   2806	006466				43$:
   2807	006466					PUSH	<R3,R0>		;SAVE THIS THREAD BLOCK ADDRESS
	006466	010346 				MOV	R3,-(SP)
	006470	010046 				MOV	R0,-(SP)
   2808	006472	016201 	000000G			MOV	LPRMC(R2),R1	;GET CURRENT RAM DATA ADDRESS
   2809	006476	001026 				BNE	46$		;GOT IT-- PUT THIS DATA IN THAT BUFFER
   2810	006500	012700 	000000G		431$:	MOV	#.BGBUF,R0	;[RCO 810408] POINT TO BIG BUFFER FOR DATA BLOCK
   2811	006504	012701 	001000 			MOV	#1000,R1	;ASSUME TRANSLATION RAM DATA
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 32-3
LPIOD	(LP TASK I/O DONE)

   2812	006510	032704 	004000 			BIT	#TB.RMD,R4	;RAM DATA?
   2813	006514	001002 				BNE	44$		;YES-- GOT IT
   2814	006516	012701 	000444 			MOV	#<^D<145*2>+2+3>&<-4>,R1 ; +++001 NO-- VFU DATA-- GET MAX LENGTH
   2815	006522				44$:
   2816	006522					CALL	..ALC2		;GET A BUFFER
	006522	004737 	000000G			JSR	PC,..ALC2
   2817	006526	103004 				BCC	45$		;GOT IT-- GO ON
   2818	006530					WSIG$S			;NO GOT-- WAIT AN INSTANT
	006530	012746 				MOV	(PC)+,-(SP)
	006532	   061 	   001 			.BYTE	49.,1
	006534	104375 				EMT	375
   2819	006536	000760 				BR	431$		;[RCO 810804] TRY FOR BUFFER AGAIN
   2820	006540				45$:
   2821	006540	010162 	000000G			MOV	R1,LPRMZ(R2)	;STORE RAM DATA SIZE
   2822	006544	010001 				MOV	R0,R1		;COPY THAT BUFFER ADDRESS
   2823	006546	010162 	000000G			MOV	R1,LPRMA(R2)	;STORE RAM DATA ADDRESS
   2824	006552	011600 				MOV	(SP),R0		;RESTORE THREAD BLOCK ADDRESS
   2825	006554				46$:
   2826	006554	016203 	000000G			MOV	LPRMA(R2),R3	;COPY ADDRESS WHERE DATA GOES
   2827	006560	066203 	000000G			ADD	LPRMZ(R2),R3	;COMPUTE END OF BUFFER
   2828	006564	016000 	000000G			MOV	T.HCAD(R0),R0	;GET THE RAM DATA ADDRESS
   2829	006570	042704 	177400 			BIC	#HIBYTE,R4	;CLEAR TRASH IN BYTE COUNT
   2830	006574	001404 				BEQ	48$		;ALL DONE IF ZERO BYTE COUNT
   2831	006576				47$:
   2832	006576	020103 				CMP	R1,R3		;GOING BEYOND END OF BUFFER?
   2833	006600	103002 				BHIS	48$		;YES-- THAT'S ALL THE DATA WE CAN TAKE
   2834	006602	112021 				MOVB	(R0)+,(R1)+	;STORE A BYTE AWAY
   2835	006604	077404 				SOB	R4,47$		;LOOP FOR ALL BYTES OF DATA
   2836	006606				48$:
   2837	006606					POP	<R0,R3>		;RESTORE THE THREAD BLOCK POIINTER
	006606	012600 				MOV	(SP)+,R0
	006610	012603 				MOV	(SP)+,R3
   2838	006612	010162 	000000G			MOV	R1,LPRMC(R2)	;STORE CURRENT BYTE ADDRESS
   2839	006616				49$:
   2840	006616	011062 	000000G			MOV	@R0,LPTHD(R2)	;REMOVE THIS BUFFER
   2841	006622	016001 	000000G			MOV	T.HBCT(R0),R1	;GET SIZE OF THIS THREAD BLOCK
   2842	006626	001013 				BNE	60$		;NOT QIO-- JUST DEALLOCATE
   2843					;
   2844					; QUEUE I/O REQUEST DONE-- CALL ..IODN
   2845					;
   2846	006630					PUSH	R3		;SAVE EPA
	006630	010346 				MOV	R3,-(SP)
   2847	006632	110403 				MOVB	R4,R3		;GET QUEUE I/O STATUS
   2848	006634	016004 	177776 			MOV	T.HIBC(R0),R4	;GET INITAIL BYTE COUNT AS TRANSFER COUNT
   2849	006640	010001 				MOV	R0,R1		;COPY THREAD BLOCK ADDRESS
   2850	006642	162701 	000004G			SUB	#R.PB+PBTHRD,R1	;GET ADDRESS OF REAL QUEUE I/O NODE
   2851	006646					CALL	..IODN		;SAY I/O DONE
	006646	004737 	000000G			JSR	PC,..IODN
   2852	006652					POP	R3		;RESTORE EPA
	006652	012603 				MOV	(SP)+,R3
   2853	006654	000406 				BR	61$		;ALL DONE
   2854					;
   2855					; ALL DONE WITH THREAD BLOCK-- DEALLOCATE IT
   2856					;
   2857	006656				60$:
   2858	006656					CALL	..DECB		;DEALLOCATE THE BUFFER
	006656	004737 	000000G			JSR	PC,..DECB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 32-4
LPIOD	(LP TASK I/O DONE)

   2859	006662	032712 	000400 			BIT	#LP.F10,(R2)	;DOES -10 HAVE A REQUEST IN?
   2860	006666	001401 				BEQ	61$		;NO-- DON'T FLAG TO ACK
   2861	006670	010205 				MOV	R2,R5		;NOTE THAT WE DID SOMETHING
   2862	006672				61$:
   2863	006672	000137 	006044'			JMP	20$		;GET NEXT THREAD BLOCK FOR THIS LP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 33
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2865						.SBTTL	LPNIR	(LP TASK QUEUE I/O REQUEST)
   2866					;
   2867					;+
   2868					;
   2869					;	LPNIR IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.NIR IS SET.
   2870					; THIS OCCURS WHEN ANOTHER TASK REQUESTS OUTPUT TO ANY LP. ALL LP'S
   2871					; ARE CHECKED FOR A REQUEST WAITING.
   2872					;
   2873					;	THE REQUEST IS QUEUED UP IN THE THREADED OUTPUT LIST
   2874					; FOR THIS LP, USING AN EXTENDED THREAD BLOCK. THIS BLOCK IS DISTINGUISHED
   2875					; AS A QUEUE I/O REQUEST BY T.HBCT BEING ZERO (THE LENGTH OF THE BLOCK
   2876					; IS T.HQRS).  THE ADDITIONAL INFORMATION IN THIS THREAD BLOCK IS:
   2877					;	T.HEMA --	(BYTE) EXTENDED MEMORY ADDRESS BITS (BITS 4 AND 5)
   2878					;	T.HVFC --	(BYTE) VERTICAL FORMAT CONTROL CHARACTER
   2879					;	T.HIBC --	INITIAL BYTE COUNT
   2880					;
   2881					;-
   2882					;
   2883						.ENABLE	LSB
   2884	006676				LPNIR:
   2885	006676	032737 	000000G	000000G		BIT	#EF.NIR,LPCEVF	;A QUEUE I/O REQUEST FOR US?
   2886	006704	001514 				BEQ	99$		;NO-- TRY NEXT IN CHAIN
   2887	006706	012700 	050114 			MOV	#"LP,R0		;SAY WE ARE A LP
   2888	006712					CALL	..DQRN		;GET A REQUEST
	006712	004737 	000000G			JSR	PC,..DQRN
   2889	006716	103507 				BCS	99$		;NONE-- DONE
   2890					;
   2891					; GOT QUEUE I/O REQUEST NODE-- ADDR IN R1
   2892					;
   2893					; REGISTERS RETURNED BY ..DQRN
   2894					;	R1 --	ADDRESS OF REQUEST NODE
   2895					;	R2 --	UNIT # OF REQUESTED DEVICE
   2896					;	R3 --	BYTE COUNT OF DATA
   2897					;	R4 --	EXTENDED ADDRESS BITS 16 AND 17 (IN BITS 4 AND 5)
   2898					;	R5 --	PHYSICAL ADDRESS OF DATA
   2899					;
   2900					; CHECK FOR FUNCTION CODES:
   2901					;	IO.WLB	OUTPUT BUFFER
   2902					;	IO.WVB	OUTPUT BUFFER
   2903					;	IO.KIL	FLUSH OUTPUT (CALL ..SPLP)
   2904					;	IO.DAC	CLOSE OUTPUT (TYPE <FF>)
   2905					;	IO.RVB	READ-- ILLEGAL FUNCTION
   2906					;	IO.RLB	READ-- ILLEGAL FUNCTION
   2907					;
   2908					; ALL OTHER FUNCTIONS ARE IGNORED
   2909					;
   2910	006720	006302 				ASL	R2		;MAKE UNIT IN WORDS
   2911	006722	016202 	000000G			MOV	LPUTBL(R2),R2	;GET ADDR OF LPTBL ENTRY FOR THIS LP
   2912	006726	116100 	000001G			MOVB	R.FC+1(R1),R0	;GET FUNCTION CODE FROM REQUEST NODE
   2913	006732	001430 				BEQ	20$		;EXPRESS FUNCTION-- LOOK AT IT
   2914	006734	122700 	000001 			CMPB	#IO.WLB/400,R0	;WRITE LOGICAL?
   2915	006740	001441 				BEQ	40$		;YES-- PRINT
   2916	006742	122700 	000022 			CMPB	#IO.WVB/400,R0	;WRITE VIRTUAL?
   2917	006746	001436 				BEQ	40$		;YES-- PRINT ALSO
   2918	006750	122700 	000002 			CMPB	#IO.RLB/400,R0	;READ LOGICAL????
   2919	006754	001414 				BEQ	15$		;YES-- ILLEGAL
   2920	006756	122700 	000021 			CMPB	#IO.RVB/400,R0	;READ VIRTUAL????
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 33-1
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2921	006762	001411 				BEQ	15$		;YES-- ILLEGAL
   2922	006764	122700 	000020 			CMPB	#IO.DAC/400,R0	;CLOSE OUT FILE?
   2923	006770	001017 				BNE	30$		;NO-- ASSUME OK, GIVE SUCCESS
   2924					;
   2925					; IO.DAC -- CLOSE OUT FILE, SEND <FF>
   2926					;
   2927	006772	012705 	007124'			MOV	#VFCFF,R5	;SET ADDRESS TO POINT TO FORM-FEED
   2928	006776	012703 	000001 			MOV	#1,R3		;BYTE COUNT= 1
   2929	007002	005004 				CLR	R4		;NO EMA BITS
   2930	007004	000417 				BR	40$		;SEND LIKE QUEUE I/O
   2931					;
   2932					; ILLEGAL FUNCTION
   2933					;
   2934	007006				15$:
   2935	007006	012703 	177776 			MOV	#IE.IFC,R3	;SAY ILLEGAL
   2936	007012	000410 				BR	31$		;SO SAY IT
   2937					;
   2938					; IO.KIL-- FLUSH OUTPUT
   2939					;
   2940	007014				20$:
   2941	007014	022761 	000012 	000000G		CMP	#IO.KIL,R.FC(R1) ;THIS I/O KILL?
   2942	007022	001002 				BNE	30$		;NO-- IGNORE
   2943	007024					CALL	..SPLP		;FLUSH OUTPUT
	007024	004737 	011414'			JSR	PC,..SPLP
   2944					;
   2945					; IO.ATT, IO.DET-- IGNORE
   2946					;
   2947	007030				30$:
   2948	007030	012703 	000001 			MOV	#IS.SUC,R3	;SAY 'SUCCESS' TO ..IODN
   2949	007034				31$:
   2950	007034	005004 				CLR	R4		;NO BYTES TRANSFERRED
   2951	007036					CALL	..IODN		;RETURN PACKET TO REQUESTOR
	007036	004737 	000000G			JSR	PC,..IODN
   2952	007042	000715 				BR	LPNIR		;DONE-- TRY FOR SOME MORE
   2953					;
   2954					; IO.WLB, IO.WVB-- SEND DATA TO LP
   2955					;
   2956					; ENTER THIS REQUEST IN THREADED OUTPUT LIST
   2957					;
   2958	007044				40$:
   2959	007044	010100 				MOV	R1,R0		;COPY NODE ADDRESS
   2960	007046	062700 	000004G			ADD	#R.PB+PBTHRD,R0	;POINT TO THREAD BLOCK AREA OF R.PB
   2964	007052	116101 	000004G			MOVB	R.PB+4(R1),R1	;GET VERTICAL FORMAT CHARACTER
   2965	007056	005060 	000000G			CLR	T.HBCT(R0)	;NOTE THAT THIS IS A QIO REQUEST
   2966	007062	010560 	000000G			MOV	R5,T.HCAD(R0)	;SAVE PHYSICAL ADDR OF DATA
   2967	007066	010360 	000000G			MOV	R3,T.HCBC(R0)	; AND BYTE COUNT OF DATA
   2968	007072	110460 	177774 			MOVB	R4,T.HEMA(R0)	; AND EXTENDED MEMORY ADDR BITS
   2969					;
   2970	007076	012705 	007122'			MOV	#VFCTBL,R5	;YES-- POINT TO TABLE OF FORMAT CONTROL CHARACTERS
   2971	007102				55$:
   2972	007102	112560 	177775 			MOVB	(R5)+,T.HVFC(R0) ;GET THE CHARCTER TO CONTROL
   2973	007106	001402 				BEQ	60$		;END OF TABLE-- GIVE UP WITH NOTHING
   2974	007110	122501 				CMPB	(R5)+,R1	;MATCH THE VFC CHARACTER?
   2975	007112	001373 				BNE	55$		;NO-- LOOP UNTIL WE FIND ONE
   2976	007114				60$:
   2977	007114					CALL	..PTLP		;START LP ON THIS BUFFER, OR QUEUE UP
	007114	004737 	011646'			JSR	PC,..PTLP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 33-2
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2978	007120	000666 				BR	LPNIR		;LOOK FOR ANOTHER REQUEST
   2979					;
   2980					; VERTICAL FORMAT CONTROL CHARACTER TABLE FOR QUEUE I/O REQUESTS
   2981					;
   2982	007122				VFCTBL:
   2983	007122	   012 	   040 			.BYTE	12,' 		;<SPACE>	NEXT LINE
   2984	007124	   014 	   061 		VFCFF:	.BYTE	14,'1		;"1"		NEXT PAGE
   2985	007126	   015 	   053 			.BYTE	15,'+		;"+"		OVERPRINT
   2986	007130	   021 	   060 			.BYTE	21,'0		;"0"		DOUBLE SPACE
   2987	007132	   012 	   044 			.BYTE	12,'$		;"$"		PROMPTING OUTPUT
   2988	007134	   000 				.BYTE	0		;END OF TABLE
   2989						.EVEN
   2990					;
   2991					;
   2992	007136				99$:
   2993					;	BR	LPMKT		;NEXT IS MARK-TIME REQUESTS
   2994						.DSABLE LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 34
LPMKT	(LP TASK MARK-TIME REQUEST)

   2996						.SBTTL	LPMKT	(LP TASK MARK-TIME REQUEST)
   2997					;
   2998					;+
   2999					;	LPMKT IS DISPATCHED TO WHEN THE EF.LPC EVENT FLAG IS SET.
   3000					; THIS OCCURS EVERY 10. SECONDS.  EACH LP IS CHECKED TO SEE IF LP.HNG
   3001					; BIT HAS BEEN CLEARED BY ..DOLP (I/O COMPLETION) IF IT IS NOT
   3002					; IDLE. IF LP.HNG IS SET, NO I/O HAS OCCURED IN 10 SECONDS, SO
   3003					; 'GO' IS SET IN LPCSRA TO CONTINUE THE LP. LPHUNG IS INCREMENTED.
   3004					; IN ANY CASE, IF THE LP IS NOT IDLE, LP.HNG IS SET SO IT CAN BE
   3005					; CHECKED IN ANOTHER 10 SECONDS.
   3006					;
   3007					;-
   3008					;
   3009						.ENABLE	LSB
   3010	007136				LPMKT:
   3011	007136	032737 	000002 	000000G		BIT	#EF.LPC,LPCEVF	;IS MARK-TIME EVENT FLAG SET?
   3012	007144	001503 				BEQ	99$		;NO-- CHECK NEXT FLAG
   3013	007146	012705 	000002 			MOV	#L$$P20,R5	;SET UP # LP'S TO CHECK
   3014	007152	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS DATA BLOCK FOR UNIT 0
   3015	007156				10$:
   3016	007156	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
   3017	007162	001407 				BEQ	12$		;NON-EX LP-- SKIP THIS
   3018	007164	000241 				CLC			;CLEAR CARRY, IN CASE OF TRAP
   3019	007166	032713 	000100 			BIT	#INTENB,(R3)	;IS INTERRUPT-ENABLE STILL SET?
   3020	007172				LPDINT:
   3021	007172	103403 				BCS	12$		;TIME-OUT-- JUST SEND STATUS
   3022	007174	001002 				BNE	12$		;YES-- DON'T SET IT
   3023	007176	052713 	000100 			BIS	#INTENB,(R3)	;MAKE SURE WE STILL HAVE INTERRUPT ENABLE
   3024	007202				12$:
   3025	007202	032712 	004000 			BIT	#LP.WAT,(R2)	;WAITING?
   3026	007206	001047 				BNE	30$		;YES-- DON7T TRY TO CONTINUE
   3027	007210	005762 	000000G			TST	LPTHD(R2)	;ANY ACTIVE REQUESTS?
   3028	007214	001453 				BEQ	90$		;NONE-- LP IS IDLE
   3029	007216	032712 	100000 			BIT	#LP.HNG,(R2)	;NO I/O IN 10 SEC?
   3030	007222	001446 				BEQ	80$		;NO-- I/O CLEARED THIS BIT-- OK
   3031	007224	005762 	000000G			TST	LPITH(R2)	;IS I/O SUPPOSED TO BE IN PROGRSS?
   3032	007230	001436 				BEQ	30$		;NO-- SEE IF WE JUST CAME ON-LINE
   3033	007232	005703 				TST	R3		;DEVICE EXIST?
   3034	007234	001434 				BEQ	30$		;NON-EX LP-- FLUSH OUTPUT
   3035	007236	005237 	000000G			INC	LPHUNG		;COUNT # TIMES WE HAD TO START LP G9OING
   3036	007242	005362 	000000G			DEC	LPRTY(R2)	;ONE LESS TIME TO TRY
   3037	007246	002427 				BLT	30$		;NONE LEFT-- GIVE UP
   3038	007250					.INH4			;;;LOCK OUT LP INTERRUPTS
	007250	013746 	177776 			MOV	@#PS,-(SP)
	007254	112737 	000200 	177776 		MOVB	#PR4,@#PS
   3039	007262	105062 	000000G			CLRB	LPCSM+0(R2)	;;;CLEAR LOW BYTE SO NO CARRY
   3040	007266	066362 	000016 	000000G		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM (CLEARED BY GO)
   3041	007274	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
   3042	007300	001403 				BEQ	20$		;;;YES-- DO NEXT BUFFER
   3043	007302	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;NO-- JUST SET INT ENB AND GO
   3044	007306	000404 				BR	29$		;;;DO ANOTHER LP
   3045					;
   3046	007310				20$:
   3047	007310	016200 	000000G			MOV	LPITH(R2),R0	;;;GET CURRENT BUFFER ADDRESS
   3048	007314					CALL	..DOL1		;;;DONE-- DO NEXT BUFFER
	007314	004737 	011774'			JSR	PC,..DOL1
   3049	007320				29$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 34-1
LPMKT	(LP TASK MARK-TIME REQUEST)

   3050	007320					.ENB4			;ALLOW LP INTERRUPTS
	007320	012637 	177776 			MOV	(SP)+,@#PS
   3051	007324	000405 				BR	80$		;DONE WITH LP
   3052					;
   3053	007326				30$:
   3054	007326	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO SEND STATUS!!
   3055	007332	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;YES-- START IT UP AGAIN
   3056	007340				80$:
   3057	007340	052712 	100000 			BIS	#LP.HNG,(R2)	;SAY LP NO I/O
   3058									  ; THIS WILL BE CLEARED WHENEVER
   3059									  ; ANY I/O IS DONE TO LP
   3060	007344				90$:
   3061	007344	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN LPTBL
   3062	007350	005305 				DEC	R5		;TRY ALL
   3063	007352	003301 				BGT	10$		; LP'S
   3064	007354				99$:
   3065	007354	000137 	005730'			JMP	LPLOOP		;GO BACK TO WAITING
   3066						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 35
SSTSLP	(SEND LP-20 STATUS TO -10)

   3068						.SBTTL	SSTSLP	(SEND LP-20 STATUS TO -10)
   3069					;
   3070					;+
   3071					;
   3072					;	SSTSLP IS CALLED TO SEND THE LP-20 STATUS TO THE -10.
   3073					; IT IS INVOKED BY BOTH A REQUEST FOR STATUS FROM THE -10
   3074					; AND ANY LP-20 ERROR INDICATION, AS WELL AS PAGE COUNT ZERO
   3075					; (IF ENABLED) AND UNDEFINED CHARACTERS IN THE RAM.
   3076					;
   3077					;	TWO DEVICE-STSTUS WORDS ARE GENERATED,
   3078					; WITH THE STANDARD BITS (DV.XXX) IN THE FIRST WORD, AND THE
   3079					; FOLLOWING DEVICE-DEPENDENT BITS IN THE SECOND WORD:
   3080					;
   3081					;	DD.PGZ	PAGE COUNTER REACHED ZERO
   3082					;	DD.CHI	UNDEFINED CHARACTER IN RAM
   3083					;	DD.VFE	VFU ERROR (IMPLIES PAPER RE-ALIGNMENT REQUIRED)
   3084					;	DD.LER	ERROR FINDING/READING VFU AND RAM FILE
   3085					;	DD.OVF	OPTICAL VERTICAL FORMAT UNIT
   3086					;	DD.RME	RAM PARITY ERROR-- RELOAD REQUIRED
   3087					;
   3088					; THE STATUS BLOCK SENT TO THE -10 IS IN THE FOLLOWING FORMAT:
   3089					;
   3090					; WORD	0	STATUS WORD 0 (DV.XXX)
   3091					;	1	STATUS WORD 1 (DD.XXX)
   3092					;	2	(HIGH BYTE) # BYTES OF DEVICE DEPENDENT INFO (ALWAYS 2.)
   3093					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS (ALWAYS 16.)
   3094					;	3	(LOW BYTE) ACCUMULATED CHECKSUM (HIGH BYTE) RETRY COUNT
   3095					; LP-20 DEVICE REGISTERS
   3096					;	4	LPCSRA
   3097					;	5	LPCSRB
   3098					;	6	LPBSAD
   3099					;	7	LPBCTR
   3100					;	10	LPPCTR
   3101					;	11	LPRAMD
   3102					;	12	LPCBUF/LPCCTR
   3103					;	13	LPTDAT/LPCKSM
   3104					;
   3105					; CALLED AT TASK LEVEL
   3106					;
   3107					; CALLING SEQUENCE:
   3108					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3109					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
   3110					;
   3111					; EXIT CONDITIONS:
   3112					;
   3113					;	NO REGISTERS MODIFIED
   3114					;
   3115					;-
   3116					;
   3117						.ENABLE	LSB
   3118	007360				SSTSLP:
   3119	007360					SAVE	<R0,R1,R3,R4>	;SAVE USED CARS
	007360	010046 				MOV	R0,-(SP)
	007362	010146 				MOV	R1,-(SP)
	007364	010346 				MOV	R3,-(SP)
	007366	010446 				MOV	R4,-(SP)
   3120	007370	042712 	040000 			BIC	#LP.SST,(R2)	;CLEAR 'SEND STATUS' FLAG
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 35-1
SSTSLP	(SEND LP-20 STATUS TO -10)

   3121	007374	032777 	000020 	000000G	4$:	BIT	#EF.LPS,@LPEVFG	;IS OUR BUFFER AVAILABLE?
   3122	007402	001006 				BNE	5$		;YES-- DON'T WAIT
   3123	007404					WSIG$S			;NO-- WAIT FOR IT
	007404	012746 				MOV	(PC)+,-(SP)
	007406	   061 	   001 			.BYTE	49.,1
	007410	104375 				EMT	375
   3124	007412	005737 	000002G			TST	.COMEF+2	; [4.1.1105] IS PRIMARY PROTOCOL RUNNING ?
   3125	007416	100766 				BMI	4$		; [4.1.1105] YES-- STILL BUSY...
   3126	007420				5$:
   3127	007420	012700 	000004G			MOV	#LPSTBK+4,R0	;GET ADDRES OF BYTE COUNT WORD
   3128	007424	005010 				CLR	(R0)		;CLEAR IT (ASSUME NON-EX DEV)
   3129	007426	005040 				CLR	-(R0)		; AND SECOND WORD OF STATUS
   3130	007430	005040 				CLR	-(R0)		;AND FIRST WORD, WITH R0 POINTING TO IT
   3131	007432	005001 				CLR	R1		;CLEAR ERROR MESSAGE POINTER, TOO
   3132	007434	005703 				TST	R3		;GOT A EPA?
   3133	007436	001005 				BNE	10$		;GOT IT-- CHECK OUT LP STATUS
   3134	007440	052710 	000007 			BIS	#DV.NXD!DV.OIR!DV.OFL,(R0) ;NON-EX LP-- SAY SO
   3135	007444	012701 	010111'			MOV	#ERMNXD,R1	;PRINT ERROR ON CONSOLE, TOO
   3136	007450	000537 				BR	50$		;GO SEND THE ERROR
   3137					;
   3138	007452				10$:
   3139	007452	032712 	000200 			BIT	#LP.EOF,(R2)	;THIS AN EOF ENCOUNTERED?
   3140	007456	001402 				BEQ	11$		;NO-- GO ON
   3141	007460	052710 	000040 			BIS	#DV.EOF,(R0)	;YES-- SAY SO
   3142	007464				11$:
   3143	007464	032713 	004000 			BIT	#ONLINE,(R3)	;LP OFF-LINE?
   3144	007470	001004 				BNE	12$		;NO-- GO ON
   3145	007472	052710 	000006 			BIS	#DV.OFL!DV.OIR,(R0) ;YES-- SAY OFF-LINE
   3146	007476	012701 	010131'			MOV	#ERMOFL,R1	; AND TO CONSOLE
   3147	007502				12$:
   3148	007502	032713 	010000 			BIT	#VFURDY,(R3)	;VFU NOT READY?
   3149	007506	001007 				BNE	13$		;NO-- OK
   3150	007510	052760 	000004 	000002 		BIS	#DD.VFE,2(R0)	;YES-- SET SO IN DD WORD
   3151	007516	012701 	010144'			MOV	#ERMVFE,R1	;TELL CONSOLE
   3152	007522	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
   3153	007526				13$:
   3154	007526	032763 	000076 	000002 		BIT	#LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM,LPCSRB(R3) ;FATAL ERROR?
   3155	007534	001404 				BEQ	14$		;NO-- ALL OK
   3156	007536	052710 	000100 			BIS	#DV.LOG,(R0)	;YES-- SAY BAD ERROR, AND ERROR-LOG IT
   3157	007542	012701 	010163'			MOV	#ERMHER,R1	;SAY SPLAT TO CONSOLE
   3158	007546				14$:
   3159	007546	016204 	000000G			MOV	LPTHD(R2),R4	;IS I/O LEFT TO DO?
   3160	007552	001002 				BNE	141$		;YES-- SAY SO
   3161	007554	005001 				CLR	R1		;NO-- DON'T SEND OFF-LINE/VFE
   3162	007556	000436 				BR	15$		;GO ON
   3163					;
   3164	007560				141$:
   3165	007560	052710 	000020 			BIS	#DV.IOP,(R0)	;SAY I/O IN PROGRESS
   3166	007564	005764 	000000G			TST	T.HBCT(R4)	;IS THIS A QUEUE I/O REQUEST?
   3167	007570	001002 				BNE	142$		;NO-- GO ON
   3168	007572	052710 	000400 			BIS	#DV.F11,(R0)	;YES-- SAY FROM -11
   3169	007576				142$:
   3170	007576	005762 	000000G			TST	LPRTY(R2)	;IS RETRY COUNT DOWN YET?
   3171	007602	002024 				BGE	15$		;NO-- GO ON
   3172	007604	052710 	000300 			BIS	#DV.URE!DV.LOG,(R0) ;SAY RETRY COUNT EXHAUSTED
   3173	007610	032712 	100000 			BIT	#LP.HNG,(R2)	;WAS DEVICE HUNG, TOO?
   3174	007614	001404 				BEQ	143$		;NO-- GO ON
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 35-2
SSTSLP	(SEND LP-20 STATUS TO -10)

   3175	007616	052710 	001004 			BIS	#DV.HNG!DV.OIR,(R0) ;YES-- SAY THAT TOO
   3176	007622	012701 	010200'			MOV	#ERMHNG,R1	;GET HUNG MESSAGE, TOO
   3177	007626				143$:
   3178	007626	032763 	000010 	000002 		BIT	#RAMPAR,LPCSRB(R3) ;RAM PARITY ERROR?
   3179	007634	001405 				BEQ	144$		;NO-- GO ON
   3180	007636	052760 	000040 	000002 		BIS	#DD.RME,2(R0)	;YES-- NOTE FATAL ERROR
   3181	007644	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
   3182	007650				144$:
   3183	007650					CALL	..SPLP		;RETRY COUNT EXHAUSTED-- GIVE UP OUTPUT
	007650	004737 	011414'			JSR	PC,..SPLP
   3184	007654				15$:
   3185	007654	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGE-COUNT ZERO?
   3186	007660	001412 				BEQ	16$		;NO-- OK
   3187	007662	032712 	020000 			BIT	#LP.PZI,(R2)	;YES-- BUT ENABLED?
   3188	007666	001407 				BEQ	16$		;NO-- DON'T TELL HIM
   3189	007670	052710 	000010 			BIS	#DV.SCN,(R0)	;TELL -10 WE WANT HIM TO ACK
   3190	007674	052760 	000001 	000002 		BIS	#DD.PGZ,2(R0)	; FOR PAGE-ZERO
   3191	007702	052712 	004000 			BIS	#LP.WAT,(R2)	;REMEMBER TO WAIT
   3192	007706				16$:
   3193	007706	032713 	020000 			BIT	#CHRINT,(R3)	;UNDEFINED (INTERRUPT) CHARACTER?
   3194	007712	001407 				BEQ	17$		;NO-- GO ON
   3195	007714	052710 	000010 			BIS	#DV.SCN,(R0)	;NOTE TO WAIT
   3196	007720	052760 	000002 	000002 		BIS	#DD.CHI,2(R0)	; FOR UNDEF CHAR
   3197	007726	052712 	004000 			BIS	#LP.WAT,(R2)	; AND FOR US TO WAIT
   3198	007732				17$:
   3199	007732	032763 	004000 	000002 		BIT	#OPTVFU,LPCSRB(R3) ;THIS LP HAVE OPTICAL VFU?
   3200	007740	001403 				BEQ	18$		;NO-- MUST HAVE DAVFU (HOORAY)
   3201	007742	052760 	000020 	000002 		BIS	#DD.OVF,2(R0)	;YES-- SAY SO
   3202	007750				18$:
   3203					;
   3204					; ERROR CODE NOW IN LPSTBK+0 AND LPSTBK+2
   3205					;
   3206	007750				50$:
   3207	007750	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST?
   3208	007754	001115 				BNE	70$		;YES-- DON'T PRINT ON CONSOLE
   3209					;
   3210					; NON-10 REQUEST-- SEND CONSOLE A MESSAGE ABOUT OUR STATUS
   3211					;
   3212	007756	042712 	004000 			BIC	#LP.WAT,(R2)	;DON'T WAIT FOR NON-10 REQUEST
   3213	007762	005701 				TST	R1		;TELL OPR?
   3214	007764	001511 				BEQ	70$		;NO-- JUST SEND TO -10 ANYWAY
   3215	007766	012700 	010071'			MOV	#LPEMSX,R0	;GET ADDRESS OF END OF MESSAGE SO FAR
   3216	007772				51$:
   3217	007772	112120 				MOVB	(R1)+,(R0)+	;COPY A BYTE OF THE MESSAGE
   3218	007774	001376 				BNE	51$		; UNTIL ASCIZZZZZZZZ
   3219	007776	162700 	010056'			SUB	#LPEMSG,R0	;GET LENGTH OF MESSAGE
   3220	010002	010037 	010052'			MOV	R0,LPQDPB+Q.IOPL+2 ;SET LENGTH IN QIOW$ DPB
   3221	010006	011201 				MOV	(R2),R1		;GET UNIT
   3222	010010	042701 	177774 			BIC	#^C<LP.UNT>,R1	; NUMBER OF THIS LP
   3223	010014	062701 	000060 			ADD	#'0,R1		;MAKE IT ASCII
   3224	010020	110137 	010066'			MOVB	R1,LPERUN	;SAVE IN MESSAGE STRING
   3225	010024					DIR$	#LPQDPB		;DO QUEUE I/O TO CTY
	010024	012746 	010034'			MOV	#LPQDPB,-(SP)
	010030	104375 				EMT	375
   3226	010032	000466 				BR	70$		;SEE IF WE CAN CONTINUE
   3227					;
   3228	010034				LPQDPB:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 35-3
SSTSLP	(SEND LP-20 STATUS TO -10)

   3229	010034					QIOW$	IO.WLB,1,E.FLPQ,1,0,0,<LPEMSG,0,0>
	010034	   003 	   011 			.BYTE	3,$$$ARG
	010036	000400 				.WORD	IO.WLB
	010040	000001 				.WORD	1
	010042	   003 	   001 			.BYTE	E.FLPQ,1
	010044	000000 				.WORD	0
	010046	000000 				.WORD	0
	010050	010056'				.WORD	LPEMSG
	010052	000000 				.WORD	0
	010054	000000 				.WORD	0
   3230	010056				LPEMSG:
   3231	010056	   015 	   012 	   052 		.ASCII	<15><12>/*** LP/
	010061	   052 	   052 	   040
	010064	   114 	   120
   3232	010066				LPERUN:
   3233	010066	   060 	   072 	   040 		.ASCII	/0: /
   3234	010071				LPEMSX:
   3235	010071					.BLKB	16.		;REST OF MESSAGE: MAX OF 16 BYTES
   3236	010111				ERMNXD:
   3237	010111	   116 	   117 	   116 		.ASCIZ	/NON-EX DEVICE/<15><12>
	010114	   055 	   105 	   130
	010117	   040 	   104 	   105
	010122	   126 	   111 	   103
	010125	   105 	   015 	   012
	010130	   000
   3238	010131				ERMOFL:
   3239	010131	   117 	   106 	   106 		.ASCIZ	/OFF-LINE/<15><12>
	010134	   055 	   114 	   111
	010137	   116 	   105 	   015
	010142	   012 	   000
   3240	010144				ERMVFE:
   3241	010144	   106 	   117 	   122 		.ASCIZ	/FORMAT ERROR/<15><12>
	010147	   115 	   101 	   124
	010152	   040 	   105 	   122
	010155	   122 	   117 	   122
	010160	   015 	   012 	   000
   3242	010163				ERMHER:
   3243	010163	   104 	   101 	   124 		.ASCIZ	/DATA ERROR/<15><12>
	010166	   101 	   040 	   105
	010171	   122 	   122 	   117
	010174	   122 	   015 	   012
	010177	   000
   3244	010200				ERMHNG:
   3245	010200	   110 	   125 	   116 		.ASCIZ	/HUNG/<15><12>
	010203	   107 	   015 	   012
	010206	   000
   3246						.EVEN
   3247					;
   3248					; HERE WE SEND THE STATUS BLOCK TO THE -10, R1= STATE CODE
   3249					;
   3250					;
   3251					; ASSEMBLE DEVICE INFO AND DEVICE REGISTERS
   3252					;
   3253	010210				70$:
   3254	010210	005703 				TST	R3		;NON-EX DEVICE?
   3255	010212	001417 				BEQ	72$		;YES-- DON'T STORE NON-EX DEVICE REGISTERS
   3256	010214	012700 	000004G			MOV	#LPSTBK+4,R0	;POINT TO STATUS RETURN BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 35-4
SSTSLP	(SEND LP-20 STATUS TO -10)

   3257	010220	012720 	000000C			MOV	#<2.*BIT8>+<LPEXPZ*BIT0>,(R0)+ ;2 BYTES INFO, + DEV REG'S
   3258	010224	116220 	000001G			MOVB	LPCSM+1(R2),(R0)+ ;CHECKSUM
   3259	010230	012701 	000012 			MOV	#LPRTRY,R1	;GET INITIAL RETRY COUNT
   3260	010234	166201 	000000G			SUB	LPRTY(R2),R1	; - CURRENT COUNT= # RETRIES
   3261	010240	110120 				MOVB	R1,(R0)+	;HIGH BYTE-- # RETRIES
   3262	010242				71$:
   3263	010242	012320 				MOV	(R3)+,(R0)+	;(2) ... LP DEVICE REGISTERS
   3264	010244	022700 	000000C			CMP	#LPSTBK+LPSTLN,R0 ;DONE YET?
   3265	010250	101374 				BHI	71$		;NO-- KEEP ON LOOPING
   3266					;
   3267					; SET UP REGISTERS FOR ..STIN:
   3268					;	R0 --	ADDRESS OF BLOCK (FIRST WORD IS UNIT/BYTE COUNT)
   3269					;	R1 --	FUNCTION CODE + BIT15 (FOR INDIRECT FUNCTION)
   3270					;	R2 --	EVENT FLAG NUMBER TO BE SET WHEN BLOCK SENT
   3271					;	R3 --	DEVICE CODE (D.CLPT FOR THE LP-20)
   3272					;
   3273	010252				72$:
   3274	010252	012700 	000000G			MOV	#LPSTBK,R0	;SET UP ADDR FOR ..STIN
   3275	010256	011201 				MOV	(R2),R1		;GET UNIT NUMBER
   3276	010260	042701 	177774 			BIC	#^C<LP.UNT>,R1	; FROM LPSTS
   3277	010264	110140 				MOVB	R1,-(R0)	;HIGH BYTE HEADER: UNIT #
   3278	010266	112740 	000002G			MOVB	#LPSTLN+2,-(R0)	;LOW BYTE HEADER: SIZE OF BLOCK
   3279	010272	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ;INDIRECT FUNCTION HERE IS DEVICE STATUS
   3280	010276					PUSH	R2		;SAVE LPTBL POINTER
	010276	010246 				MOV	R2,-(SP)
   3281	010300	012702 	000005 			MOV	#E.FLPS,R2	;EVENT FLAG NUMBER
   3282	010304	012703 	000000G			MOV	#D.CLPT,R3	;DEVICE LP
   3283	010310	042777 	000020 	000000G		BIC	#EF.LPS,@LPEVFG	;CLEAR BUFFER AVAILABLE FLAG
   3284	010316					CALL	..STIN		;SAVE FOR NOW
	010316	004737 	000000G			JSR	PC,..STIN
   3285	010322					POP	R2		;RESTORE LPTBL POINTER
	010322	012602 				MOV	(SP)+,R2
   3286	010324	103010 				BCC	80$		;FINISH UP
   3287					;
   3288					; ..STIN GAVE ERROR-- MUST SEND STATUS AGAIN LATER
   3289					;
   3290	010326				75$:
   3291	010326	052777 	000020 	000000G		BIS	#EF.LPS,@LPEVFG	;NOTE BUFFER STILL REALLY AVAILABLE
   3292	010334	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST
   3293	010340	001402 				BEQ	80$		;NO-- IGNORE THE ERROR
   3294	010342	052712 	040000 			BIS	#LP.SST,(R2)	;YES-- SEND STATUS AGAIN LATER
   3295					;
   3296					; FINISH UP
   3297					;
   3298	010346				80$:
   3299	010346					RESTORE			; AND REGISTERS
	010346	012604 				MOV	(SP)+,R4
	010350	012603 				MOV	(SP)+,R3
	010352	012601 				MOV	(SP)+,R1
	010354	012600 				MOV	(SP)+,R0
   3300	010356					RETURN			;RETURN FROM SSTSLP
	010356	000207 				RTS	PC
   3301						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 36
TESTLP	(START LP-20 GOING ON THREADED LIST)

   3303						.SBTTL	TESTLP	(START LP-20 GOING ON THREADED LIST)
   3304					;
   3305					;+
   3306					;	TESTLP IS CALLED TO START THE LP-20 ON A THREADED LIST.
   3307					; THE THREAD MUST BE SET UP, WITH THE POINTER BOTH IN R0 AND LPTHD.
   3308					;
   3309					; CALLED FROM TASK LEVEL
   3310					;
   3311					; CALLING SEQUENCE:
   3312					;	R0 --	THREAD POINTER (ALSO IN LPTHD)
   3313					;	R2 --	LPTBL ENTRY FOR THIS LP
   3314					;
   3315					; EXIT CONDITIONS:
   3316					;	R0 --	CURRENT OUTPUT THREAD POINTER
   3317					;	R3 --	EXTERNAL PAGE ADDRESS OF THIS LP
   3318					;
   3319					;-
   3320					;
   3321	010360				TESTLP:
   3322	010360	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
   3323	010364	001470 				BEQ	90$		;YES-- DO NOTHING
   3324					;
   3325	010366	032777 	000040 	000000G		BIT	#EF.LPW,@LPEVFG	;SHOULD WE WAIT FOR LP-20?
   3326	010374	001011 				BNE	10$		;NO-- GO ON
   3327					;
   3328					; MUST WAIT FOR 1-SEC FOR LP-20 TO SETTLE AFTER DOING AN ABORT TRANSFER
   3329					;
   3330	010376					DIR$	#MKSCDP		;SET MARK TIME REQUEST
	010376	012746 	005566'			MOV	#MKSCDP,-(SP)
	010402	104375 				EMT	375
   3331	010404	103405 				BCS	10$		;OH, WELL ...
   3332	010406					WTSE$S	#E.FLPW		;WAIT FOR THE FLAG
	010406	012746 	000006 			MOV	#E.FLPW,-(SP)
	010412	012746 				MOV	(PC)+,-(SP)
	010414	   051 	   002 			.BYTE	41.,2
	010416	104375 				EMT	375
   3333	010420				10$:
   3334	010420	032712 	002000 			BIT	#LP.CLR,(R2)	;TIME TO CLEAR THE RAM?
   3335	010424	001414 				BEQ	30$		;NO-- JUST GO ON
   3336	010426	042712 	002000 			BIC	#LP.CLR,(R2)	;RESET THE FLAG
   3337	010432	032712 	001000 			BIT	#LP.LIP,(R2)	;BUT RAM LOAD NOW IN PROGRESS??
   3338	010436	001007 				BNE	30$		;YES-- DON'T GO RESET IT
   3339					;
   3340					; RAM MUST BE CLEARED, SINCE WE GOT A RAMPAR/VFU ERROR
   3341					;
   3342	010440	105063 	000014 			CLRB	LPCBUF(R3)	;CLEAR RAM ADDRESS REGISTER
   3343	010444				20$:
   3344	010444	005063 	000012 			CLR	LPRAMD(R3)	;CLEAR A RAM WORD
   3345	010450	105263 	000014 			INCB	LPCBUF(R3)	;BUMP TO NEXT RAM ADDRESS
   3346	010454	001373 				BNE	20$		;NOT DONE-- GO ON TO NEXT WORD
   3347					;
   3348					; TIME TO START LP GOING
   3349					;
   3350	010456				30$:
   3351	010456	032712 	000200 			BIT	#LP.EOF,(R2)	;WE AT EOF TIME?
   3352	010462	001404 				BEQ	32$		;NO-- GO ON
   3353	010464	042712 	000200 			BIC	#LP.EOF,(R2)	;YES-- NO LONGER EOF
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 36-1
TESTLP	(START LP-20 GOING ON THREADED LIST)

   3354	010470	005062 	000000G			CLR	LPCSM(R2)	;RESET CHECKSUM AT EOF
   3355	010474				32$:
   3356	010474	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGZRO SET?
   3357	010500	001403 				BEQ	34$		;NO-- GO ON
   3358	010502	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;YES-- RESET PAGZRO
   3359	010510				34$:
   3360	010510	005713 				TST	(R3)		;ERROR SET?
   3361	010512	100002 				BPL	40$		;NO-- GO ON
   3362	010514	052713 	001102 			BIS	#RSTERR+INTENB+PARENB,(R3) ;YES-- RESET IT
   3363	010520				40$:
   3364	010520					PUSH	R0		;SAVE THREAD POINTER
	010520	010046 				MOV	R0,-(SP)
   3365	010522					.INH4			;;; PREVENT LP INTERRUPTS
	010522	013746 	177776 			MOV	@#PS,-(SP)
	010526	112737 	000200 	177776 		MOVB	#PR4,@#PS
   3366	010534					CALL	..DOLP		;;;START LP GOING ON THE LIST
	010534	004737 	012010'			JSR	PC,..DOLP
   3367	010540					.ENB4			;;;DONE
	010540	012637 	177776 			MOV	(SP)+,@#PS
   3368	010544					POP	R0		;RESTORE LPTHD POINTER
	010544	012600 				MOV	(SP)+,R0
   3369					;
   3370					; ALL DONE
   3371					;
   3372	010546				90$:
   3373	010546					RETURN			;RETURN FROM TESTLP
	010546	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 37
INITLP	(INITALIZE ALL LP'S)

   3375						.SBTTL	INITLP	(INITALIZE ALL LP'S)
   3376					;
   3377					;+
   3378					;	INITLP IS CALLED DURING INITIALIZATION AND ALSO ON POWER
   3379					; RECOVERY.
   3380					;
   3381					;	EACH LP IS RESET, AND LP.LDF IS SET TO LOAD THE CURRENT RAM
   3382					; AND VF.  LPCSA IS CLEARED FOR NON-EX LP'S
   3383					;
   3384					;-
   3385					;
   3386						.ENABLE	LSB
   3387	010550				INITLP::
   3388	010550					SAVE	<R2,R3,R5>	;SAVE OUR PRECIOUS REGISTERS
	010550	010246 				MOV	R2,-(SP)
	010552	010346 				MOV	R3,-(SP)
	010554	010546 				MOV	R5,-(SP)
   3389	010556	012705 	000002 			MOV	#L$$P20,R5	;GET # LP'S WE HAVE
   3390	010562	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS LPTBL ENTRY FOR UNIT 0
   3391	010566				10$:
   3392	010566	011203 				MOV	(R2),R3		;GET THE
   3393	010570	042703 	177774 			BIC	#^C<LP.UNT>,R3	; UNIT #
   3394	010574	006303 				ASL	R3		; *2
   3395	010576	006303 				ASL	R3		; *4
   3396	010600	006303 				ASL	R3		; *8
   3397	010602	006303 				ASL	R3		; *16 BYTES PER UNIT
   3398	010604	062703 	000000G			ADD	#LPEXPA,R3	;GET EXTERNAL PAGE ADDRESS FOR THIS LP
   3399	010610	010362 	000000G			MOV	R3,LPCSA(R2)	;SAVE THIS ADDRESS
   3400	010614	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;CLEAR LP
   3401	010620				LPDCLR:
   3402	010620	005062 	000000G			CLR	LPITH(R2)	;CLEAR INT-LEVEL POINTER TO THREADED LIST
   3403	010624				90$:
   3404	010624	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP'S ENTRY
   3405	010630	077522 				SOB	R5,10$		;LOOP FOR ALL LP'S
   3406
   3407	010632	052777 	000002 	000000G		BIS	#EF.LPC,@LPEVFG	;FORCE A HUNG CHECK NOW
   3408	010640					RESTORE			; THE REGISTERS TO THEIR RIGHTFUL (PITIFUL) CONDITION
	010640	012605 				MOV	(SP)+,R5
	010642	012603 				MOV	(SP)+,R3
	010644	012602 				MOV	(SP)+,R2
   3409	010646					RETURN			;RETURN FROM INITLP
	010646	000207 				RTS	PC
   3410					;
   3411						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 38
LP-20 INTERRUPT SERVICE MODULE

   3413						.SBTTL	LP-20 INTERRUPT SERVICE MODULE
   3414					;
   3415					;                             COPYRIGHT (C) 1975, 1978 BY
   3416					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3417					;
   3418					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3419					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3420					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3421					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3422					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3423					;
   3424					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3425					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3426					;       CORPORATION.
   3427					;
   3428					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3429					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3430					;
   3431					;		MODULE: LP-20 INTERRUPT SERVICE
   3432					;
   3433					;		VERSION: 01-01
   3434					;
   3435					;		AUTHOR: TOM PORCHER
   3436					;
   3437					;		DATE: 6-JUN-75
   3438					;
   3439					;
   3440					;	THIS MODULE CONTAINS:
   3441					;
   3442					;	1) $LPINT (LP-20 INTERRUPT SERVICE ROUTINE)
   3443					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 39
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3445						.SBTTL	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
   3446					;
   3447					;+
   3448					;
   3449					;	$LPINT IS CALLED FROM THE INTERRUPT VECTOR FOR
   3450					; ANY OF THE LP-20'S.  THE UNIT NUMBER IS SAVED IN THE LOW-ORDER
   3451					; BITS (THE CC'S) OF THE PS IN THE TRAP VECTOR.
   3452					;
   3453					;	WHEN A DONE INTERRUPT OCCURS, THE NEXT BUFFER IS STARTED,
   3454					; UNLESS THIS IS A MULTI-CHARACTER OPERATION (IE. 'ARROW' MODE), IN
   3455					; WHICH CASE THE CURRENT BUFFER IS CONTINUED.
   3456					;
   3457					;	IF CHRINT (UNDEFINED CHARACTER -- INT BIT SET IN RAM) OCCURS,
   3458					; THE RAM DATA IS EXAMINED. IF IT IS '^', THE CHARACTER + 100,
   3459					; PRECEDED BY '^', IS PRINTED, ELSE OUTPUT IS
   3460					; STOPPED AND THE STATUS SENT TO THE -10 (INTERRUPT).
   3461					;
   3462					;	IF PAGZRO (PAGE COUNT REACHED ZERO) OCCURS AND THE LP.PZI
   3463					; (PAGE ZERO INTERRUPT) FLAG IN LPSTS (SET BY RAM/VF LOAD FILE) IS
   3464					; SET, OUTPUT IS STOPPED AND THE STATUS IS SENT TO THE -10. OTHERWISE,
   3465					; OUTPUT IS MERELY RESUMED AND PAGZRO IGNORED.
   3466					;
   3467					;	IF THE LP COMES ON-LINE, WHILE WAITING FOR OFF-LINE,
   3468					; OUTPUT IS RESUMED, AND THE NEW STATUS IS SENT TO THE -10.
   3469					;
   3470					;-
   3471					;
   3472	010650				$LPINT::
   3473	010650	013737 	177776 	000000G		MOV	@#PS,LPUNIT	;;;SAVE UNIT #
   3474	010656					SAVE	<R0,R2,R3>	;;;SAVE REGISTERS
	010656	010046 				MOV	R0,-(SP)
	010660	010246 				MOV	R2,-(SP)
	010662	010346 				MOV	R3,-(SP)
   3475	010664	013702 	000000G			MOV	LPUNIT,R2	;;;GET UNIT # BACK
   3476	010670	006302 				ASL	R2		;;;MAKE IT WORDS
   3477	010672	042702 	177774 			BIC	#^C<LP.UNT>,R2	;;;CLEAR GARBAGE BITS
   3478	010676	016202 	000000G			MOV	LPUTBL(R2),R2	;;;GET ADDR OF DEVICE STATUS BLOCK FOR THIS LP
   3479	010702	016203 	000000G			MOV	LPCSA(R2),R3	;;;GET EXT PAGE ADDR FOR CURRENT LP
   3480	010706	016200 	000000G			MOV	LPITH(R2),R0	;;;GET CURRENT THREAD BLOCK ADDR
   3481	010712	001520 				BEQ	80$		;;;IDLE-- JUST SEND DEVICE STATUS
   3482					;
   3483					; LP NOT IDLE-- SEE IF ERROR, PAGZRO, CHRINT, OR DONE
   3484					;
   3485	010714	105062 	000000G			CLRB	LPCSM+0(R2)	;;;INSURE NO CARRY
   3486	010720	066362 	000016 	000000G		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM
   3487	010726	032713 	160000 			BIT	#ERR+PAGZRO+CHRINT,(R3) ;;;ERROR, PAGZRO, OR CHRINT?
   3488	010732	001014 				BNE	30$		;;;YES-- STOP I/O AND PROCESS
   3489	010734	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
   3490	010740	001003 				BNE	20$		;;;NO-- JUST KEEP IT GOING
   3491	010742					CALL	..DOL1		;;;YES-- START NEXT BUFFER
	010742	004737 	011774'			JSR	PC,..DOL1
   3492	010746	000511 				BR	90$		;;;EXIT FROM IRP
   3493					;
   3494	010750				20$:
   3495	010750	005362 	000000G			DEC	LPRTY(R2)	;;;DECREMENT RETRY COUNT
   3496	010754	002403 				BLT	30$		;;;RAN OUT-- CHECK FOR A BIT SET, OR ASSUME ERROR
   3497	010756	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;MAKE SURE LP IS STILL GO-ING
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 39-1
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3498	010762	000503 				BR	90$		;;;AND EXIT
   3499					;
   3500					; ERROR, PAGZRO, OR CHRINT-- SAVE BYTE COUNT AND ADDRESS
   3501					; STOP I/O AND WAIT FOR CONTINUE
   3502					;
   3503	010764				30$:
   3504	010764	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHAR PRINT OPERATION?
   3505	010770	001044 				BNE	40$		;;;YES-- DON'T SAVE BYTE COUNT AND ADDRESS
   3506	010772	005463 	000006 			NEG	LPBCTR(R3)	;;;GET # BYTES LEFT TO TRANSMIT
   3507	010776	016360 	000006 	000000G		MOV	LPBCTR(R3),T.HCBC(R0) ;;; INTO THREAD BLOCK TO CONTINUE
   3508	011004	016360 	000004 	000000G		MOV	LPBSAD(R3),T.HCAD(R0) ;;;ALSO CURRENT ADDRESS
   3509	011012	032713 	020000 			BIT	#CHRINT,(R3)	;;;THIS CHRINT INTERRUPT?
   3510	011016	001431 				BEQ	40$		;;;NO-- SEE IF PAGZRO
   3511	011020					PUSH	R2		;;;SAVE THE ADDRESS OF LPTBL
	011020	010246 				MOV	R2,-(SP)
   3512	011022	062702 	000000G			ADD	#LPMCB,R2	;;;POINT TO THE MULTI-CHAR BUFFER
   3513	011026	010263 	000004 			MOV	R2,LPBSAD(R3)	;;;POINT THE LP20 TO THAT BUFFER
   3514	011032	116312 	000012 			MOVB	LPRAMD+0(R3),(R2) ;;;GET RAM DATA CHARACTER
   3515	011036	122722 	000136 			CMPB	#'^,(R2)+	;;;ARROW MODE?
   3516	011042	001015 				BNE	39$		;;;NO-- INTERRUPT -10
   3517	011044	116312 	000014 			MOVB	LPCBUF(R3),(R2)	;;;YES-- GET THE CAUSING CHARACTER
   3518	011050	152712 	000100 			BISB	#100,(R2)	;;;MAKE IT ALPHABETIC
   3519	011054					POP	R2		;;;RESTORE LPTBL
	011054	012602 				MOV	(SP)+,R2
   3520	011056	052712 	010000 			BIS	#LP.MCH,(R2)	;;;SAY WE ARE DOING MULTI-CHARACTER
   3521	011062	012763 	177776 	000006 		MOV	#-2,LPBCTR(R3)	;;;SET BYTE COUNT TO TWO CHARACTERS
   3522	011070	012713 	000103 			MOV	#PARENB+INTENB+GO,(R3) ;;;START IT GOING ON THESE TWO CHARS
   3523	011074	000436 				BR	90$		;;;WAIT FOR DONE
   3524					;
   3525	011076				39$:	POP	R2		;;;INTERRUPT-- RESTORE LPTBL POINTER
	011076	012602 				MOV	(SP)+,R2
   3526	011100	000423 				BR	70$		;;; AND TELL -10
   3527					;
   3528					; ERROR OR PAGZRO
   3529					;
   3530	011102				40$:
   3531	011102	032713 	040000 			BIT	#PAGZRO,(R3)	;;;PAGZRO?
   3532	011106	001411 				BEQ	60$		;;;NO-- MUST BE ERROR
   3533	011110	032712 	020000 			BIT	#LP.PZI,(R2)	;;;YES-- IS PAGE ZERO INTERRUPT ENABLED?
   3534	011114	001015 				BNE	70$		;;;YES-- INTERRUPT AND WAIT
   3535	011116	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;;;NO-- RESET PAGZRO
   3536	011124					CALL	..DOLP		;;;NO-- JUST CONTINUE
	011124	004737 	012010'			JSR	PC,..DOLP
   3537	011130	000420 				BR	90$		;;;DONE WITH PAGZRO
   3538					;
   3539					; ERROR-- DECREMENT RETRY COUNT IF ANYTHING BUT OFF-LINE
   3540					;
   3541	011132				60$:
   3542	011132	032763 	000177 	000002 		BIT	#VFUERR+LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM+GOERR,LPCSRB(R3)
   3543	011140	001403 				BEQ	70$		;;;NO ERRORS-- JUST SEND STATUS
   3544	011142	012762 	177777 	000000G		MOV	#-1,LPRTY(R2)	;;; ABOVE ERRORS ARE NOT RECOVERABLE
   3545					;
   3546					; STOP I/O AND SEND STATUS TO -10
   3547					;
   3548	011150				70$:
   3549	011150	005062 	000000G			CLR	LPITH(R2)	;;;SAY I/O STOPPED
   3550					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 39-2
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3551					; SEND STATUS TO -10
   3552					;
   3553	011154				80$:
   3554	011154	052712 	040000 			BIS	#LP.SST,(R2)	;;;SAY SEND STATUS TO TASK
   3555	011160	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;;SAY SOMETHING TO DO
   3556	011166					CALL	..DSEV		;;;SAY SIGNIFICANT EVENT
	011166	004737 	000000G			JSR	PC,..DSEV
   3557					;
   3558					; ALL DONE WITH INTERRUPT
   3559					;
   3560	011172				90$:
   3561	011172					RESTORE			;;; SAVED REGISTERS
	011172	012603 				MOV	(SP)+,R3
	011174	012602 				MOV	(SP)+,R2
	011176	012600 				MOV	(SP)+,R0
   3562	011200	000137 	000000G			JMP	..INTX		;;;RETURN FROM LP INTERRUPT
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 40
LP-20 COMMON SUBROUTINES MODULE

   3564						.SBTTL	LP-20 COMMON SUBROUTINES MODULE
   3565					;
   3566					;                             COPYRIGHT (C) 1975, 1978 BY
   3567					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3568					;
   3569					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3570					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3571					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3572					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3573					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3574					;
   3575					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3576					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3577					;       CORPORATION.
   3578					;
   3579					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3580					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3581					;
   3582					;		MODULE: LP-20 COMMON SUBROUTINES
   3583					;
   3584					;		VERSION: 01-00
   3585					;
   3586					;		AUTHOR: TOM PORCHER
   3587					;
   3588					;		DATE: 7-JUN-75
   3589					;
   3590					;
   3591					;	THIS MODULE CONTAINS:
   3592					;
   3593					;	1) ..STLP (START LP-20 OUTPUT)
   3594					;
   3595					;	2) ..SPLP (STOP LP-20 OUTPUT)
   3596					;
   3597					;	3) ..AKLP (ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
   3598					;
   3599					;	4) ..PTLP (PUT BLOCK IN THREADED OUTPUT LIST)
   3600					;
   3601					;	5) ..DOLP (INITIATE LP-20 TRANSFER)
   3602					;
   3603						.SBTTL	..STLP	(START LP-20 OUTPUT)
   3604					;
   3605					;+
   3606					;
   3607					;	..STLP IS CALLED ONLY FROM THE QUEUED PROTOCOL
   3608					; TASK TO PERFORM A FUNCTION ON THE SPECIFIED LP. THE
   3609					; FOLLOWING FUNCTIONS ARE RECOGNIZED HERE (FUNCTION CODE
   3610					; IN HIGH BYTE OF T.HCBC OF THREAD BLOCK):
   3611					;	BC.STR	STRING DATA
   3612					;	BC.RDS	RETURN DEVICE STATUS
   3613					;	BC.HDS	HERE IS DEVICE STATUS
   3614					;	BC.SDS	SPECIAL DEVICE OPERATION, FIRST WORD IS FUNCTION:
   3615					;		1 -- SET PAGE COUNTER
   3616					;	BC.LDR	LOAD TRANSLATION RAM
   3617					;	BC.LDV	LOAD VERTICAL FORMAT
   3618					;
   3619					; CALLED FROM TASK LEVEL
   3620					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 40-1
..STLP	(START LP-20 OUTPUT)

   3621					; CALLING SEQUENCE:
   3622					;	R0 --	ADDRESS OF THREAD BLOCK TO PROCESS
   3623					;	R2 --	ADDRESS OF LPTBL ENTRY FOR THIS LP
   3624					;
   3625					; EXIT CONDITIONS:
   3626					;
   3627					; NO REGISTERS MODIFIED
   3628					;
   3629					;-
   3630					;
   3631						.ENABLE	LSB
   3632	011204				..STLP::
   3633	011204					SAVE	<R1,R3,R4>
	011204	010146 				MOV	R1,-(SP)
	011206	010346 				MOV	R3,-(SP)
	011210	010446 				MOV	R4,-(SP)
   3634	011212	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
   3635	011216	101434 				BLOS	30$		;NO-- JUST SLIP AWAY
   3636	011220	052712 	000400 			BIS	#LP.F10,(R2)	;NOTE THAT THIS IS A FROM-10 REQUEST
   3637	011224	116004 	000001G			MOVB	T.HCBC+1(R0),R4	;GET FUNCTION CODE
   3638	011230	105060 	000001G			CLRB	T.HCBC+1(R0)	; AND CLEAR IT
   3639	011234	012703 	011254'			MOV	#BCFTAB,R3	;POINT TO FUNCTION DISPATCH TABLE
   3640	011240				10$:
   3641	011240	112301 				MOVB	(R3)+,R1	;GET A DISPATCH ADDRESS
   3642	011242	001413 				BEQ	BCFILF		;END-- ASSUME RETURN DEVICE STATUS
   3643	011244	122304 				CMPB	(R3)+,R4	;MATCH FUNCTION?
   3644	011246	001374 				BNE	10$		;NO-- LOOP TILL WE FIND FUNCTION
   3645	011250	000161 	011254'			JMP	BCFTAB(R1)	;PERFORM FUNCTION
   3646					;
   3647	011254				BCFTAB:
   3648	011254	   124 	   000G			.BYTE	BCFSTR-BCFTAB,BC.STR
   3649	011256	   016 	   000G			.BYTE	BCFRDS-BCFTAB,BC.RDS
   3650	011260	   062 	   000G			.BYTE	BCFHDS-BCFTAB,BC.HDS
   3651	011262	   042 	   000G			.BYTE	BCFSDO-BCFTAB,BC.SDS
   3652	011264	   102 	   000G			.BYTE	BCFLDR-BCFTAB,BC.LDR
   3653	011266	   110 	   000G			.BYTE	BCFLDV-BCFTAB,BC.LDV
   3654	011270	   000 				.BYTE	0
   3655						.EVEN
   3656					;
   3657					; ILLEGAL FUNCTION
   3658					;
   3659	011272				BCFILF:
   3660					;	BR	BCFRDS		;ILLEGAL FUNCTION-- JUST SEND STATUS FOR NOW
   3661					;
   3662					; RETURN DEVICE STATUS
   3663					;
   3664	011272				BCFRDS:
   3665	011272	052712 	040000 			BIS	#LP.SST,(R2)	;NOTE TO SEND STATUS NOW
   3666	011276	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;TELLL LP TASK TO DO SOMETHING
   3667	011304					CALL	..DSEV		;MAKE A SIGNIFICANT EVENT HAPPEN
	011304	004737 	000000G			JSR	PC,..DSEV
   3668					;
   3669					; THREAD BLOCK DONE-- DEALLOCATE
   3670					;
   3671	011310				30$:
   3672	011310					CALL	..DECN		;DEALLOCATE THREAD BLOCK
	011310	004737 	000000G			JSR	PC,..DECN
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 40-2
..STLP	(START LP-20 OUTPUT)

   3673	011314	000433 				BR	90$		;RESTORE AND RETURN
   3674					;
   3675					; SPECIAL DEVICE OPERATION
   3676					;
   3677	011316				BCFSDO:
   3678	011316	016001 	000000G			MOV	T.HCAD(R0),R1	;GET DATA ADDRESS
   3679	011322	022711 	000001 			CMP	#1,(R1)		;SET PAGE COUNTER?
   3680	011326	001361 				BNE	BCFILF		;NO-- ILLEGAL FUNCTION
   3681	011330	012701 	010000 			MOV	#TB.LPC,R1	;SAY SET PAGE COUNTER
   3682	011334	000415 				BR	40$		;QUEUE IT UP
   3683					;
   3684					; HERE IS DEVICE STATUS
   3685					;
   3686	011336				BCFHDS:
   3687	011336	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS
   3688	011342	032711 	000040 			BIT	#DV.EOF,(R1)	;EOF FOR LP?
   3689	011346	001751 				BEQ	BCFILF		;NO-- ILLEGAL STATUS
   3690	011350	012701 	020000 			MOV	#TB.EOF,R1	;YES-- SET FUNCTION
   3691	011354	000405 				BR	40$		;SEND IT TO QUEUE
   3692					;
   3693					; TRANSLATION RAM DATA
   3694					;
   3695	011356				BCFLDR:
   3696	011356	012701 	004000 			MOV	#TB.RMD,R1	;NOTE RAM DATA
   3697	011362	000402 				BR	40$		;SEND TO QUEUE
   3698					;
   3699					; VFU DATA
   3700					;
   3701	011364				BCFLDV:
   3702	011364	012701 	002000 			MOV	#TB.VFD,R1	;NOTE RAM DATA
   3703					;	BR	40$		;SEND TO QUEUE
   3704					;
   3705					; SPECIAL QUEUE ENTRY-- MARK BY TB.DON + FLAGS IN T.HCBC OF THREAD BLOCK
   3706					;
   3707	011370				40$:
   3708	011370	052701 	100000 			BIS	#TB.DON,R1	;FLAG BLOCK DONE TO INTERRUPT SERVICE
   3709	011374	050160 	000000G			BIS	R1,T.HCBC(R0)	;SET SPECIFIED FUNCTION
   3710					;	BR	BCFSTR		;PUT IN QUEUE
   3711					;
   3712					; QUEUE THREAD BLOCK TO LP-20
   3713					;
   3714	011400				BCFSTR:
   3715	011400					CALL	..PTLP		;SEND TO LP OR QUEUE UP
	011400	004737 	011646'			JSR	PC,..PTLP
   3716					;
   3717					; ALL DONE
   3718					;
   3719	011404				90$:
   3720	011404					RESTORE			;UN-SAVE REGISTRS
	011404	012604 				MOV	(SP)+,R4
	011406	012603 				MOV	(SP)+,R3
	011410	012601 				MOV	(SP)+,R1
   3721	011412					RETURN			; FROM ..STLP
	011412	000207 				RTS	PC
   3722					;
   3723						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 41
..SPLP	(STOP LP-20 OUTPUT)

   3725						.SBTTL	..SPLP	(STOP LP-20 OUTPUT)
   3726					;
   3727					;+
   3728					;
   3729					;	..SPLP IS CALLED TO STOP OUTPUT TO THE LP-20 IMMEDIATELY
   3730					; AND RESET THE LP-20.  THIS ROUTINE FIRST CLEARS THE LP-20
   3731					; 'GO' BIT (TO STOP OUTPUT), THEN THREADS THROUGH THE OUTPUT LIST
   3732					; AND MARKS THE THREAD BLOCKS AS DONE BY SETTING T.HCBC TO IE.ABO.
   3733					;
   3734					;	QUEUE I/O REQUESTS ARE GIVEN THE ERROR RETURN 'IE.ABO'
   3735					; (OPERATION ABORTED) WHEN THE THREAD BLOCKS ARE PROCESSED BY THE TASK.
   3736					;
   3737					; CALLED FROM TASK LEVEL
   3738					;
   3739					; CALLING SEQUENCE:
   3740					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3741					;	CALL	..SPLP
   3742					;
   3743					; EXIT CONDITONS:
   3744					;
   3745					; NO REGISTERS MODIFIED
   3746					;
   3747					;-
   3748					;
   3749	011414				..SPLP::
   3750	011414					SAVE	<R0,R1,R3>	;SAVE MISC. REGISTERS
	011414	010046 				MOV	R0,-(SP)
	011416	010146 				MOV	R1,-(SP)
	011420	010346 				MOV	R3,-(SP)
   3751	011422	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
   3752	011426	101453 				BLOS	99$		;NO-- JUST LEAVE
   3753	011430	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING FOR ACK
   3754	011434	005762 	000000G			TST	LPRMA(R2)	;RAM DATA LOAD IN PROGRESS??
   3755	011440	001402 				BEQ	4$		;NO-- GO ON
   3756	011442	052712 	001000 			BIS	#LP.LIP,(R2)	;YES-- FLAG TO REMOVE IT AT LPTASK
   3757	011446				4$:
   3758	011446	005762 	000000G			TST	LPITH(R2)	;I/O IN PROGRESS?
   3759	011452	001403 				BEQ	5$		;NO-- JUST GO ON
   3760	011454	042777 	000040 	000000G		BIC	#EF.LPW,@LPEVFG	;YES-- MARK TO TIME OUT LP-20 WHEN WE STOP IT
   3761	011462				5$:
   3762	011462	005062 	000000G			CLR	LPITH(R2)	;CLEAR INTERRUPT LEVEL THREAD PTR
   3763	011466	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
   3764	011472	001405 				BEQ	6$		;NON-EX LP
   3765	011474	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;STOP LP-20
   3766	011500	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO, TOO
   3767	011506				6$:
   3768	011506	016201 	000000G			MOV	LPTHD(R2),R1	;GET POINTER TO CURRENT THREADED LIST
   3769					;
   3770					; LOOP THROUGH THIS LIST AND MARK THE THREAD BLOCKS AS DONE
   3771					;
   3772	011512				10$:
   3773	011512	010100 				MOV	R1,R0		;GET ADDR OF NEXT BLOCK
   3774	011514	001413 				BEQ	90$		;THAT'S THE END
   3775	011516	011001 				MOV	@R0,R1		;GET ADDR OF NEXT NEXT BLOCK
   3776	011520	052760 	040000 	000000G		BIS	#TB.ABO,T.HCBC(R0) ;MARK BLOCK AS ABORTED
   3777	011526	005760 	000000G			TST	T.HCBC(R0)	;THIS THREAD BLOCK ALREADY DONE?
   3778	011532	002767 				BLT	10$		;YES-- LEAVE IT ALONE
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 41-1
..SPLP	(STOP LP-20 OUTPUT)

   3779	011534	012760 	140361 	000000G		MOV	#TB.DON!TB.ABO!<IE.ABO&LOBYTE>,T.HCBC(R0) ;MARK AS DONE, ABORTED
   3780	011542	000763 				BR	10$		;LOOP FOR ALL THINGS IN LIST
   3781					;
   3782					; ALL DONE WITH LIST
   3783					;
   3784	011544				90$:
   3785	011544	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;SAY I/O DONE TO LP TASK (RATHER... ABORTED)
   3786	011552					CALL	..DSEV		;MAKE A SIGNIFICANT EVENT HAPPEN
	011552	004737 	000000G			JSR	PC,..DSEV
   3787	011556				99$:
   3788	011556					RESTORE			;RESTORE SAVE REGISTERS
	011556	012603 				MOV	(SP)+,R3
	011560	012601 				MOV	(SP)+,R1
	011562	012600 				MOV	(SP)+,R0
   3789	011564					RETURN			;RETURN FORM ..SPLP
	011564	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 42
..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)

   3791						.SBTTL	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
   3792					;
   3793					;+
   3794					;
   3795					;	..AKLP IS CALLED BY ACKNOWLDGE OUTPUUT REQUEST FROM THE -10.
   3796					; THE LP.WAT FLAG IS CLEARED, AND THE CONDITION FLAGS CHRINT, PAGZRO
   3797					; ARE RESET.  OUTPUT IS RESUMED WHEN LP TASK RUNS.
   3798					;
   3799					; CALLED AT TASK LEVEL
   3800					;
   3801					; CALLING SEQUENCE:
   3802					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3803					;
   3804					; EXIT CONDITIONS:
   3805					;
   3806					;	NO REGISTERS MODIFIED
   3807					;
   3808					;-
   3809					;
   3810	011566				..AKLP::
   3811	011566					SAVE	<R3>		;SAVE USED R'S
	011566	010346 				MOV	R3,-(SP)
   3812	011570	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS AN LP???
   3813	011574	101422 				BLOS	90$		;NO-- JUST LEAVE
   3814	011576	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING
   3815	011602	005762 	000000G			TST	LPITH(R2)	;LP GOING?
   3816	011606	001015 				BNE	90$		;YES-- JUST GO AWAY
   3817	011610	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXT PAGE ADDR OF THIS LP
   3818	011614	001405 				BEQ	10$		;NON-EX LP-- JUST GO AWAY
   3819	011616	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO
   3820	011624	042713 	020000 			BIC	#CHRINT,(R3)	; AND CHRINT
   3821	011630				10$:
   3822	011630	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;START LP TASK
   3823	011636					CALL	..DSEV		; . .
	011636	004737 	000000G			JSR	PC,..DSEV
   3824	011642				90$:
   3825	011642					RESTORE			; USED R'S
	011642	012603 				MOV	(SP)+,R3
   3826	011644					RETURN			; FROM ..AKLP
	011644	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 43
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

   3828						.SBTTL	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
   3829					;
   3830					;+
   3831					;
   3832					;	..PTLP IS CALLED TO SEND A BUFFER TO THE LP-20. THE
   3833					; BUFFER IS EITHER OUTPUT IMMEDIATELY OR, IF THE LP IS NOT IDLE,
   3834					; ADDED TO THE END OF THIS LP'S THREADED OUTPUT LIST.
   3835					;
   3836					; CALLED FROM TASK LEVEL
   3837					;
   3838					; CALLING SEQUENCE:
   3839					;	R0 --	ADDRESS OF THREAD BLOCK FOR THIS BUFFER
   3840					;	R2 --	POINTER TO LPTBL FOR THIS LP
   3841					;	CALL	..PTLP
   3842					;
   3843					; EXIT CONDITIONS:
   3844					;
   3845					; NO REGISTERS MODIFIED
   3846					;
   3847					;-
   3848					;
   3849	011646				..PTLP::
   3850	011646					SAVE	<R1,R3>	;SAVE USED REGISTERS
	011646	010146 				MOV	R1,-(SP)
	011650	010346 				MOV	R3,-(SP)
   3851	011652	005010 				CLR	@R0		;MARK END OF LIST
   3852	011654	012762 	000012 	000000G		MOV	#LPRTRY,LPRTY(R2) ;RESET RETRY COUNTER
   3853	011662	016203 	000000G			MOV	LPCSA(R2),R3	;GET LP EXTERNAL PAGE ADDRESS
   3854	011666	001404 				BEQ	5$		;OOPS-- NON-EX LP
   3855	011670	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
   3856	011674	001006 				BNE	7$		;NO-- JUST GO ON
   3857	011676	000403 				BR	6$		;OFF-LINE-- SEND STATUS
   3858					;
   3859	011700				5$:
   3860	011700	012760 	100277 	000000G		MOV	#TB.DON!<IE.OFL&LOBYTE>,T.HCBC(R0) ;NON-EX-LP-- MARK AS DONE, ERROR
   3861	011706				6$:
   3862	011706	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO RING THE -10
   3863	011712				7$:
   3864	011712					.INH0			;;LOCK OUT QUEUE'D PROTOCOL TASK
	011712	013746 	177776 			MOV	@#PS,-(SP)
	011716	112737 	000140 	177776 		MOVB	#140,@#PS
   3865	011724	016201 	000000G			MOV	LPTHD(R2),R1	;;GET CURRENT POINTER TO THREADED LIST
   3866	011730	001405 				BEQ	20$		;;NONE-- START LP GOING
   3867					;
   3868					; LP BUSY-- MUST FIND END OF THREADED LIST AND PUT THIS BUFFER THERE
   3869					;
   3870	011732				10$:
   3871	011732	010103 				MOV	R1,R3		;;COPY ADDR OF THREAD BLOCK
   3872	011734	011301 				MOV	@R3,R1		;;GET NEXT THREAD
   3873	011736	001375 				BNE	10$		;;NOT END-- KEEP ON LOOKING
   3874	011740	010013 				MOV	R0,@R3		;;END-- STORE CURRENT THREAD BLOCK AT END
   3875	011742	000407 				BR	90$		;;ALL DONE
   3876					;
   3877					; LP IDLE-- START IT GOING ON THIS BUFFER
   3878					;
   3879	011744				20$:
   3880	011744	010062 	000000G			MOV	R0,LPTHD(R2)	;;STORE START OF THREAD
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 43-1
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

   3881	011750	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;TELL LP TASK TO START LP GOING
   3882	011756					CALL	..DSEV		;; WITH A SIGNIFICANT EVENT
	011756	004737 	000000G			JSR	PC,..DSEV
   3883					;
   3884					; ALL DONE
   3885					;
   3886	011762				90$:
   3887	011762					.ENB0			;RE-ENABLE IRPS
	011762	004737 	000000G			JSR	PC,..ENB0
   3888	011766					RESTORE			;RESTORE SAVED REGISTERS
	011766	012603 				MOV	(SP)+,R3
	011770	012601 				MOV	(SP)+,R1
   3889	011772					RETURN			;RETURN FROM ..PTLP
	011772	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 44
..DOLP	(INITIATE LP-20 TRANSFER)

   3891						.SBTTL	..DOLP	(INITIATE LP-20 TRANSFER)
   3892					;
   3893					;+
   3894					;
   3895					;	..DOLP IS CALLED TO START AN LP GOING ON A SPECIFIED BUFFER.
   3896					; THE DEVICE RGISTERS ARE SET UP AND 'GO' IS SET TO START THE TRANSFER.
   3897					;
   3898					;	IF THE THREAD SPECIFIED IS ZERO, NOTHING IS DONE AND THE
   3899					; LP IS LEFT IDLE.
   3900					;
   3901					;	ENTER AT ..DOL1 TO OUTPUT NEXT BUFFER, UNLESS LP.MCH IS SET,
   3902					; IN WHICH CASE THE CURRENT BUFFER IS OUTPUT.  THIS IS USUALLY ONLY
   3903					; CALLED WHEN 'DONE' IS SET.
   3904					;
   3905					; CALLED AT INTERRUPT LEVEL (OR WITH INTERRUPTS DISABLED)
   3906					;
   3907					; CALLING SEQUENCE:
   3908					;	R0 --	ADDR OF THREAD BLOCK TO OUTPUT (ZERO IF END)
   3909					;	R2 --	ADDR OF LPTBL ENTRY FOR THIS LP
   3910					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
   3911					;
   3912					; EXIT CONDITIONS:
   3913					;	R0 --	ADDR OF CURRENT THREAD BLOCK
   3914					;
   3915					; NO OTHER REGISTERS MODIFIED
   3916					;
   3917					;-
   3918					;
   3919						.ENABLE	LSB
   3920	011774				..DOL1::
   3921	011774	032712 	001000 			BIT	#LP.LIP,(R2)	;;;LOAD SUPPOSED TO BE IN PROGRESS?
   3922	012000	001020 				BNE	19$		;;;YES-- GO BACK TO TASK
   3923	012002	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHARACTER OPERATION?
   3924	012006	001417 				BEQ	20$		;;;NO-- GET NEXT BUFFER
   3925									;;;YES-- GET (CONTINUE) CURRENT BUFFER
   3926	012010				..DOLP::
   3927	012010				10$:
   3928	012010	042712 	114000 			BIC	#LP.WAT!LP.MCH!LP.HNG,(R2) ;;;NOT WAITING, AND NOT MULTI-CHAR-ING
   3929	012014	010062 	000000G			MOV	R0,LPITH(R2)	;;;SAVE CURRENT BUFFER AS OUR INT-LEVEL BUFFER
   3930	012020	001463 				BEQ	90$		;;;GIVE UP IF END
   3931	012022	016063 	000000G	000006 		MOV	T.HCBC(R0),LPBCTR(R3) ;;;SAVE BYTE COUNT FOR LP (WILL NEG LATER)
   3932	012030	003020 				BGT	50$		;;;NOT DONE-- START OUTPUT
   3933					;
   3934	012032	032760 	036000 	000000G		BIT	#TB.SFN,T.HCBC(R0) ;;;SPECIAL FUNCTION?
   3935	012040	001402 				BEQ	20$		;;;NO-- JUST SET DONE
   3936	012042				19$:
   3937	012042	005000 				CLR	R0		;;;YES-- DON'T GET NEXT THREAD BLOCK
   3938	012044	000404 				BR	30$		;;;AND STOP I/O, REQUEST TASK LEVEL CODE
   3939					;
   3940					; THIS THREAD BLOCK DONE-- MARK IT BY -VE T.HCBC, SET I/O DONE
   3941					;  EVENT FLAG, AND START NEXT BUFFER.
   3942					;
   3943	012046				20$:
   3944	012046	012760 	100001 	000000G		MOV	#TB.DON!<IS.SUC&LOBYTE>,T.HCBC(R0) ;;;NOTE SUCCESS HERE
   3945	012054	011000 				MOV	@R0,R0		;;;GET ADDR OF NEXT BUFFER
   3946					;
   3947					; SET I/O DONE, GO ON TO NEXT THREAD BLOCK (ADDR IN R0)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1113  11-NOV-81 11:19  PAGE 44-1
..DOLP	(INITIATE LP-20 TRANSFER)

   3948					;
   3949	012056				30$:
   3950	012056	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;;SET LP I/O DONE EVENT FLAGE
   3951	012064					CALL	..DSEV		;;;MAKE A SIGNIFICANT EVENT
	012064	004737 	000000G			JSR	PC,..DSEV
   3952	012070	000747 				BR	10$		;;;DO NEXT BUFFER
   3953					;
   3954					; SET UP -VE BYTE COUNT AND EXTENDED MEMORY ADDRESS BITS
   3955					;
   3956	012072				50$:
   3957	012072	016063 	000000G	000004 		MOV	T.HCAD(R0),LPBSAD(R3) ;;;SAVE PHYSICAL ADDR FOR LP
   3958	012100	005463 	000006 			NEG	LPBCTR(R3)	;;;MAKE -VE # BYTES TO SEND
   3959	012104	042713 	000060 			BIC	#BUSA17+BUSA16,(R3) ;;;CLEAR EXTENDED MEMORY ADDR BITS
   3960	012110	005760 	000000G			TST	T.HBCT(R0)	;;;THIS QUEUE I/O REQUEST?
   3961	012114	001023 				BNE	59$		;;;NO-- ADDRESS IS IN LOW CORE
   3962	012116	116062 	177775 	000000G		MOVB	T.HVFC(R0),LPMCB(R2) ;;;SET TO PRINT VERTICAL FORMAT CHARACTER
   3963	012124	001415 				BEQ	58$		;;;NONE-- JUST START THE LP
   3964	012126	105060 	177775 			CLRB	T.HVFC(R0)	;;;YES-- CLEAR IT NOW
   3965	012132	012763 	000000G	000004 		MOV	#LPMCB,LPBSAD(R3) ;;;YES-- POINT TO THE FORMAT CHARACTER
   3966	012140	060263 	000004 			ADD	R2,LPBSAD(R3)	;;; FOR THIS LP
   3967	012144	012763 	177777 	000006 		MOV	#-1,LPBCTR(R3)	;;;ONLY 1 CHARACTER
   3968	012152	052712 	010000 			BIS	#LP.MCH,(R2)	;;;NOTE THAT WE ARE WORKING FROM LPMCB
   3969	012156	000402 				BR	59$		;;;START THE LP GOING
   3970					;
   3971	012160				58$:
   3972	012160	156013 	177774 			BISB	T.HEMA(R0),(R3)	;;;SET EXTENDED MEMORY BITS
   3973					;
   3974					; SET INTENB, PARENB, AND GO TO START LP GOING ON THIS BUFFER
   3975					;
   3976	012164				59$:
   3977	012164	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;START LP GOING
   3978					;
   3979					; ALL DONE-- RETURN
   3980					;
   3981	012170				90$:
   3982	012170					RETURN			;;;RETURN FROM ..DOLP/..DOL1
	012170	000207 				RTS	PC
   3983						.DSABLE	LSB
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 45
..DOLP	(INITIATE LP-20 TRANSFER)

   3985						.TITLE	CRDRV	(CD-11 DRIVER FOR RSX10F)
   3986						.SBTTL	TITLE PAGE
   3987						.IDENT	/001000/
   3988					;
   3989					;                             COPYRIGHT (C) 1975, 1978 BY
   3990					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3991					;
   3992					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3993					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3994					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3995					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3996					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3997					;
   3998					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3999					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4000					;       CORPORATION.
   4001					;
   4002					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4003					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4004					;
   4005					;		MODULE: COMMON DEFINITIONS
   4006					;
   4007					;		VERSION: 01-00
   4008					;
   4009					;		AUTHOR: TOM PORCHER
   4010					;
   4011					;		DATE: 25-SEP-75
   4012					;
   4013					;
   4014					;	THIS MODULE CONTAINS:
   4015					;
   4016					;	1) COMMON PARAMETERS AND MACROS
   4017					;
   4018					;	2) CD-11 DEVICE REGISTER DEFINITIONS
   4019					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 46
COMMON PARAMETERS AND MACROS

   4021						.SBTTL	COMMON PARAMETERS AND MACROS
   4022					;
   4023					; MISC. MCALLS
   4024					;
   4025					.MCALL MRKT$,SPRA$S,SVTK$S,WTLO$S,WTSE$S,WSIG$S
   4026					.MCALL DIR$,$DEF,CALL,RETURN,.INH,.ENB,PUSH,POP,.STKM
   4027	012172					$DEF
   4028						.ENABLE	AMA
   4029						.LIST	MEB
   4030					;
   4031					; PARAMETERS
   4032					;
   4033		000001 			C$$D11=	1			;ONLY 1 CD-11
   4034					;
   4035					; EVENT FLAGS
   4036					;
   4037		000001 			E.FCRC= 1			;CD-11 MARK-TIME REQUEST
   4038		000001 			 EF.CRC=BIT0
   4039		000002 			E.FCRD=	2			;I/O DONE FROM INTERRUPT LEVEL
   4040		000002 			 EF.CRD=BIT1
   4041		000003 			E.FCRS=	3			;BUFFER AVAILABLE FOR STATUS
   4042		000004 			 EF.CRS=BIT2
   4043		000004 			E.FCRB=	4			;DATA BUFFER AVAILABLE
   4044		000010 			 EF.CRB=BIT3
   4045					;
   4046					;
   4047		000074 			.CYLTM=60.
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 47
CD-11 DEVICE REGISTER BIT DEFINITIONS

   4049						.SBTTL	CD-11 DEVICE REGISTER BIT DEFINITIONS
   4050					;
   4051					;
   4052					;CDST==	177160			;CONTROL/STATUS REGISTER
   4053		100000 				CDSERR=	BIT15
   4054		040000 				CDSRCK=	BIT14
   4055		020000 				CDSEOF=	BIT13
   4056		010000 				CDSOFL=	BIT12
   4057		004000 				CDSDER=	BIT11
   4058		002000 				CDSDLT=	BIT10
   4059		001000 				CDSNXM=	BIT9
   4060		000400 				CDSPWC=	BIT8
   4061		000200 				CDSRDY=	BIT7
   4062		000100 				CDSIEN=	BIT6
   4063		000040 				CDSB17=	BIT5
   4064		000020 				CDSB16=	BIT4
   4065		000010 				CDSTOL=	BIT3
   4066		000004 				CDSHEM=	BIT2
   4067		000002 				CDSPAK=	BIT1
   4068		000001 				CDSRED=	BIT0
   4069					;CDCC==	177162			;COLUMN COUNT REGISTER
   4070					;CDBA==	177164			;BUS ADDRESS BITS 15-0
   4071					;CDDB==	177166			;DATA BUFFER REGISTER
   4072					;AFTER DATA TRANSFERS (CDSRDY= 1):
   4073		040000 				CDBRCK=	BIT14
   4074		020000 				CDBPCK=	BIT13
   4075		010000 				CDBSCK=	BIT12
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 48
CD-11 DRIVER COMMON DATA MODULE

   4077						.SBTTL	CD-11 DRIVER COMMON DATA MODULE
   4078					;
   4079					;                             COPYRIGHT (C) 1975, 1978 BY
   4080					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4081					;
   4082					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4083					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4084					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4085					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4086					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4087					;
   4088					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4089					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4090					;       CORPORATION.
   4091					;
   4092					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4093					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4094					;
   4095					;		MODULE: CD-11 DRIVER COMMON DATA
   4096					;
   4097					;		VERSION: 01-00
   4098					;
   4099					;		AUTHOR: TOM PORCHER
   4100					;
   4101					;		DATE: 25-AUG-75
   4102					;
   4103					;
   4104					;	THIS MODULE CONTAINS:
   4105					;
   4106					;	1) COMMON DATABASE DEFINITIONS
   4107					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 49
COMMON DATABASE DEFINITIONS

   4109						.SBTTL	COMMON DATABASE DEFINITIONS
   4110					;
   4111					;
   4112					; CR TASK STACK HEADER
   4113					;
   4114	012172				CRHD::	.STKM	0,0,0,0,0,0,0,CRINI,174000,CRSTK
	012240	000000 	000000 	000000 		.WORD	0,0,0,0
	012246	000000
	012266	174000 	012554'	012452'		.WORD	174000,CRINI,CRSTK
	012322	000005 				.WORD	5
	012324	000000G				.WORD	TTPEN
	012326	000000 				.WORD	0
	012330	000000 				.WORD	0
	012332	000000 				.WORD	0
	012334	000000 				.WORD	0
	012336	000000 				.WORD	0
	012340	000000 				.WORD	0
	012342	000000 				.WORD	0
	012344	000000 				.WORD	0
	012346	000000 				.WORD	0
	012350	000000 				.WORD	0
	012452	000000 				.WORD	0
	012454	000000 				.WORD	0
	012456	000000 				.WORD	0
	012460	000000 				.WORD	0
	012462	000000 				.WORD	0
	012464	000000 				.WORD	0
	012466	012554'				.WORD	CRINI
	012470	174000 				.WORD	174000
   4115					;
   4116									;STATUS BITS:
   4117		100000 				CR.HNG=	BIT15		;CR IS HUNG, I.E. NO INPUT HAS OCCURED
   4118									; IN 10 SECONDS.  SET AND CHECKED BY
   4119									; MARK-TIME SERVICE, CLEARED BY I/O
   4120									; DONE AT INTERRUPT.
   4121		040000 				CR.SST=	BIT14		;A CHANGE IN DEVICE STATUS HAS OCCURED,
   4122									; OR THE -10 HAS REQUESTED THE STATUS OF
   4123									; THE CR.
   4124		020000 				CR.IOP=	BIT13		;I/O IN PROGRESS. SET WHEN READ CARD STARTED,
   4125									; CLEARED WHEN DONE INTERRUPT OCCURS.
   4126		010000 				CR.IOD=	BIT12		;I/O DONE FROM INTERRUPT LEVEL. SET WHEN A
   4127									; DATA BUFFER IS READY TO BE SENT TO THE -10.
   4128		004000 				CR.ACK=	BIT11		;ACKNOWLEDGE RECEIVED.  READ NEXT CARD.
   4129									; SET WHEN ACK RECEIVED FROM -10 (..AKCR).
   4130		002000 				CR.RHN=	BIT10		;READER HUNG DURING READ. SET BY MKT ROUTINE
   4131									; TESTED AND CLEARED BY SSTSCR
   4132		001000 				CR.NXD=	BIT9		;NON-EX CD-11. SET BY INITCR, CHECKED
   4133									; BEFORE TRANSFER STARTED.
   4134		000400 				CR.NSF=	BIT8		;NOT STACKER FULL.  SET WHEN ANY OTHER ERROR
   4135									; CONDITION IS SET.
   4136					;
   4137					; DIRECTIVE PARAMETER BLOCKS
   4138					;
   4139	012472				CRMRKT:	MRKT$	E.FCRC,10.*.CYLTM,10.*.CYLTM ;MARK-TIME REQUEST FOR 10 SECONDS
	012472	   027 	   005 			.BYTE	23.,5
	012474	000001 				.WORD	E.FCRC
	012476	001130 				.WORD	10.*.CYLTM
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 49-1
COMMON DATABASE DEFINITIONS

	012500	001130 				.WORD	10.*.CYLTM
	012502	000000 				.WORD
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 50
CD-11 DRIVER TASK MODULE

   4141						.SBTTL	CD-11 DRIVER TASK MODULE
   4142					;
   4143					;                             COPYRIGHT (C) 1975, 1978 BY
   4144					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4145					;
   4146					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4147					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4148					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4149					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4150					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4151					;
   4152					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4153					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4154					;       CORPORATION.
   4155					;
   4156					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4157					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4158					;
   4159					;		MODULE: CD-11 DRIVER TASK
   4160					;
   4161					;		VERSION: 14-45
   4162					;
   4163					;		AUTHOR: TOM PORCHER
   4164					;
   4165					;		DATE: 25-AUG-75
   4166					;
   4167					;
   4168					;	THIS MODULE CONTAINS:
   4169					;
   4170					;	1) TASK LEVEL SERVICE FOR CD-11
   4171					;
   4172					;   TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
   4173					;   TCO 5.1566		12-OCT-81	S. LEAPLINE	CLEAR CREXP IF DEVICE DOES NOT EXIST
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 51
TASK INITIALIZATION

   4175						.SBTTL	TASK INITIALIZATION
   4176					;
   4177					; SST VECTOR TABLE
   4178					;
   4179	012504	012506'			CRSSTV:	.WORD	CRTRP4		;WHERE TO GO ON TRAP TO 4
   4180					;
   4181					; HERE ON TRAP TO 4, HOPEFULLY JUST NON-EX CR
   4182					;
   4183	012506	021627 	013222'		CRTRP4:	CMP	(SP),#CRDINT	;FROM MARK-TIME?
   4184	012512	001404 				BEQ	10$		;YES-- OK
   4185	012514	021627 	013752'			CMP	(SP),#CRDCLR	;OR FROM INIT?
   4186	012520	001401 				BEQ	10$		;YES-- ALSO OK
   4187	012522	000004 				IOT			;***** NO, NOT OUR T04 *****
   4188					;
   4189	012524	005037 	000000G		10$:	CLR	CREXP		; [5.1566] CLEAR THE EXTERNAL PAGE ADDRESS
   4190	012530	052737 	001000 	000000G		BIS	#CR.NXD,CRSTS	;SAY NON-EX CR
   4191	012536	052766 	000001 	000002 		BIS	#BIT0,2(SP)	;SET THE CARRY TO THE SST
   4192	012544	000002 				RTI			;RETURN TO INTERRPUTED ROUTINE
   4193					;
   4194					; HERE ON POWER-UP AST
   4195					;
   4196	012546				CRPWUP:	CALL	INITCR		;RESET THE CR
	012546	004737 	013736'			JSR	PC,INITCR
   4197	012552	000002 				RTI			;RETURN FROM AST
   4198					;
   4199					; HERE TO START CR TASK
   4200					;
   4201	012554	013737 	000000G	000000G	CRINI:	MOV	.CRTSK,CREVFG	;GET ADDRESS OF OUR TASK'S ENTRY
   4202	012562	062737 	000020 	000000G		ADD	#A.EF,CREVFG	;MAKE THAT ADDRESS OF OUR EVENT FLAGS
   4203	012570	052777 	000014 	000000G		BIS	#EF.CRB!EF.CRS,@CREVFG ;SAY OUR BUFFERS ARE AVAILABLE
   4204	012576					DIR$	#CRMRKT		;SETUP FOR 10-SECOND MARK-TIME'S
	012576	012746 	012472'			MOV	#CRMRKT,-(SP)
	012602	104375 				EMT	375
   4205	012604					SVTK$S	#CRSSTV,#1	;SETUP FOR TRAP-TO-4 RECOGNITION
	012604	012746 	000001 			MOV	#1,-(SP)
	012610	012746 	012504'			MOV	#CRSSTV,-(SP)
	012614	012746 				MOV	(PC)+,-(SP)
	012616	   071 	   003 			.BYTE	57.,3
	012620	104375 				EMT	375
   4206	012622					SPRA$S	#CRPWUP		;SETUP FOR POWER-UP AST
	012622	012746 	012546'			MOV	#CRPWUP,-(SP)
	012626	012746 				MOV	(PC)+,-(SP)
	012630	   155 	   002 			.BYTE	109.,2
	012632	104375 				EMT	375
   4207	012634					CALL	INITCR		;INITIALIZE CD-11 AND TABLES
	012634	004737 	013736'			JSR	PC,INITCR
   4208					;	BR	CRLOOP		;FALL INTO PROCESSING LOOP
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 52
CRLOOP (MAIN PROCESSING LOOP)

   4210						.SBTTL	CRLOOP (MAIN PROCESSING LOOP)
   4211					;
   4212					; WAIT  FOR EVENT FLAGS EF.CRC (10 SEC MARK-TIME), EF.CRD (I/O DONE).
   4213					;
   4214	012640				CRLOOP:	WTLO$S	1,#EF.CRC!EF.CRD ;WAIT FOR FLAGS
	012640	012746 	000003 			MOV	#EF.CRC!EF.CRD,-(SP)
	012644	012746 	000001 			MOV	#1,-(SP)
	012650	012746 				MOV	(PC)+,-(SP)
	012652	   053 	   003 			.BYTE	43.,3
	012654	104375 				EMT	375
   4215					;
   4216	012656					.INH			;;;A FLAG WAS SET-- LOCK OUT INTERRUPTS
	012656	013746 	177776 			MOV	PS,-(SP)
	012662	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   4217	012670	017737 	000000G	000000G		MOV	@CREVFG,CRCEVF	;;;GET OUR CURRENT EVENT FLAGS
   4218	012676	042777 	000003 	000000G		BIC	#EF.CRC!EF.CRD,@CREVFG ;;;CLEAR THE FLAGS WE WAITED FOR
   4219	012704					.ENB			;INTERRUPTS: ON!
	012704	012637 	177776 			MOV	(SP)+,@#PS	;;
   4220	012710	005737 	000000G			TST	.CRPFL		;POWER FAIL?
   4221	012714	001404 				BEQ	10$		;NO -- FORGET IT
   4222	012716					CALL	INITCR		;YES -- INIT CR
	012716	004737 	013736'			JSR	PC,INITCR
   4223	012722	005037 	000000G			CLR	.CRPFL
   4224	012726				10$:
   4225					;
   4226					; SEE IF THIS IS EF.CRD (I/O DONE), AND FIND OUT WHY IT WAS SET.
   4227					;
   4228	012726	032737 	000002 	000000G	CRIOD:	BIT	#EF.CRD,CRCEVF	;THIS EF.CRD?
   4229	012734	001516 				BEQ	90$		;NO-- TRY FOR MARK-TIME
   4230					;
   4231					; SEE IF A BUFFER IS READY TO BE SENT TO THE -10 (CR.IOD SET BY INTERRUPT SERVICE)
   4232					;
   4233	012736	032737 	010000 	000000G		BIT	#CR.IOD,CRSTS	;WE FINISH A TRANSFER?
   4234	012744	001430 				BEQ	20$		;NO-- GO ON
   4235	012746	012700 	000000G			MOV	#CRBUFF,R0	;YES-- GET ADDRESS OF BUFFER
   4236					;
   4237					; WE MUST SEND A DATA BUFFER TO THE -10.  SET UP FOR ..STIN:
   4238					;	R0 --	ADDRESS OF BUFFER. FIRST WORD IS (LOW BYTE) BYTE COUNT
   4239					;		OF BUFFER (NOT INCLUDING HEADER WORD), (HIGH BYTE) UNIT #.
   4240					;	R1 --	BIT15+ FUNCTION CODE (BC.STR-- STRING DATA)
   4241					;	R2 --	EVENT FLAG TO SET WHEN DONE
   4242					;	R3 --	DEVICE CODE (D.CCDR)
   4243					;
   4244	012752	105040 				CLRB	-(R0)		;HIGH BYTE HEADER: UNIT # (ALWAYS 0)
   4245	012754	112740 	000000G			MOVB	#CRBFLN,-(R0)	;LOW BYTE HEADER: SIZE OF BUFFER
   4246	012760	012701 	100000G			MOV	#BIT15+BC.STR,R1 ;FUNCTION CODE: STRING DATA (INDIRECT FLAVOR)
   4247	012764	012702 	000004 			MOV	#E.FCRB,R2	;EVENT FLAG TO SET WHEN DONE
   4248	012770	012703 	000000G			MOV	#D.CCDR,R3	;DEVICE CODE: CDR
   4249	012774	042777 	000010 	000000G		BIC	#EF.CRB,@CREVFG	;ASSUME SUCCESS
   4250	013002					CALL	..STIN		;SEND TO -10
	013002	004737 	000000G			JSR	PC,..STIN
   4251	013006	103404 				BCS	10$		;GIVE UP-- PRIMARY PROTOCOL (DDT)
   4252	013010	042737 	112400 	000000G		BIC	#CR.IOD!CR.HNG!CR.RHN!CR.NSF,CRSTS ;OK-- NO LONGER BUFFER TO SEND
   4253	013016	000403 				BR	20$		;GO ON
   4254					;
   4255	013020	052777 	000010 	000000G	10$:	BIS	#EF.CRB,@CREVFG	;..STIN FAILED-- BUFFER STILL AVAILABLE
   4256					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 52-1
CRLOOP (MAIN PROCESSING LOOP)

   4257					; SEE IF STATUS IS TO BE SENT TO -10, EITHER BECAUSE OF A CHANGE IN
   4258					;  DEVICE STATUS OR A REQUEST FROM THE -10.
   4259					;
   4260	013026	032737 	040000 	000000G	20$:	BIT	#CR.SST,CRSTS	;TIME TO SEND DEVICE STATUS?
   4261	013034	001402 				BEQ	30$		;NO-- GO ON
   4262	013036					CALL	SSTSCR		;YES-- SEND SUCH TO -10
	013036	004737 	013332'			JSR	PC,SSTSCR
   4263					;
   4264					; SEE IF -10 WANTS US TO READ NEXT CARD, BY CR.ACK SET.
   4265					;
   4266	013042	032737 	004000 	000000G	30$:	BIT	#CR.ACK,CRSTS	;-10 WANT A CARD?
   4267	013050	001450 				BEQ	90$		;NO-- ALL DONE
   4268	013052	032737 	030000 	000000G		BIT	#CR.IOP!CR.IOD,CRSTS ;STILL I/O IN PROGRESS?
   4269	013060	001044 				BNE	90$		;YES-- COME BACK LATER WHEN WE ARE DONE
   4270	013062	042737 	106000 	000000G		BIC	#CR.ACK!CR.HNG!CR.RHN,CRSTS ;YES-- NO LONGER WANTING
   4271	013070	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;THIS NON-EX CD-11?
   4272	013076	001016 				BNE	32$		;YES-- JUST SEND STATUS
   4273	013100	032777 	000010 	000000G	34$:	BIT	#EF.CRB,@CREVFG	;BUFFER AVAILABLE TO US YET?
   4274	013106	001006 				BNE	31$		;YES-- ALL OK
   4275	013110					WSIG$S			;WAIT FOR SOMETHING TO HAPPEN
	013110	012746 				MOV	(PC)+,-(SP)
	013112	   061 	   001 			.BYTE	49.,1
	013114	104375 				EMT	375
   4276	013116	005737 	000002G			TST	.COMEF+2	; [4.1.1105] IS PRIMARY PROTOCOL STILL RUNNING ?
   4277	013122	100766 				BMI	34$		; [4.1.1105] YES, SEE IF BUFFER IS NOW FREE.
   4278					;
   4279	013124	032737 	010000 	000000G	31$:	BIT	#CDSOFL,@#CDST	;CD-11 OFF-LINE?
   4280	013132	001403 				BEQ	33$		;NO-- LET'S START TRANSFER
   4281	013134				32$:	CALL	SSTSCR		;YES-- TELL -10
	013134	004737 	013332'			JSR	PC,SSTSCR
   4282	013140	000414 				BR	90$		; AND GO AWAY FOR NOW
   4283					;
   4284					; START TRNSFER OF CARD TO CRBUFF
   4285					;
   4286	013142	052737 	020000 	000000G	33$:	BIS	#CR.IOP,CRSTS	;SAY I/O NOW IN PROGRESS
   4287	013150	012737 	000000C	000000G		MOV	#-<CRBFLN/2>,@#CDCC ;INDICATE TO READ 80. COLUMNS
   4288	013156	012737 	000000G	000000G		MOV	#CRBUFF,@#CDBA	; INTO CRBUFF
   4289	013164	012737 	000101 	000000G		MOV	#CDSIEN!CDSRED,@#CDST ;START CARD GOING
   4290					;
   4291					; ALL DONE WITH EF.CRD
   4292					;
   4293	013172				90$:
   4294					;
   4295					; CHECK FOR MARK-TIME REQUEST (EF.CRC SET), THEN DO HUNG CHECK IF SO.
   4296					;
   4297						.ENABLE LSB
   4298	013172	032737 	000001 	000000G	CRMKT:	BIT	#EF.CRC,CRCEVF	;MARK-TIME REQUEST EVENT FLAG SET?
   4299	013200	001452 				BEQ	90$		;NO-- GO ON
   4300	013202	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;NON-EX CR?
   4301	013210	001011 				BNE	9$		;YES-- SKIP INT-ENB STUFF
   4302	013212	000241 				CLC			;IN CASE OF TRAP
   4303	013214	032737 	000100 	000000G		BIT	#CDSIEN,@#CDST	;INT-ENB STILL SET?
   4304	013222	103404 			CRDINT:	BCS	9$		;NON-EX CR-- GO ON
   4305	013224	001003 				BNE	9$		;YES-- SKIP THE SET
   4306	013226	052737 	000100 	000000G		BIS	#CDSIEN,@#CDST	;YES-- MAKE SURE WE STILL HAVE INT-ENB
   4307	013234	032737 	074000 	000000G	9$:	BIT	#CR.SST!CR.IOD!CR.ACK!CR.IOP,CRSTS ;YES-- STUFF FOR US TO DO?
   4308	013242	001426 				BEQ	30$		;NO-- IDLE-- CLEAR HUNG FLAG
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 52-2
CRLOOP (MAIN PROCESSING LOOP)

   4309	013244	032737 	100000 	000000G		BIT	#CR.HNG,CRSTS	;WE BEEN HERE WITHIN 10 SECONDS?
   4310	013252	001416 				BEQ	20$		;NO-- SET HUNG FLAG SO WE WILL IN 10 SEC
   4311	013254	032737 	020000 	000000G		BIT	#CR.IOP,CRSTS	;YES-- WAS I/O IN PROGRESS
   4312	013262	001407 				BEQ	10$		;NO-- JUST PROCESS OTHER FLAGS
   4313	013264	052737 	042000 	000000G		BIS	#CR.RHN!CR.SST,CRSTS ;YES-- SAY READER HUNG
   4314	013272	005237 	000000G			INC	CRHUNG		;COUNT # TIMES HUNG
   4315	013276					CALL	INITCR		;RESET THE CD-11
	013276	004737 	013736'			JSR	PC,INITCR
   4316					;
   4317	013302	052777 	000002 	000000G	10$:	BIS	#EF.CRD,@CREVFG	;SAY TO LOOK AT THE FLAGS AGAIN
   4318					;
   4319	013310	052737 	100000 	000000G	20$:	BIS	#CR.HNG,CRSTS	;FLAG TO CHECK THIS AGAIN IN 10 SECONDS
   4320	013316	000403 				BR	90$		;ALL DONE
   4321					;
   4322	013320	042737 	102000 	000000G	30$:	BIC	#CR.HNG!CR.RHN,CRSTS	;NOTHING TO DO-- DON'T SAY WE ARE HUNG
   4323					;
   4324					; ALL DONE WITH EF.CRC
   4325					;
   4326	013326	000137 	012640'		90$:	JMP	CRLOOP		;BACK TO MAIN LOOP
   4327						.DSABLE	LSB
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 53
SSTSCR	(SEND CD-11 STATUS TO -10)

   4329						.SBTTL	SSTSCR	(SEND CD-11 STATUS TO -10)
   4330					;
   4331					;+
   4332					;
   4333					;	SSTSCR IS CALLED WHEN CR.SST IS SET, EITHER BY A CHANGE IN HARDWARE
   4334					; STATUS, OR ON REQUEST FROM THE -10.
   4335					;
   4336					;	THE STATUS PACKET IS ASSEMBLED INTO CRSTBK.  THE FORMAT OF THIS BLOCK
   4337					; IS AS FOLLOWS:
   4338					;
   4339					; WORD	0	STANDARD BITS (DV.XXX)
   4340					;	1	DEVICE DEPENDENT BITS (DD.XXX)
   4341					;	2	(HIGH BYTE) # BYTES OF DEVICE DEPENDENT INFO (ALWAYS 0)
   4342					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS (ALWAYS 8.)
   4343					; CD-11 DEVICE REGISTERS
   4344					;	3	CDST
   4345					;	4	CDCC
   4346					;	5	CDBA
   4347					;	6	CDDB
   4348					;
   4349					; THE FOLLOWING BITS ARE USED IN THE STATUS WORDS:
   4350					;
   4351					;	DV.NXD	NON-EX DEVICE
   4352					;	DV.OFL	OFF-LINE
   4353					;	DV.OIR	HARD ERROR (DD.RCK, DD.PCK, DD.SCK)
   4354					;	DV.IOP	I/O IN PROGRESS (READING A CARD)
   4355					;	DV.EOF	E-O-F BUTTON PUSHED
   4356					;	DV.LOG	ERROR LOGGING REQUIRED
   4357					;	DV.HNG	DEVICE HUNG
   4358					;
   4359					;	DD.RCK	READ CHECK
   4360					;	DD.PCK	PICK CHECK
   4361					;	DD.SCK	STACK CHECK
   4362					;	DD.HEM	HOPPER EMPTY
   4363					;	DD.SFL	STACKER FULL
   4364					;
   4365					;-
   4366					;
   4367	013332	042737 	040000 	000000G	SSTSCR:	BIC	#CR.SST,CRSTS	;SAY STATUS SENT ALREADY
   4368	013340	032777 	000004 	000000G	60$:	BIT	#EF.CRS,@CREVFG	;IS STATUS BUFFER AVAILABLE?
   4369	013346	001006 				BNE	10$		;YES-- ASSEMBLE STATUS
   4370	013350					WSIG$S			;NO-- WAIT FOR IT TO BE THERE
	013350	012746 				MOV	(PC)+,-(SP)
	013352	   061 	   001 			.BYTE	49.,1
	013354	104375 				EMT	375
   4371	013356	005737 	000002G			TST	.COMEF+2	; [4.1.1105] IF PRIMARY PROTOCOL IS STILL RUNNING
   4372	013362	100766 				BMI	60$		; [4.1.1105] THEN CHECK IF STILL GOING
   4373					;
   4374					; ASSEMBLE STATUS INTO CRSTBK+0 CRSTBK+2
   4375					;
   4376	013364	012700 	000004G		10$:	MOV	#CRSTBK+4,R0	;GET ADDRESS OF STATUS BLOCK
   4377	013370	005010 				CLR	(R0)		;CLEAR BYTE COUNT WORD(ASSUME NON-EX DEV)
   4378	013372	005040 				CLR	-(R0)		; AND SECOND WORD OF STATUS
   4379	013374	010001 				MOV	R0,R1		;SAVE ADDR OF SECOND WORD
   4380	013376	005040 				CLR	-(R0)		; AND CLEAR FIRST WORD, R0 POINTS TO IT
   4381					;
   4382	013400	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;NON-EX DEVICE?
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 53-1
SSTSCR	(SEND CD-11 STATUS TO -10)

   4383	013406	001403 				BEQ	101$		;NO-- GET REAL STATUS
   4384	013410	052710 	000007 			BIS	#DV.NXD!DV.OFL!DV.OIR,(R0) ;YES-- SAY NOT THERE
   4385	013414	000522 				BR	50$		;SEND THIS STATUS
   4386					;
   4387	013416	013703 	000000G		101$:	MOV	@#CDST,R3	;COPY DEVICE STATUS
   4388	013422	032703 	010000 			BIT	#CDSOFL,R3	;CD-11 OFF-LINE?
   4389	013426	001402 				BEQ	11$		;NO-- GO ON
   4390	013430	052710 	000006 			BIS	#DV.OFL!DV.OIR,(R0) ;YES-- SAY SO
   4391					;
   4392	013434	032737 	030000 	000000G	11$:	BIT	#CR.IOP!CR.IOD,CRSTS ;I/O STILL IN PROGRESS?
   4393	013442	001402 				BEQ	12$		;NO
   4394	013444	052710 	000020 			BIS	#DV.IOP,(R0)	;YES-- SAY SO
   4395					;
   4396	013450	032703 	020000 		12$:	BIT	#CDSEOF,R3	;E-O-F BUTTON PUSHED?
   4397	013454	001402 				BEQ	13$		;NO-- GO ON
   4398	013456	052710 	000040 			BIS	#DV.EOF,(R0)	;YES-- SAY EOF
   4399					;
   4400	013462	032737 	002000 	000000G	13$:	BIT	#CR.RHN,CRSTS	;READER HUNG?
   4401	013470	001402 				BEQ	14$		;NO-- GO ON
   4402	013472	052710 	001104 			BIS	#DV.HNG!DV.OIR!DV.LOG,(R0) ;YES-- SAY HUNG
   4403					;
   4404	013476	032703 	003000 		14$:	BIT	#CDSDLT!CDSNXM,R3 ;FATAL ERROR (DATA LATE, NXM)?
   4405	013502	001402 				BEQ	15$		;NO-- GO ON
   4406	013504	052710 	000300 			BIS	#DV.URE!DV.LOG,(R0) ;YES-- SAY SO
   4407					;
   4408	013510	032703 	000200 		15$:	BIT	#CDSRDY,R3	;BUT IS READER READY?
   4409	013514	001451 				BEQ	30$		;NO-- BITS ARE NOT VALID-- GO ON
   4410					;
   4411	013516	013704 	000000G			MOV	@#CDDB,R4	;YES-- GET ERROR BITS TO R4
   4412					;
   4413	013522	032704 	040000 			BIT	#CDBRCK,R4	;READ (PHOTO) CHECK?
   4414	013526	001402 				BEQ	16$		;NO
   4415	013530	052711 	000001 			BIS	#DD.RCK,(R1)	;YES
   4416					;
   4417	013534	032704 	020000 		16$:	BIT	#CDBPCK,R4	;PICK CHECK?
   4418	013540	001402 				BEQ	17$		;NO
   4419	013542	052711 	000002 			BIS	#DD.PCK,(R1)	;YES
   4420					;
   4421	013546	032704 	010000 		17$:	BIT	#CDBSCK,R4	;STACK CHECK?
   4422	013552	001402 				BEQ	18$		;NO
   4423	013554	052711 	000004 			BIS	#DD.SCK,(R1)	;YES
   4424					;
   4425	013560	005711 			18$:	TST	(R1)		;FATAL ERRROR DETECTED?
   4426	013562	001402 				BEQ	19$		;NO-- GO ON
   4427	013564	052710 	000100 			BIS	#DV.LOG,(R0)	;YES-- SAY ERROR LOGGING NEEDED
   4428					;
   4429	013570	032703 	000004 		19$:	BIT	#CDSHEM,R3	;HOPPER EMPTY?
   4430	013574	001402 				BEQ	20$		;NO-- GO ON
   4431	013576	052711 	000010 			BIS	#DD.HEM,(R1)	;YES
   4432					;
   4433	013602	005711 			20$:	TST	(R1)		;ANY ERROR BITS SET?
   4434	013604	001012 				BNE	21$		;YES-- NOT STACKER FULL
   4435	013606	032703 	040000 			BIT	#CDSRCK,R3	;IS THIS A READER CHECK?
   4436	013612	001412 				BEQ	23$		;NO-- CERTAINLY NOT STACKER FULL
   4437	013614	032737 	000400 	000000G		BIT	#CR.NSF,CRSTS	;WE DECIDE IT WASN'T STACKER FULL BEFORE?
   4438	013622	001006 				BNE	23$		;YES-- CAN'T BE STACKER FULL NOW
   4439	013624	052711 	000020 			BIS	#DD.SFL,(R1)	;NO-- READER CHECK & NO ERRORS => STACKER FULL
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 53-2
SSTSCR	(SEND CD-11 STATUS TO -10)

   4440	013630	000403 				BR	22$		;STACKER-FULL-- GO ON
   4441					;
   4442	013632	052737 	000400 	000000G	21$:	BIS	#CR.NSF,CRSTS	;FLAG THAT IT CAN'T BE STACKER FULL
   4443	013640				22$:
   4444	013640				23$:
   4445	013640	012703 	000000G		30$:	MOV	#CDST,R3	;ADDRESS CD CSR
   4446	013644	005721 				TST	(R1)+		;POINT TO FIRST WORD OF DEVICE REGISTERS IN STATUS BLOCK
   4447	013646	012721 	000000C			MOV	#<CDDB+2-CDST>,(R1)+ ;SAVE SIZE OF FOLLOWING BLOCK
   4448	013652	012321 			31$:	MOV	(R3)+,(R1)+	;MOVE A REGISTER
   4449	013654	022701 	000000C			CMP	#CRSTBK+CRSTLN,R1 ;MOVED 'EM ALL?
   4450	013660	101374 				BHI	31$		;NO-- LOOP FOR ALL OF THEM
   4451					;
   4452					; SET UP REGISTERS FOR ..STIN TO SEND BLOCK TO -10:
   4453					;	R0 --	POINTER TO STATUS BLOCK
   4454					;		FIRST WORD IS HEADER: (HIGH BYTE) UNIT # (LOW BYTE) BYTE COUNT OF BLCOK
   4455					;	R1 --	BIT15 (FOR INDIRECT FUNCTION) + FUNCTION CODE (BC.HDS)
   4456					;	R2 --	EVENT FLAG TO SET WHEN BLOCK DONE (EF.CRS)
   4457					;	R3 --	DEVICE CODE (D.CCDR)
   4458					;
   4459	013662	105040 			50$:	CLRB	-(R0)		;HIGH BYTE HEADER: UNIT # (ALWAYS 0)
   4460	013664	112740 	000000G			MOVB	#CRSTLN,-(R0)	;LOW BYTE: BYTE COUNT OF BLOCK (NOT INCLUDING HEADER)
   4461	013670	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ;FUNCTION: HERE IS DEVICE STATUS (INDIRECT FLAVOR)
   4462	013674	012702 	000003 			MOV	#E.FCRS,R2	;EVENT FLAG TO SET WHEN DONE
   4463	013700	012703 	000000G			MOV	#D.CCDR,R3	;DEVICE CODE: CDR (OF COURSE)
   4464	013704	042777 	000004 	000000G		BIC	#EF.CRS,@CREVFG	;CLEAR BUFFER AVAILABLE FLAG
   4465	013712					CALL	..STIN		;SEND TO -10
	013712	004737 	000000G			JSR	PC,..STIN
   4466	013716	103006 				BCC	90$		;OK-- DONE
   4467	013720	052777 	000004 	000000G		BIS	#EF.CRS,@CREVFG	;FAILED-- BUFFER STILL AVAILABLE
   4468	013726	052737 	040000 	000000G		BIS	#CR.SST,CRSTS	;ERROR-- TRY AGAIN LATER
   4469					;
   4470					; ALL DONE
   4471					;
   4472	013734				90$:	RETURN			;ALL DONE FORM SSTSCR
	013734	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 54
INITCR	(INITIALIZE CD-11)

   4474						.SBTTL	INITCR	(INITIALIZE CD-11)
   4475					;
   4476					;+
   4477					;
   4478					;	INITCR IS CALLED FROM TASK INITIALIZATION AND FROM POWER-UP
   4479					; ROUTINE TO RESET THE CD-11.
   4480					;
   4481					;-
   4482					;
   4483	013736	042737 	021000 	000000G	INITCR::BIC	#CR.IOP!CR.NXD,CRSTS ;NO LONGER I/O IN PROGRESS, ASSUME DEVICE EXISTS
   4484	013744	012737 	000400 	000000G		MOV	#CDSPWC,@#CDST	;DO POWER-CLEAR
   4485	013752	052777 	000001 	000000G	CRDCLR:	BIS	#EF.CRC,@CREVFG	;FORCE HUNG CHECK
   4486	013760					RETURN
	013760	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 55
CD-11 DRIVER COMMON SUBROUTINES MODULE

   4488						.SBTTL	CD-11 DRIVER COMMON SUBROUTINES MODULE
   4489					;
   4490					;                             COPYRIGHT (C) 1975, 1978 BY
   4491					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4492					;
   4493					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4494					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4495					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4496					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4497					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4498					;
   4499					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4500					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4501					;       CORPORATION.
   4502					;
   4503					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4504					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4505					;
   4506					;		MODULE: CD-11 DRIVER COMMON SUBROUTINES
   4507					;
   4508					;		VERSION: 01-00
   4509					;
   4510					;		AUTHOR: TOM PORCHER
   4511					;
   4512					;		DATE: 25-AUG-75
   4513					;
   4514					;
   4515					;	THIS MODULE CONTAINS:
   4516					;
   4517					;	1) $CDINT (CD-11 INTERRUPT SERVICE ROUTINE)
   4518					;
   4519					;	2) ..STCR (START CD-11)
   4520					;
   4521					;	3) ..SPCR (STOP CD-11)
   4522					;
   4523					;	4) ..AKCR (READ CARD)
   4524					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 56
$CDINT	(CD-11 INTERRUPT SERVICE)

   4526						.SBTTL	$CDINT	(CD-11 INTERRUPT SERVICE)
   4527					;
   4528					;+
   4529					;
   4530					;	$CDINT IS CALLED FROM THE INTERRUPT VECTOR FOR THE CD-11.
   4531					; IT MERELY SAYS THAT I/O IS DONE BY SETTING CR.IOD IF I/O WAS
   4532					; IN PROGRESS (CR.IOP), AND REQUESTS STATUS IF AN ERROR HAS OCCURED.
   4533					;
   4534					;-
   4535					;
   4536	013762	105737 	000000G		$CDINT:: TSTB	@#CDST		;;;CD-11 READY?
   4537	013766	100025 				BPL	90$		;;;NO-- JUST GO AWAY
   4538	013770	032737 	020000 	000000G		BIT	#CR.IOP,CRSTS	;;;YES-- WERE WE I/O IN PROGRESS (READING)?
   4539	013776	001414 				BEQ	10$		;;;NO-- GO ON (SEE IF ERROR)
   4540	014000	042737 	020000 	000000G		BIC	#CR.IOP,CRSTS	;;;YES-- MUST BE DONE NOW
   4541	014006	005737 	000000G			TST	@#CDCC		;;;DID WE READ A CARD?
   4542	014012	001006 				BNE	10$		;;;NO-- MUST BE ERROR-- SEND STATUS NOW
   4543	014014	052737 	010000 	000000G		BIS	#CR.IOD,CRSTS	;;;SO MAKE TASK KNOW WE ARE DONE
   4544					;
   4545	014022	005737 	000000G			TST	@#CDST		;;;WAS THERE AN ERROR?
   4546	014026	100003 				BPL	20$		;;;NO-- GO ON
   4547					;
   4548	014030	052737 	040000 	000000G	10$:	BIS	#CR.SST,CRSTS	;;;YES-- SEND DEVICE STATUS
   4549	014036				20$:	CALL	IODNCR		;;;SAY I/O DONE TO TASK
	014036	004737 	014126'			JSR	PC,IODNCR
   4550					;
   4551					; ALL DONE WITH INTERRUPT
   4552					;
   4553	014042	000137 	000000G		90$:	JMP	..INTX		;;;FINISH OFF INTERRUPT
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 57
..STCR	(START CD-11)

   4555						.SBTTL	..STCR	(START CD-11)
   4556					;
   4557					;+
   4558					;
   4559					;	..STCR IS CALLED FROM THE QUEUED PROTOCOL TASK ON A REQUEST
   4560					; FOR STATUS.  NO OTHER REQUESTS TO THE CD-11 DRIVER ARE MADE THROUGH
   4561					; ..STCR.
   4562					;
   4563					;	THE STATUS IS REQUESTED TO THE CD-11 DRIVER TASK BY SETTING
   4564					; CR.SST AND EF.CRD.
   4565					;
   4566					; CALLING SEQUENCE:
   4567					;	R0 --	POINTER TO THREAD BLOCK (WILL JUST BE DEALLOCATED)
   4568					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4569					;
   4570					; EXIT CONDITIONS:
   4571					;
   4572					;	NO REGISTERS MODIFIED
   4573					;
   4574					;-
   4575					;
   4576						.ENABLE	LSB
   4577	014046				..STCR::
   4578	014046					CALL	..DECN		;DE-ALLOCATE BLOCK
	014046	004737 	000000G			JSR	PC,..DECN
   4579	014052	020227 	000000G			CMP	R2,#CRTBL+0	;THIS CR0?
   4580	014056	001030 				BNE	99$		;NO-- GO AWAY
   4581	014060	052737 	040000 	000000G		BIS	#CR.SST,CRSTS	;YES-- MAKE STATUS HAPPEN
   4582	014066	000417 				BR	IODNCR		; AND MAKE TASK RECOGNIZE IT
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 58
..SPCR	(STOP CD-11)

   4584						.SBTTL	..SPCR	(STOP CD-11)
   4585					;
   4586					;+
   4587					;
   4588					;	..SPCR IS CALLED FROM THE QUEUED PROTOCOL TASK TO FLUSH
   4589					; INPUT FROM THE CD-11.  ANY I/O THAT IS IN PROGRESS IS STOPPED,
   4590					; AND NO FURTHER DATA IS SENT TO THE -10.
   4591					;
   4592					; CALLING SEQUENCE:
   4593					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4594					;
   4595					; EXIT CONDITIONS:
   4596					;
   4597					; NO REGISTERS MODIFIED
   4598					;
   4599					;-
   4600					;
   4601	014070	020227 	000000G		..SPCR:: CMP	R2,#CRTBL+0	;THIS CR0?????
   4602	014074	001021 				BNE	99$		;NO-- GO AWAY
   4603	014076					CALL	INITCR		;RESET THE CD-11
	014076	004737 	013736'			JSR	PC,INITCR
   4604	014102	042737 	034000 	000000G		BIC	#CR.ACK!CR.IOD!CR.IOP,CRSTS ;SAY WE ARE HAPPY
   4605	014110					RETURN
	014110	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1113  11-NOV-81 11:19  PAGE 59
..AKCR	(READ CARD)

   4607						.SBTTL	..AKCR	(READ CARD)
   4608					;
   4609					;+
   4610					;
   4611					;	..AKCR IS CALLED FROM THE QUEUED PROTOCOL TASK ON AN ACKNOWLEDGE
   4612					; REQUEST FROM THE -10.  THIS IMPLIES THAT A CARD SHOULD BE READ.
   4613					;
   4614					; CALLING SEQUENCE:
   4615					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4616					;
   4617					; EXIT CONDITIONS:
   4618					;
   4619					; NO REGISTERS MODIFIED
   4620					;
   4621					;-
   4622					;
   4623	014112	020227 	000000G		..AKCR:: CMP	R2,#CRTBL+0	;IS THIS CR0???
   4624	014116	001010 				BNE	99$		;NO-- GIVE UP
   4625	014120	052737 	004000 	000000G		BIS	#CR.ACK,CRSTS	;YES-- SAY TO READ A CARD
   4626					;	BR	IODNCR		;SET I/O DONE TO SAY SOMETHING TO DO TO TASK
   4627					;
   4628					; HERE TO SET I/O DONE (EF.CRD) TO CR TASK TO INDICATE SOMETHING TO DO.
   4629					;  ALSO SIGNIFICANT EVENT TO CAUSE CR TASK TO RUN.
   4630					;
   4631	014126	052777 	000002 	000000G	IODNCR:	BIS	#EF.CRD,@CREVFG	;SET EVENT FLAG
   4632	014134					CALL	..DSEV		; AND MAKE SIGN. EVENT TO WAKE TASK
	014134	004737 	000000G			JSR	PC,..DSEV
   4633	014140				99$:	RETURN			; FROM IODNCR
	014140	000207 				RTS	PC
   4634						.DSABLE	LSB
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 60
..AKCR	(READ CARD)

   4636						.TITLE	INSTAL -- TASK INSTALLER FOR RSX-20F
   4637						.SBTTL	TITLE PAGE
   4638						.IDENT	/014440/
   4639					;
   4640					;                             COPYRIGHT (C) 1975, 1978 BY
   4641					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4642					;
   4643					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4644					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4645					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4646					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4647					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4648					;
   4649					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4650					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4651					;       CORPORATION.
   4652					;
   4653					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4654					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4655					;
   4656					;		MODULE: INSTALL TASK FOR RSX-20F
   4657					;
   4658					;		VERSION: 14-44
   4659					;
   4660					;		AUTHOR: TOM PORCHER
   4661					;
   4662					;		DATE: 1-OCT-75
   4663					;
   4664					;
   4665					;	THIS MODULE CONTAINS:
   4666					;
   4667					;	-- CODE TO INSTALL A TASK IN RSX-20F
   4668					;
   4669					; MODIFICATIONS:
   4670					;
   4671					;	NO.	DATE		PROGRAMMER	PURPOSE
   4672					;	---	----		----------	-------
   4673					;	001	14-MAR-77	R. BELANGER	DEFINE THE END OF "INSTAL"
   4674					;						TO ALLOW DYNAMIC ALLOCATION
   4675					;						OF FREE POOL SPACE
   4676					;	002	30-MAY-78	R. BELANGER	MODIFY INSTAL TO MOUNT BOTH
   4677					;						DX0: AND DX1: AS SY:
   4678					;	003	18-AUG-81	S. LEAPLINE	EXTEND STACK AREA
   4679					;	004	28-AUG-81	S. LEAPLINE	MAKE TYPBUF BIGGER
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 61
MACROS AND PARAMETERS

   4681						.SBTTL	MACROS AND PARAMETERS
   4682					;
   4683					; SETUP ASSEMBLY CONDITIONS
   4684					;
   4685						.ENABLE	AMA
   4686						.LIST	MEB
   4687					;
   4688					; MISC. MCALL'S
   4689					;
   4690					.MCALL QIOSY$,ALUN$S,QIOW$S,RCVX$S,RQST$S,WSIG$S,.INH0,.ENB0,CALL,RETURN,PUSH,POP,.STKM,$DEF
   4691	014142					$DEF
   4692	014142					QIOSY$
   4693					;
   4694					; MACROS
   4695					;
   4696					.MACRO	MSG	A,B
   4697						.PSECT	TEXT
   4698					$$$=.
   4699						 .ASCIZ	\B\
   4700						.PSECT
   4701						 PUSH	#$$$
   4702						CALL	TYPMSG
   4703					.ENDM	MSG
   4704					;
   4705					.MACRO	ERR	A,B
   4706						MSG	<A>,<B>
   4707					.ENDM	ERR
   4708					;
   4709					.MACRO	ERRF	A,B
   4710						ERR	<A>,<B>
   4711						 BR	CLSFIL
   4712					.ENDM	ERRF
   4713					;
   4714					.MACRO	ERRN	A,B
   4715						ERR	<A>,<B>
   4716						 BR	RETNOD
   4717					.ENDM	ERRN
   4718					;
   4719					; PARAMETERS
   4720					;
   4721		000062 			DEFPRI=	50.			;DEFAULT TASK PRIORITY
   4722					;
   4723		000050 			U.SZ=50				;LOCAL DEF OF U.SZ
   4724		000001 			SF.TA=1		;LOCAL DEF OF TASK ACTIVE
   4725		040000 			SF.IR=40000	;LOCAL DEF FOR INSTAL REQUESTED
   4726					; LOGICAL UNIT NUMBER ASSIGNMENTS
   4727					;
   4728		000001 			CTYLUN=	1			;FOR I/O TO THE CTY **** MUST BE UNIT 1 ****
   4729		000002 			TSKLUN=	2			;FOR I/O TO TASK IMAGE FILE
   4730					;
   4731					; EVENT FLAGS
   4732					;
   4733		000001 			E.FQIO=	1			;WAIT FOR QUEUE I/O TO COMPLETE
   4734		000001 			 EF.QIO=BIT0
   4735					;
   4736					; HEADER BLOCK DEFINITIONS
   4737					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 61-1
MACROS AND PARAMETERS

   4738		000076 			H.IPC=	76			;INITIAL PC
   4739		000100 			H.ISP=	100			;INITIAL SP
   4740		000130 			H.NLUN=	130			;NUMBER OF LUNS FOR TASK
   4741		000132 			H.LUN=	132			;START OF LUN TABLE AREA
   4742					;
   4743					; LABEL BLOCK DEFINITIONS
   4744					;
   4745		000000 			L$BTSK=	0			;TASK NAME IN RAD50 (TWO WORDS)
   4746		000004 			L$BPAR=	4			;PARTITION NAME IN RAD50 (TWO WORDS)
   4747		000010 			L$BFLG=	10			;FLAG WORD
   4748		000012 			L$BPRI=	12			;DEFAULT TASK RUN PRIORITY
   4749		000014 			L$BLDZ=	14			;LOAD SIZE OF TASK IMAGE
   4750		000016 			L$BMXZ=	16			;MAX SIZE OF TASK
   4751		000020 			L$BSA=	20			;BASE ADDRESS OF TASK
   4752		000022 			L$BHRB=	22			;HEADER RELATIVE BLOCK IN TASK FILE
   4753		000024 			L$BBLK=	24			;# BLOCKS IN LABEL GROUP
   4754					;
   4755					; ACCESS CONTROL BITS
   4756					;
   4757		000200 			AC.ENA=	BIT7			;ENABLE ACCESS
   4758					;
   4759					; FILENAME BLOCK OFFSETS
   4760					;
   4761		000000 			N.FID=	0			;FILE-ID / SEQUENCE #
   4762		000006 			N.FNAM=	6			;FILENAME IN RADIX 50 (3 WORDS)
   4763		000014 			N.FTYP=	14			;FILE TYPE IN RADIX 50
   4764		000016 			N.FVER=	16			;FILE VERSION NUMBER
   4765		000020 			N.STAT=	20			;FLAGS
   4766		000022 			N.NEXT=	22			;CONTEXT SAVE FOR .FIND
   4767		000024 			N.DID=	24			;DIRECTORY ID
   4768		000034 			 S.DRFN=34			;WORDS OF FILE-NAME BLOCK USED FOR IO.FNA
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 62
TASK DATA

   4770						.SBTTL	TASK DATA
   4771					;
   4772					; TASK HEADER AND STACK
   4773					;
   4774	014142				INSHD::	.STKM	0,0,0,0,0,0,40,INSTAL,174000,INSTK
	014210	000000 	000000 	000000 		.WORD	0,0,0,0
	014216	000000
	014236	174000 	015072'	014422'		.WORD	174000,INSTAL,INSTK
	014272	000005 				.WORD	5
	014274	000000G				.WORD	TTPEN
	014276	000000 				.WORD	0
	014300	000000 				.WORD	0
	014302	000000 				.WORD	0
	014304	000000 				.WORD	0
	014306	000000 				.WORD	0
	014310	000000 				.WORD	0
	014312	000000 				.WORD	0
	014314	000000 				.WORD	0
	014316	000000 				.WORD	0
	014320	000000 				.WORD	0
	014422	000000 				.WORD	0
	014424	000000 				.WORD	0
	014426	000000 				.WORD	0
	014430	000000 				.WORD	0
	014432	000000 				.WORD	0
	014434	000000 				.WORD	0
	014436	015072'				.WORD	INSTAL
	014440	174000 				.WORD	174000
   4775					;
   4776	014442					.BLKW	40
   4777	014542				EXSP::
   4778					;
   4779					; LOCAL DATA
   4780					;
   4781	014542	   000 			DXFLAG:	.BYTE	0		; +++002 SECOND DX: MOUNT FLAG
   4782	014543	   000 			SYFLAG:	.BYTE	0		; +++002 SY: MOUNTED FLAG
   4783	014544				RCVBLK:	.BLKW	2		;RECEIVE DATA BUFFER: TRASH
   4784	014550				REQBLK:	.BLKW	13.		;REQUEST BLOCK FROM EXEC
   4785		014562'			STDADR=REQBLK+12		;ADDRESS OF OUR SYSTEM TASK DIRECTORY ENTRY
   4786	014602				PUDADR:	.BLKW	1		;PUD ENTRY ADDRESS OF DEVICE WHERE TASK FILE WAS FOUND
   4787	014604				LBLBLK:	.BLKW	1		;CURRENT VIRTUAL BLOCK NUMBER TO READ LABEL GROUP
   4788	014606				LBLNUM:	.BLKW	1		;NUMBER OF BLOCKS IN LABEL GROUP
   4789	014610				LBLBUF:	.BLKW	1		;ADDRESS OF LABEL BUFFER
   4790	014612				LBLBFE:	.BLKW	1		;ADDRESS OF END OF BUFFER (LBLBUF)+512.
   4791	014614				HDRBLK:	.BLKW	1		;CURRENT VIRTUAL BLOCK NUMBER TO READ HEADER
   4792	014616				HDRBUF:	.BLKW	1		;ADDRESS OF HEADER BLOCK BUFFER
   4793	014620				HDRBFE:	.BLKW	1		;ADDRESS OF END OF HEADER BUFFER
   4794	014622				FILBLK:	.BLKB	S.DRFN		;FILE-NAME BLOCK FOR TASK IMAGE FILE
   4795	014656				FILADR:	.BLKW	2		;STATISTISTICS BLOCK: DISK ADDRESS
   4796	014662				QIOSTS:	.BLKW	2		;I/O STATUS
   4797	014666				TYPBUF:	.BLKB	100.		;BUFFER FOR CTY OUTPUT
   4798					;
   4799					; PURE DATA
   4800					;
   4801	015032	   367 			ATCBLK:	.BYTE	-9.		;ATTIBUTE CONTROL: STATISTICS BLOCK, READ
   4802	015033	   004 				.BYTE	4.		;4 BYTES OF INFO
   4803	015034	014656'				.WORD	FILADR		;WHERE TO INFO TO
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 62-1
TASK DATA

   4804	015036	   000 	   000 			.BYTE	0,0		;END OF ATTRIBUTE CONTROL BLOCK
   4805					;
   4806	015040	   001 			MNTBLK:	.BYTE	1		;ACP CONTROL: MOUNT FUNCTION
   4807	015041	   001 				.BYTE	1		;STRING LENGTH: 1
   4808	015042	015044'				.WORD	1$		;ADDRESS OF STRING
   4809	015044	   072 			1$:	.ASCII	/:/
   4810						.EVEN
   4811					;
   4812					; DEVICE CONVERSION TABLE
   4813					;
   4814	015046	   124 	   111 	   124 	CNVTBL:	.ASCII	/TI//TT/
	015051	   124
   4815	015052	   103 	   117 	   124 		.ASCII	/CO//TT/
	015055	   124
   4816	015056	   103 	   111 	   124 		.ASCII	/CI//TT/
	015061	   124
   4817	015062	   103 	   114 	   114 		.ASCII	/CL//LP/
	015065	   120
   4818	015066	000000 	000000 			.WORD	0,0
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 63
FIND THE TASK FILE

   4820						.SBTTL	FIND THE TASK FILE
   4821					;
   4822					;
   4823					; HERE ON A REQUEST TO INSTALL A TASK FROM THE EXECUTIVE
   4824					;
   4825					; A SEND DATA PACKET IS SENT TO THIS TASK .INST. IN REQUEST
   4826					;  FOR A TASK WHICH IS NOT CURRENTLY INSTALLED. THE PACKET
   4827					;  HAS THE FOLLOWING FORMAT:
   4828					;
   4829					; WORD 0	TASK NAME IN RADIX 50 FORMAT
   4830					;      1	 (SECOND HALF)
   4831					;      2	PARTITION NAME IN RADIX 50 (IF SPECIFIED, OTHERWISE 0)
   4832					;      3	 (SECOND HALF)
   4833					;      4	RUN PRIORITY (IF SPECIFIED, OTHERWISE 0)
   4834					;	5	STD ADDRESS
   4835					;
   4836					;
   4837					; GET THE PACKET, OR EXIT IF NOTHING TO DO
   4838					;
   4839	015072				INSTAL::
   4840	015072	012706 	014542'			MOV	#EXSP,SP	;;ADD EXTRA STACK SPACE
   4841	015076					RCVX$S	,#RCVBLK	;;GET THE REQUEST OR EXIT IF NONE
	015076	012746 	014544'			MOV	#RCVBLK,-(SP)
	015102	005046 				CLR	-(SP)
	015104	005046 				CLR	-(SP)
	015106	012746 				MOV	(PC)+,-(SP)
	015110	   023 	   004 			.BYTE	19.,$$$T1
	015112	104375 				EMT	375
   4842	015114	103766 				BCS	INSTAL		;OOPS-- TRY AGAIN
   4843					;
   4844	015116					CALL	CLRBUF		; AND NO BUFFERS ALLOCATED
	015116	004737 	016666'			JSR	PC,CLRBUF
   4845	015122	105037 	014542'			CLRB	DXFLAG		; +++002 RESET THE RX01 FLAG
   4846					;
   4847					; SETUP TO LOOK ON DEVICE SY FOR THE TASK FIRST
   4848					;
   4849	015126	012705 	177730G			MOV	#.PUDBA-U.SZ,R5	;POINT TO START OF PUD'S TO SCAN IF NOT ON SY
   4850									;MINUS 1 FOR SY
   4851	015132	012700 	054523 			MOV	#"SY,R0		; +++002 DEVICE NAME (U.DN) TO R0
   4852	015136	005001 				CLR	R1		; +++002 UNIT NUMBER (U.UN) TO R1
   4853					;
   4854	015140				MNTSYD:				; +++002
   4855	015140					ALUN$S	#TSKLUN,R0,R1	; +++002 ASSIGN DEVICE SY0 TO TASK LUN
	015140	010146 				MOV	R1,-(SP)
	015142	010046 				MOV	R0,-(SP)
	015144	012746 	000002 			MOV	#TSKLUN,-(SP)
	015150	012746 				MOV	(PC)+,-(SP)
	015152	   007 	   004 			.BYTE	7.,4
	015154	104375 				EMT	375
   4856	015156	103557 				BCS	TASKNF		;NO DICE-- JUST TRY PUD SCAN
   4857					;
   4858	015160	013704 	000000G			MOV	.CRTSK,R4	;GOT IT-- GET ADDRESS
   4859	015164	016404 	000000G			MOV	A.HA(R4),R4	; OF OUR HEADER TO
   4860	015170	016404 	000136 			MOV	H.LUN+<4*<TSKLUN-1>>+0(R4),R4 ; FIND PUD ADDRESS OF SY
   4861	015174	016404 	000000G			MOV	U.RP(R4),R4	; BUT GET THE REAL DEVICE PUD ENTRY
   4862	015200	010437 	014602'			MOV	R4,PUDADR	;SAVE THIS PUD ADDRESS IN CASE WE DO FIND THE TASK
   4863	015204	005764 	000000G			TST	U.VA(R4)	;IS SY MOUNTED?
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 63-1
FIND THE TASK FILE

   4864	015210	001031 				BNE	SYMNTD		; +++002 YES -- DO THE SECOND FLOPPY CHECK
   4865					;
   4866					; SY IS NOT MOUNTED.  WE MUST MOUNT IT BEFORE WE CAN FIND ANYTHING
   4867					;
   4868					; NOTE--
   4869					;
   4870					;	IF THE SY: DEVICE BEING MOUNTED IS A FLOPPY (DX:) INSTAL WILL
   4871					;	ATTEMPT TO MOUNT THE OTHER UNIT AS WELL.
   4872					;
   4873	015212	012701 	014550'			MOV	#RCVBLK+4,R1	;GET A SCRATCH AREA
   4874	015216	012741 				MOV	(PC)+,-(R1)	;STORE
   4875	015220	003310 				 .RAD50	/ACP/		; THE NAME OF AN ACP
   4876	015222	016441 	000000G			MOV	U.DACP(R4),-(R1) ;  AND THE NAME OF THE ACP FOR THIS DEVICE
   4877	015226					CALL	..FSTD		;FIND THE STD ENTRY ADDRESS OF THE ACP
	015226	004737 	000000G			JSR	PC,..FSTD
   4878	015232	010264 	000000G			MOV	R2,U.ACP(R4)	;STORE THE STD ADDRESS OF THE ACP
   4879					;
   4880	015236	012700 	014010 			MOV	#IO.APV,R0	;SET TO DO PRIVILEGED ACP CONTROL
   4881	015242	005001 				CLR	R1		;NO FILE-ID
   4882	015244	012702 	015040'			MOV	#MNTBLK,R2	;ACP CONTROL FUNCTION BLOCK TO MOUNT
   4883	015250	005003 				CLR	R3		;NO ACCESS
   4884	015252	005004 				CLR	R4		;NO FILE-NAME BLOCK
   4885	015254					CALL	FILQIO		;DO A MOUNT ON SY
	015254	004737 	017166'			JSR	PC,FILQIO
   4886	015260	103005 				BCC	SYMNTD		;SUCCESS-- SAY WE DID THE MOUNT SO WE DON'T SCARE ANYBODY
   4887	015262					ERR	MSF,<MOUNT SY FAILED>
	000000	   115 	   117 	   125 		 .ASCIZ	\MOUNT SY FAILED\
	000003	   116 	   124 	   040
	000006	   123 	   131 	   040
	000011	   106 	   101 	   111
	000014	   114 	   105 	   104
	000017	   000
	015262	012746 	000000'			MOV	#$$$,-(SP)
	015266	004737 	017246'			JSR	PC,TYPMSG
   4888	015272	000511 				BR	TASKNF		;CERTAINLY NOT FOUND
   4889					;
   4890	015274				SYMNTD:
   4891	015274	013704 	014602'			MOV	PUDADR,R4	; +++002 PUD ADDRESS TO R4
   4892	015300	016400 	000000G			MOV	U.DN(R4),R0	; +++002 DEVICE NAME TO R0
   4893	015304	016401 	000000G			MOV	U.UN(R4),R1	; +++002 UNIT NUMBER TO R1
   4894	015310	022700 	054104 			CMP	#"DX,R0		; +++002 DID WE TRY TO MOUNT A FLOPPY??
   4895	015314	001011 				BNE	SYMNT1		; +++002 NO -- GO ON
   4896	015316	105737 	014542'			TSTB	DXFLAG		; +++002 YES -- HAVE WE DONE BOTH??
   4897	015322	001006 				BNE	SYMNT1		; +++002 YES -- GO ON
   4898	015324	105237 	014542'			INCB	DXFLAG		; +++002 NO -- MARK SECOND TIME AROUND
   4899	015330	005201 				INC	R1		; +++002 SET UP FOR "OTHER" FLOPPY
   4900	015332	042701 	177776 			BIC	#^C1,R1		; +++002 SO
   4901	015336	000700 				BR	MNTSYD		; +++002 AND DO IT...
   4902						;
   4903	015340				SYMNT1:				; +++002
   4904	015340	105737 	014543'			TSTB	SYFLAG		; +++002 SY: ALREADY MOUNTED??
   4905	015344	001006 				BNE	FNDFIL		; +++002 YES -- GO ON
   4906	015346					MSG	SYM,<SY MOUNTED>
	000020	   123 	   131 	   040 		 .ASCIZ	\SY MOUNTED\
	000023	   115 	   117 	   125
	000026	   116 	   124 	   105
	000031	   104 	   000
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 63-2
FIND THE TASK FILE

	015346	012746 	000020'			MOV	#$$$,-(SP)
	015352	004737 	017246'			JSR	PC,TYPMSG
   4907	015356	105237 	014543'			INCB	SYFLAG		; +++002 MARK MOUNT DONE
   4908					;
   4909					; SET UP FILENAME BLOCK TO LOOK FOR [5,5] DIRECTORY IN MFD
   4910					;
   4911	015362				FNDFIL:
   4912	015362	012702 	014630'			MOV	#FILBLK+N.FNAM,R2 ;POINT TO FILE-NAME BLOCK
   4913	015366	012712 				MOV	(PC)+,(R2)	;SET FILENAME TO
   4914	015370	140123 				 .RAD50	/005/		; 005005
   4915	015372	012222 				MOV	(R2)+,(R2)+	;  BOTH HALVES
   4916	015374	005022 				CLR	(R2)+		;ONLY SIX CHARS
   4917	015376	012722 				MOV	(PC)+,(R2)+	;SET TYPE TO DIRECTORY
   4918	015400	015172 				 .RAD50	/DIR/		; FILE
   4919	015402	005022 				CLR	(R2)+		;VERSION, DON'T CARE
   4920	015404	005022 				CLR	(R2)+		;NO FLAGS
   4921	015406	005022 				CLR	(R2)+		;UNKOWN STUFF
   4922	015410	012712 	177777 			MOV	#-1,(R2)	;DIRECTORY ID:
   4923	015414	012222 				MOV	(R2)+,(R2)+	; (-1,-1) IS MFD
   4924	015416	012722 				MOV	(PC)+,(R2)+	;ALSO SET OWNER TO US
   4925	015420	   005 	   005 			 .BYTE	5,5		;THE UIC
   4926					;
   4927	015422					CALL	FILFNA		;LOOK UP DIRECTORY FOR [5,5]
	015422	004737 	017016'			JSR	PC,FILFNA
   4928	015426	103433 				BCS	TASKNF		;GIVE UP NOW IF NO DIRECTORY FOR US
   4929					;
   4930					; SETUP FILE-NAME BLOCK TO <TASK-NAME>.TSK[5,5]
   4931					;
   4932	015430	012701 	014550'			MOV	#REQBLK,R1	;ADDRESS REQUEST BLOCK
   4933	015434	012702 	014630'			MOV	#FILBLK+N.FNAM,R2 ; AND FILE-NAME BLOCK FOR LOOKUP
   4934	015440	021127 				CMP	(R1),(PC)+	;IS THIS
   4935	015442	131574 				 .RAD50	/.../		; AN MCR FUNCTION TASK?
   4936	015444	001004 				BNE	20$		;NO-- JUST LOOKUP THE TASK NAME
   4937	015446	005721 				TST	(R1)+		;YES-- SKIP THE DOTS
   4938	015450	012122 				MOV	(R1)+,(R2)+	;COPY THE LAST THREE CHARACTERS
   4939	015452	005022 				CLR	(R2)+		; AS THE WHOLE NAME
   4940	015454	000402 				BR	25$		;PROCEED.
   4941					;
   4942	015456				20$:
   4943	015456	012122 				MOV	(R1)+,(R2)+	;COPY TASK NAME
   4944	015460	012122 				MOV	(R1)+,(R2)+	; AS FILE NAME
   4945	015462				25$:
   4946	015462	005022 				CLR	(R2)+		;ONLY SIX CHARACTERS
   4947	015464	012722 				MOV	(PC)+,(R2)+	;SET FILE TYPE
   4948	015466	100003 				 .RAD50	/TSK/		; TO A TASK FILE
   4949	015470	005022 				CLR	(R2)+		;NO VERSION CARE
   4950	015472	005022 				CLR	(R2)+		;NO FLAGS
   4951	015474	005022 				CLR	(R2)+		;NO NOTHING
   4952	015476	012701 	014622'			MOV	#FILBLK+N.FID,R1 ;POINT TO FILE-ID OF DIRECTORY
   4953	015502	012122 				MOV	(R1)+,(R2)+	;COPY FILE-ID
   4954	015504	012122 				MOV	(R1)+,(R2)+	; SEQ #
   4955	015506	012122 				MOV	(R1)+,(R2)+	; OWNER
   4956					;
   4957					; DO A FIND FILE IN DIRECTORY FUNCTION TO GET FILE ID
   4958					;
   4959	015510					CALL	FILFNA		;FIND THE TASK (IF IT'S THERE)
	015510	004737 	017016'			JSR	PC,FILFNA
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 63-3
FIND THE TASK FILE

   4960	015514	103051 				BCC	TSKFND		;FOUND FILE-- GO READ IT AND CHECK IT OUT
   4961					;
   4962					; THE TASK FILE WAS NOT FOUND ON THIS DEVICE.  CONTINUE TO SCAN PUD
   4963					;  FOR ALL FILES-11 DEVICES SUCH THAT WE FIND THE TASK.
   4964					;
   4965	015516				TASKNF:
   4966	015516	062705 	000050 			ADD	#U.SZ,R5	;BUMP TO NEXT PUD ENTRY
   4967	015522	020527 	000000G			CMP	R5,#.PUDEA	;ARE WE AT THE END OF THE PUD?
   4968	015526	103027 				BHIS	TNFERR		;YES-- TASK NOT FOUND
   4969	015530	026505 	000000G			CMP	U.RP(R5),R5	;THIS DEVICE REDIRECTED?
   4970	015534	001370 				BNE	TASKNF		;YES-- WE WILL FIND THE REAL DEVICE
   4971	015536	132765 	000000G	000000G		BITB	#UF.TL,U.FB(R5)	;TASK LOADS ALLOWED FROM THIS DEVICE?
   4972	015544	001764 				BEQ	TASKNF		;NO-- DON'T EVEN TRY
   4973	015546	005765 	000000G			TST	U.VA(R5)	;VOLUME MOUNTED?
   4974	015552	001761 				BEQ	TASKNF		;NO-- DON'T TRY TO FIND FILE
   4975					;
   4976	015554					ALUN$S	#TSKLUN,U.DN(R5),U.UN(R5) ;YES-- ASSIGN TH CURRENT DEVICE TO US
	015554	016546 	000000G			MOV	U.UN(R5),-(SP)
	015560	016546 	000000G			MOV	U.DN(R5),-(SP)
	015564	012746 	000002 			MOV	#TSKLUN,-(SP)
	015570	012746 				MOV	(PC)+,-(SP)
	015572	   007 	   004 			.BYTE	7.,4
	015574	104375 				EMT	375
   4977	015576	103747 				BCS	TASKNF		;THIS SHOULD REALLY NEVER HAPPN
   4978	015600	010537 	014602'			MOV	R5,PUDADR	;OK-- SAVE THIS PUD ADDRESS IN CASE WE FIND THE FILE
   4979	015604	000666 				BR	FNDFIL		;OK-- GO LOOK FOR THE TASK FILE
   4980					;
   4981	015606				TNFERR:
   4982	015606					ERR	TNF,<TASK NOT FOUND>
	000033	   124 	   101 	   123 		 .ASCIZ	\TASK NOT FOUND\
	000036	   113 	   040 	   116
	000041	   117 	   124 	   040
	000044	   106 	   117 	   125
	000047	   116 	   104 	   000
	015606	012746 	000033'			MOV	#$$$,-(SP)
	015612	004737 	017246'			JSR	PC,TYPMSG
   4983	015616	000137 	016522'			JMP	RETNOD		;GIVE UP
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 64
INITIALIZE TASK FILE

   4985						.SBTTL	INITIALIZE TASK FILE
   4986					;
   4987					; FILE ERRORS END UP HERE, GOING ON THERE WAY TO THERE
   4988					;
   4989	015622	000137 	016506'		FILERA:	JMP	FILERR		;OOPS
   4990					;
   4991					; ONE OF THE NODE/BUFFER REQUESTS FAILED-- GIVE ALL OF THEM BACK AND WAIT
   4992					;
   4993	015626				BUFAIL:	CALL	RETBUF		;RETURN ALL BUFFERS
	015626	004737 	016632'			JSR	PC,RETBUF
   4994	015632					WSIG$S			;WAIT FOR FREE
	015632	012746 				MOV	(PC)+,-(SP)
	015634	   061 	   001 			.BYTE	49.,1
	015636	104375 				EMT	375
   4995					;
   4996					; HERE WHEN A TASK FILE FOUND
   4997					;
   4998					; GET TWO BUFFERS FOR THE HEADER AND LABEL BLOCKS
   4999					;
   5000	015640	012700 	000000G		TSKFND:	MOV	#.BGBUF,R0	;POINT TO BIG FREE SPACE
   5001	015644	012701 	001000 			MOV	#512.,R1	;SET TO GET A BLOCK
   5002	015650					CALL	..ALC2		;GET ONE
	015650	004737 	000000G			JSR	PC,..ALC2
   5003	015654	103764 				BCS	BUFAIL		;FAILED-- RELEASE NODE AND WAIT
   5004	015656	010037 	014610'			MOV	R0,LBLBUF	;OK-- STORE THE ADDRESS FOR LABEL BLOCK BUFFER
   5005	015662	060100 				ADD	R1,R0		;GET END ADDRESS, TOO
   5006	015664	010037 	014612'			MOV	R0,LBLBFE	;SAVE THAT AS END OF BLOCK
   5007	015670	012700 	000000G			MOV	#.BGBUF,R0	;POINT TO BIG FREE LIST HEAD
   5008					;
   5009	015674					CALL	..ALC2		;GET A HEADER BUFFER, TOO
	015674	004737 	000000G			JSR	PC,..ALC2
   5010	015700	103752 				BCS	BUFAIL		;NONE-- GIVE IT ALL AWAY
   5011	015702	010037 	014616'			MOV	R0,HDRBUF	;GOT IT-- SAVE ADDRESS OF BLOCK
   5012	015706	060100 				ADD	R1,R0		;GET END, TOO
   5013	015710	010037 	014620'			MOV	R0,HDRBFE	;SAVE THE END OF HEADER BUFFER
   5014					;
   5015					; DO AN ACCESS FOR READ, WRITE ON THE TASK FILE THAT WE FOUND
   5016					;
   5017	015714	012700 	007000 			MOV	#IO.ACW,R0	;DO AN ACCESS FOR READ,WRITE
   5018	015720	012701 	014622'			MOV	#FILBLK+N.FID,R1 ;FILE BLOCK NOW HAS FILE-ID, SEQ# IN IT
   5019	015724	012702 	015032'			MOV	#ATCBLK,R2	;ATTRRIBUTE CONTROL BLOCK TO GET DISK ADDR OF FILE
   5020	015730	012703 				MOV	(PC)+,R3	;ENABLE
   5021	015732	   000 	   200 			 .BYTE	0,AC.ENA	; ACCESS
   5022	015734	005004 				CLR	R4		;NO FILE-NAME BLOCK NOW
   5023	015736					CALL	FILQIO		;DO THE ACCESS
	015736	004737 	017166'			JSR	PC,FILQIO
   5024	015742	103727 				BCS	FILERA		;NO DICE-- GIVE UP
   5025					;
   5026					; READ THE FIRST LABEL BLOCK AND THE FIRST BLOCK OF THE TASK HEADER
   5027					;
   5028	015744	005037 	014604'			CLR	LBLBLK		;START WITH BLOCK 0 (WILL BUMP TO VBN 1)
   5029	015750					CALL	REDLBL		;READ THE LABEL BLOCK
	015750	004737 	017114'			JSR	PC,REDLBL
   5030	015754	103722 				BCS	FILERA		;ERROR-- REPORT IT
   5031					;
   5032	015756	016137 	000022 	014614'		MOV	L$BHRB(R1),HDRBLK ;GET FIRST BLOCK OF HEADER
   5033	015764					CALL	REDHDR		;READ THE FIRST BLOCK OF THE HEADER
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 64-1
INITIALIZE TASK FILE

	015764	004737 	017052'			JSR	PC,REDHDR
   5034	015770	103714 				BCS	FILERA		;THAT'S-A-NO-GOOD
   5035					;	BR	SETSTD		;OK-- SET UP THE STD
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 65
SETUP STD ENTRY

   5037						.SBTTL	SETUP STD ENTRY
   5038					;
   5039					; WE HAVE THE LABEL BLOCK OF THE TASK FILE AND THE FIRST HEADER BLOCK
   5040					;	R1 --	ADDRESS OF LABEL BLOCK BUFFER
   5041					;	R2 --	ADDRESS OF HEADER BLOCK BUFFER
   5042					;
   5043	015772	013704 	014562'		SETSTD:	MOV	STDADR,R4	;ADDRESS OUR NEW-FOUND STD
   5044					;
   5045	015776	012703 	014554'			MOV	#REQBLK+4,R3	;POINT TO THE REQUEST INFO BLOCK
   5046	016002	022424 				CMP	(R4)+,(R4)+	;MOVE OVER NAME
   5047	016004	022121 				CMP	(R1)+,(R1)+	;(L$BTSK+0) (L$BTSK+2) SKIP OVER TASK NAME IN LABEL BLOCK
   5048					;
   5049					; FIND WHICH PARTITION TO INSTALL THE TASK INTO
   5050					; IF REQUEST DID NOT SPECIFY ONE, USE THE ONE SPECIFIED IN THE TASK FILE
   5051					;
   5052	016006	005713 				TST	(R3)		;PARTITION SPECIFIED IN REQUEST?
   5053	016010	001001 				BNE	20$		;YES-- LOOK FOR THAT ONE
   5054	016012	010103 				MOV	R1,R3		;NO-- (L$BPAR) USE PARTITION FROM TASK FILE
   5055					;
   5056					; FIND THE PARTITION WHERE WE BELONG
   5057					;
   5058	016014	022121 			20$:	CMP	(R1)+,(R1)+	;(L$BPAR+0) (L$BPAR+2) SKIP OVER PARTITION NAME IN LABEL
   5059	016016	012705 	000000G			MOV	#.TPDBA,R5	;START AT BEGINNING OF THE TASK PARTITION DIRECTORY
   5060					;
   5061	016022	026513 	000000G		21$:	CMP	T.PN+0(R5),(R3)	;FIRST HALF OF NAME MATCH?
   5062	016026	001004 				BNE	25$		;NO-- GO ON TO NEXT ENTRY
   5063	016030	026563 	000002G	000002 		CMP	T.PN+2(R5),2(R3) ;YES-- SECOND HALF MATCH?
   5064	016036	001432 				BEQ	PARFND		;YES-- WE FOUND THE PARTITION
   5065					;
   5066	016040	062705 	000000G		25$:	ADD	#T.SZ,R5	;NO-- BUMP TO NEXT ENTRY IN TPD
   5067	016044	020527 	000000G			CMP	R5,#.TPDEA	;ARE WE AT THE END OF THE DIRECTORY?
   5068	016050	103764 				BLO	21$		;NO-- KEEP LOOKING FOR OUR PARTITION
   5069	016052	010324 				MOV	R3,(R4)+	;YES-- PARTITION NOT FOUND-- SAVE ADDR OF NAME FOR ERR
   5070	016054					ERRF	PNF,<PARTITION NOT FOUND>
	000052	   120 	   101 	   122 		 .ASCIZ	\PARTITION NOT FOUND\
	000055	   124 	   111 	   124
	000060	   111 	   117 	   116
	000063	   040 	   116 	   117
	000066	   124 	   040 	   106
	000071	   117 	   125 	   116
	000074	   104 	   000
	016054	012746 	000052'			MOV	#$$$,-(SP)
	016060	004737 	017246'			JSR	PC,TYPMSG
	016064	000416 				 BR	CLSFIL
   5071					;
   5073	016066				IPAERR:	ERRF	IPA,<INVALID PARITITION ADR>
	000076	   111 	   116 	   126 		 .ASCIZ	\INVALID PARITITION ADR\
	000101	   101 	   114 	   111
	000104	   104 	   040 	   120
	000107	   101 	   122 	   111
	000112	   124 	   111 	   124
	000115	   111 	   117 	   116
	000120	   040 	   101 	   104
	000123	   122 	   000
	016066	012746 	000076'			MOV	#$$$,-(SP)
	016072	004737 	017246'			JSR	PC,TYPMSG
	016076	000411 				 BR	CLSFIL
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 65-1
SETUP STD ENTRY

   5075					;
   5076	016100				TTBERR:	ERRF	TTB,<TASK TOO BIG>
	000125	   124 	   101 	   123 		 .ASCIZ	\TASK TOO BIG\
	000130	   113 	   040 	   124
	000133	   117 	   117 	   040
	000136	   102 	   111 	   107
	000141	   000
	016100	012746 	000125'			MOV	#$$$,-(SP)
	016104	004737 	017246'			JSR	PC,TYPMSG
	016110	000404 				 BR	CLSFIL
   5077					;
   5078	016112				TNCERR:	ERR	TNC,<TASK FILE NOT CONTIGUOUS>
	000142	   124 	   101 	   123 		 .ASCIZ	\TASK FILE NOT CONTIGUOUS\
	000145	   113 	   040 	   106
	000150	   111 	   114 	   105
	000153	   040 	   116 	   117
	000156	   124 	   040 	   103
	000161	   117 	   116 	   124
	000164	   111 	   107 	   125
	000167	   117 	   125 	   123
	000172	   000
	016112	012746 	000142'			MOV	#$$$,-(SP)
	016116	004737 	017246'			JSR	PC,TYPMSG
   5079					;
   5080	016122	000575 			CLSFIL:	BR	FILERX		;CLOSE FILE IF FILE OPERN & ERROR
   5081					;
   5082					; PARTITION FOUND-- SAVE THE ADDRESS IN THE STD AND CHECK IT OUT
   5083					;
   5084	016124	010524 			PARFND:	MOV	R5,(R4)+	;(S.TD) SET ADDRESS OF TPD ENTRY
   5085					;
   5086	016126	022121 				CMP	(R1)+,(R1)+		;(L$BFLG) SKIP TASK FLAGS
   5087	016130	005724 				TST	(R4)+		;(S.TF) FLAG TASK TO RETSTE ON EXIT
   5088					;
   5089	016132	112724 	000062 			MOVB	#DEFPRI,(R4)+	;NONE-- USE DEFAULT
   5090					;
   5091	016136	013700 	014602'			MOV	PUDADR,R0	;GET THE ADDRESS WHERE WE FOUND OUR FILE
   5092	016142	012703 	177777 			MOV	#-1,R3		;START THE COUNT AT ZERO
   5093	016146	162700 	000000G			SUB	#.PUDBA,R0	;MAKE R0 INDEX INTO PUD
   5094	016152	005203 			30$:	INC	R3		;BUMP THE INDEX
   5095	016154	162700 	000050 			SUB	#U.SZ,R0	;DIVIDE PUD ADDRESS
   5096	016160	002374 				BGE	30$		; BY THE ENTRY SIZE
   5097	016162	110324 				MOVB	R3,(R4)+	;(S.DI) SYSTEM DISK INDICATOR
   5098					;
   5099	016164	016524 	000000G			MOV	T.BA(R5),(R4)+	;(S.BA) BASE ADDRESS OF TASK (NO KT-11)
   5103	016170	012114 				MOV	(R1)+,(R4)	;(L$BLDZ) (S.LZ) LOAD SIZE OF TASK
   5104	016172	006314 				ASL	(R4)		;MAKE IT REAL ADDRESS (*64)
   5105	016174	006314 				ASL	(R4)		; . .
   5106	016176	006314 				ASL	(R4)		; . .
   5107	016200	006314 				ASL	(R4)		; . .
   5108	016202	006314 				ASL	(R4)		; . .
   5109	016204	006324 				ASL	(R4)+		; . .
   5111	016206	012114 				MOV	(R1)+,(R4)	;(L$BMXZ) (S.MZ) MAXIMUM SIZE OF TASK
   5113	016210	006314 				ASL	(R4)		;MAKE REAL ADDRESS (*64)
   5114	016212	006314 				ASL	(R4)		; . .
   5115	016214	006314 				ASL	(R4)		; . .
   5116	016216	006314 				ASL	(R4)		; . .
   5117	016220	006314 				ASL	(R4)		; . .
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 65-2
SETUP STD ENTRY

   5118	016222	006314 				ASL	(R4)		; . .
   5120	016224	026524 	000000G			CMP	T.PZ(R5),(R4)+	;WILL TASK FIT IN PARTITION SPECIFIED?
   5121	016230	103723 				BLO	TTBERR		;NO-- DON'T TRY TO INSTALL IT
   5123	016232	026521 	000000G			CMP	T.BA(R5),(R1)+	;(L$BSA) IS TASK ADDRESS SAME AS PARTITION ADDRESS?
   5124	016236	001313 				BNE	IPAERR		;NO-- DON'T INSTALL IT
   5128					;
   5129	016240	016224 	000076 			MOV	H.IPC(R2),(R4)+	;(S.PC) SET INTIAL PC FROM HEADER
   5130	016244	016224 	000100 			MOV	H.ISP(R2),(R4)+	;(S.SP) ALSO INITIAL SP
   5131	016250	022424 				CMP	(R4)+,(R4)+	;MOVE OVER SEND/REQUEST LISTHEAD
   5132	016252	005024 				CLR	(R4)+		;(S.SS) SST VECTOR TABLE ADDRESS
   5133					;
   5134	016254	013714 	014656'			MOV	FILADR+0,(R4)	;(S.DL+0) DISK ADDRESS OF TASK IMAGE
   5135	016260	012400 				MOV	(R4)+,R0	;COPY IT IN CASE IT'S ZERO
   5136	016262	013714 	014660'			MOV	FILADR+2,(R4)	;(S.DL+2) SECOND HALF OF DISK ADDRESS
   5137	016266	051400 				BIS	(R4),R0		;WERE BOTH WORDS ZERO?
   5138	016270	001710 				BEQ	TNCERR		;YES-- TASK FILE IS NOT CONTIGUOUS
   5139	016272	062114 				ADD	(R1)+,(R4)	;(L$BHRB) + RELATIVE BLOCK IN FILE= REAL ADDRESS
   5140	016274	005544 				ADC	-(R4)		;ADD THE CARRY BACK TO HIGH ORDER WORD
   5141					;
   5142	016276	012137 	014606'			MOV	(R1)+,LBLNUM	;(L$BBLK) SAVE # BLOCKS IN LABEL GROUP FOR LATER
   5143					;	BR	SETLUN		;NOW SET UP THE LUN'S
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 66
SETUP LOGICAL UNIT TABLE FOR TASK

   5145						.SBTTL	SETUP LOGICAL UNIT TABLE FOR TASK
   5146					;
   5147					; LOOP THROUGH SECOND AND THIRD LABEL BLOCKS FOR ALL 255 LUNS
   5148					;	R2 --	ADDRESS OF HEADER BLOCK BUFFER
   5149					;
   5150	016302	062702 	000130 		SETLUN:	ADD	#H.NLUN,R2	;POINT TO # LUNS, AND LUN TABLE IN HEADER
   5151	016306	012205 				MOV	(R2)+,R5	;(H.NLUN) GET # LUNS TO SET UP, POINT TO LUN TABLE IN HEADER
   5152	016310	001471 				BEQ	80$		;NONE-- JUST CLOSE FILE
   5153	016312	013701 	014612'			MOV	LBLBFE,R1	;FORCE READ OF NEXT LABEL BLOCK
   5154					;
   5155					; SEE IF WE MUST WRITE OUT THIS BLOCK AND READ NEXT BLOCK OF HEADER
   5156					;
   5157	016316				10$:	CALL	NXTHDR		;GO ON TO NEXT BLOCK?
	016316	004737 	017036'			JSR	PC,NXTHDR
   5158	016322	103471 				BCS	FILERR		;FAILED
   5159					;
   5160					; SEE IF WE NEED TO READ ANOTHER LABEL BLOCK
   5161					;
   5162	016324	020137 	014612'		20$:	CMP	R1,LBLBFE	;HAVE WE FINISHED THIS LABEL BLOCK?
   5163	016330	103410 				BLO	30$		;NO-- JUST GET ANOTHER ENTRY FROM IT
   5164	016332	005004 				CLR	R4		;YES-- ASSUME NO MORE TO DO
   5165	016334	023737 	014604'	014606'		CMP	LBLBLK,LBLNUM	;HAVE WE RUN OUT OF LABEL BLOCKS?
   5166	016342	002043 				BGE	60$		;YES-- READ NO MORE-- JUST ZERO
   5167	016344					CALL	REDLBL		;YES-- READ NEXT ONE
	016344	004737 	017114'			JSR	PC,REDLBL
   5168	016350	103456 				BCS	FILERR		;SPLAT
   5169					;
   5170					; FIND THE PUD ADDRESS OF THE DEVICE FROM THE LABEL BLOCK
   5171					;
   5172	016352	005711 			30$:	TST	(R1)		;IS THIS A ZERO ENTRY?
   5173	016354	001434 				BEQ	40$		;YES-- JUST STORE ZERO
   5174	016356	013704 	014602'			MOV	PUDADR,R4	;ASSUME DEVICE OV
   5175	016362	022711 	053117 			CMP	#"OV,(R1)	;THIS OVERLAY DEVICE?
   5176	016366	001430 				BEQ	50$		;YES-- WE HAVE PUD ADDRESS
   5177					;
   5178	016370	012704 	000000G		31$:	MOV	#.PUDBA,R4	;NO-- START SEARCHING THROUGH THE PUD
   5179					;
   5180	016374	021164 	000000G		33$:	CMP	(R1),U.DN(R4)	;THIS OUR DEVICE?
   5181	016400	001004 				BNE	35$		;NO-- TRY ANOTHER ONE
   5182	016402	126164 	000002 	000000G		CMPB	2(R1),U.UN(R4)	;YES-- RIGHT UNIT #
   5183	016410	001417 				BEQ	50$		;YES-- WE HAVE PUD ADDRESS IN R4
   5184					;
   5185	016412	062704 	000050 		35$:	ADD	#U.SZ,R4	;NO-- BUMP TO NEXT PUD ENTRY
   5186	016416	020427 	000000G			CMP	R4,#.PUDEA	;END OF PUD YET?
   5187	016422	103764 				BLO	33$		;NO-- LOOK AT THIS ENTRY
   5188					;
   5189	016424	012704 	015046'			MOV	#CNVTBL,R4	;ENTRY NOT FOUND-- SEE IF CONVERTIBLE DEVICE
   5190					;
   5191	016430	022411 			37$:	CMP	(R4)+,(R1)	;DEVICE MATCH?
   5192	016432	001403 				BEQ	38$		;YES-- GET THE CONVERTED NAME AND GO AWAY
   5193	016434	005724 				TST	(R4)+		;NO-- IS THIS END OF TABLE?
   5194	016436	001374 				BNE	37$		;NO-- KEEP ON LOOKING
   5195	016440	000402 				BR	40$		;YES-- DEVICE NOT FOUND-- STORE 0
   5196					;
   5197	016442	011411 			38$:	MOV	(R4),(R1)	;DEVICE FOUND IN CONVERSION TABLE--
   5198	016444	000751 				BR	31$		; SAVE AS NEW DEVICE AND SCAN PUD FOR IT
   5199					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 66-1
SETUP LOGICAL UNIT TABLE FOR TASK

   5200	016446	005004 			40$:	CLR	R4		;ENTRY NOT FOUND-- CLEAR THE PUD ADDRESS
   5201					;
   5202	016450	022121 			50$:	CMP	(R1)+,(R1)+	;SKIP OVER ENTRY IN LABEL BLOCK
   5203					;
   5204	016452	010422 			60$:	MOV	R4,(R2)+	;STORE THE PUD ADDRESS IN LUT IN HEADER
   5205	016454					CALL	NXTHDR		;SEE IF WE NEED ANOTHER HEADER BLOCK
	016454	004737 	017036'			JSR	PC,NXTHDR
   5206	016460	103412 				BCS	FILERR		;I/O ERROR-- GIVE UP
   5207	016462	005022 				CLR	(R2)+		;CLEAR SECOND WORD OF HEADER ENTRY
   5208					;
   5209	016464	077564 				SOB	R5,10$		;LOOP FOR ALL LUNS IN HEADER
   5210	016466					CALL	WRTHDR		;WRITE OTU THE LAST HEADER BLOCK
	016466	004737 	017064'			JSR	PC,WRTHDR
   5211	016472	103405 				BCS	FILERR		;FAILED
   5212					;
   5213					; ALL DONE WITH THE TASK FILE-- CLOSE IT UP
   5214					;
   5215	016474				80$:	CALL	RETBUF		;RETURN THE BUFFERS
	016474	004737 	016632'			JSR	PC,RETBUF
   5216	016500					CALL	FILCLS		;CLOSE THE FILE
	016500	004737 	017154'			JSR	PC,FILCLS
   5217	016504	103075 				BCC	REQTSK		;OK-- GO PUT US IN THE STD
   5218					;
   5219					; ALL FILE I/O ERRORS END UP HERE
   5220					;
   5221	016506				FILERR:	ERR	IOE,<WRITE LOCKED DEVICE OR I/O ERROR ON TASK FILE>
	000173	   127 	   122 	   111 		 .ASCIZ	\WRITE LOCKED DEVICE OR I/O ERROR ON TASK FILE\
	000176	   124 	   105 	   040
	000201	   114 	   117 	   103
	000204	   113 	   105 	   104
	000207	   040 	   104 	   105
	000212	   126 	   111 	   103
	000215	   105 	   040 	   117
	000220	   122 	   040 	   111
	000223	   057 	   117 	   040
	000226	   105 	   122 	   122
	000231	   117 	   122 	   040
	000234	   117 	   116 	   040
	000237	   124 	   101 	   123
	000242	   113 	   040 	   106
	000245	   111 	   114 	   105
	000250	   000
	016506	012746 	000173'			MOV	#$$$,-(SP)
	016512	004737 	017246'			JSR	PC,TYPMSG
   5222	016516				FILERX:	CALL	FILCLS		;GIVE CLOSE A TRY
	016516	004737 	017154'			JSR	PC,FILCLS
   5223					;
   5224	016522	012746 	017012'		RETNOD:	MOV	#ALLDON,-(SP)	;RETURN ALL BUFFERS AND STD NODE
   5225	016526					.INH0			;;OTHER ERROR-- MUST REMOVE TASK FROM THE STD
	016526	013746 	177776 			MOV	@#PS,-(SP)
	016532	112737 	000140 	177776 		MOVB	#140,@#PS
   5226	016540	012701 	014550'			MOV	#REQBLK,R1	;FIND THE STD OF THIS TASK
   5227	016544					CALL	..FSTD
	016544	004737 	000000G			JSR	PC,..FSTD
   5228	016550	001015 				BNE	60$		;CAN'T FIND IT?????
   5229	016552	162737 	000002 	000000G		SUB	#2,.STDTZ	;;ONE LESS ENTRY IN THE STD NOW
   5230	016560	013705 	000000G			MOV	.STDTZ,R5	;; SO GET NEW LENGTH
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 66-2
SETUP LOGICAL UNIT TABLE FOR TASK

   5231	016564	063705 	000000G			ADD	.STDTA,R5	;;MAKE ADDRESS OF LAST ENTRY IN THE TABLE
   5232	016570	005743 				TST	-(R3)		;;BACK UP THE POINTER
   5233					;
   5234	016572	020305 			50$:	CMP	R3,R5		;;AT END OF TABLE YET?
   5235	016574	101003 				BHI	60$		;;YES-- ALL DONE
   5236	016576	016323 	000002 			MOV	2(R3),(R3)+	;;NO-- MOVE ANOTHER ENTRY DOWN
   5237	016602	000773 				BR	50$		;;LOOP TO MOVE WHOLE TABLE DOWN
   5238					;
   5239	016604				60$:	.ENB0			;;RESTORE TASK SWITCHING
	016604	004737 	000000G			JSR	PC,..ENB0
   5240					;
   5241					; RETALL -- RETURN ALL BUFFERS AND STD NODE
   5242					;
   5243	016610	013701 	014562'		RETALL:	MOV	STDADR,R1	;GET THE STD ADDRESS
   5244	016614	001406 				BEQ	RETBUF		;NONE-- JUST RETURN THE BUFFERS
   5245	016616	012704 	000000G			MOV	#.POLLH,R4	;ADD IT TO THE FREE POOL
   5246	016622					CALL	..NADD		;PUT IT BACK
	016622	004737 	000000G			JSR	PC,..NADD
   5247	016626	005037 	014562'			CLR	STDADR		;NO MORE STD NODE
   5248					;
   5249	016632	012701 	001000 		RETBUF:	MOV	#512.,R1	;SET TO RETURN A BLOCK
   5250	016636	012703 	000000G			MOV	#.BGBUF,R3	; TO THE BIG BUFFER LIST HEAD
   5251	016642	013700 	014610'			MOV	LBLBUF,R0	;GET ADDRESS OF LABEL BLOCK BUFFER
   5252	016646	001402 				BEQ	20$		;NONE-- TRY HEADER BUFFER
   5253	016650					CALL	..DEC2		;DE-ALLOCATE THE BUFFER
	016650	004737 	000000G			JSR	PC,..DEC2
   5254					;
   5255	016654	013700 	014616'		20$:	MOV	HDRBUF,R0	;ALSO THE HEADER BUFFER
   5256	016660	001402 				BEQ	CLRBUF		;NONE-- JUST CLEAN UP
   5257	016662					CALL	..DEC2		;DE-ALLOCATE THE HEADER BUFFER
	016662	004737 	000000G			JSR	PC,..DEC2
   5258					;
   5259	016666	005037 	014610'		CLRBUF:	CLR	LBLBUF		;NO MORE LABEL BUFFER
   5260	016672	005037 	014616'			CLR	HDRBUF		; OR HEADER BUFFER
   5261	016676					RETURN			;THAT'S IT
	016676	000207 				RTS	PC
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 67
RE-REQUEST TASK

   5263						.SBTTL	RE-REQUEST TASK
   5264					;
   5265					; TASK REQUEST BLOCK IS STILL SET UP FROM CALL
   5266					;
   5267	016700				REQTSK:	.INH0			;INHIBIT TASK SWITCHING
	016700	013746 	177776 			MOV	@#PS,-(SP)
	016704	112737 	000140 	177776 		MOVB	#140,@#PS
   5268	016712	013704 	014562'			MOV	STDADR,R4	;FIND STD ADDRESS
   5269	016716	042764 	040001 	000000G		BIC	#SF.TA!SF.IR,S.FW(R4)	;CLEAR ACTIVE BIT SO IT CAN BE REQUESTED
   5270	016724	012700 	014550'			MOV	#REQBLK,R0
   5271	016730					RQST$S	R0,,REQBLK+10	;RE-REQUEST TASK
	016730	005046 				CLR	-(SP)
	016732	013746 	014560'			MOV	REQBLK+10,-(SP)
	016736	005046 				CLR	-(SP)
	016740	005046 				CLR	-(SP)
	016742	016046 	000002 			MOV	2(R0),-(SP)
	016746	011046 				MOV	(R0),-(SP)
	016750	012746 				MOV	(PC)+,-(SP)
	016752	   013 	   007 			.BYTE	11.,7
	016754	104375 				EMT	375
   5272	016756					.ENB0			;ENABLE TASK SWITCHING
	016756	004737 	000000G			JSR	PC,..ENB0
   5273	016762	005737 	000000G			TST	$DSW		;SUCCESS/FAILURE?
   5274	016766	100011 				BPL	ALLDON		;SUCCESS -- ALL OK
   5275					;
   5276					; REQUEST FAILED-- IF TASK ALREADY ACTIVE, THAT'S OK
   5277					;
   5278	016770	023727 	000000G	177771 		CMP	$DSW,#IE.ACT	;TASK ALREADY ACTIVE?
   5279	016776	001405 				BEQ	ALLDON		;YES-- WE ARE HAPPY
   5280					;
   5281	017000					ERRN	TRF,<TASK REQUEST FAILED>
	000251	   124 	   101 	   123 		 .ASCIZ	\TASK REQUEST FAILED\
	000254	   113 	   040 	   122
	000257	   105 	   121 	   125
	000262	   105 	   123 	   124
	000265	   040 	   106 	   101
	000270	   111 	   114 	   105
	000273	   104 	   000
	017000	012746 	000251'			MOV	#$$$,-(SP)
	017004	004737 	017246'			JSR	PC,TYPMSG
	017010	000644 				 BR	RETNOD
   5282					;
   5283					; ALL DONE-- GO BACK TO WAITING
   5284					;
   5285	017012	000137 	015072'		ALLDON:	JMP	INSTAL		;RETURN AND EXIT IF NO MORE TO DO
   5286					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 68
TASK FILE I/O ROUTINES

   5288						.SBTTL	TASK FILE I/O ROUTINES
   5289					;
   5290					; FILFNA -- DO A 'FIND NAME IN DIRECTORY' FUNCTION TO FIND A FILE
   5291					;	FILBLK --	FILE-NAME BLOCK SET UP FOR DESIRED FILE
   5292					;
   5293	017016	012700 	004400 		FILFNA:	MOV	#IO.FNA,R0	;DO A FIND FILE IN DIRECTORY
   5294	017022	005001 				CLR	R1		;NO FILE-ID
   5295	017024	005002 				CLR	R2		;NO ATTRIBUTES
   5296	017026	005003 				CLR	R3		;NO ACCESS
   5297	017030	012704 	014622'			MOV	#FILBLK,R4	;SET TO DO IT TO THE RIGHT FILE
   5298	017034	000454 				BR	FILQIO		;GO DO IT AND RETURN
   5299					;
   5300					; NXTHDR -- ROUTINE TO WRITE OUT CURRENT HEADER BLOCK AND READ NEXT ONE
   5301					;		IF AT END OF BLOCK.
   5302					;	R2 -- POINTER TO HEADER BUFFER (HDR). UPDATED TO HDR+0 IF END OF BLOCK
   5303					;
   5304	017036	023702 	014620'		NXTHDR:	CMP	HDRBFE,R2	;END OF HEADER BUFFER?
   5305	017042	101023 				BHI	RETXXX		;NO-- JUST RETURN
   5306	017044					CALL	WRTHDR		;YES-- WRITE OUT OLD HEADER
	017044	004737 	017064'			JSR	PC,WRTHDR
   5307	017050	103420 				BCS	RETXXX		;ERROR-- RETURN WITH IT
   5308					;	BR	REDHDR		;READ THE NEXT ONE
   5309					;
   5310					; REDHDR -- READ NEXT HEADER BLOBK
   5311					;
   5312	017052	005237 	014614'		REDHDR:	INC	HDRBLK		;BUMP TO NEXT BLOCK OF HEADER
   5313	017056	012700 	010400 			MOV	#IO.RVB,R0	;DO A READ
   5314	017062	000402 				BR	RWRHDR		;DO IT TO HEADER BLOCK
   5315					;
   5316					; WRTHDR -- WRITE CURRENT HEADER BLOCK
   5317					;
   5318	017064	012700 	011000 		WRTHDR:	MOV	#IO.WVB,R0	;DO A WRITE
   5319					;	BR	RWRHDR		;READ/WRITE A BLOCK
   5320					;
   5321					; RWRHDR -- READ/WRITE HEADER BLOCK
   5322					;	R0 -- READ/WRTIE FUNCTION CODE
   5323					;
   5324	017070				RWRHDR:	PUSH	R1		;SAVE THE LABEL POINTER
	017070	010146 				MOV	R1,-(SP)
   5325	017072	013701 	014616'			MOV	HDRBUF,R1		;POINT TO HEADER BUFFER
   5326	017076	013703 	014614'			MOV	HDRBLK,R3	;SET PROPER VBN
   5327	017102					CALL	RWRBLK		;DO A BLOCK
	017102	004737 	017146'			JSR	PC,RWRBLK
   5328	017106	010102 				MOV	R1,R2		;POINT R2 TO HDR BUFFER
   5329	017110					POP	R1		;RESTORE LABEL POINTER
	017110	012601 				MOV	(SP)+,R1
   5330	017112				RETXXX:	RETURN			;WITH CC-C SET/CLEAR BY RWRBLK
	017112	000207 				RTS	PC
   5331					;
   5332					; REDLBL -- READ NEXT LABEL BLOCK
   5333					;
   5334	017114				REDLBL:	PUSH	R2		;SAVE THE HEADER POINTER
	017114	010246 				MOV	R2,-(SP)
   5335	017116	012700 	010400 			MOV	#IO.RVB,R0	;DO A READ
   5336	017122	013701 	014610'			MOV	LBLBUF,R1		; TO THE LABEL BUFFER
   5337	017126	005237 	014604'			INC	LBLBLK		;BUMP TO NEXT LABEL BLOCK
   5338	017132	013703 	014604'			MOV	LBLBLK,R3	; AND SAVE AS VBN TO READ
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 68-1
TASK FILE I/O ROUTINES

   5339	017136					CALL	RWRBLK		;READ THE BLOCK
	017136	004737 	017146'			JSR	PC,RWRBLK
   5340	017142					POP	R2		;RESTORE THE HEADER POINTER
	017142	012602 				MOV	(SP)+,R2
   5341	017144					RETURN			;CC-C SET/CLEAR BY RWRBLK, R1 POINTS TO LBL BUFFER
	017144	000207 				RTS	PC
   5342					;
   5343					; RWRBLK -- READ/WRITE A BLOCK
   5344					;	R0 --	READ/WRITE FUNCTION CODE
   5345					;	R1 --	ADDRESS OF BUFFER
   5346					;	R3 --	VIRTUAL BLOCK NUMBER IN TASK FILE
   5347					;
   5348	017146	012702 	001000 		RWRBLK:	MOV	#512.,R2	;SET TO READ ONE BLOCK
   5349	017152	000405 				BR	FILQIO		;DO IT TO TASK FILE
   5350					;
   5351					; FILCLS -- DE-ACCESS THE TASK FILE
   5352					;
   5353	017154	012700 	010000 		FILCLS:	MOV	#IO.DAC,R0	;DE-ACCESS FUNCTION
   5354	017160	005001 				CLR	R1		;NO FILE-ID BLOCK
   5355	017162	005002 				CLR	R2		;NO ATTRIBUTES ALLOWED
   5356	017164	005004 				CLR	R4		;NO FILE-NAME BLOCK EITHER
   5357					;	BR	FILQIO		;DO IT TO TASK FILE
   5358					;
   5359					; FILQIO -- PERFORM QUEUE I/O FUNCTION ON THE TASK FILE
   5360					;	R0 --	FUNCTION CODE
   5361					;	R1 --	PARAMETER #1 (FILE-ID BLOCK OR BUFFER ADDRESS)
   5362					;	R2 --	PARAMETER #2 (ATTRIBUTE CONTROL BLOCK OR BUFFER LENGTH)
   5363					;	R3 --	PARAMETER #5 (ACCESS CONTROL OR VIRTUAL BLOCK NUMBER)
   5364					;	R4 --	PARAMETER #6 (FILENAME BLOCK)
   5365					;
   5366					; CC-C CLEAR IF SUCCESS, SET IF FAILURE.
   5367					;
   5368	017166				FILQIO:	QIOW$S	R0,#TSKLUN,#E.FQIO,,#QIOSTS,,<R1,R2,,,R3,R4>
	017166	010446 				MOV	R4,-(SP)
	017170	010346 				MOV	R3,-(SP)
	017172	005046 				CLR	-(SP)
	017174	005046 				CLR	-(SP)
	017176	010246 				MOV	R2,-(SP)
	017200	010146 				MOV	R1,-(SP)
	017202	005046 				CLR	-(SP)
	017204	012746 	014662'			MOV	#QIOSTS,-(SP)
	017210	005046 				CLR	-(SP)
	017212	112716 	000001 			MOVB	#E.FQIO,(SP)
	017216	012746 	000002 			MOV	#TSKLUN,-(SP)
	017222	010046 				MOV	R0,-(SP)
	017224	012746 				MOV	(PC)+,-(SP)
	017226	   003 	   014 			.BYTE	3,$$$T1
	017230	104375 				EMT	375
   5369	017232	103404 				BCS	90$		;GIVE UP
   5370					;
   5371	017234	105737 	014662'		30$:	TSTB	QIOSTS+0	;I/O SUCCESSFUL?
   5372	017240	002001 				BGE	90$		;YES-- JUST RETURN WITH CC-C CLEAR
   5373					;
   5374	017242	000261 			80$:	SEC			;NO-- RETURN ERROR
   5375	017244				90$:	RETURN			;RETURN FROM FILQIO
	017244	000207 				RTS	PC
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 69
ERROR PROCESSING

   5377						.SBTTL	ERROR PROCESSING
   5378					;
   5379					; TYPMSG -- TYPE A MESSAGE
   5380					;
   5381					; CALL:	PUSH	#<ADDRESS OF ASCIZ TEXT>
   5382					;	CALL	TYPMSG
   5383					;
   5384	017246				TYPMSG:	PUSH	<R0,R1,R2,R3,R4> ;SAVE USED REGISTERS
	017246	010046 				MOV	R0,-(SP)
	017250	010146 				MOV	R1,-(SP)
	017252	010246 				MOV	R2,-(SP)
	017254	010346 				MOV	R3,-(SP)
	017256	010446 				MOV	R4,-(SP)
   5385	017260	012704 	014666'			MOV	#TYPBUF,R4	;SET ADDRESS OF TYPEOUT BUFFER
   5386	017264	012703 	017556'			MOV	#INSMSG,R3	;GET 'INS --'
   5387	017270					CALL	PUTSTR		;PUT IT IN STRING
	017270	004737 	017450'			JSR	PC,PUTSTR
   5388	017274	016603 	000014 			MOV	14(SP),R3	;GET ADDRESS OF THE TEXT TO TYPE
   5389	017300					CALL	PUTSTR		;TYPE IT
	017300	004737 	017450'			JSR	PC,PUTSTR
   5390	017304	012703 	017570'			MOV	#TSKMSG,R3	;GET 'TSK= '
   5391	017310					CALL	PUTSTR		;PUT IT TOO
	017310	004737 	017450'			JSR	PC,PUTSTR
   5392	017314	012703 	014550'			MOV	#REQBLK,R3	;POINT TO .RAD50 /TASK-NAME/
   5393	017320					CALL	PUTR50		;PUT IT IN THERE, TOO
	017320	004737 	017460'			JSR	PC,PUTR50
   5394	017324	013702 	014562'			MOV	STDADR,R2	;GET THE ADDRESS OF THE STD
   5395	017330	016202 	000000G			MOV	S.TD(R2),R2	;GET ADDRESS OF .RAD50/PARTITION/
   5396	017334	001407 				BEQ	20$		;NONE-- SKIP THIS
   5397	017336	012703 	017577'			MOV	#PARMSG,R3	;SAY 'PAR= '
   5398	017342					CALL	PUTSTR		; . .
	017342	004737 	017450'			JSR	PC,PUTSTR
   5399	017346	010203 				MOV	R2,R3		;GET THE NAME ADDRESS
   5400	017350					CALL	PUTR50		;PUT IT IN STRING
	017350	004737 	017460'			JSR	PC,PUTR50
   5401					;
   5402	017354	112724 	000012 		20$:	MOVB	#12,(R4)+	;STORE LF
   5403	017360	112724 	000015 			MOVB	#15,(R4)+	;STORE CR
   5404	017364	012700 	014666'			MOV	#TYPBUF,R0	;GET ADDRESS OF BUFFER BACK
   5405	017370	160004 				SUB	R0,R4		;COMPUTE LENGTH OF STRING
   5406	017372					QIOW$S	#IO.WLB,#CTYLUN,#E.FQIO,,,,<R0,R4,#40>
	017372	012746 	000040 			MOV	#40,-(SP)
	017376	010446 				MOV	R4,-(SP)
	017400	010046 				MOV	R0,-(SP)
	017402	005046 				CLR	-(SP)
	017404	005046 				CLR	-(SP)
	017406	005046 				CLR	-(SP)
	017410	112716 	000001 			MOVB	#E.FQIO,(SP)
	017414	012746 	000001 			MOV	#CTYLUN,-(SP)
	017420	012746 	000400 			MOV	#IO.WLB,-(SP)
	017424	012746 				MOV	(PC)+,-(SP)
	017426	   003 	   011 			.BYTE	3,$$$T1
	017430	104375 				EMT	375
   5407	017432					POP	<R4,R3,R2,R1,R0> ;RESTORE THE REGISTERS
	017432	012604 				MOV	(SP)+,R4
	017434	012603 				MOV	(SP)+,R3
	017436	012602 				MOV	(SP)+,R2
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 69-1
ERROR PROCESSING

	017440	012601 				MOV	(SP)+,R1
	017442	012600 				MOV	(SP)+,R0
   5408	017444					POP	(SP)		;RESTORE PC OVER MESSAGE ADDRESS
	017444	012616 				MOV	(SP)+,(SP)
   5409	017446					RETURN			;THAT'S IT FOR TYPMSG
	017446	000207 				RTS	PC
   5410					;
   5411					; PUTSTR -- PUT STRING IN TYPE-OUT BUFFER
   5412					;	R3 --	ADDRESS OF ASCIZ STRING
   5413					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5414					;
   5415	017450	112324 			PUTSTR:	MOVB	(R3)+,(R4)+	;COPY A CHARACTER
   5416	017452	001376 				BNE	PUTSTR		; UNTIL ASCIZ
   5417	017454	105744 				TSTB	-(R4)		;BACK OVER ZERO BYTE
   5418	017456					RETURN			;RETURN FROM PUTSTR
	017456	000207 				RTS	PC
   5419					;
   5420					; PUTR50 -- PUT RADIX 50 NAME IN TYPE-OUT BUFFER
   5421					;	R3 --	ADDRESS OF TWO-WORD RADIX 50 BLOCK
   5422					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5423					;
   5424	017460	012300 			PUTR50:	MOV	(R3)+,R0	;GET FIRST 3 CHARS
   5425	017462					CALL	PUTR51		;TYPE 'EM
	017462	004737 	017470'			JSR	PC,PUTR51
   5426	017466	012300 				MOV	(R3)+,R0	;GET NEXT THREE CHARS
   5427					;	BR	PUTR51		;PUT THEM, TOO
   5428					;
   5429					; PUTR51 -- PUT 3 RADIX 50 CHARACTERS IN TYPE-OUT BUFFER
   5430					;	R0 --	RADIX 50 TEXT
   5431					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5432					;
   5433	017470	012702 	017532'		PUTR51:	MOV	#T50TBL,R2	;POINT TO TABLE OF DIVISORS
   5434					;
   5435	017474	012201 			20$:	MOV	(R2)+,R1	;GET NEXT DIVISOR
   5436	017476	001414 				BEQ	90$		;THREE HAVE BEEN DONE-- RETURN
   5437	017500					CALL	$DIV		;DIVIDE CURRENT TEXT BY 50**N
	017500	004737 	000032'			JSR	PC,$DIV
   5438	017504					PUSH	R1		;SAVE THE REMAINDER
	017504	010146 				MOV	R1,-(SP)
   5439	017506	012701 	017542'			MOV	#R50TBL,R1	;POINT TO CONVERSION TABLE
   5440					;
   5441	017512	061100 			30$:	ADD	(R1),R0		;CONVERT THE CHARACTER
   5442	017514	105721 				TSTB	(R1)+		;SKIP THE BYTE
   5443	017516	120021 				CMPB	R0,(R1)+	;HAVE WE FOUND THE CHAR YET?
   5444	017520	103774 				BLO	30$		;NO-- LOOP UNTIL WE DO
   5445					;
   5446	017522	110024 				MOVB	R0,(R4)+	;YES-- SAVE THE CHAR IN TEXT
   5447	017524					POP	R0		;RESTORE LAST REMAINDER AS NEW DIVIDEND
	017524	012600 				MOV	(SP)+,R0
   5448	017526	000762 				BR	20$		;GET ANOTHER CHARACTER
   5449					;
   5450	017530				90$:	RETURN			;FROM PUTR50/PUTR51
	017530	000207 				RTS	PC
   5451					;
   5452	017532	003100 	000050 	000001 	T50TBL:	.WORD	50*50,50,1,0	;TABLE OF DIVISORS
	017540	000000
   5453					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 69-2
ERROR PROCESSING

   5454	017542	   022 	   060 		R50TBL:	.BYTE	<'0-36>-<50-50>,'0 ;36-47: 0-9
   5455	017544	   366 	   045 			.BYTE	<'%-35>-<'0-36>,'% ;35   : %
   5456	017546	   012 	   056 			.BYTE	<'.-34>-<'%-35>,'. ;34   : .
   5457	017550	   367 	   044 			.BYTE	<'$-33>-<'.-34>,'$ ;33   : $
   5458	017552	   067 	   101 			.BYTE	<'A-01>-<'$-33>,'A ;01-32: A-Z
   5459	017554	   340 	   040 			.BYTE	<' -00>-<'A-01>,'  ;00   : <SPACE>
   5460						.EVEN
   5461					;
   5462	017556	   015 	   012 	   111 	INSMSG:	.ASCIZ	<15><12>/INS -- /
	017561	   116 	   123 	   040
	017564	   055 	   055 	   040
	017567	   000
   5463	017570	   040 	   040 	   124 	TSKMSG:	.ASCIZ	/  TSK=/
	017573	   123 	   113 	   075
	017576	   000
   5464	017577	   040 	   120 	   101 	PARMSG:	.ASCIZ	/ PAR=/
	017602	   122 	   075 	   000
   5465						.EVEN
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 70
END STATEMENT

   5467						.SBTTL	END STATEMENT
   5468		000001 				       .END
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 70-1
SYMBOL TABLE

AC.ENA= 000200   	CDSIEN= 000100   	DBINI   000512R  	DRY   = 000200   	EF.CRB= 000010
ADRSAV= ****** GX	CDSNXM= 001000   	DBIOD   000370R  	DR.DTE= 000011   	EF.CRC= 000001
ALLDON  017012R  	CDSOFL= 010000   	DCK   = 100000   	DSEND = 000004   	EF.CRD= 000002
AOE   = 001000   	CDSPAK= 000002   	DCOMST= 000001   	DS04  = 004000   	EF.CRS= 000004
ATCBLK  015032R  	CDSPWC= 000400   	DD.CHI= 000002   	DS05  = 002000   	EF.IOD= ****** GX
A.EF  = 000020   	CDSRCK= 040000   	DD.HEM= 000010   	DS06  = 001000   	EF.LPC= 000002
A.HA  = ****** GX	CDSRDY= 000200   	DD.LER= 000010   	DTE   = 010000   	EF.LPD= 000001
BCFHDS  011336R  	CDSRED= 000001   	DD.OVF= 000020   	DTECMD= 000451   	EF.LPQ= 000004
BCFILF  011272R  	CDST  = ****** GX	DD.PCK= 000002   	DTEFLG= 000444   	EF.LPS= 000020
BCFLDR  011356R  	CDSTOL= 000010   	DD.PGZ= 000001   	DTEF11= 000450   	EF.LPW= 000040
BCFLDV  011364R  	CHNPNT= 000001   	DD.RCK= 000001   	DTEMTD= 000455   	EF.NIR= ****** GX
BCFRDS  011272R  	CHRINT= 020000   	DD.RME= 000040   	DTEMTI= 000456   	EF.QIO= 000001
BCFSDO  011316R  	CLIOD   000374R  	DD.SCK= 000004   	DUNS    000460R  	EF.SEP= 100000
BCFSTR  011400R  	CLRBUF  016666R  	DD.SFL= 000020   	DUPE  = 000020   	EF.TEF= 000400
BCFTAB  011254R  	CLSFIL  016122R  	DD.VFE= 000004   	DURE  = 000004   	EMPTY = 000003
BC.HDS= ****** GX	CNUPE = 000002   	DEFPRI= 000062   	DVA   = 004000   	EPTR  = 000000
BC.LDR= ****** GX	CNVTBL  015046R  	DELHLD= 002000   	DV.EOF= 000040   	ERMHER  010163R
BC.LDV= ****** GX	CPE   = 000010   	DEMTIM= 000002   	DV.F11= 000400   	ERMHNG  010200R
BC.RDS= ****** GX	CRBFLN= ****** GX	DEP   = 010000   	DV.HNG= 001000   	ERMNXD  010111R
BC.SDS= ****** GX	CRBUFF= ****** GX	DEX   = 000400   	DV.IOP= 000020   	ERMOFL  010131R
BC.STR= ****** GX	CRCEVF= ****** GX	DEXDON= 000004   	DV.LOG= 000100   	ERMVFE  010144R
BIT0  = 000001   	CRDCLR  013752R  	DEXWD1= 174406   	DV.NXD= 000001   	ERR   = 100000
BIT1  = 000002   	CRDINT  013222R  	DEXWD2= 174404   	DV.OFL= 000002   	ERR10C= 010000
BIT10 = 002000   	CREVFG= ****** GX	DEXWD3= 174402   	DV.OIR= 000004   	ERR10S= 020000
BIT11 = 004000   	CREXP = ****** GX	DFUNC = 000200   	DV.SCN= 000010   	ERR11C= 000001
BIT12 = 010000   	CRHD    012172RG 	DF.DMG= 000004   	DV.URE= 000200   	ERR11S= 000002
BIT13 = 020000   	CRHUNG= ****** GX	DF.DMN= 000007   	DXBUF = ****** GX	EXSP    014542RG
BIT14 = 040000   	CRINI   012554R  	DF.DOR= 000001   	DXCNT = ****** GX	E.FCRB= 000004
BIT15 = 100000   	CRIOD   012726R  	DF.EHG= 000010   	DXEXP = 177170   	E.FCRC= 000001
BIT2  = 000004   	CRLOOP  012640R  	DF.EHM= 000011   	DXFLAG  014542R  	E.FCRD= 000002
BIT3  = 000010   	CRMKT   013172R  	DF.EMG= 000005   	DXHD    002056RG 	E.FCRS= 000003
BIT4  = 000020   	CRMRKT  012472R  	DF.EMN= 000006   	DXINI   002366R  	E.FLPC= 000002
BIT5  = 000040   	CRPWUP  012546R  	DF.KLR= 000012   	DXIOD   002362R  	E.FLPD= 000001
BIT6  = 000100   	CRSSTV  012504R  	DF.KLW= 000013   	DXPKT = ****** GX	E.FLPQ= 000003
BIT7  = 000200   	CRSTBK= ****** GX	DF.KLX= 000014   	DXRTC = ****** GX	E.FLPS= 000005
BIT8  = 000400   	CRSTK   012452RG 	DF.OFF= 000002   	DXRTY   003250R  	E.FLPW= 000006
BIT9  = 001000   	CRSTLN= ****** GX	DF.ON = 000003   	DXSTK   002336RG 	E.FQIO= 000001
BLKTT = ****** GX	CRSTS = ****** GX	DF.PDP= 000016   	DXTSK = ****** GX	E.IOD = ****** GX
BPARER= 000020   	CRTBL = ****** GX	DF.PEX= 000015   	DXUNIT= ****** GX	E.NIR = ****** GX
BUFAIL  015626R  	CRTRP4  012506R  	DIAG1 = 174430   	DXVCB = ****** GX	FCN     005002R
BUSA16= 000020   	CR.ACK= 004000   	DIAG2 = 174432   	DXWD1 = 000006   	FCNBD   005010R
BUSA17= 000040   	CR.HNG= 100000   	DIAG3 = 174436   	DXWD2 = 000004   	FEDRV   004016R
BYTESA= ****** GX	CR.IOD= 010000   	DIKL10= 000010   	DXWD3 = 000002   	FEHD    003516RG
CDBA  = ****** GX	CR.IOP= 020000   	DLT   = 100000   	DXWRD1= 002000   	FER   = 000020
CDBPCK= 020000   	CR.NSF= 000400   	DLYCNT= 174400   	D$$H11= 000010   	FESTK   003776RG
CDBRCK= 040000   	CR.NXD= 001000   	DNBLK = ****** GX	D.CCDR= ****** GX	FETBL = ****** GX
CDBSCK= 010000   	CR.RHN= 002000   	DNFCN = ****** GX	D.CLPT= ****** GX	FETSK = ****** GX
CDCC  = ****** GX	CR.SST= 040000   	DNMSG   000442R  	D.FEPD= ****** GX	FE.DET= 040000
CDD   = 000020   	CS.EXP= 177670   	DNSTS = ****** GX	D1011 = 000040   	FE.DTE= 020000
CDDB  = ****** GX	CTYLUN= 000001   	DONE  = 000200   	EBSEL = 000100   	FE.SER= 004000
CDSB16= 000020   	CYCLS = 000002   	DONSTR  004732R  	EBUSPC= 000020   	FE.STR= 002000
CDSB17= 000040   	C$$D11= 000001   	DON10C= 040000   	EBUSPS= 000004   	FILADR  014656R
CDSDER= 004000   	C.LEEF= 000002   	DON10S= 100000   	ECCMSK  000504R  	FILBLK  014622R
CDSDLT= 002000   	DAG1  = 000030   	DON11C= 000100   	ECCWRD  000476R  	FILCLS  017154R
CDSEOF= 020000   	DAG2  = 000032   	DON11S= 000200   	ECH   = 000100   	FILERA  015622R
CDSERR= 100000   	DAG3  = 000036   	DPS4  = 040000   	ECI   = 004000   	FILERR  016506R
CDSHEM= 000004   	DATE  = 000004   	DRESET= 000100   	EDONES= 040000   	FILERX  016516R
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 70-2
SYMBOL TABLE

FILFNA  017016R  	IE.HFU= 177744   	INSMSG  017556R  	IO.RAL= 001010   	IS.SUC= 000001
FILL  = 000001   	IE.HWR= 177772   	INSTAL  015072RG 	IO.RAT= 013000   	KLPWRF= 000010
FILQIO  017166R  	IE.IDU= 177644   	INSTK   014422RG 	IO.RBC= 003000   	LBLBFE  014612R
FMT22 = 010000   	IE.IEF= 177637   	INTEBL= 000100   	IO.RCI= 015000   	LBLBLK  014604R
FNDFIL  015362R  	IE.IFC= 177776   	INTENB= 000100   	IO.RCV= 015000   	LBLBUF  014610R
FORPRO= 000020   	IE.IFU= 177747   	INTROF= 000010   	IO.RDB= 001200   	LBLNUM  014606R
GO    = 000001   	IE.ILL= 177726   	INTRON= 000040   	IO.RDN= 000022   	LOAD11= 000004
GOERR = 000001   	IE.ILU= 177640   	INTSON= 000001   	IO.REL= 013400   	LOBYTE= 000377
HCE   = 000200   	IE.INS= 177776   	INT10S= 000400   	IO.RHD= 001010   	LOINIT= 000400
HCI   = 002000   	IE.IPR= 177641   	INT11C= 002000   	IO.RLB= 001000   	LPALOC= 000214
HCRC  = 000400   	IE.ISQ= 177703   	INT11S= 004000   	IO.RLV= 001100   	LPBCTR= 000006 G
HDRBFE  014620R  	IE.ITI= 177643   	IOABT   004750R  	IO.RNA= 005400   	LPBSAD= 000004 G
HDRBLK  014614R  	IE.ITS= 177770   	IODN    004356R  	IO.RNC= 001004   	LPCBUF= 000014 G
HDRBUF  014616R  	IE.LCK= 177745   	IODNCR  014126R  	IO.RNE= 001020   	LPCCTR= 000015 G
HIBYTE= 177400   	IE.LNL= 177646   	IO.ACE= 007400   	IO.RTC= 003400   	LPCEVF= ****** GX
H.IPC = 000076   	IE.MBK= 177721   	IO.ACR= 006400   	IO.RTI= 016400   	LPCKSM= 000017 G
H.ISP = 000100   	IE.MOD= 177753   	IO.ACW= 007000   	IO.RTK= 000060   	LPCSA = ****** GX
H.LUN = 000132   	IE.NBF= 177731   	IO.ADS= 014000   	IO.RVB= 010400   	LPCSM = ****** GX
H.LUT = ****** GX	IE.NBK= 177727   	IO.APC= 014000   	IO.RWD= 002400   	LPCSRA= 000000 G
H.NLUN= 000130   	IE.NFI= 177704   	IO.APV= 014010   	IO.RWU= 002540   	LPCSRB= 000002 G
IAE   = 002000   	IE.NLN= 177733   	IO.ATT= 001400   	IO.R1C= 002400   	LPDCLR  010620R
IE.ABO= 177761   	IE.NNC= 177674   	IO.CCI= 014000   	IO.SAO= 004000   	LPDINT  007172R
IE.ACT= 177771   	IE.NOD= 177751   	IO.CCT= 002460   	IO.SCS= 013000   	LPEMSG  010056R
IE.ADP= 177636   	IE.NSF= 177746   	IO.CLN= 003400   	IO.SDI= 013000   	LPEMSX  010071R
IE.ALN= 177736   	IE.OFL= 177677   	IO.CON= 015400   	IO.SDO= 012400   	LPERUN  010066R
IE.AST= 177660   	IE.ONP= 177773   	IO.CRC= 001020   	IO.SEC= 002520   	LPEVFG= ****** GX
IE.BAD= 177777   	IE.OVR= 177756   	IO.CRE= 012000   	IO.SEM= 002440   	LPEXPA= ****** GX
IE.BBE= 177710   	IE.PRI= 177760   	IO.CTI= 015400   	IO.SHT= 002410   	LPEXPZ= ****** GX
IE.BDI= 177714   	IE.RAC= 177724   	IO.CTL= 016400   	IO.SLO= 005400   	LPHD    005254RG
IE.BDR= 177716   	IE.RAT= 177723   	IO.DAC= 010000   	IO.SMO= 002560   	LPHUNG= ****** GX
IE.BDV= 177711   	IE.RBG= 177730   	IO.DCI= 014400   	IO.SNM= 002450   	LPINI   005644R
IE.BHD= 177700   	IE.RCN= 177722   	IO.DCT= 002470   	IO.SPB= 002420   	LPIOD   006016R
IE.BLK= 177754   	IE.RER= 177740   	IO.DEL= 012400   	IO.SPF= 002440   	LPITH = ****** GX
IE.BNM= 177712   	IE.RNM= 177715   	IO.DET= 002000   	IO.SSO= 004400   	LPLOOP  005730R
IE.BTF= 177675   	IE.RSU= 177757   	IO.DIS= 016000   	IO.SST= 002430   	LPMCB = ****** GX
IE.BTP= 177725   	IE.SDP= 177635   	IO.DTI= 016000   	IO.STC= 002500   	LPMKT   007136R
IE.BVR= 177701   	IE.SNC= 177735   	IO.ENA= 006000   	IO.STP= 016400   	LPMRKT  005554R
IE.BYT= 177755   	IE.SPC= 177772   	IO.EOF= 003000   	IO.SYN= 003040   	LPNIR   006676R
IE.CKP= 177766   	IE.SQC= 177734   	IO.ESA= 002500   	IO.TRM= 002410   	LPPCTR= 000010 G
IE.CKS= 177742   	IE.SRE= 177762   	IO.EXT= 011400   	IO.UNL= 000042   	LPQDPB  010034R
IE.CLO= 177732   	IE.STK= 177706   	IO.FDX= 003020   	IO.WAT= 013400   	LPRAMD= 000012 G
IE.CON= 177752   	IE.ULN= 177773   	IO.FNA= 004400   	IO.WLB= 000400   	LPRMA = ****** GX
IE.DAA= 177770   	IE.UPN= 177777   	IO.HDX= 003010   	IO.WLS= 000410   	LPRMC = ****** GX
IE.DAO= 177763   	IE.VER= 177774   	IO.HIS= 015000   	IO.WLV= 000500   	LPRMZ = ****** GX
IE.DFU= 177750   	IE.WAC= 177743   	IO.INL= 002400   	IO.WVB= 011000   	LPRTRY= 000012
IE.DNA= 177771   	IE.WAT= 177741   	IO.ITI= 017000   	IO.XMT= 014400   	LPRTY = ****** GX
IE.DNR= 177775   	IE.WER= 177737   	IO.KIL= 000012   	IO.XNA= 014410   	LPSIZE= ****** GX
IE.DUN= 177767   	IE.WLK= 177764   	IO.LED= 012000   	IPAERR  016066R  	LPSSTV  005600R
IE.DUP= 177707   	IE.2DV= 177720   	IO.LOV= 001010   	IQ.Q  = 000002   	LPSTBK= ****** GX
IE.EBX= 177776   	IFLOP = 100000   	IO.LTK= 000050   	IQ.X  = 000001   	LPSTK   005534RG
IE.EOF= 177766   	ILF   = 000001   	IO.MCS= 013400   	IS.BV = 000005   	LPSTLN= ****** GX
IE.EOT= 177702   	ILFCD   002622R  	IO.MDA= 016000   	IS.CLR= 000000   	LPTBL = ****** GX
IE.EOV= 177765   	ILR   = 000002   	IO.MDI= 014400   	IS.CR = 006401   	LPTDAT= 000016 G
IE.EXP= 177676   	INIT  = 040000   	IO.MDO= 015400   	IS.ESC= 015401   	LPTHD = ****** GX
IE.FEX= 177717   	INITCR  013736RG 	IO.MLO= 006000   	IS.PND= 000000   	LPTPAR= 000040
IE.FHE= 177705   	INITLP  010550RG 	IO.MOD= 003000   	IS.RDD= 000002   	LPTPBT= 010000
IE.FOP= 177713   	INSHD   014142RG 	IO.MSO= 005000   	IS.SET= 000002   	LPTRP4  005602R
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 70-3
SYMBOL TABLE

LPUNIT= ****** GX	ONLINE= 004000   	REDLBL  017114R  	R50TBL  017542R  	TO11BC= 174416
LPUTBL= ****** GX	OPI   = 020000   	REQBLK  014550R  	SCD   = 000040   	TO11BM= 020000
LPWRUP  005636R  	OPTVFU= 004000   	REQTSK  016700R  	SETBUF  003442R  	TO11DB= 004000
LP.CLR= 002000   	PAGZRO= 040000   	RETALL  016610R  	SETLUN  016302R  	TO11DN= 000200
LP.EOF= 000200   	PARENB= 000002   	RETBUF  016632R  	SETSTD  015772R  	TO11DT= 174426
LP.F10= 000400   	PARFND  016124R  	RETNOD  016522R  	SF.IR = 040000   	TO11ER= 000002
LP.HNG= 100000   	PARMSG  017577R  	RETRY = 000010   	SF.TA = 000001   	TR    = 000200
LP.LIP= 001000   	PBTHRD= 000004   	RETXXX  017112R  	SNSTR   004420R  	TRE   = 040000
LP.MCH= 010000   	PERCLR= 001000   	RFMAD0= 100000   	SSTSCR  013332R  	TRKSEC  003272R
LP.PZI= 020000   	PGE   = 002000   	RFMAD1= 040000   	SSTSLP  007360R  	TRWAIT  003472R
LP.SST= 040000   	PGM   = 001000   	RFMAD2= 020000   	STAT  = 174434   	TSKFND  015640R
LP.UNT= 000003   	PHYBLK= 000040   	RFMAD3= 010000   	STATD = 000034   	TSKLUN= 000002
LP.WAT= 004000   	PHYS  = 100000   	RM    = 000010   	STATUS= 000022   	TSKMSG  017570R
L$BBLK= 000024   	PIDENT= 000000   	RMR   = 000004   	STDADR= 014562R  	TSTMOD= 000001
L$BFLG= 000010   	PRI7  = 000340   	RPAS  = 000016   	STSWD = ****** GX	TTBERR  016100R
L$BHRB= 000022   	PROPNT= 000021   	RPBA  = 000004   	SWR   = 177570   	TTPEN = ****** GX
L$BLDZ= 000014   	PRTOFF= 004000   	RPBUF = ****** GX	SWSLLT= 100000   	TYPBUF  014666R
L$BMXZ= 000016   	PR0   = 000000   	RPCNT = ****** GX	SYFLAG  014543R  	TYPMSG  017246R
L$BPAR= 000004   	PR1   = 000040   	RPCS1 = 000000   	SYMNTD  015274R  	T.BA  = ****** GX
L$BPRI= 000012   	PR2   = 000100   	RPCS2 = 000010   	SYMNT1  015340R  	T.HBCT= ****** GX
L$BSA = 000020   	PR3   = 000140   	RPDA  = 000006   	SYNTIM= 000004   	T.HCAD= ****** GX
L$BTSK= 000000   	PR4   = 000200   	RPDBR = 000022   	S.DRFN= 000034   	T.HCBC= ****** GX
L$$P20= 000002   	PR5   = 000240   	RPDC  = 000034   	S.FW  = ****** GX	T.HEMA= 177774
MCPE  = 020000   	PR6   = 000300   	RPDS  = 000012   	S.TD  = ****** GX	T.HIBC= 177776
MDPE  = 000400   	PR7   = 000340   	RPDT  = 000026   	TASKNF  015516R  	T.HVFC= 177775
MEFCN   005012R  	PS    = 177776   	RPEC1 = 000044   	TB.ABO= 040000   	T.PN  = ****** GX
MEMPAR= 000020   	PSWW1 = 000005   	RPEC2 = 000046   	TB.DON= 100000   	T.PZ  = ****** GX
MKDNR   000404RG 	PSWW10= 000014   	RPER1 = 000014   	TB.EOF= 020000   	T.SZ  = ****** GX
MKSCDP  005566R  	PSWW11= 000015   	RPEXP = 176700   	TB.LPC= 010000   	T10AD = 000020
MNTBLK  015040R  	PSWW12= 000016   	RPHD    000070RG 	TB.RMD= 004000   	T11AD = 000022
MNTSYD  015140R  	PSWW13= 000017   	RPLA  = 000020   	TB.SFN= 036000   	T11BC = 000016
MODE00= 000004   	PSWW2 = 000006   	RPMR  = 000024   	TB.VFD= 002000   	T50TBL  017532R
MODE01= 000010   	PSWW3 = 000007   	RPOF  = 000032   	TENAD1= 174410   	UF.TL = ****** GX
MOL   = 010000   	PSWW4 = 000010   	RPRNA = ****** GX	TENAD2= 174412   	UNASG1= 000032
MPE11 = 001000   	PSWW5 = 000011   	RPRTC = ****** GX	TESTLP  010360R  	UNASG2= 000033
MSGDPB  000422R  	PSWW6 = 000012   	RPSN  = 000030   	TEST00= 000400   	UNASG3= 000034
MSGSIZ= 000016   	PSWW7 = 000013   	RPSTK   000350RG 	TEST01= 001000   	UNASG4= 000035
MXF   = 001000   	PUDADR  014602R  	RPTSK = ****** GX	TEST02= 002000   	UNASG5= 000036
M.KTAE= 000010   	PULSE = 000020   	RPUNIT= ****** GX	TNAD1 = 000010   	UNASG6= 000037
M.KTEF= 000002   	PUTR50  017460R  	RPWC  = 000002   	TNAD2 = 000012   	UNIT  = 000020
M.KTMG= 000004   	PUTR51  017470R  	RPWLO   000400R  	TNCERR  016112R  	UNS   = 040000
M.KTUN= 000006   	PUTSTR  017450R  	RSTERR= 001000   	TNFERR  015606R  	UPE   = 020000
NED   = 010000   	QIOSTS  014662R  	RSX$$E= 000045   	TOBM  = 000004   	U.ACP = ****** GX
NEM   = 004000   	QSIZE = 000023   	RSX$$F= 000102   	TOD   = 000003   	U.DACP= ****** GX
NODADR= ****** GX	Q.IOAE= 000012   	RSX$$K= 000126   	TOIP  = 000002   	U.DN  = ****** GX
NULSTP= 000040   	Q.IOEF= 000006   	RSX$$V= 000014   	TOIT  = 000001   	U.FB  = ****** GX
NUPE  = 000002   	Q.IOFN= 000002   	RWRBLK  017146R  	TO10  = 000200   	U.RP  = ****** GX
NXTHDR  017036R  	Q.IOLU= 000004   	RWRHDR  017070R  	TO10AD= 174420   	U.SZ  = 000050
NXTSEC  003420R  	Q.IOPL= 000014   	RXCS  = 000000   	TO10BC= 174414   	U.UN  = ****** GX
N.DID = 000024   	Q.IOPR= 000007   	RXDB  = 000002   	TO10BM= 000001   	U.VA  = ****** GX
N.FID = 000000   	Q.IOSB= 000010   	R$$E18= 000001   	TO10DB= 000400   	VFCFF   007124R
N.FNAM= 000006   	RAMIS0= 010000   	R$$11D= 000001   	TO10DN= 100000   	VFCTBL  007122R
N.FTYP= 000014   	RAMLOD= 000003   	R.AT  = ****** GX	TO10DT= 174424   	VFUERR= 000100
N.FVER= 000016   	RAMPAR= 000010   	R.DP  = ****** GX	TO10ER= 020000   	VFULOD= 000002
N.NEXT= 000022   	RCVBLK  014544R  	R.FC  = ****** GX	TO10PK= ****** GX	VFURDY= 010000
N.STAT= 000020   	READ  = 000007   	R.LU  = ****** GX	TO11  = 000100   	VV    = 000100
OFFLIN= 000200   	REDHDR  017052R  	R.PB  = ****** GX	TO11AD= 174422   	WCE   = 040000
INSTAL -- TASK INSTALLER FOR RS	MACRO M1113  11-NOV-81 11:19  PAGE 70-4
SYMBOL TABLE

WCF   = 000040   	$RX11 = 000001   	.FEST   004542RG 	.PCAB2= 151000   	.TPDEA= ****** GX
WEP   = 000010   	$TOP20= 000001   	.GFNR = 102000   	.PCAB3= 152000   	.WRMBX= 071000
WFDNR   000416RG 	$$    = 000037   	.INICL= 070000   	.PCAB4= 153000   	..AKCR  014112RG
WFEF1   003510R  	$$MSG = 000000   	.IRLTC= 014000   	.POLLH= ****** GX	..AKLP  011566RG
WFPKT   002356R  	$$$   = 000251R     002	.LCRDL= 052000   	.PUDBA= ****** GX	..ALCB= ****** GX
WLE   = 004000   	$$$ARG= 000003   	.LCRDR= 051000   	.PUDEA= ****** GX	..ALC2= ****** GX
WRITE = 000005   	$$$OST= 000012   	.LCRM1= 057000   	.RCRM1= 147000   	..DECB= ****** GX
WRL   = 004000   	$$$T1 = 000011   	.LCRM2= 056000   	.RCRM2= 146000   	..DECN= ****** GX
WRTDD = 000015   	$$$T2 = 000000   	.LCRM3= 055000   	.RCRM3= 145000   	..DEC2= ****** GX
WRTHDR  017064R  	$$$$  = 000002   	.LCRM4= 054000   	.RCRM4= 144000   	..DOLP  012010RG
W.TSEF= 000002   	.BGBUF= ****** GX	.LCRM5= 053000   	.RCSPF= 141000   	..DOL1  011774RG
ZSTOP = 040000   	.BRCLK= 005000   	.LDAR = 077000   	.RDJ14= 134000   	..DQRN= ****** GX
$CDINT  013762RG 	.CECLK= 004000   	.LDBRL= 043000   	.RDJ71= 135000   	..DSEV= ****** GX
$CD11 = 000001   	.CLRMR= 006000   	.LDBRR= 042000   	.RDMAB= 133000   	..ENB0= ****** GX
$DBDTE= 000001   	.CLRUN= 010000   	.LDCK1= 046000   	.RPELC= ****** GX	..FSTD= ****** GX
$DH11 = 000001   	.COMEF= ****** GX	.LDCK2= 047000   	.RPELQ= ****** GX	..INTX= ****** GX
$DIRAC= 000001   	.CONBT= 012000   	.LDDIS= 045000   	.RPUNT= ****** GX	..IODN= ****** GX
$DIV    000032RG 	.CRPFL= ****** GX	.LDRJD= 064000   	.SECLK= 003000   	..NADD= ****** GX
$DSW  = ****** GX	.CRTSK= ****** GX	.LDRJV= 063000   	.SETMR= 007000   	..PTLP  011646RG
$DTE  = 000001   	.CSHRG= 164000   	.LDRM1= 060000   	.SETRN= 011000   	..SACK= ****** GX
$DXINT  003060RG 	.CYLTM= 000074   	.LDRM2= 061000   	.SSCLK= 002000   	..SPCR  014070RG
$FE   = 000001   	.DBINT  001236RG 	.LDRM3= 062000   	.STDTA= ****** GX	..SPLP  011414RG
$F11  = 000001   	.DRLTC= 015000   	.LDSEL= 044000   	.STDTZ= ****** GX	..STCR  014046RG
$LPINT  010650RG 	.DSACF= 066000   	.LPPFL= ****** GX	.STPCL= 000000   	..STIN= ****** GX
$LP20 = 000001   	.DSIOJ= 065000   	.MEMRS= 076000   	.STRCL= 001000   	..STLP  011204RG
$MUL    000000RG 	.EIOJA= 067000   	.PCAB1= 150000   	.TPDBA= ****** GX	...GBL= 000000
$RP04 = 000001   	.FEACK  004436RG

. ABS.	000000	   000
      	017606	   001
TEXT  	000275	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  12653 WORDS  ( 50 PAGES)
DYNAMIC MEMORY:  14438 WORDS  ( 55 PAGES)
ELAPSED TIME:  00:03:16
,[100,20]DRIVERS20.LST/-SP/CRF=[100,30]DRIVERS20.TMP
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

AC.ENA	= 000200	#61-4757    64-5021   
ADRSAV	= ******  GX	*19-1979    20-2034   *20-2039   *21-2073    21-2083   *21-2084   
ALLDON	  017012 R	 66-5224    67-5274    67-5279   #67-5285   
AOE   	= 001000	#8-397      10-710     10-721    
ATCBLK	  015032 R	#62-4801    64-5019   
A.EF  	= 000020	*10-763    #13-1508   *14-1685   *15-1734    19-1929   *19-1931   *21-2091    30-2620    51-4202   
A.HA  	= ******  GX	 19-1992    63-4859   
BCFHDS	  011336 R	 40-3650   #40-3686   
BCFILF	  011272 R	 40-3642   #40-3659    40-3680    40-3689   
BCFLDR	  011356 R	 40-3652   #40-3695   
BCFLDV	  011364 R	 40-3653   #40-3701   
BCFRDS	  011272 R	 40-3649   #40-3664   
BCFSDO	  011316 R	 40-3651   #40-3677   
BCFSTR	  011400 R	 40-3648   #40-3714   
BCFTAB	  011254 R	 40-3639    40-3645   #40-3647    40-3648    40-3649    40-3650    40-3651    40-3652    40-3653   
BC.HDS	= ******  GX	 35-3279    40-3650    53-4461   
BC.LDR	= ******  GX	 40-3652   
BC.LDV	= ******  GX	 40-3653   
BC.RDS	= ******  GX	 40-3649   
BC.SDS	= ******  GX	 40-3651   
BC.STR	= ******  GX	 19-2022    21-2058    40-3648    52-4246   
BIT0  	= 000001	#13-1503    22-2214   #22-2229    23-2320    23-2337    25-2407    25-2423    25-2439    28-2524   
                         30-2606    35-3257   #46-4027    46-4038    47-4068    51-4191   #61-4691    61-4734   
BIT1  	= 000002	#13-1503    22-2216   #22-2229    23-2319    23-2336    25-2408    25-2424    25-2440    28-2524   
                        #46-4027    46-4040    47-4067   #61-4691   
BIT10 	= 002000	#13-1503   #22-2229    22-2263    23-2306    23-2326    28-2512   #46-4027    47-4058    49-4130   
                        #61-4691   
BIT11 	= 004000	#13-1503   #22-2229    22-2262    23-2305    23-2325    28-2507   #46-4027    47-4057    49-4128   
                        #61-4691   
BIT12 	= 010000	#13-1503   #22-2229    22-2261    23-2304    23-2324    28-2504   #46-4027    47-4056    47-4075   
                         49-4126   #61-4691   
BIT13 	= 020000	#13-1503   #22-2229    22-2260    23-2303    28-2501   #46-4027    47-4055    47-4074    49-4124   
                        #61-4691   
BIT14 	= 040000	#13-1503   #22-2229    22-2259    23-2302    28-2498   #46-4027    47-4054    47-4073    49-4121   
                        #61-4691   
BIT15 	= 100000	#13-1503   #22-2229    22-2258    23-2301    28-2495    35-3279   #46-4027    47-4053    49-4117   
                         52-4246    53-4461   #61-4691   
BIT2  	= 000004	#13-1503    22-2218   #22-2229    23-2315    23-2335    25-2409    25-2425    25-2441   #46-4027   
                         46-4042    47-4066   #61-4691   
BIT3  	= 000010	#13-1503   #22-2229    23-2314    23-2334    25-2410    25-2426    25-2442   #46-4027    46-4044   
                         47-4065   #61-4691   
BIT4  	= 000020	#13-1503    22-2221   #22-2229    23-2313    23-2333    25-2411    25-2427    25-2443   #46-4027   
                         47-4064   #61-4691   
BIT5  	= 000040	#13-1503    22-2223   #22-2229    23-2312    23-2332    25-2412    25-2428   #46-4027    47-4063   
                        #61-4691   
BIT6  	= 000100	#13-1503   #22-2229    23-2311    23-2331    25-2413   #46-4027    47-4062   #61-4691   
BIT7  	= 000200	#13-1503   #22-2229    23-2310    23-2330    25-2414    28-2520   #46-4027    47-4061   #61-4691   
                         61-4757   
BIT8  	= 000400	#13-1503   #22-2229    23-2308    23-2328    25-2415    28-2517    35-3257   #46-4027    47-4060   
                         49-4134   #61-4691   
BIT9  	= 001000	#13-1503   #22-2229    23-2307    23-2327    25-2416    28-2514   #46-4027    47-4059    49-4132   
                        #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BLKTT 	= ******  GX	 21-2139   
BPARER	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
BUFAIL	  015626 R	#64-4993    64-5003    64-5010   
BUSA16	= 000020	#23-2313    44-3959   
BUSA17	= 000040	#23-2312    44-3959   
BYTESA	= ******  GX	*19-1980   *19-2003    19-2006    20-2036    20-2038   *20-2040   *21-2072    21-2078   *21-2080   
                        *21-2085    21-2088   
CDBA  	= ******  GX	*52-4288   
CDBPCK	= 020000	#47-4074    53-4417   
CDBRCK	= 040000	#47-4073    53-4413   
CDBSCK	= 010000	#47-4075    53-4421   
CDCC  	= ******  GX	*52-4287    56-4541   
CDD   	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
CDDB  	= ******  GX	 53-4411    53-4447   
CDSB16	= 000020	#47-4064   
CDSB17	= 000040	#47-4063   
CDSDER	= 004000	#47-4057   
CDSDLT	= 002000	#47-4058    53-4404   
CDSEOF	= 020000	#47-4055    53-4396   
CDSERR	= 100000	#47-4053   
CDSHEM	= 000004	#47-4066    53-4429   
CDSIEN	= 000100	#47-4062    52-4289    52-4303    52-4306   
CDSNXM	= 001000	#47-4059    53-4404   
CDSOFL	= 010000	#47-4056    52-4279    53-4388   
CDSPAK	= 000002	#47-4067   
CDSPWC	= 000400	#47-4060    54-4484   
CDSRCK	= 040000	#47-4054    53-4435   
CDSRDY	= 000200	#47-4061    53-4408   
CDSRED	= 000001	#47-4068    52-4289   
CDST  	= ******  GX	 52-4279   *52-4289    52-4303   *52-4306    53-4387    53-4445    53-4447   *54-4484    56-4536   
                         56-4545   
CDSTOL	= 000010	#47-4065   
CHNPNT	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
CHRINT	= 020000	#23-2303    35-3193    39-3487    39-3509    42-3820   
CLIOD 	  000374 R	#8-453      9-661     
CLRBUF	  016666 R	 63-4844    63-4844    66-5256   #66-5259   
CLSFIL	  016122 R	 65-5070    65-5073    65-5076   #65-5080   
CNUPE 	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
CNVTBL	  015046 R	#62-4814    66-5189   
CPE   	= 000010	#8-403     
CRBFLN	= ******  GX	 52-4245    52-4287   
CRBUFF	= ******  GX	 52-4235    52-4288   
CRCEVF	= ******  GX	*52-4217    52-4228    52-4298   
CRDCLR	  013752 R	 51-4185   #54-4485   
CRDINT	  013222 R	 51-4183   #52-4304   
CREVFG	= ******  GX	*51-4201   *51-4202    51-4203    52-4217    52-4218    52-4249    52-4255    52-4273    52-4317   
                         53-4368    53-4464    53-4467    54-4485    59-4631   
CREXP 	= ******  GX	*51-4189   
CRHD  	  012172 RG	#49-4114   
CRHUNG	= ******  GX	*52-4314   
CRINI 	  012554 R	 49-4114    49-4114   #51-4201   
CRIOD 	  012726 R	#52-4228   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CRLOOP	  012640 R	#52-4214    52-4326   
CRMKT 	  013172 R	#52-4298   
CRMRKT	  012472 R	#49-4139    51-4204   
CRPWUP	  012546 R	#51-4196    51-4206   
CRSSTV	  012504 R	#51-4179    51-4205   
CRSTBK	= ******  GX	 53-4376    53-4449   
CRSTK 	  012452 RG	 49-4114   #49-4114   
CRSTLN	= ******  GX	 53-4449    53-4460   
CRSTS 	= ******  GX	*51-4190    52-4233   *52-4252    52-4260    52-4266    52-4268   *52-4270    52-4271   *52-4286   
                         52-4300    52-4307    52-4309    52-4311   *52-4313   *52-4319   *52-4322   *53-4367    53-4382   
                         53-4392    53-4400    53-4437   *53-4442   *53-4468   *54-4483    56-4538   *56-4540   *56-4543   
                        *56-4548   *57-4581   *58-4604   *59-4625   
CRTBL 	= ******  GX	 57-4579    58-4601    59-4623   
CRTRP4	  012506 R	 51-4179   #51-4183   
CR.ACK	= 004000	#49-4128    52-4266    52-4270    52-4307    58-4604    59-4625   
CR.HNG	= 100000	#49-4117    52-4252    52-4270    52-4309    52-4319    52-4322   
CR.IOD	= 010000	#49-4126    52-4233    52-4252    52-4268    52-4307    53-4392    56-4543    58-4604   
CR.IOP	= 020000	#49-4124    52-4268    52-4286    52-4307    52-4311    53-4392    54-4483    56-4538    56-4540   
                         58-4604   
CR.NSF	= 000400	#49-4134    52-4252    53-4437    53-4442   
CR.NXD	= 001000	#49-4132    51-4190    52-4271    52-4300    53-4382    54-4483   
CR.RHN	= 002000	#49-4130    52-4252    52-4270    52-4313    52-4322    53-4400   
CR.SST	= 040000	#49-4121    52-4260    52-4307    52-4313    53-4367    53-4468    56-4548    57-4581   
CS.EXP	= 177670	#13-1503   #22-2229   #46-4027   #61-4691   
CTYLUN	= 000001	#61-4728    69-5406   
CYCLS 	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
C$$D11	= 000001	#46-4033   
C.LEEF	= 000002	#8-454     
DAG1  	= 000030	#3-125     
DAG2  	= 000032	#3-124     
DAG3  	= 000036	#3-122     
DATE  	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
DBINI 	  000512 R	 8-448      8-448     #9-530      9-534      9-667     
DBIOD 	  000370 R	#8-450      9-660     
DCK   	= 100000	#8-391     
DCOMST	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
DD.CHI	= 000002	#25-2424    35-3196   
DD.HEM	= 000010	#25-2442    53-4431   
DD.LER	= 000010	#25-2426   
DD.OVF	= 000020	#25-2427    35-3201   
DD.PCK	= 000002	#25-2440    53-4419   
DD.PGZ	= 000001	#25-2423    35-3190   
DD.RCK	= 000001	#25-2439    53-4415   
DD.RME	= 000040	#25-2428    35-3180   
DD.SCK	= 000004	#25-2441    53-4423   
DD.SFL	= 000020	#25-2443    53-4439   
DD.VFE	= 000004	#25-2425    35-3150   
DEFPRI	= 000062	#61-4721    65-5089   
DELHLD	= 002000	#23-2306   
DEMTIM	= 000002	#23-2336    35-3154    39-3542   
DEP   	= 010000	#13-1503   #22-2229   #46-4027   #61-4691   
DEX   	= 000400	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DEXDON	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
DEXWD1	= 174406	#13-1503   #22-2229   #46-4027   #61-4691   
DEXWD2	= 174404	#13-1503   #22-2229   #46-4027   #61-4691   
DEXWD3	= 174402	#13-1503   #22-2229   #46-4027   #61-4691   
DFUNC 	= 000200	#13-1503   #22-2229   #46-4027   #61-4691   
DF.DMG	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
DF.DMN	= 000007	#13-1503   #22-2229   #46-4027   #61-4691   
DF.DOR	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
DF.EHG	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
DF.EHM	= 000011	#13-1503   #22-2229   #46-4027   #61-4691   
DF.EMG	= 000005	#13-1503   #22-2229   #46-4027   #61-4691   
DF.EMN	= 000006	#13-1503   #22-2229   #46-4027   #61-4691   
DF.KLR	= 000012	#13-1503   #22-2229   #46-4027   #61-4691   
DF.KLW	= 000013	#13-1503   #22-2229   #46-4027   #61-4691   
DF.KLX	= 000014	#13-1503   #22-2229   #46-4027   #61-4691   
DF.OFF	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
DF.ON 	= 000003	#13-1503   #22-2229   #46-4027   #61-4691   
DF.PDP	= 000016	#13-1503   #22-2229   #46-4027   #61-4691   
DF.PEX	= 000015	#13-1503   #22-2229   #46-4027   #61-4691   
DIAG1 	= 174430	#13-1503   #22-2229   #46-4027   #61-4691   
DIAG2 	= 174432	#13-1503   #22-2229   #46-4027   #61-4691   
DIAG3 	= 174436	#13-1503   #22-2229   #46-4027   #61-4691   
DIKL10	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
DLT   	= 100000	#8-367      10-786    
DLYCNT	= 174400	#13-1503   #22-2229   #46-4027   #61-4691   
DNBLK 	= ******  GX	*21-2119   *21-2142   *21-2153    21-2156   
DNFCN 	= ******  GX	*21-2120   *21-2121   *21-2122   
DNMSG 	  000442 R	#8-468      9-670     
DNSTS 	= ******  GX	*21-2123   *21-2127    21-2142   *21-2145   *21-2146    21-2149   *21-2149   *21-2164   
DONE  	= 000200	#13-1521    14-1623    14-1643    17-1865   #23-2310   
DONSTR	  004732 R	 21-2089   #21-2092    21-2101    21-2110    21-2161   
DON10C	= 040000	#13-1503   #22-2229   #46-4027   #61-4691   
DON10S	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
DON11C	= 000100	#13-1503   #22-2229   #46-4027   #61-4691   
DON11S	= 000200	#13-1503   #22-2229   #46-4027   #61-4691   
DPS4  	= 040000	#13-1503   #22-2229   #46-4027   #61-4691   
DRESET	= 000100	#13-1503   #22-2229   #46-4027   #61-4691   
DRY   	= 000200	#8-384      9-652     
DR.DTE	= 000011	#13-1503   #22-2229   #46-4027   #61-4691   
DSEND 	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
DS04  	= 004000	#13-1503   #22-2229   #46-4027   #61-4691   
DS05  	= 002000	#13-1503   #22-2229   #46-4027   #61-4691   
DS06  	= 001000	#13-1503   #22-2229   #46-4027   #61-4691   
DTE   	= 010000	#8-394     
DTECMD	= 000451	#13-1503   #22-2229   #46-4027   #61-4691   
DTEFLG	= 000444	#13-1503   #22-2229   #46-4027   #61-4691   
DTEF11	= 000450	#13-1503   #22-2229   #46-4027   #61-4691   
DTEMTD	= 000455	#13-1503   #22-2229   #46-4027   #61-4691   
DTEMTI	= 000456	#13-1503   #22-2229   #46-4027   #61-4691   
DUNS  	  000460 R	#8-471      9-681     
DUPE  	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
DURE  	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DVA   	= 004000	#8-353      9-618      9-625     
DV.EOF	= 000040	#25-2412    35-3141    40-3688    53-4398   
DV.F11	= 000400	#25-2415    35-3168   
DV.HNG	= 001000	#25-2416    35-3175    53-4402   
DV.IOP	= 000020	#25-2411    35-3165    53-4394   
DV.LOG	= 000100	 10-1171   #25-2413    35-3156    35-3172    53-4402    53-4406    53-4427   
DV.NXD	= 000001	#25-2407    35-3134    53-4384   
DV.OFL	= 000002	#25-2408    35-3134    35-3145    53-4384    53-4390   
DV.OIR	= 000004	#25-2409    35-3134    35-3145    35-3175    53-4384    53-4390    53-4402   
DV.SCN	= 000010	#25-2410    35-3189    35-3195   
DV.URE	= 000200	 10-1171   #25-2414    35-3172    53-4406   
DXBUF 	= ******  GX	*14-1573   *17-1830    17-1846   
DXCNT 	= ******  GX	*14-1574   *17-1832    17-1848    17-1850   
DXEXP 	= 177170	#13-1509    14-1607    15-1710   
DXFLAG	  014542 R	#62-4781   *63-4845    63-4896   *63-4898   
DXHD  	  002056 RG	#13-1536   
DXINI 	  002366 R	 13-1536    13-1536   #14-1565    14-1568    14-1686   
DXIOD 	  002362 R	#13-1540    14-1680   
DXPKT 	= ******  GX	*14-1575    14-1683    15-1730   
DXRTC 	= ******  GX	*14-1594   *15-1715   *15-1752   *15-1754   
DXRTY 	  003250 R	 14-1632    14-1655    14-1670    14-1673    15-1714   #15-1752   
DXSTK 	  002336 RG	 13-1536   #13-1536   
DXTSK 	= ******  GX	*14-1685   *15-1734   
DXUNIT	= ******  GX	*14-1572    14-1667   
DXVCB 	= ******  GX	*14-1605   *14-1606    14-1611    14-1663    14-1671    14-1674    14-1681    14-1682   *15-1711   
                         15-1717    15-1724    15-1727   *15-1732   *15-1733    16-1774    16-1787   *16-1802   *16-1803   
                         16-1804   *17-1828    17-1832   *17-1851   
DXWD1 	= 000006	#3-131     
DXWD2 	= 000004	#3-132     
DXWD3 	= 000002	#3-133     
DXWRD1	= 002000	#13-1503   #22-2229   #46-4027   #61-4691   
D$$H11	= 000010	#1-43      
D.CCDR	= ******  GX	 52-4248    53-4463   
D.CLPT	= ******  GX	 32-2744    35-3282   
D.FEPD	= ******  GX	 19-2024    21-2093   
D1011 	= 000040	#13-1503   #22-2229   #46-4027   #61-4691   
EBSEL 	= 000100	#13-1503   #22-2229   #46-4027   #61-4691   
EBUSPC	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
EBUSPS	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
ECCMSK	  000504 R	#8-502      10-870     10-886    
ECCWRD	  000476 R	#8-500      10-879    
ECH   	= 000100	#8-400      10-801    
ECI   	= 004000	#8-426     
EDONES	= 040000	#13-1503   #22-2229   #46-4027   #61-4691   
EF.CRB	= 000010	#46-4044    51-4203    52-4249    52-4255    52-4273   
EF.CRC	= 000001	#46-4038    52-4214    52-4218    52-4298    54-4485   
EF.CRD	= 000002	#46-4040    52-4214    52-4218    52-4228    52-4317    59-4631   
EF.CRS	= 000004	#46-4042    51-4203    53-4368    53-4464    53-4467   
EF.IOD	= ******  GX	 10-763     14-1685    15-1734   
EF.LPC	= 000002	#22-2216    31-2640    31-2645    34-3011    37-3407   
EF.LPD	= 000001	#22-2214    31-2640    31-2645    32-2681    32-2730    34-3055    39-3555    40-3666    41-3785   
                         42-3822    43-3881    44-3950   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

EF.LPQ	= 000004	#22-2218   
EF.LPS	= 000020	#22-2221    30-2621    35-3121    35-3283    35-3291   
EF.LPW	= 000040	#22-2223    30-2621    36-3325    41-3760   
EF.NIR	= ******  GX	 18-1914    31-2640    31-2645    33-2885   
EF.QIO	= 000001	#61-4734   
EF.SEP	= 100000	#18-1909    18-1914   
EF.TEF	= 000400	#18-1910    18-1914    19-1967    21-2091   
EMPTY 	= 000003	#13-1531    14-1641   
EPTR  	= 000000	#13-1503   #22-2229   #46-4027   #61-4691   
ERMHER	  010163 R	 35-3157   #35-3242   
ERMHNG	  010200 R	 35-3176   #35-3244   
ERMNXD	  010111 R	 35-3135   #35-3236   
ERMOFL	  010131 R	 35-3146   #35-3238   
ERMVFE	  010144 R	 35-3151   #35-3240   
ERR   	= 100000	#8-380     #23-2301    39-3487   
ERR10C	= 010000	#13-1503   #22-2229   #46-4027   #61-4691   
ERR10S	= 020000	#13-1503   #22-2229   #46-4027   #61-4691   
ERR11C	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
ERR11S	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
EXSP  	  014542 RG	#62-4777    63-4840   
E.FCRB	= 000004	#46-4043    52-4247   
E.FCRC	= 000001	#46-4037    49-4139   
E.FCRD	= 000002	#46-4039   
E.FCRS	= 000003	#46-4041    53-4462   
E.FLPC	= 000002	#22-2215    30-2587   
E.FLPD	= 000001	#22-2213   
E.FLPQ	= 000003	#22-2217    35-3229   
E.FLPS	= 000005	#22-2220    35-3281   
E.FLPW	= 000006	#22-2222    30-2589    36-3332   
E.FQIO	= 000001	#61-4733    68-5368    69-5406   
E.IOD 	= ******  GX	 8-451      8-454      13-1540   
E.NIR 	= ******  GX	 8-457      13-1538   
FCN   	  005002 R	 21-2066   #21-2114   
FCNBD 	  005010 R	 21-2069   #21-2116   
FEDRV 	  004016 R	 18-1925    18-1925   #19-1927    19-1973    19-1976    19-2011    19-2020   
FEHD  	  003516 RG	#18-1925   
FER   	= 000020	#8-402     
FESTK 	  003776 RG	 18-1925   #18-1925   
FETBL 	= ******  GX	*19-1942   *19-1977   *19-2008   *19-2019   *21-2104    21-2151   
FETSK 	= ******  GX	 19-1929   *19-1931   *21-2091   
FE.DET	= 040000	#18-1920    19-1942    19-2008    19-2019    20-2031    20-2042    21-2104   
FE.DTE	= 020000	#18-1921    19-1942    19-2019    21-2063    21-2077    21-2090    21-2104   
FE.SER	= 004000	#18-1922    19-1942    19-1977    19-2019    21-2104   
FE.STR	= 002000	#18-1923    21-2118    21-2160   
FILADR	  014656 R	#62-4795    62-4803    65-5134    65-5136   
FILBLK	  014622 R	#62-4794    63-4912    63-4933    63-4952    64-5018    68-5297   
FILCLS	  017154 R	 66-5216    66-5216    66-5222    66-5222   #68-5353   
FILERA	  015622 R	#64-4989    64-5024    64-5030    64-5034   
FILERR	  016506 R	 64-4989    66-5158    66-5168    66-5206    66-5211   #66-5221   
FILERX	  016516 R	 65-5080   #66-5222   
FILFNA	  017016 R	 63-4927    63-4927    63-4959    63-4959   #68-5293   
FILL  	= 000001	#13-1530    14-1618   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

FILQIO	  017166 R	 63-4885    63-4885    64-5023    64-5023    68-5298    68-5349   #68-5368   
FMT22 	= 010000	#8-425     
FNDFIL	  015362 R	 63-4905   #63-4911    63-4979   
FORPRO	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
GO    	= 000001	#13-1529    13-1530    13-1531    13-1532    13-1533    13-1534   #23-2320    34-3043    39-3497   
                         39-3522    44-3977   
GOERR 	= 000001	#23-2337    39-3542   
HCE   	= 000200	#8-399     
HCI   	= 002000	#8-427     
HCRC  	= 000400	#8-398     
HDRBFE	  014620 R	#62-4793   *64-5013    68-5304   
HDRBLK	  014614 R	#62-4791   *64-5032   *68-5312    68-5326   
HDRBUF	  014616 R	#62-4792   *64-5011    66-5255   *66-5260    68-5325   
HDR64 	= ******	 65-5100   
HIBYTE	= 177400	#13-1503   #22-2229   #22-2278    32-2829   #46-4027   #61-4691   
H.IPC 	= 000076	#61-4738    65-5129   
H.ISP 	= 000100	#61-4739    65-5130   
H.LUN 	= 000132	#61-4741    63-4860   
H.LUT 	= ******  GX	 19-1996   
H.NLUN	= 000130	#61-4740    66-5150   
IAE   	= 002000	#8-396      10-710     10-721    
IE.ABO	= 177761	 19-1960    21-2105    41-3779   
IE.ACT	= 177771	 67-5278   
IE.BAD	= 177777	 21-2145   
IE.BLK	= 177754	 10-723     14-1688   
IE.DNR	= 177775	 9-649     
IE.IFC	= 177776	 9-566      14-1634    33-2935   
IE.OFL	= 177677	 43-3860   
IE.VER	= 177774	 10-708     10-851     14-1693    21-2164   
IE.WLK	= 177764	 10-717    
IFLOP 	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
ILF   	= 000001	#8-406      10-710    
ILFCD 	  002622 R	 14-1579   #14-1634   
ILR   	= 000002	#8-405      10-710    
INIT  	= 040000	#13-1524    15-1755   
INITCR	  013736 RG	 51-4196    51-4196    51-4207    51-4207    52-4222    52-4222    52-4315    52-4315   #54-4483   
                         58-4603    58-4603   
INITLP	  010550 RG	 30-2612    30-2612    30-2625    30-2625    31-2649    31-2649   #37-3387   
INSHD 	  014142 RG	#62-4774   
INSMSG	  017556 R	 69-5386   #69-5462   
INSTAL	  015072 RG	 62-4774    62-4774   #63-4839    63-4842    67-5285   
INSTK 	  014422 RG	 62-4774   #62-4774   
INTEBL	= 000100	#13-1522    14-1676    15-1712   
INTENB	= 000100	#23-2311    34-3019    34-3023    34-3043    36-3362    37-3400    39-3497    39-3522    41-3765   
                         44-3977   
INTROF	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
INTRON	= 000040	#13-1503   #22-2229   #46-4027   #61-4691   
INTSON	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
INT10S	= 000400	#13-1503   #22-2229   #46-4027   #61-4691   
INT11C	= 002000	#13-1503   #22-2229   #46-4027   #61-4691   
INT11S	= 004000	#13-1503   #22-2229   #46-4027   #61-4691   
IOABT 	  004750 R	 21-2059   #21-2097   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

IODN  	  004356 R	 19-1968   #19-2013   
IODNCR	  014126 R	 56-4549    56-4549    57-4582   #59-4631   
IO.ACW	= 007000	 64-5017   
IO.APV	= 014010	 63-4880   
IO.ATT	= 001400	 21-2070   
IO.DAC	= 010000	 33-2922    68-5353   
IO.FNA	= 004400	 68-5293   
IO.KIL	= 000012	 33-2941   
IO.RLB	= 001000	 9-562      14-1576    15-1717    33-2918   
IO.RVB	= 010400	 33-2920    68-5313    68-5335   
IO.WLB	= 000400	 9-564      14-1578    14-1611    21-2131    33-2914    35-3229    69-5406   
IO.WVB	= 011000	 8-466      33-2916    68-5318   
IPAERR	  016066 R	#65-5073    65-5124   
IS.RDD	= 000002	 15-1726   
IS.SUC	= 000001	 10-705     10-959     15-1729    21-2123    33-2948    44-3944   
KLPWRF	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
KT11  	= ******	 65-5072    65-5122   
LBLBFE	  014612 R	#62-4790   *64-5006    66-5153    66-5162   
LBLBLK	  014604 R	#62-4787   *64-5028    66-5165   *68-5337    68-5338   
LBLBUF	  014610 R	#62-4789   *64-5004    66-5251   *66-5259    68-5336   
LBLNUM	  014606 R	#62-4788   *65-5142    66-5165   
LOAD11	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
LOBYTE	= 000377	#22-2277    22-2278    41-3779    43-3860    44-3944   
LOINIT	= 000400	#23-2308   
LPALOC	= 000214	#22-2208   
LPBCTR	= 000006  G	#23-2341    34-3041    39-3489   *39-3506    39-3507   *39-3521   *44-3931   *44-3958   *44-3967   
LPBSAD	= 000004  G	#23-2339    39-3508   *39-3513   *44-3957   *44-3965   *44-3966   
LPCBUF	= 000014  G	#23-2354   *36-3342   *36-3345    39-3517   
LPCCTR	= 000015  G	#23-2355   
LPCEVF	= ******  GX	*31-2644    32-2681    33-2885    34-3011   
LPCKSM	= 000017  G	#23-2358    34-3040    39-3486   
LPCSA 	= ******  GX	*30-2604    32-2687    34-3016   *37-3399    39-3479    41-3763    42-3817    43-3853   
LPCSM 	= ******  GX	*34-3039   *34-3040    35-3258   *36-3354   *39-3485   *39-3486   
LPCSRA	= 000000  G	#23-2300   
LPCSRB	= 000002  G	#23-2322    35-3154    35-3178    35-3199    39-3542   
LPDCLR	  010620 R	 30-2599   #37-3401   
LPDINT	  007172 R	 30-2597   #34-3020   
LPEMSG	  010056 R	 35-3219    35-3229   #35-3230   
LPEMSX	  010071 R	 35-3215   #35-3234   
LPERUN	  010066 R	*35-3224   #35-3232   
LPEVFG	= ******  GX	*30-2619   *30-2620    30-2621    31-2644    31-2645    32-2730    34-3055    35-3121    35-3283   
                         35-3291    36-3325    37-3407    39-3555    40-3666    41-3760    41-3785    42-3822    43-3881   
                         44-3950   
LPEXPA	= ******  GX	 37-3398   
LPEXPZ	= ******  GX	 35-3257   
LPHD  	  005254 RG	#27-2487   
LPHUNG	= ******  GX	*34-3035   
LPINI 	  005644 R	 27-2487    27-2487   #30-2618   
LPIOD 	  006016 R	#32-2680   
LPITH 	= ******  GX	 32-2700    32-2719    34-3031    34-3047   *37-3402    39-3480   *39-3549    41-3758   *41-3762   
                         42-3815   *44-3929   
LPLOOP	  005730 R	#31-2639    34-3065   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LPMCB 	= ******  GX	 39-3512   *44-3962    44-3965   
LPMKT 	  007136 R	#34-3010   
LPMRKT	  005554 R	#30-2586    30-2622   
LPNIR 	  006676 R	 32-2755   #33-2884    33-2952    33-2978   
LPPCTR	= 000010  G	#23-2345   *32-2802    36-3358   *36-3358    39-3535   *39-3535    41-3766   *41-3766    42-3819   
                        *42-3819   
LPQDPB	  010034 R	*35-3220    35-3225   #35-3228   
LPRAMD	= 000012  G	#23-2349   *36-3344    39-3514   
LPRMA 	= ******  GX	 32-2768   *32-2773    32-2784   *32-2823    32-2826    41-3754   
LPRMC 	= ******  GX	*32-2774    32-2789    32-2808   *32-2838   
LPRMZ 	= ******  GX	 32-2769    32-2793   *32-2821    32-2827   
LPRTRY	= 000012	#22-2209    35-3259    43-3852   
LPRTY 	= ******  GX	*34-3036    35-3170    35-3260   *39-3495   *39-3544   *43-3852   
LPSIZE	= ******  GX	 32-2750    34-3061    37-3404    40-3634    41-3751    42-3812   
LPSSTV	  005600 R	#30-2591    30-2623   
LPSTBK	= ******  GX	 35-3127    35-3256    35-3264    35-3274   
LPSTK 	  005534 RG	 27-2487   #27-2487   
LPSTLN	= ******  GX	 35-3264    35-3278   
LPTBL 	= ******  GX	 32-2683    32-2743    34-3014    37-3390    40-3634    41-3751    42-3812   
LPTDAT	= 000016  G	#23-2357   
LPTHD 	= ******  GX	 32-2692    32-2728   *32-2840    34-3027    35-3159    41-3768    43-3865   *43-3880   
LPTPAR	= 000040	#23-2332    35-3154    39-3542   
LPTPBT	= 010000	#23-2324   
LPTRP4	  005602 R	 30-2592   #30-2596   
LPUNIT	= ******  GX	*39-3473    39-3475   
LPUTBL	= ******  GX	 33-2911    39-3478   
LPWRUP	  005636 R	#30-2611    30-2624   
LP.CLR	= 002000	#28-2512    35-3152    35-3181    36-3334    36-3336   
LP.EOF	= 000200	#28-2520    32-2786    35-3139    36-3351    36-3353   
LP.F10	= 000400	#28-2517    32-2732    32-2859    35-3207    35-3292    40-3636   
LP.HNG	= 100000	#28-2495    32-2732    34-3029    34-3057    35-3173    44-3928   
LP.LIP	= 001000	#28-2514    32-2705    32-2732    32-2762    32-2765    32-2791    36-3337    41-3756    44-3921   
LP.MCH	= 010000	#28-2504    32-2732    39-3504    39-3520    44-3923    44-3928    44-3968   
LP.PZI	= 020000	#28-2501    32-2800    32-2804    35-3187    39-3533   
LP.SST	= 040000	#28-2498    32-2711    32-2786    34-3054    35-3120    35-3294    39-3554    40-3665    43-3862   
LP.UNT	= 000003	#28-2524    35-3222    35-3276    37-3393    39-3477   
LP.WAT	= 004000	#28-2507    32-2717    32-2732    34-3025    35-3191    35-3197    35-3212    41-3753    42-3814   
                         44-3928   
L$BBLK	= 000024	#61-4753   
L$BFLG	= 000010	#61-4747   
L$BHRB	= 000022	#61-4752    64-5032   
L$BLDZ	= 000014	#61-4749   
L$BMXZ	= 000016	#61-4750   
L$BPAR	= 000004	#61-4746   
L$BPRI	= 000012	#61-4748   
L$BSA 	= 000020	#61-4751   
L$BTSK	= 000000	#61-4745   
L$$P20	= 000002	#1-37       32-2684    34-3013    37-3389    40-3634    41-3751    42-3812   
MCPE  	= 020000	#8-352      10-706    
MDPE  	= 000400	#8-374      10-786    
MEFCN 	  005012 R	 21-2115   #21-2118   
MEMPAR	= 000020	#23-2333    35-3154    39-3542   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

MKDNR 	  000404 RG	#8-459      9-676     
MKSCDP	  005566 R	#30-2588    36-3330   
MNTBLK	  015040 R	#62-4806    63-4882   
MNTSYD	  015140 R	#63-4854    63-4901   
MODE00	= 000004	#23-2315    32-2766    32-2792    32-2795   
MODE01	= 000010	#23-2314    32-2766   
MOL   	= 010000	#8-381      9-652     
MPE11 	= 001000	#13-1503   #22-2229   #46-4027   #61-4691   
MSGDPB	  000422 R	#8-465     *9-670      9-675     *9-681     
MSGSIZ	= 000016	 8-466     #8-475     
MXF   	= 001000	#8-373      10-786    
M.KTAE	= 000010	#8-460     #30-2587   #30-2589   #49-4139   
M.KTEF	= 000002	#8-460     #30-2587   #30-2589   #49-4139   
M.KTMG	= 000004	#8-460     #30-2587   #30-2589   #49-4139   
M.KTUN	= 000006	#8-460     #30-2587   #30-2589   #49-4139   
NED   	= 010000	#8-370      10-712    
NEM   	= 004000	#8-371      10-712    
NODADR	= ******  GX	 19-1939   *19-1940    19-1972   *19-1978    19-2015   *19-2016    21-2067    21-2097   *21-2103   
NULSTP	= 000040	#13-1503   #22-2229   #46-4027   #61-4691   
NUPE  	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
NXTHDR	  017036 R	 66-5157    66-5157    66-5205    66-5205   #68-5304   
NXTSEC	  003420 R	 14-1656    14-1656    15-1719    15-1719   #17-1828   
N.DID 	= 000024	#61-4767   
N.FID 	= 000000	#61-4761    63-4952    64-5018   
N.FNAM	= 000006	#61-4762    63-4912    63-4933   
N.FTYP	= 000014	#61-4763   
N.FVER	= 000016	#61-4764   
N.NEXT	= 000022	#61-4766   
N.STAT	= 000020	#61-4765   
OFFLIN	= 000200	#23-2330   
ONLINE	= 004000	#23-2305    35-3143    36-3322    43-3855   
OPI   	= 020000	#8-393     
OPTVFU	= 004000	#23-2325    35-3199   
PAGZRO	= 040000	#23-2302    35-3185    36-3356    39-3487    39-3531   
PARENB	= 000002	#23-2319    34-3043    36-3362    37-3400    39-3497    39-3522    41-3765    44-3977   
PARFND	  016124 R	 65-5064   #65-5084   
PARMSG	  017577 R	 69-5397   #69-5464   
PBTHRD	= 000004	#22-2268    22-2270    22-2271    22-2272    32-2850    33-2960    33-2961   
PERCLR	= 001000	#13-1503   #22-2229   #46-4027   #61-4691   
PGE   	= 002000	#8-372      10-786    
PGM   	= 001000	#8-383     
PHYBLK	= 000040	#13-1512    14-1601    15-1724    16-1787   
PHYS  	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
PIDENT	= 000000	#13-1503   #22-2229   #46-4027   #61-4691   
PRI7  	= 000340	#13-1503   #22-2229   #46-4027   #61-4691   
PROPNT	= 000021	#13-1503   #22-2229   #46-4027   #61-4691   
PRTOFF	= 004000	#13-1503   #22-2229   #46-4027   #61-4691   
PR0   	= 000000	#13-1503   #22-2229   #46-4027   #61-4691   
PR1   	= 000040	#13-1503   #22-2229   #46-4027   #61-4691   
PR2   	= 000100	#13-1503   #22-2229   #46-4027   #61-4691   
PR3   	= 000140	#13-1503   #22-2229   #46-4027   #61-4691   
PR4   	= 000200	#13-1503   #22-2229    34-3038    36-3365   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PR5   	= 000240	#13-1503   #22-2229   #46-4027   #61-4691   
PR6   	= 000300	#13-1503   #22-2229   #46-4027   #61-4691   
PR7   	= 000340	#13-1503    21-2128   #22-2229    31-2643    32-2727   #46-4027    52-4216   #61-4691   
PS    	= 177776	 9-616      9-658      9-673     #13-1503    14-1678    14-1689    19-1928   *19-1928    20-2043   
                        *20-2043   *20-2048    21-2128   *21-2128   *21-2148   #22-2229    31-2643   *31-2643   *31-2646   
                         32-2727   *32-2727   *32-2734    34-3038   *34-3038   *34-3050    36-3365   *36-3365   *36-3367   
                         39-3473    43-3864   *43-3864   #46-4027    52-4216   *52-4216   *52-4219   #61-4691    66-5225   
                        *66-5225    67-5267   *67-5267   
PSWW1 	= 000005	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW10	= 000014	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW11	= 000015	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW12	= 000016	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW13	= 000017	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW2 	= 000006	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW3 	= 000007	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW4 	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW5 	= 000011	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW6 	= 000012	#13-1503   #22-2229   #46-4027   #61-4691   
PSWW7 	= 000013	#13-1503   #22-2229   #46-4027   #61-4691   
PUDADR	  014602 R	#62-4786   *63-4862    63-4891   *63-4978    65-5091    66-5174   
PULSE 	= 000020	#13-1503   #22-2229   #46-4027   #61-4691   
PUTR50	  017460 R	 69-5393    69-5393    69-5400    69-5400   #69-5424   
PUTR51	  017470 R	 69-5425    69-5425   #69-5433   
PUTSTR	  017450 R	 69-5387    69-5387    69-5389    69-5389    69-5391    69-5391    69-5398    69-5398   #69-5415   
                         69-5416   
QIOSTS	  014662 R	#62-4796    68-5368    68-5371   
QSIZE 	= 000023	#13-1503   #22-2229   #46-4027   #61-4691   
Q.IOAE	= 000012	#8-466     #35-3229   
Q.IOEF	= 000006	#8-466     #35-3229   
Q.IOFN	= 000002	#8-466     #35-3229   
Q.IOLU	= 000004	#8-466     #35-3229   
Q.IOPL	= 000014	#8-466     *9-670     *9-681     *35-3220   #35-3229   
Q.IOPR	= 000007	#8-466     #35-3229   
Q.IOSB	= 000010	#8-466     #35-3229   
RAMIS0	= 010000	#13-1503   #22-2229   #46-4027   #61-4691   
RAMLOD	= 000003	#23-2318    32-2795   
RAMPAR	= 000010	#23-2334    35-3154    35-3178    39-3542   
RCVBLK	  014544 R	#62-4783    63-4841    63-4873   
READ  	= 000007	#13-1533    14-1610   
REDHDR	  017052 R	 64-5033    64-5033   #68-5312   
REDLBL	  017114 R	 64-5029    64-5029    66-5167    66-5167   #68-5334   
REQBLK	  014550 R	#62-4784    62-4785    63-4932    65-5045    66-5226    67-5270    67-5271    69-5392   
REQTSK	  016700 R	 66-5217   #67-5267   
RETALL	  016610 R	#66-5243   
RETBUF	  016632 R	 64-4993    64-4993    66-5215    66-5215    66-5244   #66-5249   
RETNOD	  016522 R	 63-4983   #66-5224    67-5281   
RETRY 	= 000010	#8-440      9-572     #13-1511    14-1594   
RETXXX	  017112 R	 68-5305    68-5307   #68-5330   
RFMAD0	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
RFMAD1	= 040000	#13-1503   #22-2229   #46-4027   #61-4691   
RFMAD2	= 020000	#13-1503   #22-2229   #46-4027   #61-4691   
RFMAD3	= 010000	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RM    	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
RMR   	= 000004	#8-404      10-710    
RPAS  	= 000016	#8-410     
RPBA  	= 000004	#8-359     
RPBUF 	= ******  GX	*9-555     *9-560     *9-561     *9-570      9-632      9-657      9-663      9-665     *10-761    
                        *10-762     10-765     10-865     10-983    
RPCNT 	= ******  GX	*9-553      9-633      10-815    
RPCS1 	= 000000	#8-349     
RPCS2 	= 000010	#8-365      9-610      9-629      10-712     10-786    
RPDA  	= 000006	#8-361     
RPDBR 	= 000022	#8-414     
RPDC  	= 000034	#8-430     *9-656     
RPDS  	= 000012	#8-378      9-650     
RPDT  	= 000026	#8-418     
RPEC1 	= 000044	#8-432      10-849    
RPEC2 	= 000046	#8-434      10-873    
RPER1 	= 000014	#8-389      9-654      10-709    
RPEXP 	= 176700	#8-345      9-610      9-613      9-629      10-696     10-1172   
RPHD  	  000070 RG	#8-447     
RPLA  	= 000020	#8-412     
RPMR  	= 000024	#8-416     
RPOF  	= 000032	#8-423     
RPRNA 	= ******  GX	*9-552      9-628      9-662      10-757    
RPRTC 	= ******  GX	*9-572     *10-744    
RPSN  	= 000030	#8-420     
RPSTK 	  000350 RG	 8-448     #8-448     
RPTSK 	= ******  GX	*10-763    
RPUNIT	= ******  GX	*9-554      9-612      9-630     
RPWC  	= 000002	#8-357      10-813     10-968    
RPWLO 	  000400 R	#8-456      9-531     
RSTERR	= 001000	#23-2307    36-3362    37-3400    41-3765   
RSX$$E	= 000045	#3-97      
RSX$$F	= 000102	#3-105     #3-114      3-116     
RSX$$K	= 000126	#3-101     
RSX$$V	= 000014	#3-96      
RWRBLK	  017146 R	 68-5327    68-5327    68-5339    68-5339   #68-5348   
RWRHDR	  017070 R	 68-5314   #68-5324   
RXCS  	= 000000	#13-1518   
RXDB  	= 000002	#13-1519   *14-1671   *14-1674   
R$$E16	= ******	 10-907     10-1048   
R$$E18	= 000001	#8-328      8-498      10-838     10-986    
R$$JPO	= ******	 8-477      9-574      9-638      10-698     10-817     10-830     10-962     10-1072   
R$$11D	= 000001	#1-46      
R.AT  	= ******  GX	 19-1991   
R.DP  	= ******  GX	 19-2000   
R.FC  	= ******  GX	 9-562      9-564      14-1576    14-1578    14-1601    14-1606    19-1984    21-2068    21-2070   
                         33-2912    33-2941   
R.LU  	= ******  GX	 19-1986   
R.PB  	= ******  GX	 9-582      9-583     *9-597     *9-603      9-631      9-656      10-758     14-1595    14-1600   
                         15-1731    19-2004    19-2005    21-2072    21-2073    32-2850    33-2960    33-2964   
R50TBL	  017542 R	 69-5439   #69-5454   
SCD   	= 000040	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

SETBUF	  003442 R	 14-1616    14-1616    14-1642    14-1642   #17-1846   
SETLUN	  016302 R	#66-5150   
SETSTD	  015772 R	#65-5043   
SF.IR 	= 040000	#61-4725    67-5269   
SF.TA 	= 000001	#61-4724    67-5269   
SNSTR 	  004420 R	 19-2009    19-2009   #19-2022    20-2046    20-2046    21-2157    21-2157   
SSTSCR	  013332 R	 52-4262    52-4262    52-4281    52-4281   #53-4367   
SSTSLP	  007360 R	 32-2713    32-2713   #35-3118   
STAT  	= 174434	#13-1503   #22-2229   #46-4027   #61-4691   
STATD 	= 000034	#3-123     
STATUS	= 000022	#13-1503   #22-2229   #46-4027   #61-4691   
STDADR	= 014562 R	#62-4785    65-5043    66-5243   *66-5247    67-5268    69-5394   
STSWD 	= ******  GX	*19-1941   *19-2010    19-2013    19-2014   *19-2017   *21-2075   *21-2076   
SWR   	= 177570	#13-1503   #22-2229   #46-4027   #61-4691   
SWSLLT	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
SYFLAG	  014543 R	#62-4782    63-4904   *63-4907   
SYMNTD	  015274 R	 63-4864    63-4886   #63-4890   
SYMNT1	  015340 R	 63-4895    63-4897   #63-4903   
SYNTIM	= 000004	#23-2335    35-3154    39-3542   
S.DRFN	= 000034	#61-4768    62-4794   
S.FW  	= ******  GX	*67-5269   
S.TD  	= ******  GX	 69-5395   
TASKNF	  015516 R	 63-4856    63-4888    63-4928   #63-4965    63-4970    63-4972    63-4974    63-4977   
TB.ABO	= 040000	#22-2259    32-2777    41-3776    41-3779   
TB.DON	= 100000	#22-2258    40-3708    41-3779    43-3860    44-3944   
TB.EOF	= 020000	#22-2260    22-2264    32-2782    40-3690   
TB.LPC	= 010000	#22-2261    22-2264    32-2798    40-3681   
TB.RMD	= 004000	#22-2262    22-2264    32-2812    40-3696   
TB.SFN	= 036000	#22-2264    32-2779    44-3934   
TB.VFD	= 002000	#22-2263    22-2264    40-3702   
TENAD1	= 174410	#13-1503   #22-2229   #46-4027   #61-4691   
TENAD2	= 174412	#13-1503   #22-2229   #46-4027   #61-4691   
TESTLP	  010360 R	 32-2721    32-2721   #36-3321   
TEST00	= 000400	#23-2328   
TEST01	= 001000	#23-2327   
TEST02	= 002000	#23-2326   
TNAD1 	= 000010	#3-129     
TNAD2 	= 000012	#3-130     
TNCERR	  016112 R	#65-5078    65-5138   
TNFERR	  015606 R	 63-4968   #63-4981   
TOBM  	= 000004	#13-1503   #22-2229   #46-4027   #61-4691   
TOD   	= 000003	#13-1503   #22-2229   #46-4027   #61-4691   
TOIP  	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
TOIT  	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
TO10  	= 000200	#13-1503   #22-2229   #46-4027   #61-4691   
TO10AD	= 174420	#13-1503   #22-2229   #46-4027   #61-4691   
TO10BC	= 174414	#13-1503   #22-2229   #46-4027   #61-4691   
TO10BM	= 000001	#13-1503   #22-2229   #46-4027   #61-4691   
TO10DB	= 000400	#13-1503   #22-2229   #46-4027   #61-4691   
TO10DN	= 100000	#13-1503   #22-2229   #46-4027   #61-4691   
TO10DT	= 174424	#13-1503   #22-2229   #46-4027   #61-4691   
TO10ER	= 020000	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TO10PK	= ******  GX	 19-1981   
TO11  	= 000100	#13-1503   #22-2229   #46-4027   #61-4691   
TO11AD	= 174422	#13-1503   #22-2229   #46-4027   #61-4691   
TO11BC	= 174416	#13-1503   #22-2229   #46-4027   #61-4691   
TO11BM	= 020000	#13-1503   #22-2229   #46-4027   #61-4691   
TO11DB	= 004000	#13-1503   #22-2229   #46-4027   #61-4691   
TO11DN	= 000200	#13-1503   #22-2229   #46-4027   #61-4691   
TO11DT	= 174426	#13-1503   #22-2229   #46-4027   #61-4691   
TO11ER	= 000002	#13-1503   #22-2229   #46-4027   #61-4691   
TR    	= 000200	#13-1523    14-1623    14-1643    17-1865   
TRE   	= 040000	#8-351      10-706    
TRKSEC	  003272 R	 14-1608    14-1608   #16-1774   
TRWAIT	  003472 R	 14-1669    14-1669    14-1672    14-1672   #17-1864   
TSKFND	  015640 R	 63-4960   #64-5000   
TSKLUN	= 000002	#61-4729    63-4855    63-4860    63-4976    68-5368   
TSKMSG	  017570 R	 69-5390   #69-5463   
TSTMOD	= 000001	#23-2316   
TTBERR	  016100 R	#65-5076    65-5121   
TTPEN 	= ******  GX	 8-448      13-1536    18-1925    27-2487    49-4114    62-4774   
TYPBUF	  014666 R	#62-4797    69-5385    69-5404   
TYPMSG	  017246 R	 63-4887    63-4887    63-4906    63-4906    63-4982    63-4982    65-5070    65-5070    65-5073   
                         65-5073    65-5076    65-5076    65-5078    65-5078    66-5221    66-5221    67-5281    67-5281   
                        #69-5384   
T.BA  	= ******  GX	 65-5099    65-5123   
T.HBCT	= ******  GX	 32-2841   *33-2965    35-3166    44-3960   
T.HCAD	= ******  GX	*32-2784    32-2790    32-2801    32-2828   *33-2966   *39-3508    40-3678    40-3687    44-3957   
T.HCBC	= ******  GX	 32-2698    32-2776   *32-2789   *32-2790   *33-2967   *39-3507    40-3637   *40-3638   *40-3709   
                        *41-3776    41-3777   *41-3779   *43-3860    44-3931    44-3934   *44-3944   
T.HEMA	= 177774	#22-2270   *33-2968    44-3972   
T.HIBC	= 177776	#22-2272    32-2848    33-2961   
T.HVFC	= 177775	#22-2271   *33-2972    44-3962   *44-3964   
T.PN  	= ******  GX	 65-5061    65-5063   
T.PZ  	= ******  GX	 65-5120   
T.SZ  	= ******  GX	 65-5066   
T10AD 	= 000020	#3-127     
T11AD 	= 000022	#3-126     
T11BC 	= 000016	#3-128     
T50TBL	  017532 R	 69-5433   #69-5452   
UF.TL 	= ******  GX	 63-4971   
UNASG1	= 000032	#13-1503   #22-2229   #46-4027   #61-4691   
UNASG2	= 000033	#13-1503   #22-2229   #46-4027   #61-4691   
UNASG3	= 000034	#13-1503   #22-2229   #46-4027   #61-4691   
UNASG4	= 000035	#13-1503   #22-2229   #46-4027   #61-4691   
UNASG5	= 000036	#13-1503   #22-2229   #46-4027   #61-4691   
UNASG6	= 000037	#13-1503   #22-2229   #46-4027   #61-4691   
UNIT  	= 000020	#13-1520    14-1571   
UNS   	= 040000	#8-392      9-654      10-710    
UPE   	= 020000	#8-369      10-786    
U.ACP 	= ******  GX	*63-4878   
U.DACP	= ******  GX	 63-4876   
U.DN  	= ******  GX	 63-4892    63-4976    66-5180   
U.FB  	= ******  GX	 63-4971   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

U.RP  	= ******  GX	 19-1997    63-4861    63-4969   
U.SZ  	= 000050	#61-4723    63-4849    63-4966    65-5095    66-5185   
U.UN  	= ******  GX	 63-4893    63-4976    66-5182   
U.VA  	= ******  GX	 63-4863    63-4973   
VFCFF 	  007124 R	 33-2927   #33-2984   
VFCTBL	  007122 R	 33-2970   #33-2982   
VFUERR	= 000100	#23-2331    39-3542   
VFULOD	= 000002	#23-2317    32-2792   
VFURDY	= 010000	#23-2304    35-3148   
VV    	= 000100	#8-385      9-652     
WCE   	= 040000	#8-368      10-786    
WCF   	= 000040	#8-401     
WEP   	= 000010	#13-1503   #22-2229   #46-4027   #61-4691   
WFDNR 	  000416 RG	#8-462      9-677     
WFEF1 	  003510 R	#18-1914    19-1927   
WFPKT 	  002356 R	#13-1538    14-1565   
WLE   	= 004000	#8-395      10-710     10-715    
WRITE 	= 000005	#13-1532    14-1662   
WRL   	= 004000	#8-382     
WRTDD 	= 000015	#13-1534    14-1665   
WRTHDR	  017064 R	 66-5210    66-5210    68-5306    68-5306   #68-5318   
W.TSEF	= 000002	#8-451     #8-457     #8-463     #13-1538   #13-1540   
ZSTOP 	= 040000	#13-1503   #22-2229   #46-4027   #61-4691   
$CDINT	  013762 RG	#56-4536   
$CD11 	= 000001	#1-38      
$DBDTE	= 000001	#1-44      
$DH11 	= 000001	#1-42      
$DIRAC	= 000001	#8-324      9-536     #18-1875    19-1948    21-2098   
$DIV  	  000032 RG	#6-259      9-600      9-600      10-855     10-855     69-5437    69-5437   
$DSW  	= ******  GX	 67-5273    67-5278   
$DTA  	= ******	 10-1181   
$DTE  	= 000001	#1-45      
$DXINT	  003060 RG	#15-1701   
$FE   	= 000001	#1-40      
$F11  	= 000001	#1-41      
$LPINT	  010650 RG	#39-3472   
$LP20 	= 000001	#1-36      
$MUL  	  000000 RG	#6-232     
$RP04 	= 000001	#1-39      
$RX11 	= 000001	#1-61       12-1441   
$TOP10	= ******	 1-52       3-106     
$TOP20	= 000001	#1-34       1-60       3-113     
$T1091	= ******	 1-48      
$$    	= 000037	#9-533      9-533     #9-600      9-600     #9-666      9-666     #10-764     10-764    #10-767    
                         10-767    #10-855     10-855    #10-874     10-874    #10-884     10-884    #10-890     10-890    
                        #10-891     10-891    #10-892     10-892    #10-899     10-899    #10-1156    10-1156   #14-1567   
                         14-1567   #14-1608    14-1608   #14-1616    14-1616   #14-1642    14-1642   #14-1656    14-1656   
                        #14-1669    14-1669   #14-1672    14-1672   #14-1684    14-1684   #15-1719    15-1719   #15-1735   
                         15-1735   #19-1946    19-1946   #19-1961    19-1961   #19-1966    19-1966   #19-1975    19-1975   
                        #19-2009    19-2009   #19-2018    19-2018   #20-2046    20-2046   #21-2092    21-2092   #21-2106   
                         21-2106   #21-2157    21-2157   #30-2612    30-2612   #30-2625    30-2625   #31-2649    31-2649   
                        #32-2713    32-2713   #32-2721    32-2721   #32-2745    32-2745   #32-2771    32-2771   #32-2816   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         32-2816   #32-2851    32-2851   #32-2858    32-2858   #33-2888    33-2888   #33-2943    33-2943   
                        #33-2951    33-2951   #33-2977    33-2977   #34-3048    34-3048   #35-3183    35-3183   #35-3284   
                         35-3284   #36-3366    36-3366   #39-3491    39-3491   #39-3536    39-3536   #39-3556    39-3556   
                        #40-3667    40-3667   #40-3672    40-3672   #40-3715    40-3715   #41-3786    41-3786   #42-3823   
                         42-3823   #43-3882    43-3882   #43-3887    43-3887   #44-3951    44-3951   #51-4196    51-4196   
                        #51-4207    51-4207   #52-4222    52-4222   #52-4250    52-4250   #52-4262    52-4262   #52-4281   
                         52-4281   #52-4315    52-4315   #53-4465    53-4465   #56-4549    56-4549   #57-4578    57-4578   
                        #58-4603    58-4603   #59-4632    59-4632   #63-4844    63-4844   #63-4877    63-4877   #63-4885   
                         63-4885   #63-4887    63-4887   #63-4906    63-4906   #63-4927    63-4927   #63-4959    63-4959   
                        #63-4982    63-4982   #64-4993    64-4993   #64-5002    64-5002   #64-5009    64-5009   #64-5023   
                         64-5023   #64-5029    64-5029   #64-5033    64-5033   #65-5070    65-5070   #65-5073    65-5073   
                        #65-5076    65-5076   #65-5078    65-5078   #66-5157    66-5157   #66-5167    66-5167   #66-5205   
                         66-5205   #66-5210    66-5210   #66-5215    66-5215   #66-5216    66-5216   #66-5221    66-5221   
                        #66-5222    66-5222   #66-5227    66-5227   #66-5239    66-5239   #66-5246    66-5246   #66-5253   
                         66-5253   #66-5257    66-5257   #67-5272    67-5272   #67-5281    67-5281   #68-5306    68-5306   
                        #68-5327    68-5327   #68-5339    68-5339   #69-5387    69-5387   #69-5389    69-5389   #69-5391   
                         69-5391   #69-5393    69-5393   #69-5398    69-5398   #69-5400    69-5400   #69-5425    69-5425   
                        #69-5437    69-5437   
$$$   	= 000251 R	#35-3299    35-3299   #35-3299    35-3299   #35-3299    35-3299   #35-3299    35-3299   #35-3299   
                         35-3299    35-3299    35-3299    35-3299    35-3299    35-3299   #35-3299    35-3299    35-3299   
                         35-3299    35-3299    35-3299   #35-3299    35-3299    35-3299    35-3299    35-3299    35-3299   
                        #35-3299    35-3299    35-3299    35-3299    35-3299    35-3299   #35-3299   #37-3408    37-3408   
                        #37-3408    37-3408   #37-3408    37-3408   #37-3408    37-3408    37-3408    37-3408    37-3408   
                         37-3408   #37-3408    37-3408    37-3408    37-3408    37-3408   #37-3408    37-3408    37-3408   
                         37-3408    37-3408   #37-3408   #39-3561    39-3561   #39-3561    39-3561   #39-3561    39-3561   
                        #39-3561    39-3561    39-3561    39-3561    39-3561    39-3561   #39-3561    39-3561    39-3561   
                         39-3561    39-3561   #39-3561    39-3561    39-3561    39-3561    39-3561   #39-3561   #40-3720   
                         40-3720   #40-3720    40-3720   #40-3720    40-3720   #40-3720    40-3720    40-3720    40-3720   
                         40-3720    40-3720   #40-3720    40-3720    40-3720    40-3720    40-3720   #40-3720    40-3720   
                         40-3720    40-3720    40-3720   #40-3720   #41-3788    41-3788   #41-3788    41-3788   #41-3788   
                         41-3788   #41-3788    41-3788    41-3788    41-3788    41-3788    41-3788   #41-3788    41-3788   
                         41-3788    41-3788    41-3788   #41-3788    41-3788    41-3788    41-3788    41-3788   #41-3788   
                        #42-3825    42-3825   #42-3825    42-3825    42-3825    42-3825   #42-3825   #43-3888    43-3888   
                        #43-3888    43-3888   #43-3888    43-3888    43-3888    43-3888    43-3888   #43-3888    43-3888   
                         43-3888    43-3888   #43-3888   #63-4887    63-4887   #63-4906    63-4906   #63-4982    63-4982   
                        #65-5070    65-5070   #65-5073    65-5073   #65-5076    65-5076   #65-5078    65-5078   #66-5221   
                         66-5221   #67-5281    67-5281   
$$$ARG	= 000003	#8-466      8-466     #8-466      8-466     #8-466      8-466     #35-3229    35-3229   #35-3229   
                         35-3229   #35-3229    35-3229   #35-3229    35-3229   #63-4855    63-4855   #63-4855    63-4855   
                        #63-4855    63-4855   #63-4855    63-4855    63-4855    63-4855    63-4855    63-4855    63-4855   
                         63-4855    63-4855    63-4855    63-4855   #63-4976    63-4976   #63-4976    63-4976   #63-4976   
                         63-4976   #63-4976    63-4976    63-4976    63-4976    63-4976    63-4976    63-4976    63-4976   
                         63-4976    63-4976    63-4976   #68-5368    68-5368    68-5368    68-5368    68-5368    68-5368   
                         68-5368    68-5368    68-5368    68-5368    68-5368    68-5368   #69-5406    69-5406    69-5406   
                         69-5406    69-5406    69-5406    69-5406    69-5406    69-5406    69-5406    69-5406    69-5406   
$$$GLB	= ******	 8-451      8-451      8-454      8-454      8-457      8-457      8-460      8-460      8-460     
                         8-460      8-460      8-463      8-463      8-466      8-466      8-466      8-466      8-466     
                         8-466      8-466      8-466      13-1538    13-1538    13-1540    13-1540    18-1914    30-2587   
                         30-2587    30-2587    30-2587    30-2587    30-2589    30-2589    30-2589    30-2589    30-2589   
                         35-3229    35-3229    35-3229    35-3229    35-3229    35-3229    35-3229    35-3229    49-4139   
                         49-4139    49-4139    49-4139    49-4139   
$$$OST	= 000012	#8-451      8-451      8-451     #8-451     #8-454      8-454      8-454     #8-454     #8-457     
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         8-457      8-457     #8-457     #8-460      8-460      8-460     #8-460      8-460      8-460     
                        #8-460      8-460      8-460     #8-460      8-460      8-460     #8-460     #8-463      8-463     
                         8-463     #8-463     #8-466      8-466      8-466     #8-466      8-466      8-466     #8-466     
                         8-466      8-466     #8-466      8-466      8-466     #8-466      8-466      8-466     #8-466     
                         8-466      8-466     #8-466      8-466     #13-1538    13-1538    13-1538   #13-1538   #13-1540   
                         13-1540    13-1540   #13-1540   #30-2587    30-2587    30-2587   #30-2587    30-2587    30-2587   
                        #30-2587    30-2587    30-2587   #30-2587    30-2587    30-2587   #30-2587   #30-2589    30-2589   
                         30-2589   #30-2589    30-2589    30-2589   #30-2589    30-2589    30-2589   #30-2589    30-2589   
                         30-2589   #30-2589   #35-3229    35-3229    35-3229   #35-3229    35-3229    35-3229   #35-3229   
                         35-3229    35-3229   #35-3229    35-3229    35-3229   #35-3229    35-3229    35-3229   #35-3229   
                         35-3229    35-3229   #35-3229    35-3229   #49-4139    49-4139    49-4139   #49-4139    49-4139   
                         49-4139   #49-4139    49-4139    49-4139   #49-4139    49-4139    49-4139   #49-4139   
$$$T1 	= 000011	#63-4841    63-4841   #68-5368    68-5368   #69-5406    69-5406   
$$$T2 	= 000000	#67-5271    67-5271   
$$$$  	= 000002	#35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299   
                         35-3299    35-3299   #35-3299    35-3299   #35-3299    35-3299   #35-3299    35-3299    35-3299   
                        #35-3299    35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299    35-3299   #35-3299   
                         35-3299   #35-3299    35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299    35-3299   
                         35-3299   #35-3299    35-3299   #35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299   
                         35-3299    35-3299   #35-3299    35-3299    35-3299   #35-3299    35-3299   #37-3408    37-3408   
                        #37-3408    37-3408    37-3408   #37-3408    37-3408    37-3408   #37-3408    37-3408   #37-3408   
                         37-3408   #37-3408    37-3408    37-3408   #37-3408    37-3408    37-3408   #37-3408    37-3408   
                        #37-3408    37-3408   #37-3408    37-3408    37-3408   #37-3408    37-3408    37-3408   #37-3408   
                         37-3408   #39-3561    39-3561   #39-3561    39-3561    39-3561   #39-3561    39-3561    39-3561   
                        #39-3561    39-3561   #39-3561    39-3561   #39-3561    39-3561    39-3561   #39-3561    39-3561   
                         39-3561   #39-3561    39-3561   #39-3561    39-3561   #39-3561    39-3561    39-3561   #39-3561   
                         39-3561    39-3561   #39-3561    39-3561   #40-3720    40-3720   #40-3720    40-3720    40-3720   
                        #40-3720    40-3720    40-3720   #40-3720    40-3720   #40-3720    40-3720   #40-3720    40-3720   
                         40-3720   #40-3720    40-3720    40-3720   #40-3720    40-3720   #40-3720    40-3720   #40-3720   
                         40-3720    40-3720   #40-3720    40-3720    40-3720   #40-3720    40-3720   #41-3788    41-3788   
                        #41-3788    41-3788    41-3788   #41-3788    41-3788    41-3788   #41-3788    41-3788   #41-3788   
                         41-3788   #41-3788    41-3788    41-3788   #41-3788    41-3788    41-3788   #41-3788    41-3788   
                        #41-3788    41-3788   #41-3788    41-3788    41-3788   #41-3788    41-3788    41-3788   #41-3788   
                         41-3788   #42-3825    42-3825   #42-3825    42-3825   #43-3888    43-3888   #43-3888    43-3888   
                         43-3888   #43-3888    43-3888   #43-3888    43-3888   #43-3888    43-3888    43-3888   #43-3888   
                         43-3888   
.BGBUF	= ******  GX	 32-2770    32-2810    64-5000    64-5007    66-5250   
.BRCLK	= 005000	#13-1503   #22-2229   #46-4027   #61-4691   
.CECLK	= 004000	#13-1503   #22-2229   #46-4027   #61-4691   
.CLRMR	= 006000	#13-1503   #22-2229   #46-4027   #61-4691   
.CLRUN	= 010000	#13-1503   #22-2229   #46-4027   #61-4691   
.COMEF	= ******  GX	 10-1151    19-1932    35-3124    52-4276    53-4371   
.CONBT	= 012000	#13-1503   #22-2229   #46-4027   #61-4691   
.CRPFL	= ******  GX	 52-4220   *52-4223   
.CRTSK	= ******  GX	 30-2619    51-4201    63-4858   
.CSHRG	= 164000	#13-1503   #22-2229   #46-4027   #61-4691   
.CYLTM	= 000074	#22-2281    30-2587    30-2587    30-2589   #46-4047    49-4139    49-4139   
.DBINT	  001236 RG	#10-691    
.DRLTC	= 015000	#13-1503   #22-2229   #46-4027   #61-4691   
.DSACF	= 066000	#13-1503   #22-2229   #46-4027   #61-4691   
.DSIOJ	= 065000	#13-1503   #22-2229   #46-4027   #61-4691   
.EIOJA	= 067000	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.FEACK	  004436 RG	#20-2031   
.FEST 	  004542 RG	#21-2058   
.GFNR 	= 102000	#13-1503   #22-2229   #46-4027   #61-4691   
.INICL	= 070000	#13-1503   #22-2229   #46-4027   #61-4691   
.IRLTC	= 014000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRDL	= 052000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRDR	= 051000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRM1	= 057000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRM2	= 056000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRM3	= 055000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRM4	= 054000	#13-1503   #22-2229   #46-4027   #61-4691   
.LCRM5	= 053000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDAR 	= 077000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDBRL	= 043000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDBRR	= 042000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDCK1	= 046000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDCK2	= 047000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDDIS	= 045000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDRJD	= 064000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDRJV	= 063000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDRM1	= 060000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDRM2	= 061000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDRM3	= 062000	#13-1503   #22-2229   #46-4027   #61-4691   
.LDSEL	= 044000	#13-1503   #22-2229   #46-4027   #61-4691   
.LPPFL	= ******  GX	 31-2647   *31-2650   
.MEMRS	= 076000	#13-1503   #22-2229   #46-4027   #61-4691   
.PCAB1	= 150000	#13-1503   #22-2229   #46-4027   #61-4691   
.PCAB2	= 151000	#13-1503   #22-2229   #46-4027   #61-4691   
.PCAB3	= 152000	#13-1503   #22-2229   #46-4027   #61-4691   
.PCAB4	= 153000	#13-1503   #22-2229   #46-4027   #61-4691   
.POLLH	= ******  GX	 66-5245   
.PUDBA	= ******  GX	 63-4849    65-5093    66-5178   
.PUDEA	= ******  GX	 63-4967    66-5186   
.RCRM1	= 147000	#13-1503   #22-2229   #46-4027   #61-4691   
.RCRM2	= 146000	#13-1503   #22-2229   #46-4027   #61-4691   
.RCRM3	= 145000	#13-1503   #22-2229   #46-4027   #61-4691   
.RCRM4	= 144000	#13-1503   #22-2229   #46-4027   #61-4691   
.RCSPF	= 141000	#13-1503   #22-2229   #46-4027   #61-4691   
.RDJ14	= 134000	#13-1503   #22-2229   #46-4027   #61-4691   
.RDJ71	= 135000	#13-1503   #22-2229   #46-4027   #61-4691   
.RDMAB	= 133000	#13-1503   #22-2229   #46-4027   #61-4691   
.RPELC	= ******  GX	 10-1153   *10-1158   
.RPELQ	= ******  GX	 10-1159   
.RPUNT	= ******  GX	 19-1989   
.SECLK	= 003000	#13-1503   #22-2229   #46-4027   #61-4691   
.SETMR	= 007000	#13-1503   #22-2229   #46-4027   #61-4691   
.SETRN	= 011000	#13-1503   #22-2229   #46-4027   #61-4691   
.SSCLK	= 002000	#13-1503   #22-2229   #46-4027   #61-4691   
.STDTA	= ******  GX	 66-5231   
.STDTZ	= ******  GX	*66-5229    66-5230   
.STPCL	= 000000	#13-1503   #22-2229   #46-4027   #61-4691   
.STRCL	= 001000	#13-1503   #22-2229   #46-4027   #61-4691   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.TPDBA	= ******  GX	 65-5059   
.TPDEA	= ******  GX	 65-5067   
.WRMBX	= 071000	#13-1503   #22-2229   #46-4027   #61-4691   
..AKCR	  014112 RG	#59-4623   
..AKLP	  011566 RG	#42-3810   
..ALCB	= ******  GX	 10-1156    10-1156   
..ALC2	= ******  GX	 32-2816    32-2816    64-5002    64-5002    64-5009    64-5009   
..DECB	= ******  GX	 32-2858    32-2858   
..DECN	= ******  GX	 21-2092    21-2092    40-3672    40-3672    57-4578    57-4578   
..DEC2	= ******  GX	 32-2771    32-2771    66-5253    66-5253    66-5257    66-5257   
..DOLP	  012010 RG	 36-3366    36-3366    39-3536    39-3536   #44-3926   
..DOL1	  011774 RG	 34-3048    34-3048    39-3491    39-3491   #44-3920   
..DQRN	= ******  GX	 9-533      9-533      14-1567    14-1567    19-1946    19-1946    19-1975    19-1975    33-2888   
                         33-2888   
..DSEV	= ******  GX	 10-764     10-764     15-1735    15-1735    39-3556    39-3556    40-3667    40-3667    41-3786   
                         41-3786    42-3823    42-3823    43-3882    43-3882    44-3951    44-3951    59-4632    59-4632   
..ENB0	= ******  GX	 19-1966    19-1966    43-3887    43-3887    66-5239    66-5239    67-5272    67-5272   
..FSTD	= ******  GX	 63-4877    63-4877    66-5227    66-5227   
..INTX	= ******  GX	 10-773     15-1742    39-3562    56-4553   
..IODN	= ******  GX	 9-666      9-666      14-1684    14-1684    19-1961    19-1961    19-2018    19-2018    21-2106   
                         21-2106    32-2851    32-2851    33-2951    33-2951   
..NADD	= ******  GX	 66-5246    66-5246   
..PTLP	  011646 RG	 33-2977    33-2977    40-3715    40-3715   #43-3849   
..SACK	= ******  GX	 21-2095    32-2745    32-2745   
..SPCR	  014070 RG	#58-4601   
..SPLP	  011414 RG	 33-2943    33-2943    35-3183    35-3183   #41-3749   
..STCR	  014046 RG	#57-4577   
..STIN	= ******  GX	 19-2025    35-3284    35-3284    52-4250    52-4250    53-4465    53-4465   
..STLP	  011204 RG	#40-3632   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 20

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$ 		#22-2227   
ALUN$S		#61-4690    63-4855    63-4976   
CALL  		#8-336      9-533      9-600      9-666      10-764     10-767     10-855     10-874     10-884     10-890    
                 10-891     10-892     10-899     10-1156   #13-1502    14-1567    14-1608    14-1616    14-1642    14-1656   
                 14-1669    14-1672    14-1684    15-1719    15-1735   #18-1905    19-1946    19-1961    19-1966    19-1975   
                 19-2009    19-2018    20-2046    21-2092    21-2106    21-2157   #22-2228    30-2612    30-2625    31-2649   
                 32-2713    32-2721    32-2745    32-2771    32-2816    32-2851    32-2858    33-2888    33-2943    33-2951   
                 33-2977    34-3048    35-3183    35-3284    36-3366    39-3491    39-3536    39-3556    40-3667    40-3672   
                 40-3715    41-3786    42-3823    43-3882    43-3887    44-3951   #46-4026    51-4196    51-4207    52-4222   
                 52-4250    52-4262    52-4281    52-4315    53-4465    56-4549    57-4578    58-4603    59-4632   #61-4690   
                 63-4844    63-4877    63-4885    63-4887    63-4906    63-4927    63-4959    63-4982    64-4993    64-5002   
                 64-5009    64-5023    64-5029    64-5033    65-5070    65-5073    65-5076    65-5078    66-5157    66-5167   
                 66-5205    66-5210    66-5215    66-5216    66-5221    66-5222    66-5227    66-5239    66-5246    66-5253   
                 66-5257    67-5272    67-5281    68-5306    68-5327    68-5339    69-5387    69-5389    69-5391    69-5393   
                 69-5398    69-5400    69-5425    69-5437   
CALLR 		#18-1905    19-2025    21-2095   
CLEF$ 		#8-336      8-454     
DIR$  		#8-336     #9-531     #9-620     #9-620     #9-660     #9-661     #9-675     #9-676     #9-677     #13-1502   
                #14-1565   #14-1680   #18-1904   #19-1927   #22-2227   #30-2622   #30-2623   #30-2623   #30-2624   #30-2624   
                #31-2640   #31-2640   #32-2818   #32-2818   #35-3123   #35-3123   #35-3225   #36-3330   #36-3332   #36-3332   
                #46-4026   #51-4204   #51-4205   #51-4205   #51-4206   #51-4206   #52-4214   #52-4214   #52-4275   #52-4275   
                #53-4370   #53-4370   #63-4841   #63-4841   #63-4855   #63-4855   #63-4976   #63-4976   #64-4994   #64-4994   
                #67-5271   #67-5271   #68-5368   #68-5368   #69-5406   #69-5406   
ERR   		#61-4705   #63-4887   #63-4982   #65-5070   #65-5073   #65-5076   #65-5078   #66-5221   #67-5281   
ERRF  		#61-4709   #65-5070   #65-5073   #65-5076   
ERRN  		#61-4714   #67-5281   
ERR$  		#9-531     #9-620     #9-660     #9-661     #9-675     #9-676     #9-677     #14-1565   #14-1680   #19-1927   
                #30-2622   #30-2623   #30-2624   #31-2640   #32-2818   #35-3123   #35-3225   #36-3330   #36-3332   #51-4204   
                #51-4205   #51-4206   #52-4214   #52-4275   #53-4370   #63-4841   #63-4855   #63-4976   #64-4994   #67-5271   
                #68-5368   #69-5406   
IDENT$		#4-144     
MOV$  		#30-2623   #30-2623   #30-2623   #30-2624   #30-2624   #31-2640   #31-2640   #36-3332   #36-3332   #51-4205   
                #51-4205   #51-4205   #51-4206   #51-4206   #52-4214   #52-4214   #63-4841   #63-4841   #63-4855   #63-4855   
                #63-4855   #63-4855   #63-4855   #63-4976   #63-4976   #63-4976   #63-4976   #63-4976   #67-5271   #67-5271   
                #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   #68-5368   
                #68-5368   #68-5368   #69-5406   #69-5406   #69-5406   #69-5406   #69-5406   #69-5406   #69-5406   #69-5406   
                #69-5406   
MRKT$ 		#8-336     #8-460     #22-2227   #30-2587   #30-2589   #46-4025   #49-4139   
MSG   		#61-4696    63-4887    63-4906    63-4982    65-5070    65-5073    65-5076    65-5078    66-5221    67-5281   
MVB$  		#67-5271   #67-5271   #68-5368   #68-5368   #69-5406   #69-5406   
NBL$  		#63-4855    63-4855   #63-4976    63-4976   
OFF$  		#8-451      8-451      8-451     #8-454      8-454      8-454     #8-457      8-457      8-457     #8-460     
                 8-460      8-460      8-460      8-460      8-460     #8-463      8-463      8-463     #8-466      8-466     
                 8-466      8-466      8-466      8-466      8-466      8-466      8-466     #13-1538    13-1538    13-1538   
                #13-1540    13-1540    13-1540   #30-2587    30-2587    30-2587    30-2587    30-2587    30-2587   #30-2589   
                 30-2589    30-2589    30-2589    30-2589    30-2589   #35-3229    35-3229    35-3229    35-3229    35-3229   
                 35-3229    35-3229    35-3229    35-3229   #49-4139    49-4139    49-4139    49-4139    49-4139    49-4139   
POP   		#22-2228   #32-2772   #32-2837   #32-2852   #35-3285   #35-3299   #35-3299   #35-3299   #35-3299   #36-3368   
                #37-3408   #37-3408   #37-3408   #39-3519   #39-3525   #39-3561   #39-3561   #39-3561   #40-3720   #40-3720   
                #40-3720   #41-3788   #41-3788   #41-3788   #42-3825   #43-3888   #43-3888   #46-4026   #61-4690   #68-5329   
                #68-5340   #69-5407   #69-5408   #69-5447   
PUSH  		#22-2228    32-2684    32-2767    32-2807    32-2846    35-3119    35-3280    36-3364    37-3388    39-3474   
DRIVERS20  CREATED BY  MACRO  ON 11-NOV-81 AT 11:21	PAGE 21

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

                 39-3511    40-3633    41-3750    42-3811    43-3850   #46-4026   #61-4690    63-4887    63-4906    63-4982   
                 65-5070    65-5073    65-5076    65-5078    66-5221    67-5281    68-5324    68-5334    69-5384    69-5438   
QDPB$ 		#8-466     #8-466     #35-3229   #35-3229   
QDPB$S		#68-5368   #68-5368   #69-5406   #69-5406   
QIOSY$		#8-336     #8-338     #13-1500   #13-1501   #22-2227   #22-2230   #61-4690   #61-4692   
QIOW$ 		#8-336      8-466     #22-2227    35-3229   
QIOW$S		#61-4690   #68-5368   #69-5406   
RCVX$S		#61-4690    63-4841   
RESTOR		#35-3119    35-3299   #37-3388    37-3408   #39-3474    39-3561   #40-3633    40-3720   #41-3750    41-3788   
                #42-3811    42-3825   #43-3850    43-3888   
RETURN		#6-212     #6-271     #8-336     #10-1007   #10-1044   #10-1179   #13-1502   #16-1805   #17-1833   #17-1853   
                #17-1869   #18-1905   #20-2050   #22-2228   #35-3300   #36-3373   #37-3409   #40-3721   #41-3789   #42-3826   
                #43-3889   #44-3982   #46-4026   #53-4472   #54-4486   #58-4605   #59-4633   #61-4690   #66-5261   #68-5330   
                #68-5341   #68-5375   #69-5409   #69-5418   #69-5450   
RFA$  		#63-4841   #63-4841   #67-5271   #67-5271   #67-5271   
RQST$S		#61-4690   #67-5271   
RVP$  		#31-2640   #52-4214   #63-4855   #63-4855   #63-4976   #63-4976   #68-5368   #68-5368   #69-5406   #69-5406   
SAVE  		#22-2236    35-3119    37-3388    39-3474    40-3633    41-3750    42-3811    43-3850   
SPRA$S		#22-2227   #30-2624   #46-4025   #51-4206   
SVTK$S		#22-2227   #30-2623   #46-4025   #51-4205   
VDPB$S		#63-4841   #63-4841   
WSIG$S		#8-336      9-620     #22-2227    32-2818    35-3123   #46-4025    52-4275    53-4370   #61-4690    64-4994   
WTLO$ 		#18-1904   #18-1914   
WTLO$S		#22-2227    31-2640   #46-4025    52-4214   
WTSE$ 		#8-336     #8-451     #8-457     #8-463     #13-1502   #13-1538   #13-1540   
WTSE$S		#22-2227   #36-3332   #46-4025   
$DEF  		#13-1500   #13-1503   #22-2228   #22-2229   #46-4026   #46-4027   #61-4690   #61-4691   
.ENB  		#18-1904    21-2148   #22-2228    31-2646    32-2734   #46-4026    52-4219   
.ENB0 		#18-1904    19-1966   #22-2228    43-3887   #61-4690    66-5239    67-5272   
.ENB4 		#22-2286    34-3050    36-3367   
.ENB6 		#18-1904    20-2048   
.INH  		#18-1904   #21-2128   #22-2228   #31-2643   #32-2727   #46-4026   #52-4216   
.INH0 		#18-1904   #19-1928   #22-2228   #43-3864   #61-4690   #66-5225   #67-5267   
.INH4 		#22-2282    34-3038    36-3365   
.INH6 		#18-1904   #20-2043   
.STKM 		#8-336     #8-448     #13-1502   #13-1536   #18-1904   #18-1925   #22-2228   #27-2487   #46-4026   #49-4114   
                #61-4690   #62-4774