|
|
1.1 root 1: .th "80.out" 5 "March 1,1977"
2: .sh NAME
3: 80.out \*- assembler and link editor output
4: .sh DESCRIPTION
5: .it "80.out"
6: is the output file of the assembler
7: .it "as80"
8: and the link editor
9: .it "ld80".
10: Both programs make
11: .it "80.out"
12: executable if there were no
13: errors and no unresolved external references.
14: .s3
15: .it 80.out
16: has five sections:
17: header, text, data, relocation information and a symbol table (in that order).
18: The last two sections may be empty if the program was loaded with
19: the ``\*-b'', ``\*-d'' or ``\*-t'' option of
20: .it ld80.
21: .s1
22: (Constants beginning with `0' are octal values.)
23: .s3
24: .it HEADER
25: .s3
26: The header always contains 040 bytes:
27: .lp +10 8
28: Address Contents
29: .lp +10 8
30: (octal)
31: .s1
32: .lp +10 8
33: 0-1 Magic number (0413)
34: .lp +10 8
35: 2-3 Size of text segment
36: .lp +10 8
37: 4-5 Size of data segment
38: .lp +10 8
39: 6-7 Size of bss segment
40: .lp +10 8
41: 10-11 Size of symbol table
42: .lp +10 8
43: 12-13 Load origin of text segment
44: .lp +10 8
45: 14-15 Load origin of data segment
46: .lp +10 8
47: 16-20 Load origin of bss segment
48: .lp +10 8
49: 20-21 Size of relocation table
50: .lp +10 8
51: 22-23 A word of flags
52: .lp +10 8
53: 24-37 Padding
54: .s3
55: .i0
56: The size of each segment is in bytes.
57: The size of the header is not included in any of the other sizes.
58: .s3
59: The flag values are:
60: .lp +20 7
61: Bit Meaning
62: .lp +20 7
63: 0 If set, no relocation information is present.
64: .i0
65: .s3
66: The start of the text segment in the file is 040,
67: the start of the data is (040 + text size),
68: the start of the relocation is (040 + text + data size),
69: and the start of the symbol table is (040 + text size + data size + relocation size).
70: .s3
71: .it "RELOCATION INFORMATION"
72: .s3
73: The relocation information (if present)
74: occupies one or two bytes for each byte or word of text or data.
75: The bits of the relocation word (or byte) are:
76: .s3
77: .lp +10 8
78: Bit Meaning
79: .s3
80: .lp +10 8
81: 6-15 Symbol number in symbol table for external references.
82: The firat symbol is numbered 0.
83: .lp +10 8
84: 5 High-byte flag: If set, the next byte of text or data is to be treated as the high
85: order byte of a 16-bit quantity for relocation purposes.
86: .lp +10 8
87: 4 Two-byte flag: If set, the next two bytes of text or data are to be
88: treated as a 16-bit quantity for relocation purposes.
89: .lp +10 8
90: 3 External flag: If set, bits 15-6 contain a symbol number, otherwise, only one byte
91: of relocation information is present.
92: .lp +10 8
93: 0-2 Segment information:
94: .lp +20 5
95: 0 absolute
96: .lp +20 5
97: 1 text
98: .lp +20 5
99: 2 data
100: .lp +20 5
101: 3 bss
102: .i0
103: .s3
104: .sh "SEE ALSO"
105: "as80" (I), "ld80" (I), "nm80" (I)
106: .s3
107: .it "SYMBOL TABLE"
108: .s1
109: The symbol table entries consist of six words:
110: .s3
111: .lp +10 8
112: Word Meaning
113: .s1
114: .lp 1-4 The first four words contain the left justified, null-padded ASCII symbol name.
115: .lp +10 8
116: The fifth word is a flag indicating the type of the symbol.
117: The following values are possible:
118: .lp +20 5
119: 00 undefined
120: .lp +20 5
121: 01 absolute
122: .lp +20 5
123: 02 text
124: .lp +20 5
125: 03 data
126: .lp +20 5
127: 04 bss
128: .lp +20 5
129: 05 file name symbol (produced by ld80)
130: .lp +20 5
131: 010 undefined external
132: .lp +20 5
133: 011 absolute external
134: .lp +20 5
135: 012 text segment external
136: .lp +20 5
137: 013 data segment external
138: .lp +20 5
139: 014 bss segment external
140: .lp +10 8
141: 6 The sixth word is the value of the symbol.
142: .i0
143: .s3
144: The sixth word of a symbol table entry contains the value of the symbol.
145: .s3
146: .s3
147: The value of a word in the text or data portions which is not
148: a reference to an undefined external symbol
149: is exactly that value which will appear in core
150: when the file is executed.
151: If a word in the text or data portion
152: involves a reference to an undefined external symbol,
153: as indicated by the relocation bits
154: for that word,
155: then the value of the word as stored in the file
156: is an offset from the associated external symbol.
157: When the file is processed by the
158: link editor and the external symbol becomes
159: defined, the value of the symbol will
160: be added into the word in the file.
161: .s3
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.