annotate docs/manual/x584.html @ 215:5330ba70836a

Fix undefined symbol error with pragma nosymbolcase Made symbol tree lookup handle case sensitivity correctly. It is not sufficient to switch which of strcmp and strcasecmp is used to do the lookups. Instead, one must use strcasecmp all the way until a match and then use additional sorting once a match is achieved, if relevant. In this case, a simple linked list of symbols that differ only in case since this is not expected to be a common case.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 13:29:23 -0600
parents 1e0a0e6cd918
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
168
1e0a0e6cd918 Documentation updates
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">
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
2 <HTML
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
3 ><HEAD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
4 ><TITLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
5 >Assembler Modes and Pragmas</TITLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
6 ><META
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
7 NAME="GENERATOR"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
9 REL="HOME"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
10 TITLE="LW Tool Chain"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
11 HREF="index.html"><LINK
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
12 REL="UP"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
13 TITLE="LWASM"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
14 HREF="c45.html"><LINK
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
15 REL="PREVIOUS"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
16 TITLE="Object Files and Sections"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
17 HREF="x520.html"><LINK
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
18 REL="NEXT"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
19 TITLE="LWLINK"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
20 HREF="c662.html"></HEAD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
21 ><BODY
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
22 CLASS="SECTION"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
24 TEXT="#000000"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
25 LINK="#0000FF"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
26 VLINK="#840084"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
27 ALINK="#0000FF"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
28 ><DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
29 CLASS="NAVHEADER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
30 ><TABLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
31 SUMMARY="Header navigation table"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
32 WIDTH="100%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
33 BORDER="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
34 CELLPADDING="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
35 CELLSPACING="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
36 ><TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
37 ><TH
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
38 COLSPAN="3"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
39 ALIGN="center"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
40 >LW Tool Chain</TH
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
41 ></TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
42 ><TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
43 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
44 WIDTH="10%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
45 ALIGN="left"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
46 VALIGN="bottom"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
47 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
48 HREF="x520.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
49 ACCESSKEY="P"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
50 >Prev</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
51 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
52 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
53 WIDTH="80%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
54 ALIGN="center"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
55 VALIGN="bottom"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
56 >Chapter 3. LWASM</TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
57 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
58 WIDTH="10%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
59 ALIGN="right"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
60 VALIGN="bottom"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
61 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
62 HREF="c662.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
63 ACCESSKEY="N"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
64 >Next</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
65 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
66 ></TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
67 ></TABLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
68 ><HR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
69 ALIGN="LEFT"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
70 WIDTH="100%"></DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
71 ><DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
72 CLASS="SECTION"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
73 ><H1
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
74 CLASS="SECTION"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
75 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
76 NAME="AEN584"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
77 >3.10. Assembler Modes and Pragmas</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
78 ></H1
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
79 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
80 >There are a number of options that affect the way assembly is performed.
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
81 Some of these options can only be specified on the command line because
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
82 they determine something absolute about the assembly process. These include
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
83 such things as the output target. Other things may be switchable during
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
84 the assembly process. These are known as pragmas and are, by definition,
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
85 not portable between assemblers.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
86 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
87 >LWASM supports a number of pragmas that affect code generation or
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
88 otherwise affect the behaviour of the assembler. These may be specified by
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
89 way of a command line option or by assembler directives. The directives
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
90 are as follows.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
91 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
92 ></P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
93 ><DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
94 CLASS="VARIABLELIST"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
95 ><DL
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
96 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
97 >PRAGMA <CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
98 CLASS="PARAMETER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
99 >pragma[,...]</CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
100 ></DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
101 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
102 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
103 >Specifies that the assembler should bring into force all <CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
104 CLASS="PARAMETER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
105 >pragma</CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
106 >s
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
107 specified. Any unrecognized pragma will cause an assembly error. The new
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
108 pragmas will take effect immediately. This directive should be used when
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
109 the program will assemble incorrectly if the pragma is ignored or not supported.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
110 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
111 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
112 >*PRAGMA <CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
113 CLASS="PARAMETER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
114 >pragma[,...]</CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
115 ></DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
116 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
117 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
118 >This is identical to the PRAGMA directive except no error will occur with
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
119 unrecognized or unsupported pragmas. This directive, by virtue of starting
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
120 with a comment character, will also be ignored by assemblers that do not
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
121 support this directive. Use this variation if the pragma is not required
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
122 for correct functioning of the code.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
123 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
124 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
125 >*PRAGMAPUSH <CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
126 CLASS="PARAMETER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
127 >pragma[,...]</CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
128 ></DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
129 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
130 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
131 >This directive saves the current state of the specified pragma(s) for later retrieval. See discussion below for more information.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
132 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
133 >This directive will not throw any errors for any reason.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
134 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
135 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
136 >*PRAGMAPOP <CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
137 CLASS="PARAMETER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
138 >pragma[,...]</CODE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
139 ></DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
140 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
141 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
142 >This directive restores the previously saved state of the specified pragma(s). See discussion below for more information.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
143 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
144 >This directive will not throw any errors for any reason.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
145 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
146 ></DL
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
147 ></DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
148 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
149 >Each pragma supported has a positive version and a negative version.
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
150 The positive version enables the pragma while the negative version disables
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
151 it. The negatitve version is simply the positive version with "no" prefixed
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
152 to it. For instance, "pragma" vs. "nopragma". Only the positive version is
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
153 listed below.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
154 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
155 >Pragmas are not case sensitive.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
156 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
157 ></P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
158 ><DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
159 CLASS="VARIABLELIST"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
160 ><DL
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
161 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
162 >index0tonone</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
163 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
164 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
165 >When in force, this pragma enables an optimization affecting indexed addressing
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
166 modes. When the offset expression in an indexed mode evaluates to zero but is
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
167 not explicity written as 0, this will replace the operand with the equivalent
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
168 no offset mode, thus creating slightly faster code. Because of the advantages
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
169 of this optimization, it is enabled by default.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
170 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
171 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
172 >cescapes</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
173 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
174 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
175 >This pragma will cause strings in the FCC, FCS, and FCN pseudo operations to
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
176 have C-style escape sequences interpreted. The one departure from the official
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
177 spec is that unrecognized escape sequences will return either the character
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
178 immediately following the backslash or some undefined value. Do not rely
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
179 on the behaviour of undefined escape sequences.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
180 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
181 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
182 >importundefexport</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
183 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
184 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
185 >This pragma is only valid for targets that support external references. When
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
186 in force, it will cause the EXPORT directive to act as IMPORT if the symbol
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
187 to be exported is not defined. This is provided for compatibility with the
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
188 output of gcc6809 and should not be used in hand written code. Because of
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
189 the confusion this pragma can cause, it is disabled by default.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
190 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
191 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
192 >undefextern</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
193 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
194 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
195 >This pragma is only valid for targets that support external references. When in
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
196 force, if the assembler sees an undefined symbol on the second pass, it will
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
197 automatically define it as an external symbol. This automatic definition will
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
198 apply for the remainder of the assembly process, even if the pragma is
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
199 subsequently turned off. Because this behaviour would be potentially surprising,
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
200 this pragma defaults to off.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
201 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
202 >The primary use for this pragma is for projects that share a large number of
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
203 symbols between source files. In such cases, it is impractical to enumerate
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
204 all the external references in every source file. This allows the assembler
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
205 and linker to do the heavy lifting while not preventing a particular source
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
206 module from defining a local symbol of the same name as an external symbol
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
207 if it does not need the external symbol. (This pragma will not cause an
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
208 automatic external definition if there is already a locally defined symbol.)</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
209 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
210 >This pragma will often be specified on the command line for large projects.
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
211 However, depending on the specific dynamics of the project, it may be sufficient
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
212 for one or two files to use this pragma internally.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
213 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
214 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
215 >dollarlocal</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
216 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
217 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
218 >When set, a "$" in a symbol makes it local. When not set, "$" does not
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
219 cause a symbol to be local. It is set by default except when using the OS9
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
220 target.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
221 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
222 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
223 >dollarnotlocal</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
224 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
225 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
226 > This is the same as the "dollarlocal" pragma except its sense is
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
227 reversed. That is, "dollarlocal" and "nodollarnotlocal" are equivalent and
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
228 "nodollarlocal" and "dollarnotlocal" are equivalent. </P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
229 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
230 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
231 >pcaspcr</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
232 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
233 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
234 > Normally, LWASM makes a distinction between PC and PCR in program
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
235 counter relative addressing. In particular, the use of PC means an absolute
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
236 offset from PC while PCR causes the assembler to calculate the offset to the
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
237 specified operand and use that as the offset from PC. By setting this
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
238 pragma, you can have PC treated the same as PCR. </P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
239 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
240 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
241 >shadow</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
242 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
243 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
244 >When this pragma is in effect, it becomes possible to define a macro
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
245 that matches an internal operation code. Thus, it makes it possible to
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
246 redefine either CPU instructions or pseudo operations. Because this feature
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
247 is of dubious utility, it is disabled by default.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
248 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
249 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
250 >nolist</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
251 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
252 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
253 >Lines where this pragma is in effect will not appear in the assembly
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
254 listing. Also, any symbols defined under this pragma will not show up in
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
255 the symbol list. This is most useful in include files to avoid spamming the
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
256 assembly listing with dozens, hundreds, or thousands of irrelevant
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
257 symbols.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
258 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
259 ><DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
260 >autobranchlength</DT
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
261 ><DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
262 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
263 >One of the perennial annoyances for 6809 programmers is that the
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
264 mneumonics for the short and long branch instructions are different (bxx vs.
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
265 lbxx), which is at odds with the rest of the instruction set. This pragma
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
266 is a solution to those annoying byte overflow errors that short branch
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
267 instructions tend to aquire.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
268 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
269 >When this pragma is in effect, which is not the default, whenever any
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
270 relative branch instruction is used, its size will be automatically
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
271 determined based on the actual distance to the destination. In other words,
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
272 one can write code with long or short branches everywhere and the assembler
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
273 will choose a size for the branch.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
274 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
275 >Also, while this pragma is in effect, the &#62; and &#60; symbols can be used
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
276 to force the branch size, analogous to their use for other instructions with
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
277 &#60; forcing 8 bit offsets and &#62; forcing 16 bit offets.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
278 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
279 >Because this pragma leads to source that is incompatible with other
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
280 assemblers, it is strongly recommended that it be invoked using the PRAGMA
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
281 directive within the source code rather than on the command line or via the
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
282 *PRAGMA directive. This way, an error will be raised if someone tries to
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
283 * assemble the code under a different assembler.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
284 ></DD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
285 ></DL
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
286 ></DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
287 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
288 >As a convenience, each input file has a pragma state stack. This
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
289 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
290 pragma state and then restore it to the precise state it had previously.
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
291 If, at the end of an input file, all pragma states have not been popped,
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
292 they will be removed from the stack. Thus, it is critical to employ
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
293 *PRAGMAPOP correctly. Because each input file has its own pragma stack,
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
294 using *PRAGMAPUSH in one file and *PRAGMAPOP in another file will not
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
295 work.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
296 ><P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
297 >Pragma stacks are more useful in include files, in particular in
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
298 conjunction with the nolist pragma. One can push the state of the nolist
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
299 pragma, engage the nolist pragma, and then pop the state of the nolist
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
300 pragma at the end of the include file. This will cause the entire include
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
301 file to operate under the nolist pragma. However, if the file is included
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
302 while nolist is already engaged, it will not undo that state.</P
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
303 ></DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
304 ><DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
305 CLASS="NAVFOOTER"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
306 ><HR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
307 ALIGN="LEFT"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
308 WIDTH="100%"><TABLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
309 SUMMARY="Footer navigation table"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
310 WIDTH="100%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
311 BORDER="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
312 CELLPADDING="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
313 CELLSPACING="0"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
314 ><TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
315 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
316 WIDTH="33%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
317 ALIGN="left"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
318 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
319 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
320 HREF="x520.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
321 ACCESSKEY="P"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
322 >Prev</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
323 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
324 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
325 WIDTH="34%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
326 ALIGN="center"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
327 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
328 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
329 HREF="index.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
330 ACCESSKEY="H"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
331 >Home</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
332 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
333 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
334 WIDTH="33%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
335 ALIGN="right"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
336 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
337 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
338 HREF="c662.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
339 ACCESSKEY="N"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
340 >Next</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
341 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
342 ></TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
343 ><TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
344 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
345 WIDTH="33%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
346 ALIGN="left"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
347 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
348 >Object Files and Sections</TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
349 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
350 WIDTH="34%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
351 ALIGN="center"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
352 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
353 ><A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
354 HREF="c45.html"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
355 ACCESSKEY="U"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
356 >Up</A
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
357 ></TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
358 ><TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
359 WIDTH="33%"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
360 ALIGN="right"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
361 VALIGN="top"
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
362 >LWLINK</TD
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
363 ></TR
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
364 ></TABLE
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
365 ></DIV
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
366 ></BODY
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
367 ></HTML
1e0a0e6cd918 Documentation updates
lost@l-w.ca
parents:
diff changeset
368 >