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