Google
 

Trailing-Edge - PDP-10 Archives - BB-PENEA-BM_1990 - galsrc/lptusr.mac
There are 11 other files named lptusr.mac in the archive. Click here to see a list.
	TITLE	LPTUSR - LPTSPL SUPPORT FOR TERMINAL SPOOLING
	SUBTTL	Preliminaries

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1988.
;	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 THAT IS NOT SUPPLIED BY DIGITAL.

	SEARCH	LPTMAC			;SEARCH LPTSPL PARAMETERS
	SEARCH	GLXMAC			;SEARCH GALAXY PARAMETERS
	PROLOGUE(LPTUSR)
	SEARCH	QSRMAC			;SEARCH QUASAR PARAMETERS
	SEARCH	ORNMAC			;SEARCH ORION/OPR PARAMETERS
	SEARCH  MONSYM,MACSYM


	USRMAN==:5			;Maintenance edit number
	USRDEV==:4			;Development edit number
	VERSIN (USR)			;Generate edit number
SUBTTL	Revision history

COMMENT \

*****  Release 6.0 -- begin development edits  *****

1	6.1061			6-Nov-87
	Create LPTUSR for terminal characteristic definitions.  Also, all user 
modification should be made in this module.

2	6.1072			12-Nov-87
	Add defintion for LN03 and LQP02.

3	6.1141			14-Dec-87
	Add definition for LA50, LA75, LA100

4	6.1225		8-Mar-88
	Update copyright notice.

5	6.1278		9-May-89
	Add support to print in portrait and landscape mode on a LN03.
In order for us to support landscape and portrait, they must be defined as:
@SET REMOTE-PRINTER CHARACTERISTIC LANDSCAPE 0 and @SET REMOTE-PRINTER
CHARACTERISTIC PORTRAIT 52.

\	;End of revision history
	INTERN	TTYTAB,TABEND

;The layout of the  terminal descriptor blocks is as follows:

;$TDCHR==:0				;TERMINAL CHARACTERISTIC
;$TDTYP==:1				;TERMINAL TYPE
;$TDMOD==:2				;JFN MODE WORD
;$TDCC1==:3				;CCOC WORD 1
;$TDCC2==:4				;CCOC WORD 2
;$TDFLG==:5				;FLAGS
;$TDPOL==:6				;POLLING CHARACTERS F.I. ETX,,ACK
;$TDREP==:7				;[5]ESC seq characters to reset
					;printer 
;$TDLEN==:10				;SIZE OF THE BLOCK
;**;[5]ESC sequence characters to set 132 columns,load landscape font and set
;66 lines
LANDFT:: BYTE (7) 33,133,77,62,61	;[5]
	 BYTE (7) 40,112,33,133,61	;[5]
	 BYTE (7) 65,155,33,133,61	;[5]
	 BYTE (7) 73,66,66,162,0	;[5]
;**;[5]ESC sequence characters to set 80 columns, load portrait font and set 66
;lines
PORTFT:: BYTE (7) 33,133,77,62,60	;[5]
	 BYTE (7) 40,112,33,133,61	;[5]
	 BYTE (7) 60,155,33,133,61	;[5]
	 BYTE (7) 73,66,66,162,0	;[5]
	SUBTTL DEFINITION OF THE SUPPORTED TERMINALS

;If a terminal type is not suplied with the individual description macros's,
;the default is specified here:

;The terminal characteristic defines the  terminal type.

DEFINE  DFCHR$ ,<
	SIXBIT /LA36/>			;DEFAULT TERMINAL CHARATERISTIC

;The terminal type is the TOPS-20 terminal type.

DEFINE	DFTYP$ ,<			;DEFAULT TERMINAL TYPE
	.TTL36>				;DIGITAL LA36

;The terminal mode word  in the descriptor blocks should only contain the
;device related elements, such as TT%MFF, TT%TAB, TT%LCA, etc.   (Refer to
;the description of the STPAR monitor call). All other fields in this word
;are ignored by LPTSPL. For most terminals the default is set by the moni-
;if the type is properly defined in STG. So the following default will do:

DEFINE	DFMOD$ ,<			;DEFAULT TERMINAL MODE WORD
	TT%LCA+^D66B10+^D132B17>	;DEFAULT PAGE LENGTH 66 LINES/PAGE
					;132 CHAR/LINE AND LOWERCASE

