Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/drivers/urdlib.m11
There are no other files named urdlib.m11 in the archive.
;                    COPYRIGHT (c) 1980, 1981, 1982
;                    DIGITAL EQUIPMENT CORPORATION
;                        Maynard, Massachusetts
;
;     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.

; Macros needed for URD data structures.

.macro NURDF$

; GENERAL MESSAGE DEFINITIONS
N.TYP = 0			; (B)OFFSET TO MESSAGE TYPE
	NM.TYP = 17		; MESSAGE TYPE MASK
	NM.DAT = 0&NM.TYP	; DATA MESSAGE
	NM.ATT = 1&NM.TYP	; ATTENTION MESSAGE
	NM.FTR = 2&NM.TYP	; FEATURES MESSAGE
	NM.CTL = 3&NM.TYP	; CONTROL MESSAGE
	NM.ALR = 4&NM.TYP	; ALERT MESSAGE
	NM.CAP = 5&NM.TYP	; CAPABILITIES MESSAGE
	NM.OTR = 6&NM.TYP	; ***CURRENT OUT OF RANGE VALUE***
N.MFL = 1			; (BM)OFFSET TO MESSAGE FLAGS

; DATA MESSAGE DEFINITIONS
				; DATA MESSAGE OFFSETS
N.DSEQ = 2			; (B)SEQUENCE NUMBER
N.DFLG = 3			; (BM)DATA FLAGS
	ND.ACK = 1		; ACKNOWLEDGE REQD
	ND.IER = 2		; INPUT ERROR
	ND.EOF = 4		; SEGMENT IS END OF FILE
N.DSGC = 4			; (B)SEGMENT COUNT
N.DDAT = 5			; START OF DATA
				; DATA SEGMENT CONTROL BYTE DEFINITIONS
	ND.CMP = 200		; COMPRESSION FLAG
				; CONTROL BYTE=0 => END OF RECORD MARK

; ATTENTION MESSAGE DEFINITIONS
				; ATTENTION MESSAGE OFFSETS
N.ALGD = 2			; (B)"LAST GOOD" ID
N.ACOD = 3			; (B)ATTENTION CODE OFFSET
				; ATTENTION CODE VALUES
				; 0 IS RESERVED
	N.ASTC = 1		; STATUS CHANGE
	N.AACK = 2		; DATA ACKNOWLEDGEMENT
	N.ARQS = 3		; REQUESTED
	N.AABC = 4		; OUTPUT ABORT RECEIVED OR INPUT ABORT COMPLETE
	N.APLE = 5		; PAGE LIMIT EXCEEDED
