Google
 

Trailing-Edge - PDP-10 Archives - BB-J939B-BM - documents/monint.doc
There are 9 other files named monint.doc in the archive. Click here to see a list.
1.0  INTRODUCTION


Precompiled BLISS declaration libraries are provided to facilitate the use
of the TOPS-10 and TOPS-20 monitor calls in BLISS-36C programs.  These
libraries are derived from the MACRO-10 UNIVERSAL files

	MACTEN.UNV
	MACSYM.UNV
	UUOSYM.UNV
	MONSYM.UNV

which are used in writing MACRO programs.  The libraries which are provided are:

	TENDEF.L36	Monitor independent symbols from MACTEN and MACSYM
	UUOSYM.L36	TOPS-10 monitor calls from UUOSYM
	MONSYM.L36	TOPS-20 monitor calls from MONSYM


Generally speaking, the BLISS declaration libraries contain definitions of the
same symbols which the MACRO universal files contain, and are used in much the
same way as the universal files.  More detail about how the translation occurs
is found in later sections.  However, the following general comment applies:

	The symbol names are the same except that the period is translated to
	dollar sign, and the percent sign is translated to underline.  For
	example,

		PC%USR		becomes		PC_USR
		.CHLFD		becomes		$CHLFD

This rule permits the programmer to use the published UUOSYM and MONSYM files
as a guide to the use of the BLISS libraries, while the special character
translation avoids the use of the %NAME lexical-function.




2.0  TENDEF.L36


The TENDEF library contains a number of MACRO and LITERAL declarations which
are not monitor dependent.  These provide definitions of PDP-10 hardware data
structures, and definitions needed to utilize the mask definitions contained
in the UUOSYM and the MONSYM libraries.


Ordinarily both TENDEF and either UUOSYM or MONSYM will be needed:

	LIBRARY 'TENDEF';
	LIBRARY 'MONSYM';




2.1  POINTR Macro


Subfields of a machine word are defined in the libraries in terms of bit masks
just as they are defined in the corresponding MACRO universal files.  These
masks are a contiguous string of one-bits arbitrarily located in a 36-bit
word.  The POINTR macro is used to construct a field-reference from these masks.

Call:

	POINTR ( address , mask )

Expansion:

	address < position , size >

Example:

	POINTR(X, %O'60')	expands to	X<4,2>




2.2  FLD Macro


The FLD macro is used to position a value in a subfield specified by a bit
mask.

Call:

	FLD ( value , mask )

Expansion:

	( ( value ) ^ position )

Example:

	FLD(2, %O'60')		expands to	((2) ^ 4)




2.3  Other Symbols


The TENDEF library contains several other groups of symbols extracted from the
MACSYM file:

	Program counter bits			PC_xxx
	Version number subfields		VI_xxx
	Control character definitions		$CHxxx




3.0  UUOSYM.L36


The following specifies the translation of each type of symbol defined by the
UUOSYM file into BLISS:


    o	Symbols defined by equates, which include offsets, field values, and
	subfield bit masks, are converted to LITERAL declarations with the
	same value.


    o	Symbols defined by EXTERN, which include the job data area symbols, are
	omitted.


    o	Symbols defined by OPDEF, which include the UUO instructions, are
	converted to MACRO declarations.  One of four styles of macro is chosen
	depending upon the form of the OPDEF.  In each case, the macro
	ultimately expands after parameter substitution to a list of three
	values separated by commas, which represent the operation code, the
	accumulator field, and the effective address of the instruction.  This
	macro would ordinarily be called to supply the parameters of a MACHOP
	or MACHSKIP function.


	    MACRO name=		%O'xxx', %O'xx', %O'xxxxxx' %;

		This form is used when the accumulator field and the effective
		address of the OPDEF are both nonzero.

	    MACRO name(a)=	%O'xxx', a, %O'xxxxxx' %;

		This form is used when the accumulator field of the OPDEF is
		zero and the effective address is nonzero, or when the opcode
		is CALLI.

	    MACRO name(e)=	%O'xxx', %O'xx', e %;

		This form is used when the accumulator field of the OPDEF is
		nonzero and the effective address is zero, or when the opcode
		is TTCALL or MTAPE.

	    MACRO name(a,e)=	%O'xxx', a, e %;

		This form is used when the accumulator field and the effective
		address of the OPDEF are both zero (and the opcode is not one
		of the special cases).




4.0  MONSYM.L36


The following specifies the translation of each type of symbol defined by the
MONSYM file into BLISS:


    o	Symbols defined by equates, which include offsets, field values, JSYS
	error codes, and subfield bit masks, are converted to LITERAL
	declarations with the same value.


    o	Symbols defined by OPDEF, which include the JSYS instructions, are
	converted to LITERAL declarations with the JSYS number as value.  The
	symbol "JSYS" itself is omitted.




5.0  GENERATION PROCEDURE


The following is the procedure for library generation.  The inputs to the
generation are:

	UUOSYM.MAC
	MONSYM.MAC
	TENDEF.R36		Monitor independent symbols
	FLDDB.R36		FLDDB$ macro


	.R MACRO			! MACRO 52 or later
	*,UUOSYM=UUOSYM			! Make UUOSYM.LST
	*,MONSYM=MONSYM			! Make MONSYM.LST
	.RUN MONINT			! Convert .LST to .R36
	*UUOSYM				! Make UUOSYM.R36
	*MONSYM				! Make MONSYM.R36
	.RUN BLS36C			! Create libraries
	*TENDEF=TENDEF/LIBRARY		! Make TENDEF.L36 from TENDEF.R36
	*UUOSYM=UUOSYM/LIBRARY		! Make UUOSYM.L36 from UUOSYM.R36
	*MONSYM=MONSYM,FLDDB/LIBRARY	! Make MONSYM.L36 from MONSYM.R36 and
					!	FLDDB.R36
	.DELETE UUOSYM.LST,MONSYM.LST,UUOSYM.UNV,MONSYM.UNV


The following files should now be installed in a public directory:

	TENDEF.R36		TENDEF.L36
	UUOSYM.R36		UUOSYM.L36
	MONSYM.R36		MONSYM.L36
	FLDDB.R36