;Control character output control is important to understand, because 
;the operation of a terminal can be changed by sending some control  cha-
;racters. F.i. some terminals allow the printing of double height or  can
;go into plotting mode.  This is not desirable in a spooling  environment,
;therefore set the CCOC words to  ignore most  control characters,  except
;BS, TAB, LF, FF and CR.
DEFINE	DFCCO$ ,<			;DEFAULT CONTROL CHAR OUTP CONTRL
	BYTE(2)0,0,0,0,0,0,0,0,2,3,3,3,3,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0>

DEFINE	CCACT$ ,<			;ACTUAL CODE FOR ALL CONTROL CHARACTERS
	BYTE(2)2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
	BYTE(2)2,2,2,2,2,2,2,2,2,2,2,2,2,2>

;The flag word can be used to specify the protocol etc.
;	FL$XOF==:1B0			;XON/XOF PROTOCOL
;	FL$POL==:1B1			;POLLING PROTOCOL
;	FL$FUL==:1B2			;FULL HEADERS,BANNERS,TRAILERS
;	FL$VFU==:1B3			;PROGRAMMABLE TERMINAL (LIKE VFU)
;	FL$PGM==:1B4			;FORCED VFU RELOAD BEFORE EACH FILE
DEFINE	DFFLG$ ,<			;DEFAULT FLAG WORD
	FL$XOF>				;XON/XOFF PROTOCOL

;Now we can setup a macro to make it easy to define the various terminals
DEFINE	TDBLK$	(CHAR<DFCHR$>,TYPE<DFTYP$>,MODE<DFMOD$>,CCOC<DFCCO$>,FLAG<DFFLG$>,POL<0>,%%A),<
%%A:	CHAR				;Terminal Characterisic
	TYPE				;TYPE OF TERMINAL
	MODE				;TERMINAL MODE WORD
	CCOC				;CCOC WORDS (2)
	FLAG				;FLAGS
	POL				;POLLING CHARACTERS OUTPUT,,INPUT
	BLOCK	1			;UNUSED WORDS ARE ZEROED
>
SUBTTL TERMINAL CHARACTERISTICS

;  MONITOR DEFINE TERMINAL CHARACTERISTICS

DEFPRI:: DFCHR$				;DEFAULT TERMINAL

TTYTAB::
;	TDBLK$	(SIXBIT /TTM33/,.TT33)		;TYPE 0 IS MODEL 33

;	TDBLK$	(SIXBIT /TTM35/,.TT35)		;TYPE 1 IS MODEL 35

;	TDBLK$	(SIXBIT /TTM37/,.TT37)		;TYPE 2 IS MODEL 37

	TDBLK$	(SIXBIT /TTEXE/,.TTEXE)		;TYPE 3 IS TI/EXECUPORT

;	TDBLK$	(SIXBIT /CUST/,4)		;TYPE 4 FOR CUSTOMER

;	TDBLK$  (SIXBIT /CUST/,5)		;TYPE 5 FOR CUSTOMER

;	TDBLK$	(SIXBIT /CUST/,6)		;TYPE 6 FOR CUSTOMER

;	TDBLK$	(SIXBIT /CUST/,7)		;TYPE 7 FOR CUSTOMER

	TDBLK$	(SIXBIT /DEFAUL/,.TTDEF)	;TYPE 8. IS SYSTEM DEFAULT

	TDBLK$	(SIXBIT /IDEAL/,.TTIDL)		;TYPE 9. IS IDEAL

;	TDBLK$	(SIXBIT /VT05/,.TT05)		;TYPE 10. IS VT05

;	;TDBLK$	(SIXBIT /VT50/,.TT50)		;TYPE 11. IS VT50

	TDBLK$	(SIXBIT /LA30/,.TTL30)		;TYPE 12. IS LA30

	TDBLK$	(SIXBIT /GT40/,.TTG40)		;TYPE 13. IS GT40

	TDBLK$	(SIXBIT /LA36/,.TTL36)		;TYPE 14. IS LA36

;	TDBLK$	(SIXBIT /VT52/,.TTV52)		;TYPE 15. IS VT52

	TDBLK$	(SIXBIT /VT100/,.TT100)		;TYPE 16. IS VT100

	TDBLK$	(SIXBIT /LA38/,.TTL38)		;TYPE 17. IS LA38

