Google
 

Trailing-Edge - PDP-10 Archives - BB-F494Z-DD_1986 - 10,7/lptlp5.mac
There are 10 other files named lptlp5.mac in the archive. Click here to see a list.
TITLE	LPTLP5 - LP05 class printer driver for LPTSPL-10
SUBTTL	D. Mastrovito/DPM	12-SEP-85

;
;
;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984,1985,1986.
;			ALL RIGHTS RESERVED.
;
;     THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY  BE  USED
;     AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE
;     AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.   THIS
;     SOFTWARE  OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR
;     OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.  NO  TITLE  TO
;     AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
;
;     THE INFORMATION  IN  THIS  SOFTWARE  IS  SUBJECT  TO  CHANGE
;     WITHOUT  NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT
;     BY DIGITAL EQUIPMENT CORPORATION.
;
;     DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
;     OF  ITS  SOFTWARE  ON  EQUIPMENT  WHICH  IS  NOT SUPPLIED BY
;     DIGITAL.
;

	SEARCH	GLXMAC			;SEARCH GALAXY PARAMETERS
	SEARCH	QSRMAC			;SEARCH QUASAR PARAMETERS
	SEARCH	ORNMAC			;SEARCH ORION/OPR PARAMETERS
	SEARCH	LPTMAC			;SEARCH LPTSPL PARAMETERS
	PROLOG	(LPTLP5)

IF2,<PRINTX Assembling GALAXY-10 LPTLP5>

	LP5EDT==2

	SALL				;FOR CLEAN LISTINGS
	.DIRECT	FLBLST			;FOR CLEANER LISTINGS

	ENTRY	LPTLP5			;LOAD IF LIBRARY SEARCH
SUBTTL	Revision History

	COMMENT \

1	Create this module.
2	Make this module handle spooling to tape as well.
	GCO 10340 6-Dec-85 /NT

\ ;End Revision history
SUBTTL	LPTLP5 - Dispatch table


; This module will drive any LP05 class printer.

LPTLP5::DEVDSP	(LP5,<LP05>)

LP5STS==LPTSTS##			;DEVICE STATUS TEXT


; Driver specific per-job data
	 .ORG	J$DWDS			;DEFINE WORDS STARTING AT J$DWDS
LP5SIZ:!				;END OF DRIVER SPECIFIC DATA
	 .ORG

IF2,<
	IFL <DRVWDS-<LP5SIZ-J$DWDS>>,<
	PRINTX ? LP05 driver definitions overflow storage
	>
> ;END IF2
SUBTTL	LP5INX - Initialization


LP5INX:	JUMPE	M,.RETT			;RETURN IF LPTSPL INITIALIZATION
	MOVE	S1,STREAM##		;GET STREAM NUMBER
	MOVE	S1,JOBOBA##(S1)		;AND THE OBJECT BLOCK
	MOVE	S1,OBJ.ND(S1)		;GET STATION NUMBER
	PUSHJ	P,LPTANF##		;MUST BE ANF-10
	JUMPF	INIT.1			;ELSE RETURN
	SKIPN	S1,SUP.ST(M)		;GET DEVICE NAME IF ANY
	MOVSI	S1,'LPT'		;ELSE WANT A NORMAL LPT
	PUSHJ	P,LPTDVN##		;GENERATE DEVICE NAME
	MOVE	T1,J$LDEV(J)		;GET DEVICE NAME
	DEVCHR	T1,UU.PHY		;GET DEVICE CHARACTERISTICS
	TXNN	T1,DV.LPT		;PROPER DEVICE TYPE?
	JRST	INIT.1			;NOT FOR US
	MOVE	T1,[2,,T2]		;SET UP UUO AC
	MOVEI	T2,.DFHCW		;FUNCTION CODE
	MOVE	T3,J$LDEV(J)		;DEVICE NAME
	DEVOP.	T1,UU.PHY		;READ HARDWARE CHARACTERISTICS
	  SETZ	T1,			;FAILED??
	LOAD	T1,T1,DF.CLU		;GET THE UNIT TYPE
	CAIE	T1,.DFUFG		;LP05 CLASS PRINTER?
	JRST	INIT.1			;TRY ANOTHER DRIVER
	MOVE	T1,['LP05  ']		;UNIT TYPE IDENTIFIER
	MOVEM	T1,J$LTYP(J)		;SAVE PRINTER CLASS FOR QUASAR
	HRLZI	T1,LPTLP5		;POINT TO DISPATCH TABLE
	HRRI	T1,J$$DEV(J)		;MAKE A BLT POINTER
	BLT	T1,J$$DND(J)		;COPY INTO JOB STORAGE AREA
	SETOM	J$POSF(J)		;LP05 DOES POSITIONING
	SETOM	J$FFDF(J)		;LP05 DOES FORM FEEDS
	SETOM	J$MNTF(J)		;LP05 SUPPORTS MOUNTABLE FORMS
	MOVEI	S1,%RSUOK		;LOAD THE CODE
	$RETT				;RETURN

INIT.1:	MOVNI	S1,1			;-1 MEANS DEVICE NOT FOR US
	$RETF				;RETURN

INIT.2:	SKIPA	S1,[%RSUNA]		;UNIT NOT AVAILABLE
INIT.3:	MOVEI	S1,%RSUDE		;UNIT WILL NEVER BE AVAILABLE
	$RETF				;RETURN
SUBTTL	LP5IPC - Special IPCF message processing


