annotate docs/manual/x1013.html @ 563:8c6c3363e18e

Update manual to reflect pragma nolistcode and correct nolist semantics
author William Astle <lost@l-w.ca>
date Fri, 01 Dec 2023 21:16:54 -0700
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >Format Specific Linking Notes</TITLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="LWLINK"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c832.html"><LINK
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Linking Scripts"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="x946.html"><LINK
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="Libraries and LWAR"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
20 HREF="c1028.html"></HEAD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="x946.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 4. LWLINK</TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
62 HREF="c1028.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN1013"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >4.4. Format Specific Linking Notes</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >Some formats require special information to be able to generate actual
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
81 binaries. If the specific format you are interested in is not listed in
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
82 this section, then there is nothing special you need to know about to create
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
83 a final binary.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
84 ><DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
85 CLASS="SECTION"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
86 ><H2
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
87 CLASS="SECTION"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
88 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
89 NAME="AEN1016"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
90 >4.4.1. OS9 Modules</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
91 ></H2
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
93 >OS9 modules need to embed several items into the module header. These
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
94 items are the type of module, the langauge of the module, the module
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
95 attributes, the module revision number, the data size (bss), and the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
96 execution offset. These are all either calculated or default to reasonable
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
97 values.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
98 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
99 >The data size is calcuated as the sum of all sections named "bss" or
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
100 ".bss" in all object files that are linked together.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
101 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
102 >The execution offset is calculated from the address of the special
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
103 symbol "__start" which must be an exported (external) symbol in one of the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
104 objects to be linked.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
105 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
106 >The type defaults to "Prgrm" or "Program module". The language
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
107 defaults to "Objct" or "6809 object code". Attributes default to enabling
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
108 the re-entrant flag. And finally, the revision defaults to zero.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
109 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
110 >The embedded module name is the output filename. If the output
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
111 filename includes more than just the filename, this will probably not be
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
112 what you want.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
113 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
114 >The type, language, attributes, revision, and module name can all be
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
115 overridden by providing a special section in exactly one of the object files
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
116 to be linked. This section is called "__os9" (note the two underscores).
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
117 To override the type, language, attributes, or revision values, define a
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
118 non-exported symbol in this section called "type", "lang", "attr", or "rev"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
119 respectively. Any other symbols defined are ignored. To override the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
120 module name, include as the only actual code in the section a NUL terminated
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
121 string (the FCN directive is useful for this). If there is no code in the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
122 section or it beings with a NUL, the default name will be used. Any of the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
123 preceeding that are not defined in the special section will retain their
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
124 default values.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
125 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
126 >The built-in link script for OS9 modules will place the following
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
127 sections, in order, in the module: "code", ".text", "data", ".data". It
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
128 will merge all sections with the name "bss" or ".bss" into the "data"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
129 section. All other section names are ignored. What this means is that you
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
130 must define your data variables in the a section called "bss" or ".bss" even
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
131 though you will be refencing them all as offsets from U. This does have the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
132 unpleasant side effect that all BSS references will end up being 16 bit
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
133 offsets because the assembler cannot know what the offset will be once the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
134 linker is finished its work. Thus, if the tightest possible code is
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
135 required, having LWASM directly output the module is a better choice.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
136 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
137 >While the built-in link script is probably sufficient for most
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
138 purposes, you can provide your own script. If you provide a custom link
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
139 script, you must start your code and data sections at location 000D to
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
140 accommodate the module header. Otherwise, you will have an incorrect
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
141 location for the execution offset. You must use the ENTRY directive in the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
142 script to define the entry point for the module.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
143 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
144 >It should also be obvious from the above that you cannot mix the bss
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
145 (rmb) definitions with the module code when linking separately. Those
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
146 familiar with typical module creation will probably find this an unpleasant
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
147 difference but it is unavoidable.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
148 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
149 >It should also be noted that direct page references should also be
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
150 avoided because you cannot know ahead of time whether the linker is going to
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
151 end up putting a particular variable in the first 256 bytes of the module's
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
152 data space. If, however, you know for certain you will have less than 256
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
153 bytes of defined data space across all of the object files that will be
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
154 linked, you can instead use forced DP addressing for your data addresses
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
155 instead of the ,u notation. When linking with 3rd party libraries, this
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
156 practice should be avoided. Also, when creating libraries, always use the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
157 offset from U technique.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
158 ></DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
159 ></DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
160 ><DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
161 CLASS="NAVFOOTER"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
162 ><HR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
163 ALIGN="LEFT"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
164 WIDTH="100%"><TABLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
165 SUMMARY="Footer navigation table"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
166 WIDTH="100%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
167 BORDER="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
168 CELLPADDING="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
169 CELLSPACING="0"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
170 ><TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
171 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
172 WIDTH="33%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
173 ALIGN="left"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
174 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
175 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
176 HREF="x946.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
177 ACCESSKEY="P"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
178 >Prev</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
179 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
180 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
181 WIDTH="34%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
182 ALIGN="center"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
183 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
184 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
185 HREF="index.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
186 ACCESSKEY="H"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
187 >Home</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
188 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
189 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
190 WIDTH="33%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
191 ALIGN="right"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
192 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
193 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
194 HREF="c1028.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
195 ACCESSKEY="N"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
196 >Next</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
197 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
198 ></TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
199 ><TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
200 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
201 WIDTH="33%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
202 ALIGN="left"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
203 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
204 >Linking Scripts</TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
205 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
206 WIDTH="34%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
207 ALIGN="center"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
208 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
209 ><A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
210 HREF="c832.html"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
211 ACCESSKEY="U"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
212 >Up</A
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
213 ></TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
214 ><TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
215 WIDTH="33%"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
216 ALIGN="right"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
217 VALIGN="top"
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
218 >Libraries and LWAR</TD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
219 ></TR
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
220 ></TABLE
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
221 ></DIV
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
222 ></BODY
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
223 ></HTML
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents:
diff changeset
224 >