;	TDBLK$	(SIXBIT /LA120/,.TT120)		;TYPE 18. IS LA120

	TDBLK$	(SIXBIT /VT125/,.TT125)		;TYPE 35. IS VT125

;	TDBLK$	(SIXBIT /VK100/,.TTL10)		;TYPE 36. IS VK100

	LN03$					;[2]LN03

	LQP02$					;[2]LQP02

	LA120$					;[2]LA120

	LA50$					;[3]LA50

	LA75$					;[3]LA75

	LA100$					;[3]LA100

TABEND==.-TTYTAB		;END OF TABLE
; DEC SUPPORT TERMINAL PRINTERS.  MONITOR HAS NO KNOWLEDGE OF THESE PRINTERS
; AS TERMINALS.

;[2] Add  terminal characteristic definitions for LA120, LN03 AND LQP02.

DEFINE	LA120$	,<		;TYPE 22 IS LA120
	SIXBIT /LA120/		;TERMINAL CHARACTERISTIC NAME
	.TT120			;TYPE
	TT%MFF+TT%LCA+TT%TAB	;SO RESET LENGTH AND WIDTH
	CCACT$			;SEND EVERYTHING ACTUAL
	FL$POL!FL$FUL		;ALWAYS LOAD VFU!
	.CHCNE,,0
	BLOCK	1
>
;[3]
DEFINE	LA50$	,<		;LA50
	SIXBIT /LA50/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;DEFAULT TYPE
	TT%MFF+TT%LCA+TT%TAB	;SO RESET LENGTH AND WIDTH
	CCACT$			;SEND EVERYTHING ACTUAL
	FL$POL!FL$FUL		;ALWAYS LOAD VFU!
	.CHCNE,,0
	BLOCK	1
>
;[3]
DEFINE	LA75$	,<		;LA75
	SIXBIT /LA75/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;DEFAULT TYPE
	TT%MFF+TT%LCA+TT%TAB	;SO RESET LENGTH AND WIDTH
	CCACT$			;SEND EVERYTHING ACTUAL
	FL$POL!FL$FUL		;ALWAYS LOAD VFU!
	.CHCNE,,0
	BLOCK	1
>
;[3]
DEFINE	LA100$	,<		;LA100
	SIXBIT /LA100/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;DEFAULT TYPE
	TT%MFF+TT%LCA+TT%TAB	;SO RESET LENGTH AND WIDTH
	CCACT$			;SEND EVERYTHING ACTUAL
	FL$POL!FL$FUL		;ALWAYS LOAD VFU!
	.CHCNE,,0
	BLOCK	1
>

DEFINE	LN03$	,<		;TYPE IS LN03
	SIXBIT /LN03/
	.TTIDL			;DEFAULT TYPE
	TT%MFF+TT%LCA+TT%TAB	;SO RESET LENGTH AND WIDTH
	CCACT$
	FL$POL!FL$FUL!FL$RST	;[5]Polling,full header,reset printer
	.CHCNE,,0
	BYTE(7)33,143,0		;[5]Reset ESC seq for LN03
>
DEFINE	LQP02$	,<		;DIABLO DAISY WHEEL
	SIXBIT /LQP02/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;DIABLO = IDEAL BUT NO TABS
	TT%LCA+TT%MFF		;SO JUST LOWERCASE AND FORMFEED
	BYTE(2)0,0,0,2,0,0,0,0,2,3,3,0,2,2,0,0,0,0 ;ACTUAL BS,LF,FF,CR
	BYTE(2)0,0,0,0,0,0,0,0,0,2,0,0,0,0 ;SIMULATE TABS
	FL$POL			;POLLING FOR ONLINE CHECK
	.CHCNC,,0		;ETX/ANY PROTOCOL
	BLOCK 1			;SPARE
	>

REPEAT 0,<
DEFINE	TDBRL$	,<		;BRAILLE PRINTER
	SIXBIT /BRAIL/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;TYPE
	Z			;DEFAULTS
	BYTE(2)0,0,0,0,0,2,0,0,2,3,3,0,2,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0
	FL$POL			;ONLINE CHECK
	.CHCNE,,0		;ENQ,,ANY
	BLOCK	1
>

