Google
 

Trailing-Edge - PDP-10 Archives - FORTRAN-10_V7wLink_Feb83 - reqrel.bli
There are 12 other files named reqrel.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

!COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1981, 1983
! Author:	*/TFV/CDM/AHM

GLOBAL BIND REQREV = 7^24 + 0^18 + #1674;	! Version Date:	11-Nov-82

%(

***** Begin Revision History *****

***** Begin Version 7 *****

1	1245	TFV	3-Aug-81	------
	Add RDATBLK for sparse data blocks.

2	1242	CKS	2-Sep-81
	Add RCHDATA for initialization of character strings

3	1466	CDM	1-Feb-82
	Add binds for values of LINK type codes for the EVALU table.

1511	CDM	18-Mar-82
	Add RWRITELINK for SAVE statement rel block.

1512	AHM	23-Mar-82
	Define RLONGSYMBOL  rel  block  type, PXxxxx  rel  file  psect
	indices and function names for ZSYMBOL routine.

1521	CDM	26-Mar-82
	Add macros and binds for arg checking

1525	AHM	1-Apr-82
	Define symbols for various new REL block types.

1526	AHM	6-Apr-82
	Define symbols for type 1010 code blocks.

1564	AHM	21-Jun-82
	Remove definition of RLIBREQ made during edit 1525 since it is
	no longer needed.

1674	CDM	11-Nov-82
	Fix  argchecking  further  so   that  constant  and   expression
	arguments get  flagged  as  no-update,  and  character  function
	return values are implicit (not checked).

***** End Revision History *****

)%

	%(***DEFINE STRUCTURES FOR A REL FILE BUFFER AND FOR REFERENCING
		A REL FILE BUFFER VIA A POINTER TO IT**)%
	STRUCTURE RELBUFF[IX,WD,POS,SIZE]=		!FOR A REL-FILE BUFFER
		(.RELBUFF+(.IX+1)+.WD)<.POS,.SIZE>;

	STRUCTURE PRELBUFF[IX,WD,POS,SIZE]=		!FOR A PTR TO A REL-FILE BUFFER
		(@.PRELBUFF+(.IX+1)+.WD)<.POS,.SIZE>;

	MACRO
		RDATCNT=0,-1,RIGHT$,	!COUNT OF DATA WDS IN RH OF 1ST WD
		RTYPE=0,-1,LEFT$,	!BLOCK TYPE IN LH OF 1ST WD
		RRELOCWD=0,0,WHOLE$,	!RELOCATION BITS IN 2ND WD
		RLDATWD=0,WHOLE$;	!DATA WORDS START WITH WD 3


	BIND RBLKSIZ=20;	!NUMBER OF WDS IN A REL FILE BLOCK

!
!DEFINE THE LOADER BLOCK TYPES AND DATA INFORMATION
!
BIND	RCODE = 1,		!CODE AND DATA BLOCK
	RSYMBOL = 2,		!SYMBOL BLOCK
		RGLOBDEF = 4^30,	!GLOBAL DEF IN RSYMBOL
		RGLOBDDTSUP=#44^30,	!GLOBAL DEF WITH DDT USE SUPPRESSED
		RLOCDEF = #10^30,	!LOCAL DEF IN RSYMBOL
		RLOCDDTSUP=#50^30,	!LOCAL DEF WITH DDT USE SUPPRESSED
		RLOCREQ = #10^30,	!LOCAL REQUEST IN RSYMBOL
		RLOCFIX = #50^30,	!LOCAL FIXUP FOR COMMON BLOCK VARIABLE
		RGLOBREQ = #60^30,	!GLOBAL REQUEST
		RGLOB0 = 0,	!CHAINED GLOBAL REQUEST
		RGLOB4 = #400000,	!ADDITIVE GLOBAL IN RSYMBOL
	RHISEG = 3,		!HISEG BLOCK
	RENTRY = 4,		!ENTRY BLOCK
	REND =   5,		!END BLOCK
	RNAME  = 6,		!NAME BLOCK
	RSTART = 7,		!START ADDRESS BLOCK
	RLOCAL = #10,		!LOCAL BLOCK
	RPOLISH = #11,		!POLISH FIXUP BLOCK
