# 2.11BSD#431 - /usr/src/ucb/PORT/pascal/src/objfmt.h

##### Variables

    display           X
    frtn              X

##### Macros

    AP_OFFSET         X
    CON_INT           X
    DPOFF1            X
    DPOFF2            X
    DSPLYSZ           X
    FBNOFFSET         X
    FDISPOFFSET       X
    FENTRYOFFSET      X
    FP_OFFSET         X
    HEADER_BYTES      X
    INDX              X
    INPUT_OFF         X
    INT_TYP           X
    MAGICNUM          X
    MAXSET            X
    OUTPUT_OFF        X
    PTR_AS            X
    PTR_CON           X
    PTR_DCL           X
    PTR_DUP           X
    PTR_IND           X
    PTR_RV            X
    SHORTADDR         X
    START             X
    TOOMUCH           X

##### struct's

    blockmark         X
    dispsave          X
    formalrtn         X
    hdr               X
    pxhdr             X

##### unions's

    display           X

       1: /*
       2:  * Copyright (c) 1980 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)objfmt.h	5.1 (Berkeley) 6/5/85
       7:  */
       8:
       9: /*
      10:  * The size of the display.
      11:  */
      12: #define DSPLYSZ 20
      13:
      14: /*
      15:  *	The structure of the runtime display
      16:  */
      17: #ifdef OBJ
      18: struct dispsave {
      19:     char *locvars;      /* pointer to local variables */
      20:     struct blockmark *stp;  /* pointer to local stack frame */
      21: };
      22:     /*
      23: 	 * The following union allows fast access to
      24: 	 * precomputed display entries
      25: 	 */
      26: union display {
      27:     struct dispsave frame[DSPLYSZ];
      28:     char *raw[2*DSPLYSZ];
      29: } display;
      30: #endif OBJ
      31: #ifdef PC
      32: #ifdef vax
      33:     /*
      34: 	 *	the display is made up of saved AP's and FP's.
      35: 	 *	FP's are used to find locals,
      36: 	 *	and AP's are used to find parameters.
      37: 	 *	FP and AP are untyped pointers,
      38: 	 *	but are used throughout as (char *).
      39: 	 *	the display is used by adding AP_OFFSET or FP_OFFSET to the
      40: 	 *	address of the approriate display entry.
      41: 	 */
      42:     struct dispsave {
      43:     char    *savedAP;
      44:     char    *savedFP;
      45:     } display[ DSPLYSZ ];
      46:
      47: #   define  AP_OFFSET   ( 0 )
      48: #   define  FP_OFFSET   ( sizeof (char *) )
      49: #endif vax
      50: #ifdef mc68000
      51:     /*
      52: 	 *	the display is just the saved a6.
      53: 	 *	arguments are at positive offsets,
      54: 	 *	locals are at negative offsets.
      55: 	 *	there are no offsets within the saved display structure.
      56: 	 */
      57:     struct dispsave {
      58:     char    *saveda6;
      59:     } display[ DSPLYSZ ];
      60:
      61: #   define  AP_OFFSET   (0)
      62: #   define  FP_OFFSET   (0)
      63: #endif mc68000
      64: #endif PC
      65:
      66:     /*
      67:      *	the structure below describes the block mark used by the architecture.
      68:      *	this is the space used by the machine between the arguments and the
      69:      *	whatever is used to point to the arguments.
      70:      */
      71: #ifdef OBJ
      72: struct blockmark {
      73:     char *tos;      /* pointer to top of stack frame */
      74:     struct iorec *file; /* pointer to active file name */
      75:     struct hdr {
      76:         long framesze;  /* number of bytes of local vars */
      77:         long nargs; /* number of bytes of arguments */
      78:         long tests; /* TRUE => perform runtime tests */
      79:         short offset;   /* offset of procedure in source file */
      80:         char name[1];   /* name of active procedure */
      81:     } *entry;
      82:     struct dispsave odisp;  /* previous display value for this level */
      83:     struct dispsave *dp;    /* pointer to active display entry */
      84:     char *pc;       /* previous location counter */
      85:     long lino;      /* previous line number */
      86: };
      87: #endif OBJ
      88: #ifdef PC
      89: #ifdef vax
      90:     /*
      91: 	 *	since we have the ap pointing to the number of args:
      92: 	 */
      93:     struct blockmark {
      94:         long    nargs;
      95:     };
      96: #endif vax
      97: #ifdef mc68000
      98:     /*
      99: 	 *	there's the saved pc (from the jsr)
     100: 	 *	and the saved a6 (from the link a6).
     101: 	 */
     102:     struct blockmark {
     103:     char    *savedpc;
     104:     char    *saveda6;
     105:     };
     106: #endif mc68000
     107: #endif PC
     108:
     109:     /*
     110:      *	formal routine structure:
     111:      */
     112: struct formalrtn {
     113:     long        (*fentryaddr)();    /* formal entry point */
     114:     long        fbn;            /* block number of function */
     115:     struct dispsave fdisp[ DSPLYSZ ];   /* saved at first passing */
     116: };
     117: #ifndef PC
     118: #ifndef OBJ
     119: struct formalrtn    frtn;
     120: #endif
     121: #endif
     122:
     123: #define FENTRYOFFSET    0
     124: #define FBNOFFSET   ( FENTRYOFFSET + sizeof frtn.fentryaddr )
     125: #define FDISPOFFSET ( FBNOFFSET + sizeof frtn.fbn )
     126:
     127: #ifdef OBJ
     128:     /*
     129: 	 *	the creation time, the size and the magic number of the obj file
     130: 	 */
     131:     struct pxhdr {
     132:         long    maketime;
     133:         long    objsize;
     134:         long    symtabsize;
     135:         short   magicnum;
     136:     };
     137:
     138: /*
     139:  *	START defines the beginning of the text space.
     140:  *	This should be the defined external label "start",
     141:  *	however there is no way to access externals from C
     142:  *	whose names do not begin with an "_".
     143:  */
     144: #ifdef vax
     145: #   define HEADER_BYTES 2048            /* the size of px_header */
     146: #   define START 0x0                /* beginning of text */
     147: #endif vax
     148: #ifdef mc68000
     149: #   define HEADER_BYTES 3072            /* the size of px_header */
     150: #   define START 0x8000             /* beginning of text */
     151: #endif mc68000
     152: #   define INDX 1               /* amt to shift display index */
     153: #endif OBJ
     154:
     155:         /*
     156: 	     *	these are because of varying sizes of pointers
     157: 	     */
     158: #ifdef ADDR16
     159: #	define PTR_AS O_AS2
     160: #	define PTR_RV O_RV2
     161: #	define PTR_IND O_IND2
     162: #	define PTR_CON O_CON2
     163: #	define PTR_DUP O_SDUP2
     164: #	define CON_INT O_CON2
     165: #	define INT_TYP (nl + T2INT)
     166: #	define PTR_DCL char *
     167: #	define TOOMUCH 50000
     168: #	define SHORTADDR 65536
     169: #	define MAXSET 65536       /* maximum set size */
     170: #endif ADDR16
     171: #ifdef ADDR32
     172: #	define PTR_AS O_AS4
     173: #	define PTR_RV O_RV4
     174: #	define PTR_IND O_IND4
     175: #	define PTR_CON O_CON4
     176: #	define PTR_DUP O_SDUP4
     177: #	define CON_INT O_CON24
     178: #	define INT_TYP (nl + T4INT)
     179: #	define PTR_DCL unsigned long      /* for pointer variables */
     180: #	define SHORTADDR 32768            /* maximum short address */
     181: #	define TOOMUCH 65536          /* maximum variable size */
     182: #	define MAXSET 65536           /* maximum set size */
     183: #endif ADDR32
     184:     /*
     185: 	 * Offsets due to the structure of the runtime stack.
     186: 	 * DPOFF1	is the amount of fixed storage in each block allocated
     187: 	 * 		as local variables for the runtime system.
     188: 	 *		since locals are allocated negative offsets,
     189: 	 *		-DPOFF1 is the last used implicit local offset.
     190: 	 * DPOFF2	is the size of the block mark.
     191: 	 *		since arguments are allocated positive offsets,
     192: 	 *		DPOFF2 is the end of the implicit arguments.
     193: 	 *		for obj, the first argument has the highest offset
     194: 	 *		from the stackpointer.  and the block mark is an
     195: 	 *		implicit last parameter.
     196: 	 *		for pc, the first argument has the lowest offset
     197: 	 *		from the argumentpointer.  and the block mark is an
     198: 	 *		implicit first parameter.
     199: 	 */
     200: #	ifdef OBJ
     201: #	    ifdef ADDR32
     202: #		define MAGICNUM 0403 /* obj magic number */
     203: #		define DPOFF1        0
     204: #		define DPOFF2        (sizeof (struct blockmark))
     205: #		define INPUT_OFF -8  /* offset of `input' */
     206: #		define OUTPUT_OFF    -4  /* offset of `output' */
     207: #	    endif ADDR32
     208: #	    ifdef ADDR16
     209: #		define MAGICNUM 0404
     210: #		define DPOFF1        0
     211: #		define DPOFF2        (sizeof (struct blockmark))
     212: #		define INPUT_OFF -2
     213: #		define OUTPUT_OFF    -4
     214: #	    endif ADDR16
     215: #	endif OBJ
     216: #	ifdef PC
     217: #	    define DPOFF1 ( sizeof (struct rtlocals) )
     218: #	    define DPOFF2 ( sizeof (struct blockmark) )
     219: #	    define INPUT_OFF  0
     220: #	    define OUTPUT_OFF 0
     221: #	endif PC