N.AFLG = 4			; (BM)(EX)ATTENTION FLAGS (UP TO 3 BYTES REQ'D)
				; COMMON FLAGS
				; BYTE 1 FLAGS
	NA.FAT = 1		; FATAL ERROR
	NA.OFL = 2		; OFFLINE
	NA.PAU = 4		; PAUSED
	NA.OMD = 10		; OUT OF MEDIA
	NA.JAM = 20		; JAMMED
	NA.OOF = 40		; OPERATOR OFFLINE
	NA.NOE = 100		; NON OPERATOR ERROR
				; BYTE 2 FLAGS
	NA.OUF = 1		; OUTPUT FULL
	NA.NAC = 2		; DEVICE NOT ACCESSIBLE
	NA.DTO = 4		; DEVICE TIME OUT
	NA.RNA = 10		; RESOURCE NOT AVAILABLE
				; LINE PRINTER SPECIFIC ERRORS
	NA.PSE = 20		; PAPER SLEW ERROR
	NA.INK = 40		; OUT OF INK
				; RESERVED CODE
				; BYTE 3 FLAGS
	NA.OVP = 1		; ILLEGAL OVERPRINT
			 	; PUNCHED CARD SPECIFIC ERRORS
				; BYTE 2 FLAGS
	NA.PF = 20		; PICK FAILURE
	NA.RAP = 40		; READ AFTER PUNCH ERROR
	NA.REG = 100		; REGISTRATION ERROR
				; BYTE 3 FLAGS
	NA.IVP = 1		; INVALID PUNCH ERROR
; N.APGC = 		; (2B)PAGE CNTR (PREV FLD EXTNSBLE, NO FIXED OFFSET)

; FEATURES MESSAGES DEFINITIONS
				; FEATURES MESSAGE OFFSETS
N.FSEQ = 2			; (B)FEATURES SEQUENCE NUMBER
N.NSPC  = 3			; (B) NO. OF FEATURES SPECS IN MSG
N.FSPC  = 4			; OFFSET TO 1ST FEATURE SPEC
				; REMAINING OFFSETS RELATIVE TO BEG OF A FEATURE SPEC
N.FID = 0			; (B)FEATURES IDENTIFIER
				; COMMON UNIT RECORD DEVICE FEATURES
	FE.ESC = 0	; RESERVED FOR FUTURE ESCAPE CODE
	FE.DAT = 1	; (CLASS 1) DATA MODE
	   DM.ASC = 1	; 7 BIT ASCII
	   DM.CLI = 2	; COLUMNIMAGE
	   DM.EBC = 3	; EBCDIC
	   DM.AUG = 4	; AUGMENTED COLUMNIMAGE
	   DM.AS8 = 5	; 8 BIT ASCII
	FE.SER = 2	; (CLASS 1) SERIAL NUMBER
	FE.LCR = 3	; (CLASS 0) LOWER CASE RAISE
	FE.FWD = 	4	; (CLASS 1) FORM WIDTH
	FE.EOF = 5	; (CLASS 1) EOF RECOGNITION
	   EO.ASC = 1	; ASCII
		EOFASC = 7417	; ASCII EOF (COLUMN 1) PUNCH
	   EO.IMG = 2	; IMAGE
	FE.DVT = 6	; (CLASS 1) DEVICE TYPE
	FE.TRN = 7	; (CLASS 0) RECORD TRUNCATION
	FE.FNM = 8.	; (CLASS 1) FORM NAME
	FE.DWD = 9.	; (CLASS 1) DEVICE WIDTH
				; DEVICE SPECIFIC FEATURES
				; LINE PRINTER
	LP.HT = 130.	; (CLASS 1) HORIZONTAL TAB STOP
	LP.SFC = 131.	; (CLASS 0) STANDARD VERTICAL FORMS CONTROL
	LP.OVP = 132.	; (CLASS 1) OVERPRINT LIMIT
	LP.CVF = 133.	; (CLASS 1) CUSTOM VFU
	LP.FCC = 134.	; (CLASS 0) FORTRAN CARRIAGE CONTROL
	LP.VFR = 135.	; (CLASS 1) VARIABLE FORMS RATIO
	   VF.6LI = 1	; 6 LINES PER INCH
	   VF.8LI = 2	; 8 LINES PER INCH
	LP.CHS = 136.	; (CLASS 1) CHARACTER SET
	   CH.64 = 1	; 64 CHARACTER SET
	   CH.96 = 2	; 96 CHARACTER SET
	LP.PLE = 137.	; (CLASS 1) PAGE LIMIT ENFORCEMENT
	LP.OPV = 138.	; (CLASS 1) OPTICAL VFU NAME
				; CARD READER/PUNCH
	CD.CWD = 130.	; (CLASS 1) CARD WIDTH
				; SPECIAL FEATURE ID
	FE.ALL = 255.	; AFFECTS ALL FEATURES(READ OR SET TO STD.)
N.FFLG = 1		; (BM)FEATURES FLAGS
	NF.CMD = 1		; SET FEATURES=1, READ=0
	NF.STD = 2		; STANDARD FLAG
N.FCLS = 2		; (B)FEATURE CLASS
	FC.CL0 = 0		; CLASS 0 FEATURE => <BIT> FORM
	FC.CL1 = 1		; CLASS 1 FEATURE => <CNT><...> FORM
	FC.SST = 2		; SET TO STANDARD
	FC.CLM = 3		; CLASS MASK
N.FRSP = 3		; FEATURE RESPONSE FIELD
	FR.USF = 1		; UNSUPPORTED FEATURE
	FR.BCL = 2		; BAD CLASS SPEC'D
	FR.NST = 3		; NO STANDARD VALUE
	FR.ERR = 4		; FEATURE DATA OR FORMAT ERROR
	FR.CPN = 5		; CHANGE PENDING
	FR.NEB = 6		; NOT ENOUGH BUFFER (FOR REPORT)
	FR.DNP = 7		; DEVICE NOT PAUSED
N.FDAT = 4			; BEG FEATURES DATA(FORMAT CLASS DEPENDENT)

; CONTROL MESSAGE DEFINITIONS
				; CONTROL MESSAGE OFFSETS
N.CSEQ = 2			; (B)CONTROL SEQUENCE NUMBER
N.CCMD = 3			; (B)CONTROL COMMAND
	NC.AUE = 1	; (INTERRUPT) ABORT UNTIL EOF
	NC.AUC = 2	; (INTERRUPT) ABORT UNTIL CLEARED
	NC.CAB = 3	; 	CLEAR OUTPUT ABORT/ ACK INPUT ABORT
	NC.RQS = 4	; 	REQUEST STATUS
	NC.DMP = 5	; 	DUMP OUTPUT BUFFERS
	NC.PAU = 6	; (INTERRUPT) PAUSE
	NC.RES = 7	; (INTERRUPT) RESUME
	NC.RQC = 9.	; 	REQUEST CAPABILITIES
N.CRES = 4			; (B)CONTROL RESULT CODE
				; NC.AUE,NC.AUC RESPONSE
	NR.ABS = 0	; ABORT STATE
	NR.NAB = 1	; NOTHING TO ABORT
				; NC.AUE RESPONSE
	NR.NOE = 2	; NO EOF DEFINED
				; NC.CAB	RESPONSE
	NR.ACC = 0	; ABORT COMPLETE CLEARED
	NR.ACN = 1	; ABORT COMPLETE NOT SET
				; NC.RQS RESPONSE
	NR.ATT = 0	; ATTENTION MSG FOLLOWS
				; NC.DMP RESPONSE
	NR.DMP = 0	; OUTPUT BEING DUMPED
	NR.NOB = 1	; NO OUTPUT BUFFERED
				; NC.PAU RESPONSE
	NR.DPS = 0	; DEVICE WILL PAUSE
	NR.PAU = 1	; DEVICE ALREADY PAUSED
	NR.NDP = 2	; NO DATA TRANSFER TO PAUSE
				; NC.RES RESPONSE
	NR.RES = 0	; DEVICE WILL RESUME
	NR.NPS = 1	; DEVICE NOT PAUSED
	NR.NDR = 2	; NO DATA TRANSFER TO RESUME
				; NC.RQC	RESPONSE
	NR.CAP = 0	; CAPABILITIES FOLLOWS

; CAPABILITIES MESSAGE DEFINITIONS
				; CAPABILITIES MESSAGE OFFSETS
N.PCNT = 2			; LIST COUNT BYTE
N.PCAP = 3			; START OF CAPABILITIES LIST
.endm	NURDF$
; General Macros

.macro	DEQ$	QHD,ERR
	MOV	R3,-(SP)
	MOV	#QHD,R3
	ADD	R5,R3
	JSR	PC,$CMQRM
	MOV	(SP)+,R3
.if nb,	ERR
	BCS	ERR
.endc
.endm	DEQ$


.macro	ENQ$	QHD
	CLR	(R4)
	MOV	R4,@QHD+2(R5)
	MOV	R4,QHD+2(R5)
.endm	ENQ$


.macro	RETURN
	RTS	PC
.endm	RETURN

.macro	CALLR	SUBR
	JMP	SUBR
.endm	CALLR
NUL = 0
SOH = 1
STX = 2
ETX = 3
EOT = 4
ENQ = 5
ACK = 6
BEL = 7
BS = 10
HT = 11
LF = 12
VT = 13
FF = 14
CR = 15
SO = 16
SI = 17
DLE = 20
DC1 = 21
DC2 = 22
DC3 = 23
DC4 = 24
NAK = 25
SYN = 26
ETB = 27
CAN = 30
EM = 31
SUB = 32
ESC = 33
FS = 34
GS = 35
RS = 36
US = 37
SPA = 40
DEL = 177
ERRCHR = '\!200			; DEC STD ERROR CHARACTER