%1525%	RCOMMON = #20,		! Common block size
%1245%	RDATBLK = #21,		! Sparse data block
%1525%	RPSECTORG = #22,	! PSECT origin block (sets default psect index)
%1525%	RPSECTEND = #23,	! PSECT END block
%1525%	RPSECTHEAD = #24,	! PSECT header block
%1525%		RPSSINGLE = #100000000,	! PSECT fits in a single section
%1525%		RPSNONZERO = #40000000,	! PSECT should be loaded into
%1525%					! a non-zero section
%1525%		RPSCONCAT = #10000000,	! Data in this PSECT should be appended
%1525%					!  to what was loaded before
%1525%		RPSRONLY = #2000000,	! Write protected page
%1525%		RPSWRITE = #1000000,	! Readable page
%1242%	RCHDATA = #1004,	! Character data block
%1526%	RRIGHTCODE = #1010,	! Right relocation by psects
%1511%	RWRITELINK = #1045,	! For SAVE statement processing
%1512%	RLONGSYMBOL = #1070,	! Long symbol names
%1512%		RLSSUPPRESS = #10,	! Suppress symbol typeout to DDT
%1512%		RLSLOCAL = #100,	! Local symbol definition
%1512%		RLSGLOBAL = #200,	! Global symbol definition or fixup
%1512%		RLSCHAIN = #40,		! Chained fixup request
%1512%		RLSADDITIVE = #50,	! Additive fixup request
%1512%		RLSSYMBOL = #60,	! Symbol fixup request
%1512%		RLSRHFIX = 3,		! Right hand fixup
%1512%		RLS30FIX = 6,		! 30 bit fixup
%1512%		RLSRABS = 0,		! Don't do any relocation
%1512%		RLSRRH = 1,		! Relocate the right half
%1512%		RLSR30 = 4,		! Relocate the low order 30 bits
%1512%		SYMBOLMAX = 4 * 4,	! Maximum number of data words of 1070
%1512%					!  blocks to buffer up at one time
%1521%	RARGDESC = #1120,	! Octal value for Argument Descriptor Blocks.
%1521%	RCOERCION = #1130,	! Octal value for Coercion Blocks.

!DEFINE VALUES FOR RELOCATION BITS

	RELN =  0,	!NO RELOCATION BITS
	RELRI = 1,	!RELOCATE RIGHT
	RELL = 2,	!RELOCATE LEFT
	RELB = 3,	!RELOCATE BOTH HALVES

![1512] Define values for external psect indices

	PXABS=0,		! Absolute PSECT (no relocation)
	PXLOW=1,		! Low segment
	PXHIGH=2,		! High segment
	PXCODE=1,		! Code, arg blocks
	PXDATA=2,		! Scalars, small arrays
	PXLARGE=3,		! Large arrays

![1512] Define function codes for ZSYMBOL

	LOCDEF = 0,		! Local symbol definition
	LOCSUPDEF = 1,		! Local symbol definition, but
				!  with DDT typeout suppression
	GLBDEF = 2,		! Global symbol definition
	GLBSUPDEF = 3,		! Global symbol definition, but
				!  with DDT typeout suppression
	GLBSYMFIX = 4,		! Add the value of a global symbol to a
				!  symbol's defined value
	GLB18CHNFIX = 5,	! Replace the RH of a location with the
				!  value of a global symbol
	GLB18ADDFIX = 6,	! Add the value of a global symbol to
				!  the RH of a location
	GLB30CHNFIX = 7,	! Replace the low order 30 bits of a location
				!  with the value of a global symbol
	GLB30ADDFIX = 8;	! Add the value of a global symbol to
				!  the low order 30 bits of a location

!DEFINE MACRO TO OUTPUT A CR-LF ON THE LISTING

