Google
 

Trailing-Edge - PDP-10 Archives - bb-h138f-bm - 7-sources/rmssym.bpr
There are 6 other files named rmssym.bpr in the archive. Click here to see a list.
!
!	COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1977, 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 THAT IS NOT SUPPLIED BY DIGITAL.
!

!****************************************************************
!*								*
!*			START OF RMSSYM.BPR			*
!*								*
!*	RMS INTERNAL SYMBOL AND MACRO DEFINITIONS		*
!*								*
!*								*
!****************************************************************

!AUTHOR: S. BLOUNT
!EDIT DATE: 27-FEB-78

%([
		REVISION HISTORY

PRODUCT	LOCAL
EDIT	EDIT	DATE		WHO		COMMENTS
====	====	====		===		========

10	1	27-Feb-78	JMT	Fix bug with BLIS10 macros by
					adding a space before the $ for
					those macros with a ? symbol
					right before the $.

*************************************************
*						*
*		NEW REVISION HISTORY		*
*						*
*************************************************

PRODUCT	MODULE	 SPR
 EDIT	 EDIT	 QAR		DESCRIPTION
======	======	=====		===========
71				Put Copyright in library file

	***** END OF REVISION HISTORY *****


])%

MACRO
     $$SMNCPY =					! Copyright		!A71
BIND $SMNCPY$ = UPLIT (%ASCIZ %STRING(%CHAR(13,10,13,10),	! 	!A71
	'COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1977, 1986.'
	%CHAR(13,10),
	'ALL RIGHTS RESERVED.'
	%CHAR(13,10,13,10))) %;			! For RMSSYM.LUS	!A71
!	RMSSYM.BPR CONTAINS MACROS CALLED IN RMSSYM.MTB.
!	EACH SUCH MACRO IS ALSO DEFINED IN RMSSYM.MPR.
!
!	1. GENERAL PURPOSE INTERNAL MACROS
!	2. VERB AND RMS ERROR DEFINITION
!	3. BLOCK CODES AND BLOCK SIZES
!
!	ALL SYMBOLS DEFINED IN RMSSYM ARE IN THE SCOPE OF USER PROGRAMS.
!	THEREFORE, THE NAMES MUST BE UNDECLARED OR CONVENTIONALLY DEFINED
!	SUCH THAT THEY WILL NOT CONFLICT WITH USER SYMBOLS...
!
!	ALL INTERNALLY USED SYMBOLS SHOULD HAVE $$ SOMEWHERE IN THEIR NAMES.

LITERAL
	V1FABSIZE 	=	16,		! SIZE OF FAB IN R 1
	V1RABSIZE	=	16;		! SIZE OF RAB IN R 1
!****************************************************************
!*	1.  GENERAL PURP MACROS CALLED IN RMSSYM.MTB		*
!****************************************************************


! ***	MACRO $$END IS A NOOP IN BLISS
	MACRO $$END = %;

! $$OPS(SUF$) - CREATES STRUCTURE ARGUMENTS FOR SPECIFIED RMS FIELD
!
MACRO $$OPS(SUF$) = %NAME(O$$,SUF$) , %NAME(P$$,SUF$) , %NAME(S$$,SUF$) %;

