Google
 

Trailing-Edge - PDP-10 Archives - AP-4178E-RM - swskit-sources/lpdrv.lis
There are no other files named lpdrv.lis in the archive.
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06
TABLE OF CONTENTS

    1-   2	TITLE PAGE
    2-  37	COMMON PARAMETERS AND MACROS
    3- 124	LP-20 DEVICE REGISTER DEFINITIONS
    5-   1	COMMON DEVICE PARAMETER MODULE
    6-  34	DEVICE STATUS BIT DEFINITIONS
    8-   1	LP-20 COMMON DATA MODULE
    9-  35	COMMON VARIABLES
   10-  59	LP-20 DEVICE TABLES
   12-   1	LP-20 DRIVER TASK MODULE
   13-  41	LPINI	(INITIALIZE LP-20 TASK)
   14-  99	LPLOOP	(LP-20 DRIVER TASK LOOP)
   15- 126	LPIOD	(LP TASK I/O DONE)
   16- 336	LPNIR	(LP TASK QUEUE I/O REQUEST)
   17- 467	LPMKT	(LP TASK MARK-TIME REQUEST)
   18- 539	SSTSLP	(SEND LP-20 STATUS TO -10)
   19- 774	TESTLP	(START LP-20 GOING ON THREADED LIST)
   20- 846	INITLP	(INITALIZE ALL LP'S)
   22-   1	LP-20 INTERRUPT SERVICE MODULE
   23-  33	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
   25-   1	LP-20 COMMON SUBROUTINES MODULE
   25-  40	..STLP	(START LP-20 OUTPUT)
   26- 163	..SPLP	(STOP LP-20 OUTPUT)
   27- 229	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
   28- 266	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
   29- 329	..DOLP	(INITIATE LP-20 TRANSFER)
   31-   1	END
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 1


      1						.TITLE	LPDRV	(LP-20 LINEPRINTER DRIVER FOR RSX10F)
      2						.SBTTL	TITLE PAGE
      3						.IDENT	/001000/
      4					;
      5					;                             COPYRIGHT (C) 1975, 1978 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					;		MODULE: COMMON DEFINITIONS
     22					;
     23					;		VERSION: 01-00
     24					;
     25					;		AUTHOR: TOM PORCHER
     26					;
     27					;		DATE: 4-JUN-75
     28					;
     29					;
     30					;	THIS MODULE CONTAINS:
     31					;
     32					;	1) COMMON PARAMETERS AND MACROS
     33					;
     34					;	2) LP-20 DEVICE REGISTER DEFINITIONS
     35					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 2
COMMON PARAMETERS AND MACROS

     37						.SBTTL	COMMON PARAMETERS AND MACROS
     38					;
     39					; PARAMETERS
     40					;
     41		000002 			L$$P20=	2			;TWO LINEPRINTERS
     42		000214 			LPALOC=	140.			;LINE ALLOCATION FOR EACH LP
     43		000012 			LPRTRY=	10.			;# RETRYS ON ERRORS AND HUNG
     44					;
     45					; EVENT FLAGS
     46					;
     47		000001 			E.FLPD=	1			;(1) INTERRUPT LEVEL I/O DONE
     48		000001 			 EF.LPD=BIT0
     49		000002 			E.FLPC=	2			;(2) MARK-TIME
     50		000002 			 EF.LPC=BIT1
     51		000003 			E.FLPQ=	3			;(3) CTY OUTPUT QUEUE I/O REQUESTS
     52		000004 			 EF.LPQ=BIT2
     53									;(4) RESERVED FOR E.NIR (EXEC FLAG)
     54		000005 			E.FLPS=	5			;(5) STATUS REQUEST (LOCAL TO SSTSLP)
     55		000020 			 EF.LPS=BIT4
     56		000006 			E.FLPW=	6			;(6) WAIT FOR LP-20 TO SETTLE AFTER FLUSH
     57		000040 			 EF.LPW=BIT5
     58					;
     59					; MISC. MCALL'S
     60					;
     61					.MCALL QIOSY$,ALUN$,MRKT$,QIOW$,SPRA$S,SVTK$S,WSIG$S,WTLO$S,WTSE$S,DIR$
     62					.MCALL $DEF,CALL,RETURN,.INH0,.INH,.ENB0,.ENB,PUSH,POP,.STKM
     63	000000					$DEF
     64	000000					QIOSY$
     65						.ENABLE	AMA
     66						.LIST	MEB
     67					;
     68					; COMMON MACROS
     69					;
     70					.MACRO SAVE LIST
     71						PUSH	<LIST>
     72					  .MACRO RESTORE
     73					    $$$=0
     74					    .IRP ITEM,<LIST>
     75					      $$$=$$$+1
     76					    .ENDM
     77					    .REPT $$$
     78					      $$$$=0
     79					      .IRP ITEM,<LIST>
     80					        $$$$=$$$$+1
     81					        .IF EQ $$$$-$$$
     82						  POP	ITEM
     83					        .ENDC
     84					      .ENDM
     85					      $$$=$$$-1
     86					    .ENDR
     87					  .ENDM
     88					.ENDM
     89					;
     90					; BITS IN T.HCBC WORD IN THREAD BLOCK
     91					;
     92		100000 			TB.DON=	BIT15			;THREAD BLOCK DONE *** MUST BE SIGN BIT ***
     93		040000 			TB.ABO=	BIT14			;ABORTED BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 2-1
COMMON PARAMETERS AND MACROS

     94		020000 			TB.EOF=	BIT13			;BLOCK REPRESENTS EOF
     95		010000 			TB.LPC=	BIT12			;LOAD PAGE COUNTER FUNCTION
     96		004000 			TB.RMD=	BIT11			;TRANSLATION RAM DATA
     97		002000 			TB.VFD=	BIT10			;VFU DATA
     98		036000 			TB.SFN=	TB.EOF!TB.LPC!TB.RMD!TB.VFD ;SPECIAL FUNCTIONS
     99					;
    100					; QUEUE I/O -- THREAD BLOCK VALUES
    101					;
    102		000004 			PBTHRD=	4			;R.PB+4 IS START OF THREAD BLOCK
    103					;
    104		177774 			T.HEMA=	0-PBTHRD		;(BYTE) EXTENDED MEMORY ADDRESS BITS 4 & 5
    105		177775 			T.HVFC=	1-PBTHRD		;(BYTE) VERTICAL FORMAT CONTROL CHARACTER
    106		177776 			T.HIBC=	2-PBTHRD		;(WORD) INITIAL BYTE COUNT
    107					;
    108					;
    109					; STUFF THAT SHOULD BE GLOBAL, BUT MACY11 DOESN'T LIKE COMPLEX GLOBALS
    110					;
    111		000377 			LOBYTE=	377
    112		177400 			HIBYTE=	^C<LOBYTE>
    113					;
    114					;
    115		000074 			.CYLTM=^D60
    116					.MACRO	.INH4
    117						MOV	@#PS,-(SP)
    118						MOVB	#PR4,@#PS
    119					.ENDM
    120					.MACRO	.ENB4
    121						MOV	(SP)+,@#PS
    122					.ENDM
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 3
LP-20 DEVICE REGISTER DEFINITIONS

    124						.SBTTL	LP-20 DEVICE REGISTER DEFINITIONS
    125					;
    126					;
    127					; LP-20 DEVICE REGISTER DEFINITIONS
    128					;
    129					; *** NOTE THAT ALL OFFSETS AND ADDRESSES ARE RELATIVE TO LPCSRA ***
    130					;
    131		175400 			LPEXPA=175400			;EXTERNAL PAGE ADDRESS OF LPCSRA
    132		000020 			LPEXPZ=20			;SIZE OF EXTERNAL PAGE ADDRESSES IN BYTES
    133					;
    134		000000 			LPCSRA=0			;CONTROL AND STATUS REGISTER A
    135		100000 				ERR=	BIT15
    136		040000 				PAGZRO=	BIT14
    137		020000 				CHRINT=	BIT13
    138		010000 				VFURDY=	BIT12
    139		004000 				ONLINE=	BIT11
    140		002000 				DELHLD=	BIT10
    141		001000 				RSTERR=	BIT9
    142		000400 				LOINIT=	BIT8
    143					;
    144		000200 				DONE=	BIT7
    145		000100 				INTENB=	BIT6
    146		000040 				BUSA17=	BIT5
    147		000020 				BUSA16=	BIT4
    148		000010 				MODE01=	BIT3
    149		000004 				MODE00=	BIT2
    150		000001 					TSTMOD=	1
    151		000002 					VFULOD=	2
    152		000003 					RAMLOD=	3
    153		000002 				PARENB=	BIT1
    154		000001 				GO=	BIT0
    155					;
    156		000002 			LPCSRB=2			;CONTROL AND STATUS REGISTER B
    157					; BITS	15-13	NOT USED
    158		010000 				LPTPBT=	BIT12
    159		004000 				OPTVFU=	BIT11
    160		002000 				TEST02=	BIT10
    161		001000 				TEST01=	BIT9
    162		000400 				TEST00=	BIT8
    163					;
    164		000200 				OFFLIN=	BIT7
    165		000100 				VFUERR=	BIT6
    166		000040 				LPTPAR=	BIT5
    167		000020 				MEMPAR=	BIT4
    168		000010 				RAMPAR=	BIT3
    169		000004 				SYNTIM=	BIT2
    170		000002 				DEMTIM=	BIT1
    171		000001 				GOERR=	BIT0
    172					;
    173		000004 			LPBSAD=4			;BUS ADDRESS REGISTER
    174					;
    175		000006 			LPBCTR=6			;BYTE COUNT (2'S COMPLEMENT)
    176					; BITS	15-12	NOT USED
    177					;	11-0	BYTE COUNT
    178					;
    179		000010 			LPPCTR=10			;PAGE COUNTER
    180					; BITS	15-12	NOT USED
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 3-1
LP-20 DEVICE REGISTER DEFINITIONS

    181					;	11-0	PAGE COUNT
    182					;
    183		000012 			LPRAMD=12			;RAM DATA REGISTER
    184					; BITS	15-13	NOT USED
    185					;	12	RAM PARITY
    186					;	11-0	RAM DATA
    187					;
    188		000014 			LPCBUF=14			;(BYTE) CHARACTER BUFFER REGISTER
    189		000015 			LPCCTR=15			;(BYTE) COLUMN COUNT REGISTER
    190					;
    191		000016 			LPTDAT=16			;(BYTE) PRINTER DATA REGISTER
    192		000017 			LPCKSM=17			;(BYTE) CHECKSUM REGISTER
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 5
COMMON DEVICE PARAMETER MODULE

      1						.SBTTL	COMMON DEVICE PARAMETER MODULE
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19					;
     20					;		MODULE: COMMON DEVICE PARAMETERS
     21					;
     22					;		VERSION: 01-00
     23					;
     24					;		AUTHOR: TOM PORCHER
     25					;
     26					;		DATE: 25-AUG-75
     27					;
     28					;
     29					;	THIS MODULE CONTAINS:
     30					;
     31					;	1) DEVICE STATUS BIT DEFINITIONS
     32					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 6
DEVICE STATUS BIT DEFINITIONS

     34						.SBTTL	DEVICE STATUS BIT DEFINITIONS
     35					;
     36					; GENERAL FORM OF STATUS BLOCK
     37					;
     38					; WORD	0	STANDARD STAUS BITS (DV.XXX)
     39					; 	1	DEVICE-DEPENDENT BITS (DD.XXX)
     40					;	2	(HIGH BYTE) # BYTES OF DEVICE-DEPENDENT INFO TO FOLLOW
     41					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS TO FOLLOW
     42					;	3-...	DEVICE DEPENDENT INFO (# BYTES IN WORD 2)
     43					;	.-...	DEVICE REGISTERS (# BYTES IN WORD 2)
     44					;
     45					;
     46					; STANDARD BITS (FIRST WORD OF STATUS)
     47					;
     48		000001 			DV.NXD=	BIT0			;NON-EX DEVICE
     49		000002 			DV.OFL=	BIT1			;OFF-LINE
     50		000004 			DV.OIR=	BIT2			;HARDWARE ERROR. OPERATOR INTERVENTION REQUIRED.
     51		000010 			DV.SCN=	BIT3			;SOFTWARE CONDITON. ACKNOWLEDGE REQUIRED.
     52		000020 			DV.IOP=	BIT4			;I/O IN PROGRESS
     53		000040 			DV.EOF=	BIT5			;END-OF-FILE ENCOUNTERED
     54		000100 			DV.LOG=	BIT6			;ERROR LOGGING REQUIRED
     55		000200 			DV.URE=	BIT7			;UN-RECOVERABLE ERROR
     56		000400 			DV.F11=	BIT8			;ERROR ON FROM -11 REQUEST
     57		001000 			DV.HNG=	BIT9			;DEVICE HUNG
     58					;
     59					;
     60					; DEVICE-DEPENDENT BITS (SECOND WORD OF STATUS)
     61					;
     62					; LP-20 LINEPRINTER
     63					;
     64		000001 			DD.PGZ=	BIT0			;PAGE COUNTER PASSED ZERO
     65		000002 			DD.CHI=	BIT1			;CHARACTER INTERRUPT (FROM RAM)
     66		000004 			DD.VFE=	BIT2			;VFU ERROR-- PAPER RE-ALIGNMENT REQUIRED
     67		000010 			DD.LER=	BIT3			;ERROR FINDING/READING VF AND RAM FILE
     68		000020 			DD.OVF=	BIT4			;PRINTER HAS OPTICAL VFU (AS OPPOSED TO DAVFU)
     69		000040 			DD.RME=	BIT5			;RAM PARITY ERROR-- RELOAD REQUIRED
     70					;
     71					; DEVICE DEPNDENT INFO FOR LP-20 (2 BYTES):
     72					; WORD	3	(LOW BYTE) ACCUMULATED CHECKSUM
     73					;		(HIGH BYTE) RETRY COUNT
     74					;
     75					;	4-13	LP-20 DEVICE REGISTERS (16. BYTES)
     76					;
     77					;
     78					; CD-11 CARD READER
     79					;
     80		000001 			DD.RCK=	BIT0			;READ (PHOTO) CHECK
     81		000002 			DD.PCK=	BIT1			;PICK CHECK
     82		000004 			DD.SCK=	BIT2			;STACK CHECK
     83		000010 			DD.HEM=	BIT3			;HOPPER EMPTY
     84		000020 			DD.SFL=	BIT4			;STACKER FULL
     85					;
     86					; DEVICE-DEPENDENT INFO FOR CD-11 (0 BYTES)
     87					; WORD	3-6	DEVICE REGISTERS FOR CD-11 (8. BYTES)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 8
LP-20 COMMON DATA MODULE

      1						.SBTTL	LP-20 COMMON DATA MODULE
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19					;		MODULE: LP-20 COMMON DATA
     20					;
     21					;		VERSION: 01-00
     22					;
     23					;		AUTHOR: TOM PORCHER
     24					;
     25					;		DATE: 7-JUN-75
     26					;
     27					;
     28					;	THIS MODULE CONTAINS:
     29					;
     30					;	1) COMMON VARIABLES
     31					;
     32					;	2) DEVICE TABLES
     33					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 9
COMMON VARIABLES

     35						.SBTTL	COMMON VARIABLES
     36					;
     37					; LP DRIVER TASK HEAD
     38					;
     39					;
     40	000000				LPHD::	.STKM	0,0,0,0,0,0,0,LPINI,174000,LPSTK
	000046	000000 	000000 	000000 		.WORD	0,0,0,0
	000054	000000
	000074	174000 	000520'	000260'		.WORD	174000,LPINI,LPSTK
	000130	000005 				.WORD	5
	000132	000000G				.WORD	TTPEN
	000134	000000 				.WORD	0
	000136	000000 				.WORD	0
	000140	000000 				.WORD	0
	000142	000000 				.WORD	0
	000144	000000 				.WORD	0
	000146	000000 				.WORD	0
	000150	000000 				.WORD	0
	000152	000000 				.WORD	0
	000154	000000 				.WORD	0
	000156	000000 				.WORD	0
	000260	000000 				.WORD	0
	000262	000000 				.WORD	0
	000264	000000 				.WORD	0
	000266	000000 				.WORD	0
	000270	000000 				.WORD	0
	000272	000000 				.WORD	0
	000274	000520'				.WORD	LPINI
	000276	174000 				.WORD	174000
     41					;
     42					; MISCELLANEOUS VARIABLES
     43					;
     44	000300				LPUNIT:	.BLKW	1		;LP UNIT # FROM PS ON INTERRUPT
     45					;
     46	000302	000304'			LPEVFG:	.WORD	LPCEVF		;ADDRESS OF WHERE TO SET EVENT FLAGS FOR LP TASK
     47					;
     48	000304				LPCEVF:	.BLKW	1		;CURRENT EVENT FLAGS
     49					;
     50	000306	000000 			LPHUNG:	.WORD	0		;COUNT OF # TIMES LP WAS HUNG
     51					;
     52	000310	000000 			.LPPFL::.WORD	0		;POWER FAIL FLAG
     53					;
     54	000312				LPSTBH:	.BLKW	1		;HEADER WORD (UNIT/BYTE COUNT)
     55	000314				LPSTBK:	.BLKB	4+2+2+LPEXPZ	;STATUS RETURN BLOCK TO -10
     56						.EVEN
     57		000030 			LPSTLN=.-LPSTBK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 10
