xref: /original-bsd/usr.bin/pascal/src/objfmt.h (revision 6c57d260)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 /* static char sccsid[] = "@(#)objfmt.h 1.6 03/10/81"; */
4 
5 #ifdef OBJ
6 	/*
7 	 *	the creation time, the size and the magic number of the obj file
8 	 */
9     struct pxhdr {
10 	    long	maketime;
11 	    long	objsize;
12 	    short	magicnum;
13     };
14 
15 #   define	HEADER_BYTES	1024		/* the size of px_header */
16 #   define PX_HEADER "/usr/lib/px_header"	/* px_header's name */
17 #   define PI_COMP "/usr/ucb/pi"		/* the compiler's name */
18 #   define PX_INTRP "/usr/ucb/px"		/* the interpreter's name */
19 #   define INDX 1				/* amt to shift display index */
20 #endif OBJ
21 
22     /*
23      *	the file of error messages created by mkstr
24      */
25 #ifdef OBJ
26 #   define	ERR_STRNGS	"/usr/lib/pi2.0strings"
27 #   define	ERR_PATHLEN	9
28 #   define	HOW_STRNGS	"/usr/lib/how_pi\0"
29 #   define	HOW_PATHLEN	9
30 #endif OBJ
31 #ifdef PC
32 #   define	ERR_STRNGS	"/usr/lib/pc2.0strings"
33 #   define	ERR_PATHLEN	9
34 #   define	HOW_STRNGS	"/usr/lib/how_pc\0"
35 #   define	HOW_PATHLEN	9
36 #endif PC
37 
38 	    /*
39 	     *	these are because of varying sizes of pointers
40 	     */
41 #ifdef VAX
42 #	define PTR_AS O_AS4
43 #	define PTR_RV O_RV4
44 #	define PTR_IND O_IND4
45 #	define PTR_CON O_CON4
46 #	define PTR_DUP O_SDUP4
47 #	define CON_INT O_CON24
48 #	define INT_TYP (nl + T4INT)
49 #	define PTR_DCL unsigned long		/* for pointer variables */
50 #	define SHORTADDR 32768			/* maximum short address */
51 #	define TOOMUCH 65536			/* maximum variable size */
52 #	define MAXSET 65536			/* maximum set size */
53 	    /*
54 	     * Offsets due to the structure of the runtime stack.
55 	     * DPOFF1	is the amount of fixed storage in each block allocated
56 	     * 		as local variables for the runtime system.
57 	     *		since locals are allocated negative offsets,
58 	     *		-DPOFF1 is the last used implicit local offset.
59 	     * DPOFF2	is the size of the block mark.
60 	     *		since arguments are allocated positive offsets,
61 	     *		DPOFF2 is the end of the implicit arguments.
62 	     *		for obj, the first argument has the highest offset
63 	     *		from the stackpointer.  and the block mark is an
64 	     *		implicit last parameter.
65 	     *		for pc, the first argument has the lowest offset
66 	     *		from the argumentpointer.  and the block mark is an
67 	     *		implicit first parameter.
68 	     */
69 #	ifdef OBJ
70 #	    define DPOFF1		0
71 #	    define DPOFF2		32
72 #	    define INPUT_OFF		-8	/* offset of `input' */
73 #	    define OUTPUT_OFF		-4	/* offset of `output' */
74 #	endif OBJ
75 #	ifdef	PC
76 #	    define DPOFF1	( sizeof rtlocs - sizeof rtlocs.unwind )
77 #	    define DPOFF2	( sizeof (long) )
78 #	    define INPUT_OFF	0
79 #	    define OUTPUT_OFF	0
80 #	endif PC
81 #	define MAGICNUM 0403			/* obj magic number */
82 #endif VAX
83 
84 #ifdef PDP11
85 #	define PTR_AS O_AS2
86 #	define PTR_RV O_RV2
87 #	define PTR_IND O_IND2
88 #	define PTR_CON O_CON2
89 #	define PTR_DUP O_SDUP2
90 #	define CON_INT O_CON2
91 #	define INT_TYP (nl + T2INT)
92 #	define PTR_DCL char *
93 #	define TOOMUCH 50000
94 #	define SHORTADDR 65536
95 #	define MAXSET 65536		/* maximum set size */
96 #	define DPOFF1 0
97 #	define DPOFF2 18		/* sizeof(struct stack) */
98 #	define INPUT_OFF -2
99 #	define OUTPUT_OFF -4
100 #	define MAGICNUM 0404
101 #endif PDP11
102