#### Defined variables

display defined in line 59; used 1 times

- in /usr/src/ucb/PORT/pascal/src/call.c line 89

frtn defined in line 119; used 2 times

- in line 124-125(2)

#### Defined struct's

blockmark defined in line 102; used 1 times

- in line 20

dispsave defined in line 57; used 26 times

- in line 27(2), 82-83(4), 115(2)
- in /usr/src/ucb/PORT/pascal/src/fend.c line 605(2), 612(2), 727(2), 848(2), 855(2), 962(2)
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 302(2), 313(2), 324(2)

formalrtn defined in line 112; used 10 times

- in line 119(2)
- in /usr/src/ucb/PORT/pascal/src/call.c line 113(2)
- in /usr/src/ucb/PORT/pascal/src/fend.c line 752(2), 985(2)
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 85(2)

hdr defined in line 75; never used
pxhdr defined in line 131; used 2 times

- in /usr/src/ucb/PORT/pascal/src/yymain.c line 161(2)

#### Defined union's

display defined in line 26; never used

#### Defined macros

AP_OFFSET defined in line 61; used 1 times

- in /usr/src/ucb/PORT/pascal/src/p2put.c line 302

CON_INT defined in line 177; used 2 times

- in /usr/src/ucb/PORT/pascal/src/proc.c line 624, 636