LP-20 DEVICE TABLES

     59						.SBTTL	LP-20 DEVICE TABLES
     60					;
     61					;
     62					; LP DEVICE STATUS TABLE
     63					;  ONE ENTRY FOR EVERY LP, SIZE= LPSIZE
     64					;
     65	000344				LPTBL::
     66		000000 			$$$UNI=0			;START WITH UNIT 0
     67		000002 				.REPT	L$$P20		;MAKE ONE FOR EACH LP
     68					;
     69					LPSTS=	0			;MISC STATUS BITS: *** MUST BE ZERO ***
     70						LP.HNG=	BIT15		;LP DID NOT COMPLETE I/O IN 20 SEC
     71									;SET BY MARK-TIME REQUEST
     72									;CLEARED BY ..DOLP
     73						LP.SST=	BIT14		;SEND STATUS OF THIS LP TO -10
     74									;SET BY INTERRUPT SERVICE
     75									;CHECKED BY TASK
     76						LP.PZI=	BIT13		;PAGE-ZERO INTERRUPT ENABLE
     77									;SET FROM RAM/VF LOAD FILE
     78									;CHECKED ON PAGZRO INTERRUPTS
     79						LP.MCH=	BIT12		;MULTI-CHARACTER PRINT OPERATION IN PROGRESS
     80									; (ARROW MODE). SET ON UNDCHR INTERRUPT,
     81									; CLEARED WHEN DONE SET.
     82						LP.WAT=	BIT11		;THIS LP IS WAITING FOR A RESPONSE
     83									; FROM THE -10, DUE TO PAGZRO, ERROR
     84									; ON SOMETHING LIKE THAT. SET BY INTERRUPT
     85									; SERVICE, CLEARED BY 'CONTINUE'
     86									; FUNCTION FROM -10.
     87						LP.CLR=	BIT10		;CLEAR RAM REQUIRED (DUE TO ERROR)
     88									; SET BY SSTSLP, CHECKED AND CLEARED BY TESTLP
     89						LP.LIP=	BIT9		;LOAD OF VFU AND RAM IN PROGRESS, SET
     90									; BY START OF LOAD (IN LPIOD) AND CLEARED BY
     91									; TRANSFER COMPLETE FOR RAM/VFU DATA.
     92						LP.F10=	BIT8		;FROM-10 REQUEST HAS BEEN QUEUED
     93									; SET BY ..STLP AND SPECIAL FUNCTIONS
     94									; CLEARED WHEN QUEUE IS EMPTY OR ..SPLP
     95						LP.EOF=	BIT7		;END-OF-FILE. SET BY EOF FUNCTION ENCOUNTERED
     96									; IN THREADED LIST BY INTERRUPT SERVICE.
     97									; CHECKED AND CLEARED BY TESTLP WHEN
     98									; CHECKSUM IS CLEARED.
     99						LP.UNT=	BIT1!BIT0	;(LOW BITS) UNIT # OF THIS LP.
    100						.WORD	$$$UNI
    101					LPCSA=	2			;EXTERNAL PAGE ADDRESS FOR THIS LP
    102						.WORD	LPEXPA+<20*$$$UNI>
    103					LPTHD=	4			;POINTER TO THREADED OUTPUT QUEUE
    104									;ZERO IF NO QUEUE
    105						.WORD	0
    106					LPITH=	6			;INTERRUPT-LEVEL THREAD POINTER
    107									;POINTS TO CURRENT BUFFER BEING
    108									;OUTPUT AT INTERRUPT LEVEL
    109						.WORD	0
    110					;
    111					$$$UNI=$$$UNI+1
    112						.ENDR
	000344	000000 				.WORD	$$$UNI
	000346	175400 				.WORD	LPEXPA+<20*$$$UNI>
	000350	000000 				.WORD	0
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 10-1
LP-20 DEVICE TABLES

	000352	000000 				.WORD	0
	000354	000001 				.WORD	$$$UNI
	000356	175420 				.WORD	LPEXPA+<20*$$$UNI>
	000360	000000 				.WORD	0
	000362	000000 				.WORD	0
    113		000010 			LPSIZE==<.-LPTBL>/L$$P20	;SIZE OF EACH ENTRY
    114					;
    115					; SECOND (PARALLEL) LP TABLE-- INDEXES ARE FROM LPTBL
    116					;
    117	000364	000010 			LPTBL2:	.REPT	LPSIZE*L$$P20/2	;MAKE SPACE
    118						.WORD	0
    119						.ENDR
	000364	000000 				.WORD	0
	000366	000000 				.WORD	0
	000370	000000 				.WORD	0
	000372	000000 				.WORD	0
	000374	000000 				.WORD	0
	000376	000000 				.WORD	0
	000400	000000 				.WORD	0
	000402	000000 				.WORD	0
    120					;
    121		000020 			LPMCB=	0+LPTBL2-LPTBL		;MULTI-CHARACTER BUFFER (TWO BYTES)
    122		000022 			LPCSM=	2+LPTBL2-LPTBL		;ACCUMULATED CHECKSUM (LOW BYTE IS TRASH)
    123		000024 			LPRTY=	4+LPTBL2-LPTBL		;RETRY COUNTER
    124					;
    125					; THIRD (PARALLEL) LP TABLE-- INDEXES ARE ALSO FROM LPTBL
    126					;
    127	000404	000010 			LPTBL3:	.REPT	LPSIZE*L$$P20/2	;MAKE SPACE
    128						.WORD	0
    129						.ENDR
	000404	000000 				.WORD	0
	000406	000000 				.WORD	0
	000410	000000 				.WORD	0
	000412	000000 				.WORD	0
	000414	000000 				.WORD	0
	000416	000000 				.WORD	0
	000420	000000 				.WORD	0
	000422	000000 				.WORD	0
    130					;
    131		000040 			LPRMA=	0+LPTBL3-LPTBL		;RAM/VFU DATA ADDRESS
    132		000042 			LPRMZ=	2+LPTBL3-LPTBL		;RAM/VFU DATA BUFFER SIZE
    133		000044 			LPRMC=	4+LPTBL3-LPTBL		;CURRENT POINTER INTO RAM/VFU DATA
    134					;
    135					; POINTERS TO LPTBL BY UNIT NUMBER
    136					;
    137	000424				LPUTBL:
    138		000000 			$$$UNI=0
    139		000002 				.REPT	L$$P20		;ONE PER LP
    140						.WORD	LPTBL+<$$$UNI*LPSIZE>
    141					$$$UNI=$$$UNI+1
    142						.ENDR
	000424	000344'				.WORD	LPTBL+<$$$UNI*LPSIZE>
	000426	000354'				.WORD	LPTBL+<$$$UNI*LPSIZE>
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 12
LP-20 DRIVER TASK MODULE

      1						.SBTTL	LP-20 DRIVER TASK MODULE
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19					;		MODULE: LP-20 DRIVER TASK
     20					;
     21					;		VERSION: 01-01
     22					;
     23					;		AUTHOR: TOM PORCHER
     24					;
     25					;		DATE: 4-JUN-75
     26					;
     27					;
     28					;	THIS MODULE CONTAINS:
     29					;
     30					;	1) LPINI (LP-20 INITIALIZATION)
     31					;
     32					;	2) LPLOOP (LP-20 DRIVER TASK LOOP)
     33					;
     34					;	MODIFICATIONS:
     35					;
     36					;	NO.	DATE		PROGRAMMER	REASON
     37					;	---	----		----------	------
     38					;	001	28-FEB-77	A. PECKHAM	CHANGE LENGTH OF VFU RECORDS
     39					;						TO 145 FROM 140
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 13
LPINI	(INITIALIZE LP-20 TASK)

     41						.SBTTL	LPINI	(INITIALIZE LP-20 TASK)
     42					;
     43					;+
     44					;
     45					;	THIS IS THE LP-20 USER-LEVEL TASK. IT HANDLES QIO
     46					; REQUESTS, OUTPUT ACKNOWLEDGEMNETS, AND HUNG-CHECKING.
     47					;
     48					;	LPINI IS CALLED WHEN THE TASK IS STARTED. IT RESETS THE
     49					; LP-20 AND LOADS THE STANDARD VERTICAL FORMAT AND TRANSLATION
     50					; RAM.  THE 10-SECOND MARK-TIME REQUEST IS ALSO ENTERED.
     51					;
     52					;-
     53					;
     54					;
     55					; DIRECTIVE PARAMETER BLOCKS
     56					;
     57	000430				MRKTDP:
     58	000430					MRKT$	E.FLPC,10.*.CYLTM,10.*.CYLTM ;MARK-TIME REQUEST FOR 10 SECONDS
	000430	   027 	   005 			.BYTE	23.,5
	000432	000002 				.WORD	E.FLPC
	000434	001130 				.WORD	10.*.CYLTM
	000436	001130 				.WORD	10.*.CYLTM
	000440	000000 				.WORD
     59	000442				MKSCDP:
     60	000442					MRKT$	E.FLPW,.CYLTM,0		;WAIT FOR 1 SECOND
	000442	   027 	   005 			.BYTE	23.,5
	000444	000006 				.WORD	E.FLPW
	000446	000074 				.WORD	.CYLTM
	000450	000000 				.WORD	0
	000452	000000 				.WORD
     61					;
     62	000454				SSTVTB:
     63	000454	000456'				.WORD	TRAP04		;WHERE TO GO ON TRAP-AT-4
     64					;
     65					; HERE ON A TRAP TO 4 (HOPEFULLY AN EXPECTED NON-EX LP)
     66					;
     67	000456				TRAP04:
     68	000456	021627 	002046'			CMP	(SP),#INTINS	;THIS FROM MARK-TIME?
     69	000462	001404 				BEQ	10$		;YES-- OK
     70	000464	021627 	003476'			CMP	(SP),#CLRINS	;HOW ABOUT INIT?
     71	000470	001401 				BEQ	10$		;YES-- OK
     72	000472	000004 				IOT			;***** FATAL-- BAD TRAP AT 4
     73					;
     74	000474				10$:
     75	000474	005062 	000002 			CLR	LPCSA(R2)	;NON-EX LP-- SAY SO
     76	000500	005003 				CLR	R3		; BOTH WAYS
     77	000502	052766 	000001 	000002 		BIS	#BIT0,2(SP)	;SET CARRY ON STACK
     78	000510	000002 				RTI			;RETURN TO INTERRUPTED ROUTINE
     79					;
     80					; HERE ON POWER-RECOVERY AST
     81					;
     82	000512				LPWRUP:
     83	000512					CALL	INITLP		;INIT ALL LP'S
	000512	004737 	003426'			JSR	PC,INITLP
     84	000516	000002 				RTI			;RETURN FROM AST
     85					;
     86					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 13-1
LPINI	(INITIALIZE LP-20 TASK)

     87					; LPINI -- INITIALIZE LP'S
     88					;
     89	000520				LPINI:
     90	000520	013737 	000000G	000302'		MOV	.CRTSK,LPEVFG	;SAVE OUR TASK ADDRESS
     91	000526	062737 	000000G	000302'		ADD	#A.EF,LPEVFG	;MAKE THAT ADDR OF OUR EVENT FLAGS
     92	000534	052777 	000060 	177540 		BIS	#EF.LPW!EF.LPS,@LPEVFG ;SAY STATUS BUFFER AVAILABLE AND NOT WAITING
     93	000542					DIR$	#MRKTDP		;ENTER MARK-TIME REQUEST FOR 10 SECONDS
	000542	012746 	000430'			MOV	#MRKTDP,-(SP)
	000546	104375 				EMT	375
     94	000550					SVTK$S	#SSTVTB,#1	;ENABLE FOR TRAP-AT-4 RECOGNITION
	000550	012746 	000001 			MOV	#1,-(SP)
	000554	012746 	000454'			MOV	#SSTVTB,-(SP)
	000560	012746 				MOV	(PC)+,-(SP)
	000562	   071 	   003 			.BYTE	57.,3
	000564	104375 				EMT	375
     95	000566					SPRA$S	#LPWRUP		;SETUP POWER-UP AST
	000566	012746 	000512'			MOV	#LPWRUP,-(SP)
	000572	012746 				MOV	(PC)+,-(SP)
	000574	   155 	   002 			.BYTE	109.,2
	000576	104375 				EMT	375
     96	000600					CALL	INITLP		;INIT ALL THE LP'S
	000600	004737 	003426'			JSR	PC,INITLP
     97					;	BR	LPLOOP		;FALL INTO NORMAL PROCESSING LOOP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 14
LPLOOP	(LP-20 DRIVER TASK LOOP)

     99						.SBTTL	LPLOOP	(LP-20 DRIVER TASK LOOP)
    100					;
    101					;+
    102					;
    103					;	LPLOOP WAITS FOR AND DISPATCHES ON THE LP EVENT FLAGS,
    104					; EF.LPD (INTERRUPT LEVEL I/O DONE), EF.NIR (QUEUE I/O REQUEST),
    105					; AND EF.LPC (10 SECOND MARK-TIME REQUEST), IN THAT ORDER.
    106					;
    107					;-
    108					;
    109					;
    110	000604				LPLOOP:
    111	000604					WTLO$S	1,#EF.LPC!EF.LPD!EF.NIR ;WAIT FOR CLOCK (10 SECONDS)
	000604	012746 	000000C			MOV	#EF.LPC!EF.LPD!EF.NIR,-(SP)
	000610	012746 	000001 			MOV	#1,-(SP)
	000614	012746 				MOV	(PC)+,-(SP)
	000616	   053 	   003 			.BYTE	43.,3
	000620	104375 				EMT	375
    112									; OR I/O DONE FROM ISR
    113									; OR QIO REQUEST TO DO.
    114	000622					.INH			;A FLAG SET-- LOCK OUT LP INTERRUPTS
	000622	013746 	177776 			MOV	PS,-(SP)
	000626	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
    115	000634	017737 	177442 	000304'		MOV	@LPEVFG,LPCEVF	;GET CURRENT EVENT FLAGS
    116	000642	042777 	000000C	177432 		BIC	#EF.LPC!EF.LPD!EF.NIR,@LPEVFG ;CLEAR THE FLAGS WE WAITED FOR
    117	000650					.ENB			;RETORE IRPS
	000650	012637 	177776 			MOV	(SP)+,@#PS	;;
    118	000654	005737 	000310'			TST	.LPPFL		;POWER FAIL?
    119	000660	001404 				BEQ	10$		;NO -- CONTINUE
    120	000662					CALL	INITLP
	000662	004737 	003426'			JSR	PC,INITLP
    121	000666	005037 	000310'			CLR	.LPPFL
    122	000672				10$:
    123					;
    124					;	BR	LPIOD		;TRY FOR EF.IOD (I/O DONE) FIRST
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 15
LPIOD	(LP TASK I/O DONE)

    126						.SBTTL	LPIOD	(LP TASK I/O DONE)
    127					;
    128					;+
    129					;
    130					;	LPIOD IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.LPD IS SET.
    131					; THIS IS SET BY THE INTERRUPT SEVICE WHENEVER IT IS DONE WITH A BUFFER
    132					; OR STATUS INFORMATION IS TO BE SENT TO THE -10 (IE. LP JUST CAME
    133					; ONLINE).
    134					;
    135					;	EACH LP'S THREADED OUTPUT LIST IS SCANNED FOR DONE BUFFERS
    136					; (INDICATED BY T.HCBC NEGATIVE). THESE ARE RETURNED TO THE FREE POOL,
    137					; AND, IN THE CASE OF QUEUE I/O REQUESTS, ..IODN IS CALLED TO TELL
    138					; THE REQUESTOR THAT I/O HAS BEEN COMPLETED. IF A QUEUE I/O REQUEST
    139					; IS STOPPED IN THE MIDDLE OF A TRANSFER BECAUSE OF ERROR, THE
    140					; ERROR INDICATION IS GIVEN TO ..IODN, AND THE REQUEST IS ABORTED.
    141					;
    142					;	AFTER THE THREADED LIST SCAN, THE LP STATUS IS SENT TO THE
    143					; -10 (BY CALLING SSTSLP) IF THE LP.SST FLAG IS SET.
    144					;
    145					;	IF A BUFFER WAS COMPLETED, AND THERE IS EITHER NONE
    146					; OR ONE BUFFER TO OUTPUT, A REQUEST TO SEND IS SENT TO THE -10
    147					; (BY CALLING ..SACK).
    148					;
    149					;-
    150					;
    151	000672				LPIOD:
    152	000672	032737 	000001 	000304'		BIT	#EF.LPD,LPCEVF	;I/O DONE?
    153	000700	001504 				BEQ	99$		;NO-- TRY NEXT FLAG IN CHAIN
    154	000702	012702 	000344'			MOV	#LPTBL,R2	;ADDRESS LPTBL (UNIT 0)
    155	000706					PUSH	#L$$P20		;STACK COUNT OF LP'S TO LOOK AT
	000706	012746 	000002 			MOV	#L$$P20,-(SP)
    156	000712				10$:
    157	000712	005005 				CLR	R5		;AND INDICATE NO BUFFERS DONE
    158	000714	016203 	000002 			MOV	LPCSA(R2),R3	;GET THE EXT PAGE ADDR OF THIS LP
    159					;
    160					; LOOP THROUGH THREADED LIST FOR THIS LP
    161					;
    162	000720				20$:
    163	000720	016200 	000004 			MOV	LPTHD(R2),R0	;GET START OF LIST
    164	000724	001411 				BEQ	80$		;DONE-- GO AWAY
    165					;
    166					; LOOK AT THIS THREAD BLOCK TO SEE IF DONE
    167					;
    168	000726				30$:
    169	000726	005760 	000000G			TST	T.HCBC(R0)	;SEE IF DONE
    170	000732	002471 				BLT	40$		;DONE-- PROCESS
    171	000734	005762 	000006 			TST	LPITH(R2)	;IS I/O IN PROGRESS ON THIS BLOCK?
    172	000740	001003 				BNE	80$		;YES-- WE ARE DONE WITH WHAT IS DONE
    173					;
    174					; LP STOPPED ON THIS ACTIVE THREAD BLOCK
    175					;
    176	000742	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS?
    177	000746	001063 				BNE	40$		;YES-- TERMINATE IT, SINCE I/O STOPPED
    178					;
    179					; END OF LIST-- SEE IF WE SHOULD SEND STATUS AND/OR ACK
    180					;
    181	000750				80$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 15-1
LPIOD	(LP TASK I/O DONE)

    182	000750	032712 	040000 			BIT	#LP.SST,(R2)	;TIME TO SEND STATUS?
    183	000754	001402 				BEQ	81$		;NO-- HOW BOUT ACK?
    184	000756					CALL	SSTSLP		;YES-- SEND STATUS TO -10
	000756	004737 	002234'			JSR	PC,SSTSLP
    185	000762				81$:
    186	000762	005700 				TST	R0		;ANYTHING LEFT TO DO?
    187	000764	001411 				BEQ	84$		;NO-- SEND ACK
    188	000766	032712 	004000 			BIT	#LP.WAT,(R2)	;ARE WE WAITING FOR RESPONSE?
    189	000772	001026 				BNE	86$		;YES-- DON'T START OUPUT
    190	000774	005762 	000006 			TST	LPITH(R2)	;NO-- IS LP GOING ALREADY?
    191	001000	001023 				BNE	86$		;YES-- LEAVE IT GO
    192	001002					CALL	TESTLP		;NO-- SEE IF LP CAN BE STARTED
	001002	004737 	003236'			JSR	PC,TESTLP
    193	001006	000420 				BR	86$		;SEE IF ACK NEEDED
    194					;
    195					; QUEUE IS EMPTY-- RESET ALL FLAGS
    196					;
    197	001010				84$:
    198	001010					.INH			;;;MAKE SURE DTE DOESN'T GIVE US SOMETHING
	001010	013746 	177776 			MOV	PS,-(SP)
	001014	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
    199	001022	016200 	000004 			MOV	LPTHD(R2),R0	;;;GET THREAD POINTER
    200	001026	001006 				BNE	85$		;;;OOPS-- LET'S GO AWAY, WE GOT SOMETHING
    201	001030	032777 	000001 	177244 		BIT	#EF.LPD,@LPEVFG	;;;WILL WE BE BACK AGAIN?
    202	001036	001002 				BNE	85$		;;;YES-- CATCH FLAGS NEXT TIME
    203	001040	042712 	115400 			BIC	#LP.F10!LP.WAT!LP.LIP!LP.MCH!LP.HNG,(R2) ;;;SURELY OFF NOW
    204	001044				85$:
    205	001044					.ENB			;RESTORE INTERRUPTS
	001044	012637 	177776 			MOV	(SP)+,@#PS	;;
    206	001050				86$:
    207	001050	005705 				TST	R5		;DID WE REMOVE A BUFFER?
    208	001052	001412 				BEQ	90$		;NO-- DON'T SEND ACK
    209	001054	005700 				TST	R0		;YES-- ANY LEFT?
    210	001056	001402 				BEQ	87$		;NONE-- SEND ACK
    211	001060	005710 				TST	@R0		;IS THIS LAST BUFFER?
    212	001062	001006 				BNE	90$		;NO-- SEND NOTHING
    213	001064				87$:
    214	001064	012700 	000344'			MOV	#LPTBL,R0	;ADDRESS BASE ADDR OF TABLE FOR ..SACK
    215	001070	012703 	000000G			MOV	#D.CLPT,R3	;SAY LPT DEVICE CODE
    216	001074					CALL	..SACK		;SEND THE ACK
	001074	004737 	000000G			JSR	PC,..SACK
    217					;
    218					; DONE WITH LP-- GET ANOTHER
    219					;
    220	001100				90$:
    221	001100	062702 	000010 			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN TABLE
    222	001104	005316 				DEC	(SP)		;DECREMENT COUNT
    223	001106	003301 				BGT	10$		;BACK FOR MORE
    224	001110	005726 				TST	(SP)+		;CLEAN STACK
    225	001112				99$:
    226	001112	000137 	001552'			JMP	LPNIR		;DONE-- TRY NEXT EVENT-FLAG
    227					;
    228					; THREAD BLOCK DONE-- REMOVE FROM LIST & DEALLOCATE
    229					;
    230	001116				40$:
    231	001116	005703 				TST	R3		;LP EXIST???
    232	001120	001564 				BEQ	49$		;NO-- GIVE UP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 15-2