MACRO CRLF=(CHR_#15; LSTOUT(); CHR_#12; LSTOUT();)$;


%1466%	! Binds for use in the EVALU table for converting internal compiler
%1466%	! type values to LINK values.

BIND
%1466%	TYPLOGICAL=1,
%1466%	TYPINTEGER=2,
%1466%	TYPREAL=4,
%1466%	TYPOCTAL=6,
%1466%	TYPLABEL=7,
%1466%	TYPDOUBLPREC=#10,
%1466%	TYPDBLOCTAL=#12,
%1466%	TYPGFLDBLPREC=#13,
%1466%	TYPCOMPLEX=#14,
%1466%	TYPCHARACTER=#15,
%1466%	TYPHOLLERITH=#17;


%1521%	STRUCTURE RELBUFFER[WORD,POS,SIZE]=	! Structure for buffers
%1521%		(.RELBUFFER+.WORD)<.POS,.SIZE>;

MACRO	! [1521] Macros for accessing argument checking descriptor blocks
	! using structure RELBUFFER.

%1521%	! Categories for rel block
	TPRELTYPE=0,LEFT$,	! Type of rel block.
	TPRELSIZE=0,RIGHT$,	! Size of rel block.
	TPNBITRELOC=1,FULL$,	! N-Bit relocation information.
	TPARBLADD=2,FULL$,	! Argument block address.
	TPASOCCALL=3,FULL$,	! Associated call address.
	TPLDADD=4,FULL$,	! Loading address.
	TPNAMSIZE=5,FULL$,	! Size of subprog name in bytes.
	TPNAME0=6,FULL$,	! 1st word of ASCIZ name.
	TPNAME1=7,FULL$,	! 2nd word of ASCIZ name.
	TPARGCOUNT=RIGHT$,	! Where to put argument count

%1521%	! Flag bits for rel block
	TPCNT=35,1$,	! number of arguments action
	TPWHO=34,1$,	! Main vs subprogram
	TPLOD=33,1$,	! Load descriptor block at loading addr
	TPVAL=32,1$,	! Function, returns value
%1674%	TPSFERR=31,1$,	! Subroutine/Function agreement ERRor action

%1521%	! Fields in argument descriptors
	TPCNV=35,1$,	! Reserved
	TPNUP=34,1$,	! No update (literal, constant or expression)
	TPPAS=31,3$,	! Passing mechanism
	TPCTC=30,1$,	! Compile time constant
	TPTYP=24,6$,	! Argument type code (EVALU)
	TPSTR=18,6$,	! Reserved
%1674%	TPIMPL=17,1$,	! Implicit argument flag
%1674%	TPSND=0,9$,	! Number of secondary descriptors

%1521%	! Fields in secondary descriptors
	TPMCH=33,3$,	! Action for lengths in char 2nd-ary descriptors
	TPSIZ=0,33$,	! Size of character variable in words

	! Misc.
	TPFLEA=5$,	! "Formal =< actual" for secondary descriptor lengths
	TPMIN=6$,	! Magic number for min num of words needed for arg ch.

	! Coercion block fields

	CBTYPE=0,LEFT$,		! Type of coercion block
	CBCOUNT=0,RIGHT$, 	! Count of number of words in coercion blocks
	CBNBIT=1,FULL$;		! N-bit byte Relocation Information

	! What to complain about

BIND
%1674%	CBNOUPDATE = 0,
	CBPAS=1,	! TPPAS, Passing mechanism of variable
	CBTYP=2,	! TPTYP, type of variable being passed
%1566%	CBCONST=3,	! For constants
%1674%	CBNUMARG = 4,	! Number of arguments
%1674%	CBRETVAL = 5,	! Existance of return value
%1674%	CBARGLEN = 6,	! Argument length mismatch

	! Action codes for coercions

	CBWARNING=1,	! LINK should give a warning for this action.
	CBFIXUP=3,	! Perform Fortran fixup for Char to numeric passed.
%1566%	CBNOACTION=4,	! Don't do anything

	! Values for formals, actuals

	PASSADDR=0,	! Pass by address
	PASSDESCR=1;	! Pass by descriptor