DPOFF1 defined in line 217; used 8 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 624-628(2), 861-865(2)
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 206
- in /usr/src/ucb/PORT/pascal/src/lab.c line 198
- in /usr/src/ucb/PORT/pascal/src/tmps.c line 73-74(2)

DPOFF2 defined in line 218; used 4 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 111
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 335, 508-509(2)

DSPLYSZ defined in line 12; used 10 times

- in line 27-28(2), 45, 59, 115
- in /usr/src/ucb/PORT/pascal/src/fdec.c line 25, 104
- in /usr/src/ucb/PORT/pascal/src/fend.c line 24
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 24, 182

FBNOFFSET defined in line 124; used 1 times

- in line 125

FDISPOFFSET defined in line 125; never used
FENTRYOFFSET defined in line 123; used 3 times

- in line 124
- in /usr/src/ucb/PORT/pascal/src/call.c line 173-174(2)

FP_OFFSET defined in line 62; used 2 times

- in /usr/src/ucb/PORT/pascal/src/p2put.c line 313, 324

HEADER_BYTES defined in line 149; used 18 times

- in /usr/src/ucb/PORT/pascal/src/put.c line 183, 253, 280, 311, 361, 386, 530, 553, 575, 682, 704
- in /usr/src/ucb/PORT/pascal/src/savenl.c line 239, 279
- in /usr/src/ucb/PORT/pascal/src/yymain.c line 137-142(2), 151, 169, 176

INDX defined in line 152; used 48 times

- in /usr/src/ucb/PORT/pascal/src/call.c line 93-95(2), 446-447(2)
- in /usr/src/ucb/PORT/pascal/src/fend.c line 248
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 62, 87
- in /usr/src/ucb/PORT/pascal/src/forop.c line 194, 221, 299-300(2), 312-313(2), 321-322(2), 422-423(2)
- in /usr/src/ucb/PORT/pascal/src/gen.c line 205, 212-217(2)
- in /usr/src/ucb/PORT/pascal/src/lval.c line 123, 179, 199, 238-240(2), 313-315(2), 542-551(3)
- in /usr/src/ucb/PORT/pascal/src/proc.c line 536, 555, 561, 570, 626
- in /usr/src/ucb/PORT/pascal/src/put.c line 197
- in /usr/src/ucb/PORT/pascal/src/rval.c line 146-162(5)
- in /usr/src/ucb/PORT/pascal/src/stat.c line 255, 322
- in /usr/src/ucb/PORT/pascal/src/stkrval.c line 418-430(5)