LP5IPC:	MOVNI	S1,1			;WE HAVE NO SPECIAL MESSAGES
	$RETF				;RETURN
SUBTTL	LP5SCD - Scheduler call


LP5SCD:	$RETT				;RETURN
SUBTTL	LP5WAK - Wakeup time check


LP5WAK:	$RETT				;RETURN
SUBTTL	LP5OPX - OPEN device


LP5OPX:	MOVX	T1,IO.SFF+.IOASC	;ASCII MODE + SUPPRESS FORM FEED
	PUSHJ	P,LPTOPN##		;SETUP I/O, OPEN CHANNEL, ETC.
	JUMPF	OPEN.1			;CAN'T HAVE IT RIGHT NOW
	PUSHJ	P,LPTHDW##		;SETUP HARDWARE CHARACTERISTICS
	PUSHJ	P,INTCNL##		;CONNECT TO INTERRUPT SYSTEM
	JUMPF	OPEN.2			;GIVE UP
	TXO	S,INTRPT		;INDICATE WE'RE CONNECTED
	MOVEI	S1,%RSUOK		;LOAD THE CODE
	$RETT				;RETURN

OPEN.1:	SKIPA	S1,[%RSUNA]		;UNIT NOT AVAILABLE
OPEN.2:	MOVEI	S1,%RSUDE		;UNIT WILL NEVER BE AVAILABLE
	$RETF				;RETURN
SUBTTL	LP5CLS - CLOSE device


LP5CLS:	TXZE	S,INTRPT		;ARE WE CONNECTED TO INTRPT SYSTEM?
	PUSHJ	P,INTDCL##		;YES,,RELEASE THE INTERRUPTS
	MOVE	S1,J$LCHN(J)		;GET THE CHANNEL
	SKIPE	J$LREM(J)		;ARE WE USING A REMOTE PRINTER?
	JRST	CLOS.1			;YES--ISSUE A CLOSE/RELEASE
	RESDV.	S1,			;RESET THE CHANNEL
	  JFCL				;IGNORE ANY ERRORS
	$RETT				;AND RETURN

CLOS.1:	LSH	S1,^D23			;POSITION THE CHANNEL NUMBER
	TLO	S1,(CLOSE 0,0)		;MAKE IT A CLOSE UUO
	XCT	S1			;CLOSE THE MAG TAPE
	MOVE	S1,J$LCHN(J)		;GET THE CHANNEL NUMBER AGAIN
	LSH	S1,^D23			;POSITION IT
	TLO	S1,(RELEASE 0,0)	;MAKE IT A RELEASE UUO
	XCT	S1			;RELEASE THE DEVICE
	$RETT				;AND RETURN
SUBTTL	LP5FLS - Flush a job


LP5FLS:	PJRST	LPTFLS##		;CALL COMMON FLUSH ROUTINE
SUBTTL	LP5FVU - Load VFU


LP5VFU:	SKIPN	J$LDVF(J)		;PRINTER HAVE A VFU?
	$RETT				;NOTHING TO DO
	MOVEI	S1,1			;FLAG TO LOAD
	PJRST	LPTVFU##		;LOAD THE VFU AND RETURN
SUBTTL	LP5RAM - Load RAM


LP5RAM:	SKIPE	J$LREM(J)		;IS THIS A REMOTE LPT ???
	$RETT				;YES,,RETURN NOW !!!
	MOVE	S1,J$LCLS(J)		;GET THE CONTROLLER CLASS
	CAIE	S1,.DFS20		;IS THIS A CONSOLE FRONT END LPT ???
	$RETT				;NO,,THEN WE DONT LOAD THE RAM
	PJRST	LPTRAM##		;CALL COMMON ROUTINE AND RETURN
SUBTTL	LP5LER - File LOOKUP error processing


LP5LER:	PJRST	LPTLER##		;CALL COMMON ERROR ROUTINE
SUBTTL	LP5IER - File input error processing


LP5IER:	PJRST	LPTIER##		;CALL COMMON ERROR ROUTINE
SUBTTL	LP5OUT - Output a buffer


LP5OUT:	PJRST	LPTOUT##		;CALL COMMON OUTPUT ROUTINE
SUBTTL	LP5OER - Output error processing


LP5OER:	PJRST	LPTOER##		;CALL COMMON ERROR ROUTINE
SUBTTL	LP5EOX - Output EOF processing


LP5EOX:	$RETT				;NOTHING TO DO
SUBTTL	LP5BJB - Begining of job


LP5BJB:	$RETT				;RETURN
SUBTTL	LP5EJB - End of job


LP5EJB:	$RETT				;RETURN
SUBTTL	LP5BFL - Begining of file


LP5BFL:	$RETT				;RETURN
SUBTTL	LP5EFL - End of file


LP5EFL:	$RETT				;RETURN
SUBTTL	LP5BAN - Banner initialization


LP5BAN:	$RETT				;RETURN
SUBTTL	LP5HDR - Header initialization


LP5HDR:	$RETT				;RETURN
SUBTTL	LP5WID - Header width initialization


LP5WID:	$RETT				;RETURN
SUBTTL	LP5RUL - Ruler processing

LP5RUL:	PJRST	LPTRUL##		;PRINT STANDARD RULER
SUBTTL	LP5SHT - Stream shutdown


LP5SHT:	$RETT				;RETURN
SUBTTL	LP5CHR - Character translator


LP5CHR:	$RETT				;RETURN
SUBTTL	Literal pool


LP5LIT:	LIT

LP5END::!END