! ***	THE S$$ CLASS MACROS SET A SYMBOL TO A SPECIFED VALUE
!
!	S$$DC  (NAMEA, NAMEB, VALUE)	SETS NAMEA'NAMEB = A DECIMAL VALUE
!					(***NOTE:  ' IS USED TO REPRESENT CONCATENATION)
!
!	S$$BC (NAMEA, NAMEB, VALUE)	SETS NAMEA'NAMEB = A BINARY CONSTANT
!					(VALUE GIVES THE BIT TO BE TURNED ON)
!
!	S$$SC (NAMEA, NAMEB, SCA, SCB)	SETS NAMEA'NAMEB = SCA'SCB


	MACRO	S$$SC	(NAMEA,NAMEB,SCA,SCB)	= literal %NAME(NAMEA,$,NAMEB) = %NAME(SCA,$,SCB) %;

	MACRO	S$$DC	(NAMEA,NAMEB,DC)	= literal %NAME(NAMEA,$,NAMEB) = DC %;

	MACRO	S$$BC	(NAMEA,NAMEB,BITNUM)	= literal %NAME(NAMEA,$,NAMEB) = 1 ^ ( 35 - BITNUM ) %;




! MACRO $$FIELD DEFINES FIELDS WITHIN RMS-20 USER CONTROL BLOCKS.
! THE ARGUMENTS ARE:
!
!	PRE	- A SINGLE CHARACTER WHICH DENOTES THE BLOCK (R,F, OR X)
!		  DOCUMENTATIONAL EXCEPT FOR D$$, FLD NAMES GUARANTEED UNIQUE
!	NAME	- FIELD NAME
!	DFALTA,
!	 DFALTB	- DFALTA'$'DFALTB	IS THE DEFAULT VALUE ( '  IS USED TO REPRESENT CONCATENATION)
!	OFF	- XX'$'OFF	IS THE OFFSET INTO THE BLOCK
!	SIZE	- XX'$'SIZE	IS THE SIZE OF FIELD IN BITS
!	PSTN	- XX'$'PSTN	IS THE POSITION (NO. BITS REMAINING AT RIGHT OF FIELD)
!	ASNFLG	- XX'$'ASNFLG	IS THE ASSIGNMENT FLAG
!				1=INITIALIZATION MACRO IS DEFINED
!				0=CANNOT BE SET AT ASSEMBLY TIME
!	COUNT	- XX'$'COUNT	IS THE COUNT OF FIELDS IF ARRAY FIELD
!
	MACRO	$$FIELD	(PRE,NAME,DFALTA,DFALTB,OFF,SIZE,PSTN,ASNFLG,COUNT) =
									! LET ' REPRESENT CONCATENATION OF NAMES
		literal %NAME(D$$,PRE,NAME) = %NAME(DFALTA,$,DFALTB);	! D$$'PRE'NAME = DFALTA'$'DFALTB
		%IF NOT %DECLARED(%NAME(O$$,NAME)) %THEN
		literal %NAME(O$$,NAME) = %NAME(XX,$,OFF);		! O$$'NAME = XX$'OFF
		literal %NAME(S$$,NAME) = %NAME(XX,$,SIZE);		! S$$'NAME = XX$'SIZE
		literal %NAME(P$$,NAME) = %NAME(XX,$,PSTN);		! P$$'NAME = XX$'PSTN

! NOT USED 	literal %NAME(A$$,NAME) = %NAME(XX,$,ASNFLG);
! NOT USED	literal %NAME(C$$,NAME) = %NAME(XX,$,COUNT);
		%FI %;					!NOT %DECLARED
!****************************************************************
!*								*
!*	2.	MACROS FOR VERB AND ERROR DECLARATIONS		*
!*								*
!****************************************************************

MACRO	$$SUC(NAME)=$$CODE(NAME,SU$BAS,SU$CTR)%;
MACRO	$$UERR(NAME)=$$CODE(NAME,ER$BAS,ER$CTR)%;
MACRO	$$FERR(NAME)=$$CODE(NAME,EX$BAS,EX$CTR)%;
MACRO	$$CODE(NAME,BASE,COUNTER)=
	LITERAL NAME= COUNTER;
	%ASSIGN(COUNTER,COUNTER+1); %;
MACRO	$$MAXC(PFX)=
	LITERAL %NAME(PFX,$MAX) = %NAME(PFX,$BAS)+%NAME(PFX,$CTR)-1; %;
LITERAL SU$BAS = %O'1000';
LITERAL ER$BAS = %O'300000';
LITERAL EX$BAS = %O'300500';
COMPILETIME
	SU$CTR=SU$BAS,
	ER$CTR=ER$BAS,
	EX$CTR=EX$BAS;
! PROLOG/EPILOG MACROS FOR VERB DEFINITION
!
MACRO	$$VINI=
	LITERAL	JSYS$I=%O'1000';
	COMPILETIME XX$MAX=0; %;
MACRO	$$VEND=%;

MACRO	$INIT=				!SPECIAL "VERB" -- CODE IN RMSINI.REL
	BEGIN
		EXTERNAL ROUTINE $$RMS;
		$$RMS();
	END; %;
MACRO	$RMS=$INIT %;

! DEFINED AS $$VERB FOR RMSSYM.LUS
!
MACRO	$$V_USER(NAME)=
	LITERAL %NAME(C$,NAME)=XX$MAX;
	MACRO %NAME($$,NAME)=
		%IF %SWITCHES(TOPS10)
		%THEN (%QUOTE %EXPAND %NAME(C$,NAME)+RMS$10)();
		%FI
		%IF %SWITCHES(TOPS20)
		%THEN JSYS(0,%QUOTE %EXPAND %NAME(C$,NAME)+JSYS$I,AC1,AC2,AC3,AC4);
		%FI
	%QUOTE %;
	MACRO %NAME($,NAME)(BLKADDR,ERRADDR)=
	BEGIN
		REGISTER AC1=1,AC2=2,AC3=3,AC4=4;
		%IF %NULL(BLKADDR)
		%THEN  %WARN ('%ARGBLK ADDRESS OMITTED FOR ',NAME)  %FI
		AC1=BLKADDR;
		%QUOTE %EXPAND %NAME($$,NAME);
		%IF %NULL(ERRADDR)
		%THEN
			MACHOP(%O'320',%O'17',UPLIT(%O'263'^27 OR 15^23));
		%ELSE
			MACHOP(%O'320',%O'17',ERRADDR);
		%FI
	END
	%QUOTE %;
	%ASSIGN(XX$MAX,XX$MAX+1)
%;

! DEFINED AS $$VERB FOR RMSSYM.LSY
!
MACRO	$$V_SYS(NAME)=
	LITERAL %NAME(C$,NAME)=XX$MAX;
	%ASSIGN(XX$MAX,XX$MAX+1)
%;
!********************END OF RMSSYM.BPR REQUIRE FILE**************
!****************************************************************