INPUT_OFF defined in line 219; used 1 times

- in /usr/src/ucb/PORT/pascal/src/nl.c line 345

INT_TYP defined in line 178; used 6 times

- in /usr/src/ucb/PORT/pascal/src/proc.c line 413, 420, 523, 559, 580, 629

MAGICNUM defined in line 209; used 1 times

- in /usr/src/ucb/PORT/pascal/src/yymain.c line 173

MAXSET defined in line 182; never used
OUTPUT_OFF defined in line 220; used 1 times

- in /usr/src/ucb/PORT/pascal/src/nl.c line 346

PTR_AS defined in line 172; used 1 times

- in /usr/src/ucb/PORT/pascal/src/stat.c line 275

PTR_CON defined in line 175; used 2 times

- in /usr/src/ucb/PORT/pascal/src/proc.c line 876, 1082

PTR_DCL defined in line 179; used 13 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 90, 287-288(2), 471
- in /usr/src/ucb/PORT/pascal/src/forop.c line 429
- in /usr/src/ucb/PORT/pascal/src/lab.c line 254
- in /usr/src/ucb/PORT/pascal/src/put.c line 498, 667, 680, 690
- in /usr/src/ucb/PORT/pascal/src/stat.c line 610, 617, 665

PTR_DUP defined in line 176; used 1 times

- in /usr/src/ucb/PORT/pascal/src/stkrval.c line 262

PTR_IND defined in line 174; used 1 times

- in /usr/src/ucb/PORT/pascal/src/lval.c line 205

PTR_RV defined in line 173; used 8 times

- in /usr/src/ucb/PORT/pascal/src/call.c line 95, 446
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 62
- in /usr/src/ucb/PORT/pascal/src/lval.c line 123, 199, 238, 313
- in /usr/src/ucb/PORT/pascal/src/proc.c line 744

SHORTADDR defined in line 180; used 2 times

- in /usr/src/ucb/PORT/pascal/src/put.c line 337(2)

START defined in line 150; never used
TOOMUCH defined in line 181; used 3 times

- in /usr/src/ucb/PORT/pascal/src/type.c line 234-236(3)

#### Usage of this include

objfmt.h used 29 times

- in /usr/src/ucb/PORT/pascal/src/call.c line 15
- in /usr/src/ucb/PORT/pascal/src/cset.c line 15
- in /usr/src/ucb/PORT/pascal/src/fdec.c line 16
- in /usr/src/ucb/PORT/pascal/src/fend.c line 15
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 15
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 15
- in /usr/src/ucb/PORT/pascal/src/forop.c line 16
- in /usr/src/ucb/PORT/pascal/src/gen.c line 19
- in /usr/src/ucb/PORT/pascal/src/lab.c line 15
- in /usr/src/ucb/PORT/pascal/src/lval.c line 15
- in /usr/src/ucb/PORT/pascal/src/main.c line 22
- in /usr/src/ucb/PORT/pascal/src/nl.c line 16
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 20
- in /usr/src/ucb/PORT/pascal/src/pccaseop.c line 19
- in /usr/src/ucb/PORT/pascal/src/pcfunc.c line 18
- in /usr/src/ucb/PORT/pascal/src/pclval.c line 16
- in /usr/src/ucb/PORT/pascal/src/pcproc.c line 18
- in /usr/src/ucb/PORT/pascal/src/proc.c line 19
- in /usr/src/ucb/PORT/pascal/src/put.c line 14
- in /usr/src/ucb/PORT/pascal/src/rval.c line 15
- in /usr/src/ucb/PORT/pascal/src/savenl.c line 45
- in /usr/src/ucb/PORT/pascal/src/stab.c line 21
- in /usr/src/ucb/PORT/pascal/src/stat.c line 14
- in /usr/src/ucb/PORT/pascal/src/stklval.c line 15
- in /usr/src/ucb/PORT/pascal/src/stkrval.c line 15
- in /usr/src/ucb/PORT/pascal/src/tmps.c line 13
- in /usr/src/ucb/PORT/pascal/src/type.c line 14
- in /usr/src/ucb/PORT/pascal/src/var.c line 13
- in /usr/src/ucb/PORT/pascal/src/yymain.c line 16

Last modified: 1986-04-25 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1107 |