DEFINE	TDHP72$	,<		;MODIFIED HYPRINT WITH 72 LINES/PAGE
	SIXBIT /HYPR72/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			; SORT OF DIABLO = IDEAL BUT NO TABS AND NO FF
	DFMOD$			;LOWERCASE AND 72 LINES/PAGE
	BYTE(2)0,0,0,0,0,2,0,0,2,3,3,0,3,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0
	FL$POL
	.CHCNE,,0
	BLOCK 1			;SPARE
	>
DEFINE	TDHP66$	,<		;MODIFIED HYPRINT WITH 66 LINES/PAGE
	SIXBIT /HYPR66/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			; SORT OF DIABLO = IDEAL BUT NO TABS AND NO FF
	TT%LCA+^D66B10		;LOWERCASE AND 66 LINES/PAGE
	BYTE(2)0,0,0,0,0,2,0,0,2,3,3,0,3,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0
	FL$POL
	.CHCNE,,0
	BLOCK 1			;SPARE
>

DEFINE	TDDIA$	,<		;DIABLO DAISY WHEEL
	SIXBIT /DIABLO/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			;DIABLO = IDEAL BUT NO TABS
	TT%LCA+TT%MFF		;SO JUST LOWERCASE AND FORMFEED
	BYTE(2)0,0,0,2,0,0,0,0,2,3,3,0,2,2,0,0,0,0 ;ACTUAL BS,LF,FF,CR
	BYTE(2)0,0,0,0,0,0,0,0,0,2,0,0,0,0 ;SIMULATE TABS
	FL$POL!FL$PGM		;POLLING FOR ONLINE CHECK
	.CHCNC,,0		;ETX/ANY PROTOCOL
	BLOCK 1			;SPARE
	>
;TERMINET PRINTER BIJ CAB HEEFT HARDWARE FORMFEED (PAGLEN=12 INCH)
;HEEFT LOWERCASE MAAR GEEN ENKEL PROTOCOL. DUS FILLER KATAKTERS
;ZIJN NODIG. GEEN ON-LINE TEST MOGELIJK.
;DEFINE	TRMNET$ ,<	;TERMINET TERMINAL, AS PLACED AT CAB
;	.TTDEF
;	TT%LCA+TT%MFF
;	CCACT$
;	Z
;	Z
;	BLOCK	2
;	>

DEFINE	TDHPHH$	,<		;MODIFIED HYPRINT WITH 72 LINES/PAGE
	SIXBIT /HYPR72/		;TERMINAL CHARACTERISTIC NAME
	.TTIDL			; SORT OF DIABLO = IDEAL BUT NO TABS AND NO FF
	TT%LCA+TT%MFF 		;	DFMOD$	;LOWERCASE AND 72 LINES/PAGE
	BYTE(2)0,0,0,0,0,2,0,0,2,3,3,0,2,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0
	FL$POL
	.CHCNE,,0
	BLOCK 1			;SPARE
	>
DEFINE	TRMNET$ ,<	;TERMINET TERMINAL, AS PLACED AT CAB
	SIXBIT /TERNET/		;TERMINAL CHARACTERISTIC NAME
	.TTDEF
	TT%LCA+TT%MFF+^D72B10
	CCACT$
	FL$POL
	.CHCNE,,0
	BLOCK	1
	>
DEFINE	B600$	,<		;600 LPM PRINTER
	SIXBIT /PR600/		;;TERMINAL CHARACTERISTIC NAME
	.TT120			;TYPE IS LA120
	TT%MFF+TT%LCA+1b17	;MECHANICAL FF,NO HARDWARE TABS,do not change width of la120
	BYTE(2)0,0,0,0,0,2,0,0,1,3,2,0,2,2,0,0,0,0
	BYTE(2)0,0,0,0,0,0,0,0,0,0,0,0,0,0
	FL$POL			;PRINTER USES ANSWER-BACK MESSAGE AS POLL
	.CHCNE,,0		;ENQ,,ANY CHARACTER
	BLOCK	1
>


;If terminal should not be used by PRISPL, we should define it in PRIGEN.BIN
;using the following macro:
DEFINE	NOSPL$	,<
	TDBLK$	(-1)>

TABEL:	BLOCK $TDLEN			;TTY0 DOES NOT EXIST
	>				; SO FIRST CHUNK IS EMPTY
	.DIRECT FLBLST

	END