Google
 

Trailing-Edge - PDP-10 Archives - bb-j939f-bm - bliss/tendef.r36
There are 10 other files named tendef.r36 in the archive. Click here to see a list.
!
! COPYRIGHT (c) 1977, 1978, 1979, 1980, 1981, 1982, 1983 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! 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.
!
! REVISION HISTORY
!
!	16-Dec-1981	AL	Added MONWORD and MONBLOCK structures
!
!	8-Jan-82	AL	Improved by using GL's "better" structure
!				defn. for MONWORD.  N.B., this change cannot
!				appear in a LIBRARY prior to BLISS V3.
!
!
! END V3.1 BUG FIXES
!
! BLISS V4 DEVELOPMENT
!
!	26-Jul-83	TT	Merge Bugs line into Main line.
!
! END OF REVISION HISTORY
!--
!	POINTR(adr,mask)
!
!	Inputs:
!		adr	- an address (if not a name, enclose adr in parens)
!		mask	- a literal mask of bits
!
!	Expansion:
!		adr < pos , siz >  "pos" and "siz" are inferred from "mask"
!
MACRO
	POINTR(adr,mask)=
	    adr
	<
	    %NBITSU(mask  AND  - mask) - 1
	,
	    %NBITSU(mask) - %NBITSU(mask  AND  - mask) + 1
	>
	%;




!	FLD(val,mask)
!
!	Inputs:
!		val	- a value
!		mask	- a literal mask of bits
!
!	Expansion:
!		(val ^ pos)		where "pos" is inferred from "mask"
!
MACRO
	FLD(val,mask)=
	(
	    (val)
	^
	    (%NBITSU(mask  AND  - mask) - 1)
	)
	%;
!	PC BITS OF INTEREST TO USERS
!
LITERAL
	PC_AFI	=	%O'001000000000',	! Address failure inhibit
	PC_ATN	=	%O'000600000000',	! APR trap number
	PC_BIS	=	%O'020000000000',	! Byte increment suppression
	PC_CY0	=	%O'200000000000',	! Carry 0
	PC_CY1	=	%O'100000000000',	! Carry 1
	PC_FOV	=	%O'040000000000',	! Floating overflow
	PC_FUF	=	%O'000100000000',	! Floating underflow
	PC_LIP	=	%O'002000000000',	! Last instruction public
	PC_NDV	=	%O'000040000000',	! No divide
	PC_OVF	=	%O'400000000000',	! Overflow
	PC_UIO	=	%O'004000000000',	! User IOT mode
	PC_USR	=	%O'010000000000';	! User mode
!	VERSION NUMBER
!
LITERAL
	VI_EDN	=	%O'000000777777',	! Edit number
	VI_MAJ	=	%O'077700000000',	! Major version
	VI_MIN	=	%O'000077000000',	! Minor version
	VI_WHO	=	%O'700000000000';	! Customer edit code
!	CONTROL CHARACTER DEFINITIONS
!
LITERAL
	$CHNUL	=	%O'000',	! Null
	$CHCNA	=	%O'001',
	$CHCNB	=	%O'002',
	$CHCNC	=	%O'003',
	$CHCND	=	%O'004',
	$CHCNE	=	%O'005',
	$CHCNF	=	%O'006',
	$CHBEL	=	%O'007',	! Bell
	$CHBSP	=	%O'010',	! Backspace
	$CHTAB	=	%O'011',	! Tab
	$CHLFD	=	%O'012',	! Line feed
	$CHVTB	=	%O'013',	! Vertical tab
	$CHFFD	=	%O'014',	! Form feed
	$CHCRT	=	%O'015',	! Carriage return
	$CHCNN	=	%O'016',
	$CHCNO	=	%O'017',
	$CHCNP	=	%O'020',
	$CHCNQ	=	%O'021',
	$CHCNR	=	%O'022',
	$CHCNS	=	%O'023',
	$CHCNT	=	%O'024',
	$CHCNU	=	%O'025',
	$CHCNV	=	%O'026',
	$CHCNW	=	%O'027',
	$CHCNX	=	%O'030',
	$CHCNY	=	%O'031',
	$CHCNZ	=	%O'032',
	$CHESC	=	%O'033',	! Escape
	$CHCBS	=	%O'034',	! Control backslash
	$CHCRB	=	%O'035',	! Control right bracket
	$CHCCF	=	%O'036',	! Control circumflex
	$CHCUN	=	%O'037',	! Control underline
	$CHALT	=	%O'175',	! Old altmode
	$CHAL2	=	%O'176',	! Alternate old altmode
	$CHDEL	=	%O'177';	! Delete
! Define STRUCTUREs which make the bit-masks defined by MONSYM and UUOSYM
! useful.
!

! MONWORD
!	This structure defines a single BLISS-value which is accessed by
!	specifying a "field-mask" which defines the position and size
!	of the field to be accessed.
!
!	For example, when invoking the GETLCH UUO, it requires a
!	line-number and returns flags.
!
!	LOCAL
!	    linestate : MONWORD INITIAL(-1);	! Use controlling TTY
!
!	GETLCH( linestate );
!
!	IF .linestate[GL$ITY] THEN ...		! Tests for PTY
!
!

BUILTIN
    FIRSTONE;				! This must be compiled by V3 compiler
					!  to be legal in a library.

STRUCTURE
    MONWORD[msk] = [%UPVAL]
		MONWORD<35-FIRSTONE(msk AND -msk),
			FIRSTONE(msk AND -msk) - FIRSTONE(msk)+1,
			0>;

STRUCTURE
    MONBLOCK[ OFF, MSK ; SIZ=1]= [SIZ] MONWORD[MONBLOCK+OFF,MSK];