LPIOD	(LP TASK I/O DONE)

    233	001122	032712 	001000 			BIT	#LP.LIP,(R2)	;LOAD IN PROGRESS (I.E. NOW COMPLETE)
    234	001126	001424 				BEQ	41$		;NO-- GO ON
    235					;
    236	001130	042712 	001000 			BIC	#LP.LIP,(R2)	;YES-- NO LONGER SO
    237	001134	042713 	000014 			BIC	#MODE00!MODE01,(R3) ;CLEAR LOAD MODE BITS
    238	001140					PUSH	<R0,R3>		;SAVE EPA
	001140	010046 				MOV	R0,-(SP)
	001142	010346 				MOV	R3,-(SP)
    239	001144	016200 	000040 			MOV	LPRMA(R2),R0	;GET RAM BUFFER ADDR
    240	001150	016201 	000042 			MOV	LPRMZ(R2),R1	; AND DATA SIZE
    241	001154	012703 	000000G			MOV	#.BGBUF,R3	;WE GOT IT FROM THE BIG BUFFER
    242	001160					CALL	..DEC2		;RETURN THE BUFFER
	001160	004737 	000000G			JSR	PC,..DEC2
    243	001164					POP	<R3,R0>		;RESTORE EPA
	001164	012603 				MOV	(SP)+,R3
	001166	012600 				MOV	(SP)+,R0
    244	001170	005062 	000040 			CLR	LPRMA(R2)	;NO LONGER THERE
    245	001174	005062 	000044 			CLR	LPRMC(R2)	; . .
    246	001200				41$:
    247	001200	016004 	000000G			MOV	T.HCBC(R0),R4	;GET COMPLETION STATUS
    248	001204	032704 	040000 			BIT	#TB.ABO,R4	;ABORTED?
    249	001210	001130 				BNE	49$		;YES-- LEAVE NOW
    250	001212	032704 	036000 			BIT	#TB.SFN,R4	;SPECIAL FUNCTION?
    251	001216	001525 				BEQ	49$		;NO-- GO ON
    252					;
    253	001220	032704 	020000 			BIT	#TB.EOF,R4	;EOF?
    254	001224	001430 				BEQ	42$		;NO-- JUST GO ON
    255	001226	016260 	000040 	000000G		MOV	LPRMA(R2),T.HCAD(R0) ;RAM/VFU DATA PRESENT?
    256	001234	001003 				BNE	411$		;YES-- DO RAM/VFU LOAD
    257	001236	052712 	040200 			BIS	#LP.EOF!LP.SST,(R2) ;NO-- NOTE THAT EOF HAS OCCURED
    258	001242	000513 				BR	49$		;THAT'S IT FOR EOF IF NO RAM/VFU DATA
    259	001244				411$:
    260	001244	016260 	000044 	000000G		MOV	LPRMC(R2),T.HCBC(R0) ;SET BYTE COUNT= LAST ADDRESS
    261	001252	166060 	000000G	000000G		SUB	T.HCAD(R0),T.HCBC(R0) ;MAKE IT A BYTE COUNT
    262	001260	052712 	001000 			BIS	#LP.LIP,(R2)	;NOTE LOAD NOW IN PRGRESS
    263	001264	052713 	000010 			BIS	#VFULOD*MODE00,(R3) ;ASSUME VFU LOAD
    264	001270	026227 	000042 	001000 		CMP	LPRMZ(R2),#1000	;TRNASLATION RAM DATA?
    265	001276	001224 				BNE	80$		;NO-- MUST BE VFU DATA
    266	001300	052713 	000014 			BIS	#RAMLOD*MODE00,(R3) ;YES-- SET RAM LOAD MODE
    267	001304	000621 				BR	80$		;START LP GOING ON THIS BLOCK
    268	001306				42$:
    269	001306	032704 	010000 			BIT	#TB.LPC,R4	;LOAD PAGE COUNTER FUNCTION?
    270	001312	001413 				BEQ	43$		;NO-- GO ON
    271	001314	042712 	020000 			BIC	#LP.PZI,(R2)	;ASSUME NO INTERRUPT ENABLE
    272	001320	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS OF FUNCTION DATA
    273	001324	016163 	000002 	000010 		MOV	2(R1),LPPCTR(R3) ;SET PAGE COUNTER
    274	001332	002057 				BGE	49$		;BIT15=0-- NO INTERRUPT
    275	001334	052712 	020000 			BIS	#LP.PZI,(R2)	;BIT15=1-- INTERRUPT ENABLE
    276	001340	000454 				BR	49$		;ALL DONE
    277	001342				43$:
    278	001342					PUSH	<R3,R0>		;SAVE THIS THREAD BLOCK ADDRESS
	001342	010346 				MOV	R3,-(SP)
	001344	010046 				MOV	R0,-(SP)
    279	001346	016201 	000044 			MOV	LPRMC(R2),R1	;GET CURRENT RAM DATA ADDRESS
    280	001352	001026 				BNE	46$		;GOT IT-- PUT THIS DATA IN THAT BUFFER
    281	001354	012700 	000000G			MOV	#.BGBUF,R0	;POINT TO BIG BUFFER FOR DATA BLOCK
    282	001360	012701 	001000 			MOV	#1000,R1	;ASSUME TRANSLATION RAM DATA
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 15-3
LPIOD	(LP TASK I/O DONE)

    283	001364	032704 	004000 			BIT	#TB.RMD,R4	;RAM DATA?
    284	001370	001002 				BNE	44$		;YES-- GOT IT
    285	001372	012701 	000444 			MOV	#<^D<145*2>+2+3>&<-4>,R1 ; +++001 NO-- VFU DATA-- GET MAX LENGTH
    286	001376				44$:
    287	001376					CALL	..ALC2		;GET A BUFFER
	001376	004737 	000000G			JSR	PC,..ALC2
    288	001402	103004 				BCC	45$		;GOT IT-- GO ON
    289	001404					WSIG$S			;NO GOT-- WAIT AN INSTANT
	001404	012746 				MOV	(PC)+,-(SP)
	001406	   061 	   001 			.BYTE	49.,1
	001410	104375 				EMT	375
    290	001412	000771 				BR	44$		;TRY FOR BUFFER AGAIN
    291	001414				45$:
    292	001414	010162 	000042 			MOV	R1,LPRMZ(R2)	;STORE RAM DATA SIZE
    293	001420	010001 				MOV	R0,R1		;COPY THAT BUFFER ADDRESS
    294	001422	010162 	000040 			MOV	R1,LPRMA(R2)	;STORE RAM DATA ADDRESS
    295	001426	011600 				MOV	(SP),R0		;RESTORE THREAD BLOCK ADDRESS
    296	001430				46$:
    297	001430	016203 	000040 			MOV	LPRMA(R2),R3	;COPY ADDRESS WHERE DATA GOES
    298	001434	066203 	000042 			ADD	LPRMZ(R2),R3	;COMPUTE END OF BUFFER
    299	001440	016000 	000000G			MOV	T.HCAD(R0),R0	;GET THE RAM DATA ADDRESS
    300	001444	042704 	177400 			BIC	#HIBYTE,R4	;CLEAR TRASH IN BYTE COUNT
    301	001450	001404 				BEQ	48$		;ALL DONE IF ZERO BYTE COUNT
    302	001452				47$:
    303	001452	020103 				CMP	R1,R3		;GOING BEYOND END OF BUFFER?
    304	001454	103002 				BHIS	48$		;YES-- THAT'S ALL THE DATA WE CAN TAKE
    305	001456	112021 				MOVB	(R0)+,(R1)+	;STORE A BYTE AWAY
    306	001460	077404 				SOB	R4,47$		;LOOP FOR ALL BYTES OF DATA
    307	001462				48$:
    308	001462					POP	<R0,R3>		;RESTORE THE THREAD BLOCK POIINTER
	001462	012600 				MOV	(SP)+,R0
	001464	012603 				MOV	(SP)+,R3
    309	001466	010162 	000044 			MOV	R1,LPRMC(R2)	;STORE CURRENT BYTE ADDRESS
    310	001472				49$:
    311	001472	011062 	000004 			MOV	@R0,LPTHD(R2)	;REMOVE THIS BUFFER
    312	001476	016001 	000000G			MOV	T.HBCT(R0),R1	;GET SIZE OF THIS THREAD BLOCK
    313	001502	001013 				BNE	60$		;NOT QIO-- JUST DEALLOCATE
    314					;
    315					; QUEUE I/O REQUEST DONE-- CALL ..IODN
    316					;
    317	001504					PUSH	R3		;SAVE EPA
	001504	010346 				MOV	R3,-(SP)
    318	001506	110403 				MOVB	R4,R3		;GET QUEUE I/O STATUS
    319	001510	016004 	177776 			MOV	T.HIBC(R0),R4	;GET INITAIL BYTE COUNT AS TRANSFER COUNT
    320	001514	010001 				MOV	R0,R1		;COPY THREAD BLOCK ADDRESS
    321	001516	162701 	000004G			SUB	#R.PB+PBTHRD,R1	;GET ADDRESS OF REAL QUEUE I/O NODE
    322	001522					CALL	..IODN		;SAY I/O DONE
	001522	004737 	000000G			JSR	PC,..IODN
    323	001526					POP	R3		;RESTORE EPA
	001526	012603 				MOV	(SP)+,R3
    324	001530	000406 				BR	61$		;ALL DONE
    325					;
    326					; ALL DONE WITH THREAD BLOCK-- DEALLOCATE IT
    327					;
    328	001532				60$:
    329	001532					CALL	..DECB		;DEALLOCATE THE BUFFER
	001532	004737 	000000G			JSR	PC,..DECB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 15-4
LPIOD	(LP TASK I/O DONE)

    330	001536	032712 	000400 			BIT	#LP.F10,(R2)	;DOES -10 HAVE A REQUEST IN?
    331	001542	001401 				BEQ	61$		;NO-- DON'T FLAG TO ACK
    332	001544	010205 				MOV	R2,R5		;NOTE THAT WE DID SOMETHING
    333	001546				61$:
    334	001546	000137 	000720'			JMP	20$		;GET NEXT THREAD BLOCK FOR THIS LP
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 16
LPNIR	(LP TASK QUEUE I/O REQUEST)

    336						.SBTTL	LPNIR	(LP TASK QUEUE I/O REQUEST)
    337					;
    338					;+
    339					;
    340					;	LPNIR IS DISPATCHED TO WHENEVER THE EVENT FLAG EF.NIR IS SET.
    341					; THIS OCCURS WHEN ANOTHER TASK REQUESTS OUTPUT TO ANY LP. ALL LP'S
    342					; ARE CHECKED FOR A REQUEST WAITING.
    343					;
    344					;	THE REQUEST IS QUEUED UP IN THE THREADED OUTPUT LIST
    345					; FOR THIS LP, USING AN EXTENDED THREAD BLOCK. THIS BLOCK IS DISTINGUISHED
    346					; AS A QUEUE I/O REQUEST BY T.HBCT BEING ZERO (THE LENGTH OF THE BLOCK
    347					; IS T.HQRS).  THE ADDITIONAL INFORMATION IN THIS THREAD BLOCK IS:
    348					;	T.HEMA --	(BYTE) EXTENDED MEMORY ADDRESS BITS (BITS 4 AND 5)
    349					;	T.HVFC --	(BYTE) VERTICAL FORMAT CONTROL CHARACTER
    350					;	T.HIBC --	INITIAL BYTE COUNT
    351					;
    352					;-
    353					;
    354						.ENABLE	LSB
    355	001552				LPNIR:
    356	001552	032737 	000000G	000304'		BIT	#EF.NIR,LPCEVF	;A QUEUE I/O REQUEST FOR US?
    357	001560	001514 				BEQ	99$		;NO-- TRY NEXT IN CHAIN
    358	001562	012700 	050114 			MOV	#"LP,R0		;SAY WE ARE A LP
    359	001566					CALL	..DQRN		;GET A REQUEST
	001566	004737 	000000G			JSR	PC,..DQRN
    360	001572	103507 				BCS	99$		;NONE-- DONE
    361					;
    362					; GOT QUEUE I/O REQUEST NODE-- ADDR IN R1
    363					;
    364					; REGISTERS RETURNED BY ..DQRN
    365					;	R1 --	ADDRESS OF REQUEST NODE
    366					;	R2 --	UNIT # OF REQUESTED DEVICE
    367					;	R3 --	BYTE COUNT OF DATA
    368					;	R4 --	EXTENDED ADDRESS BITS 16 AND 17 (IN BITS 4 AND 5)
    369					;	R5 --	PHYSICAL ADDRESS OF DATA
    370					;
    371					; CHECK FOR FUNCTION CODES:
    372					;	IO.WLB	OUTPUT BUFFER
    373					;	IO.WVB	OUTPUT BUFFER
    374					;	IO.KIL	FLUSH OUTPUT (CALL ..SPLP)
    375					;	IO.DAC	CLOSE OUTPUT (TYPE <FF>)
    376					;	IO.RVB	READ-- ILLEGAL FUNCTION
    377					;	IO.RLB	READ-- ILLEGAL FUNCTION
    378					;
    379					; ALL OTHER FUNCTIONS ARE IGNORED
    380					;
    381	001574	006302 				ASL	R2		;MAKE UNIT IN WORDS
    382	001576	016202 	000424'			MOV	LPUTBL(R2),R2	;GET ADDR OF LPTBL ENTRY FOR THIS LP
    383	001602	116100 	000001G			MOVB	R.FC+1(R1),R0	;GET FUNCTION CODE FROM REQUEST NODE
    384	001606	001430 				BEQ	20$		;EXPRESS FUNCTION-- LOOK AT IT
    385	001610	122700 	000001 			CMPB	#IO.WLB/400,R0	;WRITE LOGICAL?
    386	001614	001441 				BEQ	40$		;YES-- PRINT
    387	001616	122700 	000022 			CMPB	#IO.WVB/400,R0	;WRITE VIRTUAL?
    388	001622	001436 				BEQ	40$		;YES-- PRINT ALSO
    389	001624	122700 	000002 			CMPB	#IO.RLB/400,R0	;READ LOGICAL????
    390	001630	001414 				BEQ	15$		;YES-- ILLEGAL
    391	001632	122700 	000021 			CMPB	#IO.RVB/400,R0	;READ VIRTUAL????
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 16-1
LPNIR	(LP TASK QUEUE I/O REQUEST)

    392	001636	001411 				BEQ	15$		;YES-- ILLEGAL
    393	001640	122700 	000020 			CMPB	#IO.DAC/400,R0	;CLOSE OUT FILE?
    394	001644	001017 				BNE	30$		;NO-- ASSUME OK, GIVE SUCCESS
    395					;
    396					; IO.DAC -- CLOSE OUT FILE, SEND <FF>
    397					;
    398	001646	012705 	002000'			MOV	#VFCFF,R5	;SET ADDRESS TO POINT TO FORM-FEED
    399	001652	012703 	000001 			MOV	#1,R3		;BYTE COUNT= 1
    400	001656	005004 				CLR	R4		;NO EMA BITS
    401	001660	000417 				BR	40$		;SEND LIKE QUEUE I/O
    402					;
    403					; ILLEGAL FUNCTION
    404					;
    405	001662				15$:
    406	001662	012703 	177776 			MOV	#IE.IFC,R3	;SAY ILLEGAL
    407	001666	000410 				BR	31$		;SO SAY IT
    408					;
    409					; IO.KIL-- FLUSH OUTPUT
    410					;
    411	001670				20$:
    412	001670	022761 	000012 	000000G		CMP	#IO.KIL,R.FC(R1) ;THIS I/O KILL?
    413	001676	001002 				BNE	30$		;NO-- IGNORE
    414	001700					CALL	..SPLP		;FLUSH OUTPUT
	001700	004737 	004300'			JSR	PC,..SPLP
    415					;
    416					; IO.ATT, IO.DET-- IGNORE
    417					;
    418	001704				30$:
    419	001704	012703 	000001 			MOV	#IS.SUC,R3	;SAY 'SUCCESS' TO ..IODN
    420	001710				31$:
    421	001710	005004 				CLR	R4		;NO BYTES TRANSFERRED
    422	001712					CALL	..IODN		;RETURN PACKET TO REQUESTOR
	001712	004737 	000000G			JSR	PC,..IODN
    423	001716	000715 				BR	LPNIR		;DONE-- TRY FOR SOME MORE
    424					;
    425					; IO.WLB, IO.WVB-- SEND DATA TO LP
    426					;
    427					; ENTER THIS REQUEST IN THREADED OUTPUT LIST
    428					;
    429	001720				40$:
    430	001720	010100 				MOV	R1,R0		;COPY NODE ADDRESS
    431	001722	062700 	000004G			ADD	#R.PB+PBTHRD,R0	;POINT TO THREAD BLOCK AREA OF R.PB
    432					.IF NE 2-<PBTHRD+T.HIBC>
    433						MOV	R.PB+2(R1),T.HIBC(R0) ;SET INITIAL BYTE COUNT
    434					.ENDC
    435	001726	116101 	000004G			MOVB	R.PB+4(R1),R1	;GET VERTICAL FORMAT CHARACTER
    436	001732	005060 	000000G			CLR	T.HBCT(R0)	;NOTE THAT THIS IS A QIO REQUEST
    437	001736	010560 	000000G			MOV	R5,T.HCAD(R0)	;SAVE PHYSICAL ADDR OF DATA
    438	001742	010360 	000000G			MOV	R3,T.HCBC(R0)	; AND BYTE COUNT OF DATA
    439	001746	110460 	177774 			MOVB	R4,T.HEMA(R0)	; AND EXTENDED MEMORY ADDR BITS
    440					;
    441	001752	012705 	001776'			MOV	#VFCTBL,R5	;YES-- POINT TO TABLE OF FORMAT CONTROL CHARACTERS
    442	001756				55$:
    443	001756	112560 	177775 			MOVB	(R5)+,T.HVFC(R0) ;GET THE CHARCTER TO CONTROL
    444	001762	001402 				BEQ	60$		;END OF TABLE-- GIVE UP WITH NOTHING
    445	001764	122501 				CMPB	(R5)+,R1	;MATCH THE VFC CHARACTER?
    446	001766	001373 				BNE	55$		;NO-- LOOP UNTIL WE FIND ONE
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 16-2
LPNIR	(LP TASK QUEUE I/O REQUEST)

    447	001770				60$:
    448	001770					CALL	..PTLP		;START LP ON THIS BUFFER, OR QUEUE UP
	001770	004737 	004536'			JSR	PC,..PTLP
    449	001774	000666 				BR	LPNIR		;LOOK FOR ANOTHER REQUEST
    450					;
    451					; VERTICAL FORMAT CONTROL CHARACTER TABLE FOR QUEUE I/O REQUESTS
    452					;
    453	001776				VFCTBL:
    454	001776	   012 	   040 			.BYTE	12,' 		;<SPACE>	NEXT LINE
    455	002000	   014 	   061 		VFCFF:	.BYTE	14,'1		;"1"		NEXT PAGE
    456	002002	   015 	   053 			.BYTE	15,'+		;"+"		OVERPRINT
    457	002004	   021 	   060 			.BYTE	21,'0		;"0"		DOUBLE SPACE
    458	002006	   012 	   044 			.BYTE	12,'$		;"$"		PROMPTING OUTPUT
    459	002010	   000 				.BYTE	0		;END OF TABLE
    460						.EVEN
    461					;
    462					;
    463	002012				99$:
    464					;	BR	LPMKT		;NEXT IS MARK-TIME REQUESTS
    465						.DSABLE LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 17
LPMKT	(LP TASK MARK-TIME REQUEST)

    467						.SBTTL	LPMKT	(LP TASK MARK-TIME REQUEST)
    468					;
    469					;+
    470					;	LPMKT IS DISPATCHED TO WHEN THE EF.LPC EVENT FLAG IS SET.
    471					; THIS OCCURS EVERY 10. SECONDS.  EACH LP IS CHECKED TO SEE IF LP.HNG
    472					; BIT HAS BEEN CLEARED BY ..DOLP (I/O COMPLETION) IF IT IS NOT
    473					; IDLE. IF LP.HNG IS SET, NO I/O HAS OCCURED IN 10 SECONDS, SO
    474					; 'GO' IS SET IN LPCSRA TO CONTINUE THE LP. LPHUNG IS INCREMENTED.
    475					; IN ANY CASE, IF THE LP IS NOT IDLE, LP.HNG IS SET SO IT CAN BE
    476					; CHECKED IN ANOTHER 10 SECONDS.
    477					;
    478					;-
    479					;
    480						.ENABLE	LSB
    481	002012				LPMKT:
    482	002012	032737 	000002 	000304'		BIT	#EF.LPC,LPCEVF	;IS MARK-TIME EVENT FLAG SET?
    483	002020	001503 				BEQ	99$		;NO-- CHECK NEXT FLAG
    484	002022	012705 	000002 			MOV	#L$$P20,R5	;SET UP # LP'S TO CHECK
    485	002026	012702 	000344'			MOV	#LPTBL,R2	;ADDRESS DATA BLOCK FOR UNIT 0
    486	002032				10$:
    487	002032	016203 	000002 			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
    488	002036	001407 				BEQ	12$		;NON-EX LP-- SKIP THIS
    489	002040	000241 				CLC			;CLEAR CARRY, IN CASE OF TRAP
    490	002042	032713 	000100 			BIT	#INTENB,(R3)	;IS INTERRUPT-ENABLE STILL SET?
    491	002046				INTINS:
    492	002046	103403 				BCS	12$		;TIME-OUT-- JUST SEND STATUS
    493	002050	001002 				BNE	12$		;YES-- DON'T SET IT
    494	002052	052713 	000100 			BIS	#INTENB,(R3)	;MAKE SURE WE STILL HAVE INTERRUPT ENABLE
    495	002056				12$:
    496	002056	032712 	004000 			BIT	#LP.WAT,(R2)	;WAITING?
    497	002062	001047 				BNE	30$		;YES-- DON7T TRY TO CONTINUE
    498	002064	005762 	000004 			TST	LPTHD(R2)	;ANY ACTIVE REQUESTS?
    499	002070	001453 				BEQ	90$		;NONE-- LP IS IDLE
    500	002072	032712 	100000 			BIT	#LP.HNG,(R2)	;NO I/O IN 10 SEC?
    501	002076	001446 				BEQ	80$		;NO-- I/O CLEARED THIS BIT-- OK
    502	002100	005762 	000006 			TST	LPITH(R2)	;IS I/O SUPPOSED TO BE IN PROGRSS?
    503	002104	001436 				BEQ	30$		;NO-- SEE IF WE JUST CAME ON-LINE
    504	002106	005703 				TST	R3		;DEVICE EXIST?
    505	002110	001434 				BEQ	30$		;NON-EX LP-- FLUSH OUTPUT
    506	002112	005237 	000306'			INC	LPHUNG		;COUNT # TIMES WE HAD TO START LP G9OING
    507	002116	005362 	000024 			DEC	LPRTY(R2)	;ONE LESS TIME TO TRY
    508	002122	002427 				BLT	30$		;NONE LEFT-- GIVE UP
    509	002124					.INH4			;;;LOCK OUT LP INTERRUPTS
	002124	013746 	177776 			MOV	@#PS,-(SP)
	002130	112737 	000200 	177776 		MOVB	#PR4,@#PS
    510	002136	105062 	000022 			CLRB	LPCSM+0(R2)	;;;CLEAR LOW BYTE SO NO CARRY
    511	002142	066362 	000016 	000022 		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM (CLEARED BY GO)
    512	002150	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
    513	002154	001403 				BEQ	20$		;;;YES-- DO NEXT BUFFER
    514	002156	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;NO-- JUST SET INT ENB AND GO
    515	002162	000404 				BR	29$		;;;DO ANOTHER LP
    516					;
    517	002164				20$:
    518	002164	016200 	000006 			MOV	LPITH(R2),R0	;;;GET CURRENT BUFFER ADDRESS
    519	002170					CALL	..DOL1		;;;DONE-- DO NEXT BUFFER
	002170	004737 	004666'			JSR	PC,..DOL1
    520	002174				29$:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 17-1
LPMKT	(LP TASK MARK-TIME REQUEST)

    521	002174					.ENB4			;ALLOW LP INTERRUPTS
	002174	012637 	177776 			MOV	(SP)+,@#PS
    522	002200	000405 				BR	80$		;DONE WITH LP
    523					;
    524	002202				30$:
    525	002202	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO SEND STATUS!!
    526	002206	052777 	000001 	176066 		BIS	#EF.LPD,@LPEVFG	;YES-- START IT UP AGAIN
    527	002214				80$:
    528	002214	052712 	100000 			BIS	#LP.HNG,(R2)	;SAY LP NO I/O
    529									  ; THIS WILL BE CLEARED WHENEVER
    530									  ; ANY I/O IS DONE TO LP
    531	002220				90$:
    532	002220	062702 	000010 			ADD	#LPSIZE,R2	;BUMP TO NEXT LP IN LPTBL
    533	002224	005305 				DEC	R5		;TRY ALL
    534	002226	003301 				BGT	10$		; LP'S
    535	002230				99$:
    536	002230	000137 	000604'			JMP	LPLOOP		;GO BACK TO WAITING
    537						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 18
