annotate docs/ccguide/chap2.chapter @ 530:c43b678c0055

Mainly section structures added.
author roug
date Sat, 12 Oct 2002 12:03:22 +0000
parents 60b821f18853
children 0e84dcd81835
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <chapter>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <title>Characteristics of Compiled Programs</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
3
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
4 <section>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 <title>The Object Code Module</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 <para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
7 The compiler produces position-independent, reentrant 6809 code
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
8 in a standard OS-9 memory module format. The format of an executable
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
9 program module is shown below. Detailed descriptions of each
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 section of the module are given on following pages.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
11 </para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
12 <informalfigure>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
13 <screen>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
14 Module
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
15 Offset
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
16
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
17 +-------------------------------+
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
18 ! !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
19 ! Module Header !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
20 ! !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
21 !-------------------------------!
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
22 ! Execution Offset !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
23 !-------------------------------!
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
24 ! Permanent Storage Size !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
25 !-------------------------------!
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
26 ! Data-text Reference Count !
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
27 v v
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
28 : Data-text Reference Offsets :
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
29 ^ ^
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
30 </screen>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
31 </informalfigure>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
32 <section>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
33 <title>Module Header</title>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
34 <para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
35 This is a standard module header with the type/language byte set to
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
36 $11 (Program + 6809 Object Code), and the attribute/revision byte
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
37 set to $81 (Reentrant + 1).
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
38 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
39 </section>
530
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
40
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
41 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
42 <title>Execution Offset</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
43 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
44 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
45 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
46
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
47 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
48 <title>Storage Size</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
49 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
50 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
51 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
52
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
53 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
54 <title>Module Name</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
55 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
56 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
57 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
58
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
59 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
60 <title>Information</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
61 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
62 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
63 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
64
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
65 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
66 <title>Executable Code</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
67 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
68 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
69 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
70
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
71 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
72 <title>String Literals</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
73 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
74 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
75 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
76
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
77 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
78 <title>Initializing Data and its Size</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
79 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
80 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
81 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
82
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
83 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
84 <title>Data References</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
85 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
86 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
87 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
88 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
89
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
90 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
91 <title>Memory Management</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
92 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
93 The C compiler and its support programs have default conditions
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
94 such that the average programmer need not be concerned with details
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
95 of memory management. However, there are situations where advanced
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
96 programmers may wish to tailor the storage allocation of a program
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
97 for special situations. The following information explains in
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
98 detail how a C program's data area is allocated and used.
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
99 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
100
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
101 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
102 <title>Typical C Program Memory Map</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
103 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
104 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
105 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
106
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
107 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
108 <title>Compile Time Memory Allocation</title>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
109 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
110 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 468
diff changeset
111 </section>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
112 </section>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
113 </chapter>