Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/driver.l10
There are 3 other files named driver.l10 in the archive. Click here to see a list.
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55
TABLE OF CONTENTS

    19- 2075	TITLE PAGE
    20- 2110	COMMON PARAMETERS AND MACROS
    21- 2197	LP-20 DEVICE REGISTER DEFINITIONS
    22- 2267	COMMON DEVICE PARAMETER MODULE
    23- 2300	DEVICE STATUS BIT DEFINITIONS
    24- 2355	LP-20 COMMON DATA MODULE
    25- 2389	COMMON VARIABLES
    26- 2397	LP-20 DEVICE TABLES
    27- 2433	LP-20 DRIVER TASK MODULE
    28- 2473	LPINI	(INITIALIZE LP-20 TASK)
    29- 2531	LPLOOP	(LP-20 DRIVER TASK LOOP)
    30- 2558	LPIOD	(LP TASK I/O DONE)
    31- 2768	LPNIR	(LP TASK QUEUE I/O REQUEST)
    32- 2899	LPMKT	(LP TASK MARK-TIME REQUEST)
    33- 2971	SSTSLP	(SEND LP-20 STATUS TO -10)
    34- 3206	TESTLP	(START LP-20 GOING ON THREADED LIST)
    35- 3278	INITLP	(INITALIZE ALL LP'S)
    36- 3316	LP-20 INTERRUPT SERVICE MODULE
    37- 3348	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
    38- 3467	LP-20 COMMON SUBROUTINES MODULE
    38- 3506	..STLP	(START LP-20 OUTPUT)
    39- 3628	..SPLP	(STOP LP-20 OUTPUT)
    40- 3694	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
    41- 3731	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
    42- 3794	..DOLP	(INITIATE LP-20 TRANSFER)
    43- 3889	TITLE PAGE
    44- 3924	COMMON PARAMETERS AND MACROS
    45- 3952	CD-11 DEVICE REGISTER BIT DEFINITIONS
    46- 3980	CD-11 DRIVER COMMON DATA MODULE
    47- 4012	COMMON DATABASE DEFINITIONS
    48- 4044	CD-11 DRIVER TASK MODULE
    49- 4076	TASK INITIALIZATION
    50- 4110	CRLOOP (MAIN PROCESSING LOOP)
    51- 4229	SSTSCR	(SEND CD-11 STATUS TO -10)
    52- 4374	INITCR	(INITIALIZE CD-11)
    53- 4388	CD-11 DRIVER COMMON SUBROUTINES MODULE
    54- 4426	$CDINT	(CD-11 INTERRUPT SERVICE)
    55- 4455	..STCR	(START CD-11)
    56- 4484	..SPCR	(STOP CD-11)
    57- 4507	..AKCR	(READ CARD)
    58- 4537	TITLE PAGE
    59- 4579	MACROS AND PARAMETERS
    60- 4668	TASK DATA
    61- 4718	FIND THE TASK FILE
    62- 4883	INITIALIZE TASK FILE
    63- 4935	SETUP STD ENTRY
    64- 5043	SETUP LOGICAL UNIT TABLE FOR TASK
    65- 5161	RE-REQUEST TASK
    66- 5186	TASK FILE I/O ROUTINES
    67- 5275	ERROR PROCESSING
    68- 5365	END STATEMENT
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1110  03-OCT-79 10:55  PAGE 1


      1						.TITLE	RSXFC	-- RSX20F PARAMETER FILE (TOPS-10 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
     21					;
     22					; VERSION 13-10
     23					;
     24					; ALAN D. PECKHAM  19-APR-77
     25					;
     26					; MODIFIED BY:
     27					;
     28					;		R. BELANGER -- ELIMINATE 1090T "ARPA" CONFIGURATTION
     29					;		R. BELANGER -- ADD 1091 CONFIGURATION
     30					;
     31					; FUNCTION: THIS MODULE PROVIDES THE PARAMETERS FOR ASSEMBLY OF RSX20F FOR
     32					;  THE TOPS-10 SYSTEM.
     33					;
     34					; EQUATED SYMBOLS
     35					;
     36		000001 				$TOP10	=1	; DEFINE TOPS-10 OPTION
     37
     38		000001 				$LP20	=1	; INCLUDE LP20 DRIVER
     39		000002 				L$$P20	=2	; INCLUDE 2 LP-20'S
     40		000001 				$CD11	=1	; INCLUDE CD11 CARD READER DRIVER
     41		000001 				$RP04	=1	; INCLUDE RP04 DISK DRIVER
     42		000001 				$FE	=1	; INCLUDE FE PSEUDO-DEVICE DRIVER
     43		000001 				$F11	=1	; INCLUDE FILES-11 ACP
     44		000001 				$DH11	=1	; INCLUDE DH11 DRIVER
     45		000010 				D$$H11	=8.	; INCLUDE 8 DH-11'S
     46		000001 				$DBDTE	=1	; INCLUDE DTE20 DEBUGGING CODE
     47		000001 				$DTE	=1	; INCLUDE DTE20 DTE DRIVER
     48		000001 				R$$11D	=1	; RSX-11D BASE
     49
     50					.IF DF	$T1091
     51						$TOP10	=1	; DEFINE TOPS-10 BASE FOR 1091
     52					.ENDC			; $T1091
     53
     54					.IF DF	$TOP10
     55					.IF NDF	$T1091
     56		000001 				$DTA	=1	; INCLUDE DECTAPE DRIVER FOR TOPS-10
     57					.IFF
RSXFC	-- RSX20F PARAMETER FIL	MACRO M1110  03-OCT-79 10:55  PAGE 1-1


     58						$RX11	=1	; INCLUDE FLOPPY DRIVER FOR TOPS-10/1091
     59					.ENDC			; $T1091
     60					.ENDC			; $TOP10
     61
     62					.IF DF	$TOP20
     63						$RX11	=1	; INCLUDE FLOPPY DRIVER
     64					.ENDC			; $TOP20
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1110  03-OCT-79 10:55  PAGE 2


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


     96					;
     97					; SET VERSION OF RSX20F EXEC HERE
     98					;
     99		000013 			RSX$$V	=	13		; VERSION 13
    100		000041 			RSX$$E	=	41		; EDIT 41
    101					;
    102					; RELEASE VERSION
    103					;
    104		000126 			RSX$$K	=	'V		; KEY FOR RELEASE-TYPE
    105									; "V" -- RELEASE
    106									; "X" -- EXPERIMENTAL
    107									; "Y" -- FIELD/LOAD TEST
    108		000000 			RSX$$F	=	0		; DEFINE FORM AS NULL
    111		000101 			RSX$$F	=	'A		; TOPS-10 FORM OF THE EXEC.
    122					;
    123					; DTE-20 REGISTER OFFSETS
    124					;
    125		000036 			DAG3	=36
    126		000034 			STATD	=34
    127		000032 			DAG2	=32
    128		000030 			DAG1	=30
    129		000022 			T11AD	=22
    130		000020 			T10AD	=20
    131		000016 			T11BC	=16
    132		000010 			TNAD1	=10
    133		000012 			TNAD2	=12
    134		000006 			DXWD1	=6
    135		000004 			DXWD2	=4
    136		000002 			DXWD3	=2
RSX20F	-- RESIDENT EXECUTIVE (	MACRO M1110  03-OCT-79 10:55  PAGE 4


    138					;+
    139					; MACRO TO SET IDENT FOR EXEC MODULES.
    140					; FORMAT OF CALL IS:
    141					;	IDENT$	VERSION,EDIT
    142					; OR
    143					;	IDENT$	VERSION,EDIT,RSX$$F
    144					; IF MODULE CODING CHANGES WITH DIFFERENT FORMS
    145					;-
    146
    147						.MACRO	IDENT$ VER,EDT,FRM,NUM
    148						.IF	B,NUM
    149						.IF	B,FRM
    150						IDENT$	\VER,\EDT,0,0
    151						.IFF
    152						.IF	EQ,<FRM-'A>
    153						IDENT$	\VER,\EDT,A,0
    154						.IFF
    155						.IF	EQ,<FRM-'B>
    156						IDENT$	\VER,\EDT,B,0
    157						.IFF
    158						IDENT$	\VER,\EDT,E,0
    159						.ENDC
    160						.ENDC
    161						.ENDC
    162						.MEXIT
    163						.IFF
    164						.IF	GE,VER-10
    165						.IF	GE,EDT-10
    166						.LIST
    167						.IDENT	/'FRM'VER'EDT'0/
    168						.NLIST
    169						.IFF
    170						.LIST
    171						.IDENT	/'FRM'VER'0'EDT'0/
    172						.NLIST
    173						.ENDC
    174						.IFF
    175						.IF	GE,EDT-10
    176						.LIST
    177						.IDENT	/'FRM'0'VER'EDT'0/
    178						.NLIST
    179						.IFF
    180						.LIST
    181						.IDENT	/'FRM'0'VER'0'EDT'0/
    182						.NLIST
    183						.ENDC
    184						.ENDC
    185						.ENDC
    186						.ENDM	IDENT$
    187						.TITLE	ARITH
    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
ARITH	MACRO M1110  03-OCT-79 10:55  PAGE 4-1


    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
    243
    244					;+
    245					; **-$DIV-INTEGER DIVIDE MAGNITUDE NUMBERS
    246					;
    247					; INPUTS:
    248					;
    249					;	R0=DIVIDEND.
    250					;	R1=DIVISOR.
    251					;
ARITH	MACRO M1110  03-OCT-79 10:55  PAGE 4-2


    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 M1110  03-OCT-79 10:55  PAGE 5


    274						.TITLE	DBDRV -- RP04/RP06 DRIVER
    275						.IDENT	/010040/
    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:  10-04
    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
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 6


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


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


    428		000046 			RPEC2=46			;ECC PATTERN REGISTER
    429
    430					;
    431					; ERROR RETRY COUNT
    432					;
    433
    434		000010 			RETRY=8.			;CONTROLLER ERROR RETRY COUNT
    435
    436
    437					; LOCAL DATA
    438					;
    439					;
    440
    441	000070				RPHD::	.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
    442
    443	000370				DBIOD:	WTSE$	E.IOD
	000370	   051 	   002 			.BYTE	41.,2
	000372	000000G				.WORD	E.IOD
    444
    445	000374				CLIOD:	CLEF$	E.IOD		;CLEAR I/O DONE FLAG
	000374	   037 	   002 			.BYTE	31.,2
	000376	000000G				.WORD	E.IOD
    446
    447	000400				RPWLO:	WTSE$	E.NIR		;WAIT FOR QIO
	000400	   051 	   002 			.BYTE	41.,2
	000402	000000G				.WORD	E.NIR
    448
    449	000404				MKDNR::	MRKT$	1,74.*10,0,0	;WAIT FOR FIX
	000404	   027 	   005 			.BYTE	23.,5
	000406	000001 				.WORD	1
	000410	001120 				.WORD	74.*10
	000412	000000 				.WORD	0
	000414	000000 				.WORD	0
    450
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 6-3


    451	000416				WFDNR::	WTSE$	1		;WAIT
	000416	   051 	   002 			.BYTE	41.,2
	000420	000001 				.WORD	1
    452
    453	000422				MSGDPB:	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
    454
    455	000442	   015 	   012 	   104 	DNMSG:	.ASCII	<15><12>"DB NOT RDY"<15><12>
	000445	   102 	   040 	   116
	000450	   117 	   124 	   040
	000453	   122 	   104 	   131
	000456	   015 	   012
    456
    457	000460	   015 	   012 	   104 	DUNS:	.ASCII	<15><12>"DB UNSAFE "<15><12>
	000463	   102 	   040 	   125
	000466	   116 	   123 	   101
	000471	   106 	   105 	   040
	000474	   015 	   012
    458						.EVEN
    459
    460		000016 			MSGSIZ	=14.			;MESSAGE SIZE
    461
    480
    482
    483	000476				ECCWRD:
    484	000476	000000 	000000 	000000 		.WORD	0,0,0
    485	000504				ECCMSK:
    486	000504	000000 	000000 	000000 		.WORD	0,0,0
    487
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 7


    490					;
    491					;+
    492					; **-DBINI-RH11-RP04 DISK PACK CONTROLLER INITIATOR
    493					;
    494					; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST
    495					; IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPAGATE THE EXECU-
    496					; TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY, THEN AN ATTEMPT
    497					; IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS
    498					; EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL, THEN THE NEXT I/O OPER-
    499					; ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED.
    500					;
    501					; INPUTS:
    502					;
    503					;
    504					; OUTPUTS:
    505					;
    506					;	IF THE SPECIFIED CONTROLLER IS NOT BUSY AND AN I/O REQUEST IS WAIT-
    507					;	ING TO BE PROCESSED, THEN THE REQUEST IS DEQUEUED AND THE I/O OPER-
    508					;	ATION IS INITIATED.
    509					;-
    510
    511						.ENABL	LSB
    512
    513	000512				DBINI:	DIR$	#RPWLO		;WAIT FOR SOMETHING TO DO
	000512	012746 	000400'			MOV	#RPWLO,-(SP)
	000516	104375 				EMT	375
    514	000520	012700 	041104 			MOV	#"DB,R0		;DQ THE REQUEST
    515	000524					CALL	..DQRN
	000524	004737 	000000G			JSR	PC,..DQRN
    516	000530	103770 				BCS	DBINI		;NOTHING GO BACK TO SLEEP
    517
    532
    533	000532	010137 	000000G		4$:	MOV	R1,RPRNA	;SAVE THE REQUST NODE ADDRESS
    534	000536	010337 	000000G			MOV	R3,RPCNT	;SAVE THE TRANSFER SIZE
    535	000542	010237 	000000G			MOV	R2,RPUNIT	;SAVE UNIT NUMBER
    536	000546	010537 	000002G			MOV	R5,RPBUF+2	;SAVE THE XFER ADDRESS
    537	000552	006304 				ASL	R4		;SHIF TO CORRECT POSITION
    538	000554	006304 				ASL	R4
    539	000556	006304 				ASL	R4
    540	000560	006304 				ASL	R4
    541	000562	010437 	000000G			MOV	R4,RPBUF	;SAVE ADDRESS (HIGH ORDER)
    542	000566	052737 	000171 	000000G		BIS	#171,RPBUF	;ASSUME READ LOGICAL FUNCTION
    543	000574	122761 	000002 	000001G		CMPB	#IO.RLB/256.,R.FC+1(R1) ;READ LOGICAL FUNCTION?
    544	000602	001412 				BEQ	10$		;IF EQ YES
    545	000604	122761 	000001 	000001G		CMPB	#IO.WLB/256.,R.FC+1(R1)
    546	000612	001403 				BEQ	5$
    547	000614	012703 	177776 			MOV	#IE.IFC,R3
    548	000620	000553 				BR	46$
    549	000622				5$:
    550	000622	162737 	000010 	000000G		SUB	#10,RPBUF	;CONVERT TO WRITE LOGICAL FUNCTION
    551	000630	012737 	000010 	000000G	10$:	MOV	#RETRY,RPRTC	;SET RETRY COUNT
    552
    559
    560	000636	005002 				CLR	R2
    561	000640	156102 	000006G			BISB	R.PB+6(R1),R2
    562	000644	016100 	000010G			MOV	R.PB+10(R1),R0
    563	000650	010103 				MOV	R1,R3		;SAVE NODE ADDRESS
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 7-1


    564	000652	012701 	000020 			MOV	#16.,R1
    565
    566	000656	006300 			20$:	ASL	R0
    567	000660	006102 				ROL	R2		;
    568	000662	020227 	000574 			CMP	R2,#19.*20.	;PARTIAL REMAINDER LARGER THAN DIVISOR?
    569	000666	103403 				BLO	30$		;IF LO NO
    570	000670	162702 	000574 			SUB	#19.*20.,R2
    571	000674	005200 				INC	R0
    572	000676	005301 			30$:	DEC	R1
    573	000700	003366 				BGT	20$		;IF GT YES
    574	000702	010063 	000006G			MOV	R0,R.PB+6(R3)
    575	000706	010200 				MOV	R2,R0		;SET DIVIDEND TO TRACK/SECTOR REMAINDER
    576	000710	012701 	000024 			MOV	#20.,R1		;SET DIVISOR TO NUMBER OF SECTORS/TRACK
    577	000714					CALL	$DIV		;CALCULATE TRACK AND SECTOR
	000714	004737 	000032'			JSR	PC,$DIV
    578	000720	000300 				SWAB	R0		;SWAP TRACK TO HIGH BYTE
    579	000722	050100 				BIS	R1,R0		;MERGE TRACK
    580	000724	010063 	000010G			MOV	R0,R.PB+10(R3)
    581
    582					;
    583					; INITIATE I/O OPERATION
    584					;
    585
    586	000730	012703 	176710 		40$:	MOV	#RPEXP+RPCS2,R3	;GET ADDRESS OF CSR
    587	000734	012713 	000040 			MOV	#40,@R3		;CLEAR RH11+CONTROLLER
    588	000740	113713 	000000G			MOVB	RPUNIT,@R3
    589	000744	012703 	176700 			MOV	#RPEXP,R3
    590	000750	012713 	000021 		41$:	MOV	#21,@R3		; +++003 EXECUTE PACK ACK FUNCTION TO SET VV
    591	000754	032737 	000340 	177776 		BIT	#340,@#PS	;IN INTERRUPT SERVICE?
    592	000762	001007 				BNE	42$		;LEAVE IT ALONE -- MUST HAVE PORT HERE
    593	000764	032713 	004000 			BIT	#DVA,@R3	;DRIVE AVAILABLE?
    594	000770	001004 				BNE	42$		;YES -- USE IT
    595	000772					WSIG$S			;NO -- BETTER WAIT FOR IT
	000772	012746 				MOV	(PC)+,-(SP)
	000774	   061 	   001 			.BYTE	49.,1
	000776	104375 				EMT	375
    596	001000	000763 				BR	41$		;MAKE ANOTHER TRY
    597
    598	001002				42$:
    599	001002	012713 	000023 			MOV	#23,@R3		;PACK ACK AGAIN
    600	001006	032713 	004000 			BIT	#DVA,@R3	;WATCH FOR TIMING AND MISSING DRIVE
    601	001012	001756 				BEQ	41$		; MISSED IT -- TRY AGAIN
    602	001014	013702 	000000G		43$:	MOV	RPRNA,R2	;GET ADDRESS OF I/O PACKET
    603	001020	012703 	176710 			MOV	#RPEXP+RPCS2,R3	;POINT TO SECOND CSR
    604	001024	113713 	000000G			MOVB	RPUNIT,@R3 	;SELECT PROPER DRIVE
    605	001030	016243 	000010G			MOV	R.PB+10(R2),-(R3) ;INSERT TRACK/SECTOR ADDRESS
    606	001034	013743 	000002G			MOV	RPBUF+2,-(R3) 	;INSERT BUFFER ADDRESS
    607	001040	013743 	000000G			MOV	RPCNT,-(R3)	;INSERT NUMBER OF BYTES TO TRANSFER
    608	001044	006013 				ROR	@R3		;CONVERT TO WORD COUNT
    609	001046	005413 				NEG	@R3		;MAKE NEGATIVE WORD COUNT
    610	001050	005743 				TST	-(R3)		;POINT TO BEGINNING
    611
    621
    622	001052	012700 	000375 			MOV	#IE.DNR&377,R0	;ASSUME DRIVE NOT READY
    623	001056	016301 	000012 			MOV	RPDS(R3),R1	;GET CURRENT DRIVE STATUS
    624	001062	005101 				COM	R1		;COMPLEMENT STATUS
    625	001064	032701 	010300 			BIT	#MOL!DRY!VV,R1	;DRIVE READY?
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 7-2


    626	001070	001035 				BNE	47$		;IF NE NO
    627	001072	032763 	040000 	000014 		BIT	#UNS,RPER1(R3)	;DRIVE UNSAFE?
    628	001100	001052 				BNE	49$		;IF NE YES
    629	001102	016263 	000006G	000034 		MOV	R.PB+6(R2),RPDC(R3) ;SET DESIRED CYLINDER ADDRESS
    630	001110	013713 	000000G			MOV	RPBUF,@R3	;START FUNCTION
    631	001114	032737 	000340 	177776 		BIT	#340,@#PS	;CHECK FOR RESTART FROM INTERRUPT SERVICE LEVEL
    632	001122	001131 				BNE	85$		;YES -- RETURN FROM INTERRUPT
    633	001124					DIR$	#DBIOD		;WAIT FOR I/O DONE
	001124	012746 	000370'			MOV	#DBIOD,-(SP)
	001130	104375 				EMT	375
    634	001132					DIR$	#CLIOD		;CLEAR I/O DONE FLAG
	001132	012746 	000374'			MOV	#CLIOD,-(SP)
	001136	104375 				EMT	375
    635	001140	013701 	000000G			MOV	RPRNA,R1	;FIND THE REQUEST NODE
    636	001144	013703 	000000G			MOV	RPBUF,R3	;FIND THE I/O STATUS
    637	001150	013704 	000002G		46$:	MOV	RPBUF+2,R4	;BOTH HALVES
    638	001154					CALL	..IODN		;FINISH I/O
	001154	004737 	000000G			JSR	PC,..IODN
    639	001160	000137 	000512'			JMP	DBINI		;WAIT FOR NEXT
    640
    641	001164	012737 	000442'	000436'	47$:	MOV	#DNMSG,MSGDPB+Q.IOPL  ;SET FOR NOT READY MESSAGE
    642
    643	001172	032737 	000340 	177776 	48$:	BIT	#340,@#PS	;CHECK FOR ENTRY FROM PRI
    644	001200	001060 				BNE	60$		;YES -- GO RE-TRY
    645	001202					DIR$	#MSGDPB		;COMPLAIN
	001202	012746 	000422'			MOV	#MSGDPB,-(SP)
	001206	104375 				EMT	375
    646	001210					DIR$	#MKDNR		;WAIT FOR FIX
	001210	012746 	000404'			MOV	#MKDNR,-(SP)
	001214	104375 				EMT	375
    647	001216					DIR$	#WFDNR		;WAIT
	001216	012746 	000416'			MOV	#WFDNR,-(SP)
	001222	104375 				EMT	375
    648	001224	000641 				BR	40$		;AND TRY AGAIN
    649
    650	001226	012737 	000460'	000436'	49$:	MOV	#DUNS,MSGDPB+Q.IOPL  ;SET FOR UNSAFE MESSAGE
    651	001234	000756 				BR	48$		;TYPE MESSAGE
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 8


    653					;
    654					;+
    655					; **-.DBINT-RH11-RP04 DISK PACK CONTROLLER INTERRUPTS
    656					;-
    657					;
    658
    659	001236	010046 			.DBINT::MOV	R0,-(SP)	;SAVE REGISTERS
    660	001240	010146 				MOV	R1,-(SP)
    661	001242	010246 				MOV	R2,-(SP)
    662	001244	010346 				MOV	R3,-(SP)
    663	001246	012702 	176700 			MOV	#RPEXP,R2	;GET ADDRESS OF CSR
    664
    671
    672	001252	012700 	000001 			MOV	#IS.SUC&377,R0	;ASSUME SUCCESSFUL TRANSFER
    673	001256	032712 	060000 			BIT	#TRE!MCPE,@R2	;ANY ERRORS?
    674	001262	001432 				BEQ	70$		;IF EQ NO
    675	001264	012700 	000374 			MOV	#IE.VER&377,R0	;ASSUME UNRECOVERABLE ERROR
    676	001270	016201 	000014 			MOV	RPER1(R2),R1	;GET CONTENTS OF ERROR REGISTER
    677	001274	032701 	047007 			BIT	#UNS!WLE!IAE!AOE!RMR!ILR!ILF,R1	;HARD ERROR?
    678	001300	001004 				BNE	50$		;IF NE YES
    679	001302	032762 	014000 	000010 		BIT	#NED!NEM,RPCS2(R2) ;HARD ERROR?
    680	001310	001446 				BEQ	100$		;IF EQ NO
    681	001312	032701 	004000 		50$:	BIT	#WLE,R1		;WRITE LOCK ERROR?
    682	001316	001403 				BEQ	52$		;IF EQ NO
    683	001320	012700 	000364 			MOV	#IE.WLK&377,R0	;SET WRITE LOCK ERROR
    684	001324	000415 				BR	80$		;
    685
    686	001326	032701 	003000 		52$:	BIT	#IAE!AOE,R1	;CHECK FOR ILLEGAL CYL
    687	001332	001412 				BEQ	80$		;NO --  UNRECOVERABLE ERROR
    688	001334	012700 	000354 			MOV	#IE.BLK&377,R0	;SET ILLEGAL BLOCK
    689	001340	000407 				BR	80$		;AND RETURN
    690
    701
    702					;
    703					; DEVICE TIMEOUT RESULTS IN THE CURRENT OPERATION BEING REPEATED. TIMEOUTS ARE
    704					; USUALLY CAUSED BY POWERFAILURE BUT MAY ALSO BE THE RESULT OF A HARDWARE FAILURE
    705					;
    706
    707	001342	105337 	000000G		60$:	DECB	RPRTC		;RETRY FUNCTION?
    708
    714
    715	001346	003025 				BGT	82$		;IF GT YES
    716
    718
    719	001350	013701 	000000G		70$:	MOV	RPRNA,R1	;GET ADDRESS OF I/O PACKET
    720	001354	016101 	000002G			MOV	R.PB+2(R1),R1	;SET FINAL VALUE OF SECOND STATUS WORD
    721	001360				80$:				;REF LABEL
    722	001360	012712 	000013 			MOV	#13,@R2		;RELEASE DUAL PORT
    723	001364	010037 	000000G			MOV	R0,RPBUF	;SAVE THE STATUS
    724	001370	010137 	000002G			MOV	R1,RPBUF+2
    725	001374	052737 	000000G	000020G		BIS	#EF.IOD,RPTSK+A.EF	;SET I/O DONE
    726	001402					CALL	..DSEV		;DECLARE  SIG EVENT
	001402	004737 	000000G			JSR	PC,..DSEV
    727	001406	012603 			85$:	MOV	(SP)+,R3	;RESTORE REGISTERS
    728	001410	012602 				MOV	(SP)+,R2
    729	001412	012601 				MOV	(SP)+,R1
    730	001414	012600 				MOV	(SP)+,R0
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 8-1


    731	001416	000137 	000000G			JMP	@#..INTX	;RETURN FROM INTERRUPTS
    732
    733
    734	001422	000137 	000730'		82$:	JMP	40$
    735
    741
    742	001426	032762 	163400 	000010 	100$:	BIT	#DLT!WCE!UPE!PGE!MXF!MDPE,RPCS2(R2) ;CONTROLLER ERROR?
    743	001434	001342 				BNE	60$		;IF NE YES
    744
    751
    752	001436	005701 				TST	R1		;DATA CHECK ERROR?
    753	001440	100340 				BPL	60$		;IF PL NO
    754
    756
    757	001442	032701 	000100 			BIT	#ECH,R1		;ECC HARD ERROR?
    758	001446	001335 				BNE	60$		;IF NE YES
    759
    761
    762					;
    763					; START ECC CORRECTION PROCEDURE
    764					;
    765					; FIRST CALCULATE THE BYTE OFFSET TO THE START OF BLOCK TRANSFERED
    766					;
    767
    768	001450	016200 	000002 		105$:	MOV	RPWC(R2),R0	;GET NEGATIVE NUMBER OF WORDS REMAINING
    769	001454	006300 				ASL	R0		;CONVERT TO NEGATIVE BYTES REMAINING
    770	001456	063700 	000000G			ADD	RPCNT,R0	;CALCULATE NUMBER OF BYTES TRANSFERED
    771
    780
    781	001462	005300 				DEC	R0		;CALCULATE OFFSET TO START OF BLOCK
    782	001464	042700 	000777 		107$:	BIC	#777,R0		;CLEAR RESIDUE
    783
    791
    793
    794					;
    795					; 18-BIT ECC CORRECTION ROUTINES
    796					;
    797					; THE WORD IN ERROR AND THE WORD FOLLOWING IT ARE SET UP AS A TRIPLET
    798					; (TWO 18-BIT WORDS) AS IS THE ECC CORRECTION MASK FROM THE CONTROLLER.
    799					; THE MASK TRIPLET IS POSITIONED OVER THE DATA TRIPLET, CORRECTION IS
    800					; APPLIED, AND THE TWO DATA WORDS RETUNED TO THE BUFFER. THE CURRENT
    801					; OPERATION THEN PROCEEDS NORMALLY.
    802					;
    803	001470	016203 	000044 			MOV	RPEC1(R2),R3	; LOOK AT POSITION REGISTER
    804	001474	001731 				BEQ	80$		; INCORRIGIBLE IF .EQ. 0
    805	001476	010300 				MOV	R3,R0		; POSITION REGISTER TO R0
    806	001500	005300 				DEC	R0		; MINUS 1
    807	001502	012701 	000022 			MOV	#^D18,R1	; DIVIDE BY 18.
    808	001506					CALL	$DIV		; SO
	001506	004737 	000032'			JSR	PC,$DIV
    809					;
    810					; COMPUTE THE ADDRESS OF THE WORD IN ERROR
    811					;
    812					;	R0 -- WORD OFFSET IN TRANSFER
    813					;	R1 -- SHIFT COUNT FOR ECC MASK
    814					;	R2 -- BASE OF CONTROLLER REGISTERS
    815					;	R3 -- OFFSET INTO TRANSFER BUFFER
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 8-2


    816					;
    817	001512	006300 				ASL	R0		; CONVERT TO BYTE OFFSET
    818	001514	013703 	000002G			MOV	RPBUF+2,R3	; BUFFER ADDRESS TO R3
    819	001520	060003 				ADD	R0,R3		; POINT TO WORD IN ERROR
    820					;
    821					; CONSTRUCT THE CORRECTION MASK TRIPLET
    822					;
    823	001522	012700 	000512'			MOV	#ECCMSK+6,R0	; POINT TO THE MASK BUFFER
    824	001526	005040 				CLR	-(R0)		; CLEAR IT OUT
    825	001530	005040 				CLR	-(R0)		; SO
    826	001532	016240 	000046 			MOV	RPEC2(R2),-(R0)	; SET THE MASK WORD IN THE BUFFER
    827	001536					CALL	141$		; SHIFT IT INTO CORRECT POSITION
	001536	004737 	001666'			JSR	PC,141$
    828					;
    829					; CONSTRUCT THE ERROR DATA TRIPLET
    830					;
    831	001542	005723 				TST	(R3)+		; POINT TO THE SECOND ERROR WORD
    832	001544	012700 	000504'			MOV	#ECCWRD+6,R0	; POINT TO THE ECC WORD BUFFER
    833	001550	005040 				CLR	-(R0)		; CLEAR IT OUT
    834	001552	005040 				CLR	-(R0)		; SO
    835	001554	011340 				MOV	(R3),-(R0)	; SET SECOND ERROR WORD IN BUFFER
    836	001556	012701 	000022 			MOV	#^D18,R1	; SHIFT IT INTO THE HIGH 18. BITS
    837	001562					CALL	141$		; SO
	001562	004737 	001666'			JSR	PC,141$
    838	001566	014310 				MOV	-(R3),(R0)	; SET THE FIRST ERROR WORD IN THE BUFFER
    839	001570	012701 	000504'			MOV	#ECCMSK,R1	; POINT TO THE SHIFTED MASK
    840					;
    841					; APPLY CORRECTION TO EACH WORD IN THE DATA TRIPLET
    842					;
    843	001574					CALL	130$		; CORRECT BITS 00 THRU 16
	001574	004737 	001654'			JSR	PC,130$
    844	001600					CALL	130$		; CORRECT BITS 17 THRU 32
	001600	004737 	001654'			JSR	PC,130$
    845	001604					CALL	130$		; CORRECT BITS 33 THRU 36
	001604	004737 	001654'			JSR	PC,130$
    846					;
    847					; REPLACE THE ERROR WORDS WITH THOSE JUST CORRECTED
    848					;
    849	001610	162700 	000006 			SUB	#6,R0		; BACK THE POINTER UP
    850	001614	011023 				MOV	(R0),(R3)+	; SET FIRST CORRECTED WORD IN BUFFER
    851	001616	012701 	177756 			MOV	#-^D18,R1	; SHIFT COUNT TO R1
    852	001622					CALL	141$		; SHIFT SECOND CORRECTED WORD DOWN
	001622	004737 	001666'			JSR	PC,141$
    853	001626	011013 				MOV	(R0),(R3)	; SET SECOND CORRECTED WORD IN BUFFER
    854					;
    855					; CONTINUE OR TERMINATE PREVIOUS OPERATION
    856					;
    857
    859
    905
    906					;
    907					; SIXTH FINISH OR CONTINUE PREVIOUS FUNCTION
    908					;
    909
    910	001630	012700 	000001 			MOV	#IS.SUC&377,R0	;ASSUME SUCCESSFUL TRANSFER
    911	001634	112712 	000011 			MOVB	#11,@R2		;CLEAR DRIVE ERRORS
    912
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 8-3


    918
    919	001640	005762 	000002 			TST	RPWC(R2)	;ANY MORE WORDS TO TRANSFER?
    920
    922
    923	001644	001641 				BEQ	70$		;IF EQ NO
    924
    933
    934	001646	113712 	000000G			MOVB	RPBUF,@R2	;RESTART PREVIOUS OPERATION
    935	001652	000655 				BR	85$
    936
    938
    939					;
    940					; APPLY CORRECTION TO ONE WORD IN THE ERROR TRIPLET
    941					;
    942					; INPUTS:
    943					;
    944					;	R0 POINTS TO WORD IN DATA TRIPLET TO BE CORRECTED
    945					;	R1 POINTS TO WORD IN MASK TRIPLET TO BE APPLIED TO DATA
    946					;
    947					; OUTPUTS:
    948					;
    949					;	R0 POINTS TO THE NEXT WORD IN THE DATA TRIPLET
    950					;	R1 POINTS TO THE NEXT WORD IN THE MASK TRIPLET
    951					;
    952	001654				130$:
    953	001654	011146 				MOV	(R1),-(SP)	; CURRENT MASK TO STACK
    954	001656	041016 				BIC	(R0),(SP)	; .NOT. MASK .AND. DATA
    955	001660	042110 				BIC	(R1)+,(R0)	; .NOT. DATA .AND. MASK
    956	001662	052620 				BIS	(SP)+,(R0)+	; DATA .OR. MASK
    957	001664				140$:
    958	001664					RETURN			; FOR MORE
	001664	000207 				RTS	PC
    959					;
    960					; SHIFT A TRIPLET EITHER RIGHT OR LEFT
    961					;
    962					; INPUTS:
    963					;
    964					;	R0 POINTS TO TRIPLET TO BE SHIFTED
    965					;	R1 HAS SHIFT COUNT -
    966					;		.GT. 0 => SHIFT LEFT
    967					;		.EQ. 0 => NO SHIFT
    968					;		.LT. 0 => SHIFT RIGHT
    969					;
    970					; NO REGISTERS ALTERED
    971					;
    972	001666				141$:
    973	001666	010146 				MOV	R1,-(SP)	; SAVE SHIFT COUNT
    974	001670	100407 				BMI	143$		; SHIFT RIGHT IF NEGATIVE
    975	001672	001414 				BEQ	145$		; GO AWAY IF .EQ. 0
    976	001674				142$:
    977	001674	006320 				ASL	(R0)+		; SHIFT AWAY TO THE LEFT
    978	001676	006120 				ROL	(R0)+		; PROPAGATE CARRY
    979	001700	006110 				ROL	(R0)		; FOR ALL THREE WORDS
    980	001702	024040 				CMP	-(R0),-(R0)	; BACK THE POINTER UP
    981	001704	077105 				SOB	R1,142$		; LOOP TILL DONE
    982	001706	000406 				BR	145$		; EXIT
    983						;
DBDRV -- RP04/RP06 DRIVER	MACRO M1110  03-OCT-79 10:55  PAGE 8-4


    984	001710				143$:
    985	001710	005401 				NEG	R1		; SO "SOB" WORKS
    986	001712				144$:
    987	001712	006220 				ASR	(R0)+		; SHIFT THE TRIPLE WORD RIGHT
    988	001714	006020 				ROR	(R0)+		; PROPAGATE CARRY
    989	001716	006010 				ROR	(R0)		; ALL THE WAY
    990	001720	024040 				CMP	-(R0),-(R0)	; BACK THE POINTER UP
    991	001722	077105 				SOB	R1,144$		; TRY FOR MORE
    992	001724				145$:
    993	001724	012601 				MOV	(SP)+,R1	; RESTORE SHIFT COUNT
    994	001726					RETURN			; TO CALLER
	001726	000207 				RTS	PC
    995
    997
   1015
   1016					;
   1017					; OFFSET RECOVERY
   1018					;
   1019
   1086
   1087
   1088						.DSABL	LSB
   1090						.TITLE	DTDRV
   1091						.IDENT	/007000/
   1092					;
   1093					;
   1094					;
   1095					;                             COPYRIGHT (C) 1975, 1978 BY
   1096					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   1097					;
   1098					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   1099					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   1100					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   1101					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   1102					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   1103					;
   1104					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   1105					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   1106					;       CORPORATION.
   1107					;
   1108					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   1109					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   1110					;
   1111					; VERSION 07-00
   1112					;
   1113					;	R. MCLEAN 5-JUN-75
   1114					;
   1115					; TC11 DECTAPE CONTROLLER DRIVER
   1116					;
   1117					; MODIFICATIONS:
   1118					;
   1119					;	NO.	DATE		PROGRAMMER	PURPOSE
   1120					;	---	----		----------	-------
   1121					;	001	15-MAR-77	R. BELANGER	CONDITIONALLY
   1122					;						ASSEMBLE DECTAPE DRIVER
   1123					;	002	04-APR-77	A. PECKHAM	FIX BUG IN I/O DONE SERVICE
   1124					;	22-0CT-77		R. BELANGER	REMOVE CONDITIONALS
DTDRV	MACRO M1110  03-OCT-79 10:55  PAGE 9


   1126					; MACRO LIBRARY CALLS
   1127					;
   1128					;
   1129						.MCALL	QIOSY$,$DEF
   1130						.MCALL	.STKM,WTSE$,QIOW$,MRKT$,DIR$,CALL,RETURN
   1131	001730					$DEF
   1132	001730					QIOSY$
   1133					;
   1134					;
   1135		000020 			A.EF=20		;TEMP DEFINITION OF A.EF BECAUSE MACY WON'T ACCEPT COMPLEX GLOBLS
   1136					;
   1137					; EQUATED SYMBOLS
   1138					;
   1139					;
   1140		000005 			RETRY=5.			;ERROR RETRY COUNT
   1141					;
   1142		177340 			DTEXP=177340			;EXTERNAL PAGE ADDRESS OF DTA'S
   1143					;
   1144					; DIRECTIVES
   1145					;
   1146					;
   1147	001730				DTHD::	.STKM	0,0,0,0,0,0,0,DTINI,174000,DTSTK
	001776	000000 	000000 	000000 		.WORD	0,0,0,0
	002004	000000
	002024	174000 	002314'	002210'		.WORD	174000,DTINI,DTSTK
	002060	000005 				.WORD	5
	002062	000000G				.WORD	TTPEN
	002064	000000 				.WORD	0
	002066	000000 				.WORD	0
	002070	000000 				.WORD	0
	002072	000000 				.WORD	0
	002074	000000 				.WORD	0
	002076	000000 				.WORD	0
	002100	000000 				.WORD	0
	002102	000000 				.WORD	0
	002104	000000 				.WORD	0
	002106	000000 				.WORD	0
	002210	000000 				.WORD	0
	002212	000000 				.WORD	0
	002214	000000 				.WORD	0
	002216	000000 				.WORD	0
	002220	000000 				.WORD	0
	002222	000000 				.WORD	0
	002224	002314'				.WORD	DTINI
	002226	174000 				.WORD	174000
   1148					;
   1149	002230				WFDTQ:	WTSE$	E.NIR
	002230	   051 	   002 			.BYTE	41.,2
	002232	000000G				.WORD	E.NIR
   1150					;
   1151	002234				WFDTD:	WTSE$	E.IOD
	002234	   051 	   002 			.BYTE	41.,2
	002236	000000G				.WORD	E.IOD
   1152					;
   1153	002240				DTNRM:	QIOW$	IO.WLB,1,1,0,0,0,<NTRDMS,NTRDSZ>
	002240	   003 	   010 			.BYTE	3,$$$ARG
	002242	000400 				.WORD	IO.WLB
DTDRV	MACRO M1110  03-OCT-79 10:55  PAGE 9-1


	002244	000001 				.WORD	1
	002246	   001 	   000 			.BYTE	1,0
	002250	000000 				.WORD	0
	002252	000000 				.WORD	0
	002254	002276'				.WORD	NTRDMS
	002256	000016 				.WORD	NTRDSZ
   1154					;
   1155	002260				MRKDT:	MRKT$	2,74*10,0,0
	002260	   027 	   005 			.BYTE	23.,5
	002262	000002 				.WORD	2
	002264	000740 				.WORD	74*10
	002266	000000 				.WORD	0
	002270	000000 				.WORD	0
   1156					;
   1157	002272				WFMKT:	WTSE$	2
	002272	   051 	   002 			.BYTE	41.,2
	002274	000002 				.WORD	2
   1158					;
   1159	002276	   012 	   015 	   104 	NTRDMS:	.ASCII	<12><15>"DT NOT RDY"<15><12>
	002301	   124 	   040 	   116
	002304	   117 	   124 	   040
	002307	   122 	   104 	   131
	002312	   015 	   012
   1160		000016 			NTRDSZ=.-NTRDMS
   1161						.EVEN
   1162					;
   1163					; DRIVER DISPATCH TABLE
   1164					;
   1165					;
   1166					;+
   1167					; **-DTINI-TC11 DECTAPE CONTROLLER INITIATOR
   1168					;
   1169					; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST
   1170					; IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPAGATE THE EXECU-
   1171					; TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY, THEN AN ATTEMPT
   1172					; IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS
   1173					; EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL, THEN THE NEXT I/O OPER-
   1174					; ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED.
   1175					;
   1176					; INPUTS:
   1177					;
   1178					;
   1179					; OUTPUTS:
   1180					;
   1181					;	IF THE SPECIFIED CONTROLLER IS NOT BUSY AND AN I/O REQUEST IS WAIT-
   1182					;	ING TO BE PROCESSED, THEN THE REQUEST IS DEQUEUED AND THE I/O OPER-
   1183					;	ATION IS INITIATED.
   1184					;-
   1185					;
   1186						.ENABL	LSB
   1187					;
   1188	002314				DTINI:	DIR$	#WFDTQ		;WAIT FOR SOMETHING TO BE QUEUE'S
	002314	012746 	002230'			MOV	#WFDTQ,-(SP)
	002320	104375 				EMT	375
   1189	002322	012700 	052104 			MOV	#"DT,R0		;FIND THE UNIT NUMBER OF THE DT
   1190	002326					CALL	..DQRN		;;DEQUEUE REQUEST
	002326	004737 	000000G			JSR	PC,..DQRN
DTDRV	MACRO M1110  03-OCT-79 10:55  PAGE 9-2


   1191	002332	103770 				BCS	DTINI
   1192	002334	010337 	000000G			MOV	R3,DTCNT	;SAVE COUNT
   1193	002340	010437 	000000G			MOV	R4,DTBUF
   1194	002344	010537 	000002G			MOV	R5,DTBUF+2
   1195
   1196	002350	012737 	000005 	000000G		MOV	#RETRY,DTRTC ;SET RETRY COUNT
   1197	002356	012700 	000001G			MOV	#DTBUF+1,R0
   1198	002362	110210 				MOVB	R2,@R0		;INSERT DRIVE NUMBER
   1199	002364	152740 	000115 			BISB	#115,-(R0)	;ASSUME WRITE LOGICAL FUNCTION
   1200	002370	122761 	000001 	000001G		CMPB	#IO.WLB/256.,R.FC+1(R1) ;WRITE LOGICAL FUNCTION?
   1201	002376	001406 				BEQ	10$		;IF EQ YES
   1202	002400	042710 	000010 			BIC	#10,@R0		;CONVERT TO READ LOGICAL FUNCTION
   1203	002404	122761 	000002 	000001G		CMPB	#IO.RLB/256.,R.FC+1(R1) ;READ LOGICAL?
   1204	002412	001074 				BNE	767$		;NO -- BAD FUNCTION
   1205	002414	032761 	000100 	000000G	10$:	BIT	#IO.WLV&377,R.FC(R1) ;REVERSE DIRECTION?
   1206	002422	001402 				BEQ	20$		;IF EQ NO
   1207	002424	052710 	004000 			BIS	#4000,@R0	;SET REVERSE DIRECTION BIT
   1208	002430	012703 	000354 		20$:	MOV	#IE.BLK&377,R3	;ASSUME ILLEGAL BLOCK NUMBER
   1209	002434	016102 	000010G			MOV	R.PB+10(R1),R2	;GET LOW PART OF LOGICAL BLOCK NUMBER
   1210	002440	020227 	001102 			CMP	R2,#1102	;LEGAL BLOCK NUMBER?
   1211	002444	103052 				BHIS	66$		; +++002 IF HIS NO
   1212	002446	105761 	000006G			TSTB	R.PB+6(R1)	;HIGH PART OF LOGICAL BLOCK NUMBER ZERO?
   1213	002452	001045 				BNE	50$		;IF NE NO
   1214	002454	010237 	000000G			MOV	R2,DTCW2	;SET LOGICAL BLOCK NUMBER
   1215
   1216					;
   1217					;
   1218
   1219	002460	005037 	177340 		DTOUT:	CLR	@#DTEXP		;;;CLEAR INTERRUPT ENABLE
   1220					;
   1221					;
   1222					; INITIATE I/O OPERATION
   1223					;
   1224					;
   1225	002464	012700 	177346 		30$:	MOV	#DTEXP+6,R0	;GET ADDRESS OF COMMAND REGISTER
   1226	002470	013710 	000002G			MOV	DTBUF+2,@R0	;INSERT BUFFER ADDRESS
   1227	002474	013740 	000000G			MOV	DTCNT,-(R0)	;INSERT LENGTH OF TRANSFER IN BYTES
   1228	002500	005037 	000000G			CLR	DTCW3		;CLEAR FINAL ERROR STATUS
   1229	002504	006010 				ROR	@R0		;CONVERT LENGTH TO WORD COUNT
   1230	002506	005410 				NEG	@R0		;MAKE NEGATIVE WORD COUNT
   1231	002510	113740 	000001G			MOVB	DTBUF+1,-(R0) ;INSERT UNIT AND DIRECTION BIT
   1232	002514	112740 	000011 			MOVB	#11,-(R0)	;STOP TRANSPORT (SELECT UNIT)
   1233	002520	032710 	100200 		35$:	BIT	#100200,@R0	;SELECT ERROR?
   1234	002524	100432 				BMI	40$		;IF MI YES
   1235	002526	001774 				BEQ	35$		;IF EQ DRIVE NOT SELECTED
   1236	002530	112737 	000010 	000001G		MOVB	#8.,DTRTC+1	;SET TAPE ROCK COUNT
   1237	002536	042737 	000000G	000020G		BIC	#EF.IOD,DTTSK+A.EF ;CLEAR EVENT FLAG
   1238	002544	112710 	000103 			MOVB	#103,@R0	;START SEARCH FOR BLOCK.
   1239	002550	032737 	000340 	177776 		BIT	#340,@#PS	;AT PRI LEVEL?
   1240	002556	001176 				BNE	140$		;YES -- RETURN THROUGH INTERRUPT SERVICE
   1241	002560					DIR$	#WFDTD		;WAIT FOR I/O DONE
	002560	012746 	002234'			MOV	#WFDTD,-(SP)
	002564	104375 				EMT	375
   1242	002566	013703 	000000G		50$:	MOV	DTBUF,R3	;SET UP FOR I/O DONE
   1243	002572	013704 	000000G		66$:	MOV	DTCNT,R4
   1244	002576					CALL	..IODN
	002576	004737 	000000G			JSR	PC,..IODN
DTDRV	MACRO M1110  03-OCT-79 10:55  PAGE 9-3


   1245	002602	000644 				BR	DTINI		;WAIT FOR ANOTHER
   1246	002604	012703 	177776 		767$:	MOV	#IE.IFC,R3
   1247	002610	000770 				BR	66$
   1248					;
   1249					;
   1250					;
   1251					;
   1252					;
   1253					; OUTPUT SELECT ERROR MESSAGE
   1254					;
   1255					;
   1256	002612	032737 	000340 	177776 	40$:	BIT	#340,@#PS		;CHECK FOR INT SERV
   1257	002620	001135 				BNE	175$		;TOUGH
   1258	002622					DIR$	#DTNRM		;COMPLAIN
	002622	012746 	002240'			MOV	#DTNRM,-(SP)
	002626	104375 				EMT	375
   1259	002630					DIR$	#MRKDT		;MARK TIME ON SELECT ERROR
	002630	012746 	002260'			MOV	#MRKDT,-(SP)
	002634	104375 				EMT	375
   1260	002636					DIR$	#WFMKT		;WAIT FOR MARK TIME
	002636	012746 	002272'			MOV	#WFMKT,-(SP)
	002642	104375 				EMT	375
   1261	002644	000705 				BR	DTOUT		;AND TRY AGAIN
   1262					;
   1263
   1264					;+
   1265					; **-$DTINT-TC11 DECTAPE CONTROLLER INTERUPTS
   1266					;-
   1267					;
   1268	002646				$DTINT::			;;;REF LABEL
   1269					;
   1270					;
   1271					;
   1272					;
   1273	002646	010046 				MOV	R0,-(SP)	;;;SAVE REGISTERS
   1274	002650	010246 				MOV	R2,-(SP)
   1275	002652	010346 				MOV	R3,-(SP)
   1276					;
   1277					;
   1278					;
   1279					;
   1280	002654	012703 	177342 			MOV	#DTEXP+2,R3	;;;SET UP ADDRESS OF DT
   1281	002660	032713 	000002 			BIT	#2,@R3		;;;BLOCK SEARCH IN PROGRESS?
   1282	002664	001462 				BEQ	150$		;;;IF EQ NO
   1283	002666	005713 				TST	@R3		;;;SEARCH ERROR?
   1284	002670	100011 				BPL	70$		;;;IF PL NO
   1285	002672	005743 				TST	-(R3)		;;;END ZONE?
   1286	002674	100436 				BMI	110$		;;;IF MI YES
   1287	002676	032723 	020000 			BIT	#20000,(R3)+	;;;MARK TRACK ERROR?
   1288	002702	001045 				BNE	120$		;;;IF NE YES-TRY TO BYPASS IT
   1289	002704	012737 	100000 	000000G	60$:	MOV	#100000,DTCW3 ;;;SET UNRECOVERALBE ERROR
   1290	002712	000454 				BR	160$		;;;
   1291	002714	016346 	000006 		70$:	MOV	6(R3),-(SP)	;;;GET CURRENT BLOCK NUMBER
   1292	002720	123763 	000001G	000001 		CMPB	DTBUF+1,1(R3) ;;;MOVING IN FINAL DIRECTION?
   1293	002726	001003 				BNE	80$		;;;IF NE NO
   1294	002730	021637 	000000G			CMP	@SP,DTCW2	;;;BLOCK NUMBER MATCH?
   1295	002734	001432 				BEQ	130$		;;;IF EQ YES
DTDRV	MACRO M1110  03-OCT-79 10:55  PAGE 9-4


   1296	002736	032713 	004000 		80$:	BIT	#4000,@R3	;;;MOVING IN FORWARD DIRECTION?
   1297	002742	001405 				BEQ	90$		;;;IF EQ YES
   1298	002744	062716 	000002 			ADD	#2,@SP		;;;ADD TURN AROUND BIAS
   1299	002750	023726 	000000G			CMP	DTCW2,(SP)+	;;;TURN AROUND NECESSARY?
   1300	002754	000404 				BR	100$		;;;
   1301	002756	162716 	000002 		90$:	SUB	#2,@SP		;;;SUBTRACT TURN AROUND BIAS
   1302	002762	022637 	000000G			CMP	(SP)+,DTCW2	;;;TURN AROUND NECESSARY?
   1303	002766	003413 			100$:	BLE	120$		;;;IF LE NO
   1304	002770	005743 				TST	-(R3)		;;;POINT TO ERROR REGISTER
   1305	002772	005723 			110$:	TST	(R3)+		;;;POINT TO COMMAND REGISTER
   1306	002774	105337 	000001G			DECB	DTRTC+1		;;;DRIVE HUNG?
   1307	003000	002741 				BLT	60$		;;;IF LT YES
   1308	003002	012746 	004000 			MOV	#4000,-(SP)	;;;GET DIRECTION BIT
   1309	003006	041316 				BIC	@R3,@SP		;;;.NOT.COMMAND REGISTER.AND.DIRECTION BIT
   1310	003010	042713 	004000 			BIC	#4000,@R3	;;;.NOT.DIRECTION BIT.ANL.OMMAND REGISTER
   1311	003014	052613 				BIS	(SP)+,@R3	;;;DIRECTION BIT.OR.COMMAND REGISTER
   1312	003016	005213 			120$:	INC	@R3		;;;CONTINUE SEARCH
   1313	003020	000455 				BR	140$		;;;
   1314	003022	005726 			130$:	TST	(SP)+		;;;REMOVE BLOCK NUMBER FROM STACK
   1315	003024	013713 	000000G			MOV	DTBUF,@R3	;;;START READ/WRITE FUNCTION
   1316	003030	000451 				BR	140$
   1317	003032	005713 			150$:	TST	@R3		;;;ANY ERRORS?
   1318	003034	100003 				BPL	160$		;;;IF PL NO
   1319	003036	016337 	177776 	000000G		MOV	-2(R3),DTCW3	;;;SAVE ERROR STATUS
   1320	003044	112713 	000011 		160$:	MOVB	#11,@R3		;;;STOP TAPE MOTION
   1321	003050	012700 	000001 			MOV	#IS.SUC&377,R0	;ASSUME SUCCESSFUL COMPLETION
   1322	003054	013702 	000000G			MOV	DTCW3,R2	;RETRIEVE FINAL STATUS
   1323	003060	001417 				BEQ	180$		;IF EQ SUCCESS
   1324	003062	032702 	063000 			BIT	#63000,R2	;RECOVERABLE ERROR?
   1325	003066	001405 				BEQ	170$		;IF EQ NO
   1326	003070	105337 	000000G			DECB	DTRTC		;ANY MORE RETRIES?
   1327	003074	003402 				BLE	170$		;IF LE NO
   1328	003076	000137 	002464'			JMP	30$		;TRY AGAIN
   1329	003102	012700 	000364 		170$:	MOV	#IE.WLK&377,R0	;ASSUME DRIVE WRITE LOCKED
   1330	003106	032702 	010000 			BIT	#10000,R2	;DRIVE WRITE LOCKED?
   1331	003112	001002 				BNE	180$		;IF NE YES
   1332	003114	012700 	000374 		175$:	MOV	#IE.VER&377,R0	;UNRECOVERABLE ERROR
   1333	003120	013703 	177344 		180$:	MOV	DTEXP+4,R3
   1334	003124	160303 				SUB	R3,R3
   1335	003126	063703 	000000G			ADD	DTCNT,R3
   1336	003132	010037 	000000G			MOV	R0,DTBUF	;SAVE I/O STATUS
   1337	003136	010337 	000002G			MOV	R3,DTBUF+2
   1338	003142	052737 	000000G	000020G		BIS	#EF.IOD,DTTSK+A.EF	;SET EVENT FLAG
   1339	003150					CALL	..DSEV
	003150	004737 	000000G			JSR	PC,..DSEV
   1340	003154	012603 			140$:	MOV	(SP)+,R3
   1341	003156	012602 				MOV	(SP)+,R2
   1342	003160	012600 				MOV	(SP)+,R0
   1343	003162	000137 	000000G			JMP	..INTX		;RETURN FROM INTERRUPT
   1344					;
   1345						.DSABL	LSB
   1346					;
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 16


   1781						.TITLE	FEDRV
   1782						.IDENT	/005000/
   1783		000001 			$DIRAC=1
   1784					;
   1785					;                             COPYRIGHT (C) 1975, 1978 BY
   1786					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   1787					;
   1788					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   1789					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   1790					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   1791					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   1792					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   1793					;
   1794					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   1795					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   1796					;       CORPORATION.
   1797					;
   1798					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   1799					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   1800					;
   1801					; VERSION 05-00
   1802					;
   1803					;	R. MCLEAN 25-JUN-75
   1804					;	A. PECKHAM 30-NOV-76
   1805					;
   1806					; FE PSEUDO DRIVER
   1807					;
   1808					; MACRO LIBRARY CALLS
   1809					;
   1810					;
   1811						.MCALL	.STKM,WTLO$,DIR$,.INH0,.ENB0,.ENB6,.INH6,.ENB,.INH
   1812						.MCALL	CALL,CALLR,RETURN
   1813					;
   1814					; EQUATED SYMBOLS
   1815					;
   1816		100000 			EF.SEP=100000	;SECONDARY PROTOCOL FLAG
   1817		000400 			EF.TEF=400	;DONE EVENT FLAG
   1818					;
   1819					; DIRECTIVES
   1820					;
   1821	003166				WFEF1:	WTLO$	1,EF.SEP!EF.NIR!EF.TEF	 ;WAIT FOR SOMETHING TO DO
	003166	   053 	   003 			.BYTE	43.,3
	003170	000001 				.WORD	1
	003172	000000C				.WORD	EF.SEP!EF.NIR!EF.TEF
   1822					;
   1823					;	DATA AREAS
   1824					;
   1825					;	FETBL SWITCHES
   1826					;
   1827		040000 			FE.DET=040000	;MORE DATA -11 TO -10 TO BE SENT
   1828		020000 			FE.DTE=020000	;MORE DATA -10 TO -11 EXPECTED
   1829		004000 			FE.SER=004000	;SERVICING -11 TRANSFER REQUEST
   1830		002000 			FE.STR=002000	;SERVICING -10 TRANSFER REQUEST
   1831
   1832	003174				FEHD::	.STKM	0,0,0,0,0,0,0,FEDRV,174000,FESTK
	003242	000000 	000000 	000000 		.WORD	0,0,0,0
	003250	000000
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 16-1


	003270	174000 	003474'	003454'		.WORD	174000,FEDRV,FESTK
	003324	000005 				.WORD	5
	003326	000000G				.WORD	TTPEN
	003330	000000 				.WORD	0
	003332	000000 				.WORD	0
	003334	000000 				.WORD	0
	003336	000000 				.WORD	0
	003340	000000 				.WORD	0
	003342	000000 				.WORD	0
	003344	000000 				.WORD	0
	003346	000000 				.WORD	0
	003350	000000 				.WORD	0
	003352	000000 				.WORD	0
	003454	000000 				.WORD	0
	003456	000000 				.WORD	0
	003460	000000 				.WORD	0
	003462	000000 				.WORD	0
	003464	000000 				.WORD	0
	003466	000000 				.WORD	0
	003470	003474'				.WORD	FEDRV
	003472	174000 				.WORD	174000
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 17


   1834	003474				FEDRV:	DIR$	#WFEF1		;WAIT TO GET STARTED
	003474	012746 	003166'			MOV	#WFEF1,-(SP)
	003500	104375 				EMT	375
   1835	003502					.INH0			;LOCK OUT DTE INTERRUPTS
	003502	013746 	177776 			MOV	@#PS,-(SP)
	003506	112737 	000140 	177776 		MOVB	#140,@#PS
   1836	003514	013700 	000020G		1$:	MOV	FETSK+A.EF,R0	;;;PICK UP THE EVENT FLAGS
   1837	003520	001435 				BEQ	5$		;;;EXIT IF NOTHING
   1838	003522	005037 	000020G			CLR	FETSK+A.EF	;;;CLEAR EVENT FLAGS
   1839	003526	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ;;;PRIMARY PROTOCOL IN USE?
   1840	003534	001402 				BEQ	2$		;;;NO -- BETTER DUMP REQUEST'S
   1841	003536	005700 				TST	R0		;;;SECONDARY PROTOCOL CHANGE?
   1842	003540	100025 				BPL	5$		;;;NO -- CONTINUE
   1843					;
   1844					;	PRIMARY PROTOCOL HAS DIED - CLEAR OUT THE REQUEST QUEUE
   1845					;
   1846	003542	013701 	000000G		2$:	MOV	NODADR,R1	;;;GET CURRENT NODE
   1847	003546	005037 	000000G			CLR	NODADR		;;;DON'T BLOCK FE DRIVER
   1848	003552	005037 	000000G			CLR	STSWD		;;;CLEAR STATUS WORD BLOCK
   1849	003556	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;;;NO ACTION ON FE0
   1850	003564	005701 				TST	R1		;;;WERE WE PROCESSING A NODE ?
   1851	003566	001005 				BNE	4$		;;;YES -- DO IT FIRST
   1852	003570	012700 	042506 		3$:	MOV	#"FE,R0		;;;PICK A NODE FROM THE QUEUE
   1853	003574					CALL	..DQRN		;;;DQ
	003574	004737 	000000G			JSR	PC,..DQRN
   1854	003600	103745 				BCS	1$
   1863	003602				4$:
   1865					;
   1866					;
   1867	003602	012703 	177761 		7$:	MOV	#IE.ABO,R3	;;;RETURN ABORTED
   1868	003606					CALL	..IODN		;;;FINISH I/O
	003606	004737 	000000G			JSR	PC,..IODN
   1869	003612	000766 				BR	3$		;;;AND TRY NEXT REQUEST
   1870					;
   1871					;	CHECK FOR EVENTS
   1872					;
   1873	003614				5$:	.ENB0			;;;ENABLE INTERRUPTS
	003614	004737 	000000G			JSR	PC,..ENB0
   1874	003620	032700 	000400 			BIT	#EF.TEF,R0	;CHECK TO SEE IF DONE
   1875	003624	001104 				BNE	IODN
   1876					;
   1877					;	MUST BE I/O REQUEST
   1878					;
   1879	003626	005737 	000000G			TST	NODADR		;BLOCKED?
   1880	003632	001320 				BNE	FEDRV		;YES -- DON'T DO ANYTHING ON QIO NOW
   1881	003634	012700 	042506 			MOV	#"FE,R0		;DQ FROM FE DRIVER
   1882	003640					CALL	..DQRN		;DQ
	003640	004737 	000000G			JSR	PC,..DQRN
   1883	003644	103713 				BCS	FEDRV		;NOTHING -- WAIT
   1884	003646	052737 	004000 	000000G		BIS	#FE.SER,FETBL+0	;FE0 BEING USED FOR -11 REQUEST
   1885	003654	010137 	000000G			MOV	R1,NODADR	;SAVE THE ADDRESS OF THE NODE
   1886	003660	010537 	000000G			MOV	R5,ADRSAV	;SAVE THE ADDRESS
   1887	003664	010337 	000000G			MOV	R3,BYTESA	;SAVE THE BYTE COUNT
   1888	003670	012702 	000000G			MOV	#TO10PK,R2	;SET UP PACKET ADDRESS
   1889	003674	010200 				MOV	R2,R0		;SAVE THE ADDRESS OF THE BUFFER
   1890	003676	012722 	000014 			MOV	#14,(R2)+	;STORE SIZE
   1891	003702	016122 	000000G			MOV	R.FC(R1),(R2)+	;SET UP THE FUNCTION CODE
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 17-1


   1892	003706	005003 				CLR	R3		;FIND THE LUN
   1893	003710	156103 	000000G			BISB	R.LU(R1),R3	;SET UP THE LUT NUMBER
   1894	003714	001005 				BNE	10$		;EXEC REQUEST?
   1895	003716	012722 	041104 			MOV	#"DB,(R2)+	;DECLARE DB
   1896	003722	013722 	000000G			MOV	.RPUNT,(R2)+	;SET UNIT NUMBER
   1897	003726	000424 				BR	77$		;AND FINISH
   1898	003730	016104 	000000G		10$:	MOV	R.AT(R1),R4	;FIND THE ATL
   1899	003734	016404 	000000G			MOV	A.HA(R4),R4	;FIND THE HEADER ADDRESS
   1900	003740	006303 				ASL	R3		;MULTIPLY THE LUN BY 2
   1901	003742	006303 				ASL	R3
   1902	003744	060304 				ADD	R3,R4		;POINT TO CORRECT ENTRY
   1903	003746	016404 	177776G			MOV	H.LUT-2(R4),R4	;FIND THE LUT (FINALLY)
   1904	003752	016404 	000000G			MOV	U.RP(R4),R4	;DO REDIRECT
   1905	003756	012422 				MOV	(R4)+,(R2)+	;STORE THE DEVICE (ASCII CHARACTER)
   1906	003760	011422 				MOV	(R4),(R2)+	;STORE THE UNIT
   1907	003762	116104 	000000G			MOVB	R.DP(R1),R4	;FIND THE DPB SIZE
   1908	003766	162704 	000007 			SUB	#7,R4		;SUB PERMINENT ONES
   1909	003772	001002 				BNE	77$		;GOT A GOOD BYTE COUNT
   1910	003774	005037 	000000G			CLR	BYTESA		;NO CLEAR OUT BYTE COUNT
   1911	004000	016122 	000006G		77$:	MOV	R.PB+6(R1),(R2)+ ;STORE THE BLOCK NUMBER
   1912	004004	016122 	000010G			MOV	R.PB+10(R1),(R2)+
   1913	004010	013722 	000000G			MOV	BYTESA,(R2)+	;SET BYTE COUNT
   1914	004014	001403 				BEQ	78$		;IF MORE DATA MUST GO OUT
   1915	004016	052737 	040000 	000000G		BIS	#FE.DET,FETBL+0	;THEN SO INDICATE
   1916	004024				78$:	CALL	SNSTR		;START INDIRECT FUNCTION
	004024	004737 	004100'			JSR	PC,SNSTR
   1917	004030	005037 	000000G			CLR	STSWD
   1918	004034	000617 				BR	FEDRV		;AND WAIT
   1919
   1920	004036	013703 	000000G		IODN:	MOV	STSWD,R3	;SET I/O DONE
   1921	004042	013704 	000002G			MOV	STSWD+2,R4
   1922	004046	013701 	000000G			MOV	NODADR,R1	;SET NODE ADDRESS
   1923	004052	005037 	000000G			CLR	NODADR		;CLEAR INCASE OF ABORT
   1924	004056	005037 	000000G			CLR	STSWD		;CLEAR STATUS WORD
   1925	004062					CALL	..IODN		;SET I/O DONE
	004062	004737 	000000G			JSR	PC,..IODN
   1926	004066	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;WE ARE FINISHED WITH -11 REQUEST
   1927	004074	000137 	003474'			JMP	FEDRV		;AND RETURN
   1928
   1929	004100	012701 	100000G		SNSTR:	MOV	#BC.STR+100000,R1 ;SET UP STRING DATA
   1930	004104	005002 				CLR	R2		;NO EVENT FLAG
   1931	004106	012703 	000000G			MOV	#D.FEPD,R3	;FE DEVICE
   1932	004112					CALLR	..STIN		;START INDIRECT
	004112	000137 	000000G			JMP	..STIN
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 18


   1934					;
   1935					;	THE -10 HAS SENT AN ACK TO US - CONTINUE THE OPERATION
   1936					;	IF IT WAS A WRITE.
   1937					;
   1938	004116	032712 	040000 		.FEACK::BIT	#FE.DET,(R2)	;IS THERE DATA TO SEND ?
   1939	004122	001436 				BEQ	30$		;NO, IGNORE THE ACK.
   1940	004124	010046 				MOV	R0,-(SP)	;SAVE R0
   1941	004126	013700 	000000G			MOV	ADRSAV,R0	;PICK UP THE ADDRESS
   1942	004132	012701 	000100 			MOV	#64.,R1		;SET THE COUNT
   1943	004136	020137 	000000G			CMP	R1,BYTESA	;TOO BIG ??
   1944	004142	101402 				BLOS	10$		;NO - USE THIS COUNT
   1945	004144	013701 	000000G			MOV	BYTESA,R1	;YES - SEND WHAT'S LEFT
   1946	004150	060137 	000000G		10$:	ADD	R1,ADRSAV	;SET NEW ADDRESS
   1947	004154	160137 	000000G			SUB	R1,BYTESA	;AND BYTES LEFT
   1948	004160	001002 				BNE	20$		;IF NO MORE AFTER THIS
   1949	004162	042712 	040000 			BIC	#FE.DET,(R2)	;THEN SO INDICATE
   1950	004166				20$:	.INH6			;LOCK OUT INTERRUPTS
	004166	013746 	177776 			MOV	@#PS,-(SP)
	004172	112737 	000300 	177776 		MOVB	#300,@#PS
   1951	004200	014046 				MOV	-(R0),-(SP)	;;;SAVE MEMORY HERE
   1952	004202	010110 				MOV	R1,@R0		;;;STORE FIRST WORD TO10
   1953	004204					CALL	SNSTR		;;;START FUNCTION
	004204	004737 	004100'			JSR	PC,SNSTR
   1954	004210	012610 				MOV	(SP)+,@R0	;;;RESTORE FIRST WORD
   1955	004212					.ENB6			;;;ENABLE INTERRUPTS
	004212	012637 	177776 			MOV	(SP)+,@#PS
   1956	004216	012600 				MOV	(SP)+,R0	;RESTORE
   1957	004220				30$:	RETURN			;RETURN TO CALLER
	004220	000207 				RTS	PC
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 19


   1959					;
   1960					;	START FE DEVICE QUEUE ENTRY
   1961					;
   1962					;	R0 -> THREAD BLOCK ENTRY
   1963					;	R2 -> FETBL ENTRY
   1964					;
   1965	004222	122760 	000000G	000007 	.FEST::	CMPB	#BC.STR,7(R0)	;FUNCTION STRING?
   1966	004230	001077 				BNE	IOABT		;NO -- ABORT I/O IN PROGRESS
   1967	004232	005005 				CLR	R5		;FIND THE BYTE SIZE
   1968	004234	156005 	000006 			BISB	6(R0),R5
   1969	004240	016004 	000004 			MOV	4(R0),R4	;SET UP THE NODE ADDRESS
   1970	004244	032712 	020000 			BIT	#FE.DTE,(R2)	;ARE WE EXPECTING DATA ?
   1971	004250	001040 				BNE	70$		;YES, INSERT IN BUFFER.
   1972	004252	012401 				MOV	(R4)+,R1	;CHECK TO SEE WHICH DIRECTION THIS FUNCTION IS
   1973	004254	100102 				BPL	FCN		;REQUEST TO DO A FUNCTION -- SPECIAL
   1974	004256	013703 	000000G			MOV	NODADR,R3	;A RETURN FUNCTION -
   1975	004262	066301 	000000G			ADD	R.FC(R3),R1	;IS IT THE LAST ONE WE SENT ?
   1976	004266	001100 				BNE	FCNBD		;NO -- ILLEGAL REQUEST -- QUIT
   1977	004270	122763 	000003 	000001G		CMPB	#IO.ATT/400,R.FC+1(R3) ;ACP FUNCTION CODE?
   1978	004276	001006 				BNE	40$		;NO -- LEAVE ADDRESSES ALONE
   1979	004300	016337 	000012G	000000G		MOV	R.PB+12(R3),BYTESA ;SET UP TO BYTE COUNT
   1980	004306	016337 	000004G	000000G		MOV	R.PB+4(R3),ADRSAV ;ALSO ADDRESS
   1981	004314	022424 			40$:	CMP	(R4)+,(R4)+	;MOVE OVER DEVICE/UNIT
   1982	004316	012437 	000000G			MOV	(R4)+,STSWD	;SAVE THE I/O STATUS
   1983	004322	012437 	000002G			MOV	(R4)+,STSWD+2	;BOTH HALVES
   1984	004326	052712 	020000 			BIS	#FE.DTE,(R2)	;INDICATE WE ARE EXPECTING DATA
   1985	004332	021437 	000000G			CMP	@R4,BYTESA	;BYTESIZE CORRECT?
   1986	004336	103002 				BHIS	50$		;YES -- CONTINUE
   1987	004340	011437 	000000G			MOV	@R4,BYTESA	;NO -- SET NEW ONE
   1988	004344	162705 	000014 		50$:	SUB	#14,R5		;SUBTRACT FIXED HEADER SIZE
   1989	004350	001410 				BEQ	60$		;AND QUIT IF NOTHING TO DO
   1990	004352	112477 	000000G		70$:	MOVB	(R4)+,@ADRSAV	;MOVE A BYTE
   1991	004356	005237 	000000G			INC	ADRSAV		;UPDATE BYTE POINTER
   1992	004362	005337 	000000G			DEC	BYTESA		;UPDATE BYTE COUNT
   1993	004366	001404 				BEQ	65$		;(IN CASE OF MISCOUNT)
   1994	004370	077510 				SOB	R5,70$		;AND DO UNTIL DONE
   1995	004372	005737 	000000G		60$:	TST	BYTESA		;ANYTHING TO DO?
   1996	004376	001005 				BNE	DONSTR		;YES -- DON'T SET I/O DONE FLAG
   1997	004400	042712 	020000 		65$:	BIC	#FE.DTE,(R2)	;NO MORE DATA EXPECTED
   1998	004404	052737 	000400 	000020G		BIS	#EF.TEF,FETSK+A.EF ;SET I/O DONE
   1999	004412				DONSTR:	CALL	..DECN		; RETURN NODE
	004412	004737 	000000G			JSR	PC,..DECN
   2000	004416	012703 	000000G			MOV	#D.FEPD,R3	;ACK THIS FUNCTION
   2001	004422	010205 				MOV	R2,R5
   2002	004424					CALLR	..SACK
	004424	000137 	000000G			JMP	..SACK
   2003
   2004	004430	013701 	000000G		IOABT:	MOV	NODADR,R1	;NODE IN PROGRESS?
   2008	004434	001766 				BEQ	DONSTR		;NO -- CONTINUE
   2010	004436	005037 	000000G			CLR	NODADR		;YES -- FIX IT WITH IE.ABO
   2011	004442	042737 	064000 	000000G		BIC	#FE.SER!FE.DET!FE.DTE,FETBL+0 ;FINISHED WITH -11 REQUEST
   2012	004450	012703 	177761 			MOV	#IE.ABO,R3
   2013	004454					CALL	..IODN		;QUIT IT
	004454	004737 	000000G			JSR	PC,..IODN
   2017	004460	000754 				BR	DONSTR		;AND DECLARE DONE
   2018					;
   2019					;	THIS IS A FUNCTION REQUEST FROM THE -10
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 19-1


   2020					;
   2021	004462	022714 	042515 		FCN:	CMP	#"ME,(R4)	;IS IT MEMORY?
   2022	004466	001401 				BEQ	MEFCN		;YUP -- MUST BE OK
   2023	004470	000004 			FCNBD:	IOT			;NOPE -- CRASH
   2024
   2025	004472	052712 	002000 		MEFCN:	BIS	#FE.STR,(R2)	;WE ARE SERVICING -10 REQUEST
   2026	004476	012737 	000014 	000000G		MOV	#14,DNBLK	;INIT RETURN PACKET SIZE
   2027	004504	010137 	000000G			MOV	R1,DNFCN	;SET FUNCTION
   2028	004510	005437 	000000G			NEG	DNFCN		;AND NEGATE.
   2029	004514	012437 	000002G			MOV	(R4)+,DNFCN+2	;SAVE FUNCTION DEVICE
   2030	004520	012737 	000001 	000000G		MOV	#IS.SUC,DNSTS	;ASSUME A SUCCESSFUL ACCESS
   2031	004526	022424 				CMP	(R4)+,(R4)+	;MOVE OVER UNIT AND HIGH ORDER ADDRES
   2032	004530	012403 				MOV	(R4)+,R3	;PICK UP ADDRESS
   2033	004532	012405 				MOV	(R4)+,R5	;AND BYTE COUNT
   2034	004534	010537 	000002G			MOV	R5,DNSTS+2	;SAVE BYTE COUNT
   2035	004540					.INH			;LOCK OUT INTERRUPTS
	004540	013746 	177776 			MOV	PS,-(SP)
	004544	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2036	004552	013746 	000004 			MOV	@#4,-(SP)	;;;SAVE LOC 4
   2037	004556	012737 	004722'	000004 		MOV	#90$,@#4	;;;GO TO ILL MEM ROUTINE
   2038	004564	022701 	000400 			CMP	#IO.WLB,R1	;;;WRITE LOGICAL BLOCK?
   2039	004570	001003 				BNE	30$		;;;READ MEMORY REQUEST
   2040	004572	112423 			20$:	MOVB	(R4)+,(R3)+	;;;MOVE BYTES
   2041	004574	077502 				SOB	R5,20$		;;;UNTIL DONE
   2042	004576	000417 				BR	60$		;;;RETURN SUCCESS
   2043
   2044	004600	122760 	000014 	000006 	30$:	CMPB	#14,6(R0)	;;;ALL IN THIS PACKET?
   2045	004606	001010 				BNE	50$		;;;NO -- BAD FUNCTION
   2046	004610	012704 	000000G			MOV	#BLKTT,R4	;;;SET UP A PACKET TO ADD TO FUNCTION
   2047	004614	112324 			40$:	MOVB	(R3)+,(R4)+	;;;MOVE CORRESPONDING  BYTES
   2048	004616	077502 				SOB	R5,40$		;;;UNTIL DONE
   2049	004620	063737 	000002G	000000G		ADD	DNSTS+2,DNBLK	;;;INCLUDE RETURN BYTES IN PACKET
   2050	004626	000405 				BR	70$		;;;SET RETURN FUNCTION
   2051
   2052	004630	012737 	177777 	000000G	50$:	MOV	#IE.BAD,DNSTS	;;;RETURN BAD FUNCTION
   2053	004636	005037 	000002G		60$:	CLR	DNSTS+2		;;;NO BYTES TRANSFERRED
   2054	004642	012637 	000004 		70$:	MOV	(SP)+,@#4	;;;RESET LOC 4
   2055	004646					.ENB			;;;ENABLE INTERRUPTS
	004646	012637 	177776 			MOV	(SP)+,@#PS	;;
   2056	004652	013737 	000002G	000004G		MOV	DNSTS+2,DNSTS+4	;RETURN COUNT
   2057	004660	010203 				MOV	R2,R3		;COMPUTE FE NUMBER
   2058	004662	162703 	000000G			SUB	#FETBL,R3
   2059	004666	006203 				ASR	R3		;AND
   2060	004670	110337 	000001G			MOVB	R3,DNBLK+1	;SET IN RETURN PACKET
   2061	004674	010246 				MOV	R2,-(SP)	;SAVE FETBL POINTER
   2062	004676	010046 				MOV	R0,-(SP)	;AND STRING POINTER
   2063	004700	012700 	000000G			MOV	#DNBLK,R0	;SET DONE BLOCK ADDRESS
   2064	004704					CALL	SNSTR		;SEND STRING
	004704	004737 	004100'			JSR	PC,SNSTR
   2065	004710	012600 				MOV	(SP)+,R0	;RESTORE
   2066	004712	012602 				MOV	(SP)+,R2
   2067	004714	042712 	002000 			BIC	#FE.STR,(R2)	;FINISHED WITH -10 REQUEST
   2068	004720	000634 				BR	DONSTR		;AND QUIT
   2069
   2070	004722	022626 			90$:	CMP	(SP)+,(SP)+	;REMOVE TRAP STUFF
   2071	004724	012737 	177774 	000000G		MOV	#IE.VER,DNSTS	;RETURN RECOVERABLE ERROR
   2072	004732	000741 				BR	60$
FEDRV	MACRO M1110  03-OCT-79 10:55  PAGE 19-2


   2073
   2074						.TITLE	LPDRV	(LP-20 LINEPRINTER DRIVER FOR RSX10F)
   2075						.SBTTL	TITLE PAGE
   2076						.IDENT	/001000/
   2077					;
   2078					;                             COPYRIGHT (C) 1975, 1978 BY
   2079					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2080					;
   2081					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2082					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2083					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2084					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2085					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2086					;
   2087					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2088					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2089					;       CORPORATION.
   2090					;
   2091					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2092					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2093					;
   2094					;		MODULE: COMMON DEFINITIONS
   2095					;
   2096					;		VERSION: 01-00
   2097					;
   2098					;		AUTHOR: TOM PORCHER
   2099					;
   2100					;		DATE: 4-JUN-75
   2101					;
   2102					;
   2103					;	THIS MODULE CONTAINS:
   2104					;
   2105					;	1) COMMON PARAMETERS AND MACROS
   2106					;
   2107					;	2) LP-20 DEVICE REGISTER DEFINITIONS
   2108					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 20
COMMON PARAMETERS AND MACROS

   2110						.SBTTL	COMMON PARAMETERS AND MACROS
   2111					;
   2112					; PARAMETERS
   2113					;
   2114					;L$$P20=	2			;TWO LINEPRINTERS
   2115		000214 			LPALOC=	140.			;LINE ALLOCATION FOR EACH LP
   2116		000012 			LPRTRY=	10.			;# RETRYS ON ERRORS AND HUNG
   2117					;
   2118					; EVENT FLAGS
   2119					;
   2120		000001 			E.FLPD=	1			;(1) INTERRUPT LEVEL I/O DONE
   2121		000001 			 EF.LPD=BIT0
   2122		000002 			E.FLPC=	2			;(2) MARK-TIME
   2123		000002 			 EF.LPC=BIT1
   2124		000003 			E.FLPQ=	3			;(3) CTY OUTPUT QUEUE I/O REQUESTS
   2125		000004 			 EF.LPQ=BIT2
   2126									;(4) RESERVED FOR E.NIR (EXEC FLAG)
   2127		000005 			E.FLPS=	5			;(5) STATUS REQUEST (LOCAL TO SSTSLP)
   2128		000020 			 EF.LPS=BIT4
   2129		000006 			E.FLPW=	6			;(6) WAIT FOR LP-20 TO SETTLE AFTER FLUSH
   2130		000040 			 EF.LPW=BIT5
   2131					;
   2132					; MISC. MCALL'S
   2133					;
   2134					.MCALL QIOSY$,ALUN$,MRKT$,QIOW$,SPRA$S,SVTK$S,WSIG$S,WTLO$S,WTSE$S,DIR$
   2135					.MCALL $DEF,CALL,RETURN,.INH0,.INH,.ENB0,.ENB,PUSH,POP,.STKM
   2136	004734					$DEF
   2137	004734					QIOSY$
   2138						.ENABLE	AMA
   2139						.LIST	MEB
   2140					;
   2141					; COMMON MACROS
   2142					;
   2143					.MACRO SAVE LIST
   2144						PUSH	<LIST>
   2145					  .MACRO RESTORE
   2146					    $$$=0
   2147					    .IRP ITEM,<LIST>
   2148					      $$$=$$$+1
   2149					    .ENDM
   2150					    .REPT $$$
   2151					      $$$$=0
   2152					      .IRP ITEM,<LIST>
   2153					        $$$$=$$$$+1
   2154					        .IF EQ $$$$-$$$
   2155						  POP	ITEM
   2156					        .ENDC
   2157					      .ENDM
   2158					      $$$=$$$-1
   2159					    .ENDR
   2160					  .ENDM
   2161					.ENDM
   2162					;
   2163					; BITS IN T.HCBC WORD IN THREAD BLOCK
   2164					;
   2165		100000 			TB.DON=	BIT15			;THREAD BLOCK DONE *** MUST BE SIGN BIT ***
   2166		040000 			TB.ABO=	BIT14			;ABORTED BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 20-1
COMMON PARAMETERS AND MACROS

   2167		020000 			TB.EOF=	BIT13			;BLOCK REPRESENTS EOF
   2168		010000 			TB.LPC=	BIT12			;LOAD PAGE COUNTER FUNCTION
   2169		004000 			TB.RMD=	BIT11			;TRANSLATION RAM DATA
   2170		002000 			TB.VFD=	BIT10			;VFU DATA
   2171		036000 			TB.SFN=	TB.EOF!TB.LPC!TB.RMD!TB.VFD ;SPECIAL FUNCTIONS
   2172					;
   2173					; QUEUE I/O -- THREAD BLOCK VALUES
   2174					;
   2175		000004 			PBTHRD=	4			;R.PB+4 IS START OF THREAD BLOCK
   2176					;
   2177		177774 			T.HEMA=	0-PBTHRD		;(BYTE) EXTENDED MEMORY ADDRESS BITS 4 & 5
   2178		177775 			T.HVFC=	1-PBTHRD		;(BYTE) VERTICAL FORMAT CONTROL CHARACTER
   2179		177776 			T.HIBC=	2-PBTHRD		;(WORD) INITIAL BYTE COUNT
   2180					;
   2181					;
   2182					; STUFF THAT SHOULD BE GLOBAL, BUT MACY11 DOESN'T LIKE COMPLEX GLOBALS
   2183					;
   2184		000377 			LOBYTE=	377
   2185		177400 			HIBYTE=	^C<LOBYTE>
   2186					;
   2187					;
   2188		000074 			.CYLTM=^D60
   2189					.MACRO	.INH4
   2190						MOV	@#PS,-(SP)
   2191						MOVB	#PR4,@#PS
   2192					.ENDM
   2193					.MACRO	.ENB4
   2194						MOV	(SP)+,@#PS
   2195					.ENDM
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 21
LP-20 DEVICE REGISTER DEFINITIONS

   2197						.SBTTL	LP-20 DEVICE REGISTER DEFINITIONS
   2198					;
   2199					;
   2200					; LP-20 DEVICE REGISTER DEFINITIONS
   2201					;
   2202					; *** NOTE THAT ALL OFFSETS AND ADDRESSES ARE RELATIVE TO LPCSRA ***
   2203					;
   2204					;LPEXPA==175400			;EXTERNAL PAGE ADDRESS OF LPCSRA
   2205					;LPEXPZ==20			;SIZE OF EXTERNAL PAGE ADDRESSES IN BYTES
   2206					;
   2207		000000 			LPCSRA==0			;CONTROL AND STATUS REGISTER A
   2208		100000 				ERR=	BIT15
   2209		040000 				PAGZRO=	BIT14
   2210		020000 				CHRINT=	BIT13
   2211		010000 				VFURDY=	BIT12
   2212		004000 				ONLINE=	BIT11
   2213		002000 				DELHLD=	BIT10
   2214		001000 				RSTERR=	BIT9
   2215		000400 				LOINIT=	BIT8
   2216					;
   2217		000200 				DONE=	BIT7
   2218		000100 				INTENB=	BIT6
   2219		000040 				BUSA17=	BIT5
   2220		000020 				BUSA16=	BIT4
   2221		000010 				MODE01=	BIT3
   2222		000004 				MODE00=	BIT2
   2223		000001 					TSTMOD=	1
   2224		000002 					VFULOD=	2
   2225		000003 					RAMLOD=	3
   2226		000002 				PARENB=	BIT1
   2227		000001 				GO=	BIT0
   2228					;
   2229		000002 			LPCSRB==2			;CONTROL AND STATUS REGISTER B
   2230					; BITS	15-13	NOT USED
   2231		010000 				LPTPBT=	BIT12
   2232		004000 				OPTVFU=	BIT11
   2233		002000 				TEST02=	BIT10
   2234		001000 				TEST01=	BIT9
   2235		000400 				TEST00=	BIT8
   2236					;
   2237		000200 				OFFLIN=	BIT7
   2238		000100 				VFUERR=	BIT6
   2239		000040 				LPTPAR=	BIT5
   2240		000020 				MEMPAR=	BIT4
   2241		000010 				RAMPAR=	BIT3
   2242		000004 				SYNTIM=	BIT2
   2243		000002 				DEMTIM=	BIT1
   2244		000001 				GOERR=	BIT0
   2245					;
   2246		000004 			LPBSAD==4			;BUS ADDRESS REGISTER
   2247					;
   2248		000006 			LPBCTR==6			;BYTE COUNT (2'S COMPLEMENT)
   2249					; BITS	15-12	NOT USED
   2250					;	11-0	BYTE COUNT
   2251					;
   2252		000010 			LPPCTR==10			;PAGE COUNTER
   2253					; BITS	15-12	NOT USED
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 21-1
LP-20 DEVICE REGISTER DEFINITIONS

   2254					;	11-0	PAGE COUNT
   2255					;
   2256		000012 			LPRAMD==12			;RAM DATA REGISTER
   2257					; BITS	15-13	NOT USED
   2258					;	12	RAM PARITY
   2259					;	11-0	RAM DATA
   2260					;
   2261		000014 			LPCBUF==14			;(BYTE) CHARACTER BUFFER REGISTER
   2262		000015 			LPCCTR==15			;(BYTE) COLUMN COUNT REGISTER
   2263					;
   2264		000016 			LPTDAT==16			;(BYTE) PRINTER DATA REGISTER
   2265		000017 			LPCKSM==17			;(BYTE) CHECKSUM REGISTER
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 22
COMMON DEVICE PARAMETER MODULE

   2267						.SBTTL	COMMON DEVICE PARAMETER MODULE
   2268					;
   2269					;                             COPYRIGHT (C) 1975, 1978 BY
   2270					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2271					;
   2272					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2273					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2274					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2275					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2276					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2277					;
   2278					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2279					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2280					;       CORPORATION.
   2281					;
   2282					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2283					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2284					;
   2285					;
   2286					;		MODULE: COMMON DEVICE PARAMETERS
   2287					;
   2288					;		VERSION: 01-00
   2289					;
   2290					;		AUTHOR: TOM PORCHER
   2291					;
   2292					;		DATE: 25-AUG-75
   2293					;
   2294					;
   2295					;	THIS MODULE CONTAINS:
   2296					;
   2297					;	1) DEVICE STATUS BIT DEFINITIONS
   2298					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 23
DEVICE STATUS BIT DEFINITIONS

   2300						.SBTTL	DEVICE STATUS BIT DEFINITIONS
   2301					;
   2302					; GENERAL FORM OF STATUS BLOCK
   2303					;
   2304					; WORD	0	STANDARD STAUS BITS (DV.XXX)
   2305					; 	1	DEVICE-DEPENDENT BITS (DD.XXX)
   2306					;	2	(HIGH BYTE) # BYTES OF DEVICE-DEPENDENT INFO TO FOLLOW
   2307					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS TO FOLLOW
   2308					;	3-...	DEVICE DEPENDENT INFO (# BYTES IN WORD 2)
   2309					;	.-...	DEVICE REGISTERS (# BYTES IN WORD 2)
   2310					;
   2311					;
   2312					; STANDARD BITS (FIRST WORD OF STATUS)
   2313					;
   2314		000001 			DV.NXD=	BIT0			;NON-EX DEVICE
   2315		000002 			DV.OFL=	BIT1			;OFF-LINE
   2316		000004 			DV.OIR=	BIT2			;HARDWARE ERROR. OPERATOR INTERVENTION REQUIRED.
   2317		000010 			DV.SCN=	BIT3			;SOFTWARE CONDITON. ACKNOWLEDGE REQUIRED.
   2318		000020 			DV.IOP=	BIT4			;I/O IN PROGRESS
   2319		000040 			DV.EOF=	BIT5			;END-OF-FILE ENCOUNTERED
   2320		000100 			DV.LOG=	BIT6			;ERROR LOGGING REQUIRED
   2321		000200 			DV.URE=	BIT7			;UN-RECOVERABLE ERROR
   2322		000400 			DV.F11=	BIT8			;ERROR ON FROM -11 REQUEST
   2323		001000 			DV.HNG=	BIT9			;DEVICE HUNG
   2324					;
   2325					;
   2326					; DEVICE-DEPENDENT BITS (SECOND WORD OF STATUS)
   2327					;
   2328					; LP-20 LINEPRINTER
   2329					;
   2330		000001 			DD.PGZ=	BIT0			;PAGE COUNTER PASSED ZERO
   2331		000002 			DD.CHI=	BIT1			;CHARACTER INTERRUPT (FROM RAM)
   2332		000004 			DD.VFE=	BIT2			;VFU ERROR-- PAPER RE-ALIGNMENT REQUIRED
   2333		000010 			DD.LER=	BIT3			;ERROR FINDING/READING VF AND RAM FILE
   2334		000020 			DD.OVF=	BIT4			;PRINTER HAS OPTICAL VFU (AS OPPOSED TO DAVFU)
   2335		000040 			DD.RME=	BIT5			;RAM PARITY ERROR-- RELOAD REQUIRED
   2336					;
   2337					; DEVICE DEPNDENT INFO FOR LP-20 (2 BYTES):
   2338					; WORD	3	(LOW BYTE) ACCUMULATED CHECKSUM
   2339					;		(HIGH BYTE) RETRY COUNT
   2340					;
   2341					;	4-13	LP-20 DEVICE REGISTERS (16. BYTES)
   2342					;
   2343					;
   2344					; CD-11 CARD READER
   2345					;
   2346		000001 			DD.RCK=	BIT0			;READ (PHOTO) CHECK
   2347		000002 			DD.PCK=	BIT1			;PICK CHECK
   2348		000004 			DD.SCK=	BIT2			;STACK CHECK
   2349		000010 			DD.HEM=	BIT3			;HOPPER EMPTY
   2350		000020 			DD.SFL=	BIT4			;STACKER FULL
   2351					;
   2352					; DEVICE-DEPENDENT INFO FOR CD-11 (0 BYTES)
   2353					; WORD	3-6	DEVICE REGISTERS FOR CD-11 (8. BYTES)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 24
LP-20 COMMON DATA MODULE

   2355						.SBTTL	LP-20 COMMON DATA MODULE
   2356					;
   2357					;                             COPYRIGHT (C) 1975, 1978 BY
   2358					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2359					;
   2360					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2361					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2362					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2363					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2364					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2365					;
   2366					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2367					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2368					;       CORPORATION.
   2369					;
   2370					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2371					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2372					;
   2373					;		MODULE: LP-20 COMMON DATA
   2374					;
   2375					;		VERSION: 01-00
   2376					;
   2377					;		AUTHOR: TOM PORCHER
   2378					;
   2379					;		DATE: 7-JUN-75
   2380					;
   2381					;
   2382					;	THIS MODULE CONTAINS:
   2383					;
   2384					;	1) COMMON VARIABLES
   2385					;
   2386					;	2) DEVICE TABLES
   2387					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 25
COMMON VARIABLES

   2389						.SBTTL	COMMON VARIABLES
   2390					;
   2391					; LP DRIVER TASK HEAD
   2392					;
   2393					;
   2394	004734				LPHD::	.STKM	0,0,0,0,0,0,0,LPINI,174000,LPSTK
	005002	000000 	000000 	000000 		.WORD	0,0,0,0
	005010	000000
	005030	174000 	005324'	005214'		.WORD	174000,LPINI,LPSTK
	005064	000005 				.WORD	5
	005066	000000G				.WORD	TTPEN
	005070	000000 				.WORD	0
	005072	000000 				.WORD	0
	005074	000000 				.WORD	0
	005076	000000 				.WORD	0
	005100	000000 				.WORD	0
	005102	000000 				.WORD	0
	005104	000000 				.WORD	0
	005106	000000 				.WORD	0
	005110	000000 				.WORD	0
	005112	000000 				.WORD	0
	005214	000000 				.WORD	0
	005216	000000 				.WORD	0
	005220	000000 				.WORD	0
	005222	000000 				.WORD	0
	005224	000000 				.WORD	0
	005226	000000 				.WORD	0
	005230	005324'				.WORD	LPINI
	005232	174000 				.WORD	174000
   2395					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 26
LP-20 DEVICE TABLES

   2397						.SBTTL	LP-20 DEVICE TABLES
   2398
   2399					;
   2400					;	LP-20 STATUS BITS
   2401					;
   2402		100000 				LP.HNG=	BIT15		;LP DID NOT COMPLETE I/O IN 20 SEC
   2403									;SET BY MARK-TIME REQUEST
   2404									;CLEARED BY ..DOLP
   2405		040000 				LP.SST=	BIT14		;SEND STATUS OF THIS LP TO -10
   2406									;SET BY INTERRUPT SERVICE
   2407									;CHECKED BY TASK
   2408		020000 				LP.PZI=	BIT13		;PAGE-ZERO INTERRUPT ENABLE
   2409									;SET FROM RAM/VF LOAD FILE
   2410									;CHECKED ON PAGZRO INTERRUPTS
   2411		010000 				LP.MCH=	BIT12		;MULTI-CHARACTER PRINT OPERATION IN PROGRESS
   2412									; (ARROW MODE). SET ON UNDCHR INTERRUPT,
   2413									; CLEARED WHEN DONE SET.
   2414		004000 				LP.WAT=	BIT11		;THIS LP IS WAITING FOR A RESPONSE
   2415									; FROM THE -10, DUE TO PAGZRO, ERROR
   2416									; ON SOMETHING LIKE THAT. SET BY INTERRUPT
   2417									; SERVICE, CLEARED BY 'CONTINUE'
   2418									; FUNCTION FROM -10.
   2419		002000 				LP.CLR=	BIT10		;CLEAR RAM REQUIRED (DUE TO ERROR)
   2420									; SET BY SSTSLP, CHECKED AND CLEARED BY TESTLP
   2421		001000 				LP.LIP=	BIT9		;LOAD OF VFU AND RAM IN PROGRESS, SET
   2422									; BY START OF LOAD (IN LPIOD) AND CLEARED BY
   2423									; TRANSFER COMPLETE FOR RAM/VFU DATA.
   2424		000400 				LP.F10=	BIT8		;FROM-10 REQUEST HAS BEEN QUEUED
   2425									; SET BY ..STLP AND SPECIAL FUNCTIONS
   2426									; CLEARED WHEN QUEUE IS EMPTY OR ..SPLP
   2427		000200 				LP.EOF=	BIT7		;END-OF-FILE. SET BY EOF FUNCTION ENCOUNTERED
   2428									; IN THREADED LIST BY INTERRUPT SERVICE.
   2429									; CHECKED AND CLEARED BY TESTLP WHEN
   2430									; CHECKSUM IS CLEARED.
   2431		000003 				LP.UNT=	BIT1!BIT0	;(LOW BITS) UNIT # OF THIS LP.
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 27
LP-20 DRIVER TASK MODULE

   2433						.SBTTL	LP-20 DRIVER TASK MODULE
   2434					;
   2435					;                             COPYRIGHT (C) 1975, 1978 BY
   2436					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   2437					;
   2438					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   2439					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   2440					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   2441					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   2442					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   2443					;
   2444					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   2445					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   2446					;       CORPORATION.
   2447					;
   2448					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   2449					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   2450					;
   2451					;		MODULE: LP-20 DRIVER TASK
   2452					;
   2453					;		VERSION: 01-01
   2454					;
   2455					;		AUTHOR: TOM PORCHER
   2456					;
   2457					;		DATE: 4-JUN-75
   2458					;
   2459					;
   2460					;	THIS MODULE CONTAINS:
   2461					;
   2462					;	1) LPINI (LP-20 INITIALIZATION)
   2463					;
   2464					;	2) LPLOOP (LP-20 DRIVER TASK LOOP)
   2465					;
   2466					;	MODIFICATIONS:
   2467					;
   2468					;	NO.	DATE		PROGRAMMER	REASON
   2469					;	---	----		----------	------
   2470					;	001	28-FEB-77	A. PECKHAM	CHANGE LENGTH OF VFU RECORDS
   2471					;						TO 145 FROM 140
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 28
LPINI	(INITIALIZE LP-20 TASK)

   2473						.SBTTL	LPINI	(INITIALIZE LP-20 TASK)
   2474					;
   2475					;+
   2476					;
   2477					;	THIS IS THE LP-20 USER-LEVEL TASK. IT HANDLES QIO
   2478					; REQUESTS, OUTPUT ACKNOWLEDGEMNETS, AND HUNG-CHECKING.
   2479					;
   2480					;	LPINI IS CALLED WHEN THE TASK IS STARTED. IT RESETS THE
   2481					; LP-20 AND LOADS THE STANDARD VERTICAL FORMAT AND TRANSLATION
   2482					; RAM.  THE 10-SECOND MARK-TIME REQUEST IS ALSO ENTERED.
   2483					;
   2484					;-
   2485					;
   2486					;
   2487					; DIRECTIVE PARAMETER BLOCKS
   2488					;
   2489	005234				LPMRKT:
   2490	005234					MRKT$	E.FLPC,10.*.CYLTM,10.*.CYLTM ;MARK-TIME REQUEST FOR 10 SECONDS
	005234	   027 	   005 			.BYTE	23.,5
	005236	000002 				.WORD	E.FLPC
	005240	001130 				.WORD	10.*.CYLTM
	005242	001130 				.WORD	10.*.CYLTM
	005244	000000 				.WORD
   2491	005246				MKSCDP:
   2492	005246					MRKT$	E.FLPW,.CYLTM,0		;WAIT FOR 1 SECOND
	005246	   027 	   005 			.BYTE	23.,5
	005250	000006 				.WORD	E.FLPW
	005252	000074 				.WORD	.CYLTM
	005254	000000 				.WORD	0
	005256	000000 				.WORD
   2493					;
   2494	005260				LPSSTV:
   2495	005260	005262'				.WORD	LPTRP4		;WHERE TO GO ON TRAP-AT-4
   2496					;
   2497					; HERE ON A TRAP TO 4 (HOPEFULLY AN EXPECTED NON-EX LP)
   2498					;
   2499	005262				LPTRP4:
   2500	005262	021627 	006652'			CMP	(SP),#LPDINT	;THIS FROM MARK-TIME?
   2501	005266	001404 				BEQ	10$		;YES-- OK
   2502	005270	021627 	010302'			CMP	(SP),#LPDCLR	;HOW ABOUT INIT?
   2503	005274	001401 				BEQ	10$		;YES-- OK
   2504	005276	000004 				IOT			;***** FATAL-- BAD TRAP AT 4
   2505					;
   2506	005300				10$:
   2507	005300	005062 	000000G			CLR	LPCSA(R2)	;NON-EX LP-- SAY SO
   2508	005304	005003 				CLR	R3		; BOTH WAYS
   2509	005306	052766 	000001 	000002 		BIS	#BIT0,2(SP)	;SET CARRY ON STACK
   2510	005314	000002 				RTI			;RETURN TO INTERRUPTED ROUTINE
   2511					;
   2512					; HERE ON POWER-RECOVERY AST
   2513					;
   2514	005316				LPWRUP:
   2515	005316					CALL	INITLP		;INIT ALL LP'S
	005316	004737 	010232'			JSR	PC,INITLP
   2516	005322	000002 				RTI			;RETURN FROM AST
   2517					;
   2518					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 28-1
LPINI	(INITIALIZE LP-20 TASK)

   2519					; LPINI -- INITIALIZE LP'S
   2520					;
   2521	005324				LPINI:
   2522	005324	013737 	000000G	000000G		MOV	.CRTSK,LPEVFG	;SAVE OUR TASK ADDRESS
   2523	005332	062737 	000020 	000000G		ADD	#A.EF,LPEVFG	;MAKE THAT ADDR OF OUR EVENT FLAGS
   2524	005340	052777 	000060 	000000G		BIS	#EF.LPW!EF.LPS,@LPEVFG ;SAY STATUS BUFFER AVAILABLE AND NOT WAITING
   2525	005346					DIR$	#LPMRKT		;ENTER MARK-TIME REQUEST FOR 10 SECONDS
	005346	012746 	005234'			MOV	#LPMRKT,-(SP)
	005352	104375 				EMT	375
   2526	005354					SVTK$S	#LPSSTV,#1	;ENABLE FOR TRAP-AT-4 RECOGNITION
	005354	012746 	000001 			MOV	#1,-(SP)
	005360	012746 	005260'			MOV	#LPSSTV,-(SP)
	005364	012746 				MOV	(PC)+,-(SP)
	005366	   071 	   003 			.BYTE	57.,3
	005370	104375 				EMT	375
   2527	005372					SPRA$S	#LPWRUP		;SETUP POWER-UP AST
	005372	012746 	005316'			MOV	#LPWRUP,-(SP)
	005376	012746 				MOV	(PC)+,-(SP)
	005400	   155 	   002 			.BYTE	109.,2
	005402	104375 				EMT	375
   2528	005404					CALL	INITLP		;INIT ALL THE LP'S
	005404	004737 	010232'			JSR	PC,INITLP
   2529					;	BR	LPLOOP		;FALL INTO NORMAL PROCESSING LOOP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 29
LPLOOP	(LP-20 DRIVER TASK LOOP)

   2531						.SBTTL	LPLOOP	(LP-20 DRIVER TASK LOOP)
   2532					;
   2533					;+
   2534					;
   2535					;	LPLOOP WAITS FOR AND DISPATCHES ON THE LP EVENT FLAGS,
   2536					; EF.LPD (INTERRUPT LEVEL I/O DONE), EF.NIR (QUEUE I/O REQUEST),
   2537					; AND EF.LPC (10 SECOND MARK-TIME REQUEST), IN THAT ORDER.
   2538					;
   2539					;-
   2540					;
   2541					;
   2542	005410				LPLOOP:
   2543	005410					WTLO$S	1,#EF.LPC!EF.LPD!EF.NIR ;WAIT FOR CLOCK (10 SECONDS)
	005410	012746 	000000C			MOV	#EF.LPC!EF.LPD!EF.NIR,-(SP)
	005414	012746 	000001 			MOV	#1,-(SP)
	005420	012746 				MOV	(PC)+,-(SP)
	005422	   053 	   003 			.BYTE	43.,3
	005424	104375 				EMT	375
   2544									; OR I/O DONE FROM ISR
   2545									; OR QIO REQUEST TO DO.
   2546	005426					.INH			;A FLAG SET-- LOCK OUT LP INTERRUPTS
	005426	013746 	177776 			MOV	PS,-(SP)
	005432	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2547	005440	017737 	000000G	000000G		MOV	@LPEVFG,LPCEVF	;GET CURRENT EVENT FLAGS
   2548	005446	042777 	000000C	000000G		BIC	#EF.LPC!EF.LPD!EF.NIR,@LPEVFG ;CLEAR THE FLAGS WE WAITED FOR
   2549	005454					.ENB			;RETORE IRPS
	005454	012637 	177776 			MOV	(SP)+,@#PS	;;
   2550	005460	005737 	000000G			TST	.LPPFL		;POWER FAIL?
   2551	005464	001404 				BEQ	10$		;NO -- CONTINUE
   2552	005466					CALL	INITLP
	005466	004737 	010232'			JSR	PC,INITLP
   2553	005472	005037 	000000G			CLR	.LPPFL
   2554	005476				10$:
   2555					;
   2556					;	BR	LPIOD		;TRY FOR EF.IOD (I/O DONE) FIRST
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 30
LPIOD	(LP TASK I/O DONE)

   2558						.SBTTL	LPIOD	(LP TASK I/O DONE)
   2559					;
   2560					;+
   2561					;
   2562					;	LPIOD IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.LPD IS SET.
   2563					; THIS IS SET BY THE INTERRUPT SEVICE WHENEVER IT IS DONE WITH A BUFFER
   2564					; OR STATUS INFORMATION IS TO BE SENT TO THE -10 (IE. LP JUST CAME
   2565					; ONLINE).
   2566					;
   2567					;	EACH LP'S THREADED OUTPUT LIST IS SCANNED FOR DONE BUFFERS
   2568					; (INDICATED BY T.HCBC NEGATIVE). THESE ARE RETURNED TO THE FREE POOL,
   2569					; AND, IN THE CASE OF QUEUE I/O REQUESTS, ..IODN IS CALLED TO TELL
   2570					; THE REQUESTOR THAT I/O HAS BEEN COMPLETED. IF A QUEUE I/O REQUEST
   2571					; IS STOPPED IN THE MIDDLE OF A TRANSFER BECAUSE OF ERROR, THE
   2572					; ERROR INDICATION IS GIVEN TO ..IODN, AND THE REQUEST IS ABORTED.
   2573					;
   2574					;	AFTER THE THREADED LIST SCAN, THE LP STATUS IS SENT TO THE
   2575					; -10 (BY CALLING SSTSLP) IF THE LP.SST FLAG IS SET.
   2576					;
   2577					;	IF A BUFFER WAS COMPLETED, AND THERE IS EITHER NONE
   2578					; OR ONE BUFFER TO OUTPUT, A REQUEST TO SEND IS SENT TO THE -10
   2579					; (BY CALLING ..SACK).
   2580					;
   2581					;-
   2582					;
   2583	005476				LPIOD:
   2584	005476	032737 	000001 	000000G		BIT	#EF.LPD,LPCEVF	;I/O DONE?
   2585	005504	001504 				BEQ	99$		;NO-- TRY NEXT FLAG IN CHAIN
   2586	005506	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS LPTBL (UNIT 0)
   2587	005512					PUSH	#L$$P20		;STACK COUNT OF LP'S TO LOOK AT
	005512	012746 	000002 			MOV	#L$$P20,-(SP)
   2588	005516				10$:
   2589	005516	005005 				CLR	R5		;AND INDICATE NO BUFFERS DONE
   2590	005520	016203 	000000G			MOV	LPCSA(R2),R3	;GET THE EXT PAGE ADDR OF THIS LP
   2591					;
   2592					; LOOP THROUGH THREADED LIST FOR THIS LP
   2593					;
   2594	005524				20$:
   2595	005524	016200 	000000G			MOV	LPTHD(R2),R0	;GET START OF LIST
   2596	005530	001411 				BEQ	80$		;DONE-- GO AWAY
   2597					;
   2598					; LOOK AT THIS THREAD BLOCK TO SEE IF DONE
   2599					;
   2600	005532				30$:
   2601	005532	005760 	000000G			TST	T.HCBC(R0)	;SEE IF DONE
   2602	005536	002471 				BLT	40$		;DONE-- PROCESS
   2603	005540	005762 	000000G			TST	LPITH(R2)	;IS I/O IN PROGRESS ON THIS BLOCK?
   2604	005544	001003 				BNE	80$		;YES-- WE ARE DONE WITH WHAT IS DONE
   2605					;
   2606					; LP STOPPED ON THIS ACTIVE THREAD BLOCK
   2607					;
   2608	005546	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS?
   2609	005552	001063 				BNE	40$		;YES-- TERMINATE IT, SINCE I/O STOPPED
   2610					;
   2611					; END OF LIST-- SEE IF WE SHOULD SEND STATUS AND/OR ACK
   2612					;
   2613	005554				80$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 30-1
LPIOD	(LP TASK I/O DONE)

   2614	005554	032712 	040000 			BIT	#LP.SST,(R2)	;TIME TO SEND STATUS?
   2615	005560	001402 				BEQ	81$		;NO-- HOW BOUT ACK?
   2616	005562					CALL	SSTSLP		;YES-- SEND STATUS TO -10
	005562	004737 	007040'			JSR	PC,SSTSLP
   2617	005566				81$:
   2618	005566	005700 				TST	R0		;ANYTHING LEFT TO DO?
   2619	005570	001411 				BEQ	84$		;NO-- SEND ACK
   2620	005572	032712 	004000 			BIT	#LP.WAT,(R2)	;ARE WE WAITING FOR RESPONSE?
   2621	005576	001026 				BNE	86$		;YES-- DON'T START OUPUT
   2622	005600	005762 	000000G			TST	LPITH(R2)	;NO-- IS LP GOING ALREADY?
   2623	005604	001023 				BNE	86$		;YES-- LEAVE IT GO
   2624	005606					CALL	TESTLP		;NO-- SEE IF LP CAN BE STARTED
	005606	004737 	010042'			JSR	PC,TESTLP
   2625	005612	000420 				BR	86$		;SEE IF ACK NEEDED
   2626					;
   2627					; QUEUE IS EMPTY-- RESET ALL FLAGS
   2628					;
   2629	005614				84$:
   2630	005614					.INH			;;;MAKE SURE DTE DOESN'T GIVE US SOMETHING
	005614	013746 	177776 			MOV	PS,-(SP)
	005620	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   2631	005626	016200 	000000G			MOV	LPTHD(R2),R0	;;;GET THREAD POINTER
   2632	005632	001006 				BNE	85$		;;;OOPS-- LET'S GO AWAY, WE GOT SOMETHING
   2633	005634	032777 	000001 	000000G		BIT	#EF.LPD,@LPEVFG	;;;WILL WE BE BACK AGAIN?
   2634	005642	001002 				BNE	85$		;;;YES-- CATCH FLAGS NEXT TIME
   2635	005644	042712 	115400 			BIC	#LP.F10!LP.WAT!LP.LIP!LP.MCH!LP.HNG,(R2) ;;;SURELY OFF NOW
   2636	005650				85$:
   2637	005650					.ENB			;RESTORE INTERRUPTS
	005650	012637 	177776 			MOV	(SP)+,@#PS	;;
   2638	005654				86$:
   2639	005654	005705 				TST	R5		;DID WE REMOVE A BUFFER?
   2640	005656	001412 				BEQ	90$		;NO-- DON'T SEND ACK
   2641	005660	005700 				TST	R0		;YES-- ANY LEFT?
   2642	005662	001402 				BEQ	87$		;NONE-- SEND ACK
   2643	005664	005710 				TST	@R0		;IS THIS LAST BUFFER?
   2644	005666	001006 				BNE	90$		;NO-- SEND NOTHING
   2645	005670				87$:
   2646	005670	012700 	000000G			MOV	#LPTBL,R0	;ADDRESS BASE ADDR OF TABLE FOR ..SACK
   2647	005674	012703 	000000G			MOV	#D.CLPT,R3	;SAY LPT DEVICE CODE
   2648	005700					CALL	..SACK		;SEND THE ACK
	005700	004737 	000000G			JSR	PC,..SACK
   2649					;
   2650					; DONE WITH LP-- GET ANOTHER
   2651					;
   2652	005704				90$:
   2653	005704	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN TABLE
   2654	005710	005316 				DEC	(SP)		;DECREMENT COUNT
   2655	005712	003301 				BGT	10$		;BACK FOR MORE
   2656	005714	005726 				TST	(SP)+		;CLEAN STACK
   2657	005716				99$:
   2658	005716	000137 	006356'			JMP	LPNIR		;DONE-- TRY NEXT EVENT-FLAG
   2659					;
   2660					; THREAD BLOCK DONE-- REMOVE FROM LIST & DEALLOCATE
   2661					;
   2662	005722				40$:
   2663	005722	005703 				TST	R3		;LP EXIST???
   2664	005724	001564 				BEQ	49$		;NO-- GIVE UP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 30-2
LPIOD	(LP TASK I/O DONE)

   2665	005726	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS (I.E. NOW COMPLETE)
   2666	005732	001424 				BEQ	41$		;NO-- GO ON
   2667					;
   2668	005734	042712 	001000 			BIC	#LP.LIP,(R2)	;YES-- NO LONGER SO
   2669	005740	042713 	000014 			BIC	#MODE00!MODE01,(R3) ;CLEAR LOAD MODE BITS
   2670	005744					PUSH	<R0,R3>		;SAVE EPA
	005744	010046 				MOV	R0,-(SP)
	005746	010346 				MOV	R3,-(SP)
   2671	005750	016200 	000000G			MOV	LPRMA(R2),R0	;GET RAM BUFFER ADDR
   2672	005754	016201 	000000G			MOV	LPRMZ(R2),R1	; AND DATA SIZE
   2673	005760	012703 	000000G			MOV	#.BGBUF,R3	;WE GOT IT FROM THE BIG BUFFER
   2674	005764					CALL	..DEC2		;RETURN THE BUFFER
	005764	004737 	000000G			JSR	PC,..DEC2
   2675	005770					POP	<R3,R0>		;RESTORE EPA
	005770	012603 				MOV	(SP)+,R3
	005772	012600 				MOV	(SP)+,R0
   2676	005774	005062 	000000G			CLR	LPRMA(R2)	;NO LONGER THERE
   2677	006000	005062 	000000G			CLR	LPRMC(R2)	; . .
   2678	006004				41$:
   2679	006004	016004 	000000G			MOV	T.HCBC(R0),R4	;GET COMPLETION STATUS
   2680	006010	032704 	040000 			BIT	#TB.ABO,R4	;ABORTED?
   2681	006014	001130 				BNE	49$		;YES-- LEAVE NOW
   2682	006016	032704 	036000 			BIT	#TB.SFN,R4	;SPECIAL FUNCTION?
   2683	006022	001525 				BEQ	49$		;NO-- GO ON
   2684					;
   2685	006024	032704 	020000 			BIT	#TB.EOF,R4	;EOF?
   2686	006030	001430 				BEQ	42$		;NO-- JUST GO ON
   2687	006032	016260 	000000G	000000G		MOV	LPRMA(R2),T.HCAD(R0) ;RAM/VFU DATA PRESENT?
   2688	006040	001003 				BNE	411$		;YES-- DO RAM/VFU LOAD
   2689	006042	052712 	040200 			BIS	#LP.EOF!LP.SST,(R2) ;NO-- NOTE THAT EOF HAS OCCURED
   2690	006046	000513 				BR	49$		;THAT'S IT FOR EOF IF NO RAM/VFU DATA
   2691	006050				411$:
   2692	006050	016260 	000000G	000000G		MOV	LPRMC(R2),T.HCBC(R0) ;SET BYTE COUNT= LAST ADDRESS
   2693	006056	166060 	000000G	000000G		SUB	T.HCAD(R0),T.HCBC(R0) ;MAKE IT A BYTE COUNT
   2694	006064	052712 	001000 			BIS	#LP.LIP,(R2)	;NOTE LOAD NOW IN PRGRESS
   2695	006070	052713 	000010 			BIS	#VFULOD*MODE00,(R3) ;ASSUME VFU LOAD
   2696	006074	026227 	000000G	001000 		CMP	LPRMZ(R2),#1000	;TRNASLATION RAM DATA?
   2697	006102	001224 				BNE	80$		;NO-- MUST BE VFU DATA
   2698	006104	052713 	000014 			BIS	#RAMLOD*MODE00,(R3) ;YES-- SET RAM LOAD MODE
   2699	006110	000621 				BR	80$		;START LP GOING ON THIS BLOCK
   2700	006112				42$:
   2701	006112	032704 	010000 			BIT	#TB.LPC,R4	;LOAD PAGE COUNTER FUNCTION?
   2702	006116	001413 				BEQ	43$		;NO-- GO ON
   2703	006120	042712 	020000 			BIC	#LP.PZI,(R2)	;ASSUME NO INTERRUPT ENABLE
   2704	006124	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS OF FUNCTION DATA
   2705	006130	016163 	000002 	000010 		MOV	2(R1),LPPCTR(R3) ;SET PAGE COUNTER
   2706	006136	002057 				BGE	49$		;BIT15=0-- NO INTERRUPT
   2707	006140	052712 	020000 			BIS	#LP.PZI,(R2)	;BIT15=1-- INTERRUPT ENABLE
   2708	006144	000454 				BR	49$		;ALL DONE
   2709	006146				43$:
   2710	006146					PUSH	<R3,R0>		;SAVE THIS THREAD BLOCK ADDRESS
	006146	010346 				MOV	R3,-(SP)
	006150	010046 				MOV	R0,-(SP)
   2711	006152	016201 	000000G			MOV	LPRMC(R2),R1	;GET CURRENT RAM DATA ADDRESS
   2712	006156	001026 				BNE	46$		;GOT IT-- PUT THIS DATA IN THAT BUFFER
   2713	006160	012700 	000000G			MOV	#.BGBUF,R0	;POINT TO BIG BUFFER FOR DATA BLOCK
   2714	006164	012701 	001000 			MOV	#1000,R1	;ASSUME TRANSLATION RAM DATA
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 30-3
LPIOD	(LP TASK I/O DONE)

   2715	006170	032704 	004000 			BIT	#TB.RMD,R4	;RAM DATA?
   2716	006174	001002 				BNE	44$		;YES-- GOT IT
   2717	006176	012701 	000444 			MOV	#<^D<145*2>+2+3>&<-4>,R1 ; +++001 NO-- VFU DATA-- GET MAX LENGTH
   2718	006202				44$:
   2719	006202					CALL	..ALC2		;GET A BUFFER
	006202	004737 	000000G			JSR	PC,..ALC2
   2720	006206	103004 				BCC	45$		;GOT IT-- GO ON
   2721	006210					WSIG$S			;NO GOT-- WAIT AN INSTANT
	006210	012746 				MOV	(PC)+,-(SP)
	006212	   061 	   001 			.BYTE	49.,1
	006214	104375 				EMT	375
   2722	006216	000771 				BR	44$		;TRY FOR BUFFER AGAIN
   2723	006220				45$:
   2724	006220	010162 	000000G			MOV	R1,LPRMZ(R2)	;STORE RAM DATA SIZE
   2725	006224	010001 				MOV	R0,R1		;COPY THAT BUFFER ADDRESS
   2726	006226	010162 	000000G			MOV	R1,LPRMA(R2)	;STORE RAM DATA ADDRESS
   2727	006232	011600 				MOV	(SP),R0		;RESTORE THREAD BLOCK ADDRESS
   2728	006234				46$:
   2729	006234	016203 	000000G			MOV	LPRMA(R2),R3	;COPY ADDRESS WHERE DATA GOES
   2730	006240	066203 	000000G			ADD	LPRMZ(R2),R3	;COMPUTE END OF BUFFER
   2731	006244	016000 	000000G			MOV	T.HCAD(R0),R0	;GET THE RAM DATA ADDRESS
   2732	006250	042704 	177400 			BIC	#HIBYTE,R4	;CLEAR TRASH IN BYTE COUNT
   2733	006254	001404 				BEQ	48$		;ALL DONE IF ZERO BYTE COUNT
   2734	006256				47$:
   2735	006256	020103 				CMP	R1,R3		;GOING BEYOND END OF BUFFER?
   2736	006260	103002 				BHIS	48$		;YES-- THAT'S ALL THE DATA WE CAN TAKE
   2737	006262	112021 				MOVB	(R0)+,(R1)+	;STORE A BYTE AWAY
   2738	006264	077404 				SOB	R4,47$		;LOOP FOR ALL BYTES OF DATA
   2739	006266				48$:
   2740	006266					POP	<R0,R3>		;RESTORE THE THREAD BLOCK POIINTER
	006266	012600 				MOV	(SP)+,R0
	006270	012603 				MOV	(SP)+,R3
   2741	006272	010162 	000000G			MOV	R1,LPRMC(R2)	;STORE CURRENT BYTE ADDRESS
   2742	006276				49$:
   2743	006276	011062 	000000G			MOV	@R0,LPTHD(R2)	;REMOVE THIS BUFFER
   2744	006302	016001 	000000G			MOV	T.HBCT(R0),R1	;GET SIZE OF THIS THREAD BLOCK
   2745	006306	001013 				BNE	60$		;NOT QIO-- JUST DEALLOCATE
   2746					;
   2747					; QUEUE I/O REQUEST DONE-- CALL ..IODN
   2748					;
   2749	006310					PUSH	R3		;SAVE EPA
	006310	010346 				MOV	R3,-(SP)
   2750	006312	110403 				MOVB	R4,R3		;GET QUEUE I/O STATUS
   2751	006314	016004 	177776 			MOV	T.HIBC(R0),R4	;GET INITAIL BYTE COUNT AS TRANSFER COUNT
   2752	006320	010001 				MOV	R0,R1		;COPY THREAD BLOCK ADDRESS
   2753	006322	162701 	000004G			SUB	#R.PB+PBTHRD,R1	;GET ADDRESS OF REAL QUEUE I/O NODE
   2754	006326					CALL	..IODN		;SAY I/O DONE
	006326	004737 	000000G			JSR	PC,..IODN
   2755	006332					POP	R3		;RESTORE EPA
	006332	012603 				MOV	(SP)+,R3
   2756	006334	000406 				BR	61$		;ALL DONE
   2757					;
   2758					; ALL DONE WITH THREAD BLOCK-- DEALLOCATE IT
   2759					;
   2760	006336				60$:
   2761	006336					CALL	..DECB		;DEALLOCATE THE BUFFER
	006336	004737 	000000G			JSR	PC,..DECB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 30-4
LPIOD	(LP TASK I/O DONE)

   2762	006342	032712 	000400 			BIT	#LP.F10,(R2)	;DOES -10 HAVE A REQUEST IN?
   2763	006346	001401 				BEQ	61$		;NO-- DON'T FLAG TO ACK
   2764	006350	010205 				MOV	R2,R5		;NOTE THAT WE DID SOMETHING
   2765	006352				61$:
   2766	006352	000137 	005524'			JMP	20$		;GET NEXT THREAD BLOCK FOR THIS LP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 31
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2768						.SBTTL	LPNIR	(LP TASK QUEUE I/O REQUEST)
   2769					;
   2770					;+
   2771					;
   2772					;	LPNIR IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.NIR IS SET.
   2773					; THIS OCCURS WHEN ANOTHER TASK REQUESTS OUTPUT TO ANY LP. ALL LP'S
   2774					; ARE CHECKED FOR A REQUEST WAITING.
   2775					;
   2776					;	THE REQUEST IS QUEUED UP IN THE THREADED OUTPUT LIST
   2777					; FOR THIS LP, USING AN EXTENDED THREAD BLOCK. THIS BLOCK IS DISTINGUISHED
   2778					; AS A QUEUE I/O REQUEST BY T.HBCT BEING ZERO (THE LENGTH OF THE BLOCK
   2779					; IS T.HQRS).  THE ADDITIONAL INFORMATION IN THIS THREAD BLOCK IS:
   2780					;	T.HEMA --	(BYTE) EXTENDED MEMORY ADDRESS BITS (BITS 4 AND 5)
   2781					;	T.HVFC --	(BYTE) VERTICAL FORMAT CONTROL CHARACTER
   2782					;	T.HIBC --	INITIAL BYTE COUNT
   2783					;
   2784					;-
   2785					;
   2786						.ENABLE	LSB
   2787	006356				LPNIR:
   2788	006356	032737 	000000G	000000G		BIT	#EF.NIR,LPCEVF	;A QUEUE I/O REQUEST FOR US?
   2789	006364	001514 				BEQ	99$		;NO-- TRY NEXT IN CHAIN
   2790	006366	012700 	050114 			MOV	#"LP,R0		;SAY WE ARE A LP
   2791	006372					CALL	..DQRN		;GET A REQUEST
	006372	004737 	000000G			JSR	PC,..DQRN
   2792	006376	103507 				BCS	99$		;NONE-- DONE
   2793					;
   2794					; GOT QUEUE I/O REQUEST NODE-- ADDR IN R1
   2795					;
   2796					; REGISTERS RETURNED BY ..DQRN
   2797					;	R1 --	ADDRESS OF REQUEST NODE
   2798					;	R2 --	UNIT # OF REQUESTED DEVICE
   2799					;	R3 --	BYTE COUNT OF DATA
   2800					;	R4 --	EXTENDED ADDRESS BITS 16 AND 17 (IN BITS 4 AND 5)
   2801					;	R5 --	PHYSICAL ADDRESS OF DATA
   2802					;
   2803					; CHECK FOR FUNCTION CODES:
   2804					;	IO.WLB	OUTPUT BUFFER
   2805					;	IO.WVB	OUTPUT BUFFER
   2806					;	IO.KIL	FLUSH OUTPUT (CALL ..SPLP)
   2807					;	IO.DAC	CLOSE OUTPUT (TYPE <FF>)
   2808					;	IO.RVB	READ-- ILLEGAL FUNCTION
   2809					;	IO.RLB	READ-- ILLEGAL FUNCTION
   2810					;
   2811					; ALL OTHER FUNCTIONS ARE IGNORED
   2812					;
   2813	006400	006302 				ASL	R2		;MAKE UNIT IN WORDS
   2814	006402	016202 	000000G			MOV	LPUTBL(R2),R2	;GET ADDR OF LPTBL ENTRY FOR THIS LP
   2815	006406	116100 	000001G			MOVB	R.FC+1(R1),R0	;GET FUNCTION CODE FROM REQUEST NODE
   2816	006412	001430 				BEQ	20$		;EXPRESS FUNCTION-- LOOK AT IT
   2817	006414	122700 	000001 			CMPB	#IO.WLB/400,R0	;WRITE LOGICAL?
   2818	006420	001441 				BEQ	40$		;YES-- PRINT
   2819	006422	122700 	000022 			CMPB	#IO.WVB/400,R0	;WRITE VIRTUAL?
   2820	006426	001436 				BEQ	40$		;YES-- PRINT ALSO
   2821	006430	122700 	000002 			CMPB	#IO.RLB/400,R0	;READ LOGICAL????
   2822	006434	001414 				BEQ	15$		;YES-- ILLEGAL
   2823	006436	122700 	000021 			CMPB	#IO.RVB/400,R0	;READ VIRTUAL????
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 31-1
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2824	006442	001411 				BEQ	15$		;YES-- ILLEGAL
   2825	006444	122700 	000020 			CMPB	#IO.DAC/400,R0	;CLOSE OUT FILE?
   2826	006450	001017 				BNE	30$		;NO-- ASSUME OK, GIVE SUCCESS
   2827					;
   2828					; IO.DAC -- CLOSE OUT FILE, SEND <FF>
   2829					;
   2830	006452	012705 	006604'			MOV	#VFCFF,R5	;SET ADDRESS TO POINT TO FORM-FEED
   2831	006456	012703 	000001 			MOV	#1,R3		;BYTE COUNT= 1
   2832	006462	005004 				CLR	R4		;NO EMA BITS
   2833	006464	000417 				BR	40$		;SEND LIKE QUEUE I/O
   2834					;
   2835					; ILLEGAL FUNCTION
   2836					;
   2837	006466				15$:
   2838	006466	012703 	177776 			MOV	#IE.IFC,R3	;SAY ILLEGAL
   2839	006472	000410 				BR	31$		;SO SAY IT
   2840					;
   2841					; IO.KIL-- FLUSH OUTPUT
   2842					;
   2843	006474				20$:
   2844	006474	022761 	000012 	000000G		CMP	#IO.KIL,R.FC(R1) ;THIS I/O KILL?
   2845	006502	001002 				BNE	30$		;NO-- IGNORE
   2846	006504					CALL	..SPLP		;FLUSH OUTPUT
	006504	004737 	011074'			JSR	PC,..SPLP
   2847					;
   2848					; IO.ATT, IO.DET-- IGNORE
   2849					;
   2850	006510				30$:
   2851	006510	012703 	000001 			MOV	#IS.SUC,R3	;SAY 'SUCCESS' TO ..IODN
   2852	006514				31$:
   2853	006514	005004 				CLR	R4		;NO BYTES TRANSFERRED
   2854	006516					CALL	..IODN		;RETURN PACKET TO REQUESTOR
	006516	004737 	000000G			JSR	PC,..IODN
   2855	006522	000715 				BR	LPNIR		;DONE-- TRY FOR SOME MORE
   2856					;
   2857					; IO.WLB, IO.WVB-- SEND DATA TO LP
   2858					;
   2859					; ENTER THIS REQUEST IN THREADED OUTPUT LIST
   2860					;
   2861	006524				40$:
   2862	006524	010100 				MOV	R1,R0		;COPY NODE ADDRESS
   2863	006526	062700 	000004G			ADD	#R.PB+PBTHRD,R0	;POINT TO THREAD BLOCK AREA OF R.PB
   2867	006532	116101 	000004G			MOVB	R.PB+4(R1),R1	;GET VERTICAL FORMAT CHARACTER
   2868	006536	005060 	000000G			CLR	T.HBCT(R0)	;NOTE THAT THIS IS A QIO REQUEST
   2869	006542	010560 	000000G			MOV	R5,T.HCAD(R0)	;SAVE PHYSICAL ADDR OF DATA
   2870	006546	010360 	000000G			MOV	R3,T.HCBC(R0)	; AND BYTE COUNT OF DATA
   2871	006552	110460 	177774 			MOVB	R4,T.HEMA(R0)	; AND EXTENDED MEMORY ADDR BITS
   2872					;
   2873	006556	012705 	006602'			MOV	#VFCTBL,R5	;YES-- POINT TO TABLE OF FORMAT CONTROL CHARACTERS
   2874	006562				55$:
   2875	006562	112560 	177775 			MOVB	(R5)+,T.HVFC(R0) ;GET THE CHARCTER TO CONTROL
   2876	006566	001402 				BEQ	60$		;END OF TABLE-- GIVE UP WITH NOTHING
   2877	006570	122501 				CMPB	(R5)+,R1	;MATCH THE VFC CHARACTER?
   2878	006572	001373 				BNE	55$		;NO-- LOOP UNTIL WE FIND ONE
   2879	006574				60$:
   2880	006574					CALL	..PTLP		;START LP ON THIS BUFFER, OR QUEUE UP
	006574	004737 	011326'			JSR	PC,..PTLP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 31-2
LPNIR	(LP TASK QUEUE I/O REQUEST)

   2881	006600	000666 				BR	LPNIR		;LOOK FOR ANOTHER REQUEST
   2882					;
   2883					; VERTICAL FORMAT CONTROL CHARACTER TABLE FOR QUEUE I/O REQUESTS
   2884					;
   2885	006602				VFCTBL:
   2886	006602	   012 	   040 			.BYTE	12,' 		;<SPACE>	NEXT LINE
   2887	006604	   014 	   061 		VFCFF:	.BYTE	14,'1		;"1"		NEXT PAGE
   2888	006606	   015 	   053 			.BYTE	15,'+		;"+"		OVERPRINT
   2889	006610	   021 	   060 			.BYTE	21,'0		;"0"		DOUBLE SPACE
   2890	006612	   012 	   044 			.BYTE	12,'$		;"$"		PROMPTING OUTPUT
   2891	006614	   000 				.BYTE	0		;END OF TABLE
   2892						.EVEN
   2893					;
   2894					;
   2895	006616				99$:
   2896					;	BR	LPMKT		;NEXT IS MARK-TIME REQUESTS
   2897						.DSABLE LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 32
LPMKT	(LP TASK MARK-TIME REQUEST)

   2899						.SBTTL	LPMKT	(LP TASK MARK-TIME REQUEST)
   2900					;
   2901					;+
   2902					;	LPMKT IS DISPATCHED TO WHEN THE EF.LPC EVENT FLAG IS SET.
   2903					; THIS OCCURS EVERY 10. SECONDS.  EACH LP IS CHECKED TO SEE IF LP.HNG
   2904					; BIT HAS BEEN CLEARED BY ..DOLP (I/O COMPLETION) IF IT IS NOT
   2905					; IDLE. IF LP.HNG IS SET, NO I/O HAS OCCURED IN 10 SECONDS, SO
   2906					; 'GO' IS SET IN LPCSRA TO CONTINUE THE LP. LPHUNG IS INCREMENTED.
   2907					; IN ANY CASE, IF THE LP IS NOT IDLE, LP.HNG IS SET SO IT CAN BE
   2908					; CHECKED IN ANOTHER 10 SECONDS.
   2909					;
   2910					;-
   2911					;
   2912						.ENABLE	LSB
   2913	006616				LPMKT:
   2914	006616	032737 	000002 	000000G		BIT	#EF.LPC,LPCEVF	;IS MARK-TIME EVENT FLAG SET?
   2915	006624	001503 				BEQ	99$		;NO-- CHECK NEXT FLAG
   2916	006626	012705 	000002 			MOV	#L$$P20,R5	;SET UP # LP'S TO CHECK
   2917	006632	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS DATA BLOCK FOR UNIT 0
   2918	006636				10$:
   2919	006636	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
   2920	006642	001407 				BEQ	12$		;NON-EX LP-- SKIP THIS
   2921	006644	000241 				CLC			;CLEAR CARRY, IN CASE OF TRAP
   2922	006646	032713 	000100 			BIT	#INTENB,(R3)	;IS INTERRUPT-ENABLE STILL SET?
   2923	006652				LPDINT:
   2924	006652	103403 				BCS	12$		;TIME-OUT-- JUST SEND STATUS
   2925	006654	001002 				BNE	12$		;YES-- DON'T SET IT
   2926	006656	052713 	000100 			BIS	#INTENB,(R3)	;MAKE SURE WE STILL HAVE INTERRUPT ENABLE
   2927	006662				12$:
   2928	006662	032712 	004000 			BIT	#LP.WAT,(R2)	;WAITING?
   2929	006666	001047 				BNE	30$		;YES-- DON7T TRY TO CONTINUE
   2930	006670	005762 	000000G			TST	LPTHD(R2)	;ANY ACTIVE REQUESTS?
   2931	006674	001453 				BEQ	90$		;NONE-- LP IS IDLE
   2932	006676	032712 	100000 			BIT	#LP.HNG,(R2)	;NO I/O IN 10 SEC?
   2933	006702	001446 				BEQ	80$		;NO-- I/O CLEARED THIS BIT-- OK
   2934	006704	005762 	000000G			TST	LPITH(R2)	;IS I/O SUPPOSED TO BE IN PROGRSS?
   2935	006710	001436 				BEQ	30$		;NO-- SEE IF WE JUST CAME ON-LINE
   2936	006712	005703 				TST	R3		;DEVICE EXIST?
   2937	006714	001434 				BEQ	30$		;NON-EX LP-- FLUSH OUTPUT
   2938	006716	005237 	000000G			INC	LPHUNG		;COUNT # TIMES WE HAD TO START LP G9OING
   2939	006722	005362 	000000G			DEC	LPRTY(R2)	;ONE LESS TIME TO TRY
   2940	006726	002427 				BLT	30$		;NONE LEFT-- GIVE UP
   2941	006730					.INH4			;;;LOCK OUT LP INTERRUPTS
	006730	013746 	177776 			MOV	@#PS,-(SP)
	006734	112737 	000200 	177776 		MOVB	#PR4,@#PS
   2942	006742	105062 	000000G			CLRB	LPCSM+0(R2)	;;;CLEAR LOW BYTE SO NO CARRY
   2943	006746	066362 	000016 	000000G		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM (CLEARED BY GO)
   2944	006754	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
   2945	006760	001403 				BEQ	20$		;;;YES-- DO NEXT BUFFER
   2946	006762	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;NO-- JUST SET INT ENB AND GO
   2947	006766	000404 				BR	29$		;;;DO ANOTHER LP
   2948					;
   2949	006770				20$:
   2950	006770	016200 	000000G			MOV	LPITH(R2),R0	;;;GET CURRENT BUFFER ADDRESS
   2951	006774					CALL	..DOL1		;;;DONE-- DO NEXT BUFFER
	006774	004737 	011454'			JSR	PC,..DOL1
   2952	007000				29$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 32-1
LPMKT	(LP TASK MARK-TIME REQUEST)

   2953	007000					.ENB4			;ALLOW LP INTERRUPTS
	007000	012637 	177776 			MOV	(SP)+,@#PS
   2954	007004	000405 				BR	80$		;DONE WITH LP
   2955					;
   2956	007006				30$:
   2957	007006	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO SEND STATUS!!
   2958	007012	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;YES-- START IT UP AGAIN
   2959	007020				80$:
   2960	007020	052712 	100000 			BIS	#LP.HNG,(R2)	;SAY LP NO I/O
   2961									  ; THIS WILL BE CLEARED WHENEVER
   2962									  ; ANY I/O IS DONE TO LP
   2963	007024				90$:
   2964	007024	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN LPTBL
   2965	007030	005305 				DEC	R5		;TRY ALL
   2966	007032	003301 				BGT	10$		; LP'S
   2967	007034				99$:
   2968	007034	000137 	005410'			JMP	LPLOOP		;GO BACK TO WAITING
   2969						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 33
SSTSLP	(SEND LP-20 STATUS TO -10)

   2971						.SBTTL	SSTSLP	(SEND LP-20 STATUS TO -10)
   2972					;
   2973					;+
   2974					;
   2975					;	SSTSLP IS CALLED TO SEND THE LP-20 STATUS TO THE -10.
   2976					; IT IS INVOKED BY BOTH A REQUEST FOR STATUS FROM THE -10
   2977					; AND ANY LP-20 ERROR INDICATION, AS WELL AS PAGE COUNT ZERO
   2978					; (IF ENABLED) AND UNDEFINED CHARACTERS IN THE RAM.
   2979					;
   2980					;	TWO DEVICE-STSTUS WORDS ARE GENERATED,
   2981					; WITH THE STANDARD BITS (DV.XXX) IN THE FIRST WORD, AND THE
   2982					; FOLLOWING DEVICE-DEPENDENT BITS IN THE SECOND WORD:
   2983					;
   2984					;	DD.PGZ	PAGE COUNTER REACHED ZERO
   2985					;	DD.CHI	UNDEFINED CHARACTER IN RAM
   2986					;	DD.VFE	VFU ERROR (IMPLIES PAPER RE-ALIGNMENT REQUIRED)
   2987					;	DD.LER	ERROR FINDING/READING VFU AND RAM FILE
   2988					;	DD.OVF	OPTICAL VERTICAL FORMAT UNIT
   2989					;	DD.RME	RAM PARITY ERROR-- RELOAD REQUIRED
   2990					;
   2991					; THE STATUS BLOCK SENT TO THE -10 IS IN THE FOLLOWING FORMAT:
   2992					;
   2993					; WORD	0	STATUS WORD 0 (DV.XXX)
   2994					;	1	STATUS WORD 1 (DD.XXX)
   2995					;	2	(HIGH BYTE) # BYTES OF DEVICE DEPENDENT INFO (ALWAYS 2.)
   2996					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS (ALWAYS 16.)
   2997					;	3	(LOW BYTE) ACCUMULATED CHECKSUM (HIGH BYTE) RETRY COUNT
   2998					; LP-20 DEVICE REGISTERS
   2999					;	4	LPCSRA
   3000					;	5	LPCSRB
   3001					;	6	LPBSAD
   3002					;	7	LPBCTR
   3003					;	10	LPPCTR
   3004					;	11	LPRAMD
   3005					;	12	LPCBUF/LPCCTR
   3006					;	13	LPTDAT/LPCKSM
   3007					;
   3008					; CALLED AT TASK LEVEL
   3009					;
   3010					; CALLING SEQUENCE:
   3011					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3012					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
   3013					;
   3014					; EXIT CONDITIONS:
   3015					;
   3016					;	NO REGISTERS MODIFIED
   3017					;
   3018					;-
   3019					;
   3020						.ENABLE	LSB
   3021	007040				SSTSLP:
   3022	007040					SAVE	<R0,R1,R3,R4>	;SAVE USED CARS
	007040	010046 				MOV	R0,-(SP)
	007042	010146 				MOV	R1,-(SP)
	007044	010346 				MOV	R3,-(SP)
	007046	010446 				MOV	R4,-(SP)
   3023	007050	042712 	040000 			BIC	#LP.SST,(R2)	;CLEAR 'SEND STATUS' FLAG
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 33-1
SSTSLP	(SEND LP-20 STATUS TO -10)

   3024	007054	032777 	000020 	000000G	4$:	BIT	#EF.LPS,@LPEVFG	;IS OUR BUFFER AVAILABLE?
   3025	007062	001007 				BNE	5$		;YES-- DON'T WAIT
   3026	007064					WSIG$S			;NO-- WAIT FOR IT
	007064	012746 				MOV	(PC)+,-(SP)
	007066	   061 	   001 			.BYTE	49.,1
	007070	104375 				EMT	375
   3027	007072	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ;IS PRIMARY PROTOCOL RUNNING ?
   3028	007100	001365 				BNE	4$		;YES-- STILL BUSY...
   3029	007102				5$:
   3030	007102	012700 	000004G			MOV	#LPSTBK+4,R0	;GET ADDRES OF BYTE COUNT WORD
   3031	007106	005010 				CLR	(R0)		;CLEAR IT (ASSUME NON-EX DEV)
   3032	007110	005040 				CLR	-(R0)		; AND SECOND WORD OF STATUS
   3033	007112	005040 				CLR	-(R0)		;AND FIRST WORD, WITH R0 POINTING TO IT
   3034	007114	005001 				CLR	R1		;CLEAR ERROR MESSAGE POINTER, TOO
   3035	007116	005703 				TST	R3		;GOT A EPA?
   3036	007120	001005 				BNE	10$		;GOT IT-- CHECK OUT LP STATUS
   3037	007122	052710 	000007 			BIS	#DV.NXD!DV.OIR!DV.OFL,(R0) ;NON-EX LP-- SAY SO
   3038	007126	012701 	007573'			MOV	#ERMNXD,R1	;PRINT ERROR ON CONSOLE, TOO
   3039	007132	000537 				BR	50$		;GO SEND THE ERROR
   3040					;
   3041	007134				10$:
   3042	007134	032712 	000200 			BIT	#LP.EOF,(R2)	;THIS AN EOF ENCOUNTERED?
   3043	007140	001402 				BEQ	11$		;NO-- GO ON
   3044	007142	052710 	000040 			BIS	#DV.EOF,(R0)	;YES-- SAY SO
   3045	007146				11$:
   3046	007146	032713 	004000 			BIT	#ONLINE,(R3)	;LP OFF-LINE?
   3047	007152	001004 				BNE	12$		;NO-- GO ON
   3048	007154	052710 	000006 			BIS	#DV.OFL!DV.OIR,(R0) ;YES-- SAY OFF-LINE
   3049	007160	012701 	007613'			MOV	#ERMOFL,R1	; AND TO CONSOLE
   3050	007164				12$:
   3051	007164	032713 	010000 			BIT	#VFURDY,(R3)	;VFU NOT READY?
   3052	007170	001007 				BNE	13$		;NO-- OK
   3053	007172	052760 	000004 	000002 		BIS	#DD.VFE,2(R0)	;YES-- SET SO IN DD WORD
   3054	007200	012701 	007626'			MOV	#ERMVFE,R1	;TELL CONSOLE
   3055	007204	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
   3056	007210				13$:
   3057	007210	032763 	000076 	000002 		BIT	#LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM,LPCSRB(R3) ;FATAL ERROR?
   3058	007216	001404 				BEQ	14$		;NO-- ALL OK
   3059	007220	052710 	000100 			BIS	#DV.LOG,(R0)	;YES-- SAY BAD ERROR, AND ERROR-LOG IT
   3060	007224	012701 	007645'			MOV	#ERMHER,R1	;SAY SPLAT TO CONSOLE
   3061	007230				14$:
   3062	007230	016204 	000000G			MOV	LPTHD(R2),R4	;IS I/O LEFT TO DO?
   3063	007234	001002 				BNE	141$		;YES-- SAY SO
   3064	007236	005001 				CLR	R1		;NO-- DON'T SEND OFF-LINE/VFE
   3065	007240	000436 				BR	15$		;GO ON
   3066					;
   3067	007242				141$:
   3068	007242	052710 	000020 			BIS	#DV.IOP,(R0)	;SAY I/O IN PROGRESS
   3069	007246	005764 	000000G			TST	T.HBCT(R4)	;IS THIS A QUEUE I/O REQUEST?
   3070	007252	001002 				BNE	142$		;NO-- GO ON
   3071	007254	052710 	000400 			BIS	#DV.F11,(R0)	;YES-- SAY FROM -11
   3072	007260				142$:
   3073	007260	005762 	000000G			TST	LPRTY(R2)	;IS RETRY COUNT DOWN YET?
   3074	007264	002024 				BGE	15$		;NO-- GO ON
   3075	007266	052710 	000300 			BIS	#DV.URE!DV.LOG,(R0) ;SAY RETRY COUNT EXHAUSTED
   3076	007272	032712 	100000 			BIT	#LP.HNG,(R2)	;WAS DEVICE HUNG, TOO?
   3077	007276	001404 				BEQ	143$		;NO-- GO ON
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 33-2
SSTSLP	(SEND LP-20 STATUS TO -10)

   3078	007300	052710 	001004 			BIS	#DV.HNG!DV.OIR,(R0) ;YES-- SAY THAT TOO
   3079	007304	012701 	007662'			MOV	#ERMHNG,R1	;GET HUNG MESSAGE, TOO
   3080	007310				143$:
   3081	007310	032763 	000010 	000002 		BIT	#RAMPAR,LPCSRB(R3) ;RAM PARITY ERROR?
   3082	007316	001405 				BEQ	144$		;NO-- GO ON
   3083	007320	052760 	000040 	000002 		BIS	#DD.RME,2(R0)	;YES-- NOTE FATAL ERROR
   3084	007326	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
   3085	007332				144$:
   3086	007332					CALL	..SPLP		;RETRY COUNT EXHAUSTED-- GIVE UP OUTPUT
	007332	004737 	011074'			JSR	PC,..SPLP
   3087	007336				15$:
   3088	007336	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGE-COUNT ZERO?
   3089	007342	001412 				BEQ	16$		;NO-- OK
   3090	007344	032712 	020000 			BIT	#LP.PZI,(R2)	;YES-- BUT ENABLED?
   3091	007350	001407 				BEQ	16$		;NO-- DON'T TELL HIM
   3092	007352	052710 	000010 			BIS	#DV.SCN,(R0)	;TELL -10 WE WANT HIM TO ACK
   3093	007356	052760 	000001 	000002 		BIS	#DD.PGZ,2(R0)	; FOR PAGE-ZERO
   3094	007364	052712 	004000 			BIS	#LP.WAT,(R2)	;REMEMBER TO WAIT
   3095	007370				16$:
   3096	007370	032713 	020000 			BIT	#CHRINT,(R3)	;UNDEFINED (INTERRUPT) CHARACTER?
   3097	007374	001407 				BEQ	17$		;NO-- GO ON
   3098	007376	052710 	000010 			BIS	#DV.SCN,(R0)	;NOTE TO WAIT
   3099	007402	052760 	000002 	000002 		BIS	#DD.CHI,2(R0)	; FOR UNDEF CHAR
   3100	007410	052712 	004000 			BIS	#LP.WAT,(R2)	; AND FOR US TO WAIT
   3101	007414				17$:
   3102	007414	032763 	004000 	000002 		BIT	#OPTVFU,LPCSRB(R3) ;THIS LP HAVE OPTICAL VFU?
   3103	007422	001403 				BEQ	18$		;NO-- MUST HAVE DAVFU (HOORAY)
   3104	007424	052760 	000020 	000002 		BIS	#DD.OVF,2(R0)	;YES-- SAY SO
   3105	007432				18$:
   3106					;
   3107					; ERROR CODE NOW IN LPSTBK+0 AND LPSTBK+2
   3108					;
   3109	007432				50$:
   3110	007432	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST?
   3111	007436	001115 				BNE	70$		;YES-- DON'T PRINT ON CONSOLE
   3112					;
   3113					; NON-10 REQUEST-- SEND CONSOLE A MESSAGE ABOUT OUR STATUS
   3114					;
   3115	007440	042712 	004000 			BIC	#LP.WAT,(R2)	;DON'T WAIT FOR NON-10 REQUEST
   3116	007444	005701 				TST	R1		;TELL OPR?
   3117	007446	001511 				BEQ	70$		;NO-- JUST SEND TO -10 ANYWAY
   3118	007450	012700 	007553'			MOV	#LPEMSX,R0	;GET ADDRESS OF END OF MESSAGE SO FAR
   3119	007454				51$:
   3120	007454	112120 				MOVB	(R1)+,(R0)+	;COPY A BYTE OF THE MESSAGE
   3121	007456	001376 				BNE	51$		; UNTIL ASCIZZZZZZZZ
   3122	007460	162700 	007540'			SUB	#LPEMSG,R0	;GET LENGTH OF MESSAGE
   3123	007464	010037 	007534'			MOV	R0,LPQDPB+Q.IOPL+2 ;SET LENGTH IN QIOW$ DPB
   3124	007470	011201 				MOV	(R2),R1		;GET UNIT
   3125	007472	042701 	177774 			BIC	#^C<LP.UNT>,R1	; NUMBER OF THIS LP
   3126	007476	062701 	000060 			ADD	#'0,R1		;MAKE IT ASCII
   3127	007502	110137 	007550'			MOVB	R1,LPERUN	;SAVE IN MESSAGE STRING
   3128	007506					DIR$	#LPQDPB		;DO QUEUE I/O TO CTY
	007506	012746 	007516'			MOV	#LPQDPB,-(SP)
	007512	104375 				EMT	375
   3129	007514	000466 				BR	70$		;SEE IF WE CAN CONTINUE
   3130					;
   3131	007516				LPQDPB:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 33-3
SSTSLP	(SEND LP-20 STATUS TO -10)

   3132	007516					QIOW$	IO.WLB,1,E.FLPQ,1,0,0,<LPEMSG,0,0>
	007516	   003 	   011 			.BYTE	3,$$$ARG
	007520	000400 				.WORD	IO.WLB
	007522	000001 				.WORD	1
	007524	   003 	   001 			.BYTE	E.FLPQ,1
	007526	000000 				.WORD	0
	007530	000000 				.WORD	0
	007532	007540'				.WORD	LPEMSG
	007534	000000 				.WORD	0
	007536	000000 				.WORD	0
   3133	007540				LPEMSG:
   3134	007540	   015 	   012 	   052 		.ASCII	<15><12>/*** LP/
	007543	   052 	   052 	   040
	007546	   114 	   120
   3135	007550				LPERUN:
   3136	007550	   060 	   072 	   040 		.ASCII	/0: /
   3137	007553				LPEMSX:
   3138	007553					.BLKB	16.		;REST OF MESSAGE: MAX OF 16 BYTES
   3139	007573				ERMNXD:
   3140	007573	   116 	   117 	   116 		.ASCIZ	/NON-EX DEVICE/<15><12>
	007576	   055 	   105 	   130
	007601	   040 	   104 	   105
	007604	   126 	   111 	   103
	007607	   105 	   015 	   012
	007612	   000
   3141	007613				ERMOFL:
   3142	007613	   117 	   106 	   106 		.ASCIZ	/OFF-LINE/<15><12>
	007616	   055 	   114 	   111
	007621	   116 	   105 	   015
	007624	   012 	   000
   3143	007626				ERMVFE:
   3144	007626	   106 	   117 	   122 		.ASCIZ	/FORMAT ERROR/<15><12>
	007631	   115 	   101 	   124
	007634	   040 	   105 	   122
	007637	   122 	   117 	   122
	007642	   015 	   012 	   000
   3145	007645				ERMHER:
   3146	007645	   104 	   101 	   124 		.ASCIZ	/DATA ERROR/<15><12>
	007650	   101 	   040 	   105
	007653	   122 	   122 	   117
	007656	   122 	   015 	   012
	007661	   000
   3147	007662				ERMHNG:
   3148	007662	   110 	   125 	   116 		.ASCIZ	/HUNG/<15><12>
	007665	   107 	   015 	   012
	007670	   000
   3149						.EVEN
   3150					;
   3151					; HERE WE SEND THE STATUS BLOCK TO THE -10, R1= STATE CODE
   3152					;
   3153					;
   3154					; ASSEMBLE DEVICE INFO AND DEVICE REGISTERS
   3155					;
   3156	007672				70$:
   3157	007672	005703 				TST	R3		;NON-EX DEVICE?
   3158	007674	001417 				BEQ	72$		;YES-- DON'T STORE NON-EX DEVICE REGISTERS
   3159	007676	012700 	000004G			MOV	#LPSTBK+4,R0	;POINT TO STATUS RETURN BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 33-4
SSTSLP	(SEND LP-20 STATUS TO -10)

   3160	007702	012720 	000000C			MOV	#<2.*BIT8>+<LPEXPZ*BIT0>,(R0)+ ;2 BYTES INFO, + DEV REG'S
   3161	007706	116220 	000001G			MOVB	LPCSM+1(R2),(R0)+ ;CHECKSUM
   3162	007712	012701 	000012 			MOV	#LPRTRY,R1	;GET INITIAL RETRY COUNT
   3163	007716	166201 	000000G			SUB	LPRTY(R2),R1	; - CURRENT COUNT= # RETRIES
   3164	007722	110120 				MOVB	R1,(R0)+	;HIGH BYTE-- # RETRIES
   3165	007724				71$:
   3166	007724	012320 				MOV	(R3)+,(R0)+	;(2) ... LP DEVICE REGISTERS
   3167	007726	022700 	000000C			CMP	#LPSTBK+LPSTLN,R0 ;DONE YET?
   3168	007732	101374 				BHI	71$		;NO-- KEEP ON LOOPING
   3169					;
   3170					; SET UP REGISTERS FOR ..STIN:
   3171					;	R0 --	ADDRESS OF BLOCK (FIRST WORD IS UNIT/BYTE COUNT)
   3172					;	R1 --	FUNCTION CODE + BIT15 (FOR INDIRECT FUNCTION)
   3173					;	R2 --	EVENT FLAG NUMBER TO BE SET WHEN BLOCK SENT
   3174					;	R3 --	DEVICE CODE (D.CLPT FOR THE LP-20)
   3175					;
   3176	007734				72$:
   3177	007734	012700 	000000G			MOV	#LPSTBK,R0	;SET UP ADDR FOR ..STIN
   3178	007740	011201 				MOV	(R2),R1		;GET UNIT NUMBER
   3179	007742	042701 	177774 			BIC	#^C<LP.UNT>,R1	; FROM LPSTS
   3180	007746	110140 				MOVB	R1,-(R0)	;HIGH BYTE HEADER: UNIT #
   3181	007750	112740 	000002G			MOVB	#LPSTLN+2,-(R0)	;LOW BYTE HEADER: SIZE OF BLOCK
   3182	007754	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ;INDIRECT FUNCTION HERE IS DEVICE STATUS
   3183	007760					PUSH	R2		;SAVE LPTBL POINTER
	007760	010246 				MOV	R2,-(SP)
   3184	007762	012702 	000005 			MOV	#E.FLPS,R2	;EVENT FLAG NUMBER
   3185	007766	012703 	000000G			MOV	#D.CLPT,R3	;DEVICE LP
   3186	007772	042777 	000020 	000000G		BIC	#EF.LPS,@LPEVFG	;CLEAR BUFFER AVAILABLE FLAG
   3187	010000					CALL	..STIN		;SAVE FOR NOW
	010000	004737 	000000G			JSR	PC,..STIN
   3188	010004					POP	R2		;RESTORE LPTBL POINTER
	010004	012602 				MOV	(SP)+,R2
   3189	010006	103010 				BCC	80$		;FINISH UP
   3190					;
   3191					; ..STIN GAVE ERROR-- MUST SEND STATUS AGAIN LATER
   3192					;
   3193	010010				75$:
   3194	010010	052777 	000020 	000000G		BIS	#EF.LPS,@LPEVFG	;NOTE BUFFER STILL REALLY AVAILABLE
   3195	010016	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST
   3196	010022	001402 				BEQ	80$		;NO-- IGNORE THE ERROR
   3197	010024	052712 	040000 			BIS	#LP.SST,(R2)	;YES-- SEND STATUS AGAIN LATER
   3198					;
   3199					; FINISH UP
   3200					;
   3201	010030				80$:
   3202	010030					RESTORE			; AND REGISTERS
	010030	012604 				MOV	(SP)+,R4
	010032	012603 				MOV	(SP)+,R3
	010034	012601 				MOV	(SP)+,R1
	010036	012600 				MOV	(SP)+,R0
   3203	010040					RETURN			;RETURN FROM SSTSLP
	010040	000207 				RTS	PC
   3204						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 34
TESTLP	(START LP-20 GOING ON THREADED LIST)

   3206						.SBTTL	TESTLP	(START LP-20 GOING ON THREADED LIST)
   3207					;
   3208					;+
   3209					;	TESTLP IS CALLED TO START THE LP-20 ON A THREADED LIST.
   3210					; THE THREAD MUST BE SET UP, WITH THE POINTER BOTH IN R0 AND LPTHD.
   3211					;
   3212					; CALLED FROM TASK LEVEL
   3213					;
   3214					; CALLING SEQUENCE:
   3215					;	R0 --	THREAD POINTER (ALSO IN LPTHD)
   3216					;	R2 --	LPTBL ENTRY FOR THIS LP
   3217					;
   3218					; EXIT CONDITIONS:
   3219					;	R0 --	CURRENT OUTPUT THREAD POINTER
   3220					;	R3 --	EXTERNAL PAGE ADDRESS OF THIS LP
   3221					;
   3222					;-
   3223					;
   3224	010042				TESTLP:
   3225	010042	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
   3226	010046	001470 				BEQ	90$		;YES-- DO NOTHING
   3227					;
   3228	010050	032777 	000040 	000000G		BIT	#EF.LPW,@LPEVFG	;SHOULD WE WAIT FOR LP-20?
   3229	010056	001011 				BNE	10$		;NO-- GO ON
   3230					;
   3231					; MUST WAIT FOR 1-SEC FOR LP-20 TO SETTLE AFTER DOING AN ABORT TRANSFER
   3232					;
   3233	010060					DIR$	#MKSCDP		;SET MARK TIME REQUEST
	010060	012746 	005246'			MOV	#MKSCDP,-(SP)
	010064	104375 				EMT	375
   3234	010066	103405 				BCS	10$		;OH, WELL ...
   3235	010070					WTSE$S	#E.FLPW		;WAIT FOR THE FLAG
	010070	012746 	000006 			MOV	#E.FLPW,-(SP)
	010074	012746 				MOV	(PC)+,-(SP)
	010076	   051 	   002 			.BYTE	41.,2
	010100	104375 				EMT	375
   3236	010102				10$:
   3237	010102	032712 	002000 			BIT	#LP.CLR,(R2)	;TIME TO CLEAR THE RAM?
   3238	010106	001414 				BEQ	30$		;NO-- JUST GO ON
   3239	010110	042712 	002000 			BIC	#LP.CLR,(R2)	;RESET THE FLAG
   3240	010114	032712 	001000 			BIT	#LP.LIP,(R2)	;BUT RAM LOAD NOW IN PROGRESS??
   3241	010120	001007 				BNE	30$		;YES-- DON'T GO RESET IT
   3242					;
   3243					; RAM MUST BE CLEARED, SINCE WE GOT A RAMPAR/VFU ERROR
   3244					;
   3245	010122	105063 	000014 			CLRB	LPCBUF(R3)	;CLEAR RAM ADDRESS REGISTER
   3246	010126				20$:
   3247	010126	005063 	000012 			CLR	LPRAMD(R3)	;CLEAR A RAM WORD
   3248	010132	105263 	000014 			INCB	LPCBUF(R3)	;BUMP TO NEXT RAM ADDRESS
   3249	010136	001373 				BNE	20$		;NOT DONE-- GO ON TO NEXT WORD
   3250					;
   3251					; TIME TO START LP GOING
   3252					;
   3253	010140				30$:
   3254	010140	032712 	000200 			BIT	#LP.EOF,(R2)	;WE AT EOF TIME?
   3255	010144	001404 				BEQ	32$		;NO-- GO ON
   3256	010146	042712 	000200 			BIC	#LP.EOF,(R2)	;YES-- NO LONGER EOF
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 34-1
TESTLP	(START LP-20 GOING ON THREADED LIST)

   3257	010152	005062 	000000G			CLR	LPCSM(R2)	;RESET CHECKSUM AT EOF
   3258	010156				32$:
   3259	010156	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGZRO SET?
   3260	010162	001403 				BEQ	34$		;NO-- GO ON
   3261	010164	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;YES-- RESET PAGZRO
   3262	010172				34$:
   3263	010172	005713 				TST	(R3)		;ERROR SET?
   3264	010174	100002 				BPL	40$		;NO-- GO ON
   3265	010176	052713 	001102 			BIS	#RSTERR+INTENB+PARENB,(R3) ;YES-- RESET IT
   3266	010202				40$:
   3267	010202					PUSH	R0		;SAVE THREAD POINTER
	010202	010046 				MOV	R0,-(SP)
   3268	010204					.INH4			;;; PREVENT LP INTERRUPTS
	010204	013746 	177776 			MOV	@#PS,-(SP)
	010210	112737 	000200 	177776 		MOVB	#PR4,@#PS
   3269	010216					CALL	..DOLP		;;;START LP GOING ON THE LIST
	010216	004737 	011470'			JSR	PC,..DOLP
   3270	010222					.ENB4			;;;DONE
	010222	012637 	177776 			MOV	(SP)+,@#PS
   3271	010226					POP	R0		;RESTORE LPTHD POINTER
	010226	012600 				MOV	(SP)+,R0
   3272					;
   3273					; ALL DONE
   3274					;
   3275	010230				90$:
   3276	010230					RETURN			;RETURN FROM TESTLP
	010230	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 35
INITLP	(INITALIZE ALL LP'S)

   3278						.SBTTL	INITLP	(INITALIZE ALL LP'S)
   3279					;
   3280					;+
   3281					;	INITLP IS CALLED DURING INITIALIZATION AND ALSO ON POWER
   3282					; RECOVERY.
   3283					;
   3284					;	EACH LP IS RESET, AND LP.LDF IS SET TO LOAD THE CURRENT RAM
   3285					; AND VF.  LPCSA IS CLEARED FOR NON-EX LP'S
   3286					;
   3287					;-
   3288					;
   3289						.ENABLE	LSB
   3290	010232				INITLP::
   3291	010232					SAVE	<R2,R3,R5>	;SAVE OUR PRECIOUS REGISTERS
	010232	010246 				MOV	R2,-(SP)
	010234	010346 				MOV	R3,-(SP)
	010236	010546 				MOV	R5,-(SP)
   3292	010240	012705 	000002 			MOV	#L$$P20,R5	;GET # LP'S WE HAVE
   3293	010244	012702 	000000G			MOV	#LPTBL,R2	;ADDRESS LPTBL ENTRY FOR UNIT 0
   3294	010250				10$:
   3295	010250	011203 				MOV	(R2),R3		;GET THE
   3296	010252	042703 	177774 			BIC	#^C<LP.UNT>,R3	; UNIT #
   3297	010256	006303 				ASL	R3		; *2
   3298	010260	006303 				ASL	R3		; *4
   3299	010262	006303 				ASL	R3		; *8
   3300	010264	006303 				ASL	R3		; *16 BYTES PER UNIT
   3301	010266	062703 	000000G			ADD	#LPEXPA,R3	;GET EXTERNAL PAGE ADDRESS FOR THIS LP
   3302	010272	010362 	000000G			MOV	R3,LPCSA(R2)	;SAVE THIS ADDRESS
   3303	010276	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;CLEAR LP
   3304	010302				LPDCLR:
   3305	010302	005062 	000000G			CLR	LPITH(R2)	;CLEAR INT-LEVEL POINTER TO THREADED LIST
   3306	010306				90$:
   3307	010306	062702 	000000G			ADD	#LPSIZE,R2	;BUMP TO NEXT LP'S ENTRY
   3308	010312	077522 				SOB	R5,10$		;LOOP FOR ALL LP'S
   3309
   3310	010314	052777 	000002 	000000G		BIS	#EF.LPC,@LPEVFG	;FORCE A HUNG CHECK NOW
   3311	010322					RESTORE			; THE REGISTERS TO THEIR RIGHTFUL (PITIFUL) CONDITION
	010322	012605 				MOV	(SP)+,R5
	010324	012603 				MOV	(SP)+,R3
	010326	012602 				MOV	(SP)+,R2
   3312	010330					RETURN			;RETURN FROM INITLP
	010330	000207 				RTS	PC
   3313					;
   3314						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 36
LP-20 INTERRUPT SERVICE MODULE

   3316						.SBTTL	LP-20 INTERRUPT SERVICE MODULE
   3317					;
   3318					;                             COPYRIGHT (C) 1975, 1978 BY
   3319					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3320					;
   3321					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3322					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3323					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3324					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3325					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3326					;
   3327					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3328					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3329					;       CORPORATION.
   3330					;
   3331					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3332					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3333					;
   3334					;		MODULE: LP-20 INTERRUPT SERVICE
   3335					;
   3336					;		VERSION: 01-00
   3337					;
   3338					;		AUTHOR: TOM PORCHER
   3339					;
   3340					;		DATE: 6-JUN-75
   3341					;
   3342					;
   3343					;	THIS MODULE CONTAINS:
   3344					;
   3345					;	1) $LPINT (LP-20 INTERRUPT SERVICE ROUTINE)
   3346					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 37
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3348						.SBTTL	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
   3349					;
   3350					;+
   3351					;
   3352					;	$LPINT IS CALLED FROM THE INTERRUPT VECTOR FOR
   3353					; ANY OF THE LP-20'S.  THE UNIT NUMBER IS SAVED IN THE LOW-ORDER
   3354					; BITS (THE CC'S) OF THE PS IN THE TRAP VECTOR.
   3355					;
   3356					;	WHEN A DONE INTERRUPT OCCURS, THE NEXT BUFFER IS STARTED,
   3357					; UNLESS THIS IS A MULTI-CHARACTER OPERATION (IE. 'ARROW' MODE), IN
   3358					; WHICH CASE THE CURRENT BUFFER IS CONTINUED.
   3359					;
   3360					;	IF CHRINT (UNDEFINED CHARACTER -- INT BIT SET IN RAM) OCCURS,
   3361					; THE RAM DATA IS EXAMINED. IF IT IS '^', THE CHARACTER + 100,
   3362					; PRECEDED BY '^', IS PRINTED, ELSE OUTPUT IS
   3363					; STOPPED AND THE STATUS SENT TO THE -10 (INTERRUPT).
   3364					;
   3365					;	IF PAGZRO (PAGE COUNT REACHED ZERO) OCCURS AND THE LP.PZI
   3366					; (PAGE ZERO INTERRUPT) FLAG IN LPSTS (SET BY RAM/VF LOAD FILE) IS
   3367					; SET, OUTPUT IS STOPPED AND THE STATUS IS SENT TO THE -10. OTHERWISE,
   3368					; OUTPUT IS MERELY RESUMED AND PAGZRO IGNORED.
   3369					;
   3370					;	IF THE LP COMES ON-LINE, WHILE WAITING FOR OFF-LINE,
   3371					; OUTPUT IS RESUMED, AND THE NEW STATUS IS SENT TO THE -10.
   3372					;
   3373					;-
   3374					;
   3375	010332				$LPINT::
   3376	010332	013737 	177776 	000000G		MOV	@#PS,LPUNIT	;;;SAVE UNIT #
   3377	010340					SAVE	<R0,R2,R3>	;;;SAVE REGISTERS
	010340	010046 				MOV	R0,-(SP)
	010342	010246 				MOV	R2,-(SP)
	010344	010346 				MOV	R3,-(SP)
   3378	010346	013702 	000000G			MOV	LPUNIT,R2	;;;GET UNIT # BACK
   3379	010352	006302 				ASL	R2		;;;MAKE IT WORDS
   3380	010354	042702 	177774 			BIC	#^C<LP.UNT>,R2	;;;CLEAR GARBAGE BITS
   3381	010360	016202 	000000G			MOV	LPUTBL(R2),R2	;;;GET ADDR OF DEVICE STATUS BLOCK FOR THIS LP
   3382	010364	016203 	000000G			MOV	LPCSA(R2),R3	;;;GET EXT PAGE ADDR FOR CURRENT LP
   3383	010370	016200 	000000G			MOV	LPITH(R2),R0	;;;GET CURRENT THREAD BLOCK ADDR
   3384	010374	001517 				BEQ	80$		;;;IDLE-- JUST SEND DEVICE STATUS
   3385					;
   3386					; LP NOT IDLE-- SEE IF ERROR, PAGZRO, CHRINT, OR DONE
   3387					;
   3388	010376	105062 	000000G			CLRB	LPCSM+0(R2)	;;;INSURE NO CARRY
   3389	010402	066362 	000016 	000000G		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM
   3390	010410	032713 	160000 			BIT	#ERR+PAGZRO+CHRINT,(R3) ;;;ERROR, PAGZRO, OR CHRINT?
   3391	010414	001014 				BNE	30$		;;;YES-- STOP I/O AND PROCESS
   3392	010416	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
   3393	010422	001003 				BNE	20$		;;;NO-- JUST KEEP IT GOING
   3394	010424					CALL	..DOL1		;;;YES-- START NEXT BUFFER
	010424	004737 	011454'			JSR	PC,..DOL1
   3395	010430	000510 				BR	90$		;;;EXIT FROM IRP
   3396					;
   3397	010432				20$:
   3398	010432	005362 	000000G			DEC	LPRTY(R2)	;;;DECREMENT RETRY COUNT
   3399	010436	002403 				BLT	30$		;;;RAN OUT-- CHECK FOR A BIT SET, OR ASSUME ERROR
   3400	010440	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;MAKE SURE LP IS STILL GO-ING
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 37-1
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3401	010444	000502 				BR	90$		;;;AND EXIT
   3402					;
   3403					; ERROR, PAGZRO, OR CHRINT-- SAVE BYTE COUNT AND ADDRESS
   3404					; STOP I/O AND WAIT FOR CONTINUE
   3405					;
   3406	010446				30$:
   3407	010446	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHAR PRINT OPERATION?
   3408	010452	001044 				BNE	40$		;;;YES-- DON'T SAVE BYTE COUNT AND ADDRESS
   3409	010454	005463 	000006 			NEG	LPBCTR(R3)	;;;GET # BYTES LEFT TO TRANSMIT
   3410	010460	016360 	000006 	000000G		MOV	LPBCTR(R3),T.HCBC(R0) ;;; INTO THREAD BLOCK TO CONTINUE
   3411	010466	016360 	000004 	000000G		MOV	LPBSAD(R3),T.HCAD(R0) ;;;ALSO CURRENT ADDRESS
   3412	010474	032713 	020000 			BIT	#CHRINT,(R3)	;;;THIS CHRINT INTERRUPT?
   3413	010500	001431 				BEQ	40$		;;;NO-- SEE IF PAGZRO
   3414	010502					PUSH	R2		;;;SAVE THE ADDRESS OF LPTBL
	010502	010246 				MOV	R2,-(SP)
   3415	010504	062702 	000000G			ADD	#LPMCB,R2	;;;POINT TO THE MULTI-CHAR BUFFER
   3416	010510	010263 	000004 			MOV	R2,LPBSAD(R3)	;;;POINT THE LP20 TO THAT BUFFER
   3417	010514	116312 	000012 			MOVB	LPRAMD+0(R3),(R2) ;;;GET RAM DATA CHARACTER
   3418	010520	122722 	000136 			CMPB	#'^,(R2)+	;;;ARROW MODE?
   3419	010524	001015 				BNE	39$		;;;NO-- INTERRUPT -10
   3420	010526	116312 	000014 			MOVB	LPCBUF(R3),(R2)	;;;YES-- GET THE CAUSING CHARACTER
   3421	010532	152712 	000100 			BISB	#100,(R2)	;;;MAKE IT ALPHABETIC
   3422	010536					POP	R2		;;;RESTORE LPTBL
	010536	012602 				MOV	(SP)+,R2
   3423	010540	052712 	010000 			BIS	#LP.MCH,(R2)	;;;SAY WE ARE DOING MULTI-CHARACTER
   3424	010544	012763 	177776 	000006 		MOV	#-2,LPBCTR(R3)	;;;SET BYTE COUNT TO TWO CHARACTERS
   3425	010552	012713 	000103 			MOV	#PARENB+INTENB+GO,(R3) ;;;START IT GOING ON THESE TWO CHARS
   3426	010556	000435 				BR	90$		;;;WAIT FOR DONE
   3427					;
   3428	010560				39$:	POP	R2		;;;INTERRUPT-- RESTORE LPTBL POINTER
	010560	012602 				MOV	(SP)+,R2
   3429	010562	000422 				BR	70$		;;; AND TELL -10
   3430					;
   3431					; ERROR OR PAGZRO
   3432					;
   3433	010564				40$:
   3434	010564	032713 	040000 			BIT	#PAGZRO,(R3)	;;;PAGZRO?
   3435	010570	001411 				BEQ	60$		;;;NO-- MUST BE ERROR
   3436	010572	032712 	020000 			BIT	#LP.PZI,(R2)	;;;YES-- IS PAGE ZERO INTERRUPT ENABLED?
   3437	010576	001014 				BNE	70$		;;;YES-- INTERRUPT AND WAIT
   3438	010600	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;;;NO-- RESET PAGZRO
   3439	010606					CALL	..DOLP		;;;NO-- JUST CONTINUE
	010606	004737 	011470'			JSR	PC,..DOLP
   3440	010612	000417 				BR	90$		;;;DONE WITH PAGZRO
   3441					;
   3442					; ERROR-- DECREMENT RETRY COUNT IF ANYTHING BUT OFF-LINE
   3443					;
   3444	010614				60$:
   3445	010614	032763 	000177 	000002 		BIT	#VFUERR+LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM+GOERR,LPCSRB(R3)
   3446	010622	001402 				BEQ	70$		;;;NO ERRORS-- JUST SEND STATUS
   3447	010624	005362 	000000G			DEC	LPRTY(R2)	;;;YES-- DECREMENT RETRY COUNT NOW
   3448					;
   3449					; STOP I/O AND SEND STATUS TO -10
   3450					;
   3451	010630				70$:
   3452	010630	005062 	000000G			CLR	LPITH(R2)	;;;SAY I/O STOPPED
   3453					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 37-2
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

   3454					; SEND STATUS TO -10
   3455					;
   3456	010634				80$:
   3457	010634	052712 	040000 			BIS	#LP.SST,(R2)	;;;SAY SEND STATUS TO TASK
   3458	010640	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;;SAY SOMETHING TO DO
   3459	010646					CALL	..DSEV		;;;SAY SIGNIFICANT EVENT
	010646	004737 	000000G			JSR	PC,..DSEV
   3460					;
   3461					; ALL DONE WITH INTERRUPT
   3462					;
   3463	010652				90$:
   3464	010652					RESTORE			;;; SAVED REGISTERS
	010652	012603 				MOV	(SP)+,R3
	010654	012602 				MOV	(SP)+,R2
	010656	012600 				MOV	(SP)+,R0
   3465	010660	000137 	000000G			JMP	..INTX		;;;RETURN FROM LP INTERRUPT
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 38
LP-20 COMMON SUBROUTINES MODULE

   3467						.SBTTL	LP-20 COMMON SUBROUTINES MODULE
   3468					;
   3469					;                             COPYRIGHT (C) 1975, 1978 BY
   3470					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3471					;
   3472					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3473					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3474					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3475					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3476					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3477					;
   3478					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3479					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3480					;       CORPORATION.
   3481					;
   3482					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3483					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3484					;
   3485					;		MODULE: LP-20 COMMON SUBROUTINES
   3486					;
   3487					;		VERSION: 01-00
   3488					;
   3489					;		AUTHOR: TOM PORCHER
   3490					;
   3491					;		DATE: 7-JUN-75
   3492					;
   3493					;
   3494					;	THIS MODULE CONTAINS:
   3495					;
   3496					;	1) ..STLP (START LP-20 OUTPUT)
   3497					;
   3498					;	2) ..SPLP (STOP LP-20 OUTPUT)
   3499					;
   3500					;	3) ..AKLP (ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
   3501					;
   3502					;	4) ..PTLP (PUT BLOCK IN THREADED OUTPUT LIST)
   3503					;
   3504					;	5) ..DOLP (INITIATE LP-20 TRANSFER)
   3505					;
   3506						.SBTTL	..STLP	(START LP-20 OUTPUT)
   3507					;
   3508					;+
   3509					;
   3510					;	..STLP IS CALLED ONLY FROM THE QUEUED PROTOCOL
   3511					; TASK TO PERFORM A FUNCTION ON THE SPECIFIED LP. THE
   3512					; FOLLOWING FUNCTIONS ARE RECOGNIZED HERE (FUNCTION CODE
   3513					; IN HIGH BYTE OF T.HCBC OF THREAD BLOCK):
   3514					;	BC.STR	STRING DATA
   3515					;	BC.RDS	RETURN DEVICE STATUS
   3516					;	BC.HDS	HERE IS DEVICE STATUS
   3517					;	BC.SDS	SPECIAL DEVICE OPERATION, FIRST WORD IS FUNCTION:
   3518					;		1 -- SET PAGE COUNTER
   3519					;	BC.LDR	LOAD TRANSLATION RAM
   3520					;	BC.LDV	LOAD VERTICAL FORMAT
   3521					;
   3522					; CALLED FROM TASK LEVEL
   3523					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 38-1
..STLP	(START LP-20 OUTPUT)

   3524					; CALLING SEQUENCE:
   3525					;	R0 --	ADDRESS OF THREAD BLOCK TO PROCESS
   3526					;	R2 --	ADDRESS OF LPTBL ENTRY FOR THIS LP
   3527					;
   3528					; EXIT CONDITIONS:
   3529					;
   3530					; NO REGISTERS MODIFIED
   3531					;
   3532					;-
   3533					;
   3534						.ENABLE	LSB
   3535	010664				..STLP::
   3536	010664					SAVE	<R1,R3,R4>
	010664	010146 				MOV	R1,-(SP)
	010666	010346 				MOV	R3,-(SP)
	010670	010446 				MOV	R4,-(SP)
   3537	010672	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
   3538	010676	101434 				BLOS	30$		;NO-- JUST SLIP AWAY
   3539	010700	052712 	000400 			BIS	#LP.F10,(R2)	;NOTE THAT THIS IS A FROM-10 REQUEST
   3540	010704	116004 	000001G			MOVB	T.HCBC+1(R0),R4	;GET FUNCTION CODE
   3541	010710	105060 	000001G			CLRB	T.HCBC+1(R0)	; AND CLEAR IT
   3542	010714	012703 	010734'			MOV	#BCFTAB,R3	;POINT TO FUNCTION DISPATCH TABLE
   3543	010720				10$:
   3544	010720	112301 				MOVB	(R3)+,R1	;GET A DISPATCH ADDRESS
   3545	010722	001413 				BEQ	BCFILF		;END-- ASSUME RETURN DEVICE STATUS
   3546	010724	122304 				CMPB	(R3)+,R4	;MATCH FUNCTION?
   3547	010726	001374 				BNE	10$		;NO-- LOOP TILL WE FIND FUNCTION
   3548	010730	000161 	010734'			JMP	BCFTAB(R1)	;PERFORM FUNCTION
   3549					;
   3550	010734				BCFTAB:
   3551	010734	   124 	   000G			.BYTE	BCFSTR-BCFTAB,BC.STR
   3552	010736	   016 	   000G			.BYTE	BCFRDS-BCFTAB,BC.RDS
   3553	010740	   062 	   000G			.BYTE	BCFHDS-BCFTAB,BC.HDS
   3554	010742	   042 	   000G			.BYTE	BCFSDO-BCFTAB,BC.SDS
   3555	010744	   102 	   000G			.BYTE	BCFLDR-BCFTAB,BC.LDR
   3556	010746	   110 	   000G			.BYTE	BCFLDV-BCFTAB,BC.LDV
   3557	010750	   000 				.BYTE	0
   3558						.EVEN
   3559					;
   3560					; ILLEGAL FUNCTION
   3561					;
   3562	010752				BCFILF:
   3563					;	BR	BCFRDS		;ILLEGAL FUNCTION-- JUST SEND STATUS FOR NOW
   3564					;
   3565					; RETURN DEVICE STATUS
   3566					;
   3567	010752				BCFRDS:
   3568	010752	052712 	040000 			BIS	#LP.SST,(R2)	;NOTE TO SEND STATUS NOW
   3569	010756	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;TELLL LP TASK TO DO SOMETHING
   3570	010764					CALL	..DSEV		;MAKE A SIGNIFICANT EVENT HAPPEN
	010764	004737 	000000G			JSR	PC,..DSEV
   3571					;
   3572					; THREAD BLOCK DONE-- DEALLOCATE
   3573					;
   3574	010770				30$:
   3575	010770					CALL	..DECN		;DEALLOCATE THREAD BLOCK
	010770	004737 	000000G			JSR	PC,..DECN
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 38-2
..STLP	(START LP-20 OUTPUT)

   3576	010774	000433 				BR	90$		;RESTORE AND RETURN
   3577					;
   3578					; SPECIAL DEVICE OPERATION
   3579					;
   3580	010776				BCFSDO:
   3581	010776	016001 	000000G			MOV	T.HCAD(R0),R1	;GET DATA ADDRESS
   3582	011002	022711 	000001 			CMP	#1,(R1)		;SET PAGE COUNTER?
   3583	011006	001361 				BNE	BCFILF		;NO-- ILLEGAL FUNCTION
   3584	011010	012701 	010000 			MOV	#TB.LPC,R1	;SAY SET PAGE COUNTER
   3585	011014	000415 				BR	40$		;QUEUE IT UP
   3586					;
   3587					; HERE IS DEVICE STATUS
   3588					;
   3589	011016				BCFHDS:
   3590	011016	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS
   3591	011022	032711 	000040 			BIT	#DV.EOF,(R1)	;EOF FOR LP?
   3592	011026	001751 				BEQ	BCFILF		;NO-- ILLEGAL STATUS
   3593	011030	012701 	020000 			MOV	#TB.EOF,R1	;YES-- SET FUNCTION
   3594	011034	000405 				BR	40$		;SEND IT TO QUEUE
   3595					;
   3596					; TRANSLATION RAM DATA
   3597					;
   3598	011036				BCFLDR:
   3599	011036	012701 	004000 			MOV	#TB.RMD,R1	;NOTE RAM DATA
   3600	011042	000402 				BR	40$		;SEND TO QUEUE
   3601					;
   3602					; VFU DATA
   3603					;
   3604	011044				BCFLDV:
   3605	011044	012701 	002000 			MOV	#TB.VFD,R1	;NOTE RAM DATA
   3606					;	BR	40$		;SEND TO QUEUE
   3607					;
   3608					; SPECIAL QUEUE ENTRY-- MARK BY TB.DON + FLAGS IN T.HCBC OF THREAD BLOCK
   3609					;
   3610	011050				40$:
   3611	011050	052701 	100000 			BIS	#TB.DON,R1	;FLAG BLOCK DONE TO INTERRUPT SERVICE
   3612	011054	050160 	000000G			BIS	R1,T.HCBC(R0)	;SET SPECIFIED FUNCTION
   3613					;	BR	BCFSTR		;PUT IN QUEUE
   3614					;
   3615					; QUEUE THREAD BLOCK TO LP-20
   3616					;
   3617	011060				BCFSTR:
   3618	011060					CALL	..PTLP		;SEND TO LP OR QUEUE UP
	011060	004737 	011326'			JSR	PC,..PTLP
   3619					;
   3620					; ALL DONE
   3621					;
   3622	011064				90$:
   3623	011064					RESTORE			;UN-SAVE REGISTRS
	011064	012604 				MOV	(SP)+,R4
	011066	012603 				MOV	(SP)+,R3
	011070	012601 				MOV	(SP)+,R1
   3624	011072					RETURN			; FROM ..STLP
	011072	000207 				RTS	PC
   3625					;
   3626						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 39
..SPLP	(STOP LP-20 OUTPUT)

   3628						.SBTTL	..SPLP	(STOP LP-20 OUTPUT)
   3629					;
   3630					;+
   3631					;
   3632					;	..SPLP IS CALLED TO STOP OUTPUT TO THE LP-20 IMMEDIATELY
   3633					; AND RESET THE LP-20.  THIS ROUTINE FIRST CLEARS THE LP-20
   3634					; 'GO' BIT (TO STOP OUTPUT), THEN THREADS THROUGH THE OUTPUT LIST
   3635					; AND MARKS THE THREAD BLOCKS AS DONE BY SETTING T.HCBC TO IE.ABO.
   3636					;
   3637					;	QUEUE I/O REQUESTS ARE GIVEN THE ERROR RETURN 'IE.ABO'
   3638					; (OPERATION ABORTED) WHEN THE THREAD BLOCKS ARE PROCESSED BY THE TASK.
   3639					;
   3640					; CALLED FROM TASK LEVEL
   3641					;
   3642					; CALLING SEQUENCE:
   3643					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3644					;	CALL	..SPLP
   3645					;
   3646					; EXIT CONDITONS:
   3647					;
   3648					; NO REGISTERS MODIFIED
   3649					;
   3650					;-
   3651					;
   3652	011074				..SPLP::
   3653	011074					SAVE	<R0,R1,R3>	;SAVE MISC. REGISTERS
	011074	010046 				MOV	R0,-(SP)
	011076	010146 				MOV	R1,-(SP)
	011100	010346 				MOV	R3,-(SP)
   3654	011102	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
   3655	011106	101453 				BLOS	99$		;NO-- JUST LEAVE
   3656	011110	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING FOR ACK
   3657	011114	005762 	000000G			TST	LPRMA(R2)	;RAM DATA LOAD IN PROGRESS??
   3658	011120	001402 				BEQ	4$		;NO-- GO ON
   3659	011122	052712 	001000 			BIS	#LP.LIP,(R2)	;YES-- FLAG TO REMOVE IT AT LPTASK
   3660	011126				4$:
   3661	011126	005762 	000000G			TST	LPITH(R2)	;I/O IN PROGRESS?
   3662	011132	001403 				BEQ	5$		;NO-- JUST GO ON
   3663	011134	042777 	000040 	000000G		BIC	#EF.LPW,@LPEVFG	;YES-- MARK TO TIME OUT LP-20 WHEN WE STOP IT
   3664	011142				5$:
   3665	011142	005062 	000000G			CLR	LPITH(R2)	;CLEAR INTERRUPT LEVEL THREAD PTR
   3666	011146	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
   3667	011152	001405 				BEQ	6$		;NON-EX LP
   3668	011154	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;STOP LP-20
   3669	011160	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO, TOO
   3670	011166				6$:
   3671	011166	016201 	000000G			MOV	LPTHD(R2),R1	;GET POINTER TO CURRENT THREADED LIST
   3672					;
   3673					; LOOP THROUGH THIS LIST AND MARK THE THREAD BLOCKS AS DONE
   3674					;
   3675	011172				10$:
   3676	011172	010100 				MOV	R1,R0		;GET ADDR OF NEXT BLOCK
   3677	011174	001413 				BEQ	90$		;THAT'S THE END
   3678	011176	011001 				MOV	@R0,R1		;GET ADDR OF NEXT NEXT BLOCK
   3679	011200	052760 	040000 	000000G		BIS	#TB.ABO,T.HCBC(R0) ;MARK BLOCK AS ABORTED
   3680	011206	005760 	000000G			TST	T.HCBC(R0)	;THIS THREAD BLOCK ALREADY DONE?
   3681	011212	002767 				BLT	10$		;YES-- LEAVE IT ALONE
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 39-1
..SPLP	(STOP LP-20 OUTPUT)

   3682	011214	012760 	140361 	000000G		MOV	#TB.DON!TB.ABO!<IE.ABO&LOBYTE>,T.HCBC(R0) ;MARK AS DONE, ABORTED
   3683	011222	000763 				BR	10$		;LOOP FOR ALL THINGS IN LIST
   3684					;
   3685					; ALL DONE WITH LIST
   3686					;
   3687	011224				90$:
   3688	011224	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;SAY I/O DONE TO LP TASK (RATHER... ABORTED)
   3689	011232					CALL	..DSEV		;MAKE A SIGNIFICANT EVENT HAPPEN
	011232	004737 	000000G			JSR	PC,..DSEV
   3690	011236				99$:
   3691	011236					RESTORE			;RESTORE SAVE REGISTERS
	011236	012603 				MOV	(SP)+,R3
	011240	012601 				MOV	(SP)+,R1
	011242	012600 				MOV	(SP)+,R0
   3692	011244					RETURN			;RETURN FORM ..SPLP
	011244	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 40
..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)

   3694						.SBTTL	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
   3695					;
   3696					;+
   3697					;
   3698					;	..AKLP IS CALLED BY ACKNOWLDGE OUTPUUT REQUEST FROM THE -10.
   3699					; THE LP.WAT FLAG IS CLEARED, AND THE CONDITION FLAGS CHRINT, PAGZRO
   3700					; ARE RESET.  OUTPUT IS RESUMED WHEN LP TASK RUNS.
   3701					;
   3702					; CALLED AT TASK LEVEL
   3703					;
   3704					; CALLING SEQUENCE:
   3705					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
   3706					;
   3707					; EXIT CONDITIONS:
   3708					;
   3709					;	NO REGISTERS MODIFIED
   3710					;
   3711					;-
   3712					;
   3713	011246				..AKLP::
   3714	011246					SAVE	<R3>		;SAVE USED R'S
	011246	010346 				MOV	R3,-(SP)
   3715	011250	022702 	000000C			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS AN LP???
   3716	011254	101422 				BLOS	90$		;NO-- JUST LEAVE
   3717	011256	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING
   3718	011262	005762 	000000G			TST	LPITH(R2)	;LP GOING?
   3719	011266	001015 				BNE	90$		;YES-- JUST GO AWAY
   3720	011270	016203 	000000G			MOV	LPCSA(R2),R3	;GET EXT PAGE ADDR OF THIS LP
   3721	011274	001405 				BEQ	10$		;NON-EX LP-- JUST GO AWAY
   3722	011276	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO
   3723	011304	042713 	020000 			BIC	#CHRINT,(R3)	; AND CHRINT
   3724	011310				10$:
   3725	011310	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;START LP TASK
   3726	011316					CALL	..DSEV		; . .
	011316	004737 	000000G			JSR	PC,..DSEV
   3727	011322				90$:
   3728	011322					RESTORE			; USED R'S
	011322	012603 				MOV	(SP)+,R3
   3729	011324					RETURN			; FROM ..AKLP
	011324	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 41
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

   3731						.SBTTL	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
   3732					;
   3733					;+
   3734					;
   3735					;	..PTLP IS CALLED TO SEND A BUFFER TO THE LP-20. THE
   3736					; BUFFER IS EITHER OUTPUT IMMEDIATELY OR, IF THE LP IS NOT IDLE,
   3737					; ADDED TO THE END OF THIS LP'S THREADED OUTPUT LIST.
   3738					;
   3739					; CALLED FROM TASK LEVEL
   3740					;
   3741					; CALLING SEQUENCE:
   3742					;	R0 --	ADDRESS OF THREAD BLOCK FOR THIS BUFFER
   3743					;	R2 --	POINTER TO LPTBL FOR THIS LP
   3744					;	CALL	..PTLP
   3745					;
   3746					; EXIT CONDITIONS:
   3747					;
   3748					; NO REGISTERS MODIFIED
   3749					;
   3750					;-
   3751					;
   3752	011326				..PTLP::
   3753	011326					SAVE	<R1,R3>	;SAVE USED REGISTERS
	011326	010146 				MOV	R1,-(SP)
	011330	010346 				MOV	R3,-(SP)
   3754	011332	005010 				CLR	@R0		;MARK END OF LIST
   3755	011334	012762 	000012 	000000G		MOV	#LPRTRY,LPRTY(R2) ;RESET RETRY COUNTER
   3756	011342	016203 	000000G			MOV	LPCSA(R2),R3	;GET LP EXTERNAL PAGE ADDRESS
   3757	011346	001404 				BEQ	5$		;OOPS-- NON-EX LP
   3758	011350	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
   3759	011354	001006 				BNE	7$		;NO-- JUST GO ON
   3760	011356	000403 				BR	6$		;OFF-LINE-- SEND STATUS
   3761					;
   3762	011360				5$:
   3763	011360	012760 	100277 	000000G		MOV	#TB.DON!<IE.OFL&LOBYTE>,T.HCBC(R0) ;NON-EX-LP-- MARK AS DONE, ERROR
   3764	011366				6$:
   3765	011366	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO RING THE -10
   3766	011372				7$:
   3767	011372					.INH0			;;LOCK OUT QUEUE'D PROTOCOL TASK
	011372	013746 	177776 			MOV	@#PS,-(SP)
	011376	112737 	000140 	177776 		MOVB	#140,@#PS
   3768	011404	016201 	000000G			MOV	LPTHD(R2),R1	;;GET CURRENT POINTER TO THREADED LIST
   3769	011410	001405 				BEQ	20$		;;NONE-- START LP GOING
   3770					;
   3771					; LP BUSY-- MUST FIND END OF THREADED LIST AND PUT THIS BUFFER THERE
   3772					;
   3773	011412				10$:
   3774	011412	010103 				MOV	R1,R3		;;COPY ADDR OF THREAD BLOCK
   3775	011414	011301 				MOV	@R3,R1		;;GET NEXT THREAD
   3776	011416	001375 				BNE	10$		;;NOT END-- KEEP ON LOOKING
   3777	011420	010013 				MOV	R0,@R3		;;END-- STORE CURRENT THREAD BLOCK AT END
   3778	011422	000407 				BR	90$		;;ALL DONE
   3779					;
   3780					; LP IDLE-- START IT GOING ON THIS BUFFER
   3781					;
   3782	011424				20$:
   3783	011424	010062 	000000G			MOV	R0,LPTHD(R2)	;;STORE START OF THREAD
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 41-1
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

   3784	011430	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;TELL LP TASK TO START LP GOING
   3785	011436					CALL	..DSEV		;; WITH A SIGNIFICANT EVENT
	011436	004737 	000000G			JSR	PC,..DSEV
   3786					;
   3787					; ALL DONE
   3788					;
   3789	011442				90$:
   3790	011442					.ENB0			;RE-ENABLE IRPS
	011442	004737 	000000G			JSR	PC,..ENB0
   3791	011446					RESTORE			;RESTORE SAVED REGISTERS
	011446	012603 				MOV	(SP)+,R3
	011450	012601 				MOV	(SP)+,R1
   3792	011452					RETURN			;RETURN FROM ..PTLP
	011452	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 42
..DOLP	(INITIATE LP-20 TRANSFER)

   3794						.SBTTL	..DOLP	(INITIATE LP-20 TRANSFER)
   3795					;
   3796					;+
   3797					;
   3798					;	..DOLP IS CALLED TO START AN LP GOING ON A SPECIFIED BUFFER.
   3799					; THE DEVICE RGISTERS ARE SET UP AND 'GO' IS SET TO START THE TRANSFER.
   3800					;
   3801					;	IF THE THREAD SPECIFIED IS ZERO, NOTHING IS DONE AND THE
   3802					; LP IS LEFT IDLE.
   3803					;
   3804					;	ENTER AT ..DOL1 TO OUTPUT NEXT BUFFER, UNLESS LP.MCH IS SET,
   3805					; IN WHICH CASE THE CURRENT BUFFER IS OUTPUT.  THIS IS USUALLY ONLY
   3806					; CALLED WHEN 'DONE' IS SET.
   3807					;
   3808					; CALLED AT INTERRUPT LEVEL (OR WITH INTERRUPTS DISABLED)
   3809					;
   3810					; CALLING SEQUENCE:
   3811					;	R0 --	ADDR OF THREAD BLOCK TO OUTPUT (ZERO IF END)
   3812					;	R2 --	ADDR OF LPTBL ENTRY FOR THIS LP
   3813					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
   3814					;
   3815					; EXIT CONDITIONS:
   3816					;	R0 --	ADDR OF CURRENT THREAD BLOCK
   3817					;
   3818					; NO OTHER REGISTERS MODIFIED
   3819					;
   3820					;-
   3821					;
   3822						.ENABLE	LSB
   3823	011454				..DOL1::
   3824	011454	032712 	001000 			BIT	#LP.LIP,(R2)	;;;LOAD SUPPOSED TO BE IN PROGRESS?
   3825	011460	001020 				BNE	19$		;;;YES-- GO BACK TO TASK
   3826	011462	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHARACTER OPERATION?
   3827	011466	001417 				BEQ	20$		;;;NO-- GET NEXT BUFFER
   3828									;;;YES-- GET (CONTINUE) CURRENT BUFFER
   3829	011470				..DOLP::
   3830	011470				10$:
   3831	011470	042712 	114000 			BIC	#LP.WAT!LP.MCH!LP.HNG,(R2) ;;;NOT WAITING, AND NOT MULTI-CHAR-ING
   3832	011474	010062 	000000G			MOV	R0,LPITH(R2)	;;;SAVE CURRENT BUFFER AS OUR INT-LEVEL BUFFER
   3833	011500	001463 				BEQ	90$		;;;GIVE UP IF END
   3834	011502	016063 	000000G	000006 		MOV	T.HCBC(R0),LPBCTR(R3) ;;;SAVE BYTE COUNT FOR LP (WILL NEG LATER)
   3835	011510	003020 				BGT	50$		;;;NOT DONE-- START OUTPUT
   3836					;
   3837	011512	032760 	036000 	000000G		BIT	#TB.SFN,T.HCBC(R0) ;;;SPECIAL FUNCTION?
   3838	011520	001402 				BEQ	20$		;;;NO-- JUST SET DONE
   3839	011522				19$:
   3840	011522	005000 				CLR	R0		;;;YES-- DON'T GET NEXT THREAD BLOCK
   3841	011524	000404 				BR	30$		;;;AND STOP I/O, REQUEST TASK LEVEL CODE
   3842					;
   3843					; THIS THREAD BLOCK DONE-- MARK IT BY -VE T.HCBC, SET I/O DONE
   3844					;  EVENT FLAG, AND START NEXT BUFFER.
   3845					;
   3846	011526				20$:
   3847	011526	012760 	100001 	000000G		MOV	#TB.DON!<IS.SUC&LOBYTE>,T.HCBC(R0) ;;;NOTE SUCCESS HERE
   3848	011534	011000 				MOV	@R0,R0		;;;GET ADDR OF NEXT BUFFER
   3849					;
   3850					; SET I/O DONE, GO ON TO NEXT THREAD BLOCK (ADDR IN R0)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1110  03-OCT-79 10:55  PAGE 42-1
..DOLP	(INITIATE LP-20 TRANSFER)

   3851					;
   3852	011536				30$:
   3853	011536	052777 	000001 	000000G		BIS	#EF.LPD,@LPEVFG	;;;SET LP I/O DONE EVENT FLAGE
   3854	011544					CALL	..DSEV		;;;MAKE A SIGNIFICANT EVENT
	011544	004737 	000000G			JSR	PC,..DSEV
   3855	011550	000747 				BR	10$		;;;DO NEXT BUFFER
   3856					;
   3857					; SET UP -VE BYTE COUNT AND EXTENDED MEMORY ADDRESS BITS
   3858					;
   3859	011552				50$:
   3860	011552	016063 	000000G	000004 		MOV	T.HCAD(R0),LPBSAD(R3) ;;;SAVE PHYSICAL ADDR FOR LP
   3861	011560	005463 	000006 			NEG	LPBCTR(R3)	;;;MAKE -VE # BYTES TO SEND
   3862	011564	042713 	000060 			BIC	#BUSA17+BUSA16,(R3) ;;;CLEAR EXTENDED MEMORY ADDR BITS
   3863	011570	005760 	000000G			TST	T.HBCT(R0)	;;;THIS QUEUE I/O REQUEST?
   3864	011574	001023 				BNE	59$		;;;NO-- ADDRESS IS IN LOW CORE
   3865	011576	116062 	177775 	000000G		MOVB	T.HVFC(R0),LPMCB(R2) ;;;SET TO PRINT VERTICAL FORMAT CHARACTER
   3866	011604	001415 				BEQ	58$		;;;NONE-- JUST START THE LP
   3867	011606	105060 	177775 			CLRB	T.HVFC(R0)	;;;YES-- CLEAR IT NOW
   3868	011612	012763 	000000G	000004 		MOV	#LPMCB,LPBSAD(R3) ;;;YES-- POINT TO THE FORMAT CHARACTER
   3869	011620	060263 	000004 			ADD	R2,LPBSAD(R3)	;;; FOR THIS LP
   3870	011624	012763 	177777 	000006 		MOV	#-1,LPBCTR(R3)	;;;ONLY 1 CHARACTER
   3871	011632	052712 	010000 			BIS	#LP.MCH,(R2)	;;;NOTE THAT WE ARE WORKING FROM LPMCB
   3872	011636	000402 				BR	59$		;;;START THE LP GOING
   3873					;
   3874	011640				58$:
   3875	011640	156013 	177774 			BISB	T.HEMA(R0),(R3)	;;;SET EXTENDED MEMORY BITS
   3876					;
   3877					; SET INTENB, PARENB, AND GO TO START LP GOING ON THIS BUFFER
   3878					;
   3879	011644				59$:
   3880	011644	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;START LP GOING
   3881					;
   3882					; ALL DONE-- RETURN
   3883					;
   3884	011650				90$:
   3885	011650					RETURN			;;;RETURN FROM ..DOLP/..DOL1
	011650	000207 				RTS	PC
   3886						.DSABLE	LSB
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 43
..DOLP	(INITIATE LP-20 TRANSFER)

   3888						.TITLE	CRDRV	(CD-11 DRIVER FOR RSX10F)
   3889						.SBTTL	TITLE PAGE
   3890						.IDENT	/001000/
   3891					;
   3892					;                             COPYRIGHT (C) 1975, 1978 BY
   3893					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3894					;
   3895					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3896					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3897					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3898					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3899					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3900					;
   3901					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3902					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3903					;       CORPORATION.
   3904					;
   3905					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3906					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3907					;
   3908					;		MODULE: COMMON DEFINITIONS
   3909					;
   3910					;		VERSION: 01-00
   3911					;
   3912					;		AUTHOR: TOM PORCHER
   3913					;
   3914					;		DATE: 25-SEP-75
   3915					;
   3916					;
   3917					;	THIS MODULE CONTAINS:
   3918					;
   3919					;	1) COMMON PARAMETERS AND MACROS
   3920					;
   3921					;	2) CD-11 DEVICE REGISTER DEFINITIONS
   3922					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 44
COMMON PARAMETERS AND MACROS

   3924						.SBTTL	COMMON PARAMETERS AND MACROS
   3925					;
   3926					; MISC. MCALLS
   3927					;
   3928					.MCALL MRKT$,SPRA$S,SVTK$S,WTLO$S,WTSE$S,WSIG$S
   3929					.MCALL DIR$,$DEF,CALL,RETURN,.INH,.ENB,PUSH,POP,.STKM
   3930	011652					$DEF
   3931						.ENABLE	AMA
   3932						.LIST	MEB
   3933					;
   3934					; PARAMETERS
   3935					;
   3936		000001 			C$$D11=	1			;ONLY 1 CD-11
   3937					;
   3938					; EVENT FLAGS
   3939					;
   3940		000001 			E.FCRC= 1			;CD-11 MARK-TIME REQUEST
   3941		000001 			 EF.CRC=BIT0
   3942		000002 			E.FCRD=	2			;I/O DONE FROM INTERRUPT LEVEL
   3943		000002 			 EF.CRD=BIT1
   3944		000003 			E.FCRS=	3			;BUFFER AVAILABLE FOR STATUS
   3945		000004 			 EF.CRS=BIT2
   3946		000004 			E.FCRB=	4			;DATA BUFFER AVAILABLE
   3947		000010 			 EF.CRB=BIT3
   3948					;
   3949					;
   3950		000074 			.CYLTM=60.
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 45
CD-11 DEVICE REGISTER BIT DEFINITIONS

   3952						.SBTTL	CD-11 DEVICE REGISTER BIT DEFINITIONS
   3953					;
   3954					;
   3955					;CDST==	177160			;CONTROL/STATUS REGISTER
   3956		100000 				CDSERR=	BIT15
   3957		040000 				CDSRCK=	BIT14
   3958		020000 				CDSEOF=	BIT13
   3959		010000 				CDSOFL=	BIT12
   3960		004000 				CDSDER=	BIT11
   3961		002000 				CDSDLT=	BIT10
   3962		001000 				CDSNXM=	BIT9
   3963		000400 				CDSPWC=	BIT8
   3964		000200 				CDSRDY=	BIT7
   3965		000100 				CDSIEN=	BIT6
   3966		000040 				CDSB17=	BIT5
   3967		000020 				CDSB16=	BIT4
   3968		000010 				CDSTOL=	BIT3
   3969		000004 				CDSHEM=	BIT2
   3970		000002 				CDSPAK=	BIT1
   3971		000001 				CDSRED=	BIT0
   3972					;CDCC==	177162			;COLUMN COUNT REGISTER
   3973					;CDBA==	177164			;BUS ADDRESS BITS 15-0
   3974					;CDDB==	177166			;DATA BUFFER REGISTER
   3975					;AFTER DATA TRANSFERS (CDSRDY= 1):
   3976		040000 				CDBRCK=	BIT14
   3977		020000 				CDBPCK=	BIT13
   3978		010000 				CDBSCK=	BIT12
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 46
CD-11 DRIVER COMMON DATA MODULE

   3980						.SBTTL	CD-11 DRIVER COMMON DATA MODULE
   3981					;
   3982					;                             COPYRIGHT (C) 1975, 1978 BY
   3983					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   3984					;
   3985					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   3986					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   3987					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   3988					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   3989					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   3990					;
   3991					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   3992					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   3993					;       CORPORATION.
   3994					;
   3995					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   3996					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   3997					;
   3998					;		MODULE: CD-11 DRIVER COMMON DATA
   3999					;
   4000					;		VERSION: 01-00
   4001					;
   4002					;		AUTHOR: TOM PORCHER
   4003					;
   4004					;		DATE: 25-AUG-75
   4005					;
   4006					;
   4007					;	THIS MODULE CONTAINS:
   4008					;
   4009					;	1) COMMON DATABASE DEFINITIONS
   4010					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 47
COMMON DATABASE DEFINITIONS

   4012						.SBTTL	COMMON DATABASE DEFINITIONS
   4013					;
   4014					;
   4015					; CR TASK STACK HEADER
   4016					;
   4017	011652				CRHD::	.STKM	0,0,0,0,0,0,0,CRINI,174000,CRSTK
	011720	000000 	000000 	000000 		.WORD	0,0,0,0
	011726	000000
	011746	174000 	012230'	012132'		.WORD	174000,CRINI,CRSTK
	012002	000005 				.WORD	5
	012004	000000G				.WORD	TTPEN
	012006	000000 				.WORD	0
	012010	000000 				.WORD	0
	012012	000000 				.WORD	0
	012014	000000 				.WORD	0
	012016	000000 				.WORD	0
	012020	000000 				.WORD	0
	012022	000000 				.WORD	0
	012024	000000 				.WORD	0
	012026	000000 				.WORD	0
	012030	000000 				.WORD	0
	012132	000000 				.WORD	0
	012134	000000 				.WORD	0
	012136	000000 				.WORD	0
	012140	000000 				.WORD	0
	012142	000000 				.WORD	0
	012144	000000 				.WORD	0
	012146	012230'				.WORD	CRINI
	012150	174000 				.WORD	174000
   4018					;
   4019									;STATUS BITS:
   4020		100000 				CR.HNG=	BIT15		;CR IS HUNG, I.E. NO INPUT HAS OCCURED
   4021									; IN 10 SECONDS.  SET AND CHECKED BY
   4022									; MARK-TIME SERVICE, CLEARED BY I/O
   4023									; DONE AT INTERRUPT.
   4024		040000 				CR.SST=	BIT14		;A CHANGE IN DEVICE STATUS HAS OCCURED,
   4025									; OR THE -10 HAS REQUESTED THE STATUS OF
   4026									; THE CR.
   4027		020000 				CR.IOP=	BIT13		;I/O IN PROGRESS. SET WHEN READ CARD STARTED,
   4028									; CLEARED WHEN DONE INTERRUPT OCCURS.
   4029		010000 				CR.IOD=	BIT12		;I/O DONE FROM INTERRUPT LEVEL. SET WHEN A
   4030									; DATA BUFFER IS READY TO BE SENT TO THE -10.
   4031		004000 				CR.ACK=	BIT11		;ACKNOWLEDGE RECEIVED.  READ NEXT CARD.
   4032									; SET WHEN ACK RECEIVED FROM -10 (..AKCR).
   4033		002000 				CR.RHN=	BIT10		;READER HUNG DURING READ. SET BY MKT ROUTINE
   4034									; TESTED AND CLEARED BY SSTSCR
   4035		001000 				CR.NXD=	BIT9		;NON-EX CD-11. SET BY INITCR, CHECKED
   4036									; BEFORE TRANSFER STARTED.
   4037		000400 				CR.NSF=	BIT8		;NOT STACKER FULL.  SET WHEN ANY OTHER ERROR
   4038									; CONDITION IS SET.
   4039					;
   4040					; DIRECTIVE PARAMETER BLOCKS
   4041					;
   4042	012152				CRMRKT:	MRKT$	E.FCRC,10.*.CYLTM,10.*.CYLTM ;MARK-TIME REQUEST FOR 10 SECONDS
	012152	   027 	   005 			.BYTE	23.,5
	012154	000001 				.WORD	E.FCRC
	012156	001130 				.WORD	10.*.CYLTM
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 47-1
COMMON DATABASE DEFINITIONS

	012160	001130 				.WORD	10.*.CYLTM
	012162	000000 				.WORD
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 48
CD-11 DRIVER TASK MODULE

   4044						.SBTTL	CD-11 DRIVER TASK MODULE
   4045					;
   4046					;                             COPYRIGHT (C) 1975, 1978 BY
   4047					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4048					;
   4049					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4050					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4051					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4052					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4053					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4054					;
   4055					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4056					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4057					;       CORPORATION.
   4058					;
   4059					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4060					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4061					;
   4062					;		MODULE: CD-11 DRIVER TASK
   4063					;
   4064					;		VERSION: 01-00
   4065					;
   4066					;		AUTHOR: TOM PORCHER
   4067					;
   4068					;		DATE: 25-AUG-75
   4069					;
   4070					;
   4071					;	THIS MODULE CONTAINS:
   4072					;
   4073					;	1) TASK LEVEL SERVICE FOR CD-11
   4074					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 49
TASK INITIALIZATION

   4076						.SBTTL	TASK INITIALIZATION
   4077					;
   4078					; SST VECTOR TABLE
   4079					;
   4080	012164	012166'			CRSSTV:	.WORD	CRTRP4		;WHERE TO GO ON TRAP TO 4
   4081					;
   4082					; HERE ON TRAP TO 4, HOPEFULLY JUST NON-EX CR
   4083					;
   4084	012166	021627 	012700'		CRTRP4:	CMP	(SP),#CRDINT	;FROM MARK-TIME?
   4085	012172	001404 				BEQ	10$		;YES-- OK
   4086	012174	021627 	013432'			CMP	(SP),#CRDCLR	;OR FROM INIT?
   4087	012200	001401 				BEQ	10$		;YES-- ALSO OK
   4088	012202	000004 				IOT			;***** NO, NOT OUR T04 *****
   4089					;
   4090	012204	052737 	001000 	000000G	10$:	BIS	#CR.NXD,CRSTS	;SAY NON-EX CR
   4091	012212	052766 	000001 	000002 		BIS	#BIT0,2(SP)	;SET THE CARRY TO THE SST
   4092	012220	000002 				RTI			;RETURN TO INTERRPUTED ROUTINE
   4093					;
   4094					; HERE ON POWER-UP AST
   4095					;
   4096	012222				CRPWUP:	CALL	INITCR		;RESET THE CR
	012222	004737 	013416'			JSR	PC,INITCR
   4097	012226	000002 				RTI			;RETURN FROM AST
   4098					;
   4099					; HERE TO START CR TASK
   4100					;
   4101	012230	013737 	000000G	000000G	CRINI:	MOV	.CRTSK,CREVFG	;GET ADDRESS OF OUR TASK'S ENTRY
   4102	012236	062737 	000020 	000000G		ADD	#A.EF,CREVFG	;MAKE THAT ADDRESS OF OUR EVENT FLAGS
   4103	012244	052777 	000014 	000000G		BIS	#EF.CRB!EF.CRS,@CREVFG ;SAY OUR BUFFERS ARE AVAILABLE
   4104	012252					DIR$	#CRMRKT		;SETUP FOR 10-SECOND MARK-TIME'S
	012252	012746 	012152'			MOV	#CRMRKT,-(SP)
	012256	104375 				EMT	375
   4105	012260					SVTK$S	#CRSSTV,#1	;SETUP FOR TRAP-TO-4 RECOGNITION
	012260	012746 	000001 			MOV	#1,-(SP)
	012264	012746 	012164'			MOV	#CRSSTV,-(SP)
	012270	012746 				MOV	(PC)+,-(SP)
	012272	   071 	   003 			.BYTE	57.,3
	012274	104375 				EMT	375
   4106	012276					SPRA$S	#CRPWUP		;SETUP FOR POWER-UP AST
	012276	012746 	012222'			MOV	#CRPWUP,-(SP)
	012302	012746 				MOV	(PC)+,-(SP)
	012304	   155 	   002 			.BYTE	109.,2
	012306	104375 				EMT	375
   4107	012310					CALL	INITCR		;INITIALIZE CD-11 AND TABLES
	012310	004737 	013416'			JSR	PC,INITCR
   4108					;	BR	CRLOOP		;FALL INTO PROCESSING LOOP
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 50
CRLOOP (MAIN PROCESSING LOOP)

   4110						.SBTTL	CRLOOP (MAIN PROCESSING LOOP)
   4111					;
   4112					; WAIT  FOR EVENT FLAGS EF.CRC (10 SEC MARK-TIME), EF.CRD (I/O DONE).
   4113					;
   4114	012314				CRLOOP:	WTLO$S	1,#EF.CRC!EF.CRD ;WAIT FOR FLAGS
	012314	012746 	000003 			MOV	#EF.CRC!EF.CRD,-(SP)
	012320	012746 	000001 			MOV	#1,-(SP)
	012324	012746 				MOV	(PC)+,-(SP)
	012326	   053 	   003 			.BYTE	43.,3
	012330	104375 				EMT	375
   4115					;
   4116	012332					.INH			;;;A FLAG WAS SET-- LOCK OUT INTERRUPTS
	012332	013746 	177776 			MOV	PS,-(SP)
	012336	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   4117	012344	017737 	000000G	000000G		MOV	@CREVFG,CRCEVF	;;;GET OUR CURRENT EVENT FLAGS
   4118	012352	042777 	000003 	000000G		BIC	#EF.CRC!EF.CRD,@CREVFG ;;;CLEAR THE FLAGS WE WAITED FOR
   4119	012360					.ENB			;INTERRUPTS: ON!
	012360	012637 	177776 			MOV	(SP)+,@#PS	;;
   4120	012364	005737 	000000G			TST	.CRPFL		;POWER FAIL?
   4121	012370	001404 				BEQ	10$		;NO -- FORGET IT
   4122	012372					CALL	INITCR		;YES -- INIT CR
	012372	004737 	013416'			JSR	PC,INITCR
   4123	012376	005037 	000000G			CLR	.CRPFL
   4124	012402				10$:
   4125					;
   4126					; SEE IF THIS IS EF.CRD (I/O DONE), AND FIND OUT WHY IT WAS SET.
   4127					;
   4128	012402	032737 	000002 	000000G	CRIOD:	BIT	#EF.CRD,CRCEVF	;THIS EF.CRD?
   4129	012410	001517 				BEQ	90$		;NO-- TRY FOR MARK-TIME
   4130					;
   4131					; SEE IF A BUFFER IS READY TO BE SENT TO THE -10 (CR.IOD SET BY INTERRUPT SERVICE)
   4132					;
   4133	012412	032737 	010000 	000000G		BIT	#CR.IOD,CRSTS	;WE FINISH A TRANSFER?
   4134	012420	001430 				BEQ	20$		;NO-- GO ON
   4135	012422	012700 	000000G			MOV	#CRBUFF,R0	;YES-- GET ADDRESS OF BUFFER
   4136					;
   4137					; WE MUST SEND A DATA BUFFER TO THE -10.  SET UP FOR ..STIN:
   4138					;	R0 --	ADDRESS OF BUFFER. FIRST WORD IS (LOW BYTE) BYTE COUNT
   4139					;		OF BUFFER (NOT INCLUDING HEADER WORD), (HIGH BYTE) UNIT #.
   4140					;	R1 --	BIT15+ FUNCTION CODE (BC.STR-- STRING DATA)
   4141					;	R2 --	EVENT FLAG TO SET WHEN DONE
   4142					;	R3 --	DEVICE CODE (D.CCDR)
   4143					;
   4144	012426	105040 				CLRB	-(R0)		;HIGH BYTE HEADER: UNIT # (ALWAYS 0)
   4145	012430	112740 	000000G			MOVB	#CRBFLN,-(R0)	;LOW BYTE HEADER: SIZE OF BUFFER
   4146	012434	012701 	100000G			MOV	#BIT15+BC.STR,R1 ;FUNCTION CODE: STRING DATA (INDIRECT FLAVOR)
   4147	012440	012702 	000004 			MOV	#E.FCRB,R2	;EVENT FLAG TO SET WHEN DONE
   4148	012444	012703 	000000G			MOV	#D.CCDR,R3	;DEVICE CODE: CDR
   4149	012450	042777 	000010 	000000G		BIC	#EF.CRB,@CREVFG	;ASSUME SUCCESS
   4150	012456					CALL	..STIN		;SEND TO -10
	012456	004737 	000000G			JSR	PC,..STIN
   4151	012462	103404 				BCS	10$		;GIVE UP-- PRIMARY PROTOCOL (DDT)
   4152	012464	042737 	112400 	000000G		BIC	#CR.IOD!CR.HNG!CR.RHN!CR.NSF,CRSTS ;OK-- NO LONGER BUFFER TO SEND
   4153	012472	000403 				BR	20$		;GO ON
   4154					;
   4155	012474	052777 	000010 	000000G	10$:	BIS	#EF.CRB,@CREVFG	;..STIN FAILED-- BUFFER STILL AVAILABLE
   4156					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 50-1
CRLOOP (MAIN PROCESSING LOOP)

   4157					; SEE IF STATUS IS TO BE SENT TO -10, EITHER BECAUSE OF A CHANGE IN
   4158					;  DEVICE STATUS OR A REQUEST FROM THE -10.
   4159					;
   4160	012502	032737 	040000 	000000G	20$:	BIT	#CR.SST,CRSTS	;TIME TO SEND DEVICE STATUS?
   4161	012510	001402 				BEQ	30$		;NO-- GO ON
   4162	012512					CALL	SSTSCR		;YES-- SEND SUCH TO -10
	012512	004737 	013010'			JSR	PC,SSTSCR
   4163					;
   4164					; SEE IF -10 WANTS US TO READ NEXT CARD, BY CR.ACK SET.
   4165					;
   4166	012516	032737 	004000 	000000G	30$:	BIT	#CR.ACK,CRSTS	;-10 WANT A CARD?
   4167	012524	001451 				BEQ	90$		;NO-- ALL DONE
   4168	012526	032737 	030000 	000000G		BIT	#CR.IOP!CR.IOD,CRSTS ;STILL I/O IN PROGRESS?
   4169	012534	001045 				BNE	90$		;YES-- COME BACK LATER WHEN WE ARE DONE
   4170	012536	042737 	106000 	000000G		BIC	#CR.ACK!CR.HNG!CR.RHN,CRSTS ;YES-- NO LONGER WANTING
   4171	012544	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;THIS NON-EX CD-11?
   4172	012552	001017 				BNE	32$		;YES-- JUST SEND STATUS
   4173	012554	032777 	000010 	000000G	34$:	BIT	#EF.CRB,@CREVFG	;BUFFER AVAILABLE TO US YET?
   4174	012562	001007 				BNE	31$		;YES-- ALL OK
   4175	012564					WSIG$S			;WAIT FOR SOMETHING TO HAPPEN
	012564	012746 				MOV	(PC)+,-(SP)
	012566	   061 	   001 			.BYTE	49.,1
	012570	104375 				EMT	375
   4176	012572	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ;IS PRIMARY PROTOCOL STILL RUNNING ?
   4177	012600	001365 				BNE	34$		;YES, SEE IF BUFFER IS NOW FREE.
   4178					;
   4179	012602	032737 	010000 	000000G	31$:	BIT	#CDSOFL,@#CDST	;CD-11 OFF-LINE?
   4180	012610	001403 				BEQ	33$		;NO-- LET'S START TRANSFER
   4181	012612				32$:	CALL	SSTSCR		;YES-- TELL -10
	012612	004737 	013010'			JSR	PC,SSTSCR
   4182	012616	000414 				BR	90$		; AND GO AWAY FOR NOW
   4183					;
   4184					; START TRNSFER OF CARD TO CRBUFF
   4185					;
   4186	012620	052737 	020000 	000000G	33$:	BIS	#CR.IOP,CRSTS	;SAY I/O NOW IN PROGRESS
   4187	012626	012737 	000000C	000000G		MOV	#-<CRBFLN/2>,@#CDCC ;INDICATE TO READ 80. COLUMNS
   4188	012634	012737 	000000G	000000G		MOV	#CRBUFF,@#CDBA	; INTO CRBUFF
   4189	012642	012737 	000101 	000000G		MOV	#CDSIEN!CDSRED,@#CDST ;START CARD GOING
   4190					;
   4191					; ALL DONE WITH EF.CRD
   4192					;
   4193	012650				90$:
   4194					;
   4195					; CHECK FOR MARK-TIME REQUEST (EF.CRC SET), THEN DO HUNG CHECK IF SO.
   4196					;
   4197						.ENABLE LSB
   4198	012650	032737 	000001 	000000G	CRMKT:	BIT	#EF.CRC,CRCEVF	;MARK-TIME REQUEST EVENT FLAG SET?
   4199	012656	001452 				BEQ	90$		;NO-- GO ON
   4200	012660	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;NON-EX CR?
   4201	012666	001011 				BNE	9$		;YES-- SKIP INT-ENB STUFF
   4202	012670	000241 				CLC			;IN CASE OF TRAP
   4203	012672	032737 	000100 	000000G		BIT	#CDSIEN,@#CDST	;INT-ENB STILL SET?
   4204	012700	103404 			CRDINT:	BCS	9$		;NON-EX CR-- GO ON
   4205	012702	001003 				BNE	9$		;YES-- SKIP THE SET
   4206	012704	052737 	000100 	000000G		BIS	#CDSIEN,@#CDST	;YES-- MAKE SURE WE STILL HAVE INT-ENB
   4207	012712	032737 	074000 	000000G	9$:	BIT	#CR.SST!CR.IOD!CR.ACK!CR.IOP,CRSTS ;YES-- STUFF FOR US TO DO?
   4208	012720	001426 				BEQ	30$		;NO-- IDLE-- CLEAR HUNG FLAG
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 50-2
CRLOOP (MAIN PROCESSING LOOP)

   4209	012722	032737 	100000 	000000G		BIT	#CR.HNG,CRSTS	;WE BEEN HERE WITHIN 10 SECONDS?
   4210	012730	001416 				BEQ	20$		;NO-- SET HUNG FLAG SO WE WILL IN 10 SEC
   4211	012732	032737 	020000 	000000G		BIT	#CR.IOP,CRSTS	;YES-- WAS I/O IN PROGRESS
   4212	012740	001407 				BEQ	10$		;NO-- JUST PROCESS OTHER FLAGS
   4213	012742	052737 	042000 	000000G		BIS	#CR.RHN!CR.SST,CRSTS ;YES-- SAY READER HUNG
   4214	012750	005237 	000000G			INC	CRHUNG		;COUNT # TIMES HUNG
   4215	012754					CALL	INITCR		;RESET THE CD-11
	012754	004737 	013416'			JSR	PC,INITCR
   4216					;
   4217	012760	052777 	000002 	000000G	10$:	BIS	#EF.CRD,@CREVFG	;SAY TO LOOK AT THE FLAGS AGAIN
   4218					;
   4219	012766	052737 	100000 	000000G	20$:	BIS	#CR.HNG,CRSTS	;FLAG TO CHECK THIS AGAIN IN 10 SECONDS
   4220	012774	000403 				BR	90$		;ALL DONE
   4221					;
   4222	012776	042737 	102000 	000000G	30$:	BIC	#CR.HNG!CR.RHN,CRSTS	;NOTHING TO DO-- DON'T SAY WE ARE HUNG
   4223					;
   4224					; ALL DONE WITH EF.CRC
   4225					;
   4226	013004	000137 	012314'		90$:	JMP	CRLOOP		;BACK TO MAIN LOOP
   4227						.DSABLE	LSB
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 51
SSTSCR	(SEND CD-11 STATUS TO -10)

   4229						.SBTTL	SSTSCR	(SEND CD-11 STATUS TO -10)
   4230					;
   4231					;+
   4232					;
   4233					;	SSTSCR IS CALLED WHEN CR.SST IS SET, EITHER BY A CHANGE IN HARDWARE
   4234					; STATUS, OR ON REQUEST FROM THE -10.
   4235					;
   4236					;	THE STATUS PACKET IS ASSEMBLED INTO CRSTBK.  THE FORMAT OF THIS BLOCK
   4237					; IS AS FOLLOWS:
   4238					;
   4239					; WORD	0	STANDARD BITS (DV.XXX)
   4240					;	1	DEVICE DEPENDENT BITS (DD.XXX)
   4241					;	2	(HIGH BYTE) # BYTES OF DEVICE DEPENDENT INFO (ALWAYS 0)
   4242					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS (ALWAYS 8.)
   4243					; CD-11 DEVICE REGISTERS
   4244					;	3	CDST
   4245					;	4	CDCC
   4246					;	5	CDBA
   4247					;	6	CDDB
   4248					;
   4249					; THE FOLLOWING BITS ARE USED IN THE STATUS WORDS:
   4250					;
   4251					;	DV.NXD	NON-EX DEVICE
   4252					;	DV.OFL	OFF-LINE
   4253					;	DV.OIR	HARD ERROR (DD.RCK, DD.PCK, DD.SCK)
   4254					;	DV.IOP	I/O IN PROGRESS (READING A CARD)
   4255					;	DV.EOF	E-O-F BUTTON PUSHED
   4256					;	DV.LOG	ERROR LOGGING REQUIRED
   4257					;	DV.HNG	DEVICE HUNG
   4258					;
   4259					;	DD.RCK	READ CHECK
   4260					;	DD.PCK	PICK CHECK
   4261					;	DD.SCK	STACK CHECK
   4262					;	DD.HEM	HOPPER EMPTY
   4263					;	DD.SFL	STACKER FULL
   4264					;
   4265					;-
   4266					;
   4267	013010	042737 	040000 	000000G	SSTSCR:	BIC	#CR.SST,CRSTS	;SAY STATUS SENT ALREADY
   4268	013016	032777 	000004 	000000G	60$:	BIT	#EF.CRS,@CREVFG	;IS STATUS BUFFER AVAILABLE?
   4269	013024	001007 				BNE	10$		;YES-- ASSEMBLE STATUS
   4270	013026					WSIG$S			;NO-- WAIT FOR IT TO BE THERE
	013026	012746 				MOV	(PC)+,-(SP)
	013030	   061 	   001 			.BYTE	49.,1
	013032	104375 				EMT	375
   4271	013034	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ;IF PRIMARY PROTOCOL IS STILL RUNNING
   4272	013042	001365 				BNE	60$		;THEN CHECK IF STILL GOING
   4273					;
   4274					; ASSEMBLE STATUS INTO CRSTBK+0 CRSTBK+2
   4275					;
   4276	013044	012700 	000004G		10$:	MOV	#CRSTBK+4,R0	;GET ADDRESS OF STATUS BLOCK
   4277	013050	005010 				CLR	(R0)		;CLEAR BYTE COUNT WORD(ASSUME NON-EX DEV)
   4278	013052	005040 				CLR	-(R0)		; AND SECOND WORD OF STATUS
   4279	013054	010001 				MOV	R0,R1		;SAVE ADDR OF SECOND WORD
   4280	013056	005040 				CLR	-(R0)		; AND CLEAR FIRST WORD, R0 POINTS TO IT
   4281					;
   4282	013060	032737 	001000 	000000G		BIT	#CR.NXD,CRSTS	;NON-EX DEVICE?
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 51-1
SSTSCR	(SEND CD-11 STATUS TO -10)

   4283	013066	001403 				BEQ	101$		;NO-- GET REAL STATUS
   4284	013070	052710 	000007 			BIS	#DV.NXD!DV.OFL!DV.OIR,(R0) ;YES-- SAY NOT THERE
   4285	013074	000522 				BR	50$		;SEND THIS STATUS
   4286					;
   4287	013076	013703 	000000G		101$:	MOV	@#CDST,R3	;COPY DEVICE STATUS
   4288	013102	032703 	010000 			BIT	#CDSOFL,R3	;CD-11 OFF-LINE?
   4289	013106	001402 				BEQ	11$		;NO-- GO ON
   4290	013110	052710 	000006 			BIS	#DV.OFL!DV.OIR,(R0) ;YES-- SAY SO
   4291					;
   4292	013114	032737 	030000 	000000G	11$:	BIT	#CR.IOP!CR.IOD,CRSTS ;I/O STILL IN PROGRESS?
   4293	013122	001402 				BEQ	12$		;NO
   4294	013124	052710 	000020 			BIS	#DV.IOP,(R0)	;YES-- SAY SO
   4295					;
   4296	013130	032703 	020000 		12$:	BIT	#CDSEOF,R3	;E-O-F BUTTON PUSHED?
   4297	013134	001402 				BEQ	13$		;NO-- GO ON
   4298	013136	052710 	000040 			BIS	#DV.EOF,(R0)	;YES-- SAY EOF
   4299					;
   4300	013142	032737 	002000 	000000G	13$:	BIT	#CR.RHN,CRSTS	;READER HUNG?
   4301	013150	001402 				BEQ	14$		;NO-- GO ON
   4302	013152	052710 	001104 			BIS	#DV.HNG!DV.OIR!DV.LOG,(R0) ;YES-- SAY HUNG
   4303					;
   4304	013156	032703 	003000 		14$:	BIT	#CDSDLT!CDSNXM,R3 ;FATAL ERROR (DATA LATE, NXM)?
   4305	013162	001402 				BEQ	15$		;NO-- GO ON
   4306	013164	052710 	000300 			BIS	#DV.URE!DV.LOG,(R0) ;YES-- SAY SO
   4307					;
   4308	013170	032703 	000200 		15$:	BIT	#CDSRDY,R3	;BUT IS READER READY?
   4309	013174	001451 				BEQ	30$		;NO-- BITS ARE NOT VALID-- GO ON
   4310					;
   4311	013176	013704 	000000G			MOV	@#CDDB,R4	;YES-- GET ERROR BITS TO R4
   4312					;
   4313	013202	032704 	040000 			BIT	#CDBRCK,R4	;READ (PHOTO) CHECK?
   4314	013206	001402 				BEQ	16$		;NO
   4315	013210	052711 	000001 			BIS	#DD.RCK,(R1)	;YES
   4316					;
   4317	013214	032704 	020000 		16$:	BIT	#CDBPCK,R4	;PICK CHECK?
   4318	013220	001402 				BEQ	17$		;NO
   4319	013222	052711 	000002 			BIS	#DD.PCK,(R1)	;YES
   4320					;
   4321	013226	032704 	010000 		17$:	BIT	#CDBSCK,R4	;STACK CHECK?
   4322	013232	001402 				BEQ	18$		;NO
   4323	013234	052711 	000004 			BIS	#DD.SCK,(R1)	;YES
   4324					;
   4325	013240	005711 			18$:	TST	(R1)		;FATAL ERRROR DETECTED?
   4326	013242	001402 				BEQ	19$		;NO-- GO ON
   4327	013244	052710 	000100 			BIS	#DV.LOG,(R0)	;YES-- SAY ERROR LOGGING NEEDED
   4328					;
   4329	013250	032703 	000004 		19$:	BIT	#CDSHEM,R3	;HOPPER EMPTY?
   4330	013254	001402 				BEQ	20$		;NO-- GO ON
   4331	013256	052711 	000010 			BIS	#DD.HEM,(R1)	;YES
   4332					;
   4333	013262	005711 			20$:	TST	(R1)		;ANY ERROR BITS SET?
   4334	013264	001012 				BNE	21$		;YES-- NOT STACKER FULL
   4335	013266	032703 	040000 			BIT	#CDSRCK,R3	;IS THIS A READER CHECK?
   4336	013272	001412 				BEQ	23$		;NO-- CERTAINLY NOT STACKER FULL
   4337	013274	032737 	000400 	000000G		BIT	#CR.NSF,CRSTS	;WE DECIDE IT WASN'T STACKER FULL BEFORE?
   4338	013302	001006 				BNE	23$		;YES-- CAN'T BE STACKER FULL NOW
   4339	013304	052711 	000020 			BIS	#DD.SFL,(R1)	;NO-- READER CHECK & NO ERRORS => STACKER FULL
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 51-2
SSTSCR	(SEND CD-11 STATUS TO -10)

   4340	013310	000403 				BR	22$		;STACKER-FULL-- GO ON
   4341					;
   4342	013312	052737 	000400 	000000G	21$:	BIS	#CR.NSF,CRSTS	;FLAG THAT IT CAN'T BE STACKER FULL
   4343	013320				22$:
   4344	013320				23$:
   4345	013320	012703 	000000G		30$:	MOV	#CDST,R3	;ADDRESS CD CSR
   4346	013324	005721 				TST	(R1)+		;POINT TO FIRST WORD OF DEVICE REGISTERS IN STATUS BLOCK
   4347	013326	012721 	000000C			MOV	#<CDDB+2-CDST>,(R1)+ ;SAVE SIZE OF FOLLOWING BLOCK
   4348	013332	012321 			31$:	MOV	(R3)+,(R1)+	;MOVE A REGISTER
   4349	013334	022701 	000000C			CMP	#CRSTBK+CRSTLN,R1 ;MOVED 'EM ALL?
   4350	013340	101374 				BHI	31$		;NO-- LOOP FOR ALL OF THEM
   4351					;
   4352					; SET UP REGISTERS FOR ..STIN TO SEND BLOCK TO -10:
   4353					;	R0 --	POINTER TO STATUS BLOCK
   4354					;		FIRST WORD IS HEADER: (HIGH BYTE) UNIT # (LOW BYTE) BYTE COUNT OF BLCOK
   4355					;	R1 --	BIT15 (FOR INDIRECT FUNCTION) + FUNCTION CODE (BC.HDS)
   4356					;	R2 --	EVENT FLAG TO SET WHEN BLOCK DONE (EF.CRS)
   4357					;	R3 --	DEVICE CODE (D.CCDR)
   4358					;
   4359	013342	105040 			50$:	CLRB	-(R0)		;HIGH BYTE HEADER: UNIT # (ALWAYS 0)
   4360	013344	112740 	000000G			MOVB	#CRSTLN,-(R0)	;LOW BYTE: BYTE COUNT OF BLOCK (NOT INCLUDING HEADER)
   4361	013350	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ;FUNCTION: HERE IS DEVICE STATUS (INDIRECT FLAVOR)
   4362	013354	012702 	000003 			MOV	#E.FCRS,R2	;EVENT FLAG TO SET WHEN DONE
   4363	013360	012703 	000000G			MOV	#D.CCDR,R3	;DEVICE CODE: CDR (OF COURSE)
   4364	013364	042777 	000004 	000000G		BIC	#EF.CRS,@CREVFG	;CLEAR BUFFER AVAILABLE FLAG
   4365	013372					CALL	..STIN		;SEND TO -10
	013372	004737 	000000G			JSR	PC,..STIN
   4366	013376	103006 				BCC	90$		;OK-- DONE
   4367	013400	052777 	000004 	000000G		BIS	#EF.CRS,@CREVFG	;FAILED-- BUFFER STILL AVAILABLE
   4368	013406	052737 	040000 	000000G		BIS	#CR.SST,CRSTS	;ERROR-- TRY AGAIN LATER
   4369					;
   4370					; ALL DONE
   4371					;
   4372	013414				90$:	RETURN			;ALL DONE FORM SSTSCR
	013414	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 52
INITCR	(INITIALIZE CD-11)

   4374						.SBTTL	INITCR	(INITIALIZE CD-11)
   4375					;
   4376					;+
   4377					;
   4378					;	INITCR IS CALLED FROM TASK INITIALIZATION AND FROM POWER-UP
   4379					; ROUTINE TO RESET THE CD-11.
   4380					;
   4381					;-
   4382					;
   4383	013416	042737 	021000 	000000G	INITCR::BIC	#CR.IOP!CR.NXD,CRSTS ;NO LONGER I/O IN PROGRESS, ASSUME DEVICE EXISTS
   4384	013424	012737 	000400 	000000G		MOV	#CDSPWC,@#CDST	;DO POWER-CLEAR
   4385	013432	052777 	000001 	000000G	CRDCLR:	BIS	#EF.CRC,@CREVFG	;FORCE HUNG CHECK
   4386	013440					RETURN
	013440	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 53
CD-11 DRIVER COMMON SUBROUTINES MODULE

   4388						.SBTTL	CD-11 DRIVER COMMON SUBROUTINES MODULE
   4389					;
   4390					;                             COPYRIGHT (C) 1975, 1978 BY
   4391					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4392					;
   4393					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4394					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4395					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4396					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4397					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4398					;
   4399					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4400					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4401					;       CORPORATION.
   4402					;
   4403					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4404					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4405					;
   4406					;		MODULE: CD-11 DRIVER COMMON SUBROUTINES
   4407					;
   4408					;		VERSION: 01-00
   4409					;
   4410					;		AUTHOR: TOM PORCHER
   4411					;
   4412					;		DATE: 25-AUG-75
   4413					;
   4414					;
   4415					;	THIS MODULE CONTAINS:
   4416					;
   4417					;	1) $CDINT (CD-11 INTERRUPT SERVICE ROUTINE)
   4418					;
   4419					;	2) ..STCR (START CD-11)
   4420					;
   4421					;	3) ..SPCR (STOP CD-11)
   4422					;
   4423					;	4) ..AKCR (READ CARD)
   4424					;
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 54
$CDINT	(CD-11 INTERRUPT SERVICE)

   4426						.SBTTL	$CDINT	(CD-11 INTERRUPT SERVICE)
   4427					;
   4428					;+
   4429					;
   4430					;	$CDINT IS CALLED FROM THE INTERRUPT VECTOR FOR THE CD-11.
   4431					; IT MERELY SAYS THAT I/O IS DONE BY SETTING CR.IOD IF I/O WAS
   4432					; IN PROGRESS (CR.IOP), AND REQUESTS STATUS IF AN ERROR HAS OCCURED.
   4433					;
   4434					;-
   4435					;
   4436	013442	105737 	000000G		$CDINT:: TSTB	@#CDST		;;;CD-11 READY?
   4437	013446	100025 				BPL	90$		;;;NO-- JUST GO AWAY
   4438	013450	032737 	020000 	000000G		BIT	#CR.IOP,CRSTS	;;;YES-- WERE WE I/O IN PROGRESS (READING)?
   4439	013456	001414 				BEQ	10$		;;;NO-- GO ON (SEE IF ERROR)
   4440	013460	042737 	020000 	000000G		BIC	#CR.IOP,CRSTS	;;;YES-- MUST BE DONE NOW
   4441	013466	005737 	000000G			TST	@#CDCC		;;;DID WE READ A CARD?
   4442	013472	001006 				BNE	10$		;;;NO-- MUST BE ERROR-- SEND STATUS NOW
   4443	013474	052737 	010000 	000000G		BIS	#CR.IOD,CRSTS	;;;SO MAKE TASK KNOW WE ARE DONE
   4444					;
   4445	013502	005737 	000000G			TST	@#CDST		;;;WAS THERE AN ERROR?
   4446	013506	100003 				BPL	20$		;;;NO-- GO ON
   4447					;
   4448	013510	052737 	040000 	000000G	10$:	BIS	#CR.SST,CRSTS	;;;YES-- SEND DEVICE STATUS
   4449	013516				20$:	CALL	IODNCR		;;;SAY I/O DONE TO TASK
	013516	004737 	013606'			JSR	PC,IODNCR
   4450					;
   4451					; ALL DONE WITH INTERRUPT
   4452					;
   4453	013522	000137 	000000G		90$:	JMP	..INTX		;;;FINISH OFF INTERRUPT
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 55
..STCR	(START CD-11)

   4455						.SBTTL	..STCR	(START CD-11)
   4456					;
   4457					;+
   4458					;
   4459					;	..STCR IS CALLED FROM THE QUEUED PROTOCOL TASK ON A REQUEST
   4460					; FOR STATUS.  NO OTHER REQUESTS TO THE CD-11 DRIVER ARE MADE THROUGH
   4461					; ..STCR.
   4462					;
   4463					;	THE STATUS IS REQUESTED TO THE CD-11 DRIVER TASK BY SETTING
   4464					; CR.SST AND EF.CRD.
   4465					;
   4466					; CALLING SEQUENCE:
   4467					;	R0 --	POINTER TO THREAD BLOCK (WILL JUST BE DEALLOCATED)
   4468					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4469					;
   4470					; EXIT CONDITIONS:
   4471					;
   4472					;	NO REGISTERS MODIFIED
   4473					;
   4474					;-
   4475					;
   4476						.ENABLE	LSB
   4477	013526				..STCR::
   4478	013526					CALL	..DECN		;DE-ALLOCATE BLOCK
	013526	004737 	000000G			JSR	PC,..DECN
   4479	013532	020227 	000000G			CMP	R2,#CRTBL+0	;THIS CR0?
   4480	013536	001030 				BNE	99$		;NO-- GO AWAY
   4481	013540	052737 	040000 	000000G		BIS	#CR.SST,CRSTS	;YES-- MAKE STATUS HAPPEN
   4482	013546	000417 				BR	IODNCR		; AND MAKE TASK RECOGNIZE IT
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 56
..SPCR	(STOP CD-11)

   4484						.SBTTL	..SPCR	(STOP CD-11)
   4485					;
   4486					;+
   4487					;
   4488					;	..SPCR IS CALLED FROM THE QUEUED PROTOCOL TASK TO FLUSH
   4489					; INPUT FROM THE CD-11.  ANY I/O THAT IS IN PROGRESS IS STOPPED,
   4490					; AND NO FURTHER DATA IS SENT TO THE -10.
   4491					;
   4492					; CALLING SEQUENCE:
   4493					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4494					;
   4495					; EXIT CONDITIONS:
   4496					;
   4497					; NO REGISTERS MODIFIED
   4498					;
   4499					;-
   4500					;
   4501	013550	020227 	000000G		..SPCR:: CMP	R2,#CRTBL+0	;THIS CR0?????
   4502	013554	001021 				BNE	99$		;NO-- GO AWAY
   4503	013556					CALL	INITCR		;RESET THE CD-11
	013556	004737 	013416'			JSR	PC,INITCR
   4504	013562	042737 	034000 	000000G		BIC	#CR.ACK!CR.IOD!CR.IOP,CRSTS ;SAY WE ARE HAPPY
   4505	013570					RETURN
	013570	000207 				RTS	PC
CRDRV	(CD-11 DRIVER FOR RSX10	MACRO M1110  03-OCT-79 10:55  PAGE 57
..AKCR	(READ CARD)

   4507						.SBTTL	..AKCR	(READ CARD)
   4508					;
   4509					;+
   4510					;
   4511					;	..AKCR IS CALLED FROM THE QUEUED PROTOCOL TASK ON AN ACKNOWLEDGE
   4512					; REQUEST FROM THE -10.  THIS IMPLIES THAT A CARD SHOULD BE READ.
   4513					;
   4514					; CALLING SEQUENCE:
   4515					;	R2 --	POINTER TO CRTBL (MUST BE CRTBL+0)
   4516					;
   4517					; EXIT CONDITIONS:
   4518					;
   4519					; NO REGISTERS MODIFIED
   4520					;
   4521					;-
   4522					;
   4523	013572	020227 	000000G		..AKCR:: CMP	R2,#CRTBL+0	;IS THIS CR0???
   4524	013576	001010 				BNE	99$		;NO-- GIVE UP
   4525	013600	052737 	004000 	000000G		BIS	#CR.ACK,CRSTS	;YES-- SAY TO READ A CARD
   4526					;	BR	IODNCR		;SET I/O DONE TO SAY SOMETHING TO DO TO TASK
   4527					;
   4528					; HERE TO SET I/O DONE (EF.CRD) TO CR TASK TO INDICATE SOMETHING TO DO.
   4529					;  ALSO SIGNIFICANT EVENT TO CAUSE CR TASK TO RUN.
   4530					;
   4531	013606	052777 	000002 	000000G	IODNCR:	BIS	#EF.CRD,@CREVFG	;SET EVENT FLAG
   4532	013614					CALL	..DSEV		; AND MAKE SIGN. EVENT TO WAKE TASK
	013614	004737 	000000G			JSR	PC,..DSEV
   4533	013620				99$:	RETURN			; FROM IODNCR
	013620	000207 				RTS	PC
   4534						.DSABLE	LSB
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 58
..AKCR	(READ CARD)

   4536						.TITLE	INSTAL -- TASK INSTALLER FOR RSX-20F
   4537						.SBTTL	TITLE PAGE
   4538						.IDENT	/010020/
   4539					;
   4540					;                             COPYRIGHT (C) 1975, 1978 BY
   4541					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
   4542					;
   4543					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
   4544					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
   4545					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
   4546					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
   4547					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
   4548					;
   4549					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
   4550					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
   4551					;       CORPORATION.
   4552					;
   4553					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
   4554					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
   4555					;
   4556					;		MODULE: INSTALL TASK FOR RSX-20F
   4557					;
   4558					;		VERSION: 10-01
   4559					;
   4560					;		AUTHOR: TOM PORCHER
   4561					;
   4562					;		DATE: 1-OCT-75
   4563					;
   4564					;
   4565					;	THIS MODULE CONTAINS:
   4566					;
   4567					;	-- CODE TO INSTALL A TASK IN RSX-20F
   4568					;
   4569					; MODIFICATIONS:
   4570					;
   4571					;	NO.	DATE		PROGRAMMER	PURPOSE
   4572					;	---	----		----------	-------
   4573					;	001	14-MAR-77	R. BELANGER	DEFINE THE END OF "INSTAL"
   4574					;						TO ALLOW DYNAMIC ALLOCATION
   4575					;						OF FREE POOL SPACE
   4576					;	002	30-MAY-78	R. BELANGER	MODIFY INSTAL TO MOUNT BOTH
   4577					;						DX0: AND DX1: AS SY:
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 59
MACROS AND PARAMETERS

   4579						.SBTTL	MACROS AND PARAMETERS
   4580					;
   4581					; SETUP ASSEMBLY CONDITIONS
   4582					;
   4583						.ENABLE	AMA
   4584						.LIST	MEB
   4585					;
   4586					; MISC. MCALL'S
   4587					;
   4588					.MCALL QIOSY$,ALUN$S,QIOW$S,RCVX$S,RQST$S,WSIG$S,.INH0,.ENB0,CALL,RETURN,PUSH,POP,.STKM,$DEF
   4589	013622					$DEF
   4590	013622					QIOSY$
   4591					;
   4592					; MACROS
   4593					;
   4594					.MACRO	MSG	A,B
   4595						.PSECT	TEXT
   4596					$$$=.
   4597						 .ASCIZ	\B\
   4598						.PSECT
   4599						 PUSH	#$$$
   4600						CALL	TYPMSG
   4601					.ENDM	MSG
   4602					;
   4603					.MACRO	ERR	A,B
   4604						MSG	<A>,<B>
   4605					.ENDM	ERR
   4606					;
   4607					.MACRO	ERRF	A,B
   4608						ERR	<A>,<B>
   4609						 BR	CLSFIL
   4610					.ENDM	ERRF
   4611					;
   4612					.MACRO	ERRN	A,B
   4613						ERR	<A>,<B>
   4614						 BR	RETNOD
   4615					.ENDM	ERRN
   4616					;
   4617					; PARAMETERS
   4618					;
   4619		000062 			DEFPRI=	50.			;DEFAULT TASK PRIORITY
   4620					;
   4621		000050 			U.SZ=50				;LOCAL DEF OF U.SZ
   4622		000001 			SF.TA=1		;LOCAL DEF OF TASK ACTIVE
   4623		040000 			SF.IR=40000	;LOCAL DEF FOR INSTAL REQUESTED
   4624					; LOGICAL UNIT NUMBER ASSIGNMENTS
   4625					;
   4626		000001 			CTYLUN=	1			;FOR I/O TO THE CTY **** MUST BE UNIT 1 ****
   4627		000002 			TSKLUN=	2			;FOR I/O TO TASK IMAGE FILE
   4628					;
   4629					; EVENT FLAGS
   4630					;
   4631		000001 			E.FQIO=	1			;WAIT FOR QUEUE I/O TO COMPLETE
   4632		000001 			 EF.QIO=BIT0
   4633					;
   4634					; HEADER BLOCK DEFINITIONS
   4635					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 59-1
MACROS AND PARAMETERS

   4636		000076 			H.IPC=	76			;INITIAL PC
   4637		000100 			H.ISP=	100			;INITIAL SP
   4638		000130 			H.NLUN=	130			;NUMBER OF LUNS FOR TASK
   4639		000132 			H.LUN=	132			;START OF LUN TABLE AREA
   4640					;
   4641					; LABEL BLOCK DEFINITIONS
   4642					;
   4643		000000 			L$BTSK=	0			;TASK NAME IN RAD50 (TWO WORDS)
   4644		000004 			L$BPAR=	4			;PARTITION NAME IN RAD50 (TWO WORDS)
   4645		000010 			L$BFLG=	10			;FLAG WORD
   4646		000012 			L$BPRI=	12			;DEFAULT TASK RUN PRIORITY
   4647		000014 			L$BLDZ=	14			;LOAD SIZE OF TASK IMAGE
   4648		000016 			L$BMXZ=	16			;MAX SIZE OF TASK
   4649		000020 			L$BSA=	20			;BASE ADDRESS OF TASK
   4650		000022 			L$BHRB=	22			;HEADER RELATIVE BLOCK IN TASK FILE
   4651		000024 			L$BBLK=	24			;# BLOCKS IN LABEL GROUP
   4652					;
   4653					; ACCESS CONTROL BITS
   4654					;
   4655		000200 			AC.ENA=	BIT7			;ENABLE ACCESS
   4656					;
   4657					; FILENAME BLOCK OFFSETS
   4658					;
   4659		000000 			N.FID=	0			;FILE-ID / SEQUENCE #
   4660		000006 			N.FNAM=	6			;FILENAME IN RADIX 50 (3 WORDS)
   4661		000014 			N.FTYP=	14			;FILE TYPE IN RADIX 50
   4662		000016 			N.FVER=	16			;FILE VERSION NUMBER
   4663		000020 			N.STAT=	20			;FLAGS
   4664		000022 			N.NEXT=	22			;CONTEXT SAVE FOR .FIND
   4665		000024 			N.DID=	24			;DIRECTORY ID
   4666		000034 			 S.DRFN=34			;WORDS OF FILE-NAME BLOCK USED FOR IO.FNA
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 60
TASK DATA

   4668						.SBTTL	TASK DATA
   4669					;
   4670					; TASK HEADER AND STACK
   4671					;
   4672	013622				INSHD::	.STKM	0,0,0,0,0,0,40,INSTAL,174000,INSTK
	013670	000000 	000000 	000000 		.WORD	0,0,0,0
	013676	000000
	013716	174000 	014442'	014102'		.WORD	174000,INSTAL,INSTK
	013752	000005 				.WORD	5
	013754	000000G				.WORD	TTPEN
	013756	000000 				.WORD	0
	013760	000000 				.WORD	0
	013762	000000 				.WORD	0
	013764	000000 				.WORD	0
	013766	000000 				.WORD	0
	013770	000000 				.WORD	0
	013772	000000 				.WORD	0
	013774	000000 				.WORD	0
	013776	000000 				.WORD	0
	014000	000000 				.WORD	0
	014102	000000 				.WORD	0
	014104	000000 				.WORD	0
	014106	000000 				.WORD	0
	014110	000000 				.WORD	0
	014112	000000 				.WORD	0
	014114	000000 				.WORD	0
	014116	014442'				.WORD	INSTAL
	014120	174000 				.WORD	174000
   4673					;
   4674	014122					.BLKB	40
   4675	014162				EXSP:
   4676					;
   4677					; LOCAL DATA
   4678					;
   4679	014162	   000 			DXFLAG:	.BYTE	0		; +++002 SECOND DX: MOUNT FLAG
   4680	014163	   000 			SYFLAG:	.BYTE	0		; +++002 SY: MOUNTED FLAG
   4681	014164				RCVBLK:	.BLKW	2		;RECEIVE DATA BUFFER: TRASH
   4682	014170				REQBLK:	.BLKW	13.		;REQUEST BLOCK FROM EXEC
   4683		014202'			STDADR=REQBLK+12		;ADDRESS OF OUR SYSTEM TASK DIRECTORY ENTRY
   4684	014222				PUDADR:	.BLKW	1		;PUD ENTRY ADDRESS OF DEVICE WHERE TASK FILE WAS FOUND
   4685	014224				LBLBLK:	.BLKW	1		;CURRENT VIRTUAL BLOCK NUMBER TO READ LABEL GROUP
   4686	014226				LBLNUM:	.BLKW	1		;NUMBER OF BLOCKS IN LABEL GROUP
   4687	014230				LBLBUF:	.BLKW	1		;ADDRESS OF LABEL BUFFER
   4688	014232				LBLBFE:	.BLKW	1		;ADDRESS OF END OF BUFFER (LBLBUF)+512.
   4689	014234				HDRBLK:	.BLKW	1		;CURRENT VIRTUAL BLOCK NUMBER TO READ HEADER
   4690	014236				HDRBUF:	.BLKW	1		;ADDRESS OF HEADER BLOCK BUFFER
   4691	014240				HDRBFE:	.BLKW	1		;ADDRESS OF END OF HEADER BUFFER
   4692	014242				FILBLK:	.BLKB	S.DRFN		;FILE-NAME BLOCK FOR TASK IMAGE FILE
   4693	014276				FILADR:	.BLKW	2		;STATISTISTICS BLOCK: DISK ADDRESS
   4694	014302				QIOSTS:	.BLKW	2		;I/O STATUS
   4695	014306				TYPBUF:	.BLKB	60.		;BUFFER FOR CTY OUTPUT
   4696					;
   4697					; PURE DATA
   4698					;
   4699	014402	   367 			ATCBLK:	.BYTE	-9.		;ATTIBUTE CONTROL: STATISTICS BLOCK, READ
   4700	014403	   004 				.BYTE	4.		;4 BYTES OF INFO
   4701	014404	014276'				.WORD	FILADR		;WHERE TO INFO TO
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 60-1
TASK DATA

   4702	014406	   000 	   000 			.BYTE	0,0		;END OF ATTRIBUTE CONTROL BLOCK
   4703					;
   4704	014410	   001 			MNTBLK:	.BYTE	1		;ACP CONTROL: MOUNT FUNCTION
   4705	014411	   001 				.BYTE	1		;STRING LENGTH: 1
   4706	014412	014414'				.WORD	1$		;ADDRESS OF STRING
   4707	014414	   072 			1$:	.ASCII	/:/
   4708						.EVEN
   4709					;
   4710					; DEVICE CONVERSION TABLE
   4711					;
   4712	014416	   124 	   111 	   124 	CNVTBL:	.ASCII	/TI//TT/
	014421	   124
   4713	014422	   103 	   117 	   124 		.ASCII	/CO//TT/
	014425	   124
   4714	014426	   103 	   111 	   124 		.ASCII	/CI//TT/
	014431	   124
   4715	014432	   103 	   114 	   114 		.ASCII	/CL//LP/
	014435	   120
   4716	014436	000000 	000000 			.WORD	0,0
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 61
FIND THE TASK FILE

   4718						.SBTTL	FIND THE TASK FILE
   4719					;
   4720					;
   4721					; HERE ON A REQUEST TO INSTALL A TASK FROM THE EXECUTIVE
   4722					;
   4723					; A SEND DATA PACKET IS SENT TO THIS TASK .INST. IN REQUEST
   4724					;  FOR A TASK WHICH IS NOT CURRENTLY INSTALLED. THE PACKET
   4725					;  HAS THE FOLLOWING FORMAT:
   4726					;
   4727					; WORD 0	TASK NAME IN RADIX 50 FORMAT
   4728					;      1	 (SECOND HALF)
   4729					;      2	PARTITION NAME IN RADIX 50 (IF SPECIFIED, OTHERWISE 0)
   4730					;      3	 (SECOND HALF)
   4731					;      4	RUN PRIORITY (IF SPECIFIED, OTHERWISE 0)
   4732					;	5	STD ADDRESS
   4733					;
   4734					;
   4735					; GET THE PACKET, OR EXIT IF NOTHING TO DO
   4736					;
   4737	014442				INSTAL::
   4738	014442	012706 	014162'			MOV	#EXSP,SP	;;ADD EXTRA STACK SPACE
   4739	014446					RCVX$S	,#RCVBLK	;;GET THE REQUEST OR EXIT IF NONE
	014446	012746 	014164'			MOV	#RCVBLK,-(SP)
	014452	005046 				CLR	-(SP)
	014454	005046 				CLR	-(SP)
	014456	012746 				MOV	(PC)+,-(SP)
	014460	   023 	   004 			.BYTE	19.,$$$T1
	014462	104375 				EMT	375
   4740	014464	103766 				BCS	INSTAL		;OOPS-- TRY AGAIN
   4741					;
   4742	014466					CALL	CLRBUF		; AND NO BUFFERS ALLOCATED
	014466	004737 	016236'			JSR	PC,CLRBUF
   4743	014472	105037 	014162'			CLRB	DXFLAG		; +++002 RESET THE RX01 FLAG
   4744					;
   4745					; SETUP TO LOOK ON DEVICE SY FOR THE TASK FIRST
   4746					;
   4747	014476	012705 	177730G			MOV	#.PUDBA-U.SZ,R5	;POINT TO START OF PUD'S TO SCAN IF NOT ON SY
   4748									;MINUS 1 FOR SY
   4749	014502	012700 	054523 			MOV	#"SY,R0		; +++002 DEVICE NAME (U.DN) TO R0
   4750	014506	005001 				CLR	R1		; +++002 UNIT NUMBER (U.UN) TO R1
   4751					;
   4752	014510				MNTSYD:				; +++002
   4753	014510					ALUN$S	#TSKLUN,R0,R1	; +++002 ASSIGN DEVICE SY0 TO TASK LUN
	014510	010146 				MOV	R1,-(SP)
	014512	010046 				MOV	R0,-(SP)
	014514	012746 	000002 			MOV	#TSKLUN,-(SP)
	014520	012746 				MOV	(PC)+,-(SP)
	014522	   007 	   004 			.BYTE	7.,4
	014524	104375 				EMT	375
   4754	014526	103557 				BCS	TASKNF		;NO DICE-- JUST TRY PUD SCAN
   4755					;
   4756	014530	013704 	000000G			MOV	.CRTSK,R4	;GOT IT-- GET ADDRESS
   4757	014534	016404 	000000G			MOV	A.HA(R4),R4	; OF OUR HEADER TO
   4758	014540	016404 	000136 			MOV	H.LUN+<4*<TSKLUN-1>>+0(R4),R4 ; FIND PUD ADDRESS OF SY
   4759	014544	016404 	000000G			MOV	U.RP(R4),R4	; BUT GET THE REAL DEVICE PUD ENTRY
   4760	014550	010437 	014222'			MOV	R4,PUDADR	;SAVE THIS PUD ADDRESS IN CASE WE DO FIND THE TASK
   4761	014554	005764 	000000G			TST	U.VA(R4)	;IS SY MOUNTED?
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 61-1
FIND THE TASK FILE

   4762	014560	001031 				BNE	SYMNTD		; +++002 YES -- DO THE SECOND FLOPPY CHECK
   4763					;
   4764					; SY IS NOT MOUNTED.  WE MUST MOUNT IT BEFORE WE CAN FIND ANYTHING
   4765					;
   4766					; NOTE--
   4767					;
   4768					;	IF THE SY: DEVICE BEING MOUNTED IS A FLOPPY (DX:) INSTAL WILL
   4769					;	ATTEMPT TO MOUNT THE OTHER UNIT AS WELL.
   4770					;
   4771	014562	012701 	014170'			MOV	#RCVBLK+4,R1	;GET A SCRATCH AREA
   4772	014566	012741 				MOV	(PC)+,-(R1)	;STORE
   4773	014570	003310 				 .RAD50	/ACP/		; THE NAME OF AN ACP
   4774	014572	016441 	000000G			MOV	U.DACP(R4),-(R1) ;  AND THE NAME OF THE ACP FOR THIS DEVICE
   4775	014576					CALL	..FSTD		;FIND THE STD ENTRY ADDRESS OF THE ACP
	014576	004737 	000000G			JSR	PC,..FSTD
   4776	014602	010264 	000000G			MOV	R2,U.ACP(R4)	;STORE THE STD ADDRESS OF THE ACP
   4777					;
   4778	014606	012700 	014010 			MOV	#IO.APV,R0	;SET TO DO PRIVILEGED ACP CONTROL
   4779	014612	005001 				CLR	R1		;NO FILE-ID
   4780	014614	012702 	014410'			MOV	#MNTBLK,R2	;ACP CONTROL FUNCTION BLOCK TO MOUNT
   4781	014620	005003 				CLR	R3		;NO ACCESS
   4782	014622	005004 				CLR	R4		;NO FILE-NAME BLOCK
   4783	014624					CALL	FILQIO		;DO A MOUNT ON SY
	014624	004737 	016536'			JSR	PC,FILQIO
   4784	014630	103005 				BCC	SYMNTD		;SUCCESS-- SAY WE DID THE MOUNT SO WE DON'T SCARE ANYBODY
   4785	014632					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
	014632	012746 	000000'			MOV	#$$$,-(SP)
	014636	004737 	016616'			JSR	PC,TYPMSG
   4786	014642	000511 				BR	TASKNF		;CERTAINLY NOT FOUND
   4787					;
   4788	014644				SYMNTD:
   4789	014644	013704 	014222'			MOV	PUDADR,R4	; +++002 PUD ADDRESS TO R4
   4790	014650	016400 	000000G			MOV	U.DN(R4),R0	; +++002 DEVICE NAME TO R0
   4791	014654	016401 	000000G			MOV	U.UN(R4),R1	; +++002 UNIT NUMBER TO R1
   4792	014660	022700 	054104 			CMP	#"DX,R0		; +++002 DID WE TRY TO MOUNT A FLOPPY??
   4793	014664	001011 				BNE	SYMNT1		; +++002 NO -- GO ON
   4794	014666	105737 	014162'			TSTB	DXFLAG		; +++002 YES -- HAVE WE DONE BOTH??
   4795	014672	001006 				BNE	SYMNT1		; +++002 YES -- GO ON
   4796	014674	105237 	014162'			INCB	DXFLAG		; +++002 NO -- MARK SECOND TIME AROUND
   4797	014700	005201 				INC	R1		; +++002 SET UP FOR "OTHER" FLOPPY
   4798	014702	042701 	177776 			BIC	#^C1,R1		; +++002 SO
   4799	014706	000700 				BR	MNTSYD		; +++002 AND DO IT...
   4800						;
   4801	014710				SYMNT1:				; +++002
   4802	014710	105737 	014163'			TSTB	SYFLAG		; +++002 SY: ALREADY MOUNTED??
   4803	014714	001006 				BNE	FNDFIL		; +++002 YES -- GO ON
   4804	014716					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 M1110  03-OCT-79 10:55  PAGE 61-2
FIND THE TASK FILE

	014716	012746 	000020'			MOV	#$$$,-(SP)
	014722	004737 	016616'			JSR	PC,TYPMSG
   4805	014726	105237 	014163'			INCB	SYFLAG		; +++002 MARK MOUNT DONE
   4806					;
   4807					; SET UP FILENAME BLOCK TO LOOK FOR [5,5] DIRECTORY IN MFD
   4808					;
   4809	014732				FNDFIL:
   4810	014732	012702 	014250'			MOV	#FILBLK+N.FNAM,R2 ;POINT TO FILE-NAME BLOCK
   4811	014736	012712 				MOV	(PC)+,(R2)	;SET FILENAME TO
   4812	014740	140123 				 .RAD50	/005/		; 005005
   4813	014742	012222 				MOV	(R2)+,(R2)+	;  BOTH HALVES
   4814	014744	005022 				CLR	(R2)+		;ONLY SIX CHARS
   4815	014746	012722 				MOV	(PC)+,(R2)+	;SET TYPE TO DIRECTORY
   4816	014750	015172 				 .RAD50	/DIR/		; FILE
   4817	014752	005022 				CLR	(R2)+		;VERSION, DON'T CARE
   4818	014754	005022 				CLR	(R2)+		;NO FLAGS
   4819	014756	005022 				CLR	(R2)+		;UNKOWN STUFF
   4820	014760	012712 	177777 			MOV	#-1,(R2)	;DIRECTORY ID:
   4821	014764	012222 				MOV	(R2)+,(R2)+	; (-1,-1) IS MFD
   4822	014766	012722 				MOV	(PC)+,(R2)+	;ALSO SET OWNER TO US
   4823	014770	   005 	   005 			 .BYTE	5,5		;THE UIC
   4824					;
   4825	014772					CALL	FILFNA		;LOOK UP DIRECTORY FOR [5,5]
	014772	004737 	016366'			JSR	PC,FILFNA
   4826	014776	103433 				BCS	TASKNF		;GIVE UP NOW IF NO DIRECTORY FOR US
   4827					;
   4828					; SETUP FILE-NAME BLOCK TO <TASK-NAME>.TSK[5,5]
   4829					;
   4830	015000	012701 	014170'			MOV	#REQBLK,R1	;ADDRESS REQUEST BLOCK
   4831	015004	012702 	014250'			MOV	#FILBLK+N.FNAM,R2 ; AND FILE-NAME BLOCK FOR LOOKUP
   4832	015010	021127 				CMP	(R1),(PC)+	;IS THIS
   4833	015012	131574 				 .RAD50	/.../		; AN MCR FUNCTION TASK?
   4834	015014	001004 				BNE	20$		;NO-- JUST LOOKUP THE TASK NAME
   4835	015016	005721 				TST	(R1)+		;YES-- SKIP THE DOTS
   4836	015020	012122 				MOV	(R1)+,(R2)+	;COPY THE LAST THREE CHARACTERS
   4837	015022	005022 				CLR	(R2)+		; AS THE WHOLE NAME
   4838	015024	000402 				BR	25$		;PROCEED.
   4839					;
   4840	015026				20$:
   4841	015026	012122 				MOV	(R1)+,(R2)+	;COPY TASK NAME
   4842	015030	012122 				MOV	(R1)+,(R2)+	; AS FILE NAME
   4843	015032				25$:
   4844	015032	005022 				CLR	(R2)+		;ONLY SIX CHARACTERS
   4845	015034	012722 				MOV	(PC)+,(R2)+	;SET FILE TYPE
   4846	015036	100003 				 .RAD50	/TSK/		; TO A TASK FILE
   4847	015040	005022 				CLR	(R2)+		;NO VERSION CARE
   4848	015042	005022 				CLR	(R2)+		;NO FLAGS
   4849	015044	005022 				CLR	(R2)+		;NO NOTHING
   4850	015046	012701 	014242'			MOV	#FILBLK+N.FID,R1 ;POINT TO FILE-ID OF DIRECTORY
   4851	015052	012122 				MOV	(R1)+,(R2)+	;COPY FILE-ID
   4852	015054	012122 				MOV	(R1)+,(R2)+	; SEQ #
   4853	015056	012122 				MOV	(R1)+,(R2)+	; OWNER
   4854					;
   4855					; DO A FIND FILE IN DIRECTORY FUNCTION TO GET FILE ID
   4856					;
   4857	015060					CALL	FILFNA		;FIND THE TASK (IF IT'S THERE)
	015060	004737 	016366'			JSR	PC,FILFNA
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 61-3
FIND THE TASK FILE

   4858	015064	103051 				BCC	TSKFND		;FOUND FILE-- GO READ IT AND CHECK IT OUT
   4859					;
   4860					; THE TASK FILE WAS NOT FOUND ON THIS DEVICE.  CONTINUE TO SCAN PUD
   4861					;  FOR ALL FILES-11 DEVICES SUCH THAT WE FIND THE TASK.
   4862					;
   4863	015066				TASKNF:
   4864	015066	062705 	000050 			ADD	#U.SZ,R5	;BUMP TO NEXT PUD ENTRY
   4865	015072	020527 	000000G			CMP	R5,#.PUDEA	;ARE WE AT THE END OF THE PUD?
   4866	015076	103027 				BHIS	TNFERR		;YES-- TASK NOT FOUND
   4867	015100	026505 	000000G			CMP	U.RP(R5),R5	;THIS DEVICE REDIRECTED?
   4868	015104	001370 				BNE	TASKNF		;YES-- WE WILL FIND THE REAL DEVICE
   4869	015106	132765 	000000G	000000G		BITB	#UF.TL,U.FB(R5)	;TASK LOADS ALLOWED FROM THIS DEVICE?
   4870	015114	001764 				BEQ	TASKNF		;NO-- DON'T EVEN TRY
   4871	015116	005765 	000000G			TST	U.VA(R5)	;VOLUME MOUNTED?
   4872	015122	001761 				BEQ	TASKNF		;NO-- DON'T TRY TO FIND FILE
   4873					;
   4874	015124					ALUN$S	#TSKLUN,U.DN(R5),U.UN(R5) ;YES-- ASSIGN TH CURRENT DEVICE TO US
	015124	016546 	000000G			MOV	U.UN(R5),-(SP)
	015130	016546 	000000G			MOV	U.DN(R5),-(SP)
	015134	012746 	000002 			MOV	#TSKLUN,-(SP)
	015140	012746 				MOV	(PC)+,-(SP)
	015142	   007 	   004 			.BYTE	7.,4
	015144	104375 				EMT	375
   4875	015146	103747 				BCS	TASKNF		;THIS SHOULD REALLY NEVER HAPPN
   4876	015150	010537 	014222'			MOV	R5,PUDADR	;OK-- SAVE THIS PUD ADDRESS IN CASE WE FIND THE FILE
   4877	015154	000666 				BR	FNDFIL		;OK-- GO LOOK FOR THE TASK FILE
   4878					;
   4879	015156				TNFERR:
   4880	015156					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
	015156	012746 	000033'			MOV	#$$$,-(SP)
	015162	004737 	016616'			JSR	PC,TYPMSG
   4881	015166	000137 	016072'			JMP	RETNOD		;GIVE UP
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 62
INITIALIZE TASK FILE

   4883						.SBTTL	INITIALIZE TASK FILE
   4884					;
   4885					; FILE ERRORS END UP HERE, GOING ON THERE WAY TO THERE
   4886					;
   4887	015172	000137 	016056'		FILERA:	JMP	FILERR		;OOPS
   4888					;
   4889					; ONE OF THE NODE/BUFFER REQUESTS FAILED-- GIVE ALL OF THEM BACK AND WAIT
   4890					;
   4891	015176				BUFAIL:	CALL	RETBUF		;RETURN ALL BUFFERS
	015176	004737 	016202'			JSR	PC,RETBUF
   4892	015202					WSIG$S			;WAIT FOR FREE
	015202	012746 				MOV	(PC)+,-(SP)
	015204	   061 	   001 			.BYTE	49.,1
	015206	104375 				EMT	375
   4893					;
   4894					; HERE WHEN A TASK FILE FOUND
   4895					;
   4896					; GET TWO BUFFERS FOR THE HEADER AND LABEL BLOCKS
   4897					;
   4898	015210	012700 	000000G		TSKFND:	MOV	#.BGBUF,R0	;POINT TO BIG FREE SPACE
   4899	015214	012701 	001000 			MOV	#512.,R1	;SET TO GET A BLOCK
   4900	015220					CALL	..ALC2		;GET ONE
	015220	004737 	000000G			JSR	PC,..ALC2
   4901	015224	103764 				BCS	BUFAIL		;FAILED-- RELEASE NODE AND WAIT
   4902	015226	010037 	014230'			MOV	R0,LBLBUF	;OK-- STORE THE ADDRESS FOR LABEL BLOCK BUFFER
   4903	015232	060100 				ADD	R1,R0		;GET END ADDRESS, TOO
   4904	015234	010037 	014232'			MOV	R0,LBLBFE	;SAVE THAT AS END OF BLOCK
   4905	015240	012700 	000000G			MOV	#.BGBUF,R0	;POINT TO BIG FREE LIST HEAD
   4906					;
   4907	015244					CALL	..ALC2		;GET A HEADER BUFFER, TOO
	015244	004737 	000000G			JSR	PC,..ALC2
   4908	015250	103752 				BCS	BUFAIL		;NONE-- GIVE IT ALL AWAY
   4909	015252	010037 	014236'			MOV	R0,HDRBUF	;GOT IT-- SAVE ADDRESS OF BLOCK
   4910	015256	060100 				ADD	R1,R0		;GET END, TOO
   4911	015260	010037 	014240'			MOV	R0,HDRBFE	;SAVE THE END OF HEADER BUFFER
   4912					;
   4913					; DO AN ACCESS FOR READ, WRITE ON THE TASK FILE THAT WE FOUND
   4914					;
   4915	015264	012700 	007000 			MOV	#IO.ACW,R0	;DO AN ACCESS FOR READ,WRITE
   4916	015270	012701 	014242'			MOV	#FILBLK+N.FID,R1 ;FILE BLOCK NOW HAS FILE-ID, SEQ# IN IT
   4917	015274	012702 	014402'			MOV	#ATCBLK,R2	;ATTRRIBUTE CONTROL BLOCK TO GET DISK ADDR OF FILE
   4918	015300	012703 				MOV	(PC)+,R3	;ENABLE
   4919	015302	   000 	   200 			 .BYTE	0,AC.ENA	; ACCESS
   4920	015304	005004 				CLR	R4		;NO FILE-NAME BLOCK NOW
   4921	015306					CALL	FILQIO		;DO THE ACCESS
	015306	004737 	016536'			JSR	PC,FILQIO
   4922	015312	103727 				BCS	FILERA		;NO DICE-- GIVE UP
   4923					;
   4924					; READ THE FIRST LABEL BLOCK AND THE FIRST BLOCK OF THE TASK HEADER
   4925					;
   4926	015314	005037 	014224'			CLR	LBLBLK		;START WITH BLOCK 0 (WILL BUMP TO VBN 1)
   4927	015320					CALL	REDLBL		;READ THE LABEL BLOCK
	015320	004737 	016464'			JSR	PC,REDLBL
   4928	015324	103722 				BCS	FILERA		;ERROR-- REPORT IT
   4929					;
   4930	015326	016137 	000022 	014234'		MOV	L$BHRB(R1),HDRBLK ;GET FIRST BLOCK OF HEADER
   4931	015334					CALL	REDHDR		;READ THE FIRST BLOCK OF THE HEADER
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 62-1
INITIALIZE TASK FILE

	015334	004737 	016422'			JSR	PC,REDHDR
   4932	015340	103714 				BCS	FILERA		;THAT'S-A-NO-GOOD
   4933					;	BR	SETSTD		;OK-- SET UP THE STD
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 63
SETUP STD ENTRY

   4935						.SBTTL	SETUP STD ENTRY
   4936					;
   4937					; WE HAVE THE LABEL BLOCK OF THE TASK FILE AND THE FIRST HEADER BLOCK
   4938					;	R1 --	ADDRESS OF LABEL BLOCK BUFFER
   4939					;	R2 --	ADDRESS OF HEADER BLOCK BUFFER
   4940					;
   4941	015342	013704 	014202'		SETSTD:	MOV	STDADR,R4	;ADDRESS OUR NEW-FOUND STD
   4942					;
   4943	015346	012703 	014174'			MOV	#REQBLK+4,R3	;POINT TO THE REQUEST INFO BLOCK
   4944	015352	022424 				CMP	(R4)+,(R4)+	;MOVE OVER NAME
   4945	015354	022121 				CMP	(R1)+,(R1)+	;(L$BTSK+0) (L$BTSK+2) SKIP OVER TASK NAME IN LABEL BLOCK
   4946					;
   4947					; FIND WHICH PARTITION TO INSTALL THE TASK INTO
   4948					; IF REQUEST DID NOT SPECIFY ONE, USE THE ONE SPECIFIED IN THE TASK FILE
   4949					;
   4950	015356	005713 				TST	(R3)		;PARTITION SPECIFIED IN REQUEST?
   4951	015360	001001 				BNE	20$		;YES-- LOOK FOR THAT ONE
   4952	015362	010103 				MOV	R1,R3		;NO-- (L$BPAR) USE PARTITION FROM TASK FILE
   4953					;
   4954					; FIND THE PARTITION WHERE WE BELONG
   4955					;
   4956	015364	022121 			20$:	CMP	(R1)+,(R1)+	;(L$BPAR+0) (L$BPAR+2) SKIP OVER PARTITION NAME IN LABEL
   4957	015366	012705 	000000G			MOV	#.TPDBA,R5	;START AT BEGINNING OF THE TASK PARTITION DIRECTORY
   4958					;
   4959	015372	026513 	000000G		21$:	CMP	T.PN+0(R5),(R3)	;FIRST HALF OF NAME MATCH?
   4960	015376	001004 				BNE	25$		;NO-- GO ON TO NEXT ENTRY
   4961	015400	026563 	000002G	000002 		CMP	T.PN+2(R5),2(R3) ;YES-- SECOND HALF MATCH?
   4962	015406	001432 				BEQ	PARFND		;YES-- WE FOUND THE PARTITION
   4963					;
   4964	015410	062705 	000000G		25$:	ADD	#T.SZ,R5	;NO-- BUMP TO NEXT ENTRY IN TPD
   4965	015414	020527 	000000G			CMP	R5,#.TPDEA	;ARE WE AT THE END OF THE DIRECTORY?
   4966	015420	103764 				BLO	21$		;NO-- KEEP LOOKING FOR OUR PARTITION
   4967	015422	010324 				MOV	R3,(R4)+	;YES-- PARTITION NOT FOUND-- SAVE ADDR OF NAME FOR ERR
   4968	015424					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
	015424	012746 	000052'			MOV	#$$$,-(SP)
	015430	004737 	016616'			JSR	PC,TYPMSG
	015434	000416 				 BR	CLSFIL
   4969					;
   4971	015436				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
	015436	012746 	000076'			MOV	#$$$,-(SP)
	015442	004737 	016616'			JSR	PC,TYPMSG
	015446	000411 				 BR	CLSFIL
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 63-1
SETUP STD ENTRY

   4973					;
   4974	015450				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
	015450	012746 	000125'			MOV	#$$$,-(SP)
	015454	004737 	016616'			JSR	PC,TYPMSG
	015460	000404 				 BR	CLSFIL
   4975					;
   4976	015462				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
	015462	012746 	000142'			MOV	#$$$,-(SP)
	015466	004737 	016616'			JSR	PC,TYPMSG
   4977					;
   4978	015472	000575 			CLSFIL:	BR	FILERX		;CLOSE FILE IF FILE OPERN & ERROR
   4979					;
   4980					; PARTITION FOUND-- SAVE THE ADDRESS IN THE STD AND CHECK IT OUT
   4981					;
   4982	015474	010524 			PARFND:	MOV	R5,(R4)+	;(S.TD) SET ADDRESS OF TPD ENTRY
   4983					;
   4984	015476	022121 				CMP	(R1)+,(R1)+		;(L$BFLG) SKIP TASK FLAGS
   4985	015500	005724 				TST	(R4)+		;(S.TF) FLAG TASK TO RETSTE ON EXIT
   4986					;
   4987	015502	112724 	000062 			MOVB	#DEFPRI,(R4)+	;NONE-- USE DEFAULT
   4988					;
   4989	015506	013700 	014222'			MOV	PUDADR,R0	;GET THE ADDRESS WHERE WE FOUND OUR FILE
   4990	015512	012703 	177777 			MOV	#-1,R3		;START THE COUNT AT ZERO
   4991	015516	162700 	000000G			SUB	#.PUDBA,R0	;MAKE R0 INDEX INTO PUD
   4992	015522	005203 			30$:	INC	R3		;BUMP THE INDEX
   4993	015524	162700 	000050 			SUB	#U.SZ,R0	;DIVIDE PUD ADDRESS
   4994	015530	002374 				BGE	30$		; BY THE ENTRY SIZE
   4995	015532	110324 				MOVB	R3,(R4)+	;(S.DI) SYSTEM DISK INDICATOR
   4996					;
   4997	015534	016524 	000000G			MOV	T.BA(R5),(R4)+	;(S.BA) BASE ADDRESS OF TASK (NO KT-11)
   5001	015540	012114 				MOV	(R1)+,(R4)	;(L$BLDZ) (S.LZ) LOAD SIZE OF TASK
   5002	015542	006314 				ASL	(R4)		;MAKE IT REAL ADDRESS (*64)
   5003	015544	006314 				ASL	(R4)		; . .
   5004	015546	006314 				ASL	(R4)		; . .
   5005	015550	006314 				ASL	(R4)		; . .
   5006	015552	006314 				ASL	(R4)		; . .
   5007	015554	006324 				ASL	(R4)+		; . .
   5009	015556	012114 				MOV	(R1)+,(R4)	;(L$BMXZ) (S.MZ) MAXIMUM SIZE OF TASK
   5011	015560	006314 				ASL	(R4)		;MAKE REAL ADDRESS (*64)
   5012	015562	006314 				ASL	(R4)		; . .
   5013	015564	006314 				ASL	(R4)		; . .
   5014	015566	006314 				ASL	(R4)		; . .
   5015	015570	006314 				ASL	(R4)		; . .
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 63-2
SETUP STD ENTRY

   5016	015572	006314 				ASL	(R4)		; . .
   5018	015574	026524 	000000G			CMP	T.PZ(R5),(R4)+	;WILL TASK FIT IN PARTITION SPECIFIED?
   5019	015600	103723 				BLO	TTBERR		;NO-- DON'T TRY TO INSTALL IT
   5021	015602	026521 	000000G			CMP	T.BA(R5),(R1)+	;(L$BSA) IS TASK ADDRESS SAME AS PARTITION ADDRESS?
   5022	015606	001313 				BNE	IPAERR		;NO-- DON'T INSTALL IT
   5026					;
   5027	015610	016224 	000076 			MOV	H.IPC(R2),(R4)+	;(S.PC) SET INTIAL PC FROM HEADER
   5028	015614	016224 	000100 			MOV	H.ISP(R2),(R4)+	;(S.SP) ALSO INITIAL SP
   5029	015620	022424 				CMP	(R4)+,(R4)+	;MOVE OVER SEND/REQUEST LISTHEAD
   5030	015622	005024 				CLR	(R4)+		;(S.SS) SST VECTOR TABLE ADDRESS
   5031					;
   5032	015624	013714 	014276'			MOV	FILADR+0,(R4)	;(S.DL+0) DISK ADDRESS OF TASK IMAGE
   5033	015630	012400 				MOV	(R4)+,R0	;COPY IT IN CASE IT'S ZERO
   5034	015632	013714 	014300'			MOV	FILADR+2,(R4)	;(S.DL+2) SECOND HALF OF DISK ADDRESS
   5035	015636	051400 				BIS	(R4),R0		;WERE BOTH WORDS ZERO?
   5036	015640	001710 				BEQ	TNCERR		;YES-- TASK FILE IS NOT CONTIGUOUS
   5037	015642	062114 				ADD	(R1)+,(R4)	;(L$BHRB) + RELATIVE BLOCK IN FILE= REAL ADDRESS
   5038	015644	005544 				ADC	-(R4)		;ADD THE CARRY BACK TO HIGH ORDER WORD
   5039					;
   5040	015646	012137 	014226'			MOV	(R1)+,LBLNUM	;(L$BBLK) SAVE # BLOCKS IN LABEL GROUP FOR LATER
   5041					;	BR	SETLUN		;NOW SET UP THE LUN'S
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 64
SETUP LOGICAL UNIT TABLE FOR TASK

   5043						.SBTTL	SETUP LOGICAL UNIT TABLE FOR TASK
   5044					;
   5045					; LOOP THROUGH SECOND AND THIRD LABEL BLOCKS FOR ALL 255 LUNS
   5046					;	R2 --	ADDRESS OF HEADER BLOCK BUFFER
   5047					;
   5048	015652	062702 	000130 		SETLUN:	ADD	#H.NLUN,R2	;POINT TO # LUNS, AND LUN TABLE IN HEADER
   5049	015656	012205 				MOV	(R2)+,R5	;(H.NLUN) GET # LUNS TO SET UP, POINT TO LUN TABLE IN HEADER
   5050	015660	001471 				BEQ	80$		;NONE-- JUST CLOSE FILE
   5051	015662	013701 	014232'			MOV	LBLBFE,R1	;FORCE READ OF NEXT LABEL BLOCK
   5052					;
   5053					; SEE IF WE MUST WRITE OUT THIS BLOCK AND READ NEXT BLOCK OF HEADER
   5054					;
   5055	015666				10$:	CALL	NXTHDR		;GO ON TO NEXT BLOCK?
	015666	004737 	016406'			JSR	PC,NXTHDR
   5056	015672	103471 				BCS	FILERR		;FAILED
   5057					;
   5058					; SEE IF WE NEED TO READ ANOTHER LABEL BLOCK
   5059					;
   5060	015674	020137 	014232'		20$:	CMP	R1,LBLBFE	;HAVE WE FINISHED THIS LABEL BLOCK?
   5061	015700	103410 				BLO	30$		;NO-- JUST GET ANOTHER ENTRY FROM IT
   5062	015702	005004 				CLR	R4		;YES-- ASSUME NO MORE TO DO
   5063	015704	023737 	014224'	014226'		CMP	LBLBLK,LBLNUM	;HAVE WE RUN OUT OF LABEL BLOCKS?
   5064	015712	002043 				BGE	60$		;YES-- READ NO MORE-- JUST ZERO
   5065	015714					CALL	REDLBL		;YES-- READ NEXT ONE
	015714	004737 	016464'			JSR	PC,REDLBL
   5066	015720	103456 				BCS	FILERR		;SPLAT
   5067					;
   5068					; FIND THE PUD ADDRESS OF THE DEVICE FROM THE LABEL BLOCK
   5069					;
   5070	015722	005711 			30$:	TST	(R1)		;IS THIS A ZERO ENTRY?
   5071	015724	001434 				BEQ	40$		;YES-- JUST STORE ZERO
   5072	015726	013704 	014222'			MOV	PUDADR,R4	;ASSUME DEVICE OV
   5073	015732	022711 	053117 			CMP	#"OV,(R1)	;THIS OVERLAY DEVICE?
   5074	015736	001430 				BEQ	50$		;YES-- WE HAVE PUD ADDRESS
   5075					;
   5076	015740	012704 	000000G		31$:	MOV	#.PUDBA,R4	;NO-- START SEARCHING THROUGH THE PUD
   5077					;
   5078	015744	021164 	000000G		33$:	CMP	(R1),U.DN(R4)	;THIS OUR DEVICE?
   5079	015750	001004 				BNE	35$		;NO-- TRY ANOTHER ONE
   5080	015752	126164 	000002 	000000G		CMPB	2(R1),U.UN(R4)	;YES-- RIGHT UNIT #
   5081	015760	001417 				BEQ	50$		;YES-- WE HAVE PUD ADDRESS IN R4
   5082					;
   5083	015762	062704 	000050 		35$:	ADD	#U.SZ,R4	;NO-- BUMP TO NEXT PUD ENTRY
   5084	015766	020427 	000000G			CMP	R4,#.PUDEA	;END OF PUD YET?
   5085	015772	103764 				BLO	33$		;NO-- LOOK AT THIS ENTRY
   5086					;
   5087	015774	012704 	014416'			MOV	#CNVTBL,R4	;ENTRY NOT FOUND-- SEE IF CONVERTIBLE DEVICE
   5088					;
   5089	016000	022411 			37$:	CMP	(R4)+,(R1)	;DEVICE MATCH?
   5090	016002	001403 				BEQ	38$		;YES-- GET THE CONVERTED NAME AND GO AWAY
   5091	016004	005724 				TST	(R4)+		;NO-- IS THIS END OF TABLE?
   5092	016006	001374 				BNE	37$		;NO-- KEEP ON LOOKING
   5093	016010	000402 				BR	40$		;YES-- DEVICE NOT FOUND-- STORE 0
   5094					;
   5095	016012	011411 			38$:	MOV	(R4),(R1)	;DEVICE FOUND IN CONVERSION TABLE--
   5096	016014	000751 				BR	31$		; SAVE AS NEW DEVICE AND SCAN PUD FOR IT
   5097					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 64-1
SETUP LOGICAL UNIT TABLE FOR TASK

   5098	016016	005004 			40$:	CLR	R4		;ENTRY NOT FOUND-- CLEAR THE PUD ADDRESS
   5099					;
   5100	016020	022121 			50$:	CMP	(R1)+,(R1)+	;SKIP OVER ENTRY IN LABEL BLOCK
   5101					;
   5102	016022	010422 			60$:	MOV	R4,(R2)+	;STORE THE PUD ADDRESS IN LUT IN HEADER
   5103	016024					CALL	NXTHDR		;SEE IF WE NEED ANOTHER HEADER BLOCK
	016024	004737 	016406'			JSR	PC,NXTHDR
   5104	016030	103412 				BCS	FILERR		;I/O ERROR-- GIVE UP
   5105	016032	005022 				CLR	(R2)+		;CLEAR SECOND WORD OF HEADER ENTRY
   5106					;
   5107	016034	077564 				SOB	R5,10$		;LOOP FOR ALL LUNS IN HEADER
   5108	016036					CALL	WRTHDR		;WRITE OTU THE LAST HEADER BLOCK
	016036	004737 	016434'			JSR	PC,WRTHDR
   5109	016042	103405 				BCS	FILERR		;FAILED
   5110					;
   5111					; ALL DONE WITH THE TASK FILE-- CLOSE IT UP
   5112					;
   5113	016044				80$:	CALL	RETBUF		;RETURN THE BUFFERS
	016044	004737 	016202'			JSR	PC,RETBUF
   5114	016050					CALL	FILCLS		;CLOSE THE FILE
	016050	004737 	016524'			JSR	PC,FILCLS
   5115	016054	103075 				BCC	REQTSK		;OK-- GO PUT US IN THE STD
   5116					;
   5117					; ALL FILE I/O ERRORS END UP HERE
   5118					;
   5119	016056				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
	016056	012746 	000173'			MOV	#$$$,-(SP)
	016062	004737 	016616'			JSR	PC,TYPMSG
   5120	016066				FILERX:	CALL	FILCLS		;GIVE CLOSE A TRY
	016066	004737 	016524'			JSR	PC,FILCLS
   5121					;
   5122	016072	012746 	016362'		RETNOD:	MOV	#ALLDON,-(SP)	;RETURN ALL BUFFERS AND STD NODE
   5123	016076					.INH0			;;OTHER ERROR-- MUST REMOVE TASK FROM THE STD
	016076	013746 	177776 			MOV	@#PS,-(SP)
	016102	112737 	000140 	177776 		MOVB	#140,@#PS
   5124	016110	012701 	014170'			MOV	#REQBLK,R1	;FIND THE STD OF THIS TASK
   5125	016114					CALL	..FSTD
	016114	004737 	000000G			JSR	PC,..FSTD
   5126	016120	001015 				BNE	60$		;CAN'T FIND IT?????
   5127	016122	162737 	000002 	000000G		SUB	#2,.STDTZ	;;ONE LESS ENTRY IN THE STD NOW
   5128	016130	013705 	000000G			MOV	.STDTZ,R5	;; SO GET NEW LENGTH
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 64-2
SETUP LOGICAL UNIT TABLE FOR TASK

   5129	016134	063705 	000000G			ADD	.STDTA,R5	;;MAKE ADDRESS OF LAST ENTRY IN THE TABLE
   5130	016140	005743 				TST	-(R3)		;;BACK UP THE POINTER
   5131					;
   5132	016142	020305 			50$:	CMP	R3,R5		;;AT END OF TABLE YET?
   5133	016144	101003 				BHI	60$		;;YES-- ALL DONE
   5134	016146	016323 	000002 			MOV	2(R3),(R3)+	;;NO-- MOVE ANOTHER ENTRY DOWN
   5135	016152	000773 				BR	50$		;;LOOP TO MOVE WHOLE TABLE DOWN
   5136					;
   5137	016154				60$:	.ENB0			;;RESTORE TASK SWITCHING
	016154	004737 	000000G			JSR	PC,..ENB0
   5138					;
   5139					; RETALL -- RETURN ALL BUFFERS AND STD NODE
   5140					;
   5141	016160	013701 	014202'		RETALL:	MOV	STDADR,R1	;GET THE STD ADDRESS
   5142	016164	001406 				BEQ	RETBUF		;NONE-- JUST RETURN THE BUFFERS
   5143	016166	012704 	000000G			MOV	#.POLLH,R4	;ADD IT TO THE FREE POOL
   5144	016172					CALL	..NADD		;PUT IT BACK
	016172	004737 	000000G			JSR	PC,..NADD
   5145	016176	005037 	014202'			CLR	STDADR		;NO MORE STD NODE
   5146					;
   5147	016202	012701 	001000 		RETBUF:	MOV	#512.,R1	;SET TO RETURN A BLOCK
   5148	016206	012703 	000000G			MOV	#.BGBUF,R3	; TO THE BIG BUFFER LIST HEAD
   5149	016212	013700 	014230'			MOV	LBLBUF,R0	;GET ADDRESS OF LABEL BLOCK BUFFER
   5150	016216	001402 				BEQ	20$		;NONE-- TRY HEADER BUFFER
   5151	016220					CALL	..DEC2		;DE-ALLOCATE THE BUFFER
	016220	004737 	000000G			JSR	PC,..DEC2
   5152					;
   5153	016224	013700 	014236'		20$:	MOV	HDRBUF,R0	;ALSO THE HEADER BUFFER
   5154	016230	001402 				BEQ	CLRBUF		;NONE-- JUST CLEAN UP
   5155	016232					CALL	..DEC2		;DE-ALLOCATE THE HEADER BUFFER
	016232	004737 	000000G			JSR	PC,..DEC2
   5156					;
   5157	016236	005037 	014230'		CLRBUF:	CLR	LBLBUF		;NO MORE LABEL BUFFER
   5158	016242	005037 	014236'			CLR	HDRBUF		; OR HEADER BUFFER
   5159	016246					RETURN			;THAT'S IT
	016246	000207 				RTS	PC
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 65
RE-REQUEST TASK

   5161						.SBTTL	RE-REQUEST TASK
   5162					;
   5163					; TASK REQUEST BLOCK IS STILL SET UP FROM CALL
   5164					;
   5165	016250				REQTSK:	.INH0			;INHIBIT TASK SWITCHING
	016250	013746 	177776 			MOV	@#PS,-(SP)
	016254	112737 	000140 	177776 		MOVB	#140,@#PS
   5166	016262	013704 	014202'			MOV	STDADR,R4	;FIND STD ADDRESS
   5167	016266	042764 	040001 	000000G		BIC	#SF.TA!SF.IR,S.FW(R4)	;CLEAR ACTIVE BIT SO IT CAN BE REQUESTED
   5168	016274	012700 	014170'			MOV	#REQBLK,R0
   5169	016300					RQST$S	R0,,REQBLK+10	;RE-REQUEST TASK
	016300	005046 				CLR	-(SP)
	016302	013746 	014200'			MOV	REQBLK+10,-(SP)
	016306	005046 				CLR	-(SP)
	016310	005046 				CLR	-(SP)
	016312	016046 	000002 			MOV	2(R0),-(SP)
	016316	011046 				MOV	(R0),-(SP)
	016320	012746 				MOV	(PC)+,-(SP)
	016322	   013 	   007 			.BYTE	11.,7
	016324	104375 				EMT	375
   5170	016326					.ENB0			;ENABLE TASK SWITCHING
	016326	004737 	000000G			JSR	PC,..ENB0
   5171	016332	005737 	000000G			TST	$DSW		;SUCCESS/FAILURE?
   5172	016336	100011 				BPL	ALLDON		;SUCCESS -- ALL OK
   5173					;
   5174					; REQUEST FAILED-- IF TASK ALREADY ACTIVE, THAT'S OK
   5175					;
   5176	016340	023727 	000000G	177771 		CMP	$DSW,#IE.ACT	;TASK ALREADY ACTIVE?
   5177	016346	001405 				BEQ	ALLDON		;YES-- WE ARE HAPPY
   5178					;
   5179	016350					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
	016350	012746 	000251'			MOV	#$$$,-(SP)
	016354	004737 	016616'			JSR	PC,TYPMSG
	016360	000644 				 BR	RETNOD
   5180					;
   5181					; ALL DONE-- GO BACK TO WAITING
   5182					;
   5183	016362	000137 	014442'		ALLDON:	JMP	INSTAL		;RETURN AND EXIT IF NO MORE TO DO
   5184					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 66
TASK FILE I/O ROUTINES

   5186						.SBTTL	TASK FILE I/O ROUTINES
   5187					;
   5188					; FILFNA -- DO A 'FIND NAME IN DIRECTORY' FUNCTION TO FIND A FILE
   5189					;	FILBLK --	FILE-NAME BLOCK SET UP FOR DESIRED FILE
   5190					;
   5191	016366	012700 	004400 		FILFNA:	MOV	#IO.FNA,R0	;DO A FIND FILE IN DIRECTORY
   5192	016372	005001 				CLR	R1		;NO FILE-ID
   5193	016374	005002 				CLR	R2		;NO ATTRIBUTES
   5194	016376	005003 				CLR	R3		;NO ACCESS
   5195	016400	012704 	014242'			MOV	#FILBLK,R4	;SET TO DO IT TO THE RIGHT FILE
   5196	016404	000454 				BR	FILQIO		;GO DO IT AND RETURN
   5197					;
   5198					; NXTHDR -- ROUTINE TO WRITE OUT CURRENT HEADER BLOCK AND READ NEXT ONE
   5199					;		IF AT END OF BLOCK.
   5200					;	R2 -- POINTER TO HEADER BUFFER (HDR). UPDATED TO HDR+0 IF END OF BLOCK
   5201					;
   5202	016406	023702 	014240'		NXTHDR:	CMP	HDRBFE,R2	;END OF HEADER BUFFER?
   5203	016412	101023 				BHI	RETXXX		;NO-- JUST RETURN
   5204	016414					CALL	WRTHDR		;YES-- WRITE OUT OLD HEADER
	016414	004737 	016434'			JSR	PC,WRTHDR
   5205	016420	103420 				BCS	RETXXX		;ERROR-- RETURN WITH IT
   5206					;	BR	REDHDR		;READ THE NEXT ONE
   5207					;
   5208					; REDHDR -- READ NEXT HEADER BLOBK
   5209					;
   5210	016422	005237 	014234'		REDHDR:	INC	HDRBLK		;BUMP TO NEXT BLOCK OF HEADER
   5211	016426	012700 	010400 			MOV	#IO.RVB,R0	;DO A READ
   5212	016432	000402 				BR	RWRHDR		;DO IT TO HEADER BLOCK
   5213					;
   5214					; WRTHDR -- WRITE CURRENT HEADER BLOCK
   5215					;
   5216	016434	012700 	011000 		WRTHDR:	MOV	#IO.WVB,R0	;DO A WRITE
   5217					;	BR	RWRHDR		;READ/WRITE A BLOCK
   5218					;
   5219					; RWRHDR -- READ/WRITE HEADER BLOCK
   5220					;	R0 -- READ/WRTIE FUNCTION CODE
   5221					;
   5222	016440				RWRHDR:	PUSH	R1		;SAVE THE LABEL POINTER
	016440	010146 				MOV	R1,-(SP)
   5223	016442	013701 	014236'			MOV	HDRBUF,R1		;POINT TO HEADER BUFFER
   5224	016446	013703 	014234'			MOV	HDRBLK,R3	;SET PROPER VBN
   5225	016452					CALL	RWRBLK		;DO A BLOCK
	016452	004737 	016516'			JSR	PC,RWRBLK
   5226	016456	010102 				MOV	R1,R2		;POINT R2 TO HDR BUFFER
   5227	016460					POP	R1		;RESTORE LABEL POINTER
	016460	012601 				MOV	(SP)+,R1
   5228	016462				RETXXX:	RETURN			;WITH CC-C SET/CLEAR BY RWRBLK
	016462	000207 				RTS	PC
   5229					;
   5230					; REDLBL -- READ NEXT LABEL BLOCK
   5231					;
   5232	016464				REDLBL:	PUSH	R2		;SAVE THE HEADER POINTER
	016464	010246 				MOV	R2,-(SP)
   5233	016466	012700 	010400 			MOV	#IO.RVB,R0	;DO A READ
   5234	016472	013701 	014230'			MOV	LBLBUF,R1		; TO THE LABEL BUFFER
   5235	016476	005237 	014224'			INC	LBLBLK		;BUMP TO NEXT LABEL BLOCK
   5236	016502	013703 	014224'			MOV	LBLBLK,R3	; AND SAVE AS VBN TO READ
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 66-1
TASK FILE I/O ROUTINES

   5237	016506					CALL	RWRBLK		;READ THE BLOCK
	016506	004737 	016516'			JSR	PC,RWRBLK
   5238	016512					POP	R2		;RESTORE THE HEADER POINTER
	016512	012602 				MOV	(SP)+,R2
   5239	016514					RETURN			;CC-C SET/CLEAR BY RWRBLK, R1 POINTS TO LBL BUFFER
	016514	000207 				RTS	PC
   5240					;
   5241					; RWRBLK -- READ/WRITE A BLOCK
   5242					;	R0 --	READ/WRITE FUNCTION CODE
   5243					;	R1 --	ADDRESS OF BUFFER
   5244					;	R3 --	VIRTUAL BLOCK NUMBER IN TASK FILE
   5245					;
   5246	016516	012702 	001000 		RWRBLK:	MOV	#512.,R2	;SET TO READ ONE BLOCK
   5247	016522	000405 				BR	FILQIO		;DO IT TO TASK FILE
   5248					;
   5249					; FILCLS -- DE-ACCESS THE TASK FILE
   5250					;
   5251	016524	012700 	010000 		FILCLS:	MOV	#IO.DAC,R0	;DE-ACCESS FUNCTION
   5252	016530	005001 				CLR	R1		;NO FILE-ID BLOCK
   5253	016532	005002 				CLR	R2		;NO ATTRIBUTES ALLOWED
   5254	016534	005004 				CLR	R4		;NO FILE-NAME BLOCK EITHER
   5255					;	BR	FILQIO		;DO IT TO TASK FILE
   5256					;
   5257					; FILQIO -- PERFORM QUEUE I/O FUNCTION ON THE TASK FILE
   5258					;	R0 --	FUNCTION CODE
   5259					;	R1 --	PARAMETER #1 (FILE-ID BLOCK OR BUFFER ADDRESS)
   5260					;	R2 --	PARAMETER #2 (ATTRIBUTE CONTROL BLOCK OR BUFFER LENGTH)
   5261					;	R3 --	PARAMETER #5 (ACCESS CONTROL OR VIRTUAL BLOCK NUMBER)
   5262					;	R4 --	PARAMETER #6 (FILENAME BLOCK)
   5263					;
   5264					; CC-C CLEAR IF SUCCESS, SET IF FAILURE.
   5265					;
   5266	016536				FILQIO:	QIOW$S	R0,#TSKLUN,#E.FQIO,,#QIOSTS,,<R1,R2,,,R3,R4>
	016536	010446 				MOV	R4,-(SP)
	016540	010346 				MOV	R3,-(SP)
	016542	005046 				CLR	-(SP)
	016544	005046 				CLR	-(SP)
	016546	010246 				MOV	R2,-(SP)
	016550	010146 				MOV	R1,-(SP)
	016552	005046 				CLR	-(SP)
	016554	012746 	014302'			MOV	#QIOSTS,-(SP)
	016560	005046 				CLR	-(SP)
	016562	112716 	000001 			MOVB	#E.FQIO,(SP)
	016566	012746 	000002 			MOV	#TSKLUN,-(SP)
	016572	010046 				MOV	R0,-(SP)
	016574	012746 				MOV	(PC)+,-(SP)
	016576	   003 	   014 			.BYTE	3,$$$T1
	016600	104375 				EMT	375
   5267	016602	103404 				BCS	90$		;GIVE UP
   5268					;
   5269	016604	105737 	014302'		30$:	TSTB	QIOSTS+0	;I/O SUCCESSFUL?
   5270	016610	002001 				BGE	90$		;YES-- JUST RETURN WITH CC-C CLEAR
   5271					;
   5272	016612	000261 			80$:	SEC			;NO-- RETURN ERROR
   5273	016614				90$:	RETURN			;RETURN FROM FILQIO
	016614	000207 				RTS	PC
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 67
ERROR PROCESSING

   5275						.SBTTL	ERROR PROCESSING
   5276					;
   5277					; TYPMSG -- TYPE A MESSAGE
   5278					;
   5279					; CALL:	PUSH	#<ADDRESS OF ASCIZ TEXT>
   5280					;	CALL	TYPMSG
   5281					;
   5282	016616				TYPMSG:	PUSH	<R0,R1,R2,R3,R4> ;SAVE USED REGISTERS
	016616	010046 				MOV	R0,-(SP)
	016620	010146 				MOV	R1,-(SP)
	016622	010246 				MOV	R2,-(SP)
	016624	010346 				MOV	R3,-(SP)
	016626	010446 				MOV	R4,-(SP)
   5283	016630	012704 	014306'			MOV	#TYPBUF,R4	;SET ADDRESS OF TYPEOUT BUFFER
   5284	016634	012703 	017126'			MOV	#INSMSG,R3	;GET 'INS --'
   5285	016640					CALL	PUTSTR		;PUT IT IN STRING
	016640	004737 	017020'			JSR	PC,PUTSTR
   5286	016644	016603 	000014 			MOV	14(SP),R3	;GET ADDRESS OF THE TEXT TO TYPE
   5287	016650					CALL	PUTSTR		;TYPE IT
	016650	004737 	017020'			JSR	PC,PUTSTR
   5288	016654	012703 	017140'			MOV	#TSKMSG,R3	;GET 'TSK= '
   5289	016660					CALL	PUTSTR		;PUT IT TOO
	016660	004737 	017020'			JSR	PC,PUTSTR
   5290	016664	012703 	014170'			MOV	#REQBLK,R3	;POINT TO .RAD50 /TASK-NAME/
   5291	016670					CALL	PUTR50		;PUT IT IN THERE, TOO
	016670	004737 	017030'			JSR	PC,PUTR50
   5292	016674	013702 	014202'			MOV	STDADR,R2	;GET THE ADDRESS OF THE STD
   5293	016700	016202 	000000G			MOV	S.TD(R2),R2	;GET ADDRESS OF .RAD50/PARTITION/
   5294	016704	001407 				BEQ	20$		;NONE-- SKIP THIS
   5295	016706	012703 	017147'			MOV	#PARMSG,R3	;SAY 'PAR= '
   5296	016712					CALL	PUTSTR		; . .
	016712	004737 	017020'			JSR	PC,PUTSTR
   5297	016716	010203 				MOV	R2,R3		;GET THE NAME ADDRESS
   5298	016720					CALL	PUTR50		;PUT IT IN STRING
	016720	004737 	017030'			JSR	PC,PUTR50
   5299					;
   5300	016724	112724 	000012 		20$:	MOVB	#12,(R4)+	;STORE LF
   5301	016730	112724 	000015 			MOVB	#15,(R4)+	;STORE CR
   5302	016734	012700 	014306'			MOV	#TYPBUF,R0	;GET ADDRESS OF BUFFER BACK
   5303	016740	160004 				SUB	R0,R4		;COMPUTE LENGTH OF STRING
   5304	016742					QIOW$S	#IO.WLB,#CTYLUN,#E.FQIO,,,,<R0,R4,#40>
	016742	012746 	000040 			MOV	#40,-(SP)
	016746	010446 				MOV	R4,-(SP)
	016750	010046 				MOV	R0,-(SP)
	016752	005046 				CLR	-(SP)
	016754	005046 				CLR	-(SP)
	016756	005046 				CLR	-(SP)
	016760	112716 	000001 			MOVB	#E.FQIO,(SP)
	016764	012746 	000001 			MOV	#CTYLUN,-(SP)
	016770	012746 	000400 			MOV	#IO.WLB,-(SP)
	016774	012746 				MOV	(PC)+,-(SP)
	016776	   003 	   011 			.BYTE	3,$$$T1
	017000	104375 				EMT	375
   5305	017002					POP	<R4,R3,R2,R1,R0> ;RESTORE THE REGISTERS
	017002	012604 				MOV	(SP)+,R4
	017004	012603 				MOV	(SP)+,R3
	017006	012602 				MOV	(SP)+,R2
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 67-1
ERROR PROCESSING

	017010	012601 				MOV	(SP)+,R1
	017012	012600 				MOV	(SP)+,R0
   5306	017014					POP	(SP)		;RESTORE PC OVER MESSAGE ADDRESS
	017014	012616 				MOV	(SP)+,(SP)
   5307	017016					RETURN			;THAT'S IT FOR TYPMSG
	017016	000207 				RTS	PC
   5308					;
   5309					; PUTSTR -- PUT STRING IN TYPE-OUT BUFFER
   5310					;	R3 --	ADDRESS OF ASCIZ STRING
   5311					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5312					;
   5313	017020	112324 			PUTSTR:	MOVB	(R3)+,(R4)+	;COPY A CHARACTER
   5314	017022	001376 				BNE	PUTSTR		; UNTIL ASCIZ
   5315	017024	105744 				TSTB	-(R4)		;BACK OVER ZERO BYTE
   5316	017026					RETURN			;RETURN FROM PUTSTR
	017026	000207 				RTS	PC
   5317					;
   5318					; PUTR50 -- PUT RADIX 50 NAME IN TYPE-OUT BUFFER
   5319					;	R3 --	ADDRESS OF TWO-WORD RADIX 50 BLOCK
   5320					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5321					;
   5322	017030	012300 			PUTR50:	MOV	(R3)+,R0	;GET FIRST 3 CHARS
   5323	017032					CALL	PUTR51		;TYPE 'EM
	017032	004737 	017040'			JSR	PC,PUTR51
   5324	017036	012300 				MOV	(R3)+,R0	;GET NEXT THREE CHARS
   5325					;	BR	PUTR51		;PUT THEM, TOO
   5326					;
   5327					; PUTR51 -- PUT 3 RADIX 50 CHARACTERS IN TYPE-OUT BUFFER
   5328					;	R0 --	RADIX 50 TEXT
   5329					;	R4 --	CURRENT POINTER TO TYPE-OUT BUFFER
   5330					;
   5331	017040	012702 	017102'		PUTR51:	MOV	#T50TBL,R2	;POINT TO TABLE OF DIVISORS
   5332					;
   5333	017044	012201 			20$:	MOV	(R2)+,R1	;GET NEXT DIVISOR
   5334	017046	001414 				BEQ	90$		;THREE HAVE BEEN DONE-- RETURN
   5335	017050					CALL	$DIV		;DIVIDE CURRENT TEXT BY 50**N
	017050	004737 	000032'			JSR	PC,$DIV
   5336	017054					PUSH	R1		;SAVE THE REMAINDER
	017054	010146 				MOV	R1,-(SP)
   5337	017056	012701 	017112'			MOV	#R50TBL,R1	;POINT TO CONVERSION TABLE
   5338					;
   5339	017062	061100 			30$:	ADD	(R1),R0		;CONVERT THE CHARACTER
   5340	017064	105721 				TSTB	(R1)+		;SKIP THE BYTE
   5341	017066	120021 				CMPB	R0,(R1)+	;HAVE WE FOUND THE CHAR YET?
   5342	017070	103774 				BLO	30$		;NO-- LOOP UNTIL WE DO
   5343					;
   5344	017072	110024 				MOVB	R0,(R4)+	;YES-- SAVE THE CHAR IN TEXT
   5345	017074					POP	R0		;RESTORE LAST REMAINDER AS NEW DIVIDEND
	017074	012600 				MOV	(SP)+,R0
   5346	017076	000762 				BR	20$		;GET ANOTHER CHARACTER
   5347					;
   5348	017100				90$:	RETURN			;FROM PUTR50/PUTR51
	017100	000207 				RTS	PC
   5349					;
   5350	017102	003100 	000050 	000001 	T50TBL:	.WORD	50*50,50,1,0	;TABLE OF DIVISORS
	017110	000000
   5351					;
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 67-2
ERROR PROCESSING

   5352	017112	   022 	   060 		R50TBL:	.BYTE	<'0-36>-<50-50>,'0 ;36-47: 0-9
   5353	017114	   366 	   045 			.BYTE	<'%-35>-<'0-36>,'% ;35   : %
   5354	017116	   012 	   056 			.BYTE	<'.-34>-<'%-35>,'. ;34   : .
   5355	017120	   367 	   044 			.BYTE	<'$-33>-<'.-34>,'$ ;33   : $
   5356	017122	   067 	   101 			.BYTE	<'A-01>-<'$-33>,'A ;01-32: A-Z
   5357	017124	   340 	   040 			.BYTE	<' -00>-<'A-01>,'  ;00   : <SPACE>
   5358						.EVEN
   5359					;
   5360	017126	   015 	   012 	   111 	INSMSG:	.ASCIZ	<15><12>/INS -- /
	017131	   116 	   123 	   040
	017134	   055 	   055 	   040
	017137	   000
   5361	017140	   040 	   040 	   124 	TSKMSG:	.ASCIZ	/  TSK=/
	017143	   123 	   113 	   075
	017146	   000
   5362	017147	   040 	   120 	   101 	PARMSG:	.ASCIZ	/ PAR=/
	017152	   122 	   075 	   000
   5363						.EVEN
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 68
END STATEMENT

   5365						.SBTTL	END STATEMENT
   5366		000001 				       .END
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 68-1
SYMBOL TABLE

AC.ENA= 000200   	CDSIEN= 000100   	DBIOD   000370R  	DR.DTE= 000011   	EF.CRD= 000002
ADRSAV= ****** GX	CDSNXM= 001000   	DCK   = 100000   	DSEND = 000004   	EF.CRS= 000004
ALLDON  016362R  	CDSOFL= 010000   	DCOMST= 000001   	DS04  = 004000   	EF.IOD= ****** GX
AOE   = 001000   	CDSPAK= 000002   	DD.CHI= 000002   	DS05  = 002000   	EF.LPC= 000002
ATCBLK  014402R  	CDSPWC= 000400   	DD.HEM= 000010   	DS06  = 001000   	EF.LPD= 000001
A.EF  = 000020   	CDSRCK= 040000   	DD.LER= 000010   	DTBUF = ****** GX	EF.LPQ= 000004
A.HA  = ****** GX	CDSRDY= 000200   	DD.OVF= 000020   	DTCNT = ****** GX	EF.LPS= 000020
BCFHDS  011016R  	CDSRED= 000001   	DD.PCK= 000002   	DTCW2 = ****** GX	EF.LPW= 000040
BCFILF  010752R  	CDST  = ****** GX	DD.PGZ= 000001   	DTCW3 = ****** GX	EF.NIR= ****** GX
BCFLDR  011036R  	CDSTOL= 000010   	DD.RCK= 000001   	DTE   = 010000   	EF.PR1= ****** GX
BCFLDV  011044R  	CHNPNT= 000001   	DD.RME= 000040   	DTECMD= 000451   	EF.QIO= 000001
BCFRDS  010752R  	CHRINT= 020000   	DD.SCK= 000004   	DTEFLG= 000444   	EF.SEP= 100000
BCFSDO  010776R  	CLIOD   000374R  	DD.SFL= 000020   	DTEF11= 000450   	EF.TEF= 000400
BCFSTR  011060R  	CLRBUF  016236R  	DD.VFE= 000004   	DTEMTD= 000455   	EPTR  = 000000
BCFTAB  010734R  	CLSFIL  015472R  	DEFPRI= 000062   	DTEMTI= 000456   	ERMHER  007645R
BC.HDS= ****** GX	CNUPE = 000002   	DELHLD= 002000   	DTEXP = 177340   	ERMHNG  007662R
BC.LDR= ****** GX	CNVTBL  014416R  	DEMTIM= 000002   	DTHD    001730RG 	ERMNXD  007573R
BC.LDV= ****** GX	CPE   = 000010   	DEP   = 010000   	DTINI   002314R  	ERMOFL  007613R
BC.RDS= ****** GX	CRBFLN= ****** GX	DEX   = 000400   	DTNRM   002240R  	ERMVFE  007626R
BC.SDS= ****** GX	CRBUFF= ****** GX	DEXDON= 000004   	DTOUT   002460R  	ERR   = 100000
BC.STR= ****** GX	CRCEVF= ****** GX	DEXWD1= 174406   	DTRTC = ****** GX	ERR10C= 010000
BIT0  = 000001   	CRDCLR  013432R  	DEXWD2= 174404   	DTSTK   002210RG 	ERR10S= 020000
BIT1  = 000002   	CRDINT  012700R  	DEXWD3= 174402   	DTTSK = ****** GX	ERR11C= 000001
BIT10 = 002000   	CREVFG= ****** GX	DFUNC = 000200   	DUNS    000460R  	ERR11S= 000002
BIT11 = 004000   	CRHD    011652RG 	DF.DMG= 000004   	DUPE  = 000020   	EXSP    014162R
BIT12 = 010000   	CRHUNG= ****** GX	DF.DMN= 000007   	DURE  = 000004   	E.FCRB= 000004
BIT13 = 020000   	CRINI   012230R  	DF.DOR= 000001   	DVA   = 004000   	E.FCRC= 000001
BIT14 = 040000   	CRIOD   012402R  	DF.EHG= 000010   	DV.EOF= 000040   	E.FCRD= 000002
BIT15 = 100000   	CRLOOP  012314R  	DF.EHM= 000011   	DV.F11= 000400   	E.FCRS= 000003
BIT2  = 000004   	CRMKT   012650R  	DF.EMG= 000005   	DV.HNG= 001000   	E.FLPC= 000002
BIT3  = 000010   	CRMRKT  012152R  	DF.EMN= 000006   	DV.IOP= 000020   	E.FLPD= 000001
BIT4  = 000020   	CRPWUP  012222R  	DF.KLR= 000012   	DV.LOG= 000100   	E.FLPQ= 000003
BIT5  = 000040   	CRSSTV  012164R  	DF.KLW= 000013   	DV.NXD= 000001   	E.FLPS= 000005
BIT6  = 000100   	CRSTBK= ****** GX	DF.KLX= 000014   	DV.OFL= 000002   	E.FLPW= 000006
BIT7  = 000200   	CRSTK   012132RG 	DF.OFF= 000002   	DV.OIR= 000004   	E.FQIO= 000001
BIT8  = 000400   	CRSTLN= ****** GX	DF.ON = 000003   	DV.SCN= 000010   	E.IOD = ****** GX
BIT9  = 001000   	CRSTS = ****** GX	DF.PDP= 000016   	DV.URE= 000200   	E.NIR = ****** GX
BLKTT = ****** GX	CRTBL = ****** GX	DF.PEX= 000015   	DXFLAG  014162R  	FCN     004462R
BPARER= 000020   	CRTRP4  012166R  	DIAG1 = 174430   	DXWD1 = 000006   	FCNBD   004470R
BUFAIL  015176R  	CR.ACK= 004000   	DIAG2 = 174432   	DXWD2 = 000004   	FEDRV   003474R
BUSA16= 000020   	CR.HNG= 100000   	DIAG3 = 174436   	DXWD3 = 000002   	FEHD    003174RG
BUSA17= 000040   	CR.IOD= 010000   	DIKL10= 000010   	DXWRD1= 002000   	FER   = 000020
BYTESA= ****** GX	CR.IOP= 020000   	DLT   = 100000   	D$$H11= 000010   	FESTK   003454RG
CDBA  = ****** GX	CR.NSF= 000400   	DLYCNT= 174400   	D.CCDR= ****** GX	FETBL = ****** GX
CDBPCK= 020000   	CR.NXD= 001000   	DNBLK = ****** GX	D.CLPT= ****** GX	FETSK = ****** GX
CDBRCK= 040000   	CR.RHN= 002000   	DNFCN = ****** GX	D.FEPD= ****** GX	FE.DET= 040000
CDBSCK= 010000   	CR.SST= 040000   	DNMSG   000442R  	D1011 = 000040   	FE.DTE= 020000
CDCC  = ****** GX	CS.EXP= 177670   	DNSTS = ****** GX	EBSEL = 000100   	FE.SER= 004000
CDD   = 000020   	CTYLUN= 000001   	DONE  = 000200   	EBUSPC= 000020   	FE.STR= 002000
CDDB  = ****** GX	CYCLS = 000002   	DONSTR  004412R  	EBUSPS= 000004   	FILADR  014276R
CDSB16= 000020   	C$$D11= 000001   	DON10C= 040000   	ECCMSK  000504R  	FILBLK  014242R
CDSB17= 000040   	C.LEEF= 000002   	DON10S= 100000   	ECCWRD  000476R  	FILCLS  016524R
CDSDER= 004000   	DAG1  = 000030   	DON11C= 000100   	ECH   = 000100   	FILERA  015172R
CDSDLT= 002000   	DAG2  = 000032   	DON11S= 000200   	ECI   = 004000   	FILERR  016056R
CDSEOF= 020000   	DAG3  = 000036   	DPS4  = 040000   	EDONES= 040000   	FILERX  016066R
CDSERR= 100000   	DATE  = 000004   	DRESET= 000100   	EF.CRB= 000010   	FILFNA  016366R
CDSHEM= 000004   	DBINI   000512R  	DRY   = 000200   	EF.CRC= 000001   	FILQIO  016536R
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 68-2
SYMBOL TABLE

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

LP.HNG= 100000   	PARENB= 000002   	RETRY = 000005   	SSTSLP  007040R  	TSKMSG  017140R
LP.LIP= 001000   	PARFND  015474R  	RETXXX  016462R  	STAT  = 174434   	TSTMOD= 000001
LP.MCH= 010000   	PARMSG  017147R  	RFMAD0= 100000   	STATD = 000034   	TTBERR  015450R
LP.PZI= 020000   	PBTHRD= 000004   	RFMAD1= 040000   	STATUS= 000022   	TTPEN = ****** GX
LP.SST= 040000   	PERCLR= 001000   	RFMAD2= 020000   	STDADR= 014202R  	TYPBUF  014306R
LP.UNT= 000003   	PGE   = 002000   	RFMAD3= 010000   	STSWD = ****** GX	TYPMSG  016616R
LP.WAT= 004000   	PGM   = 001000   	RM    = 000010   	SWR   = 177570   	T.BA  = ****** GX
L$BBLK= 000024   	PHYS  = 100000   	RMR   = 000004   	SWSLLT= 100000   	T.HBCT= ****** GX
L$BFLG= 000010   	PIDENT= 000000   	RPAS  = 000016   	SYFLAG  014163R  	T.HCAD= ****** GX
L$BHRB= 000022   	PRI7  = 000340   	RPBA  = 000004   	SYMNTD  014644R  	T.HCBC= ****** GX
L$BLDZ= 000014   	PROPNT= 000021   	RPBUF = ****** GX	SYMNT1  014710R  	T.HEMA= 177774
L$BMXZ= 000016   	PRTOFF= 004000   	RPCNT = ****** GX	SYNTIM= 000004   	T.HIBC= 177776
L$BPAR= 000004   	PR0   = 000000   	RPCS1 = 000000   	S.DRFN= 000034   	T.HVFC= 177775
L$BPRI= 000012   	PR1   = 000040   	RPCS2 = 000010   	S.FW  = ****** GX	T.PN  = ****** GX
L$BSA = 000020   	PR2   = 000100   	RPDA  = 000006   	S.TD  = ****** GX	T.PZ  = ****** GX
L$BTSK= 000000   	PR3   = 000140   	RPDBR = 000022   	TASKNF  015066R  	T.SZ  = ****** GX
L$$P20= 000002   	PR4   = 000200   	RPDC  = 000034   	TB.ABO= 040000   	T10AD = 000020
MCPE  = 020000   	PR5   = 000240   	RPDS  = 000012   	TB.DON= 100000   	T11AD = 000022
MDPE  = 000400   	PR6   = 000300   	RPDT  = 000026   	TB.EOF= 020000   	T11BC = 000016
MEFCN   004472R  	PR7   = 000340   	RPEC1 = 000044   	TB.LPC= 010000   	T50TBL  017102R
MEMPAR= 000020   	PS    = 177776   	RPEC2 = 000046   	TB.RMD= 004000   	UF.TL = ****** GX
MKDNR   000404RG 	PSWW1 = 000005   	RPER1 = 000014   	TB.SFN= 036000   	UNASG1= 000032
MKSCDP  005246R  	PSWW10= 000014   	RPEXP = 176700   	TB.VFD= 002000   	UNASG2= 000033
MNTBLK  014410R  	PSWW11= 000015   	RPHD    000070RG 	TENAD1= 174410   	UNASG3= 000034
MNTSYD  014510R  	PSWW12= 000016   	RPLA  = 000020   	TENAD2= 174412   	UNASG4= 000035
MODE00= 000004   	PSWW13= 000017   	RPMR  = 000024   	TESTLP  010042R  	UNASG5= 000036
MODE01= 000010   	PSWW2 = 000006   	RPOF  = 000032   	TEST00= 000400   	UNASG6= 000037
MOL   = 010000   	PSWW3 = 000007   	RPRNA = ****** GX	TEST01= 001000   	UNS   = 040000
MPE11 = 001000   	PSWW4 = 000010   	RPRTC = ****** GX	TEST02= 002000   	UPE   = 020000
MRKDT   002260R  	PSWW5 = 000011   	RPSN  = 000030   	TNAD1 = 000010   	U.ACP = ****** GX
MSGDPB  000422R  	PSWW6 = 000012   	RPSTK   000350RG 	TNAD2 = 000012   	U.DACP= ****** GX
MSGSIZ= 000016   	PSWW7 = 000013   	RPTSK = ****** GX	TNCERR  015462R  	U.DN  = ****** GX
MXF   = 001000   	PUDADR  014222R  	RPUNIT= ****** GX	TNFERR  015156R  	U.FB  = ****** GX
M.KTAE= 000010   	PULSE = 000020   	RPWC  = 000002   	TOBM  = 000004   	U.RP  = ****** GX
M.KTEF= 000002   	PUTR50  017030R  	RPWLO   000400R  	TOD   = 000003   	U.SZ  = 000050
M.KTMG= 000004   	PUTR51  017040R  	RSTERR= 001000   	TOIP  = 000002   	U.UN  = ****** GX
M.KTUN= 000006   	PUTSTR  017020R  	RSX$$E= 000041   	TOIT  = 000001   	U.VA  = ****** GX
NED   = 010000   	QIOSTS  014302R  	RSX$$F= 000101   	TO10  = 000200   	VFCFF   006604R
NEM   = 004000   	QSIZE = 000023   	RSX$$K= 000126   	TO10AD= 174420   	VFCTBL  006602R
NODADR= ****** GX	Q.IOAE= 000012   	RSX$$V= 000013   	TO10BC= 174414   	VFUERR= 000100
NTRDMS  002276R  	Q.IOEF= 000006   	RWRBLK  016516R  	TO10BM= 000001   	VFULOD= 000002
NTRDSZ= 000016   	Q.IOFN= 000002   	RWRHDR  016440R  	TO10DB= 000400   	VFURDY= 010000
NULSTP= 000040   	Q.IOLU= 000004   	R$$E18= 000001   	TO10DN= 100000   	VV    = 000100
NUPE  = 000002   	Q.IOPL= 000014   	R$$11D= 000001   	TO10DT= 174424   	WCE   = 040000
NXTHDR  016406R  	Q.IOPR= 000007   	R.AT  = ****** GX	TO10ER= 020000   	WCF   = 000040
N.DID = 000024   	Q.IOSB= 000010   	R.DP  = ****** GX	TO10PK= ****** GX	WEP   = 000010
N.FID = 000000   	RAMIS0= 010000   	R.FC  = ****** GX	TO11  = 000100   	WFDNR   000416RG
N.FNAM= 000006   	RAMLOD= 000003   	R.LU  = ****** GX	TO11AD= 174422   	WFDTD   002234R
N.FTYP= 000014   	RAMPAR= 000010   	R.PB  = ****** GX	TO11BC= 174416   	WFDTQ   002230R
N.FVER= 000016   	RCVBLK  014164R  	R50TBL  017112R  	TO11BM= 020000   	WFEF1   003166R
N.NEXT= 000022   	REDHDR  016422R  	SCD   = 000040   	TO11DB= 004000   	WFMKT   002272R
N.STAT= 000020   	REDLBL  016464R  	SETLUN  015652R  	TO11DN= 000200   	WLE   = 004000
OFFLIN= 000200   	REQBLK  014170R  	SETSTD  015342R  	TO11DT= 174426   	WRL   = 004000
ONLINE= 004000   	REQTSK  016250R  	SF.IR = 040000   	TO11ER= 000002   	WRTHDR  016434R
OPI   = 020000   	RETALL  016160R  	SF.TA = 000001   	TRE   = 040000   	W.TSEF= 000002
OPTVFU= 004000   	RETBUF  016202R  	SNSTR   004100R  	TSKFND  015210R  	ZSTOP = 040000
PAGZRO= 040000   	RETNOD  016072R  	SSTSCR  013010R  	TSKLUN= 000002   	$CDINT  013442RG
INSTAL -- TASK INSTALLER FOR RS	MACRO M1110  03-OCT-79 10:55  PAGE 68-4
SYMBOL TABLE

$CD11 = 000001   	.BGBUF= ****** GX	.LCRM1= 057000   	.POLLH= ****** GX	..AKCR  013572RG
$DBDTE= 000001   	.BRCLK= 005000   	.LCRM2= 056000   	.PUDBA= ****** GX	..AKLP  011246RG
$DH11 = 000001   	.CECLK= 004000   	.LCRM3= 055000   	.PUDEA= ****** GX	..ALC2= ****** GX
$DIRAC= 000001   	.CLRMR= 006000   	.LCRM4= 054000   	.RCRM1= 147000   	..DECB= ****** GX
$DIV    000032RG 	.CLRUN= 010000   	.LCRM5= 053000   	.RCRM2= 146000   	..DECN= ****** GX
$DSW  = ****** GX	.COMEF= ****** GX	.LDAR = 077000   	.RCRM3= 145000   	..DEC2= ****** GX
$DTA  = 000001   	.CONBT= 012000   	.LDBRL= 043000   	.RCRM4= 144000   	..DOLP  011470RG
$DTE  = 000001   	.CRPFL= ****** GX	.LDBRR= 042000   	.RCSPF= 141000   	..DOL1  011454RG
$DTINT  002646RG 	.CRTSK= ****** GX	.LDCK1= 046000   	.RDJ14= 134000   	..DQRN= ****** GX
$FE   = 000001   	.CSHRG= 164000   	.LDCK2= 047000   	.RDJ71= 135000   	..DSEV= ****** GX
$F11  = 000001   	.CYLTM= 000074   	.LDDIS= 045000   	.RDMAB= 133000   	..ENB0= ****** GX
$LPINT  010332RG 	.DBINT  001236RG 	.LDRJD= 064000   	.RPUNT= ****** GX	..FSTD= ****** GX
$LP20 = 000001   	.DRLTC= 015000   	.LDRJV= 063000   	.SECLK= 003000   	..INTX= ****** GX
$MUL    000000RG 	.DSACF= 066000   	.LDRM1= 060000   	.SETMR= 007000   	..IODN= ****** GX
$RP04 = 000001   	.DSIOJ= 065000   	.LDRM2= 061000   	.SETRN= 011000   	..NADD= ****** GX
$TOP10= 000001   	.EIOJA= 067000   	.LDRM3= 062000   	.SSCLK= 002000   	..PTLP  011326RG
$$    = 000037   	.FEACK  004116RG 	.LDSEL= 044000   	.STDTA= ****** GX	..SACK= ****** GX
$$MSG = 000000   	.FEST   004222RG 	.LPPFL= ****** GX	.STDTZ= ****** GX	..SPCR  013550RG
$$$   = 000251R     002	.GFNR = 102000   	.MEMRS= 076000   	.STPCL= 000000   	..SPLP  011074RG
$$$ARG= 000003   	.INICL= 070000   	.PCAB1= 150000   	.STRCL= 001000   	..STCR  013526RG
$$$OST= 000012   	.IRLTC= 014000   	.PCAB2= 151000   	.TPDBA= ****** GX	..STIN= ****** GX
$$$T1 = 000011   	.LCRDL= 052000   	.PCAB3= 152000   	.TPDEA= ****** GX	..STLP  010664RG
$$$T2 = 000000   	.LCRDR= 051000   	.PCAB4= 153000   	.WRMBX= 071000   	...GBL= 000000
$$$$  = 000002

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

VIRTUAL MEMORY USED:  12437 WORDS  ( 49 PAGES)
DYNAMIC MEMORY:  13540 WORDS  ( 52 PAGES)
ELAPSED TIME:  00:07:20
,[100,20]DRIVERS10.LST/-SP/CRF=[100,30]DRIVERS10.TMP
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

AC.ENA	= 000200	#59-4655    62-4919   
ADRSAV	= ******  GX	*17-1886    18-1941   *18-1946   *19-1980    19-1990   *19-1991   
ALLDON	  016362 R	 64-5122    65-5172    65-5177   #65-5183   
AOE   	= 001000	#6-391      8-677      8-686     
ATCBLK	  014402 R	#60-4699    62-4917   
A.EF  	= 000020	*8-725     #9-1135    *9-1237    *9-1338     17-1836   *17-1838   *19-1998    28-2523    49-4102   
A.HA  	= ******  GX	 17-1899    61-4757   
BCFHDS	  011016 R	 38-3553   #38-3589   
BCFILF	  010752 R	 38-3545   #38-3562    38-3583    38-3592   
BCFLDR	  011036 R	 38-3555   #38-3598   
BCFLDV	  011044 R	 38-3556   #38-3604   
BCFRDS	  010752 R	 38-3552   #38-3567   
BCFSDO	  010776 R	 38-3554   #38-3580   
BCFSTR	  011060 R	 38-3551   #38-3617   
BCFTAB	  010734 R	 38-3542    38-3548   #38-3550    38-3551    38-3552    38-3553    38-3554    38-3555    38-3556   
BC.HDS	= ******  GX	 33-3182    38-3553    51-4361   
BC.LDR	= ******  GX	 38-3555   
BC.LDV	= ******  GX	 38-3556   
BC.RDS	= ******  GX	 38-3552   
BC.SDS	= ******  GX	 38-3554   
BC.STR	= ******  GX	 17-1929    19-1965    38-3551    50-4146   
BIT0  	= 000001	#9-1131     20-2121   #20-2136    21-2227    21-2244    23-2314    23-2330    23-2346    26-2431   
                         28-2509    33-3160   #44-3930    44-3941    45-3971    49-4091   #59-4589    59-4632   
BIT1  	= 000002	#9-1131     20-2123   #20-2136    21-2226    21-2243    23-2315    23-2331    23-2347    26-2431   
                        #44-3930    44-3943    45-3970   #59-4589   
BIT10 	= 002000	#9-1131    #20-2136    20-2170    21-2213    21-2233    26-2419   #44-3930    45-3961    47-4033   
                        #59-4589   
BIT11 	= 004000	#9-1131    #20-2136    20-2169    21-2212    21-2232    26-2414   #44-3930    45-3960    47-4031   
                        #59-4589   
BIT12 	= 010000	#9-1131    #20-2136    20-2168    21-2211    21-2231    26-2411   #44-3930    45-3959    45-3978   
                         47-4029   #59-4589   
BIT13 	= 020000	#9-1131    #20-2136    20-2167    21-2210    26-2408   #44-3930    45-3958    45-3977    47-4027   
                        #59-4589   
BIT14 	= 040000	#9-1131    #20-2136    20-2166    21-2209    26-2405   #44-3930    45-3957    45-3976    47-4024   
                        #59-4589   
BIT15 	= 100000	#9-1131    #20-2136    20-2165    21-2208    26-2402    33-3182   #44-3930    45-3956    47-4020   
                         50-4146    51-4361   #59-4589   
BIT2  	= 000004	#9-1131     20-2125   #20-2136    21-2222    21-2242    23-2316    23-2332    23-2348   #44-3930   
                         44-3945    45-3969   #59-4589   
BIT3  	= 000010	#9-1131    #20-2136    21-2221    21-2241    23-2317    23-2333    23-2349   #44-3930    44-3947   
                         45-3968   #59-4589   
BIT4  	= 000020	#9-1131     20-2128   #20-2136    21-2220    21-2240    23-2318    23-2334    23-2350   #44-3930   
                         45-3967   #59-4589   
BIT5  	= 000040	#9-1131     20-2130   #20-2136    21-2219    21-2239    23-2319    23-2335   #44-3930    45-3966   
                        #59-4589   
BIT6  	= 000100	#9-1131    #20-2136    21-2218    21-2238    23-2320   #44-3930    45-3965   #59-4589   
BIT7  	= 000200	#9-1131    #20-2136    21-2217    21-2237    23-2321    26-2427   #44-3930    45-3964   #59-4589   
                         59-4655   
BIT8  	= 000400	#9-1131    #20-2136    21-2215    21-2235    23-2322    26-2424    33-3160   #44-3930    45-3963   
                         47-4037   #59-4589   
BIT9  	= 001000	#9-1131    #20-2136    21-2214    21-2234    23-2323    26-2421   #44-3930    45-3962    47-4035   
                        #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BLKTT 	= ******  GX	 19-2046   
BPARER	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
BUFAIL	  015176 R	#62-4891    62-4901    62-4908   
BUSA16	= 000020	#21-2220    42-3862   
BUSA17	= 000040	#21-2219    42-3862   
BYTESA	= ******  GX	*17-1887   *17-1910    17-1913    18-1943    18-1945   *18-1947   *19-1979    19-1985   *19-1987   
                        *19-1992    19-1995   
CDBA  	= ******  GX	 50-4188   
CDBPCK	= 020000	#45-3977    51-4317   
CDBRCK	= 040000	#45-3976    51-4313   
CDBSCK	= 010000	#45-3978    51-4321   
CDCC  	= ******  GX	 50-4187    54-4441   
CDD   	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
CDDB  	= ******  GX	 51-4311    51-4347   
CDSB16	= 000020	#45-3967   
CDSB17	= 000040	#45-3966   
CDSDER	= 004000	#45-3960   
CDSDLT	= 002000	#45-3961    51-4304   
CDSEOF	= 020000	#45-3958    51-4296   
CDSERR	= 100000	#45-3956   
CDSHEM	= 000004	#45-3969    51-4329   
CDSIEN	= 000100	#45-3965    50-4189    50-4203    50-4206   
CDSNXM	= 001000	#45-3962    51-4304   
CDSOFL	= 010000	#45-3959    50-4179    51-4288   
CDSPAK	= 000002	#45-3970   
CDSPWC	= 000400	#45-3963    52-4384   
CDSRCK	= 040000	#45-3957    51-4335   
CDSRDY	= 000200	#45-3964    51-4308   
CDSRED	= 000001	#45-3971    50-4189   
CDST  	= ******  GX	 50-4179    50-4189    50-4203    50-4206    51-4287    51-4345    51-4347    52-4384    54-4436   
                         54-4445   
CDSTOL	= 000010	#45-3968   
CHNPNT	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
CHRINT	= 020000	#21-2210    33-3096    37-3390    37-3412    40-3723   
CLIOD 	  000374 R	#6-445      7-634     
CLRBUF	  016236 R	 61-4742    61-4742    64-5154   #64-5157   
CLSFIL	  015472 R	 63-4968    63-4971    63-4974   #63-4978   
CNUPE 	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
CNVTBL	  014416 R	#60-4712    64-5087   
CPE   	= 000010	#6-397     
CRBFLN	= ******  GX	 50-4145    50-4187   
CRBUFF	= ******  GX	 50-4135    50-4188   
CRCEVF	= ******  GX	*50-4117    50-4128    50-4198   
CRDCLR	  013432 R	 49-4086   #52-4385   
CRDINT	  012700 R	 49-4084   #50-4204   
CREVFG	= ******  GX	*49-4101   *49-4102    49-4103    50-4117    50-4118    50-4149    50-4155    50-4173    50-4217   
                         51-4268    51-4364    51-4367    52-4385    57-4531   
CRHD  	  011652 RG	#47-4017   
CRHUNG	= ******  GX	*50-4214   
CRINI 	  012230 R	 47-4017    47-4017   #49-4101   
CRIOD 	  012402 R	#50-4128   
CRLOOP	  012314 R	#50-4114    50-4226   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CRMKT 	  012650 R	#50-4198   
CRMRKT	  012152 R	#47-4042    49-4104   
CRPWUP	  012222 R	#49-4096    49-4106   
CRSSTV	  012164 R	#49-4080    49-4105   
CRSTBK	= ******  GX	 51-4276    51-4349   
CRSTK 	  012132 RG	 47-4017   #47-4017   
CRSTLN	= ******  GX	 51-4349    51-4360   
CRSTS 	= ******  GX	*49-4090    50-4133   *50-4152    50-4160    50-4166    50-4168   *50-4170    50-4171   *50-4186   
                         50-4200    50-4207    50-4209    50-4211   *50-4213   *50-4219   *50-4222   *51-4267    51-4282   
                         51-4292    51-4300    51-4337   *51-4342   *51-4368   *52-4383    54-4438   *54-4440   *54-4443   
                        *54-4448   *55-4481   *56-4504   *57-4525   
CRTBL 	= ******  GX	 55-4479    56-4501    57-4523   
CRTRP4	  012166 R	 49-4080   #49-4084   
CR.ACK	= 004000	#47-4031    50-4166    50-4170    50-4207    56-4504    57-4525   
CR.HNG	= 100000	#47-4020    50-4152    50-4170    50-4209    50-4219    50-4222   
CR.IOD	= 010000	#47-4029    50-4133    50-4152    50-4168    50-4207    51-4292    54-4443    56-4504   
CR.IOP	= 020000	#47-4027    50-4168    50-4186    50-4207    50-4211    51-4292    52-4383    54-4438    54-4440   
                         56-4504   
CR.NSF	= 000400	#47-4037    50-4152    51-4337    51-4342   
CR.NXD	= 001000	#47-4035    49-4090    50-4171    50-4200    51-4282    52-4383   
CR.RHN	= 002000	#47-4033    50-4152    50-4170    50-4213    50-4222    51-4300   
CR.SST	= 040000	#47-4024    50-4160    50-4207    50-4213    51-4267    51-4368    54-4448    55-4481   
CS.EXP	= 177670	#9-1131    #20-2136   #44-3930   #59-4589   
CTYLUN	= 000001	#59-4626    67-5304   
CYCLS 	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
C$$D11	= 000001	#44-3936   
C.LEEF	= 000002	#6-445     
DAG1  	= 000030	#3-128     
DAG2  	= 000032	#3-127     
DAG3  	= 000036	#3-125     
DATE  	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
DBINI 	  000512 R	 6-441      6-441     #7-513      7-516      7-639     
DBIOD 	  000370 R	#6-443      7-633     
DCK   	= 100000	#6-385     
DCOMST	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
DD.CHI	= 000002	#23-2331    33-3099   
DD.HEM	= 000010	#23-2349    51-4331   
DD.LER	= 000010	#23-2333   
DD.OVF	= 000020	#23-2334    33-3104   
DD.PCK	= 000002	#23-2347    51-4319   
DD.PGZ	= 000001	#23-2330    33-3093   
DD.RCK	= 000001	#23-2346    51-4315   
DD.RME	= 000040	#23-2335    33-3083   
DD.SCK	= 000004	#23-2348    51-4323   
DD.SFL	= 000020	#23-2350    51-4339   
DD.VFE	= 000004	#23-2332    33-3053   
DEFPRI	= 000062	#59-4619    63-4987   
DELHLD	= 002000	#21-2213   
DEMTIM	= 000002	#21-2243    33-3057    37-3445   
DEP   	= 010000	#9-1131    #20-2136   #44-3930   #59-4589   
DEX   	= 000400	#9-1131    #20-2136   #44-3930   #59-4589   
DEXDON	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DEXWD1	= 174406	#9-1131    #20-2136   #44-3930   #59-4589   
DEXWD2	= 174404	#9-1131    #20-2136   #44-3930   #59-4589   
DEXWD3	= 174402	#9-1131    #20-2136   #44-3930   #59-4589   
DFUNC 	= 000200	#9-1131    #20-2136   #44-3930   #59-4589   
DF.DMG	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
DF.DMN	= 000007	#9-1131    #20-2136   #44-3930   #59-4589   
DF.DOR	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
DF.EHG	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
DF.EHM	= 000011	#9-1131    #20-2136   #44-3930   #59-4589   
DF.EMG	= 000005	#9-1131    #20-2136   #44-3930   #59-4589   
DF.EMN	= 000006	#9-1131    #20-2136   #44-3930   #59-4589   
DF.KLR	= 000012	#9-1131    #20-2136   #44-3930   #59-4589   
DF.KLW	= 000013	#9-1131    #20-2136   #44-3930   #59-4589   
DF.KLX	= 000014	#9-1131    #20-2136   #44-3930   #59-4589   
DF.OFF	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
DF.ON 	= 000003	#9-1131    #20-2136   #44-3930   #59-4589   
DF.PDP	= 000016	#9-1131    #20-2136   #44-3930   #59-4589   
DF.PEX	= 000015	#9-1131    #20-2136   #44-3930   #59-4589   
DIAG1 	= 174430	#9-1131    #20-2136   #44-3930   #59-4589   
DIAG2 	= 174432	#9-1131    #20-2136   #44-3930   #59-4589   
DIAG3 	= 174436	#9-1131    #20-2136   #44-3930   #59-4589   
DIKL10	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
DLT   	= 100000	#6-361      8-742     
DLYCNT	= 174400	#9-1131    #20-2136   #44-3930   #59-4589   
DNBLK 	= ******  GX	*19-2026   *19-2049   *19-2060    19-2063   
DNFCN 	= ******  GX	*19-2027   *19-2028   *19-2029   
DNMSG 	  000442 R	#6-455      7-641     
DNSTS 	= ******  GX	*19-2030   *19-2034    19-2049   *19-2052   *19-2053    19-2056   *19-2056   *19-2071   
DONE  	= 000200	#21-2217   
DONSTR	  004412 R	 19-1996   #19-1999    19-2008    19-2017    19-2068   
DON10C	= 040000	#9-1131    #20-2136   #44-3930   #59-4589   
DON10S	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
DON11C	= 000100	#9-1131    #20-2136   #44-3930   #59-4589   
DON11S	= 000200	#9-1131    #20-2136   #44-3930   #59-4589   
DPS4  	= 040000	#9-1131    #20-2136   #44-3930   #59-4589   
DRESET	= 000100	#9-1131    #20-2136   #44-3930   #59-4589   
DRY   	= 000200	#6-378      7-625     
DR.DTE	= 000011	#9-1131    #20-2136   #44-3930   #59-4589   
DSEND 	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
DS04  	= 004000	#9-1131    #20-2136   #44-3930   #59-4589   
DS05  	= 002000	#9-1131    #20-2136   #44-3930   #59-4589   
DS06  	= 001000	#9-1131    #20-2136   #44-3930   #59-4589   
DTBUF 	= ******  GX	*9-1193    *9-1194     9-1197     9-1226     9-1231     9-1242     9-1292     9-1315    *9-1336    
                        *9-1337    
DTCNT 	= ******  GX	*9-1192     9-1227     9-1243     9-1335    
DTCW2 	= ******  GX	*9-1214     9-1294     9-1299     9-1302    
DTCW3 	= ******  GX	*9-1228    *9-1289    *9-1319     9-1322    
DTE   	= 010000	#6-388     
DTECMD	= 000451	#9-1131    #20-2136   #44-3930   #59-4589   
DTEFLG	= 000444	#9-1131    #20-2136   #44-3930   #59-4589   
DTEF11	= 000450	#9-1131    #20-2136   #44-3930   #59-4589   
DTEMTD	= 000455	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DTEMTI	= 000456	#9-1131    #20-2136   #44-3930   #59-4589   
DTEXP 	= 177340	#9-1142     9-1219     9-1225     9-1280     9-1333    
DTHD  	  001730 RG	#9-1147    
DTINI 	  002314 R	 9-1147     9-1147    #9-1188     9-1191     9-1245    
DTNRM 	  002240 R	#9-1153     9-1258    
DTOUT 	  002460 R	#9-1219     9-1261    
DTRTC 	= ******  GX	*9-1196    *9-1236    *9-1306    *9-1326    
DTSTK 	  002210 RG	 9-1147    #9-1147    
DTTSK 	= ******  GX	*9-1237    *9-1338    
DUNS  	  000460 R	#6-457      7-650     
DUPE  	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
DURE  	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
DVA   	= 004000	#6-347      7-593      7-600     
DV.EOF	= 000040	#23-2319    33-3044    38-3591    51-4298   
DV.F11	= 000400	#23-2322    33-3071   
DV.HNG	= 001000	#23-2323    33-3078    51-4302   
DV.IOP	= 000020	#23-2318    33-3068    51-4294   
DV.LOG	= 000100	#23-2320    33-3059    33-3075    51-4302    51-4306    51-4327   
DV.NXD	= 000001	#23-2314    33-3037    51-4284   
DV.OFL	= 000002	#23-2315    33-3037    33-3048    51-4284    51-4290   
DV.OIR	= 000004	#23-2316    33-3037    33-3048    33-3078    51-4284    51-4290    51-4302   
DV.SCN	= 000010	#23-2317    33-3092    33-3098   
DV.URE	= 000200	#23-2321    33-3075    51-4306   
DXFLAG	  014162 R	#60-4679   *61-4743    61-4794   *61-4796   
DXWD1 	= 000006	#3-134     
DXWD2 	= 000004	#3-135     
DXWD3 	= 000002	#3-136     
DXWRD1	= 002000	#9-1131    #20-2136   #44-3930   #59-4589   
D$$H11	= 000010	#1-45      
D.CCDR	= ******  GX	 50-4148    51-4363   
D.CLPT	= ******  GX	 30-2647    33-3185   
D.FEPD	= ******  GX	 17-1931    19-2000   
D1011 	= 000040	#9-1131    #20-2136   #44-3930   #59-4589   
EBSEL 	= 000100	#9-1131    #20-2136   #44-3930   #59-4589   
EBUSPC	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
EBUSPS	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
ECCMSK	  000504 R	#6-485      8-823      8-839     
ECCWRD	  000476 R	#6-483      8-832     
ECH   	= 000100	#6-394      8-757     
ECI   	= 004000	#6-420     
EDONES	= 040000	#9-1131    #20-2136   #44-3930   #59-4589   
EF.CRB	= 000010	#44-3947    49-4103    50-4149    50-4155    50-4173   
EF.CRC	= 000001	#44-3941    50-4114    50-4118    50-4198    52-4385   
EF.CRD	= 000002	#44-3943    50-4114    50-4118    50-4128    50-4217    57-4531   
EF.CRS	= 000004	#44-3945    49-4103    51-4268    51-4364    51-4367   
EF.IOD	= ******  GX	 8-725      9-1237     9-1338    
EF.LPC	= 000002	#20-2123    29-2543    29-2548    32-2914    35-3310   
EF.LPD	= 000001	#20-2121    29-2543    29-2548    30-2584    30-2633    32-2958    37-3458    38-3569    39-3688   
                         40-3725    41-3784    42-3853   
EF.LPQ	= 000004	#20-2125   
EF.LPS	= 000020	#20-2128    28-2524    33-3024    33-3186    33-3194   
EF.LPW	= 000040	#20-2130    28-2524    34-3228    39-3663   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

EF.NIR	= ******  GX	 16-1821    29-2543    29-2548    31-2788   
EF.PR1	= ******  GX	 17-1839    33-3027    50-4176    51-4271   
EF.QIO	= 000001	#59-4632   
EF.SEP	= 100000	#16-1816    16-1821   
EF.TEF	= 000400	#16-1817    16-1821    17-1874    19-1998   
EPTR  	= 000000	#9-1131    #20-2136   #44-3930   #59-4589   
ERMHER	  007645 R	 33-3060   #33-3145   
ERMHNG	  007662 R	 33-3079   #33-3147   
ERMNXD	  007573 R	 33-3038   #33-3139   
ERMOFL	  007613 R	 33-3049   #33-3141   
ERMVFE	  007626 R	 33-3054   #33-3143   
ERR   	= 100000	#6-374     #21-2208    37-3390   
ERR10C	= 010000	#9-1131    #20-2136   #44-3930   #59-4589   
ERR10S	= 020000	#9-1131    #20-2136   #44-3930   #59-4589   
ERR11C	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
ERR11S	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
EXSP  	  014162 R	#60-4675    61-4738   
E.FCRB	= 000004	#44-3946    50-4147   
E.FCRC	= 000001	#44-3940    47-4042   
E.FCRD	= 000002	#44-3942   
E.FCRS	= 000003	#44-3944    51-4362   
E.FLPC	= 000002	#20-2122    28-2490   
E.FLPD	= 000001	#20-2120   
E.FLPQ	= 000003	#20-2124    33-3132   
E.FLPS	= 000005	#20-2127    33-3184   
E.FLPW	= 000006	#20-2129    28-2492    34-3235   
E.FQIO	= 000001	#59-4631    66-5266    67-5304   
E.IOD 	= ******  GX	 6-443      6-445      9-1151    
E.NIR 	= ******  GX	 6-447      9-1149    
FCN   	  004462 R	 19-1973   #19-2021   
FCNBD 	  004470 R	 19-1976   #19-2023   
FEDRV 	  003474 R	 16-1832    16-1832   #17-1834    17-1880    17-1883    17-1918    17-1927   
FEHD  	  003174 RG	#16-1832   
FER   	= 000020	#6-396     
FESTK 	  003454 RG	 16-1832   #16-1832   
FETBL 	= ******  GX	*17-1849   *17-1884   *17-1915   *17-1926   *19-2011    19-2058   
FETSK 	= ******  GX	 17-1836   *17-1838   *19-1998   
FE.DET	= 040000	#16-1827    17-1849    17-1915    17-1926    18-1938    18-1949    19-2011   
FE.DTE	= 020000	#16-1828    17-1849    17-1926    19-1970    19-1984    19-1997    19-2011   
FE.SER	= 004000	#16-1829    17-1849    17-1884    17-1926    19-2011   
FE.STR	= 002000	#16-1830    19-2025    19-2067   
FILADR	  014276 R	#60-4693    60-4701    63-5032    63-5034   
FILBLK	  014242 R	#60-4692    61-4810    61-4831    61-4850    62-4916    66-5195   
FILCLS	  016524 R	 64-5114    64-5114    64-5120    64-5120   #66-5251   
FILERA	  015172 R	#62-4887    62-4922    62-4928    62-4932   
FILERR	  016056 R	 62-4887    64-5056    64-5066    64-5104    64-5109   #64-5119   
FILERX	  016066 R	 63-4978   #64-5120   
FILFNA	  016366 R	 61-4825    61-4825    61-4857    61-4857   #66-5191   
FILQIO	  016536 R	 61-4783    61-4783    62-4921    62-4921    66-5196    66-5247   #66-5266   
FMT22 	= 010000	#6-419     
FNDFIL	  014732 R	 61-4803   #61-4809    61-4877   
FORPRO	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

GO    	= 000001	#21-2227    32-2946    37-3400    37-3425    42-3880   
GOERR 	= 000001	#21-2244    37-3445   
HCE   	= 000200	#6-393     
HCI   	= 002000	#6-421     
HCRC  	= 000400	#6-392     
HDRBFE	  014240 R	#60-4691   *62-4911    66-5202   
HDRBLK	  014234 R	#60-4689   *62-4930   *66-5210    66-5224   
HDRBUF	  014236 R	#60-4690   *62-4909    64-5153   *64-5158    66-5223   
HDR64 	= ******	 63-4998   
HIBYTE	= 177400	#9-1131    #20-2136   #20-2185    30-2732   #44-3930   #59-4589   
H.IPC 	= 000076	#59-4636    63-5027   
H.ISP 	= 000100	#59-4637    63-5028   
H.LUN 	= 000132	#59-4639    61-4758   
H.LUT 	= ******  GX	 17-1903   
H.NLUN	= 000130	#59-4638    64-5048   
IAE   	= 002000	#6-390      8-677      8-686     
IE.ABO	= 177761	 17-1867    19-2012    39-3682   
IE.ACT	= 177771	 65-5176   
IE.BAD	= 177777	 19-2052   
IE.BLK	= 177754	 8-688      9-1208    
IE.DNR	= 177775	 7-622     
IE.IFC	= 177776	 7-547      9-1246     31-2838   
IE.OFL	= 177677	 41-3763   
IE.VER	= 177774	 8-675      9-1332     19-2071   
IE.WLK	= 177764	 8-683      9-1329    
IFLOP 	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
ILF   	= 000001	#6-400      8-677     
ILR   	= 000002	#6-399      8-677     
INITCR	  013416 RG	 49-4096    49-4096    49-4107    49-4107    50-4122    50-4122    50-4215    50-4215   #52-4383   
                         56-4503    56-4503   
INITLP	  010232 RG	 28-2515    28-2515    28-2528    28-2528    29-2552    29-2552   #35-3290   
INSHD 	  013622 RG	#60-4672   
INSMSG	  017126 R	 67-5284   #67-5360   
INSTAL	  014442 RG	 60-4672    60-4672   #61-4737    61-4740    65-5183   
INSTK 	  014102 RG	 60-4672   #60-4672   
INTENB	= 000100	#21-2218    32-2922    32-2926    32-2946    34-3265    35-3303    37-3400    37-3425    39-3668   
                         42-3880   
INTROF	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
INTRON	= 000040	#9-1131    #20-2136   #44-3930   #59-4589   
INTSON	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
INT10S	= 000400	#9-1131    #20-2136   #44-3930   #59-4589   
INT11C	= 002000	#9-1131    #20-2136   #44-3930   #59-4589   
INT11S	= 004000	#9-1131    #20-2136   #44-3930   #59-4589   
IOABT 	  004430 R	 19-1966   #19-2004   
IODN  	  004036 R	 17-1875   #17-1920   
IODNCR	  013606 R	 54-4449    54-4449    55-4482   #57-4531   
IO.ACW	= 007000	 62-4915   
IO.APV	= 014010	 61-4778   
IO.ATT	= 001400	 19-1977   
IO.DAC	= 010000	 31-2825    66-5251   
IO.FNA	= 004400	 66-5191   
IO.KIL	= 000012	 31-2844   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

IO.RLB	= 001000	 7-543      9-1203     31-2821   
IO.RVB	= 010400	 31-2823    66-5211    66-5233   
IO.WLB	= 000400	 7-545      9-1153     9-1200     19-2038    31-2817    33-3132    67-5304   
IO.WLV	= 000500	 9-1205    
IO.WVB	= 011000	 6-453      31-2819    66-5216   
IPAERR	  015436 R	#63-4971    63-5022   
IS.SUC	= 000001	 8-672      8-910      9-1321     19-2030    31-2851    42-3847   
KLPWRF	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
KT11  	= ******	 63-4970    63-5020   
LBLBFE	  014232 R	#60-4688   *62-4904    64-5051    64-5060   
LBLBLK	  014224 R	#60-4685   *62-4926    64-5063   *66-5235    66-5236   
LBLBUF	  014230 R	#60-4687   *62-4902    64-5149   *64-5157    66-5234   
LBLNUM	  014226 R	#60-4686   *63-5040    64-5063   
LOAD11	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
LOBYTE	= 000377	#20-2184    20-2185    39-3682    41-3763    42-3847   
LOINIT	= 000400	#21-2215   
LPALOC	= 000214	#20-2115   
LPBCTR	= 000006  G	#21-2248    32-2944    37-3392   *37-3409    37-3410   *37-3424   *42-3834   *42-3861   *42-3870   
LPBSAD	= 000004  G	#21-2246    37-3411   *37-3416   *42-3860   *42-3868   *42-3869   
LPCBUF	= 000014  G	#21-2261   *34-3245   *34-3248    37-3420   
LPCCTR	= 000015  G	#21-2262   
LPCEVF	= ******  GX	*29-2547    30-2584    31-2788    32-2914   
LPCKSM	= 000017  G	#21-2265    32-2943    37-3389   
LPCSA 	= ******  GX	*28-2507    30-2590    32-2919   *35-3302    37-3382    39-3666    40-3720    41-3756   
LPCSM 	= ******  GX	*32-2942   *32-2943    33-3161   *34-3257   *37-3388   *37-3389   
LPCSRA	= 000000  G	#21-2207   
LPCSRB	= 000002  G	#21-2229    33-3057    33-3081    33-3102    37-3445   
LPDCLR	  010302 R	 28-2502   #35-3304   
LPDINT	  006652 R	 28-2500   #32-2923   
LPEMSG	  007540 R	 33-3122    33-3132   #33-3133   
LPEMSX	  007553 R	 33-3118   #33-3137   
LPERUN	  007550 R	*33-3127   #33-3135   
LPEVFG	= ******  GX	*28-2522   *28-2523    28-2524    29-2547    29-2548    30-2633    32-2958    33-3024    33-3186   
                         33-3194    34-3228    35-3310    37-3458    38-3569    39-3663    39-3688    40-3725    41-3784   
                         42-3853   
LPEXPA	= ******  GX	 35-3301   
LPEXPZ	= ******  GX	 33-3160   
LPHD  	  004734 RG	#25-2394   
LPHUNG	= ******  GX	*32-2938   
LPINI 	  005324 R	 25-2394    25-2394   #28-2521   
LPIOD 	  005476 R	#30-2583   
LPITH 	= ******  GX	 30-2603    30-2622    32-2934    32-2950   *35-3305    37-3383   *37-3452    39-3661   *39-3665   
                         40-3718   *42-3832   
LPLOOP	  005410 R	#29-2542    32-2968   
LPMCB 	= ******  GX	 37-3415   *42-3865    42-3868   
LPMKT 	  006616 R	#32-2913   
LPMRKT	  005234 R	#28-2489    28-2525   
LPNIR 	  006356 R	 30-2658   #31-2787    31-2855    31-2881   
LPPCTR	= 000010  G	#21-2252   *30-2705    34-3261   *34-3261    37-3438   *37-3438    39-3669   *39-3669    40-3722   
                        *40-3722   
LPQDPB	  007516 R	*33-3123    33-3128   #33-3131   
LPRAMD	= 000012  G	#21-2256   *34-3247    37-3417   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LPRMA 	= ******  GX	 30-2671   *30-2676    30-2687   *30-2726    30-2729    39-3657   
LPRMC 	= ******  GX	*30-2677    30-2692    30-2711   *30-2741   
LPRMZ 	= ******  GX	 30-2672    30-2696   *30-2724    30-2730   
LPRTRY	= 000012	#20-2116    33-3162    41-3755   
LPRTY 	= ******  GX	*32-2939    33-3073    33-3163   *37-3398   *37-3447   *41-3755   
LPSIZE	= ******  GX	 30-2653    32-2964    35-3307    38-3537    39-3654    40-3715   
LPSSTV	  005260 R	#28-2494    28-2526   
LPSTBK	= ******  GX	 33-3030    33-3159    33-3167    33-3177   
LPSTK 	  005214 RG	 25-2394   #25-2394   
LPSTLN	= ******  GX	 33-3167    33-3181   
LPTBL 	= ******  GX	 30-2586    30-2646    32-2917    35-3293    38-3537    39-3654    40-3715   
LPTDAT	= 000016  G	#21-2264   
LPTHD 	= ******  GX	 30-2595    30-2631   *30-2743    32-2930    33-3062    39-3671    41-3768   *41-3783   
LPTPAR	= 000040	#21-2239    33-3057    37-3445   
LPTPBT	= 010000	#21-2231   
LPTRP4	  005262 R	 28-2495   #28-2499   
LPUNIT	= ******  GX	*37-3376    37-3378   
LPUTBL	= ******  GX	 31-2814    37-3381   
LPWRUP	  005316 R	#28-2514    28-2527   
LP.CLR	= 002000	#26-2419    33-3055    33-3084    34-3237    34-3239   
LP.EOF	= 000200	#26-2427    30-2689    33-3042    34-3254    34-3256   
LP.F10	= 000400	#26-2424    30-2635    30-2762    33-3110    33-3195    38-3539   
LP.HNG	= 100000	#26-2402    30-2635    32-2932    32-2960    33-3076    42-3831   
LP.LIP	= 001000	#26-2421    30-2608    30-2635    30-2665    30-2668    30-2694    34-3240    39-3659    42-3824   
LP.MCH	= 010000	#26-2411    30-2635    37-3407    37-3423    42-3826    42-3831    42-3871   
LP.PZI	= 020000	#26-2408    30-2703    30-2707    33-3090    37-3436   
LP.SST	= 040000	#26-2405    30-2614    30-2689    32-2957    33-3023    33-3197    37-3457    38-3568    41-3765   
LP.UNT	= 000003	#26-2431    33-3125    33-3179    35-3296    37-3380   
LP.WAT	= 004000	#26-2414    30-2620    30-2635    32-2928    33-3094    33-3100    33-3115    39-3656    40-3717   
                         42-3831   
L$BBLK	= 000024	#59-4651   
L$BFLG	= 000010	#59-4645   
L$BHRB	= 000022	#59-4650    62-4930   
L$BLDZ	= 000014	#59-4647   
L$BMXZ	= 000016	#59-4648   
L$BPAR	= 000004	#59-4644   
L$BPRI	= 000012	#59-4646   
L$BSA 	= 000020	#59-4649   
L$BTSK	= 000000	#59-4643   
L$$P20	= 000002	#1-39       30-2587    32-2916    35-3292    38-3537    39-3654    40-3715   
MCPE  	= 020000	#6-346      8-673     
MDPE  	= 000400	#6-368      8-742     
MEFCN 	  004472 R	 19-2022   #19-2025   
MEMPAR	= 000020	#21-2240    33-3057    37-3445   
MKDNR 	  000404 RG	#6-449      7-646     
MKSCDP	  005246 R	#28-2491    34-3233   
MNTBLK	  014410 R	#60-4704    61-4780   
MNTSYD	  014510 R	#61-4752    61-4799   
MODE00	= 000004	#21-2222    30-2669    30-2695    30-2698   
MODE01	= 000010	#21-2221    30-2669   
MOL   	= 010000	#6-375      7-625     
MPE11 	= 001000	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

MRKDT 	  002260 R	#9-1155     9-1259    
MSGDPB	  000422 R	#6-453     *7-641      7-645     *7-650     
MSGSIZ	= 000016	 6-453     #6-460     
MXF   	= 001000	#6-367      8-742     
M.KTAE	= 000010	#6-449     #9-1155    #28-2490   #28-2492   #47-4042   
M.KTEF	= 000002	#6-449     #9-1155    #28-2490   #28-2492   #47-4042   
M.KTMG	= 000004	#6-449     #9-1155    #28-2490   #28-2492   #47-4042   
M.KTUN	= 000006	#6-449     #9-1155    #28-2490   #28-2492   #47-4042   
NED   	= 010000	#6-364      8-679     
NEM   	= 004000	#6-365      8-679     
NODADR	= ******  GX	 17-1846   *17-1847    17-1879   *17-1885    17-1922   *17-1923    19-1974    19-2004   *19-2010   
NTRDMS	  002276 R	 9-1153    #9-1159     9-1160    
NTRDSZ	= 000016	 9-1153    #9-1160    
NULSTP	= 000040	#9-1131    #20-2136   #44-3930   #59-4589   
NUPE  	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
NXTHDR	  016406 R	 64-5055    64-5055    64-5103    64-5103   #66-5202   
N.DID 	= 000024	#59-4665   
N.FID 	= 000000	#59-4659    61-4850    62-4916   
N.FNAM	= 000006	#59-4660    61-4810    61-4831   
N.FTYP	= 000014	#59-4661   
N.FVER	= 000016	#59-4662   
N.NEXT	= 000022	#59-4664   
N.STAT	= 000020	#59-4663   
OFFLIN	= 000200	#21-2237   
ONLINE	= 004000	#21-2212    33-3046    34-3225    41-3758   
OPI   	= 020000	#6-387     
OPTVFU	= 004000	#21-2232    33-3102   
PAGZRO	= 040000	#21-2209    33-3088    34-3259    37-3390    37-3434   
PARENB	= 000002	#21-2226    32-2946    34-3265    35-3303    37-3400    37-3425    39-3668    42-3880   
PARFND	  015474 R	 63-4962   #63-4982   
PARMSG	  017147 R	 67-5295   #67-5362   
PBTHRD	= 000004	#20-2175    20-2177    20-2178    20-2179    30-2753    31-2863    31-2864   
PERCLR	= 001000	#9-1131    #20-2136   #44-3930   #59-4589   
PGE   	= 002000	#6-366      8-742     
PGM   	= 001000	#6-377     
PHYS  	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
PIDENT	= 000000	#9-1131    #20-2136   #44-3930   #59-4589   
PRI7  	= 000340	#9-1131    #20-2136   #44-3930   #59-4589   
PROPNT	= 000021	#9-1131    #20-2136   #44-3930   #59-4589   
PRTOFF	= 004000	#9-1131    #20-2136   #44-3930   #59-4589   
PR0   	= 000000	#9-1131    #20-2136   #44-3930   #59-4589   
PR1   	= 000040	#9-1131    #20-2136   #44-3930   #59-4589   
PR2   	= 000100	#9-1131    #20-2136   #44-3930   #59-4589   
PR3   	= 000140	#9-1131    #20-2136   #44-3930   #59-4589   
PR4   	= 000200	#9-1131    #20-2136    32-2941    34-3268   #44-3930   #59-4589   
PR5   	= 000240	#9-1131    #20-2136   #44-3930   #59-4589   
PR6   	= 000300	#9-1131    #20-2136   #44-3930   #59-4589   
PR7   	= 000340	#9-1131     19-2035   #20-2136    29-2546    30-2630   #44-3930    50-4116   #59-4589   
PS    	= 177776	 7-591      7-631      7-643     #9-1131     9-1239     9-1256     17-1835    17-1835    18-1950   
                         18-1950    18-1955    19-2035    19-2035    19-2055   #20-2136    29-2546    29-2546    29-2549   
                         30-2630    30-2630    30-2637    32-2941    32-2941    32-2953    34-3268    34-3268    34-3270   
                         37-3376    41-3767    41-3767   #44-3930    50-4116    50-4116    50-4119   #59-4589    64-5123   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         64-5123    65-5165    65-5165   
PSWW1 	= 000005	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW10	= 000014	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW11	= 000015	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW12	= 000016	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW13	= 000017	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW2 	= 000006	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW3 	= 000007	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW4 	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW5 	= 000011	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW6 	= 000012	#9-1131    #20-2136   #44-3930   #59-4589   
PSWW7 	= 000013	#9-1131    #20-2136   #44-3930   #59-4589   
PUDADR	  014222 R	#60-4684   *61-4760    61-4789   *61-4876    63-4989    64-5072   
PULSE 	= 000020	#9-1131    #20-2136   #44-3930   #59-4589   
PUTR50	  017030 R	 67-5291    67-5291    67-5298    67-5298   #67-5322   
PUTR51	  017040 R	 67-5323    67-5323   #67-5331   
PUTSTR	  017020 R	 67-5285    67-5285    67-5287    67-5287    67-5289    67-5289    67-5296    67-5296   #67-5313   
                         67-5314   
QIOSTS	  014302 R	#60-4694    66-5266    66-5269   
QSIZE 	= 000023	#9-1131    #20-2136   #44-3930   #59-4589   
Q.IOAE	= 000012	#6-453     #9-1153    #33-3132   
Q.IOEF	= 000006	#6-453     #9-1153    #33-3132   
Q.IOFN	= 000002	#6-453     #9-1153    #33-3132   
Q.IOLU	= 000004	#6-453     #9-1153    #33-3132   
Q.IOPL	= 000014	#6-453     *7-641     *7-650     #9-1153    *33-3123   #33-3132   
Q.IOPR	= 000007	#6-453     #9-1153    #33-3132   
Q.IOSB	= 000010	#6-453     #9-1153    #33-3132   
RAMIS0	= 010000	#9-1131    #20-2136   #44-3930   #59-4589   
RAMLOD	= 000003	#21-2225    30-2698   
RAMPAR	= 000010	#21-2241    33-3057    33-3081    37-3445   
RCVBLK	  014164 R	#60-4681    61-4739    61-4771   
REDHDR	  016422 R	 62-4931    62-4931   #66-5210   
REDLBL	  016464 R	 62-4927    62-4927    64-5065    64-5065   #66-5232   
REQBLK	  014170 R	#60-4682    60-4683    61-4830    63-4943    64-5124    65-5168    65-5169    67-5290   
REQTSK	  016250 R	 64-5115   #65-5165   
RETALL	  016160 R	#64-5141   
RETBUF	  016202 R	 62-4891    62-4891    64-5113    64-5113    64-5142   #64-5147   
RETNOD	  016072 R	 61-4881   #64-5122    65-5179   
RETRY 	= 000005	#6-434      7-551     #9-1140     9-1196    
RETXXX	  016462 R	 66-5203    66-5205   #66-5228   
RFMAD0	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
RFMAD1	= 040000	#9-1131    #20-2136   #44-3930   #59-4589   
RFMAD2	= 020000	#9-1131    #20-2136   #44-3930   #59-4589   
RFMAD3	= 010000	#9-1131    #20-2136   #44-3930   #59-4589   
RM    	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
RMR   	= 000004	#6-398      8-677     
RPAS  	= 000016	#6-404     
RPBA  	= 000004	#6-353     
RPBUF 	= ******  GX	*7-536     *7-541     *7-542     *7-550      7-606      7-630      7-636      7-637     *8-723     
                        *8-724      8-818      8-934     
RPCNT 	= ******  GX	*7-534      7-607      8-770     
RPCS1 	= 000000	#6-343     
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RPCS2 	= 000010	#6-359      7-586      7-603      8-679      8-742     
RPDA  	= 000006	#6-355     
RPDBR 	= 000022	#6-408     
RPDC  	= 000034	#6-424     *7-629     
RPDS  	= 000012	#6-372      7-623     
RPDT  	= 000026	#6-412     
RPEC1 	= 000044	#6-426      8-803     
RPEC2 	= 000046	#6-428      8-826     
RPER1 	= 000014	#6-383      7-627      8-676     
RPEXP 	= 176700	#6-339      7-586      7-589      7-603      8-663     
RPHD  	  000070 RG	#6-441     
RPLA  	= 000020	#6-406     
RPMR  	= 000024	#6-410     
RPOF  	= 000032	#6-417     
RPRNA 	= ******  GX	*7-533      7-602      7-635      8-719     
RPRTC 	= ******  GX	*7-551     *8-707     
RPSN  	= 000030	#6-414     
RPSTK 	  000350 RG	 6-441     #6-441     
RPTSK 	= ******  GX	*8-725     
RPUNIT	= ******  GX	*7-535      7-588      7-604     
RPWC  	= 000002	#6-351      8-768      8-919     
RPWLO 	  000400 R	#6-447      7-513     
RSTERR	= 001000	#21-2214    34-3265    35-3303    39-3668   
RSX$$E	= 000041	#3-100     
RSX$$F	= 000101	#3-108     #3-111      3-119     
RSX$$K	= 000126	#3-104     
RSX$$V	= 000013	#3-99      
RWRBLK	  016516 R	 66-5225    66-5225    66-5237    66-5237   #66-5246   
RWRHDR	  016440 R	 66-5212   #66-5222   
R$$E16	= ******	 8-860      8-998     
R$$E18	= 000001	#6-322      6-481      8-792      8-937     
R$$JPO	= ******	 6-462      7-553      7-612      8-665      8-772      8-784      8-913      8-1020    
R$$11D	= 000001	#1-48      
R.AT  	= ******  GX	 17-1898   
R.DP  	= ******  GX	 17-1907   
R.FC  	= ******  GX	 7-543      7-545      9-1200     9-1203     9-1205     17-1891    19-1975    19-1977    31-2815   
                         31-2844   
R.LU  	= ******  GX	 17-1893   
R.PB  	= ******  GX	 7-561      7-562     *7-574     *7-580      7-605      7-629      8-720      9-1209     9-1212    
                         17-1911    17-1912    19-1979    19-1980    30-2753    31-2863    31-2867   
R50TBL	  017112 R	 67-5337   #67-5352   
SCD   	= 000040	#9-1131    #20-2136   #44-3930   #59-4589   
SETLUN	  015652 R	#64-5048   
SETSTD	  015342 R	#63-4941   
SF.IR 	= 040000	#59-4623    65-5167   
SF.TA 	= 000001	#59-4622    65-5167   
SNSTR 	  004100 R	 17-1916    17-1916   #17-1929    18-1953    18-1953    19-2064    19-2064   
SSTSCR	  013010 R	 50-4162    50-4162    50-4181    50-4181   #51-4267   
SSTSLP	  007040 R	 30-2616    30-2616   #33-3021   
STAT  	= 174434	#9-1131    #20-2136   #44-3930   #59-4589   
STATD 	= 000034	#3-126     
STATUS	= 000022	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

STDADR	= 014202 R	#60-4683    63-4941    64-5141   *64-5145    65-5166    67-5292   
STSWD 	= ******  GX	*17-1848   *17-1917    17-1920    17-1921   *17-1924   *19-1982   *19-1983   
SWR   	= 177570	#9-1131    #20-2136   #44-3930   #59-4589   
SWSLLT	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
SYFLAG	  014163 R	#60-4680    61-4802   *61-4805   
SYMNTD	  014644 R	 61-4762    61-4784   #61-4788   
SYMNT1	  014710 R	 61-4793    61-4795   #61-4801   
SYNTIM	= 000004	#21-2242    33-3057    37-3445   
S.DRFN	= 000034	#59-4666    60-4692   
S.FW  	= ******  GX	*65-5167   
S.TD  	= ******  GX	 67-5293   
TASKNF	  015066 R	 61-4754    61-4786    61-4826   #61-4863    61-4868    61-4870    61-4872    61-4875   
TB.ABO	= 040000	#20-2166    30-2680    39-3679    39-3682   
TB.DON	= 100000	#20-2165    38-3611    39-3682    41-3763    42-3847   
TB.EOF	= 020000	#20-2167    20-2171    30-2685    38-3593   
TB.LPC	= 010000	#20-2168    20-2171    30-2701    38-3584   
TB.RMD	= 004000	#20-2169    20-2171    30-2715    38-3599   
TB.SFN	= 036000	#20-2171    30-2682    42-3837   
TB.VFD	= 002000	#20-2170    20-2171    38-3605   
TENAD1	= 174410	#9-1131    #20-2136   #44-3930   #59-4589   
TENAD2	= 174412	#9-1131    #20-2136   #44-3930   #59-4589   
TESTLP	  010042 R	 30-2624    30-2624   #34-3224   
TEST00	= 000400	#21-2235   
TEST01	= 001000	#21-2234   
TEST02	= 002000	#21-2233   
TNAD1 	= 000010	#3-132     
TNAD2 	= 000012	#3-133     
TNCERR	  015462 R	#63-4976    63-5036   
TNFERR	  015156 R	 61-4866   #61-4879   
TOBM  	= 000004	#9-1131    #20-2136   #44-3930   #59-4589   
TOD   	= 000003	#9-1131    #20-2136   #44-3930   #59-4589   
TOIP  	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
TOIT  	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
TO10  	= 000200	#9-1131    #20-2136   #44-3930   #59-4589   
TO10AD	= 174420	#9-1131    #20-2136   #44-3930   #59-4589   
TO10BC	= 174414	#9-1131    #20-2136   #44-3930   #59-4589   
TO10BM	= 000001	#9-1131    #20-2136   #44-3930   #59-4589   
TO10DB	= 000400	#9-1131    #20-2136   #44-3930   #59-4589   
TO10DN	= 100000	#9-1131    #20-2136   #44-3930   #59-4589   
TO10DT	= 174424	#9-1131    #20-2136   #44-3930   #59-4589   
TO10ER	= 020000	#9-1131    #20-2136   #44-3930   #59-4589   
TO10PK	= ******  GX	 17-1888   
TO11  	= 000100	#9-1131    #20-2136   #44-3930   #59-4589   
TO11AD	= 174422	#9-1131    #20-2136   #44-3930   #59-4589   
TO11BC	= 174416	#9-1131    #20-2136   #44-3930   #59-4589   
TO11BM	= 020000	#9-1131    #20-2136   #44-3930   #59-4589   
TO11DB	= 004000	#9-1131    #20-2136   #44-3930   #59-4589   
TO11DN	= 000200	#9-1131    #20-2136   #44-3930   #59-4589   
TO11DT	= 174426	#9-1131    #20-2136   #44-3930   #59-4589   
TO11ER	= 000002	#9-1131    #20-2136   #44-3930   #59-4589   
TRE   	= 040000	#6-345      8-673     
TSKFND	  015210 R	 61-4858   #62-4898   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 14

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TSKLUN	= 000002	#59-4627    61-4753    61-4758    61-4874    66-5266   
TSKMSG	  017140 R	 67-5288   #67-5361   
TSTMOD	= 000001	#21-2223   
TTBERR	  015450 R	#63-4974    63-5019   
TTPEN 	= ******  GX	 6-441      9-1147     16-1832    25-2394    47-4017    60-4672   
TYPBUF	  014306 R	#60-4695    67-5283    67-5302   
TYPMSG	  016616 R	 61-4785    61-4785    61-4804    61-4804    61-4880    61-4880    63-4968    63-4968    63-4971   
                         63-4971    63-4974    63-4974    63-4976    63-4976    64-5119    64-5119    65-5179    65-5179   
                        #67-5282   
T.BA  	= ******  GX	 63-4997    63-5021   
T.HBCT	= ******  GX	 30-2744   *31-2868    33-3069    42-3863   
T.HCAD	= ******  GX	*30-2687    30-2693    30-2704    30-2731   *31-2869   *37-3411    38-3581    38-3590    42-3860   
T.HCBC	= ******  GX	 30-2601    30-2679   *30-2692   *30-2693   *31-2870   *37-3410    38-3540   *38-3541   *38-3612   
                        *39-3679    39-3680   *39-3682   *41-3763    42-3834    42-3837   *42-3847   
T.HEMA	= 177774	#20-2177   *31-2871    42-3875   
T.HIBC	= 177776	#20-2179    30-2751    31-2864   
T.HVFC	= 177775	#20-2178   *31-2875    42-3865   *42-3867   
T.PN  	= ******  GX	 63-4959    63-4961   
T.PZ  	= ******  GX	 63-5018   
T.SZ  	= ******  GX	 63-4964   
T10AD 	= 000020	#3-130     
T11AD 	= 000022	#3-129     
T11BC 	= 000016	#3-131     
T50TBL	  017102 R	 67-5331   #67-5350   
UF.TL 	= ******  GX	 61-4869   
UNASG1	= 000032	#9-1131    #20-2136   #44-3930   #59-4589   
UNASG2	= 000033	#9-1131    #20-2136   #44-3930   #59-4589   
UNASG3	= 000034	#9-1131    #20-2136   #44-3930   #59-4589   
UNASG4	= 000035	#9-1131    #20-2136   #44-3930   #59-4589   
UNASG5	= 000036	#9-1131    #20-2136   #44-3930   #59-4589   
UNASG6	= 000037	#9-1131    #20-2136   #44-3930   #59-4589   
UNS   	= 040000	#6-386      7-627      8-677     
UPE   	= 020000	#6-363      8-742     
U.ACP 	= ******  GX	*61-4776   
U.DACP	= ******  GX	 61-4774   
U.DN  	= ******  GX	 61-4790    61-4874    64-5078   
U.FB  	= ******  GX	 61-4869   
U.RP  	= ******  GX	 17-1904    61-4759    61-4867   
U.SZ  	= 000050	#59-4621    61-4747    61-4864    63-4993    64-5083   
U.UN  	= ******  GX	 61-4791    61-4874    64-5080   
U.VA  	= ******  GX	 61-4761    61-4871   
VFCFF 	  006604 R	 31-2830   #31-2887   
VFCTBL	  006602 R	 31-2873   #31-2885   
VFUERR	= 000100	#21-2238    37-3445   
VFULOD	= 000002	#21-2224    30-2695   
VFURDY	= 010000	#21-2211    33-3051   
VV    	= 000100	#6-379      7-625     
WCE   	= 040000	#6-362      8-742     
WCF   	= 000040	#6-395     
WEP   	= 000010	#9-1131    #20-2136   #44-3930   #59-4589   
WFDNR 	  000416 RG	#6-451      7-647     
WFDTD 	  002234 R	#9-1151     9-1241    
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 15

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

WFDTQ 	  002230 R	#9-1149     9-1188    
WFEF1 	  003166 R	#16-1821    17-1834   
WFMKT 	  002272 R	#9-1157     9-1260    
WLE   	= 004000	#6-389      8-677      8-681     
WRL   	= 004000	#6-376     
WRTHDR	  016434 R	 64-5108    64-5108    66-5204    66-5204   #66-5216   
W.TSEF	= 000002	#6-443     #6-447     #6-451     #9-1149    #9-1151    #9-1157    
ZSTOP 	= 040000	#9-1131    #20-2136   #44-3930   #59-4589   
$CDINT	  013442 RG	#54-4436   
$CD11 	= 000001	#1-40      
$DBDTE	= 000001	#1-46      
$DH11 	= 000001	#1-44      
$DIRAC	= 000001	#6-318      7-518     #16-1783    17-1855    19-2005   
$DIV  	  000032 RG	#4-259      7-577      7-577      8-808      8-808      67-5335    67-5335   
$DSW  	= ******  GX	 65-5171    65-5176   
$DTA  	= 000001	#1-56       8-1089    
$DTE  	= 000001	#1-47      
$DTINT	  002646 RG	#9-1268    
$FE   	= 000001	#1-42      
$F11  	= 000001	#1-43      
$LPINT	  010332 RG	#37-3375   
$LP20 	= 000001	#1-38      
$MUL  	  000000 RG	#4-232     
$RP04 	= 000001	#1-41      
$RX11 	= ******	 10-1349   
$TOP10	= 000001	#1-36       1-54       3-109     
$TOP20	= ******	 1-62       3-116     
$T1091	= ******	 1-50       1-55       3-110     
$$    	= 000037	#7-515      7-515     #7-577      7-577     #7-638      7-638     #8-726      8-726     #8-808     
                         8-808     #8-827      8-827     #8-837      8-837     #8-843      8-843     #8-844      8-844     
                        #8-845      8-845     #8-852      8-852     #9-1190     9-1190    #9-1244     9-1244    #9-1339    
                         9-1339    #17-1853    17-1853   #17-1868    17-1868   #17-1873    17-1873   #17-1882    17-1882   
                        #17-1916    17-1916   #17-1925    17-1925   #18-1953    18-1953   #19-1999    19-1999   #19-2013   
                         19-2013   #19-2064    19-2064   #28-2515    28-2515   #28-2528    28-2528   #29-2552    29-2552   
                        #30-2616    30-2616   #30-2624    30-2624   #30-2648    30-2648   #30-2674    30-2674   #30-2719   
                         30-2719   #30-2754    30-2754   #30-2761    30-2761   #31-2791    31-2791   #31-2846    31-2846   
                        #31-2854    31-2854   #31-2880    31-2880   #32-2951    32-2951   #33-3086    33-3086   #33-3187   
                         33-3187   #34-3269    34-3269   #37-3394    37-3394   #37-3439    37-3439   #37-3459    37-3459   
                        #38-3570    38-3570   #38-3575    38-3575   #38-3618    38-3618   #39-3689    39-3689   #40-3726   
                         40-3726   #41-3785    41-3785   #41-3790    41-3790   #42-3854    42-3854   #49-4096    49-4096   
                        #49-4107    49-4107   #50-4122    50-4122   #50-4150    50-4150   #50-4162    50-4162   #50-4181   
                         50-4181   #50-4215    50-4215   #51-4365    51-4365   #54-4449    54-4449   #55-4478    55-4478   
                        #56-4503    56-4503   #57-4532    57-4532   #61-4742    61-4742   #61-4775    61-4775   #61-4783   
                         61-4783   #61-4785    61-4785   #61-4804    61-4804   #61-4825    61-4825   #61-4857    61-4857   
                        #61-4880    61-4880   #62-4891    62-4891   #62-4900    62-4900   #62-4907    62-4907   #62-4921   
                         62-4921   #62-4927    62-4927   #62-4931    62-4931   #63-4968    63-4968   #63-4971    63-4971   
                        #63-4974    63-4974   #63-4976    63-4976   #64-5055    64-5055   #64-5065    64-5065   #64-5103   
                         64-5103   #64-5108    64-5108   #64-5113    64-5113   #64-5114    64-5114   #64-5119    64-5119   
                        #64-5120    64-5120   #64-5125    64-5125   #64-5137    64-5137   #64-5144    64-5144   #64-5151   
                         64-5151   #64-5155    64-5155   #65-5170    65-5170   #65-5179    65-5179   #66-5204    66-5204   
                        #66-5225    66-5225   #66-5237    66-5237   #67-5285    67-5285   #67-5287    67-5287   #67-5289   
                         67-5289   #67-5291    67-5291   #67-5296    67-5296   #67-5298    67-5298   #67-5323    67-5323   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 16

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #67-5335    67-5335   
$$$   	= 000251 R	#33-3202    33-3202   #33-3202    33-3202   #33-3202    33-3202   #33-3202    33-3202   #33-3202   
                         33-3202    33-3202    33-3202    33-3202    33-3202    33-3202   #33-3202    33-3202    33-3202   
                         33-3202    33-3202    33-3202   #33-3202    33-3202    33-3202    33-3202    33-3202    33-3202   
                        #33-3202    33-3202    33-3202    33-3202    33-3202    33-3202   #33-3202   #35-3311    35-3311   
                        #35-3311    35-3311   #35-3311    35-3311   #35-3311    35-3311    35-3311    35-3311    35-3311   
                         35-3311   #35-3311    35-3311    35-3311    35-3311    35-3311   #35-3311    35-3311    35-3311   
                         35-3311    35-3311   #35-3311   #37-3464    37-3464   #37-3464    37-3464   #37-3464    37-3464   
                        #37-3464    37-3464    37-3464    37-3464    37-3464    37-3464   #37-3464    37-3464    37-3464   
                         37-3464    37-3464   #37-3464    37-3464    37-3464    37-3464    37-3464   #37-3464   #38-3623   
                         38-3623   #38-3623    38-3623   #38-3623    38-3623   #38-3623    38-3623    38-3623    38-3623   
                         38-3623    38-3623   #38-3623    38-3623    38-3623    38-3623    38-3623   #38-3623    38-3623   
                         38-3623    38-3623    38-3623   #38-3623   #39-3691    39-3691   #39-3691    39-3691   #39-3691   
                         39-3691   #39-3691    39-3691    39-3691    39-3691    39-3691    39-3691   #39-3691    39-3691   
                         39-3691    39-3691    39-3691   #39-3691    39-3691    39-3691    39-3691    39-3691   #39-3691   
                        #40-3728    40-3728   #40-3728    40-3728    40-3728    40-3728   #40-3728   #41-3791    41-3791   
                        #41-3791    41-3791   #41-3791    41-3791    41-3791    41-3791    41-3791   #41-3791    41-3791   
                         41-3791    41-3791   #41-3791   #61-4785    61-4785   #61-4804    61-4804   #61-4880    61-4880   
                        #63-4968    63-4968   #63-4971    63-4971   #63-4974    63-4974   #63-4976    63-4976   #64-5119   
                         64-5119   #65-5179    65-5179   
$$$ARG	= 000003	#6-453      6-453     #6-453      6-453     #6-453      6-453     #9-1153     9-1153    #9-1153    
                         9-1153    #9-1153     9-1153    #33-3132    33-3132   #33-3132    33-3132   #33-3132    33-3132   
                        #33-3132    33-3132   #61-4753    61-4753   #61-4753    61-4753   #61-4753    61-4753   #61-4753   
                         61-4753    61-4753    61-4753    61-4753    61-4753    61-4753    61-4753    61-4753    61-4753   
                         61-4753   #61-4874    61-4874   #61-4874    61-4874   #61-4874    61-4874   #61-4874    61-4874   
                         61-4874    61-4874    61-4874    61-4874    61-4874    61-4874    61-4874    61-4874    61-4874   
                        #66-5266    66-5266    66-5266    66-5266    66-5266    66-5266    66-5266    66-5266    66-5266   
                         66-5266    66-5266    66-5266   #67-5304    67-5304    67-5304    67-5304    67-5304    67-5304   
                         67-5304    67-5304    67-5304    67-5304    67-5304    67-5304   
$$$GLB	= ******	 6-443      6-443      6-445      6-445      6-447      6-447      6-449      6-449      6-449     
                         6-449      6-449      6-451      6-451      6-453      6-453      6-453      6-453      6-453     
                         6-453      6-453      6-453      9-1149     9-1149     9-1151     9-1151     9-1153     9-1153    
                         9-1153     9-1153     9-1153     9-1153     9-1153     9-1153     9-1155     9-1155     9-1155    
                         9-1155     9-1155     9-1157     9-1157     16-1821    28-2490    28-2490    28-2490    28-2490   
                         28-2490    28-2492    28-2492    28-2492    28-2492    28-2492    33-3132    33-3132    33-3132   
                         33-3132    33-3132    33-3132    33-3132    33-3132    47-4042    47-4042    47-4042    47-4042   
                         47-4042   
$$$OST	= 000012	#6-443      6-443      6-443     #6-443     #6-445      6-445      6-445     #6-445     #6-447     
                         6-447      6-447     #6-447     #6-449      6-449      6-449     #6-449      6-449      6-449     
                        #6-449      6-449      6-449     #6-449      6-449      6-449     #6-449     #6-451      6-451     
                         6-451     #6-451     #6-453      6-453      6-453     #6-453      6-453      6-453     #6-453     
                         6-453      6-453     #6-453      6-453      6-453     #6-453      6-453      6-453     #6-453     
                         6-453      6-453     #6-453      6-453     #9-1149     9-1149     9-1149    #9-1149    #9-1151    
                         9-1151     9-1151    #9-1151    #9-1153     9-1153     9-1153    #9-1153     9-1153     9-1153    
                        #9-1153     9-1153     9-1153    #9-1153     9-1153     9-1153    #9-1153     9-1153     9-1153    
                        #9-1153     9-1153     9-1153    #9-1153     9-1153    #9-1155     9-1155     9-1155    #9-1155    
                         9-1155     9-1155    #9-1155     9-1155     9-1155    #9-1155     9-1155     9-1155    #9-1155    
                        #9-1157     9-1157     9-1157    #9-1157    #28-2490    28-2490    28-2490   #28-2490    28-2490   
                         28-2490   #28-2490    28-2490    28-2490   #28-2490    28-2490    28-2490   #28-2490   #28-2492   
                         28-2492    28-2492   #28-2492    28-2492    28-2492   #28-2492    28-2492    28-2492   #28-2492   
                         28-2492    28-2492   #28-2492   #33-3132    33-3132    33-3132   #33-3132    33-3132    33-3132   
                        #33-3132    33-3132    33-3132   #33-3132    33-3132    33-3132   #33-3132    33-3132    33-3132   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 17

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                        #33-3132    33-3132    33-3132   #33-3132    33-3132   #47-4042    47-4042    47-4042   #47-4042   
                         47-4042    47-4042   #47-4042    47-4042    47-4042   #47-4042    47-4042    47-4042   #47-4042   
$$$T1 	= 000011	#61-4739    61-4739   #66-5266    66-5266   #67-5304    67-5304   
$$$T2 	= 000000	#65-5169    65-5169   
$$$$  	= 000002	#33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202   
                         33-3202    33-3202   #33-3202    33-3202   #33-3202    33-3202   #33-3202    33-3202    33-3202   
                        #33-3202    33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202    33-3202   #33-3202   
                         33-3202   #33-3202    33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202    33-3202   
                         33-3202   #33-3202    33-3202   #33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202   
                         33-3202    33-3202   #33-3202    33-3202    33-3202   #33-3202    33-3202   #35-3311    35-3311   
                        #35-3311    35-3311    35-3311   #35-3311    35-3311    35-3311   #35-3311    35-3311   #35-3311   
                         35-3311   #35-3311    35-3311    35-3311   #35-3311    35-3311    35-3311   #35-3311    35-3311   
                        #35-3311    35-3311   #35-3311    35-3311    35-3311   #35-3311    35-3311    35-3311   #35-3311   
                         35-3311   #37-3464    37-3464   #37-3464    37-3464    37-3464   #37-3464    37-3464    37-3464   
                        #37-3464    37-3464   #37-3464    37-3464   #37-3464    37-3464    37-3464   #37-3464    37-3464   
                         37-3464   #37-3464    37-3464   #37-3464    37-3464   #37-3464    37-3464    37-3464   #37-3464   
                         37-3464    37-3464   #37-3464    37-3464   #38-3623    38-3623   #38-3623    38-3623    38-3623   
                        #38-3623    38-3623    38-3623   #38-3623    38-3623   #38-3623    38-3623   #38-3623    38-3623   
                         38-3623   #38-3623    38-3623    38-3623   #38-3623    38-3623   #38-3623    38-3623   #38-3623   
                         38-3623    38-3623   #38-3623    38-3623    38-3623   #38-3623    38-3623   #39-3691    39-3691   
                        #39-3691    39-3691    39-3691   #39-3691    39-3691    39-3691   #39-3691    39-3691   #39-3691   
                         39-3691   #39-3691    39-3691    39-3691   #39-3691    39-3691    39-3691   #39-3691    39-3691   
                        #39-3691    39-3691   #39-3691    39-3691    39-3691   #39-3691    39-3691    39-3691   #39-3691   
                         39-3691   #40-3728    40-3728   #40-3728    40-3728   #41-3791    41-3791   #41-3791    41-3791   
                         41-3791   #41-3791    41-3791   #41-3791    41-3791   #41-3791    41-3791    41-3791   #41-3791   
                         41-3791   
.BGBUF	= ******  GX	 30-2673    30-2713    62-4898    62-4905    64-5148   
.BRCLK	= 005000	#9-1131    #20-2136   #44-3930   #59-4589   
.CECLK	= 004000	#9-1131    #20-2136   #44-3930   #59-4589   
.CLRMR	= 006000	#9-1131    #20-2136   #44-3930   #59-4589   
.CLRUN	= 010000	#9-1131    #20-2136   #44-3930   #59-4589   
.COMEF	= ******  GX	 17-1839    33-3027    50-4176    51-4271   
.CONBT	= 012000	#9-1131    #20-2136   #44-3930   #59-4589   
.CRPFL	= ******  GX	 50-4120   *50-4123   
.CRTSK	= ******  GX	 28-2522    49-4101    61-4756   
.CSHRG	= 164000	#9-1131    #20-2136   #44-3930   #59-4589   
.CYLTM	= 000074	#20-2188    28-2490    28-2490    28-2492   #44-3950    47-4042    47-4042   
.DBINT	  001236 RG	#8-659     
.DRLTC	= 015000	#9-1131    #20-2136   #44-3930   #59-4589   
.DSACF	= 066000	#9-1131    #20-2136   #44-3930   #59-4589   
.DSIOJ	= 065000	#9-1131    #20-2136   #44-3930   #59-4589   
.EIOJA	= 067000	#9-1131    #20-2136   #44-3930   #59-4589   
.FEACK	  004116 RG	#18-1938   
.FEST 	  004222 RG	#19-1965   
.GFNR 	= 102000	#9-1131    #20-2136   #44-3930   #59-4589   
.INICL	= 070000	#9-1131    #20-2136   #44-3930   #59-4589   
.IRLTC	= 014000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRDL	= 052000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRDR	= 051000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRM1	= 057000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRM2	= 056000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRM3	= 055000	#9-1131    #20-2136   #44-3930   #59-4589   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 18

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.LCRM4	= 054000	#9-1131    #20-2136   #44-3930   #59-4589   
.LCRM5	= 053000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDAR 	= 077000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDBRL	= 043000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDBRR	= 042000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDCK1	= 046000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDCK2	= 047000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDDIS	= 045000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDRJD	= 064000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDRJV	= 063000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDRM1	= 060000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDRM2	= 061000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDRM3	= 062000	#9-1131    #20-2136   #44-3930   #59-4589   
.LDSEL	= 044000	#9-1131    #20-2136   #44-3930   #59-4589   
.LPPFL	= ******  GX	 29-2550   *29-2553   
.MEMRS	= 076000	#9-1131    #20-2136   #44-3930   #59-4589   
.PCAB1	= 150000	#9-1131    #20-2136   #44-3930   #59-4589   
.PCAB2	= 151000	#9-1131    #20-2136   #44-3930   #59-4589   
.PCAB3	= 152000	#9-1131    #20-2136   #44-3930   #59-4589   
.PCAB4	= 153000	#9-1131    #20-2136   #44-3930   #59-4589   
.POLLH	= ******  GX	 64-5143   
.PUDBA	= ******  GX	 61-4747    63-4991    64-5076   
.PUDEA	= ******  GX	 61-4865    64-5084   
.RCRM1	= 147000	#9-1131    #20-2136   #44-3930   #59-4589   
.RCRM2	= 146000	#9-1131    #20-2136   #44-3930   #59-4589   
.RCRM3	= 145000	#9-1131    #20-2136   #44-3930   #59-4589   
.RCRM4	= 144000	#9-1131    #20-2136   #44-3930   #59-4589   
.RCSPF	= 141000	#9-1131    #20-2136   #44-3930   #59-4589   
.RDJ14	= 134000	#9-1131    #20-2136   #44-3930   #59-4589   
.RDJ71	= 135000	#9-1131    #20-2136   #44-3930   #59-4589   
.RDMAB	= 133000	#9-1131    #20-2136   #44-3930   #59-4589   
.RPUNT	= ******  GX	 17-1896   
.SECLK	= 003000	#9-1131    #20-2136   #44-3930   #59-4589   
.SETMR	= 007000	#9-1131    #20-2136   #44-3930   #59-4589   
.SETRN	= 011000	#9-1131    #20-2136   #44-3930   #59-4589   
.SSCLK	= 002000	#9-1131    #20-2136   #44-3930   #59-4589   
.STDTA	= ******  GX	 64-5129   
.STDTZ	= ******  GX	*64-5127    64-5128   
.STPCL	= 000000	#9-1131    #20-2136   #44-3930   #59-4589   
.STRCL	= 001000	#9-1131    #20-2136   #44-3930   #59-4589   
.TPDBA	= ******  GX	 63-4957   
.TPDEA	= ******  GX	 63-4965   
.WRMBX	= 071000	#9-1131    #20-2136   #44-3930   #59-4589   
..AKCR	  013572 RG	#57-4523   
..AKLP	  011246 RG	#40-3713   
..ALC2	= ******  GX	 30-2719    30-2719    62-4900    62-4900    62-4907    62-4907   
..DECB	= ******  GX	 30-2761    30-2761   
..DECN	= ******  GX	 19-1999    19-1999    38-3575    38-3575    55-4478    55-4478   
..DEC2	= ******  GX	 30-2674    30-2674    64-5151    64-5151    64-5155    64-5155   
..DOLP	  011470 RG	 34-3269    34-3269    37-3439    37-3439   #42-3829   
..DOL1	  011454 RG	 32-2951    32-2951    37-3394    37-3394   #42-3823   
..DQRN	= ******  GX	 7-515      7-515      9-1190     9-1190     17-1853    17-1853    17-1882    17-1882    31-2791   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 19

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         31-2791   
..DSEV	= ******  GX	 8-726      8-726      9-1339     9-1339     37-3459    37-3459    38-3570    38-3570    39-3689   
                         39-3689    40-3726    40-3726    41-3785    41-3785    42-3854    42-3854    57-4532    57-4532   
..ENB0	= ******  GX	 17-1873    17-1873    41-3790    41-3790    64-5137    64-5137    65-5170    65-5170   
..FSTD	= ******  GX	 61-4775    61-4775    64-5125    64-5125   
..INTX	= ******  GX	 8-731      9-1343     37-3465    54-4453   
..IODN	= ******  GX	 7-638      7-638      9-1244     9-1244     17-1868    17-1868    17-1925    17-1925    19-2013   
                         19-2013    30-2754    30-2754    31-2854    31-2854   
..NADD	= ******  GX	 64-5144    64-5144   
..PTLP	  011326 RG	 31-2880    31-2880    38-3618    38-3618   #41-3752   
..SACK	= ******  GX	 19-2002    30-2648    30-2648   
..SPCR	  013550 RG	#56-4501   
..SPLP	  011074 RG	 31-2846    31-2846    33-3086    33-3086   #39-3652   
..STCR	  013526 RG	#55-4477   
..STIN	= ******  GX	 17-1932    33-3187    33-3187    50-4150    50-4150    51-4365    51-4365   
..STLP	  010664 RG	#38-3535   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 20

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$ 		#20-2134   
ALUN$S		#59-4588    61-4753    61-4874   
CALL  		#6-330      7-515      7-577      7-638      8-726      8-808      8-827      8-837      8-843      8-844     
                 8-845      8-852     #9-1130     9-1190     9-1244     9-1339    #16-1812    17-1853    17-1868    17-1873   
                 17-1882    17-1916    17-1925    18-1953    19-1999    19-2013    19-2064   #20-2135    28-2515    28-2528   
                 29-2552    30-2616    30-2624    30-2648    30-2674    30-2719    30-2754    30-2761    31-2791    31-2846   
                 31-2854    31-2880    32-2951    33-3086    33-3187    34-3269    37-3394    37-3439    37-3459    38-3570   
                 38-3575    38-3618    39-3689    40-3726    41-3785    41-3790    42-3854   #44-3929    49-4096    49-4107   
                 50-4122    50-4150    50-4162    50-4181    50-4215    51-4365    54-4449    55-4478    56-4503    57-4532   
                #59-4588    61-4742    61-4775    61-4783    61-4785    61-4804    61-4825    61-4857    61-4880    62-4891   
                 62-4900    62-4907    62-4921    62-4927    62-4931    63-4968    63-4971    63-4974    63-4976    64-5055   
                 64-5065    64-5103    64-5108    64-5113    64-5114    64-5119    64-5120    64-5125    64-5137    64-5144   
                 64-5151    64-5155    65-5170    65-5179    66-5204    66-5225    66-5237    67-5285    67-5287    67-5289   
                 67-5291    67-5296    67-5298    67-5323    67-5335   
CALLR 		#16-1812    17-1932    19-2002   
CLEF$ 		#6-330      6-445     
DIR$  		#6-330     #7-513     #7-595     #7-595     #7-633     #7-634     #7-645     #7-646     #7-647     #9-1130    
                #9-1188    #9-1241    #9-1258    #9-1259    #9-1260    #16-1811   #17-1834   #20-2134   #28-2525   #28-2526   
                #28-2526   #28-2527   #28-2527   #29-2543   #29-2543   #30-2721   #30-2721   #33-3026   #33-3026   #33-3128   
                #34-3233   #34-3235   #34-3235   #44-3929   #49-4104   #49-4105   #49-4105   #49-4106   #49-4106   #50-4114   
                #50-4114   #50-4175   #50-4175   #51-4270   #51-4270   #61-4739   #61-4739   #61-4753   #61-4753   #61-4874   
                #61-4874   #62-4892   #62-4892   #65-5169   #65-5169   #66-5266   #66-5266   #67-5304   #67-5304   
ERR   		#59-4603   #61-4785   #61-4880   #63-4968   #63-4971   #63-4974   #63-4976   #64-5119   #65-5179   
ERRF  		#59-4607   #63-4968   #63-4971   #63-4974   
ERRN  		#59-4612    65-5179   
ERR$  		#7-513     #7-595     #7-633     #7-634     #7-645     #7-646     #7-647     #9-1188    #9-1241    #9-1258    
                #9-1259    #9-1260    #17-1834   #28-2525   #28-2526   #28-2527   #29-2543   #30-2721   #33-3026   #33-3128   
                #34-3233   #34-3235   #49-4104   #49-4105   #49-4106   #50-4114   #50-4175   #51-4270   #61-4739   #61-4753   
                #61-4874   #62-4892   #65-5169   #66-5266   #67-5304   
IDENT$		#4-147     
MOV$  		#28-2526   #28-2526   #28-2526   #28-2527   #28-2527   #29-2543   #29-2543   #34-3235   #34-3235   #49-4105   
                #49-4105   #49-4105   #49-4106   #49-4106   #50-4114   #50-4114   #61-4739   #61-4739   #61-4753   #61-4753   
                #61-4753   #61-4753   #61-4753   #61-4874   #61-4874   #61-4874   #61-4874   #61-4874   #65-5169   #65-5169   
                #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   #66-5266   
                #66-5266   #66-5266   #67-5304   #67-5304   #67-5304   #67-5304   #67-5304   #67-5304   #67-5304   #67-5304   
                #67-5304   
MRKT$ 		#6-330     #6-449     #9-1130    #9-1155    #20-2134   #28-2490   #28-2492   #44-3928   #47-4042   
MSG   		#59-4594   #61-4785   #61-4804   #61-4880   #63-4968   #63-4971   #63-4974   #63-4976   #64-5119   #65-5179   
MVB$  		#65-5169   #65-5169   #66-5266   #66-5266   #67-5304   #67-5304   
NBL$  		#61-4753   #61-4753   #61-4874   #61-4874   
OFF$  		#6-443      6-443      6-443     #6-445      6-445      6-445     #6-447      6-447      6-447     #6-449     
                 6-449      6-449      6-449      6-449      6-449     #6-451      6-451      6-451     #6-453      6-453     
                 6-453      6-453      6-453      6-453      6-453      6-453      6-453     #9-1149     9-1149     9-1149    
                #9-1151     9-1151     9-1151    #9-1153     9-1153     9-1153     9-1153     9-1153     9-1153     9-1153    
                 9-1153     9-1153    #9-1155     9-1155     9-1155     9-1155     9-1155     9-1155    #9-1157     9-1157    
                 9-1157    #28-2490    28-2490    28-2490    28-2490    28-2490    28-2490   #28-2492    28-2492    28-2492   
                 28-2492    28-2492    28-2492   #33-3132    33-3132    33-3132    33-3132    33-3132    33-3132    33-3132   
                 33-3132    33-3132   #47-4042    47-4042    47-4042    47-4042    47-4042    47-4042   
POP   		#20-2135    30-2675    30-2740    30-2755    33-3188    33-3202    33-3202    33-3202    33-3202    34-3271   
                 35-3311    35-3311    35-3311    37-3422    37-3428    37-3464    37-3464    37-3464    38-3623    38-3623   
                 38-3623    39-3691    39-3691    39-3691    40-3728    41-3791    41-3791   #44-3929   #59-4588    66-5227   
                 66-5238    67-5305    67-5306    67-5345   
DRIVERS10  CREATED BY  MACRO  ON 3-OCT-79 AT 10:59	PAGE 21

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

PUSH  		#20-2135    30-2587    30-2670    30-2710    30-2749    33-3022    33-3183    34-3267    35-3291    37-3377   
                 37-3414    38-3536    39-3653    40-3714    41-3753   #44-3929   #59-4588    61-4785    61-4804    61-4880   
                 63-4968    63-4971    63-4974    63-4976    64-5119    65-5179    66-5222    66-5232    67-5282    67-5336   
QDPB$ 		#6-453     #6-453     #9-1153    #9-1153    #33-3132   #33-3132   
QDPB$S		#66-5266   #66-5266   #67-5304   #67-5304   
QIOSY$		#6-330     #6-332     #9-1129    #9-1132    #20-2134   #20-2137   #59-4588   #59-4590   
QIOW$ 		#6-330      6-453     #9-1130     9-1153    #20-2134    33-3132   
QIOW$S		#59-4588    66-5266    67-5304   
RCVX$S		#59-4588   #61-4739   
RESTOR		#33-3022   #33-3202   #35-3291   #35-3311   #37-3377   #37-3464   #38-3536   #38-3623   #39-3653   #39-3691   
                #40-3714   #40-3728   #41-3753   #41-3791   
RETURN		#4-212     #4-271     #6-330     #8-958     #8-994     #9-1130    #16-1812   #18-1957   #20-2135   #33-3203   
                #34-3276   #35-3312   #38-3624   #39-3692   #40-3729   #41-3792   #42-3885   #44-3929   #51-4372   #52-4386   
                #56-4505   #57-4533   #59-4588   #64-5159   #66-5228   #66-5239   #66-5273   #67-5307   #67-5316   #67-5348   
RFA$  		#61-4739   #61-4739   #65-5169   #65-5169   #65-5169   
RQST$S		#59-4588   #65-5169   
RVP$  		#29-2543   #50-4114   #61-4753    61-4753   #61-4874    61-4874   #66-5266    66-5266   #67-5304    67-5304   
SAVE  		#20-2143    33-3022    35-3291    37-3377    38-3536    39-3653    40-3714    41-3753   
SPRA$S		#20-2134   #28-2527   #44-3928   #49-4106   
SVTK$S		#20-2134    28-2526   #44-3928    49-4105   
VDPB$S		#61-4739   #61-4739   
WSIG$S		#6-330      7-595     #20-2134    30-2721    33-3026   #44-3928    50-4175    51-4270   #59-4588    62-4892   
WTLO$ 		#16-1811    16-1821   
WTLO$S		#20-2134    29-2543   #44-3928    50-4114   
WTSE$ 		#6-330     #6-443     #6-447     #6-451     #9-1130    #9-1149    #9-1151    #9-1157    
WTSE$S		#20-2134   #34-3235   #44-3928   
$DEF  		#9-1129    #9-1131    #20-2135   #20-2136   #44-3929   #44-3930   #59-4588   #59-4589   
.ENB  		#16-1811    19-2055   #20-2135    29-2549    30-2637   #44-3929    50-4119   
.ENB0 		#16-1811    17-1873   #20-2135    41-3790   #59-4588    64-5137    65-5170   
.ENB4 		#20-2193    32-2953    34-3270   
.ENB6 		#16-1811    18-1955   
.INH  		#16-1811   #19-2035   #20-2135   #29-2546   #30-2630   #44-3929   #50-4116   
.INH0 		#16-1811   #17-1835   #20-2135   #41-3767   #59-4588   #64-5123   #65-5165   
.INH4 		#20-2189    32-2941    34-3268   
.INH6 		#16-1811    18-1950   
.STKM 		#6-330     #6-441     #9-1130    #9-1147    #16-1811   #16-1832   #20-2135   #25-2394   #44-3929   #47-4017   
                #59-4588   #60-4672