SSTSLP	(SEND LP-20 STATUS TO -10)

    539						.SBTTL	SSTSLP	(SEND LP-20 STATUS TO -10)
    540					;
    541					;+
    542					;
    543					;	SSTSLP IS CALLED TO SEND THE LP-20 STATUS TO THE -10.
    544					; IT IS INVOKED BY BOTH A REQUEST FOR STATUS FROM THE -10
    545					; AND ANY LP-20 ERROR INDICATION, AS WELL AS PAGE COUNT ZERO
    546					; (IF ENABLED) AND UNDEFINED CHARACTERS IN THE RAM.
    547					;
    548					;	TWO DEVICE-STSTUS WORDS ARE GENERATED,
    549					; WITH THE STANDARD BITS (DV.XXX) IN THE FIRST WORD, AND THE
    550					; FOLLOWING DEVICE-DEPENDENT BITS IN THE SECOND WORD:
    551					;
    552					;	DD.PGZ	PAGE COUNTER REACHED ZERO
    553					;	DD.CHI	UNDEFINED CHARACTER IN RAM
    554					;	DD.VFE	VFU ERROR (IMPLIES PAPER RE-ALIGNMENT REQUIRED)
    555					;	DD.LER	ERROR FINDING/READING VFU AND RAM FILE
    556					;	DD.OVF	OPTICAL VERTICAL FORMAT UNIT
    557					;	DD.RME	RAM PARITY ERROR-- RELOAD REQUIRED
    558					;
    559					; THE STATUS BLOCK SENT TO THE -10 IS IN THE FOLLOWING FORMAT:
    560					;
    561					; WORD	0	STATUS WORD 0 (DV.XXX)
    562					;	1	STATUS WORD 1 (DD.XXX)
    563					;	2	(HIGH BYTE) # BYTES OF DEVICE DEPENDENT INFO (ALWAYS 2.)
    564					;		(LOW BYTE) # BYTES OF DEVICE REGISTERS (ALWAYS 16.)
    565					;	3	(LOW BYTE) ACCUMULATED CHECKSUM (HIGH BYTE) RETRY COUNT
    566					; LP-20 DEVICE REGISTERS
    567					;	4	LPCSRA
    568					;	5	LPCSRB
    569					;	6	LPBSAD
    570					;	7	LPBCTR
    571					;	10	LPPCTR
    572					;	11	LPRAMD
    573					;	12	LPCBUF/LPCCTR
    574					;	13	LPTDAT/LPCKSM
    575					;
    576					; CALLED AT TASK LEVEL
    577					;
    578					; CALLING SEQUENCE:
    579					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
    580					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
    581					;
    582					; EXIT CONDITIONS:
    583					;
    584					;	NO REGISTERS MODIFIED
    585					;
    586					;-
    587					;
    588						.ENABLE	LSB
    589	002234				SSTSLP:
    590	002234					SAVE	<R0,R1,R3,R4>	;SAVE USED CARS
	002234	010046 				MOV	R0,-(SP)
	002236	010146 				MOV	R1,-(SP)
	002240	010346 				MOV	R3,-(SP)
	002242	010446 				MOV	R4,-(SP)
    591	002244	042712 	040000 			BIC	#LP.SST,(R2)	;CLEAR 'SEND STATUS' FLAG
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 18-1
SSTSLP	(SEND LP-20 STATUS TO -10)

    592	002250	032777 	000020 	176024 	4$:	BIT	#EF.LPS,@LPEVFG	;IS OUR BUFFER AVAILABLE?
    593	002256	001007 				BNE	5$		;YES-- DON'T WAIT
    594	002260					WSIG$S			;NO-- WAIT FOR IT
	002260	012746 				MOV	(PC)+,-(SP)
	002262	   061 	   001 			.BYTE	49.,1
	002264	104375 				EMT	375
    595	002266	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ;IS PRIMARY PROTOCOL RUNNING ?
    596	002274	001365 				BNE	4$		;YES-- STILL BUSY...
    597	002276				5$:
    598	002276	012700 	000320'			MOV	#LPSTBK+4,R0	;GET ADDRES OF BYTE COUNT WORD
    599	002302	005010 				CLR	(R0)		;CLEAR IT (ASSUME NON-EX DEV)
    600	002304	005040 				CLR	-(R0)		; AND SECOND WORD OF STATUS
    601	002306	005040 				CLR	-(R0)		;AND FIRST WORD, WITH R0 POINTING TO IT
    602	002310	005001 				CLR	R1		;CLEAR ERROR MESSAGE POINTER, TOO
    603	002312	005703 				TST	R3		;GOT A EPA?
    604	002314	001005 				BNE	10$		;GOT IT-- CHECK OUT LP STATUS
    605	002316	052710 	000007 			BIS	#DV.NXD!DV.OIR!DV.OFL,(R0) ;NON-EX LP-- SAY SO
    606	002322	012701 	002767'			MOV	#ERMNXD,R1	;PRINT ERROR ON CONSOLE, TOO
    607	002326	000537 				BR	50$		;GO SEND THE ERROR
    608					;
    609	002330				10$:
    610	002330	032712 	000200 			BIT	#LP.EOF,(R2)	;THIS AN EOF ENCOUNTERED?
    611	002334	001402 				BEQ	11$		;NO-- GO ON
    612	002336	052710 	000040 			BIS	#DV.EOF,(R0)	;YES-- SAY SO
    613	002342				11$:
    614	002342	032713 	004000 			BIT	#ONLINE,(R3)	;LP OFF-LINE?
    615	002346	001004 				BNE	12$		;NO-- GO ON
    616	002350	052710 	000006 			BIS	#DV.OFL!DV.OIR,(R0) ;YES-- SAY OFF-LINE
    617	002354	012701 	003007'			MOV	#ERMOFL,R1	; AND TO CONSOLE
    618	002360				12$:
    619	002360	032713 	010000 			BIT	#VFURDY,(R3)	;VFU NOT READY?
    620	002364	001007 				BNE	13$		;NO-- OK
    621	002366	052760 	000004 	000002 		BIS	#DD.VFE,2(R0)	;YES-- SET SO IN DD WORD
    622	002374	012701 	003022'			MOV	#ERMVFE,R1	;TELL CONSOLE
    623	002400	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
    624	002404				13$:
    625	002404	032763 	000076 	000002 		BIT	#LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM,LPCSRB(R3) ;FATAL ERROR?
    626	002412	001404 				BEQ	14$		;NO-- ALL OK
    627	002414	052710 	000100 			BIS	#DV.LOG,(R0)	;YES-- SAY BAD ERROR, AND ERROR-LOG IT
    628	002420	012701 	003041'			MOV	#ERMHER,R1	;SAY SPLAT TO CONSOLE
    629	002424				14$:
    630	002424	016204 	000004 			MOV	LPTHD(R2),R4	;IS I/O LEFT TO DO?
    631	002430	001002 				BNE	141$		;YES-- SAY SO
    632	002432	005001 				CLR	R1		;NO-- DON'T SEND OFF-LINE/VFE
    633	002434	000436 				BR	15$		;GO ON
    634					;
    635	002436				141$:
    636	002436	052710 	000020 			BIS	#DV.IOP,(R0)	;SAY I/O IN PROGRESS
    637	002442	005764 	000000G			TST	T.HBCT(R4)	;IS THIS A QUEUE I/O REQUEST?
    638	002446	001002 				BNE	142$		;NO-- GO ON
    639	002450	052710 	000400 			BIS	#DV.F11,(R0)	;YES-- SAY FROM -11
    640	002454				142$:
    641	002454	005762 	000024 			TST	LPRTY(R2)	;IS RETRY COUNT DOWN YET?
    642	002460	002024 				BGE	15$		;NO-- GO ON
    643	002462	052710 	000300 			BIS	#DV.URE!DV.LOG,(R0) ;SAY RETRY COUNT EXHAUSTED
    644	002466	032712 	100000 			BIT	#LP.HNG,(R2)	;WAS DEVICE HUNG, TOO?
    645	002472	001404 				BEQ	143$		;NO-- GO ON
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 18-2
SSTSLP	(SEND LP-20 STATUS TO -10)

    646	002474	052710 	001004 			BIS	#DV.HNG!DV.OIR,(R0) ;YES-- SAY THAT TOO
    647	002500	012701 	003056'			MOV	#ERMHNG,R1	;GET HUNG MESSAGE, TOO
    648	002504				143$:
    649	002504	032763 	000010 	000002 		BIT	#RAMPAR,LPCSRB(R3) ;RAM PARITY ERROR?
    650	002512	001405 				BEQ	144$		;NO-- GO ON
    651	002514	052760 	000040 	000002 		BIS	#DD.RME,2(R0)	;YES-- NOTE FATAL ERROR
    652	002522	052712 	002000 			BIS	#LP.CLR,(R2)	;NOTE RAM NEEDS TO BE RESET
    653	002526				144$:
    654	002526					CALL	..SPLP		;RETRY COUNT EXHAUSTED-- GIVE UP OUTPUT
	002526	004737 	004300'			JSR	PC,..SPLP
    655	002532				15$:
    656	002532	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGE-COUNT ZERO?
    657	002536	001412 				BEQ	16$		;NO-- OK
    658	002540	032712 	020000 			BIT	#LP.PZI,(R2)	;YES-- BUT ENABLED?
    659	002544	001407 				BEQ	16$		;NO-- DON'T TELL HIM
    660	002546	052710 	000010 			BIS	#DV.SCN,(R0)	;TELL -10 WE WANT HIM TO ACK
    661	002552	052760 	000001 	000002 		BIS	#DD.PGZ,2(R0)	; FOR PAGE-ZERO
    662	002560	052712 	004000 			BIS	#LP.WAT,(R2)	;REMEMBER TO WAIT
    663	002564				16$:
    664	002564	032713 	020000 			BIT	#CHRINT,(R3)	;UNDEFINED (INTERRUPT) CHARACTER?
    665	002570	001407 				BEQ	17$		;NO-- GO ON
    666	002572	052710 	000010 			BIS	#DV.SCN,(R0)	;NOTE TO WAIT
    667	002576	052760 	000002 	000002 		BIS	#DD.CHI,2(R0)	; FOR UNDEF CHAR
    668	002604	052712 	004000 			BIS	#LP.WAT,(R2)	; AND FOR US TO WAIT
    669	002610				17$:
    670	002610	032763 	004000 	000002 		BIT	#OPTVFU,LPCSRB(R3) ;THIS LP HAVE OPTICAL VFU?
    671	002616	001403 				BEQ	18$		;NO-- MUST HAVE DAVFU (HOORAY)
    672	002620	052760 	000020 	000002 		BIS	#DD.OVF,2(R0)	;YES-- SAY SO
    673	002626				18$:
    674					;
    675					; ERROR CODE NOW IN LPSTBK+0 AND LPSTBK+2
    676					;
    677	002626				50$:
    678	002626	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST?
    679	002632	001115 				BNE	70$		;YES-- DON'T PRINT ON CONSOLE
    680					;
    681					; NON-10 REQUEST-- SEND CONSOLE A MESSAGE ABOUT OUR STATUS
    682					;
    683	002634	042712 	004000 			BIC	#LP.WAT,(R2)	;DON'T WAIT FOR NON-10 REQUEST
    684	002640	005701 				TST	R1		;TELL OPR?
    685	002642	001511 				BEQ	70$		;NO-- JUST SEND TO -10 ANYWAY
    686	002644	012700 	002747'			MOV	#LPEMSX,R0	;GET ADDRESS OF END OF MESSAGE SO FAR
    687	002650				51$:
    688	002650	112120 				MOVB	(R1)+,(R0)+	;COPY A BYTE OF THE MESSAGE
    689	002652	001376 				BNE	51$		; UNTIL ASCIZZZZZZZZ
    690	002654	162700 	002734'			SUB	#LPEMSG,R0	;GET LENGTH OF MESSAGE
    691	002660	010037 	002730'			MOV	R0,LPQDPB+Q.IOPL+2 ;SET LENGTH IN QIOW$ DPB
    692	002664	011201 				MOV	(R2),R1		;GET UNIT
    693	002666	042701 	177774 			BIC	#^C<LP.UNT>,R1	; NUMBER OF THIS LP
    694	002672	062701 	000060 			ADD	#'0,R1		;MAKE IT ASCII
    695	002676	110137 	002744'			MOVB	R1,LPERUN	;SAVE IN MESSAGE STRING
    696	002702					DIR$	#LPQDPB		;DO QUEUE I/O TO CTY
	002702	012746 	002712'			MOV	#LPQDPB,-(SP)
	002706	104375 				EMT	375
    697	002710	000466 				BR	70$		;SEE IF WE CAN CONTINUE
    698					;
    699	002712				LPQDPB:
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 18-3
SSTSLP	(SEND LP-20 STATUS TO -10)

    700	002712					QIOW$	IO.WLB,1,E.FLPQ,1,0,0,<LPEMSG,0,0>
	002712	   003 	   011 			.BYTE	3,$$$ARG
	002714	000400 				.WORD	IO.WLB
	002716	000001 				.WORD	1
	002720	   003 	   001 			.BYTE	E.FLPQ,1
	002722	000000 				.WORD	0
	002724	000000 				.WORD	0
	002726	002734'				.WORD	LPEMSG
	002730	000000 				.WORD	0
	002732	000000 				.WORD	0
    701	002734				LPEMSG:
    702	002734	   015 	   012 	   052 		.ASCII	<15><12>/*** LP/
	002737	   052 	   052 	   040
	002742	   114 	   120
    703	002744				LPERUN:
    704	002744	   060 	   072 	   040 		.ASCII	/0: /
    705	002747				LPEMSX:
    706						.BLKB	16.		;REST OF MESSAGE: MAX OF 16 BYTES
    707	002767				ERMNXD:
    708	002767	   116 	   117 	   116 		.ASCIZ	/NON-EX DEVICE/<15><12>
	002772	   055 	   105 	   130
	002775	   040 	   104 	   105
	003000	   126 	   111 	   103
	003003	   105 	   015 	   012
	003006	   000
    709	003007				ERMOFL:
    710	003007	   117 	   106 	   106 		.ASCIZ	/OFF-LINE/<15><12>
	003012	   055 	   114 	   111
	003015	   116 	   105 	   015
	003020	   012 	   000
    711	003022				ERMVFE:
    712	003022	   106 	   117 	   122 		.ASCIZ	/FORMAT ERROR/<15><12>
	003025	   115 	   101 	   124
	003030	   040 	   105 	   122
	003033	   122 	   117 	   122
	003036	   015 	   012 	   000
    713	003041				ERMHER:
    714	003041	   104 	   101 	   124 		.ASCIZ	/DATA ERROR/<15><12>
	003044	   101 	   040 	   105
	003047	   122 	   122 	   117
	003052	   122 	   015 	   012
	003055	   000
    715	003056				ERMHNG:
    716	003056	   110 	   125 	   116 		.ASCIZ	/HUNG/<15><12>
	003061	   107 	   015 	   012
	003064	   000
    717						.EVEN
    718					;
    719					; HERE WE SEND THE STATUS BLOCK TO THE -10, R1= STATE CODE
    720					;
    721					;
    722					; ASSEMBLE DEVICE INFO AND DEVICE REGISTERS
    723					;
    724	003066				70$:
    725	003066	005703 				TST	R3		;NON-EX DEVICE?
    726	003070	001417 				BEQ	72$		;YES-- DON'T STORE NON-EX DEVICE REGISTERS
    727	003072	012700 	000320'			MOV	#LPSTBK+4,R0	;POINT TO STATUS RETURN BLOCK
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 18-4
SSTSLP	(SEND LP-20 STATUS TO -10)

    728	003076	012720 	001020 			MOV	#<2.*BIT8>+<LPEXPZ*BIT0>,(R0)+ ;2 BYTES INFO, + DEV REG'S
    729	003102	116220 	000023 			MOVB	LPCSM+1(R2),(R0)+ ;CHECKSUM
    730	003106	012701 	000012 			MOV	#LPRTRY,R1	;GET INITIAL RETRY COUNT
    731	003112	166201 	000024 			SUB	LPRTY(R2),R1	; - CURRENT COUNT= # RETRIES
    732	003116	110120 				MOVB	R1,(R0)+	;HIGH BYTE-- # RETRIES
    733	003120				71$:
    734	003120	012320 				MOV	(R3)+,(R0)+	;(2) ... LP DEVICE REGISTERS
    735	003122	022700 	000344'			CMP	#LPSTBK+LPSTLN,R0 ;DONE YET?
    736	003126	101374 				BHI	71$		;NO-- KEEP ON LOOPING
    737					;
    738					; SET UP REGISTERS FOR ..STIN:
    739					;	R0 --	ADDRESS OF BLOCK (FIRST WORD IS UNIT/BYTE COUNT)
    740					;	R1 --	FUNCTION CODE + BIT15 (FOR INDIRECT FUNCTION)
    741					;	R2 --	EVENT FLAG NUMBER TO BE SET WHEN BLOCK SENT
    742					;	R3 --	DEVICE CODE (D.CLPT FOR THE LP-20)
    743					;
    744	003130				72$:
    745	003130	012700 	000314'			MOV	#LPSTBK,R0	;SET UP ADDR FOR ..STIN
    746	003134	011201 				MOV	(R2),R1		;GET UNIT NUMBER
    747	003136	042701 	177774 			BIC	#^C<LP.UNT>,R1	; FROM LPSTS
    748	003142	110140 				MOVB	R1,-(R0)	;HIGH BYTE HEADER: UNIT #
    749	003144	112740 	000032 			MOVB	#LPSTLN+2,-(R0)	;LOW BYTE HEADER: SIZE OF BLOCK
    750	003150	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ;INDIRECT FUNCTION HERE IS DEVICE STATUS
    751	003154					PUSH	R2		;SAVE LPTBL POINTER
	003154	010246 				MOV	R2,-(SP)
    752	003156	012702 	000005 			MOV	#E.FLPS,R2	;EVENT FLAG NUMBER
    753	003162	012703 	000000G			MOV	#D.CLPT,R3	;DEVICE LP
    754	003166	042777 	000020 	175106 		BIC	#EF.LPS,@LPEVFG	;CLEAR BUFFER AVAILABLE FLAG
    755	003174					CALL	..STIN		;SAVE FOR NOW
	003174	004737 	000000G			JSR	PC,..STIN
    756	003200					POP	R2		;RESTORE LPTBL POINTER
	003200	012602 				MOV	(SP)+,R2
    757	003202	103010 				BCC	80$		;FINISH UP
    758					;
    759					; ..STIN GAVE ERROR-- MUST SEND STATUS AGAIN LATER
    760					;
    761	003204				75$:
    762	003204	052777 	000020 	175070 		BIS	#EF.LPS,@LPEVFG	;NOTE BUFFER STILL REALLY AVAILABLE
    763	003212	032712 	000400 			BIT	#LP.F10,(R2)	;THIS A FROM-10 REQUEST
    764	003216	001402 				BEQ	80$		;NO-- IGNORE THE ERROR
    765	003220	052712 	040000 			BIS	#LP.SST,(R2)	;YES-- SEND STATUS AGAIN LATER
    766					;
    767					; FINISH UP
    768					;
    769	003224				80$:
    770	003224					RESTORE			; AND REGISTERS
	003224	012604 				MOV	(SP)+,R4
	003226	012603 				MOV	(SP)+,R3
	003230	012601 				MOV	(SP)+,R1
	003232	012600 				MOV	(SP)+,R0
    771	003234					RETURN			;RETURN FROM SSTSLP
	003234	000207 				RTS	PC
    772						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 19
TESTLP	(START LP-20 GOING ON THREADED LIST)

    774						.SBTTL	TESTLP	(START LP-20 GOING ON THREADED LIST)
    775					;
    776					;+
    777					;	TESTLP IS CALLED TO START THE LP-20 ON A THREADED LIST.
    778					; THE THREAD MUST BE SET UP, WITH THE POINTER BOTH IN R0 AND LPTHD.
    779					;
    780					; CALLED FROM TASK LEVEL
    781					;
    782					; CALLING SEQUENCE:
    783					;	R0 --	THREAD POINTER (ALSO IN LPTHD)
    784					;	R2 --	LPTBL ENTRY FOR THIS LP
    785					;
    786					; EXIT CONDITIONS:
    787					;	R0 --	CURRENT OUTPUT THREAD POINTER
    788					;	R3 --	EXTERNAL PAGE ADDRESS OF THIS LP
    789					;
    790					;-
    791					;
    792	003236				TESTLP:
    793	003236	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
    794	003242	001470 				BEQ	90$		;YES-- DO NOTHING
    795					;
    796	003244	032777 	000040 	175030 		BIT	#EF.LPW,@LPEVFG	;SHOULD WE WAIT FOR LP-20?
    797	003252	001011 				BNE	10$		;NO-- GO ON
    798					;
    799					; MUST WAIT FOR 1-SEC FOR LP-20 TO SETTLE AFTER DOING AN ABORT TRANSFER
    800					;
    801	003254					DIR$	#MKSCDP		;SET MARK TIME REQUEST
	003254	012746 	000442'			MOV	#MKSCDP,-(SP)
	003260	104375 				EMT	375
    802	003262	103405 				BCS	10$		;OH, WELL ...
    803	003264					WTSE$S	#E.FLPW		;WAIT FOR THE FLAG
	003264	012746 	000006 			MOV	#E.FLPW,-(SP)
	003270	012746 				MOV	(PC)+,-(SP)
	003272	   051 	   002 			.BYTE	41.,2
	003274	104375 				EMT	375
    804	003276				10$:
    805	003276	032712 	002000 			BIT	#LP.CLR,(R2)	;TIME TO CLEAR THE RAM?
    806	003302	001414 				BEQ	30$		;NO-- JUST GO ON
    807	003304	042712 	002000 			BIC	#LP.CLR,(R2)	;RESET THE FLAG
    808	003310	032712 	001000 			BIT	#LP.LIP,(R2)	;BUT RAM LOAD NOW IN PROGRESS??
    809	003314	001007 				BNE	30$		;YES-- DON'T GO RESET IT
    810					;
    811					; RAM MUST BE CLEARED, SINCE WE GOT A RAMPAR/VFU ERROR
    812					;
    813	003316	105063 	000014 			CLRB	LPCBUF(R3)	;CLEAR RAM ADDRESS REGISTER
    814	003322				20$:
    815	003322	005063 	000012 			CLR	LPRAMD(R3)	;CLEAR A RAM WORD
    816	003326	105263 	000014 			INCB	LPCBUF(R3)	;BUMP TO NEXT RAM ADDRESS
    817	003332	001373 				BNE	20$		;NOT DONE-- GO ON TO NEXT WORD
    818					;
    819					; TIME TO START LP GOING
    820					;
    821	003334				30$:
    822	003334	032712 	000200 			BIT	#LP.EOF,(R2)	;WE AT EOF TIME?
    823	003340	001404 				BEQ	32$		;NO-- GO ON
    824	003342	042712 	000200 			BIC	#LP.EOF,(R2)	;YES-- NO LONGER EOF
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 19-1
TESTLP	(START LP-20 GOING ON THREADED LIST)

    825	003346	005062 	000022 			CLR	LPCSM(R2)	;RESET CHECKSUM AT EOF
    826	003352				32$:
    827	003352	032713 	040000 			BIT	#PAGZRO,(R3)	;PAGZRO SET?
    828	003356	001403 				BEQ	34$		;NO-- GO ON
    829	003360	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;YES-- RESET PAGZRO
    830	003366				34$:
    831	003366	005713 				TST	(R3)		;ERROR SET?
    832	003370	100002 				BPL	40$		;NO-- GO ON
    833	003372	052713 	001102 			BIS	#RSTERR+INTENB+PARENB,(R3) ;YES-- RESET IT
    834	003376				40$:
    835	003376					PUSH	R0		;SAVE THREAD POINTER
	003376	010046 				MOV	R0,-(SP)
    836	003400					.INH4			;;; PREVENT LP INTERRUPTS
	003400	013746 	177776 			MOV	@#PS,-(SP)
	003404	112737 	000200 	177776 		MOVB	#PR4,@#PS
    837	003412					CALL	..DOLP		;;;START LP GOING ON THE LIST
	003412	004737 	004702'			JSR	PC,..DOLP
    838	003416					.ENB4			;;;DONE
	003416	012637 	177776 			MOV	(SP)+,@#PS
    839	003422					POP	R0		;RESTORE LPTHD POINTER
	003422	012600 				MOV	(SP)+,R0
    840					;
    841					; ALL DONE
    842					;
    843	003424				90$:
    844	003424					RETURN			;RETURN FROM TESTLP
	003424	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 20
INITLP	(INITALIZE ALL LP'S)

    846						.SBTTL	INITLP	(INITALIZE ALL LP'S)
    847					;
    848					;+
    849					;	INITLP IS CALLED DURING INITIALIZATION AND ALSO ON POWER
    850					; RECOVERY.
    851					;
    852					;	EACH LP IS RESET, AND LP.LDF IS SET TO LOAD THE CURRENT RAM
    853					; AND VF.  LPCSA IS CLEARED FOR NON-EX LP'S
    854					;
    855					;-
    856					;
    857						.ENABLE	LSB
    858	003426				INITLP::
    859	003426					SAVE	<R2,R3,R5>	;SAVE OUR PRECIOUS REGISTERS
	003426	010246 				MOV	R2,-(SP)
	003430	010346 				MOV	R3,-(SP)
	003432	010546 				MOV	R5,-(SP)
    860	003434	012705 	000002 			MOV	#L$$P20,R5	;GET # LP'S WE HAVE
    861	003440	012702 	000344'			MOV	#LPTBL,R2	;ADDRESS LPTBL ENTRY FOR UNIT 0
    862	003444				10$:
    863	003444	011203 				MOV	(R2),R3		;GET THE
    864	003446	042703 	177774 			BIC	#^C<LP.UNT>,R3	; UNIT #
    865	003452	006303 				ASL	R3		; *2
    866	003454	006303 				ASL	R3		; *4
    867	003456	006303 				ASL	R3		; *8
    868	003460	006303 				ASL	R3		; *16 BYTES PER UNIT
    869	003462	062703 	175400 			ADD	#LPEXPA,R3	;GET EXTERNAL PAGE ADDRESS FOR THIS LP
    870	003466	010362 	000002 			MOV	R3,LPCSA(R2)	;SAVE THIS ADDRESS
    871	003472	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;CLEAR LP
    872	003476				CLRINS:
    873	003476	005062 	000006 			CLR	LPITH(R2)	;CLEAR INT-LEVEL POINTER TO THREADED LIST
    874	003502				90$:
    875	003502	062702 	000010 			ADD	#LPSIZE,R2	;BUMP TO NEXT LP'S ENTRY
    876	003506	077522 				SOB	R5,10$		;LOOP FOR ALL LP'S
    877
    878	003510	052777 	000002 	174564 		BIS	#EF.LPC,@LPEVFG	;FORCE A HUNG CHECK NOW
    879	003516					RESTORE			; THE REGISTERS TO THEIR RIGHTFUL (PITIFUL) CONDITION
	003516	012605 				MOV	(SP)+,R5
	003520	012603 				MOV	(SP)+,R3
	003522	012602 				MOV	(SP)+,R2
    880	003524					RETURN			;RETURN FROM INITLP
	003524	000207 				RTS	PC
    881					;
    882						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 22
LP-20 INTERRUPT SERVICE MODULE

      1						.SBTTL	LP-20 INTERRUPT SERVICE MODULE
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19					;		MODULE: LP-20 INTERRUPT SERVICE
     20					;
     21					;		VERSION: 01-00
     22					;
     23					;		AUTHOR: TOM PORCHER
     24					;
     25					;		DATE: 6-JUN-75
     26					;
     27					;
     28					;	THIS MODULE CONTAINS:
     29					;
     30					;	1) $LPINT (LP-20 INTERRUPT SERVICE ROUTINE)
     31					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 23
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

     33						.SBTTL	$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)
     34					;
     35					;+
     36					;
     37					;	$LPINT IS CALLED FROM THE INTERRUPT VECTOR FOR
     38					; ANY OF THE LP-20'S.  THE UNIT NUMBER IS SAVED IN THE LOW-ORDER
     39					; BITS (THE CC'S) OF THE PS IN THE TRAP VECTOR.
     40					;
     41					;	WHEN A DONE INTERRUPT OCCURS, THE NEXT BUFFER IS STARTED,
     42					; UNLESS THIS IS A MULTI-CHARACTER OPERATION (IE. 'ARROW' MODE), IN
     43					; WHICH CASE THE CURRENT BUFFER IS CONTINUED.
     44					;
     45					;	IF CHRINT (UNDEFINED CHARACTER -- INT BIT SET IN RAM) OCCURS,
     46					; THE RAM DATA IS EXAMINED. IF IT IS '^', THE CHARACTER + 100,
     47					; PRECEDED BY '^', IS PRINTED, ELSE OUTPUT IS
     48					; STOPPED AND THE STATUS SENT TO THE -10 (INTERRUPT).
     49					;
     50					;	IF PAGZRO (PAGE COUNT REACHED ZERO) OCCURS AND THE LP.PZI
     51					; (PAGE ZERO INTERRUPT) FLAG IN LPSTS (SET BY RAM/VF LOAD FILE) IS
     52					; SET, OUTPUT IS STOPPED AND THE STATUS IS SENT TO THE -10. OTHERWISE,
     53					; OUTPUT IS MERELY RESUMED AND PAGZRO IGNORED.
     54					;
     55					;	IF THE LP COMES ON-LINE, WHILE WAITING FOR OFF-LINE,
     56					; OUTPUT IS RESUMED, AND THE NEW STATUS IS SENT TO THE -10.
     57					;
     58					;-
     59					;
     60	003526				$LPINT::
     61	003526	013737 	177776 	000300'		MOV	@#PS,LPUNIT	;;;SAVE UNIT #
     62	003534					SAVE	<R0,R2,R3>	;;;SAVE REGISTERS
	003534	010046 				MOV	R0,-(SP)
	003536	010246 				MOV	R2,-(SP)
	003540	010346 				MOV	R3,-(SP)
     63	003542	013702 	000300'			MOV	LPUNIT,R2	;;;GET UNIT # BACK
     64	003546	006302 				ASL	R2		;;;MAKE IT WORDS
     65	003550	042702 	177774 			BIC	#^C<LP.UNT>,R2	;;;CLEAR GARBAGE BITS
     66	003554	016202 	000424'			MOV	LPUTBL(R2),R2	;;;GET ADDR OF DEVICE STATUS BLOCK FOR THIS LP
     67	003560	016203 	000002 			MOV	LPCSA(R2),R3	;;;GET EXT PAGE ADDR FOR CURRENT LP
     68	003564	016200 	000006 			MOV	LPITH(R2),R0	;;;GET CURRENT THREAD BLOCK ADDR
     69	003570	001517 				BEQ	80$		;;;IDLE-- JUST SEND DEVICE STATUS
     70					;
     71					; LP NOT IDLE-- SEE IF ERROR, PAGZRO, CHRINT, OR DONE
     72					;
     73	003572	105062 	000022 			CLRB	LPCSM+0(R2)	;;;INSURE NO CARRY
     74	003576	066362 	000016 	000022 		ADD	LPCKSM-1(R3),LPCSM(R2) ;;;ACCUMULATE CHECKSUM
     75	003604	032713 	160000 			BIT	#ERR+PAGZRO+CHRINT,(R3) ;;;ERROR, PAGZRO, OR CHRINT?
     76	003610	001014 				BNE	30$		;;;YES-- STOP I/O AND PROCESS
     77	003612	005763 	000006 			TST	LPBCTR(R3)	;;;DONE (BYTE COUNT=0)?
     78	003616	001003 				BNE	20$		;;;NO-- JUST KEEP IT GOING
     79	003620					CALL	..DOL1		;;;YES-- START NEXT BUFFER
	003620	004737 	004666'			JSR	PC,..DOL1
     80	003624	000511 				BR	90$		;;;EXIT FROM IRP
     81					;
     82	003626				20$:
     83	003626	005362 	000024 			DEC	LPRTY(R2)	;;;DECREMENT RETRY COUNT
     84	003632	002403 				BLT	30$		;;;RAN OUT-- CHECK FOR A BIT SET, OR ASSUME ERROR
     85	003634	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;MAKE SURE LP IS STILL GO-ING
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 23-1
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

     86	003640	000503 				BR	90$		;;;AND EXIT
     87					;
     88					; ERROR, PAGZRO, OR CHRINT-- SAVE BYTE COUNT AND ADDRESS
     89					; STOP I/O AND WAIT FOR CONTINUE
     90					;
     91	003642				30$:
     92	003642	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHAR PRINT OPERATION?
     93	003646	001044 				BNE	40$		;;;YES-- DON'T SAVE BYTE COUNT AND ADDRESS
     94	003650	005463 	000006 			NEG	LPBCTR(R3)	;;;GET # BYTES LEFT TO TRANSMIT
     95	003654	016360 	000006 	000000G		MOV	LPBCTR(R3),T.HCBC(R0) ;;; INTO THREAD BLOCK TO CONTINUE
     96	003662	016360 	000004 	000000G		MOV	LPBSAD(R3),T.HCAD(R0) ;;;ALSO CURRENT ADDRESS
     97	003670	032713 	020000 			BIT	#CHRINT,(R3)	;;;THIS CHRINT INTERRUPT?
     98	003674	001431 				BEQ	40$		;;;NO-- SEE IF PAGZRO
     99	003676					PUSH	R2		;;;SAVE THE ADDRESS OF LPTBL
	003676	010246 				MOV	R2,-(SP)
    100	003700	062702 	000020 			ADD	#LPMCB,R2	;;;POINT TO THE MULTI-CHAR BUFFER
    101	003704	010263 	000004 			MOV	R2,LPBSAD(R3)	;;;POINT THE LP20 TO THAT BUFFER
    102	003710	116312 	000012 			MOVB	LPRAMD+0(R3),(R2) ;;;GET RAM DATA CHARACTER
    103	003714	122722 	000136 			CMPB	#'^,(R2)+	;;;ARROW MODE?
    104	003720	001015 				BNE	39$		;;;NO-- INTERRUPT -10
    105	003722	116312 	000014 			MOVB	LPCBUF(R3),(R2)	;;;YES-- GET THE CAUSING CHARACTER
    106	003726	152712 	000100 			BISB	#100,(R2)	;;;MAKE IT ALPHABETIC
    107	003732					POP	R2		;;;RESTORE LPTBL
	003732	012602 				MOV	(SP)+,R2
    108	003734	052712 	010000 			BIS	#LP.MCH,(R2)	;;;SAY WE ARE DOING MULTI-CHARACTER
    109	003740	012763 	177776 	000006 		MOV	#-2,LPBCTR(R3)	;;;SET BYTE COUNT TO TWO CHARACTERS
    110	003746	012713 	000103 			MOV	#PARENB+INTENB+GO,(R3) ;;;START IT GOING ON THESE TWO CHARS
    111	003752	000436 				BR	90$		;;;WAIT FOR DONE
    112					;
    113	003754				39$:	POP	R2		;;;INTERRUPT-- RESTORE LPTBL POINTER
	003754	012602 				MOV	(SP)+,R2
    114	003756	000422 				BR	70$		;;; AND TELL -10
    115					;
    116					; ERROR OR PAGZRO
    117					;
    118	003760				40$:
    119	003760	032713 	040000 			BIT	#PAGZRO,(R3)	;;;PAGZRO?
    120	003764	001411 				BEQ	60$		;;;NO-- MUST BE ERROR
    121	003766	032712 	020000 			BIT	#LP.PZI,(R2)	;;;YES-- IS PAGE ZERO INTERRUPT ENABLED?
    122	003772	001014 				BNE	70$		;;;YES-- INTERRUPT AND WAIT
    123	003774	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;;;NO-- RESET PAGZRO
    124	004002					CALL	..DOLP		;;;NO-- JUST CONTINUE
	004002	004737 	004702'			JSR	PC,..DOLP
    125	004006	000420 				BR	90$		;;;DONE WITH PAGZRO
    126					;
    127					; ERROR-- DECREMENT RETRY COUNT IF ANYTHING BUT OFF-LINE
    128					;
    129	004010				60$:
    130	004010	032763 	000177 	000002 		BIT	#VFUERR+LPTPAR+MEMPAR+RAMPAR+SYNTIM+DEMTIM+GOERR,LPCSRB(R3)
    131	004016	001402 				BEQ	70$		;;;NO ERRORS-- JUST SEND STATUS
    132	004020	005362 	000024 			DEC	LPRTY(R2)	;;;YES-- DECREMENT RETRY COUNT NOW
    133					;
    134					; STOP I/O AND SEND STATUS TO -10
    135					;
    136	004024				70$:
    137	004024	005062 	000006 			CLR	LPITH(R2)	;;;SAY I/O STOPPED
    138					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 23-2
$LPINT	(LP-20 INTERRUPT SERVICE ROUTINE)

    139					; SEND STATUS TO -10
    140					;
    141	004030				80$:
    142	004030	052712 	040000 			BIS	#LP.SST,(R2)	;;;SAY SEND STATUS TO TASK
    143	004034	052777 	000001 	174240 		BIS	#EF.LPD,@LPEVFG	;;;SAY SOMETHING TO DO
    144	004042	152737 	000000G	000000G		BISB	#EV.SE,.SERFG+0	;;;SAY SIGNIFICANT EVENT
    145					;
    146					; ALL DONE WITH INTERRUPT
    147					;
    148	004050				90$:
    149	004050					RESTORE			;;; SAVED REGISTERS
	004050	012603 				MOV	(SP)+,R3
	004052	012602 				MOV	(SP)+,R2
	004054	012600 				MOV	(SP)+,R0
    150	004056	000137 	000000G			JMP	..INTX		;;;RETURN FROM LP INTERRUPT
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 25
LP-20 COMMON SUBROUTINES MODULE

      1						.SBTTL	LP-20 COMMON SUBROUTINES MODULE
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19					;		MODULE: LP-20 COMMON SUBROUTINES
     20					;
     21					;		VERSION: 01-00
     22					;
     23					;		AUTHOR: TOM PORCHER
     24					;
     25					;		DATE: 7-JUN-75
     26					;
     27					;
     28					;	THIS MODULE CONTAINS:
     29					;
     30					;	1) ..STLP (START LP-20 OUTPUT)
     31					;
     32					;	2) ..SPLP (STOP LP-20 OUTPUT)
     33					;
     34					;	3) ..AKLP (ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
     35					;
     36					;	4) ..PTLP (PUT BLOCK IN THREADED OUTPUT LIST)
     37					;
     38					;	5) ..DOLP (INITIATE LP-20 TRANSFER)
     39					;
     40						.SBTTL	..STLP	(START LP-20 OUTPUT)
     41					;
     42					;+
     43					;
     44					;	..STLP IS CALLED ONLY FROM THE QUEUED PROTOCOL
     45					; TASK TO PERFORM A FUNCTION ON THE SPECIFIED LP. THE
     46					; FOLLOWING FUNCTIONS ARE RECOGNIZED HERE (FUNCTION CODE
     47					; IN HIGH BYTE OF T.HCBC OF THREAD BLOCK):
     48					;	BC.STR	STRING DATA
     49					;	BC.RDS	RETURN DEVICE STATUS
     50					;	BC.HDS	HERE IS DEVICE STATUS
     51					;	BC.SDS	SPECIAL DEVICE OPERATION, FIRST WORD IS FUNCTION:
     52					;		1 -- SET PAGE COUNTER
     53					;	BC.LDR	LOAD TRANSLATION RAM
     54					;	BC.LDV	LOAD VERTICAL FORMAT
     55					;
     56					; CALLED FROM TASK LEVEL
     57					;
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 25-1
..STLP	(START LP-20 OUTPUT)

     58					; CALLING SEQUENCE:
     59					;	R0 --	ADDRESS OF THREAD BLOCK TO PROCESS
     60					;	R2 --	ADDRESS OF LPTBL ENTRY FOR THIS LP
     61					;
     62					; EXIT CONDITIONS:
     63					;
     64					; NO REGISTERS MODIFIED
     65					;
     66					;-
     67					;
     68						.ENABLE	LSB
     69	004062				..STLP::
     70	004062					SAVE	<R1,R3,R4>
	004062	010146 				MOV	R1,-(SP)
	004064	010346 				MOV	R3,-(SP)
	004066	010446 				MOV	R4,-(SP)
     71	004070	022702 	000364'			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
     72	004074	101435 				BLOS	30$		;NO-- JUST SLIP AWAY
     73	004076	052712 	000400 			BIS	#LP.F10,(R2)	;NOTE THAT THIS IS A FROM-10 REQUEST
     74	004102	116004 	000001G			MOVB	T.HCBC+1(R0),R4	;GET FUNCTION CODE
     75	004106	105060 	000001G			CLRB	T.HCBC+1(R0)	; AND CLEAR IT
     76	004112	012703 	004132'			MOV	#BCFTAB,R3	;POINT TO FUNCTION DISPATCH TABLE
     77	004116				10$:
     78	004116	112301 				MOVB	(R3)+,R1	;GET A DISPATCH ADDRESS
     79	004120	001413 				BEQ	BCFILF		;END-- ASSUME RETURN DEVICE STATUS
     80	004122	122304 				CMPB	(R3)+,R4	;MATCH FUNCTION?
     81	004124	001374 				BNE	10$		;NO-- LOOP TILL WE FIND FUNCTION
     82	004126	000161 	004132'			JMP	BCFTAB(R1)	;PERFORM FUNCTION
     83					;
     84	004132				BCFTAB:
     85	004132	   132 	   000G			.BYTE	BCFSTR-BCFTAB,BC.STR
     86	004134	   016 	   000G			.BYTE	BCFRDS-BCFTAB,BC.RDS
     87	004136	   070 	   000G			.BYTE	BCFHDS-BCFTAB,BC.HDS
     88	004140	   050 	   000G			.BYTE	BCFSDO-BCFTAB,BC.SDS
     89	004142	   110 	   000G			.BYTE	BCFLDR-BCFTAB,BC.LDR
     90	004144	   116 	   000G			.BYTE	BCFLDV-BCFTAB,BC.LDV
     91	004146	   000 				.BYTE	0
     92						.EVEN
     93					;
     94					; ILLEGAL FUNCTION
     95					;
     96	004150				BCFILF:
     97					;	BR	BCFRDS		;ILLEGAL FUNCTION-- JUST SEND STATUS FOR NOW
     98					;
     99					; RETURN DEVICE STATUS
    100					;
    101	004150				BCFRDS:
    102	004150	052712 	040000 			BIS	#LP.SST,(R2)	;NOTE TO SEND STATUS NOW
    103	004154	052777 	000001 	174120 		BIS	#EF.LPD,@LPEVFG	;TELLL LP TASK TO DO SOMETHING
    104	004162	152737 	000000G	000000G		BISB	#EV.SE,.SERFG	;MAKE A SIGNIFICANT EVENT HAPPEN
    105					;
    106					; THREAD BLOCK DONE-- DEALLOCATE
    107					;
    108	004170				30$:
    109	004170	016001 	000000G			MOV	T.HBCT(R0),R1	;GET SIZE TO DEALLOCATE
    110	004174					CALL	..DECB		;DEALLOCATE THREAD BLOCK
	004174	004737 	000000G			JSR	PC,..DECB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 25-2
..STLP	(START LP-20 OUTPUT)

    111	004200	000433 				BR	90$		;RESTORE AND RETURN
    112					;
    113					; SPECIAL DEVICE OPERATION
    114					;
    115	004202				BCFSDO:
    116	004202	016001 	000000G			MOV	T.HCAD(R0),R1	;GET DATA ADDRESS
    117	004206	022711 	000001 			CMP	#1,(R1)		;SET PAGE COUNTER?
    118	004212	001356 				BNE	BCFILF		;NO-- ILLEGAL FUNCTION
    119	004214	012701 	010000 			MOV	#TB.LPC,R1	;SAY SET PAGE COUNTER
    120	004220	000415 				BR	40$		;QUEUE IT UP
    121					;
    122					; HERE IS DEVICE STATUS
    123					;
    124	004222				BCFHDS:
    125	004222	016001 	000000G			MOV	T.HCAD(R0),R1	;GET ADDRESS
    126	004226	032711 	000040 			BIT	#DV.EOF,(R1)	;EOF FOR LP?
    127	004232	001746 				BEQ	BCFILF		;NO-- ILLEGAL STATUS
    128	004234	012701 	020000 			MOV	#TB.EOF,R1	;YES-- SET FUNCTION
    129	004240	000405 				BR	40$		;SEND IT TO QUEUE
    130					;
    131					; TRANSLATION RAM DATA
    132					;
    133	004242				BCFLDR:
    134	004242	012701 	004000 			MOV	#TB.RMD,R1	;NOTE RAM DATA
    135	004246	000402 				BR	40$		;SEND TO QUEUE
    136					;
    137					; VFU DATA
    138					;
    139	004250				BCFLDV:
    140	004250	012701 	002000 			MOV	#TB.VFD,R1	;NOTE RAM DATA
    141					;	BR	40$		;SEND TO QUEUE
    142					;
    143					; SPECIAL QUEUE ENTRY-- MARK BY TB.DON + FLAGS IN T.HCBC OF THREAD BLOCK
    144					;
    145	004254				40$:
    146	004254	052701 	100000 			BIS	#TB.DON,R1	;FLAG BLOCK DONE TO INTERRUPT SERVICE
    147	004260	050160 	000000G			BIS	R1,T.HCBC(R0)	;SET SPECIFIED FUNCTION
    148					;	BR	BCFSTR		;PUT IN QUEUE
    149					;
    150					; QUEUE THREAD BLOCK TO LP-20
    151					;
    152	004264				BCFSTR:
    153	004264					CALL	..PTLP		;SEND TO LP OR QUEUE UP
	004264	004737 	004536'			JSR	PC,..PTLP
    154					;
    155					; ALL DONE
    156					;
    157	004270				90$:
    158	004270					RESTORE			;UN-SAVE REGISTRS
	004270	012604 				MOV	(SP)+,R4
	004272	012603 				MOV	(SP)+,R3
	004274	012601 				MOV	(SP)+,R1
    159	004276					RETURN			; FROM ..STLP
	004276	000207 				RTS	PC
    160					;
    161						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 26
..SPLP	(STOP LP-20 OUTPUT)

    163						.SBTTL	..SPLP	(STOP LP-20 OUTPUT)
    164					;
    165					;+
    166					;
    167					;	..SPLP IS CALLED TO STOP OUTPUT TO THE LP-20 IMMEDIATELY
    168					; AND RESET THE LP-20.  THIS ROUTINE FIRST CLEARS THE LP-20
    169					; 'GO' BIT (TO STOP OUTPUT), THEN THREADS THROUGH THE OUTPUT LIST
    170					; AND MARKS THE THREAD BLOCKS AS DONE BY SETTING T.HCBC TO IE.ABO.
    171					;
    172					;	QUEUE I/O REQUESTS ARE GIVEN THE ERROR RETURN 'IE.ABO'
    173					; (OPERATION ABORTED) WHEN THE THREAD BLOCKS ARE PROCESSED BY THE TASK.
    174					;
    175					; CALLED FROM TASK LEVEL
    176					;
    177					; CALLING SEQUENCE:
    178					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
    179					;	CALL	..SPLP
    180					;
    181					; EXIT CONDITONS:
    182					;
    183					; NO REGISTERS MODIFIED
    184					;
    185					;-
    186					;
    187	004300				..SPLP::
    188	004300					SAVE	<R0,R1,R3>	;SAVE MISC. REGISTERS
	004300	010046 				MOV	R0,-(SP)
	004302	010146 				MOV	R1,-(SP)
	004304	010346 				MOV	R3,-(SP)
    189	004306	022702 	000364'			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS ONE OF US?
    190	004312	101454 				BLOS	99$		;NO-- JUST LEAVE
    191	004314	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING FOR ACK
    192	004320	005762 	000040 			TST	LPRMA(R2)	;RAM DATA LOAD IN PROGRESS??
    193	004324	001402 				BEQ	4$		;NO-- GO ON
    194	004326	052712 	001000 			BIS	#LP.LIP,(R2)	;YES-- FLAG TO REMOVE IT AT LPTASK
    195	004332				4$:
    196	004332	005762 	000006 			TST	LPITH(R2)	;I/O IN PROGRESS?
    197	004336	001403 				BEQ	5$		;NO-- JUST GO ON
    198	004340	042777 	000040 	173734 		BIC	#EF.LPW,@LPEVFG	;YES-- MARK TO TIME OUT LP-20 WHEN WE STOP IT
    199	004346				5$:
    200	004346	005062 	000006 			CLR	LPITH(R2)	;CLEAR INTERRUPT LEVEL THREAD PTR
    201	004352	016203 	000002 			MOV	LPCSA(R2),R3	;GET EXTERNAL PAGE ADDR
    202	004356	001405 				BEQ	6$		;NON-EX LP
    203	004360	012713 	001102 			MOV	#RSTERR+INTENB+PARENB,(R3) ;STOP LP-20
    204	004364	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO, TOO
    205	004372				6$:
    206	004372	016201 	000004 			MOV	LPTHD(R2),R1	;GET POINTER TO CURRENT THREADED LIST
    207					;
    208					; LOOP THROUGH THIS LIST AND MARK THE THREAD BLOCKS AS DONE
    209					;
    210	004376				10$:
    211	004376	010100 				MOV	R1,R0		;GET ADDR OF NEXT BLOCK
    212	004400	001413 				BEQ	90$		;THAT'S THE END
    213	004402	011001 				MOV	@R0,R1		;GET ADDR OF NEXT NEXT BLOCK
    214	004404	052760 	040000 	000000G		BIS	#TB.ABO,T.HCBC(R0) ;MARK BLOCK AS ABORTED
    215	004412	005760 	000000G			TST	T.HCBC(R0)	;THIS THREAD BLOCK ALREADY DONE?
    216	004416	002767 				BLT	10$		;YES-- LEAVE IT ALONE
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 26-1
..SPLP	(STOP LP-20 OUTPUT)

    217	004420	012760 	140361 	000000G		MOV	#TB.DON!TB.ABO!<IE.ABO&LOBYTE>,T.HCBC(R0) ;MARK AS DONE, ABORTED
    218	004426	000763 				BR	10$		;LOOP FOR ALL THINGS IN LIST
    219					;
    220					; ALL DONE WITH LIST
    221					;
    222	004430				90$:
    223	004430	052777 	000001 	173644 		BIS	#EF.LPD,@LPEVFG	;SAY I/O DONE TO LP TASK (RATHER... ABORTED)
    224	004436	152737 	000000G	000000G		BISB	#EV.SE,.SERFG+0	;MAKE A SIGNIFICANT EVENT HAPPEN
    225	004444				99$:
    226	004444					RESTORE			;RESTORE SAVE REGISTERS
	004444	012603 				MOV	(SP)+,R3
	004446	012601 				MOV	(SP)+,R1
	004450	012600 				MOV	(SP)+,R0
    227	004452					RETURN			;RETURN FORM ..SPLP
	004452	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 27
..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)

    229						.SBTTL	..AKLP	(ACKNOWLEDGE (CONTINUE) LP-20 OUTPUT)
    230					;
    231					;+
    232					;
    233					;	..AKLP IS CALLED BY ACKNOWLDGE OUTPUUT REQUEST FROM THE -10.
    234					; THE LP.WAT FLAG IS CLEARED, AND THE CONDITION FLAGS CHRINT, PAGZRO
    235					; ARE RESET.  OUTPUT IS RESUMED WHEN LP TASK RUNS.
    236					;
    237					; CALLED AT TASK LEVEL
    238					;
    239					; CALLING SEQUENCE:
    240					;	R2 --	POINTER TO LPTBL ENTRY FOR THIS LP
    241					;
    242					; EXIT CONDITIONS:
    243					;
    244					;	NO REGISTERS MODIFIED
    245					;
    246					;-
    247					;
    248	004454				..AKLP::
    249	004454					SAVE	<R3>		;SAVE USED R'S
	004454	010346 				MOV	R3,-(SP)
    250	004456	022702 	000364'			CMP	#LPTBL+<L$$P20*LPSIZE>,R2 ;THIS AN LP???
    251	004462	101423 				BLOS	90$		;NO-- JUST LEAVE
    252	004464	042712 	004000 			BIC	#LP.WAT,(R2)	;NO LONGER WAITING
    253	004470	005762 	000006 			TST	LPITH(R2)	;LP GOING?
    254	004474	001016 				BNE	90$		;YES-- JUST GO AWAY
    255	004476	016203 	000002 			MOV	LPCSA(R2),R3	;GET EXT PAGE ADDR OF THIS LP
    256	004502	001405 				BEQ	10$		;NON-EX LP-- JUST GO AWAY
    257	004504	016363 	000010 	000010 		MOV	LPPCTR(R3),LPPCTR(R3) ;RESET PAGZRO
    258	004512	042713 	020000 			BIC	#CHRINT,(R3)	; AND CHRINT
    259	004516				10$:
    260	004516	052777 	000001 	173556 		BIS	#EF.LPD,@LPEVFG	;START LP TASK
    261	004524	152737 	000000G	000000G		BISB	#EV.SE,.SERFG+0	; . .
    262	004532				90$:
    263	004532					RESTORE			; USED R'S
	004532	012603 				MOV	(SP)+,R3
    264	004534					RETURN			; FROM ..AKLP
	004534	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 28
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

    266						.SBTTL	..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)
    267					;
    268					;+
    269					;
    270					;	..PTLP IS CALLED TO SEND A BUFFER TO THE LP-20. THE
    271					; BUFFER IS EITHER OUTPUT IMMEDIATELY OR, IF THE LP IS NOT IDLE,
    272					; ADDED TO THE END OF THIS LP'S THREADED OUTPUT LIST.
    273					;
    274					; CALLED FROM TASK LEVEL
    275					;
    276					; CALLING SEQUENCE:
    277					;	R0 --	ADDRESS OF THREAD BLOCK FOR THIS BUFFER
    278					;	R2 --	POINTER TO LPTBL FOR THIS LP
    279					;	CALL	..PTLP
    280					;
    281					; EXIT CONDITIONS:
    282					;
    283					; NO REGISTERS MODIFIED
    284					;
    285					;-
    286					;
    287	004536				..PTLP::
    288	004536					SAVE	<R1,R3>	;SAVE USED REGISTERS
	004536	010146 				MOV	R1,-(SP)
	004540	010346 				MOV	R3,-(SP)
    289	004542	005010 				CLR	@R0		;MARK END OF LIST
    290	004544	012762 	000012 	000024 		MOV	#LPRTRY,LPRTY(R2) ;RESET RETRY COUNTER
    291	004552	016203 	000002 			MOV	LPCSA(R2),R3	;GET LP EXTERNAL PAGE ADDRESS
    292	004556	001404 				BEQ	5$		;OOPS-- NON-EX LP
    293	004560	032713 	004000 			BIT	#ONLINE,(R3)	;OFF-LINE?
    294	004564	001006 				BNE	7$		;NO-- JUST GO ON
    295	004566	000403 				BR	6$		;OFF-LINE-- SEND STATUS
    296					;
    297	004570				5$:
    298	004570	012760 	100277 	000000G		MOV	#TB.DON!<IE.OFL&LOBYTE>,T.HCBC(R0) ;NON-EX-LP-- MARK AS DONE, ERROR
    299	004576				6$:
    300	004576	052712 	040000 			BIS	#LP.SST,(R2)	;TIME TO RING THE -10
    301	004602				7$:
    302	004602					.INH0			;;LOCK OUT QUEUE'D PROTOCOL TASK
	004602	013746 	177776 			MOV	@#PS,-(SP)
	004606	112737 	000140 	177776 		MOVB	#140,@#PS
    303	004614	016201 	000004 			MOV	LPTHD(R2),R1	;;GET CURRENT POINTER TO THREADED LIST
    304	004620	001405 				BEQ	20$		;;NONE-- START LP GOING
    305					;
    306					; LP BUSY-- MUST FIND END OF THREADED LIST AND PUT THIS BUFFER THERE
    307					;
    308	004622				10$:
    309	004622	010103 				MOV	R1,R3		;;COPY ADDR OF THREAD BLOCK
    310	004624	011301 				MOV	@R3,R1		;;GET NEXT THREAD
    311	004626	001375 				BNE	10$		;;NOT END-- KEEP ON LOOKING
    312	004630	010013 				MOV	R0,@R3		;;END-- STORE CURRENT THREAD BLOCK AT END
    313	004632	000410 				BR	90$		;;ALL DONE
    314					;
    315					; LP IDLE-- START IT GOING ON THIS BUFFER
    316					;
    317	004634				20$:
    318	004634	010062 	000004 			MOV	R0,LPTHD(R2)	;;STORE START OF THREAD
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 28-1
..PTLP	(PUT BLOCK IN THREADED OUTPUT LIST)

    319	004640	052777 	000001 	173434 		BIS	#EF.LPD,@LPEVFG	;;TELL LP TASK TO START LP GOING
    320	004646	152737 	000000G	000000G		BISB	#EV.SE,.SERFG+0	;; WITH A SIGNIFICANT EVENT
    321					;
    322					; ALL DONE
    323					;
    324	004654				90$:
    325	004654					.ENB0			;RE-ENABLE IRPS
	004654	004737 	000000G			JSR	PC,..ENB0
    326	004660					RESTORE			;RESTORE SAVED REGISTERS
	004660	012603 				MOV	(SP)+,R3
	004662	012601 				MOV	(SP)+,R1
    327	004664					RETURN			;RETURN FROM ..PTLP
	004664	000207 				RTS	PC
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 29
..DOLP	(INITIATE LP-20 TRANSFER)

    329						.SBTTL	..DOLP	(INITIATE LP-20 TRANSFER)
    330					;
    331					;+
    332					;
    333					;	..DOLP IS CALLED TO START AN LP GOING ON A SPECIFIED BUFFER.
    334					; THE DEVICE RGISTERS ARE SET UP AND 'GO' IS SET TO START THE TRANSFER.
    335					;
    336					;	IF THE THREAD SPECIFIED IS ZERO, NOTHING IS DONE AND THE
    337					; LP IS LEFT IDLE.
    338					;
    339					;	ENTER AT ..DOL1 TO OUTPUT NEXT BUFFER, UNLESS LP.MCH IS SET,
    340					; IN WHICH CASE THE CURRENT BUFFER IS OUTPUT.  THIS IS USUALLY ONLY
    341					; CALLED WHEN 'DONE' IS SET.
    342					;
    343					; CALLED AT INTERRUPT LEVEL (OR WITH INTERRUPTS DISABLED)
    344					;
    345					; CALLING SEQUENCE:
    346					;	R0 --	ADDR OF THREAD BLOCK TO OUTPUT (ZERO IF END)
    347					;	R2 --	ADDR OF LPTBL ENTRY FOR THIS LP
    348					;	R3 --	EXTERNAL PAGE ADDRESS FOR THIS LP
    349					;
    350					; EXIT CONDITIONS:
    351					;	R0 --	ADDR OF CURRENT THREAD BLOCK
    352					;
    353					; NO OTHER REGISTERS MODIFIED
    354					;
    355					;-
    356					;
    357						.ENABLE	LSB
    358	004666				..DOL1::
    359	004666	032712 	001000 			BIT	#LP.LIP,(R2)	;;;LOAD SUPPOSED TO BE IN PROGRESS?
    360	004672	001020 				BNE	19$		;;;YES-- GO BACK TO TASK
    361	004674	032712 	010000 			BIT	#LP.MCH,(R2)	;;;MULTI-CHARACTER OPERATION?
    362	004700	001417 				BEQ	20$		;;;NO-- GET NEXT BUFFER
    363									;;;YES-- GET (CONTINUE) CURRENT BUFFER
    364	004702				..DOLP::
    365	004702				10$:
    366	004702	042712 	114000 			BIC	#LP.WAT!LP.MCH!LP.HNG,(R2) ;;;NOT WAITING, AND NOT MULTI-CHAR-ING
    367	004706	010062 	000006 			MOV	R0,LPITH(R2)	;;;SAVE CURRENT BUFFER AS OUR INT-LEVEL BUFFER
    368	004712	001464 				BEQ	90$		;;;GIVE UP IF END
    369	004714	016063 	000000G	000006 		MOV	T.HCBC(R0),LPBCTR(R3) ;;;SAVE BYTE COUNT FOR LP (WILL NEG LATER)
    370	004722	003021 				BGT	50$		;;;NOT DONE-- START OUTPUT
    371					;
    372	004724	032760 	036000 	000000G		BIT	#TB.SFN,T.HCBC(R0) ;;;SPECIAL FUNCTION?
    373	004732	001402 				BEQ	20$		;;;NO-- JUST SET DONE
    374	004734				19$:
    375	004734	005000 				CLR	R0		;;;YES-- DON'T GET NEXT THREAD BLOCK
    376	004736	000404 				BR	30$		;;;AND STOP I/O, REQUEST TASK LEVEL CODE
    377					;
    378					; THIS THREAD BLOCK DONE-- MARK IT BY -VE T.HCBC, SET I/O DONE
    379					;  EVENT FLAG, AND START NEXT BUFFER.
    380					;
    381	004740				20$:
    382	004740	012760 	100001 	000000G		MOV	#TB.DON!<IS.SUC&LOBYTE>,T.HCBC(R0) ;;;NOTE SUCCESS HERE
    383	004746	011000 				MOV	@R0,R0		;;;GET ADDR OF NEXT BUFFER
    384					;
    385					; SET I/O DONE, GO ON TO NEXT THREAD BLOCK (ADDR IN R0)
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 29-1
..DOLP	(INITIATE LP-20 TRANSFER)

    386					;
    387	004750				30$:
    388	004750	052777 	000001 	173324 		BIS	#EF.LPD,@LPEVFG	;;;SET LP I/O DONE EVENT FLAGE
    389	004756	152737 	000000G	000000G		BISB	#EV.SE,.SERFG+0	;;;MAKE A SIGNIFICANT EVENT
    390	004764	000746 				BR	10$		;;;DO NEXT BUFFER
    391					;
    392					; SET UP -VE BYTE COUNT AND EXTENDED MEMORY ADDRESS BITS
    393					;
    394	004766				50$:
    395	004766	016063 	000000G	000004 		MOV	T.HCAD(R0),LPBSAD(R3) ;;;SAVE PHYSICAL ADDR FOR LP
    396	004774	005463 	000006 			NEG	LPBCTR(R3)	;;;MAKE -VE # BYTES TO SEND
    397	005000	042713 	000060 			BIC	#BUSA17+BUSA16,(R3) ;;;CLEAR EXTENDED MEMORY ADDR BITS
    398	005004	005760 	000000G			TST	T.HBCT(R0)	;;;THIS QUEUE I/O REQUEST?
    399	005010	001023 				BNE	59$		;;;NO-- ADDRESS IS IN LOW CORE
    400	005012	116062 	177775 	000020 		MOVB	T.HVFC(R0),LPMCB(R2) ;;;SET TO PRINT VERTICAL FORMAT CHARACTER
    401	005020	001415 				BEQ	58$		;;;NONE-- JUST START THE LP
    402	005022	105060 	177775 			CLRB	T.HVFC(R0)	;;;YES-- CLEAR IT NOW
    403	005026	012763 	000020 	000004 		MOV	#LPMCB,LPBSAD(R3) ;;;YES-- POINT TO THE FORMAT CHARACTER
    404	005034	060263 	000004 			ADD	R2,LPBSAD(R3)	;;; FOR THIS LP
    405	005040	012763 	177777 	000006 		MOV	#-1,LPBCTR(R3)	;;;ONLY 1 CHARACTER
    406	005046	052712 	010000 			BIS	#LP.MCH,(R2)	;;;NOTE THAT WE ARE WORKING FROM LPMCB
    407	005052	000402 				BR	59$		;;;START THE LP GOING
    408					;
    409	005054				58$:
    410	005054	156013 	177774 			BISB	T.HEMA(R0),(R3)	;;;SET EXTENDED MEMORY BITS
    411					;
    412					; SET INTENB, PARENB, AND GO TO START LP GOING ON THIS BUFFER
    413					;
    414	005060				59$:
    415	005060	052713 	000103 			BIS	#INTENB+PARENB+GO,(R3) ;;;START LP GOING
    416					;
    417					; ALL DONE-- RETURN
    418					;
    419	005064				90$:
    420	005064					RETURN			;;;RETURN FROM ..DOLP/..DOL1
	005064	000207 				RTS	PC
    421						.DSABLE	LSB
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 31
END

      1						.SBTTL	END
      2					;
      3					;                             COPYRIGHT (C) 1975, 1978 BY
      4					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      5					;
      6					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      7					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      8					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      9					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     10					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     11					;
     12					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     13					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     14					;       CORPORATION.
     15					;
     16					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     17					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     18					;
     19		000001 				.END
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 31-1
SYMBOL TABLE

A.EF  = ****** GX	DEX   = 000400   	EBSEL = 000100   	IE.DNR= 177775   	IE.WER= 177737
BCFHDS  004222R  	DEXDON= 000004   	EBUSPC= 000020   	IE.DUN= 177767   	IE.WLK= 177764
BCFILF  004150R  	DEXWD1= 174406   	EBUSPS= 000004   	IE.DUP= 177707   	IE.2DV= 177720
BCFLDR  004242R  	DEXWD2= 174404   	EDONES= 040000   	IE.EBX= 177776   	IFLOP = 100000
BCFLDV  004250R  	DEXWD3= 174402   	EF.LPC= 000002   	IE.EOF= 177766   	INITLP  003426RG
BCFRDS  004150R  	DFUNC = 000200   	EF.LPD= 000001   	IE.EOT= 177702   	INTENB= 000100
BCFSDO  004202R  	DF.DMG= 000004   	EF.LPQ= 000004   	IE.EOV= 177765   	INTINS  002046R
BCFSTR  004264R  	DF.DMN= 000007   	EF.LPS= 000020   	IE.EXP= 177676   	INTROF= 000010
BCFTAB  004132R  	DF.DOR= 000001   	EF.LPW= 000040   	IE.FEX= 177717   	INTRON= 000040
BC.HDS= ****** GX	DF.EHG= 000010   	EF.NIR= ****** GX	IE.FHE= 177705   	INTSON= 000001
BC.LDR= ****** GX	DF.EHM= 000011   	EF.PR1= ****** GX	IE.FOP= 177713   	INT10S= 000400
BC.LDV= ****** GX	DF.EMG= 000005   	EPTR  = 000000   	IE.HFU= 177744   	INT11C= 002000
BC.RDS= ****** GX	DF.EMN= 000006   	ERMHER  003041R  	IE.HWR= 177772   	INT11S= 004000
BC.SDS= ****** GX	DF.KLR= 000012   	ERMHNG  003056R  	IE.IDU= 177644   	IO.ACE= 007400
BC.STR= ****** GX	DF.KLW= 000013   	ERMNXD  002767R  	IE.IEF= 177637   	IO.ACR= 006400
BIT0  = 000001   	DF.KLX= 000014   	ERMOFL  003007R  	IE.IFC= 177776   	IO.ACW= 007000
BIT1  = 000002   	DF.OFF= 000002   	ERMVFE  003022R  	IE.IFU= 177747   	IO.ADS= 014000
BIT10 = 002000   	DF.ON = 000003   	ERR   = 100000   	IE.ILL= 177726   	IO.APC= 014000
BIT11 = 004000   	DF.PDP= 000016   	ERR10C= 010000   	IE.ILU= 177640   	IO.APV= 014010
BIT12 = 010000   	DF.PEX= 000015   	ERR10S= 020000   	IE.INS= 177776   	IO.ATT= 001400
BIT13 = 020000   	DIAG1 = 174430   	ERR11C= 000001   	IE.IPR= 177641   	IO.CCI= 014000
BIT14 = 040000   	DIAG2 = 174432   	ERR11S= 000002   	IE.ISQ= 177703   	IO.CCT= 002460
BIT15 = 100000   	DIAG3 = 174436   	EV.SE = ****** GX	IE.ITI= 177643   	IO.CLN= 003400
BIT2  = 000004   	DIKL10= 000010   	E.FLPC= 000002   	IE.ITS= 177770   	IO.CON= 015400
BIT3  = 000010   	DLYCNT= 174400   	E.FLPD= 000001   	IE.LCK= 177745   	IO.CRC= 001020
BIT4  = 000020   	DONE  = 000200   	E.FLPQ= 000003   	IE.LNL= 177646   	IO.CRE= 012000
BIT5  = 000040   	DON10C= 040000   	E.FLPS= 000005   	IE.MBK= 177721   	IO.CTI= 015400
BIT6  = 000100   	DON10S= 100000   	E.FLPW= 000006   	IE.MOD= 177753   	IO.CTL= 016400
BIT7  = 000200   	DON11C= 000100   	FORPRO= 000020   	IE.NBF= 177731   	IO.DAC= 010000
BIT8  = 000400   	DON11S= 000200   	GO    = 000001   	IE.NBK= 177727   	IO.DCI= 014400
BIT9  = 001000   	DPS4  = 040000   	GOERR = 000001   	IE.NFI= 177704   	IO.DCT= 002470
BPARER= 000020   	DRESET= 000100   	HIBYTE= 177400   	IE.NLN= 177733   	IO.DEL= 012400
BUSA16= 000020   	DR.DTE= 000011   	IE.ABO= 177761   	IE.NNC= 177674   	IO.DET= 002000
BUSA17= 000040   	DSEND = 000004   	IE.ACT= 177771   	IE.NOD= 177751   	IO.DIS= 016000
CDD   = 000020   	DS04  = 004000   	IE.ADP= 177636   	IE.NSF= 177746   	IO.DTI= 016000
CHNPNT= 000001   	DS05  = 002000   	IE.ALN= 177736   	IE.OFL= 177677   	IO.ENA= 006000
CHRINT= 020000   	DS06  = 001000   	IE.AST= 177660   	IE.ONP= 177773   	IO.EOF= 003000
CLRINS  003476R  	DTECMD= 000451   	IE.BAD= 177777   	IE.OVR= 177756   	IO.ESA= 002500
CNUPE = 000002   	DTEFLG= 000444   	IE.BBE= 177710   	IE.PRI= 177760   	IO.EXT= 011400
CS.EXP= 177670   	DTEF11= 000450   	IE.BDI= 177714   	IE.RAC= 177724   	IO.FDX= 003020
CYCLS = 000002   	DTEMTD= 000455   	IE.BDR= 177716   	IE.RAT= 177723   	IO.FNA= 004400
DATE  = 000004   	DTEMTI= 000456   	IE.BDV= 177711   	IE.RBG= 177730   	IO.HDX= 003010
DCOMST= 000001   	DUPE  = 000020   	IE.BHD= 177700   	IE.RCN= 177722   	IO.HIS= 015000
DD.CHI= 000002   	DURE  = 000004   	IE.BLK= 177754   	IE.RER= 177740   	IO.INL= 002400
DD.HEM= 000010   	DV.EOF= 000040   	IE.BNM= 177712   	IE.RNM= 177715   	IO.ITI= 017000
DD.LER= 000010   	DV.F11= 000400   	IE.BTF= 177675   	IE.RSU= 177757   	IO.KIL= 000012
DD.OVF= 000020   	DV.HNG= 001000   	IE.BTP= 177725   	IE.SDP= 177635   	IO.LED= 012000
DD.PCK= 000002   	DV.IOP= 000020   	IE.BVR= 177701   	IE.SNC= 177735   	IO.LOV= 001010
DD.PGZ= 000001   	DV.LOG= 000100   	IE.BYT= 177755   	IE.SPC= 177772   	IO.LTK= 000050
DD.RCK= 000001   	DV.NXD= 000001   	IE.CKP= 177766   	IE.SQC= 177734   	IO.MCS= 013400
DD.RME= 000040   	DV.OFL= 000002   	IE.CKS= 177742   	IE.SRE= 177762   	IO.MDA= 016000
DD.SCK= 000004   	DV.OIR= 000004   	IE.CLO= 177732   	IE.STK= 177706   	IO.MDI= 014400
DD.SFL= 000020   	DV.SCN= 000010   	IE.CON= 177752   	IE.ULN= 177773   	IO.MDO= 015400
DD.VFE= 000004   	DV.URE= 000200   	IE.DAA= 177770   	IE.UPN= 177777   	IO.MLO= 006000
DELHLD= 002000   	DXWRD1= 002000   	IE.DAO= 177763   	IE.VER= 177774   	IO.MOD= 003000
DEMTIM= 000002   	D.CLPT= ****** GX	IE.DFU= 177750   	IE.WAC= 177743   	IO.MSO= 005000
DEP   = 010000   	D1011 = 000040   	IE.DNA= 177771   	IE.WAT= 177741   	IO.RAL= 001010
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 31-2
SYMBOL TABLE

IO.RAT= 013000   	LOAD11= 000004   	LP.LIP= 001000   	Q.IOPL= 000014   	TTPEN = ****** GX
IO.RBC= 003000   	LOBYTE= 000377   	LP.MCH= 010000   	Q.IOPR= 000007   	T.HBCT= ****** GX
IO.RCI= 015000   	LOINIT= 000400   	LP.PZI= 020000   	Q.IOSB= 000010   	T.HCAD= ****** GX
IO.RCV= 015000   	LPALOC= 000214   	LP.SST= 040000   	RAMIS0= 010000   	T.HCBC= ****** GX
IO.RDB= 001200   	LPBCTR= 000006   	LP.UNT= 000003   	RAMLOD= 000003   	T.HEMA= 177774
IO.RDN= 000022   	LPBSAD= 000004   	LP.WAT= 004000   	RAMPAR= 000010   	T.HIBC= 177776
IO.REL= 013400   	LPCBUF= 000014   	L$$P20= 000002   	RFMAD0= 100000   	T.HVFC= 177775
IO.RHD= 001010   	LPCCTR= 000015   	MEMPAR= 000020   	RFMAD1= 040000   	UNASG1= 000032
IO.RLB= 001000   	LPCEVF  000304R  	MKSCDP  000442R  	RFMAD2= 020000   	UNASG2= 000033
IO.RLV= 001100   	LPCKSM= 000017   	MODE00= 000004   	RFMAD3= 010000   	UNASG3= 000034
IO.RNA= 005400   	LPCSA = 000002   	MODE01= 000010   	RM    = 000010   	UNASG4= 000035
IO.RNC= 001004   	LPCSM = 000022   	MPE11 = 001000   	RSTERR= 001000   	UNASG5= 000036
IO.RNE= 001020   	LPCSRA= 000000   	MRKTDP  000430R  	R.FC  = ****** GX	UNASG6= 000037
IO.RTC= 003400   	LPCSRB= 000002   	M.KTAE= 000010   	R.PB  = ****** GX	VFCFF   002000R
IO.RTI= 016400   	LPEMSG  002734R  	M.KTEF= 000002   	SCD   = 000040   	VFCTBL  001776R
IO.RTK= 000060   	LPEMSX  002747R  	M.KTMG= 000004   	SSTSLP  002234R  	VFUERR= 000100
IO.RVB= 010400   	LPERUN  002744R  	M.KTUN= 000006   	SSTVTB  000454R  	VFULOD= 000002
IO.RWD= 002400   	LPEVFG  000302R  	NULSTP= 000040   	STAT  = 174434   	VFURDY= 010000
IO.RWU= 002540   	LPEXPA= 175400   	NUPE  = 000002   	STATUS= 000022   	WEP   = 000010
IO.R1C= 002400   	LPEXPZ= 000020   	OFFLIN= 000200   	SWR   = 177570   	ZSTOP = 040000
IO.SAO= 004000   	LPHD    000000RG 	ONLINE= 004000   	SWSLLT= 100000   	$LPINT  003526RG
IO.SCS= 013000   	LPHUNG  000306R  	OPTVFU= 004000   	SYNTIM= 000004   	$$    = 000037
IO.SDI= 013000   	LPINI   000520R  	PAGZRO= 040000   	TB.ABO= 040000   	$$MSG = 000000
IO.SDO= 012400   	LPIOD   000672R  	PARENB= 000002   	TB.DON= 100000   	$$$   = 000000
IO.SEC= 002520   	LPITH = 000006   	PBTHRD= 000004   	TB.EOF= 020000   	$$$ARG= 000011
IO.SEM= 002440   	LPLOOP  000604R  	PERCLR= 001000   	TB.LPC= 010000   	$$$OST= 000014
IO.SHT= 002410   	LPMCB = 000020   	PHYS  = 100000   	TB.RMD= 004000   	$$$UNI= 000002
IO.SLO= 005400   	LPMKT   002012R  	PIDENT= 000000   	TB.SFN= 036000   	$$$$  = 000002
IO.SMO= 002560   	LPNIR   001552R  	PRI7  = 000340   	TB.VFD= 002000   	.BGBUF= ****** GX
IO.SNM= 002450   	LPPCTR= 000010   	PROPNT= 000021   	TENAD1= 174410   	.BRCLK= 005000
IO.SPB= 002420   	LPQDPB  002712R  	PRTOFF= 004000   	TENAD2= 174412   	.CECLK= 004000
IO.SPF= 002440   	LPRAMD= 000012   	PR0   = 000000   	TESTLP  003236R  	.CLRMR= 006000
IO.SSO= 004400   	LPRMA = 000040   	PR1   = 000040   	TEST00= 000400   	.CLRUN= 010000
IO.SST= 002430   	LPRMC = 000044   	PR2   = 000100   	TEST01= 001000   	.COMEF= ****** GX
IO.STC= 002500   	LPRMZ = 000042   	PR3   = 000140   	TEST02= 002000   	.CONBT= 012000
IO.STP= 016400   	LPRTRY= 000012   	PR4   = 000200   	TOBM  = 000004   	.CRTSK= ****** GX
IO.SYN= 003040   	LPRTY = 000024   	PR5   = 000240   	TOD   = 000003   	.CSHRG= 164000
IO.TRM= 002410   	LPSIZE= 000010 G 	PR6   = 000300   	TOIP  = 000002   	.CYLTM= 000074
IO.UNL= 000042   	LPSTBH  000312R  	PR7   = 000340   	TOIT  = 000001   	.DRLTC= 015000
IO.WAT= 013400   	LPSTBK  000314R  	PS    = 177776   	TO10  = 000200   	.DSACF= 066000
IO.WLB= 000400   	LPSTK   000260RG 	PSWW1 = 000005   	TO10AD= 174420   	.DSIOJ= 065000
IO.WLS= 000410   	LPSTLN= 000030   	PSWW10= 000014   	TO10BC= 174414   	.EIOJA= 067000
IO.WLV= 000500   	LPSTS = 000000   	PSWW11= 000015   	TO10BM= 000001   	.GFNR = 102000
IO.WVB= 011000   	LPTBL   000344RG 	PSWW12= 000016   	TO10DB= 000400   	.INICL= 070000
IO.XMT= 014400   	LPTBL2  000364R  	PSWW13= 000017   	TO10DN= 100000   	.IRLTC= 014000
IO.XNA= 014410   	LPTBL3  000404R  	PSWW2 = 000006   	TO10DT= 174424   	.LCRDL= 052000
IQ.Q  = 000002   	LPTDAT= 000016   	PSWW3 = 000007   	TO10ER= 020000   	.LCRDR= 051000
IQ.X  = 000001   	LPTHD = 000004   	PSWW4 = 000010   	TO11  = 000100   	.LCRM1= 057000
IS.BV = 000005   	LPTPAR= 000040   	PSWW5 = 000011   	TO11AD= 174422   	.LCRM2= 056000
IS.CLR= 000000   	LPTPBT= 010000   	PSWW6 = 000012   	TO11BC= 174416   	.LCRM3= 055000
IS.CR = 006401   	LPUNIT  000300R  	PSWW7 = 000013   	TO11BM= 020000   	.LCRM4= 054000
IS.ESC= 015401   	LPUTBL  000424R  	PULSE = 000020   	TO11DB= 004000   	.LCRM5= 053000
IS.PND= 000000   	LPWRUP  000512R  	QSIZE = 000023   	TO11DN= 000200   	.LDAR = 077000
IS.RDD= 000002   	LP.CLR= 002000   	Q.IOAE= 000012   	TO11DT= 174426   	.LDBRL= 043000
IS.SET= 000002   	LP.EOF= 000200   	Q.IOEF= 000006   	TO11ER= 000002   	.LDBRR= 042000
IS.SUC= 000001   	LP.F10= 000400   	Q.IOFN= 000002   	TRAP04  000456R  	.LDCK1= 046000
KLPWRF= 000010   	LP.HNG= 100000   	Q.IOLU= 000004   	TSTMOD= 000001   	.LDCK2= 047000
LPDRV	(LP-20 LINEPRINTER DRIV	MACRO M1108  13-JAN-78 14:06  PAGE 31-3
SYMBOL TABLE

.LDDIS= 045000   	.PCAB1= 150000   	.RDJ14= 134000   	.STRCL= 001000   	..ENB0= ****** GX
.LDRJD= 064000   	.PCAB2= 151000   	.RDJ71= 135000   	.WRMBX= 071000   	..INTX= ****** GX
.LDRJV= 063000   	.PCAB3= 152000   	.RDMAB= 133000   	..AKLP  004454RG 	..IODN= ****** GX
.LDRM1= 060000   	.PCAB4= 153000   	.SECLK= 003000   	..ALC2= ****** GX	..PTLP  004536RG
.LDRM2= 061000   	.RCRM1= 147000   	.SERFG= ****** GX	..DECB= ****** GX	..SACK= ****** GX
.LDRM3= 062000   	.RCRM2= 146000   	.SETMR= 007000   	..DEC2= ****** GX	..SPLP  004300RG
.LDSEL= 044000   	.RCRM3= 145000   	.SETRN= 011000   	..DOLP  004702RG 	..STIN= ****** GX
.LPPFL  000310RG 	.RCRM4= 144000   	.SSCLK= 002000   	..DOL1  004666RG 	..STLP  004062RG
.MEMRS= 076000   	.RCSPF= 141000   	.STPCL= 000000   	..DQRN= ****** GX	...GBL= 000000

. ABS.	000000	   000
      	005066	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  9110 WORDS  ( 36 PAGES)
DYNAMIC MEMORY:  10496 WORDS  ( 40 PAGES)
ELAPSED TIME:  00:04:04
,[100,20]LPDRV.LIS/-SP/CRF=[100,30]LP,DV,LPDATA,LPTASK,LPINT,LPCOMM,END
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

A.EF  	= ******  GX	 13-91     
BCFHDS	  004222 R	 25-87     #25-124    
BCFILF	  004150 R	 25-79     #25-96      25-118     25-127    
BCFLDR	  004242 R	 25-89     #25-133    
BCFLDV	  004250 R	 25-90     #25-139    
BCFRDS	  004150 R	 25-86     #25-101    
BCFSDO	  004202 R	 25-88     #25-115    
BCFSTR	  004264 R	 25-85     #25-152    
BCFTAB	  004132 R	 25-76      25-82     #25-84      25-85      25-86      25-87      25-88      25-89      25-90     
BC.HDS	= ******  GX	 18-750     25-87     
BC.LDR	= ******  GX	 25-89     
BC.LDV	= ******  GX	 25-90     
BC.RDS	= ******  GX	 25-86     
BC.SDS	= ******  GX	 25-88     
BC.STR	= ******  GX	 25-85     
BIT0  	= 000001	 2-48      #2-63       3-154      3-171      6-48       6-64       6-80       10-112     10-112    
                         13-77      18-728    
BIT1  	= 000002	 2-50      #2-63       3-153      3-170      6-49       6-65       6-81       10-112     10-112    
BIT10 	= 002000	#2-63       2-97       3-140      3-160      10-112     10-112    
BIT11 	= 004000	#2-63       2-96       3-139      3-159      10-112     10-112    
BIT12 	= 010000	#2-63       2-95       3-138      3-158      10-112     10-112    
BIT13 	= 020000	#2-63       2-94       3-137      10-112     10-112    
BIT14 	= 040000	#2-63       2-93       3-136      10-112     10-112    
BIT15 	= 100000	#2-63       2-92       3-135      10-112     10-112     18-750    
BIT2  	= 000004	 2-52      #2-63       3-149      3-169      6-50       6-66       6-82      
BIT3  	= 000010	#2-63       3-148      3-168      6-51       6-67       6-83      
BIT4  	= 000020	 2-55      #2-63       3-147      3-167      6-52       6-68       6-84      
BIT5  	= 000040	 2-57      #2-63       3-146      3-166      6-53       6-69      
BIT6  	= 000100	#2-63       3-145      3-165      6-54      
BIT7  	= 000200	#2-63       3-144      3-164      6-55       10-112     10-112    
BIT8  	= 000400	#2-63       3-142      3-162      6-56       10-112     10-112     18-728    
BIT9  	= 001000	#2-63       3-141      3-161      6-57       10-112     10-112    
BPARER	= 000020	#2-63      
BUSA16	= 000020	#3-147      29-397    
BUSA17	= 000040	#3-146      29-397    
CDD   	= 000020	#2-63      
CHNPNT	= 000001	#2-63      
CHRINT	= 020000	#3-137      18-664     23-75      23-97      27-258    
CLRINS	  003476 R	 13-70     #20-872    
CNUPE 	= 000002	#2-63      
CS.EXP	= 177670	#2-63      
CYCLS 	= 000002	#2-63      
DATE  	= 000004	#2-63      
DCOMST	= 000001	#2-63      
DD.CHI	= 000002	#6-65       18-667    
DD.HEM	= 000010	#6-83      
DD.LER	= 000010	#6-67      
DD.OVF	= 000020	#6-68       18-672    
DD.PCK	= 000002	#6-81      
DD.PGZ	= 000001	#6-64       18-661    
DD.RCK	= 000001	#6-80      
DD.RME	= 000040	#6-69       18-651    
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DD.SCK	= 000004	#6-82      
DD.SFL	= 000020	#6-84      
DD.VFE	= 000004	#6-66       18-621    
DELHLD	= 002000	#3-140     
DEMTIM	= 000002	#3-170      18-625     23-130    
DEP   	= 010000	#2-63      
DEX   	= 000400	#2-63      
DEXDON	= 000004	#2-63      
DEXWD1	= 174406	#2-63      
DEXWD2	= 174404	#2-63      
DEXWD3	= 174402	#2-63      
DFUNC 	= 000200	#2-63      
DF.DMG	= 000004	#2-63      
DF.DMN	= 000007	#2-63      
DF.DOR	= 000001	#2-63      
DF.EHG	= 000010	#2-63      
DF.EHM	= 000011	#2-63      
DF.EMG	= 000005	#2-63      
DF.EMN	= 000006	#2-63      
DF.KLR	= 000012	#2-63      
DF.KLW	= 000013	#2-63      
DF.KLX	= 000014	#2-63      
DF.OFF	= 000002	#2-63      
DF.ON 	= 000003	#2-63      
DF.PDP	= 000016	#2-63      
DF.PEX	= 000015	#2-63      
DIAG1 	= 174430	#2-63      
DIAG2 	= 174432	#2-63      
DIAG3 	= 174436	#2-63      
DIKL10	= 000010	#2-63      
DLYCNT	= 174400	#2-63      
DONE  	= 000200	#3-144     
DON10C	= 040000	#2-63      
DON10S	= 100000	#2-63      
DON11C	= 000100	#2-63      
DON11S	= 000200	#2-63      
DPS4  	= 040000	#2-63      
DRESET	= 000100	#2-63      
DR.DTE	= 000011	#2-63      
DSEND 	= 000004	#2-63      
DS04  	= 004000	#2-63      
DS05  	= 002000	#2-63      
DS06  	= 001000	#2-63      
DTECMD	= 000451	#2-63      
DTEFLG	= 000444	#2-63      
DTEF11	= 000450	#2-63      
DTEMTD	= 000455	#2-63      
DTEMTI	= 000456	#2-63      
DUPE  	= 000020	#2-63      
DURE  	= 000004	#2-63      
DV.EOF	= 000040	#6-53       18-612     25-126    
DV.F11	= 000400	#6-56       18-639    
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DV.HNG	= 001000	#6-57       18-646    
DV.IOP	= 000020	#6-52       18-636    
DV.LOG	= 000100	#6-54       18-627     18-643    
DV.NXD	= 000001	#6-48       18-605    
DV.OFL	= 000002	#6-49       18-605     18-616    
DV.OIR	= 000004	#6-50       18-605     18-616     18-646    
DV.SCN	= 000010	#6-51       18-660     18-666    
DV.URE	= 000200	#6-55       18-643    
DXWRD1	= 002000	#2-63      
D.CLPT	= ******  GX	 15-215     18-753    
D1011 	= 000040	#2-63      
EBSEL 	= 000100	#2-63      
EBUSPC	= 000020	#2-63      
EBUSPS	= 000004	#2-63      
EDONES	= 040000	#2-63      
EF.LPC	= 000002	#2-50       14-111     14-116     17-482     20-878    
EF.LPD	= 000001	#2-48       14-111     14-116     15-152     15-201     17-526     23-143     25-103     26-223    
                         27-260     28-319     29-388    
EF.LPQ	= 000004	#2-52      
EF.LPS	= 000020	#2-55       13-92      18-592     18-754     18-762    
EF.LPW	= 000040	#2-57       13-92      19-796     26-198    
EF.NIR	= ******  GX	 14-111     14-116     16-356    
EF.PR1	= ******  GX	 18-595    
EPTR  	= 000000	#2-63      
ERMHER	  003041 R	 18-628    #18-713    
ERMHNG	  003056 R	 18-647    #18-715    
ERMNXD	  002767 R	 18-606    #18-707    
ERMOFL	  003007 R	 18-617    #18-709    
ERMVFE	  003022 R	 18-622    #18-711    
ERR   	= 100000	#3-135      23-75     
ERR10C	= 010000	#2-63      
ERR10S	= 020000	#2-63      
ERR11C	= 000001	#2-63      
ERR11S	= 000002	#2-63      
EV.SE 	= ******  GX	 23-144     25-104     26-224     27-261     28-320     29-389    
E.FLPC	= 000002	#2-49       13-58     
E.FLPD	= 000001	#2-47      
E.FLPQ	= 000003	#2-51       18-700    
E.FLPS	= 000005	#2-54       18-752    
E.FLPW	= 000006	#2-56       13-60      19-803    
FORPRO	= 000020	#2-63      
GO    	= 000001	#3-154      17-514     23-85      23-110     29-415    
GOERR 	= 000001	#3-171      23-130    
HIBYTE	= 177400	#2-63      #2-112      15-300    
IE.ABO	= 177761	 26-217    
IE.IFC	= 177776	 16-406    
IE.OFL	= 177677	 28-298    
IFLOP 	= 100000	#2-63      
INITLP	  003426 RG	 13-83      13-83      13-96      13-96      14-120     14-120    #20-858    
INTENB	= 000100	#3-145      17-490     17-494     17-514     19-833     20-871     23-85      23-110     26-203    
                         29-415    
INTINS	  002046 R	 13-68     #17-491    
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

INTROF	= 000010	#2-63      
INTRON	= 000040	#2-63      
INTSON	= 000001	#2-63      
INT10S	= 000400	#2-63      
INT11C	= 002000	#2-63      
INT11S	= 004000	#2-63      
IO.DAC	= 010000	 16-393    
IO.KIL	= 000012	 16-412    
IO.RLB	= 001000	 16-389    
IO.RVB	= 010400	 16-391    
IO.WLB	= 000400	 16-385     18-700    
IO.WVB	= 011000	 16-387    
IS.SUC	= 000001	 16-419     29-382    
KLPWRF	= 000010	#2-63      
LOAD11	= 000004	#2-63      
LOBYTE	= 000377	#2-111      2-112      26-217     28-298     29-382    
LOINIT	= 000400	#3-142     
LPALOC	= 000214	#2-42      
LPBCTR	= 000006	#3-175      17-512     23-77     *23-94      23-95     *23-109    *29-369    *29-396    *29-405    
LPBSAD	= 000004	#3-173      23-96     *23-101    *29-395    *29-403    *29-404    
LPCBUF	= 000014	#3-188     *19-813    *19-816     23-105    
LPCCTR	= 000015	#3-189     
LPCEVF	  000304 R	 9-46      #9-48      *14-115     15-152     16-356     17-482    
LPCKSM	= 000017	#3-192      17-511     23-74     
LPCSA 	= 000002	#10-112    #10-112    *13-75      15-158     17-487    *20-870     23-67      26-201     27-255    
                         28-291    
LPCSM 	= 000022	#10-122    *17-510    *17-511     18-729    *19-825    *23-73     *23-74     
LPCSRA	= 000000	#3-134     
LPCSRB	= 000002	#3-156      18-625     18-649     18-670     23-130    
LPEMSG	  002734 R	 18-690     18-700    #18-701    
LPEMSX	  002747 R	 18-686    #18-705    
LPERUN	  002744 R	*18-695    #18-703    
LPEVFG	  000302 R	#9-46      *13-90     *13-91      13-92      14-115     14-116     15-201     17-526     18-592    
                         18-754     18-762     19-796     20-878     23-143     25-103     26-198     26-223     27-260    
                         28-319     29-388    
LPEXPA	= 175400	#3-131      10-112     10-112     20-869    
LPEXPZ	= 000020	#3-132      9-55       18-728    
LPHD  	  000000 RG	#9-40      
LPHUNG	  000306 R	#9-50      *17-506    
LPINI 	  000520 R	 9-40       9-40      #13-89     
LPIOD 	  000672 R	#15-151    
LPITH 	= 000006	#10-112    #10-112     15-171     15-190     17-502     17-518    *20-873     23-68     *23-137    
                         26-196    *26-200     27-253    *29-367    
LPLOOP	  000604 R	#14-110     17-536    
LPMCB 	= 000020	#10-121     23-100    *29-400     29-403    
LPMKT 	  002012 R	#17-481    
LPNIR 	  001552 R	 15-226    #16-355     16-423     16-449    
LPPCTR	= 000010	#3-179     *15-273     19-829    *19-829     23-123    *23-123     26-204    *26-204     27-257    
                        *27-257    
LPQDPB	  002712 R	*18-691     18-696    #18-699    
LPRAMD	= 000012	#3-183     *19-815     23-102    
LPRMA 	= 000040	#10-131     15-239    *15-244     15-255    *15-294     15-297     26-192    
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

LPRMC 	= 000044	#10-133    *15-245     15-260     15-279    *15-309    
LPRMZ 	= 000042	#10-132     15-240     15-264    *15-292     15-298    
LPRTRY	= 000012	#2-43       18-730     28-290    
LPRTY 	= 000024	#10-123    *17-507     18-641     18-731    *23-83     *23-132    *28-290    
LPSIZE	= 000010  G	#10-113     10-117     10-127     10-142     10-142     15-221     17-532     20-875     25-71     
                         26-189     27-250    
LPSTBH	  000312 R	#9-54      
LPSTBK	  000314 R	#9-55       9-57       18-598     18-727     18-735     18-745    
LPSTK 	  000260 RG	 9-40      #9-40      
LPSTLN	= 000030	#9-57       18-735     18-749    
LPSTS 	= 000000	#10-112    #10-112    
LPTBL 	  000344 RG	#10-65      10-113     10-121     10-122     10-123     10-131     10-132     10-133     10-142    
                         10-142     15-154     15-214     17-485     20-861     25-71      26-189     27-250    
LPTBL2	  000364 R	#10-117     10-121     10-122     10-123    
LPTBL3	  000404 R	#10-127     10-131     10-132     10-133    
LPTDAT	= 000016	#3-191     
LPTHD 	= 000004	#10-112    #10-112     15-163     15-199    *15-311     17-498     18-630     26-206     28-303    
                        *28-318    
LPTPAR	= 000040	#3-166      18-625     23-130    
LPTPBT	= 010000	#3-158     
LPUNIT	  000300 R	#9-44      *23-61      23-63     
LPUTBL	  000424 R	#10-137     16-382     23-66     
LPWRUP	  000512 R	#13-82      13-95     
LP.CLR	= 002000	#10-112    #10-112     18-623     18-652     19-805     19-807    
LP.EOF	= 000200	#10-112    #10-112     15-257     18-610     19-822     19-824    
LP.F10	= 000400	#10-112    #10-112     15-203     15-330     18-678     18-763     25-73     
LP.HNG	= 100000	#10-112    #10-112     15-203     17-500     17-528     18-644     29-366    
LP.LIP	= 001000	#10-112    #10-112     15-176     15-203     15-233     15-236     15-262     19-808     26-194    
                         29-359    
LP.MCH	= 010000	#10-112    #10-112     15-203     23-92      23-108     29-361     29-366     29-406    
LP.PZI	= 020000	#10-112    #10-112     15-271     15-275     18-658     23-121    
LP.SST	= 040000	#10-112    #10-112     15-182     15-257     17-525     18-591     18-765     23-142     25-102    
                         28-300    
LP.UNT	= 000003	#10-112    #10-112     18-693     18-747     20-864     23-65     
LP.WAT	= 004000	#10-112    #10-112     15-188     15-203     17-496     18-662     18-668     18-683     26-191    
                         27-252     29-366    
L$$P20	= 000002	#2-41       10-67      10-113     10-117     10-127     10-139     15-155     17-484     20-860    
                         25-71      26-189     27-250    
MEMPAR	= 000020	#3-167      18-625     23-130    
MKSCDP	  000442 R	#13-59      19-801    
MODE00	= 000004	#3-149      15-237     15-263     15-266    
MODE01	= 000010	#3-148      15-237    
MPE11 	= 001000	#2-63      
MRKTDP	  000430 R	#13-57      13-93     
M.KTAE	= 000010	#13-58     #13-60     
M.KTEF	= 000002	#13-58     #13-60     
M.KTMG	= 000004	#13-58     #13-60     
M.KTUN	= 000006	#13-58     #13-60     
NULSTP	= 000040	#2-63      
NUPE  	= 000002	#2-63      
OFFLIN	= 000200	#3-164     
ONLINE	= 004000	#3-139      18-614     19-793     28-293    
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

OPTVFU	= 004000	#3-159      18-670    
PAGZRO	= 040000	#3-136      18-656     19-827     23-75      23-119    
PARENB	= 000002	#3-153      17-514     19-833     20-871     23-85      23-110     26-203     29-415    
PBTHRD	= 000004	#2-102      2-104      2-105      2-106      15-321     16-431     16-432    
PERCLR	= 001000	#2-63      
PHYS  	= 100000	#2-63      
PIDENT	= 000000	#2-63      
PRI7  	= 000340	#2-63      
PROPNT	= 000021	#2-63      
PRTOFF	= 004000	#2-63      
PR0   	= 000000	#2-63      
PR1   	= 000040	#2-63      
PR2   	= 000100	#2-63      
PR3   	= 000140	#2-63      
PR4   	= 000200	#2-63       17-509     19-836    
PR5   	= 000240	#2-63      
PR6   	= 000300	#2-63      
PR7   	= 000340	#2-63       14-114     15-198    
PS    	= 177776	#2-63       14-114     14-114     14-117     15-198     15-198     15-205     17-509     17-509    
                         17-521     19-836     19-836     19-838     23-61      28-302     28-302    
PSWW1 	= 000005	#2-63      
PSWW10	= 000014	#2-63      
PSWW11	= 000015	#2-63      
PSWW12	= 000016	#2-63      
PSWW13	= 000017	#2-63      
PSWW2 	= 000006	#2-63      
PSWW3 	= 000007	#2-63      
PSWW4 	= 000010	#2-63      
PSWW5 	= 000011	#2-63      
PSWW6 	= 000012	#2-63      
PSWW7 	= 000013	#2-63      
PULSE 	= 000020	#2-63      
QSIZE 	= 000023	#2-63      
Q.IOAE	= 000012	#18-700    
Q.IOEF	= 000006	#18-700    
Q.IOFN	= 000002	#18-700    
Q.IOLU	= 000004	#18-700    
Q.IOPL	= 000014	*18-691    #18-700    
Q.IOPR	= 000007	#18-700    
Q.IOSB	= 000010	#18-700    
RAMIS0	= 010000	#2-63      
RAMLOD	= 000003	#3-152      15-266    
RAMPAR	= 000010	#3-168      18-625     18-649     23-130    
RFMAD0	= 100000	#2-63      
RFMAD1	= 040000	#2-63      
RFMAD2	= 020000	#2-63      
RFMAD3	= 010000	#2-63      
RM    	= 000010	#2-63      
RSTERR	= 001000	#3-141      19-833     20-871     26-203    
R.FC  	= ******  GX	 16-383     16-412    
R.PB  	= ******  GX	 15-321     16-431     16-435    
SCD   	= 000040	#2-63      
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

SSTSLP	  002234 R	 15-184     15-184    #18-589    
SSTVTB	  000454 R	#13-62      13-94     
STAT  	= 174434	#2-63      
STATUS	= 000022	#2-63      
SWR   	= 177570	#2-63      
SWSLLT	= 100000	#2-63      
SYNTIM	= 000004	#3-169      18-625     23-130    
TB.ABO	= 040000	#2-93       15-248     26-214     26-217    
TB.DON	= 100000	#2-92       25-146     26-217     28-298     29-382    
TB.EOF	= 020000	#2-94       2-98       15-253     25-128    
TB.LPC	= 010000	#2-95       2-98       15-269     25-119    
TB.RMD	= 004000	#2-96       2-98       15-283     25-134    
TB.SFN	= 036000	#2-98       15-250     29-372    
TB.VFD	= 002000	#2-97       2-98       25-140    
TENAD1	= 174410	#2-63      
TENAD2	= 174412	#2-63      
TESTLP	  003236 R	 15-192     15-192    #19-792    
TEST00	= 000400	#3-162     
TEST01	= 001000	#3-161     
TEST02	= 002000	#3-160     
TOBM  	= 000004	#2-63      
TOD   	= 000003	#2-63      
TOIP  	= 000002	#2-63      
TOIT  	= 000001	#2-63      
TO10  	= 000200	#2-63      
TO10AD	= 174420	#2-63      
TO10BC	= 174414	#2-63      
TO10BM	= 000001	#2-63      
TO10DB	= 000400	#2-63      
TO10DN	= 100000	#2-63      
TO10DT	= 174424	#2-63      
TO10ER	= 020000	#2-63      
TO11  	= 000100	#2-63      
TO11AD	= 174422	#2-63      
TO11BC	= 174416	#2-63      
TO11BM	= 020000	#2-63      
TO11DB	= 004000	#2-63      
TO11DN	= 000200	#2-63      
TO11DT	= 174426	#2-63      
TO11ER	= 000002	#2-63      
TRAP04	  000456 R	 13-63     #13-67     
TSTMOD	= 000001	#3-150     
TTPEN 	= ******  GX	 9-40      
T.HBCT	= ******  GX	 15-312    *16-436     18-637     25-109     29-398    
T.HCAD	= ******  GX	*15-255     15-261     15-272     15-299    *16-437    *23-96      25-116     25-125     29-395    
T.HCBC	= ******  GX	 15-169     15-247    *15-260    *15-261    *16-438    *23-95      25-74     *25-75     *25-147    
                        *26-214     26-215    *26-217    *28-298     29-369     29-372    *29-382    
T.HEMA	= 177774	#2-104     *16-439     29-410    
T.HIBC	= 177776	#2-106      15-319     16-432    
T.HVFC	= 177775	#2-105     *16-443     29-400    *29-402    
UNASG1	= 000032	#2-63      
UNASG2	= 000033	#2-63      
LPDRV      CREATED BY  MACRO  ON 13-JAN-78 AT 14:08	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

UNASG3	= 000034	#2-63      
UNASG4	= 000035	#2-63      
UNASG5	= 000036	#2-63      
UNASG6	= 000037	#2-63      
VFCFF 	  002000 R	 16-398    #16-455    
VFCTBL	  001776 R	 16-441    #16-453    
VFUERR	= 000100	#3-165      23-130    
VFULOD	= 000002	#3-151      15-263    
VFURDY	= 010000	#3-138      18-619    
WEP   	= 000010	#2-63      
ZSTOP 	= 040000	#2-63      
$LPINT	  003526 RG	#23-60     
$$    	= 000037	#13-83      13-83     #13-96      13-96     #14-120     14-120    #15-184     15-184    #15-192    
                         15-192    #15-216     15-216    #15-242     15-242    #15-287     15-287    #15-322     15-322    
                        #15-329     15-329    #16-359     16-359    #16-414     16-414    #16-422     16-422    #16-448    
                         16-448    #17-519     17-519    #18-654     18-654    #18-755     18-755    #19-837     19-837    
                        #23-79      23-79     #23-124     23-124    #25-110     25-110    #25-153     25-153    #28-325    
                         28-325    
$$$   	= 000000	#18-770     18-770    #18-770     18-770    #18-770     18-770    #18-770     18-770    #18-770    
                         18-770     18-770     18-770     18-770     18-770     18-770    #18-770     18-770     18-770    
                         18-770     18-770     18-770    #18-770     18-770     18-770     18-770     18-770     18-770    
                        #18-770     18-770     18-770     18-770     18-770     18-770    #18-770    #20-879     20-879    
                        #20-879     20-879    #20-879     20-879    #20-879     20-879     20-879     20-879     20-879    
                         20-879    #20-879     20-879     20-879     20-879     20-879    #20-879     20-879     20-879    
                         20-879     20-879    #20-879    #23-149     23-149    #23-149     23-149    #23-149     23-149    
                        #23-149     23-149     23-149     23-149     23-149     23-149    #23-149     23-149     23-149    
                         23-149     23-149    #23-149     23-149     23-149     23-149     23-149    #23-149    #25-158    
                         25-158    #25-158     25-158    #25-158     25-158    #25-158     25-158     25-158     25-158    
                         25-158     25-158    #25-158     25-158     25-158     25-158     25-158    #25-158     25-158    
                         25-158     25-158     25-158    #25-158    #26-226     26-226    #26-226     26-226    #26-226    
                         26-226    #26-226     26-226     26-226     26-226     26-226     26-226    #26-226     26-226    
                         26-226     26-226     26-226    #26-226     26-226     26-226     26-226     26-226    #26-226    
                        #27-263     27-263    #27-263     27-263     27-263     27-263    #27-263    #28-326     28-326    
                        #28-326     28-326    #28-326     28-326     28-326     28-326     28-326    #28-326     28-326    
                         28-326     28-326    #28-326    
$$$ARG	= 000011	#18-700     18-700    #18-700     18-700    #18-700     18-700    #18-700     18-700    
$$$GLB	= ******	 13-58      13-58      13-58      13-58      13-58      13-60      13-60      13-60      13-60     
                         13-60      18-700     18-700     18-700     18-700     18-700     18-700     18-700     18-700    
$$$OST	= 000014	#13-58      13-58      13-58     #13-58      13-58      13-58     #13-58      13-58      13-58     
                        #13-58      13-58      13-58     #13-58     #13-60      13-60      13-60     #13-60      13-60     
                         13-60     #13-60      13-60      13-60     #13-60      13-60      13-60     #13-60     #18-700    
                         18-700     18-700    #18-700     18-700     18-700    #18-700     18-700     18-700    #18-700    
                         18-700     18-700    #18-700     18-700     18-700    #18-700     18-700     18-700    #18-700    
                         18-700    
$$$UNI	= 000002	#10-66      10-112     10-112     10-112    #10-112     10-112     10-112     10-112    #10-112    
                        #10-138     10-142     10-142    #10-142     10-142     10-142    #10-142    
$$$$  	= 000002	#18-770     18-770    #18-770     18-770     18-770    #18-770     18-770     18-770    #18-770    
                         18-770     18-770    #18-770     18-770    #18-770     18-770    #18-770     18-770     18-770    
                        #18-770     18-770     18-770    #18-770     18-770     18-770    #18-770     18-770    #18-770    
                         18-770    #18-770     18-770     18-770    #18-770     18-770     18-770    #18-770     18-770    
                         18-770    #18-770     18-770    #18-770     18-770    #18-770     18-770     18-770    #18-770    
                         18-770     18-770    #18-770