annotate docs/manual/manual.html.orig @ 463:42be9eec7935

Make pcr relative forward references better able to select 8 bit offsets
author William Astle <lost@l-w.ca>
date Wed, 28 Feb 2018 23:00:59 -0700
parents cad5937314cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
455
cad5937314cb Add operandsizewarning pragma
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">
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >LW Tool Chain</TITLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
9 ><BODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
10 CLASS="BOOK"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
11 BGCOLOR="#FFFFFF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
12 TEXT="#000000"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
13 LINK="#0000FF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
14 VLINK="#840084"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
15 ALINK="#0000FF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
16 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
17 CLASS="BOOK"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
18 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
19 NAME="AEN1"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
20 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="TITLEPAGE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
23 ><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
24 CLASS="TITLE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
25 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
26 NAME="AEN2"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
27 >LW Tool Chain</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ></H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
29 ><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
30 CLASS="AUTHOR"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
31 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
32 NAME="AEN4"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
33 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
34 >William Astle</H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
35 ><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
36 CLASS="AUTHOR"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
38 NAME="AEN7"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LWTools Contributors </H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
42 CLASS="COPYRIGHT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
43 >Copyright &copy; 2009-2015 William Astle and LWTools contributors</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
44 ><HR></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
46 CLASS="TOC"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
48 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ><B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Table of Contents</B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
53 >1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
54 HREF="#AEN13"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
55 >Introduction</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
56 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
58 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
60 >1.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
61 HREF="#AEN16"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
62 >History</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
64 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
67 >2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
68 HREF="#AEN21"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
69 >Output Formats</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
70 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
72 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
74 >2.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
75 HREF="#AEN24"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
76 >Raw Binaries</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
77 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
79 >2.2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
80 HREF="#AEN27"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
81 >DECB Binaries</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
82 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
83 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
84 >2.3. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
85 HREF="#AEN32"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
86 >ASCII Hexadecimal</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
87 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
88 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
89 >2.4. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
90 HREF="#AEN36"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
91 >Motorola S-Record</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
93 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
94 >2.5. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
95 HREF="#AEN41"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
96 >Intel Hex</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
97 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
98 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
99 >2.6. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
100 HREF="#AEN46"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
101 >OS9 Modules</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
102 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
103 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
104 >2.7. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
105 HREF="#AEN54"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
106 >Object Files</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
107 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
108 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
109 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
110 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
111 >3. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
112 HREF="#AEN62"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
113 >LWASM</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
114 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
115 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
116 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
117 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
118 >3.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
119 HREF="#AEN65"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
120 >Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
121 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
122 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
123 >3.2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
124 HREF="#AEN218"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
125 >Dialects</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
126 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
127 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
128 >3.3. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
129 HREF="#AEN227"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
130 >Source Format</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
131 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
132 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
133 >3.4. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
134 HREF="#AEN237"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
135 >Symbols</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
136 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
137 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
138 >3.5. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
139 HREF="#AEN242"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
140 >Numbers and Expressions</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
141 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
142 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
143 >3.6. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
144 HREF="#AEN250"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
145 >Assembler Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
146 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
147 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
148 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
149 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
150 >3.6.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
151 HREF="#AEN253"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
152 >Data Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
153 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
154 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
155 >3.6.2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
156 HREF="#AEN364"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
157 >Address Definition</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
158 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
159 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
160 >3.6.3. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
161 HREF="#AEN415"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
162 >Conditional Assembly</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
163 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
164 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
165 >3.6.4. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
166 HREF="#AEN486"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
167 >OS9 Target Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
168 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
169 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
170 >3.6.5. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
171 HREF="#AEN511"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
172 >Miscelaneous Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
173 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
174 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
175 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
176 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
177 >3.7. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
178 HREF="#AEN551"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
179 >Macros</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
180 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
181 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
182 >3.8. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
183 HREF="#AEN574"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
184 >Structures</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
185 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
186 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
187 >3.9. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
188 HREF="#AEN595"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
189 >Object Files and Sections</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
190 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
191 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
192 >3.10. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
193 HREF="#AEN659"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
194 >Assembler Modes and Pragmas</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
195 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
196 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
197 >3.11. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
198 HREF="#CONVINST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
199 >Convenience Instructions</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
200 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
201 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
202 >3.12. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
203 HREF="#AEN805"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
204 >Cycle Counts</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
205 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
206 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
207 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
208 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
209 >4. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
210 HREF="#AEN811"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
211 >LWLINK</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
212 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
213 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
214 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
215 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
216 >4.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
217 HREF="#AEN814"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
218 >Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
219 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
220 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
221 >4.2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
222 HREF="#AEN911"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
223 >Linker Operation</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
224 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
225 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
226 >4.3. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
227 HREF="#AEN925"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
228 >Linking Scripts</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
229 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
230 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
231 >4.4. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
232 HREF="#AEN991"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
233 >Format Specific Linking Notes</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
234 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
235 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
236 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
237 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
238 >4.4.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
239 HREF="#AEN994"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
240 >OS9 Modules</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
241 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
242 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
243 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
244 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
245 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
246 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
247 >5. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
248 HREF="#AEN1006"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
249 >Libraries and LWAR</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
250 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
251 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
252 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
253 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
254 >5.1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
255 HREF="#AEN1010"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
256 >Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
257 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
258 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
259 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
260 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
261 >6. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
262 HREF="#OBJCHAP"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
263 >Object Files</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
264 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
265 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
266 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
267 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
268 CLASS="LOT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
269 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
270 CLASS="LOT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
271 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
272 ><B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
273 >List of Tables</B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
274 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
275 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
276 >6-1. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
277 HREF="#AEN1093"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
278 >Object File Term Types</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
279 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
280 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
281 >6-2. <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
282 HREF="#AEN1123"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
283 >Object File Operator Numbers</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
284 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
285 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
286 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
287 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
288 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
289 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
290 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
291 NAME="AEN13"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
292 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
293 >Chapter 1. Introduction</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
294 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
295 >The LW tool chain provides utilities for building binaries for MC6809 and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
296 HD6309 CPUs. The tool chain includes a cross-assembler and a cross-linker
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
297 which support several styles of output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
298 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
299 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
300 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
301 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
302 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
303 NAME="AEN16"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
304 >1.1. History</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
305 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
306 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
307 >For a long time, I have had an interest in creating an operating system for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
308 the Coco3. I finally started working on that project around the beginning of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
309 2006. I had a number of assemblers I could choose from. Eventually, I settled
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
310 on one and started tinkering. After a while, I realized that assembler was not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
311 going to be sufficient due to lack of macros and issues with forward references.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
312 Then I tried another which handled forward references correctly but still did
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
313 not support macros. I looked around at other assemblers and they all lacked
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
314 one feature or another that I really wanted for creating my operating system.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
315 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
316 >The solution seemed clear at that point. I am a fair programmer so I figured
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
317 I could write an assembler that would do everything I wanted an assembler to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
318 do. Thus the LWASM probject was born. After more than two years of on and off
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
319 work, version 1.0 of LWASM was released in October of 2008.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
320 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
321 >As the aforementioned operating system project progressed further, it became
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
322 clear that while assembling the whole project through a single file was doable,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
323 it was not practical. When I found myself playing some fancy games with macros
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
324 in a bid to simulate sections, I realized I needed a means of assembling
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
325 source files separately and linking them later. This spawned a major development
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
326 effort to add an object file support to LWASM. It also spawned the LWLINK
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
327 project to provide a means to actually link the files.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
328 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
329 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
330 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
331 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
332 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
333 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
334 NAME="AEN21"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
335 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
336 >Chapter 2. Output Formats</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
337 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
338 >The LW tool chain supports multiple output formats. Each format has its
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
339 advantages and disadvantages. Each format is described below.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
340 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
341 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
342 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
343 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
344 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
345 NAME="AEN24"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
346 >2.1. Raw Binaries</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
347 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
348 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
349 >A raw binary is simply a string of bytes. There are no headers or other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
350 niceties. Both LWLINK and LWASM support generating raw binaries. ORG directives
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
351 in the source code only serve to set the addresses that will be used for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
352 symbols but otherwise have no direct impact on the resulting binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
353 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
354 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
355 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
356 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
357 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
358 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
359 NAME="AEN27"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
360 >2.2. DECB Binaries</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
361 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
362 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
363 >A DECB binary is compatible with the LOADM command in Disk Extended
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
364 Color Basic on the CoCo. They are also compatible with CLOADM from Extended
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
365 Color Basic. These binaries include the load address of the binary as well
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
366 as encoding an execution address. These binaries may contain multiple loadable
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
367 sections, each of which has its own load address.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
368 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
369 >Each binary starts with a preamble. Each preamble is five bytes long. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
370 first byte is zero. The next two bytes specify the number of bytes to load
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
371 and the last two bytes specify the address to load the bytes at. Then, a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
372 string of bytes follows. After this string of bytes, there may be another
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
373 preamble or a postamble. A postamble is also five bytes in length. The first
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
374 byte of the postamble is $FF, the next two are zero, and the last two are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
375 the execution address for the binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
376 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
377 >Both LWASM and LWLINK can output this format.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
378 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
379 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
380 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
381 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
382 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
383 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
384 NAME="AEN32"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
385 >2.3. ASCII Hexadecimal</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
386 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
387 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
388 >This human-readable ASCII hexadecimal format consists of CR+LF terminated
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
389 lines of ASCII text. Each line has the following structure: a zero-padded
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
390 four-digit ASCII hex address, a colon separator, and one or more zero-padded
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
391 two-digit hex values separated by commas. ASCII Hexadecimal format favors
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
392 paragraph-aligned addresses (i.e. a least significant address nybble value
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
393 of zero). During output, the number of hex values on each line are adjusted
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
394 to align the address of the next line on a paragraph boundary. The sequence
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
395 of addresses in the ASCII Hexadecimal file directly follows that of the source
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
396 file; multiple ORG directives in the source code may result in out-of-sequence
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
397 addresses in the ASCII Hexadecimal output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
398 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
399 >LWASM can output this format since version 4.10.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
400 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
401 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
402 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
403 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
404 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
405 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
406 NAME="AEN36"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
407 >2.4. Motorola S-Record</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
408 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
409 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
410 >This ASCII format consists of a series of CR+LF terminated "records" of ASCII
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
411 text. Each record has the following structure: a start-of-record character
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
412 "S", an ASCII record type digit (0-9), a two-digit ASCII hex byte count, a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
413 four-digit ASCII hex address, an optional sequence of two-digit ASCII hex data
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
414 values, and a two-digit ASCII hex checksum. The LW tool chain issues only S0,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
415 S1, S5 and S9 record types. S1 records are limited to maximum of 16 data bytes
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
416 in length, and paragraph alignment of addresses is favored. The address
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
417 sequence of the S-Records directly follows that of the source file; multiple
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
418 ORG directives in the source code may result in out-of-sequence addresses in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
419 the S-Record output. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
420 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
421 >Motorola S-Record format is a standard ASCII format accepted by most memory
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
422 device programming equipment. It is particularly useful when the assembled
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
423 code output is destined to reside within an EPROM or Flash memory device,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
424 for example.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
425 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
426 >LWASM can output this format since version 4.10. LWLINK can output this format
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
427 since version 4.11.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
428 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
429 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
430 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
431 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
432 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
433 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
434 NAME="AEN41"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
435 >2.5. Intel Hex</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
436 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
437 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
438 >This ASCII format consists of a series of CR+LF terminated "records" of ASCII
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
439 text. Each record has the following structure: a start-of-record character
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
440 ":", a two-digit ASCII hex byte count, a four-digit ASCII hex address, a two-
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
441 digit ASCII hex record type, an optional sequence of two-digit ASCII hex data
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
442 values, and a two-digit ASCII hex checksum. The LW tool chain issues only 00,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
443 and 01 Intel Hex record types. Data records are limited to maximum of 16
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
444 data bytes in length, and paragraph alignment of addresses is favored. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
445 address sequence of the Intel hex records directly follows that of the source
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
446 file; multiple ORG directives in the source code may result in out-of-sequence
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
447 addresses in the Intel Hex output. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
448 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
449 >Intel Hex format is the other standard ASCII format accepted by most memory
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
450 device programming equipment, it and the Motorola S-Record format are used for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
451 similar purposes.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
452 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
453 >LWASM can output this format since version 4.10.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
454 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
455 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
456 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
457 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
458 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
459 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
460 NAME="AEN46"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
461 >2.6. OS9 Modules</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
462 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
463 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
464 >&#13;Since version 2.5, LWASM is able to generate OS9 modules. The syntax is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
465 basically the same as for other assemblers. A module starts with the MOD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
466 directive and ends with the EMOD directive. The OS9 directive is provided
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
467 as a shortcut for writing system calls.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
468 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
469 >&#13;LWASM does NOT provide an OS9Defs file. You must provide your own. Also note
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
470 that the common practice of using "ifp1" around the inclusion of the OS9Defs
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
471 file is discouraged as it is pointless and can lead to unintentional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
472 problems and phasing errors. Because LWASM reads each file exactly once,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
473 there is no benefit to restricting the inclusion to the first assembly pass.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
474 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
475 >&#13;As of version 4.5, LWASM also implements the standard data/code address
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
476 streams for OS9 modules. That means that between MOD and EMOD, any RMB,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
477 RMD, RMQ, or equivalent directives will move the data address ahead and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
478 leave the code address unmodified. Outside of an actual module, both the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
479 code and data addresses are moved ahead equally. That last bit is critical
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
480 to understand because it means any directives that follow an EMOD directive
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
481 may have different results than other assemblers.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
482 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
483 >&#13;Additionally, within a module body, the ORG directive sets only the data
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
484 address, not the code address. However, outside a module body, ORG sets both
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
485 addresses.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
486 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
487 >Both code and data addresses are reset to 0 by the MOD directive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
488 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
489 >&#13;As of version 4.5, LWLINK also supports creation of OS9 modules.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
490 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
491 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
492 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
493 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
494 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
495 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
496 NAME="AEN54"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
497 >2.7. Object Files</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
498 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
499 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
500 >LWASM supports generating a proprietary object file format which is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
501 described in <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
502 HREF="#OBJCHAP"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
503 >Chapter 6</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
504 >. LWLINK is then used to link these
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
505 object files into a final binary in any of LWLINK's supported binary
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
506 formats.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
507 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
508 >Object files also support the concept of sections which are not valid
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
509 for other output types. This allows related code from each object file
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
510 linked to be collapsed together in the final binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
511 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
512 >Object files are very flexible in that they allow references that are not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
513 known at assembly time to be resolved at link time. However, because the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
514 addresses of such references are not known at assembly time, there is no way
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
515 for the assembler to deduce that an eight bit addressing mode is possible.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
516 That means the assember will default to using sixteen bit addressing
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
517 whenever an external or cross-section reference is used.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
518 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
519 >As of LWASM 2.4, it is possible to force direct page addressing for an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
520 external reference. Care must be taken to ensure the resulting addresses
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
521 are really in the direct page since the linker does not know what the direct
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
522 page is supposed to be and does not emit errors for byte overflows.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
523 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
524 >It is also possible to use external references in an eight bit immediate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
525 mode instruction. In this case, only the low order eight bits will be used.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
526 Again, no byte overflows will be flagged.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
527 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
528 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
529 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
530 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
531 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
532 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
533 NAME="AEN62"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
534 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
535 >Chapter 3. LWASM</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
536 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
537 >The LWTOOLS assembler is called LWASM. This chapter documents the various
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
538 features of the assembler. It is not, however, a tutorial on 6x09 assembly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
539 language programming.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
540 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
541 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
542 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
543 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
544 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
545 NAME="AEN65"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
546 >3.1. Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
547 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
548 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
549 >The binary for LWASM is called "lwasm". Note that the binary is in lower
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
550 case. lwasm takes the following command line arguments.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
551 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
552 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
553 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
554 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
555 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
556 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
557 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
558 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
559 >--6309</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
560 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
561 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
562 >-3</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
563 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
564 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
565 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
566 >This will cause the assembler to accept the additional instructions available
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
567 on the 6309 processor. This is the default mode; this option is provided for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
568 completeness and to override preset command arguments.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
569 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
570 >This option is the same as if the first line of the source code is "PRAGMA 6309".</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
571 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
572 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
573 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
574 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
575 >--6800compat</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
576 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
577 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
578 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
579 >This is equivalent to <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
580 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
581 >--pragma=6800compat</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
582 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
583 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
584 >This will enable recognition of 6800 compatibility instructions.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
585 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
586 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
587 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
588 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
589 >--6809</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
590 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
591 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
592 >-9</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
593 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
594 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
595 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
596 >This will cause the assembler to reject instructions that are only available
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
597 on the 6309 processor. This actually has the effect of starting the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
598 as though the first line of the source is "PRAGMA 6809".</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
599 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
600 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
601 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
602 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
603 >--decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
604 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
605 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
606 >-b</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
607 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
608 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
609 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
610 >Select the DECB output format target. Equivalent to <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
611 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
612 >--format=decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
613 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
614 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
615 >While this is the default output format currently, it is not safe to rely
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
616 on that fact. Future versions may have different defaults. It is also trivial
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
617 to modify the source code to change the default. Thus, it is recommended to specify
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
618 this option if you need DECB output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
619 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
620 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
621 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
622 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
623 >--format=type</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
624 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
625 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
626 >-f type</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
627 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
628 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
629 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
630 >Select the output format. Valid values are <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
631 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
632 >obj</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
633 > for the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
634 object file target, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
635 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
636 >decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
637 > for the DECB LOADM format,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
638 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
639 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
640 >os9</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
641 > for creating OS9 modules, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
642 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
643 >raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
644 > for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
645 a raw binary, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
646 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
647 >hex</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
648 > for ASCII hexadecminal format,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
649 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
650 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
651 >srec</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
652 > for Motorola S-Record format, and <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
653 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
654 >ihex</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
655 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
656 for Intel Hex format.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
657 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
658 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
659 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
660 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
661 >--list[=file]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
662 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
663 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
664 >-l[file]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
665 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
666 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
667 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
668 >Cause LWASM to generate a listing. If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
669 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
670 >file</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
671 > is specified,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
672 the listing will go to that file. Otherwise it will go to the standard output
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
673 stream. By default, no listing is generated. Unless <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
674 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
675 >--symbols</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
676 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
677 is specified, the list will not include the symbol table.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
678 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
679 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
680 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
681 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
682 >--symbols</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
683 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
684 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
685 >-s</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
686 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
687 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
688 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
689 >Causes LWASM to generate a list of symbols when generating a listing.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
690 It has no effect unless a listing is being generated.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
691 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
692 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
693 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
694 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
695 >--symbols-nolocals</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
696 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
697 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
698 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
699 >Behaves just like <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
700 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
701 >--symbols</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
702 > but with local labels omitted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
703 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
704 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
705 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
706 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
707 >--map=FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
708 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
709 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
710 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
711 >&#13;This option generates a map file which can be used by debuggers and monitors to provide symbol information. A map file may be created independent of a listing file. (Patches are pending for MAME and exec09.)&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
712 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
713 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
714 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
715 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
716 >--obj</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
717 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
718 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
719 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
720 >Select the proprietary object file format as the output target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
721 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
722 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
723 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
724 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
725 >--output=FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
726 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
727 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
728 >-o FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
729 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
730 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
731 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
732 >This option specifies the name of the output file. If not specified, the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
733 default is <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
734 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
735 >a.out</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
736 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
737 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
738 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
739 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
740 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
741 >--pragma=pragma</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
742 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
743 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
744 >-p pragma</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
745 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
746 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
747 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
748 >Specify assembler pragmas. Multiple pragmas are separated by commas. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
749 pragmas accepted are the same as for the PRAGMA assembler directive described
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
750 below.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
751 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
752 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
753 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
754 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
755 >--raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
756 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
757 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
758 >-r</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
759 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
760 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
761 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
762 >Select raw binary as the output target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
763 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
764 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
765 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
766 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
767 >--includedir=path</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
768 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
769 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
770 >-I path</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
771 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
772 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
773 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
774 >Add <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
775 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
776 >path</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
777 > to the end of the include path.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
778 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
779 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
780 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
781 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
782 >--define=SYM[=VAL]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
783 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
784 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
785 >-D SYM[=VAL]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
786 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
787 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
788 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
789 >Pre-defines the symbol SYM as either the specified VAL. If VAL is omitted,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
790 the symbol is defined as 1. The symbol will be defined as though it were
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
791 defined using the SET directive in the assembly source. That means it can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
792 be overridden by a SET directive within the source code. Attempting to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
793 redefine SYM using EQU will result in a multiply defined symbol error.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
794 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
795 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
796 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
797 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
798 >-t WIDTH</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
799 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
800 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
801 >--tabs=WIDTH</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
802 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
803 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
804 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
805 >Specifies the handling of tabs in listing files. <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
806 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
807 >--tabs=0</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
808 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
809 disables tab expansion. <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
810 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
811 >--tabs=8</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
812 > is the default setting.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
813 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
814 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
815 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
816 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
817 >--help</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
818 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
819 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
820 >-?</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
821 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
822 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
823 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
824 >Present a help screen describing the command line options.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
825 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
826 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
827 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
828 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
829 >--usage</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
830 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
831 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
832 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
833 >Provide a summary of the command line options.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
834 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
835 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
836 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
837 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
838 >--version</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
839 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
840 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
841 >-V</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
842 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
843 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
844 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
845 >Display the software version.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
846 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
847 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
848 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
849 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
850 >--debug</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
851 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
852 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
853 >-d</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
854 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
855 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
856 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
857 >Increase the debugging level. Only really useful to people hacking on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
858 LWASM source code itself.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
859 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
860 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
861 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
862 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
863 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
864 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
865 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
866 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
867 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
868 NAME="AEN218"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
869 >3.2. Dialects</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
870 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
871 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
872 > LWASM supports all documented MC6809 instructions as defined by
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
873 Motorola. By default, this does not include any MC6800 compatibility
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
874 instructions. As of LWASM 4.11, those compatibility instructions can be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
875 enabled using the <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
876 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
877 >--6800compat</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
878 > option or the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
879 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
880 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
881 >6800compat</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
882 > pragma. It also supports all known HD6309
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
883 instructions. While there is general agreement on the pneumonics for most
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
884 of the 6309 instructions, there is some variance with the block transfer
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
885 instructions. TFM for all four variations seems to have gained the most
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
886 traction and, thus, this is the form that is recommended for LWASM.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
887 However, it also supports COPY, COPY-, IMP, EXP, TFRP, TFRM, TFRS, and TFRR.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
888 It further adds COPY+ as a synomym for COPY, IMPLODE for IMP, and EXPAND for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
889 EXP. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
890 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
891 >By default, LWASM accepts 6309 instructions. However, using the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
892 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
893 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
894 >--6809</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
895 > parameter, you can cause it to throw errors on
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
896 6309 instructions instead.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
897 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
898 >The standard addressing mode specifiers are supported. These are the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
899 hash sign ("#") for immediate mode, the less than sign ("&lt;") for forced
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
900 eight bit modes, and the greater than sign ("&gt;") for forced sixteen bit modes.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
901 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
902 >Additionally, LWASM supports using the asterisk ("*") to indicate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
903 base page addressing. This should not be used in hand-written source code,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
904 however, because it is non-standard and may or may not be present in future
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
905 versions of LWASM.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
906 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
907 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
908 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
909 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
910 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
911 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
912 NAME="AEN227"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
913 >3.3. Source Format</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
914 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
915 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
916 >LWASM accepts plain text files in a relatively free form. It can handle
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
917 lines terminated with CR, LF, CRLF, or LFCR which means it should be able
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
918 to assemble files on any platform on which it compiles.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
919 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
920 >Each line may start with a symbol. If a symbol is present, there must not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
921 be any whitespace preceding it. It is legal for a line to contain nothing
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
922 but a symbol.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
923 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
924 >The op code is separated from the symbol by whitespace. If there is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
925 no symbol, there must be at least one white space character preceding it.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
926 If applicable, the operand follows separated by whitespace. Following the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
927 opcode and operand is an optional comment.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
928 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
929 > It is important to note that operands cannot contain any whitespace
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
930 except in the case of delimited strings. This is because the first
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
931 whitespace character will be interpreted as the separator between the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
932 operand column and the comment. This behaviour is required for approximate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
933 source compatibility with other 6x09 assemblers. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
934 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
935 >A comment can also be introduced with a * or a ;. The comment character is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
936 optional for end of statement comments. However, if a symbol is the only
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
937 thing present on the line other than the comment, the comment character is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
938 mandatory to prevent the assembler from interpreting the comment as an opcode.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
939 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
940 >For compatibility with the output generated by some C preprocessors, LWASM
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
941 will also ignore lines that begin with a #. This should not be used as a general
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
942 comment character, however.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
943 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
944 >The opcode is not treated case sensitively. Neither are register names in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
945 the operand fields. Symbols, however, are case sensitive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
946 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
947 > As of version 2.6, LWASM supports files with line numbers. If line
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
948 numbers are present, the line must start with a digit. The line number
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
949 itself must consist only of digits. The line number must then be followed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
950 by either the end of the line or exactly one white space character. After
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
951 that white space character, the lines are interpreted exactly as above. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
952 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
953 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
954 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
955 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
956 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
957 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
958 NAME="AEN237"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
959 >3.4. Symbols</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
960 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
961 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
962 >Symbols have no length restriction. They may contain letters, numbers, dots,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
963 dollar signs, and underscores. They must start with a letter, dot, or
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
964 underscore.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
965 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
966 >LWASM also supports the concept of a local symbol. A local symbol is one
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
967 which contains either a "?" or a "@", which can appear anywhere in the symbol.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
968 The scope of a local symbol is determined by a number of factors. First,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
969 each included file gets its own local symbol scope. A blank line will also
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
970 be considered a local scope barrier. Macros each have their own local symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
971 scope as well (which has a side effect that you cannot use a local symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
972 as an argument to a macro). There are other factors as well. In general,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
973 a local symbol is restricted to the block of code it is defined within.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
974 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
975 >By default, unless assembling to the os9 target, a "$" in the symbol will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
976 also make it local. This can be controlled by the "dollarlocal" and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
977 "nodollarlocal" pragmas. In the absence of a pragma to the contrary, for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
978 the os9 target, a "$" in the symbol will not make it considered local while
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
979 for all other targets it will.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
980 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
981 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
982 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
983 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
984 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
985 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
986 NAME="AEN242"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
987 >3.5. Numbers and Expressions</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
988 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
989 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
990 >&#13;Numbers can be expressed in binary, octal, decimal, or hexadecimal. Binary
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
991 numbers may be prefixed with a "%" symbol or suffixed with a "b" or "B".
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
992 Octal numbers may be prefixed with "@" or suffixed with "Q", "q", "O", or
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
993 "o". Hexadecimal numbers may be prefixed with "$", "0x" or "0X", or suffixed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
994 with "H". No prefix or suffix is required for decimal numbers but they can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
995 be prefixed with "&amp;" if desired. Any constant which begins with a letter
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
996 must be expressed with the correct prefix base identifier or be prefixed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
997 with a 0. Thus hexadecimal FF would have to be written either 0FFH or $FF.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
998 Numbers are not case sensitive.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
999 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1000 > A symbol may appear at any point where a number is acceptable. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1001 special symbol "*" can be used to represent the starting address of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1002 current source line within expressions. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1003 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1004 >The ASCII value of a character can be included by prefixing it with a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1005 single quote ('). The ASCII values of two characters can be included by
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1006 prefixing the characters with a quote (").</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1007 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1008 >&#13;LWASM supports the following basic binary operators: +, -, *, /, and %.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1009 These represent addition, subtraction, multiplication, division, and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1010 modulus. It also supports unary negation and unary 1's complement (- and ^
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1011 respectively). It is also possible to use ~ for the unary 1's complement
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1012 operator. For completeness, a unary positive (+) is supported though it is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1013 a no-op. LWASM also supports using |, &#38;, and ^ for bitwise or, bitwise and,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1014 and bitwise exclusive or respectively.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1015 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1016 >&#13;Operator precedence follows the usual rules. Multiplication, division, and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1017 modulus take precedence over addition and subtraction. Unary operators take
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1018 precedence over binary operators. Bitwise operators are lower precdence
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1019 than addition and subtraction. To force a specific order of evaluation,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1020 parentheses can be used in the usual manner.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1021 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1022 >&#13;As of LWASM 2.5, the operators &#38;&#38; and || are recognized for boolean and and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1023 boolean or respectively. They will return either 0 or 1 (false or true).
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1024 They have the lowest precedence of all the binary operators.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1025 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1026 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1027 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1028 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1029 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1030 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1031 NAME="AEN250"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1032 >3.6. Assembler Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1033 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1034 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1035 >Various directives can be used to control the behaviour of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1036 assembler or to include non-code/data in the resulting output. Those directives
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1037 that are not described in detail in other sections of this document are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1038 described below.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1039 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1040 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1041 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1042 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1043 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1044 NAME="AEN253"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1045 >3.6.1. Data Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1046 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1047 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1048 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1049 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1050 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1051 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1052 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1053 >FCB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1054 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1055 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1056 >, .DB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1057 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1058 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1059 >, .BYTE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1060 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1061 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1062 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1063 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1064 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1065 >Include one or more constant bytes (separated by commas) in the output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1066 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1067 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1068 >FDB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1069 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1070 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1071 >, .DW <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1072 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1073 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1074 >, .WORD <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1075 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1076 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1077 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1078 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1079 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1080 >Include one or more words (separated by commas) in the output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1081 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1082 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1083 >FQB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1084 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1085 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1086 >, .QUAD <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1087 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1088 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1089 >, .4BYTE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1090 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1091 >expr[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1092 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1093 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1094 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1095 >Include one or more double words (separated by commas) in the output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1096 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1097 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1098 >FCC <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1099 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1100 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1101 >, .ASCII <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1102 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1103 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1104 >, .STR <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1105 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1106 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1107 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1108 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1109 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1110 >Include a string of text in the output. The first character of the operand
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1111 is the delimiter which must appear as the last character and cannot appear
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1112 within the string. The string is included with no modifications&#62;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1113 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1114 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1115 >FCN <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1116 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1117 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1118 >, .ASCIZ <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1119 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1120 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1121 >, .STRZ <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1122 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1123 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1124 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1125 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1126 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1127 >Include a NUL terminated string of text in the output. The first character of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1128 the operand is the delimiter which must appear as the last character and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1129 cannot appear within the string. A NUL byte is automatically appended to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1130 the string.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1131 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1132 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1133 >FCS <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1134 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1135 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1136 >, .ASCIS <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1137 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1138 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1139 >, .STRS <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1140 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1141 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1142 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1143 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1144 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1145 >Include a string of text in the output with bit 7 of the final byte set. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1146 first character of the operand is the delimiter which must appear as the last
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1147 character and cannot appear within the string.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1148 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1149 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1150 >ZMB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1151 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1152 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1153 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1154 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1155 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1156 >Include a number of NUL bytes in the output. The number must be fully resolvable
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1157 during pass 1 of assembly so no forward or external references are permitted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1158 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1159 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1160 >ZMD <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1161 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1162 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1163 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1164 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1165 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1166 >Include a number of zero words in the output. The number must be fully
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1167 resolvable during pass 1 of assembly so no forward or external references are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1168 permitted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1169 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1170 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1171 >ZMQ <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1172 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1173 >expr<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1174 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1175 ></CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1176 ></CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1177 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1178 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1179 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1180 >Include a number of zero double-words in the output. The number must be fully
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1181 resolvable during pass 1 of assembly so no forward or external references are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1182 permitted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1183 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1184 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1185 >RMB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1186 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1187 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1188 >, .BLKB <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1189 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1190 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1191 >, .DS <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1192 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1193 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1194 >, .RS <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1195 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1196 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1197 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1198 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1199 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1200 >Reserve a number of bytes in the output. The number must be fully resolvable
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1201 during pass 1 of assembly so no forward or external references are permitted.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1202 The value of the bytes is undefined.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1203 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1204 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1205 >RMD <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1206 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1207 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1208 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1209 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1210 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1211 >Reserve a number of words in the output. The number must be fully
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1212 resolvable during pass 1 of assembly so no forward or external references are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1213 permitted. The value of the words is undefined.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1214 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1215 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1216 >RMQ <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1217 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1218 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1219 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1220 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1221 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1222 >Reserve a number of double-words in the output. The number must be fully
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1223 resolvable during pass 1 of assembly so no forward or external references are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1224 permitted. The value of the double-words is undefined.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1225 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1226 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1227 >INCLUDEBIN <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1228 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1229 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1230 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1231 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1232 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1233 >Treat the contents of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1234 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1235 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1236 > as a string of bytes to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1237 be included literally at the current assembly point. This has the same effect
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1238 as converting the file contents to a series of FCB statements and including
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1239 those at the current assembly point.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1240 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1241 > If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1242 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1243 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1244 > beings with a /, the file name
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1245 will be taken as absolute. Otherwise, the current directory will be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1246 searched followed by the search path in the order specified.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1247 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1248 > Please note that absolute path detection including drive letters will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1249 not function correctly on Windows platforms. Non-absolute inclusion will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1250 work, however.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1251 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1252 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1253 >FILL <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1254 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1255 >byte</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1256 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1257 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1258 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1259 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1260 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1261 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1262 >Insert <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1263 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1264 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1265 > bytes of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1266 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1267 >byte</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1268 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1269 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1270 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1271 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1272 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1273 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1274 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1275 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1276 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1277 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1278 NAME="AEN364"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1279 >3.6.2. Address Definition</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1280 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1281 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1282 >The directives in this section all control the addresses of symbols
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1283 or the assembly process itself.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1284 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1285 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1286 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1287 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1288 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1289 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1290 >ORG <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1291 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1292 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1293 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1294 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1295 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1296 >Set the assembly address. The address must be fully resolvable on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1297 first pass so no external or forward references are permitted. ORG is not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1298 permitted within sections when outputting to object files. For target formats
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1299 that include address information (decb, hex, srec, and ihex), an ORG
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1300 directive will re-start the address sequence within the output. When using
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1301 the raw target format, ORG is used only to determine the addresses of symbols.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1302 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1303 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1304 >REORG</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1305 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1306 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1307 >Sets the assembly address to the value it had immediately prior to the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1308 previous ORG statement. It is used to continue assembly after some
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1309 specification that required an additional ORG. This directive is primarily
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1310 intended for MACRO-80c compatibility. Consider using alternatives in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1311 modern code.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1312 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1313 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1314 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1315 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1316 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1317 > EQU <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1318 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1319 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1320 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1321 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1322 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1323 > = <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1324 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1325 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1326 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1327 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1328 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1329 >Define the value of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1330 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1331 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1332 > to be <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1333 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1334 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1335 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1336 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1337 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1338 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1339 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1340 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1341 > SET <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1342 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1343 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1344 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1345 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1346 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1347 >Define the value of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1348 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1349 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1350 > to be <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1351 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1352 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1353 >.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1354 Unlike EQU, SET permits symbols to be defined multiple times as long as SET
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1355 is used for all instances. Use of the symbol before the first SET statement
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1356 that sets its value is undefined.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1357 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1358 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1359 >SETDP <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1360 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1361 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1362 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1363 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1364 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1365 >Inform the assembler that it can assume the DP register contains
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1366 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1367 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1368 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1369 >. This directive is only advice to the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1370 to determine whether an address is in the direct page and has no effect
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1371 on the contents of the DP register. The value must be fully resolved during
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1372 the first assembly pass because it affects the sizes of subsequent instructions.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1373 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1374 >This directive has no effect in the object file target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1375 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1376 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1377 >ALIGN <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1378 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1379 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1380 >[,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1381 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1382 >value</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1383 >]</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1384 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1385 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1386 >Force the current assembly address to be a multiple of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1387 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1388 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1389 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1390 >. If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1391 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1392 >value</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1393 > is not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1394 specified, a series of NUL bytes is output to force the alignment, if
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1395 required. Otherwise, the low order 8 bits of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1396 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1397 >value</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1398 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1399 will be used as the fill. The alignment value must be fully resolved on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1400 first pass because it affects the addresses of subsquent instructions.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1401 However, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1402 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1403 >value</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1404 > may include forward references; as
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1405 long as it resolves to a constant for the second pass, the value will be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1406 accepted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1407 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1408 >Unless <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1409 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1410 >value</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1411 > is specified as something like $12,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1412 this directive is not suitable for inclusion in the middle of actual code.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1413 The default padding value is $00 which is intended to be used within data
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1414 blocks. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1415 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1416 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1417 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1418 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1419 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1420 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1421 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1422 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1423 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1424 NAME="AEN415"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1425 >3.6.3. Conditional Assembly</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1426 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1427 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1428 >Portions of the source code can be excluded or included based on conditions
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1429 known at assembly time. Conditionals can be nested arbitrarily deeply. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1430 directives associated with conditional assembly are described in this section.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1431 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1432 >All conditionals must be fully bracketed. That is, every conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1433 statement must eventually be followed by an ENDC at the same level of nesting.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1434 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1435 >Conditional expressions are only evaluated on the first assembly pass.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1436 It is not possible to game the assembly process by having a conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1437 change its value between assembly passes. Due to the underlying architecture
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1438 of LWASM, there is no possible utility to IFP1 and IFP2, nor can they, as of LWASM 3.0, actually
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1439 be implemented meaningfully. Thus there is not and never will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1440 be any equivalent of IFP1 or IFP2 as provided by other assemblers. Use of those opcodes
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1441 will throw a warning and be ignored.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1442 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1443 >It is important to note that if a conditional does not resolve to a constant
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1444 during the first parsing pass, an error will be thrown. This is unavoidable because the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1445 must make a decision about which source to include and which source to exclude at this stage.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1446 Thus, expressions that work normally elsewhere will not work for conditions.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1447 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1448 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1449 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1450 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1451 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1452 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1453 >IFEQ <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1454 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1455 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1456 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1457 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1458 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1459 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1460 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1461 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1462 > evaluates to zero, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1463 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1464 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1465 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1466 >IFNE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1467 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1468 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1469 >, IF <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1470 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1471 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1472 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1473 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1474 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1475 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1476 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1477 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1478 > evaluates to a non-zero value, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1479 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1480 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1481 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1482 >IFGT <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1483 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1484 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1485 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1486 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1487 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1488 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1489 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1490 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1491 > evaluates to a value greater than zero, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1492 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1493 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1494 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1495 >IFGE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1496 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1497 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1498 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1499 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1500 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1501 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1502 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1503 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1504 > evaluates to a value greater than or equal to zero, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1505 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1506 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1507 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1508 >IFLT <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1509 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1510 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1511 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1512 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1513 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1514 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1515 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1516 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1517 > evaluates to a value less than zero, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1518 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1519 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1520 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1521 >IFLE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1522 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1523 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1524 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1525 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1526 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1527 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1528 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1529 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1530 > evaluates to a value less than or equal to zero , the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1531 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1532 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1533 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1534 >IFDEF <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1535 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1536 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1537 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1538 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1539 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1540 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1541 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1542 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1543 > is defined at this point in the assembly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1544 process, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1545 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1546 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1547 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1548 >IFPRAGMA <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1549 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1550 >pragma</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1551 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1552 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1553 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1554 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1555 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1556 >pragma</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1557 > is in effect, the condition will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1558 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1559 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1560 >IFNDEF <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1561 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1562 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1563 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1564 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1565 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1566 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1567 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1568 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1569 > is not defined at this point in the assembly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1570 process, the conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1571 will be considered true.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1572 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1573 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1574 >ELSE</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1575 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1576 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1577 >If the preceding conditional at the same level of nesting was false, the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1578 statements following will be assembled. If the preceding conditional at
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1579 the same level was true, the statements following will not be assembled.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1580 Note that the preceding conditional might have been another ELSE statement
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1581 although this behaviour is not guaranteed to be supported in future versions
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1582 of LWASM.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1583 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1584 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1585 >ENDC</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1586 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1587 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1588 >This directive marks the end of a conditional construct. Every conditional
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1589 construct must end with an ENDC directive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1590 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1591 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1592 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1593 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1594 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1595 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1596 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1597 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1598 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1599 NAME="AEN486"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1600 >3.6.4. OS9 Target Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1601 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1602 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1603 >This section includes directives that apply solely to the OS9
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1604 target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1605 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1606 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1607 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1608 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1609 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1610 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1611 >OS9 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1612 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1613 >syscall</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1614 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1615 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1616 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1617 >&#13;This directive generates a call to the specified system call. <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1618 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1619 >syscall</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1620 > may be an arbitrary expression.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1621 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1622 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1623 >MOD <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1624 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1625 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1626 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1627 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1628 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1629 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1630 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1631 >type</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1632 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1633 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1634 >flags</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1635 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1636 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1637 >execoff</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1638 >,<CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1639 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1640 >datasize</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1641 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1642 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1643 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1644 >&#13;This tells LWASM that the beginning of the actual module is here. It will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1645 generate a module header based on the parameters specified. It will also
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1646 begin calcuating the module CRC.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1647 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1648 >&#13;The precise meaning of the various parameters is beyond the scope of this
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1649 document since it is not a tutorial on OS9 module programming.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1650 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1651 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1652 >EMOD</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1653 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1654 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1655 >&#13;This marks the end of a module and causes LWASM to emit the calculated CRC
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1656 for the module.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1657 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1658 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1659 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1660 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1661 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1662 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1663 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1664 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1665 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1666 NAME="AEN511"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1667 >3.6.5. Miscelaneous Directives</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1668 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1669 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1670 >This section includes directives that do not fit into the other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1671 categories.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1672 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1673 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1674 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1675 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1676 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1677 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1678 >INCLUDE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1679 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1680 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1681 >, USE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1682 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1683 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1684 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1685 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1686 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1687 > Include the contents of <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1688 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1689 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1690 > at
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1691 this point in the assembly as though it were a part of the file currently
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1692 being processed. Note that if whitespace appears in the name of the file,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1693 you must enclose <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1694 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1695 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1696 > in quotes.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1697 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1698 >Note that the USE variation is provided only for compatibility with other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1699 assemblers. It is recommended to use the INCLUDE variation.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1700 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1701 >If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1702 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1703 >filename</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1704 > begins with a &quot;/&quot;, it is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1705 interpreted as an absolute path. If it does not, the search path will be used
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1706 to find the file. First, the directory containing the file that contains this
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1707 directive. (Includes within an included file are relative to the included file,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1708 not the file that included it.) If the file is not found there, the include path
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1709 is searched. If it is still not found, an error will be thrown. Note that the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1710 current directory as understood by your shell or operating system is not searched.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1711 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1712 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1713 >END <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1714 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1715 >[expr]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1716 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1717 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1718 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1719 >This directive causes the assembler to stop assembling immediately as though
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1720 it ran out of input. For the DECB target only, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1721 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1722 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1723 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1724 can be used to set the execution address of the resulting binary. For all
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1725 other targets, specifying <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1726 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1727 >expr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1728 > will cause an error.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1729 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1730 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1731 >ERROR <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1732 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1733 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1734 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1735 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1736 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1737 >Causes a custom error message to be printed at this line. This will cause
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1738 assembly to fail. This directive is most useful inside conditional constructs
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1739 to cause assembly to fail if some condition that is known bad happens. Everything
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1740 from the directive to the end of the line is considered the error message.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1741 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1742 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1743 >WARNING <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1744 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1745 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1746 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1747 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1748 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1749 >Causes a custom warning message to be printed at this line. This will not cause
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1750 assembly to fail. This directive is most useful inside conditional constructs
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1751 or include files to alert the programmer to a deprecated feature being used
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1752 or some other condition that may cause trouble later, but which may, in fact,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1753 not cause any trouble.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1754 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1755 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1756 >.MODULE <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1757 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1758 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1759 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1760 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1761 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1762 >This directive is ignored for most output targets. If the output target
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1763 supports encoding a module name into it, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1764 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1765 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1766 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1767 will be used as the module name.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1768 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1769 >As of version 3.0, no supported output targets support this directive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1770 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1771 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1772 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1773 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1774 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1775 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1776 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1777 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1778 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1779 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1780 NAME="AEN551"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1781 >3.7. Macros</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1782 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1783 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1784 >LWASM is a macro assembler. A macro is simply a name that stands in for a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1785 series of instructions. Once a macro is defined, it is used like any other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1786 assembler directive. Defining a macro can be considered equivalent to adding
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1787 additional assembler directives.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1788 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1789 >Macros may accept parameters. These parameters are referenced within a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1790 macro by the a backslash ("\") followed by a digit 1 through 9 for the first
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1791 through ninth parameters. They may also be referenced by enclosing the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1792 decimal parameter number in braces ("{num}"). The special expansion "\*"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1793 translates to the exact parameter string, including all parameters, passed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1794 to the macro. These parameter references are replaced with the verbatim text
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1795 of the parameter passed to the macro. A reference to a non-existent
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1796 parameter will be replaced by an empty string. Macro parameters are expanded
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1797 everywhere on each source line. That means the parameter to a macro could be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1798 used as a symbol or it could even appear in a comment or could cause an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1799 entire source line to be commented out when the macro is expanded. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1800 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1801 >Parameters passed to a macro are separated by commas and the parameter list
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1802 is terminated by any whitespace. This means that neither a comma nor whitespace
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1803 may be included in a macro parameter.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1804 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1805 >Macro expansion is done recursively. That is, within a macro, macros are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1806 expanded. This can lead to infinite loops in macro expansion. If the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1807 hangs for a long time while assembling a file that uses macros, this may be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1808 the reason.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1809 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1810 >Each macro expansion receives its own local symbol context which is not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1811 inherited by any macros called by it nor is it inherited from the context
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1812 the macro was instantiated in. That means it is possible to use local symbols
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1813 within macros without having them collide with symbols in other macros or
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1814 outside the macro itself. However, this also means that using a local symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1815 as a parameter to a macro, while legal, will not do what it would seem to do
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1816 as it will result in looking up the local symbol in the macro's symbol context
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1817 rather than the enclosing context where it came from, likely yielding either
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1818 an undefined symbol error or bizarre assembly results.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1819 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1820 >Note that there is no way to define a macro as local to a symbol context. All
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1821 macros are part of the global macro namespace. However, macros have a separate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1822 namespace from symbols so it is possible to have a symbol with the same name
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1823 as a macro.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1824 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1825 >Macros are defined only during the first pass. Macro expansion also
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1826 only occurs during the first pass. On the second pass, the macro
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1827 definition is simply ignored. Macros must be defined before they are used.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1828 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1829 >The following directives are used when defining macros.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1830 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1831 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1832 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1833 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1834 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1835 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1836 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1837 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1838 >macroname</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1839 > MACRO [NOEXPAND]</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1840 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1841 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1842 >This directive is used to being the definition of a macro called
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1843 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1844 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1845 >macroname</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1846 >. If <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1847 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1848 >macroname</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1849 > already
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1850 exists, it is considered an error. Attempting to define a macro within a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1851 macro is undefined. It may work and it may not so the behaviour should not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1852 be relied upon.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1853 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1854 >If NOEXPAND is specified, the macro will not be expanded in a program
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1855 listing. Instead, all bytes emitted by all instructions within the macro
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1856 will appear to be emitted on the line where the macro is invoked, starting
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1857 at the address of the line of the invokation. If the macro uses ORG or other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1858 directives that define symbols or change the assembly address, these things
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1859 will also be hidden (except in the symbol table) and the output bytes will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1860 appear with incorrect address attribution. Thus, NOEXPAND should only be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1861 used for macros that do not mess with the assembly address or otherwise
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1862 define symbols that should be visible.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1863 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1864 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1865 >ENDM</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1866 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1867 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1868 >This directive indicates the end of the macro currently being defined. It
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1869 causes the assembler to resume interpreting source lines as normal.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1870 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1871 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1872 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1873 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1874 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1875 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1876 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1877 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1878 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1879 NAME="AEN574"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1880 >3.8. Structures</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1881 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1882 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1883 >&#13;Structures are used to group related data in a fixed structure. A structure
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1884 consists a number of fields, defined in sequential order and which take up
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1885 specified size. The assembler does not enforce any means of access within a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1886 structure; it assumes that whatever you are doing, you intended to do.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1887 There are two pseudo ops that are used for defining structures.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1888 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1889 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1890 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1891 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1892 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1893 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1894 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1895 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1896 >structname</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1897 > STRUCT</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1898 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1899 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1900 >&#13;This directive is used to begin the definition of a structure with name
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1901 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1902 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1903 >structname</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1904 >. Subsequent statements all form part of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1905 the structure definition until the end of the structure is declared.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1906 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1907 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1908 >ENDSTRUCT, ENDS</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1909 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1910 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1911 >This directive ends the definition of the structure. ENDSTRUCT is the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1912 preferred form. Prior to version 3.0 of LWASM, ENDS was used to end a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1913 section instead of a structure.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1914 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1915 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1916 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1917 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1918 >&#13;Within a structure definition, only reservation pseudo ops are permitted.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1919 Anything else will cause an assembly error.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1920 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1921 > Once a structure is defined, you can reserve an area of memory in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1922 same structure by using the structure name as the opcode. Structures can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1923 also contain fields that are themselves structures. See the example
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1924 below.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1925 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1926 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1927 >tstruct2 STRUCT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1928 f1 rmb 1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1929 f2 rmb 1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1930 ENDSTRUCT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1931
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1932 tstruct STRUCT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1933 field1 rmb 2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1934 field2 rmb 3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1935 field3 tstruct2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1936 ENDSTRUCT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1937
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1938 ORG $2000
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1939 var1 tstruct
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1940 var2 tstruct2</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1941 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1942 >Fields are referenced using a dot (.) as a separator. To refer to the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1943 generic offset within a structure, use the structure name to the left of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1944 dot. If referring to a field within an actual variable, use the variable's
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1945 symbol name to the left of the dot.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1946 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1947 >You can also refer to the actual size of a structure (or a variable
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1948 declared as a structure) using the special symbol sizeof{structname} where
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1949 structname will be the name of the structure or the name of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1950 variable.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1951 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1952 >Essentially, structures are a shortcut for defining a vast number of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1953 symbols. When a structure is defined, the assembler creates symbols for the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1954 various fields in the form structname.fieldname as well as the appropriate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1955 sizeof{structname} symbol. When a variable is declared as a structure, the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1956 assembler does the same thing using the name of the variable. You will see
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1957 these symbols in the symbol table when the assembler is instructed to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1958 provide a listing. For instance, the above listing will create the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1959 following symbols (symbol values in parentheses): tstruct2.f1 (0),
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1960 tstruct2.f2 (1), sizeof{tstruct2} (2), tstruct.field1 (0), tstruct.field2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1961 (2), tstruct.field3 (5), tstruct.field3.f1 (5), tstruct.field3.f2 (6),
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1962 sizeof{tstruct.field3} (2), sizeof{tstruct} (7), var1 {$2000}, var1.field1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1963 {$2000}, var1.field2 {$2002}, var1.field3 {$2005}, var1.field3.f1 {$2005},
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1964 var1.field3.f2 {$2006}, sizeof(var1.field3} (2), sizeof{var1} (7), var2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1965 ($2007), var2.f1 ($2007), var2.f2 ($2008), sizeof{var2} (2). </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1966 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1967 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1968 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1969 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1970 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1971 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1972 NAME="AEN595"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1973 >3.9. Object Files and Sections</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1974 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1975 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1976 >The object file target is very useful for large project because it allows
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1977 multiple files to be assembled independently and then linked into the final
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1978 binary at a later time. It allows only the small portion of the project
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1979 that was modified to be re-assembled rather than requiring the entire set
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1980 of source code to be available to the assembler in a single assembly process.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1981 This can be particularly important if there are a large number of macros,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1982 symbol definitions, or other metadata that uses resources at assembly time.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1983 By far the largest benefit, however, is keeping the source files small enough
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1984 for a mere mortal to find things in them.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1985 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1986 >With multi-file projects, there needs to be a means of resolving references to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1987 symbols in other source files. These are known as external references. The
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1988 addresses of these symbols cannot be known until the linker joins all the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1989 object files into a single binary. This means that the assembler must be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1990 able to output the object code without knowing the value of the symbol. This
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1991 places some restrictions on the code generated by the assembler. For
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1992 example, the assembler cannot generate direct page addressing for instructions
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1993 that reference external symbols because the address of the symbol may not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1994 be in the direct page. Similarly, relative branches and PC relative addressing
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1995 cannot be used in their eight bit forms. Everything that must be resolved
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1996 by the linker must be assembled to use the largest address size possible to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1997 allow the linker to fill in the correct value at link time. Note that the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1998 same problem applies to absolute address references as well, even those in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
1999 the same source file, because the address is not known until link time.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2000 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2001 >It is often desired in multi-file projects to have code of various types grouped
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2002 together in the final binary generated by the linker as well. The same applies
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2003 to data. In order for the linker to do that, the bits that are to be grouped
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2004 must be tagged in some manner. This is where the concept of sections comes in.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2005 Each chunk of code or data is part of a section in the object file. Then,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2006 when the linker reads all the object files, it coalesces all sections of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2007 same name into a single section and then considers it as a unit.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2008 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2009 >The existence of sections, however, raises a problem for symbols even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2010 within the same source file. Thus, the assembler must treat symbols from
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2011 different sections within the same source file in the same manner as external
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2012 symbols. That is, it must leave them for the linker to resolve at link time,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2013 with all the limitations that entails.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2014 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2015 >In the object file target mode, LWASM requires all source lines that
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2016 cause bytes to be output to be inside a section. Any directives that do
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2017 not cause any bytes to be output can appear outside of a section. This includes
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2018 such things as EQU or RMB. Even ORG can appear outside a section. ORG, however,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2019 makes no sense within a section because it is the linker that determines
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2020 the starting address of the section's code, not the assembler.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2021 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2022 >All symbols defined globally in the assembly process are local to the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2023 source file and cannot be exported. All symbols defined within a section are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2024 considered local to the source file unless otherwise explicitly exported.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2025 Symbols referenced from external source files must be declared external,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2026 either explicitly or by asking the assembler to assume that all undefined
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2027 symbols are external.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2028 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2029 >It is often handy to define a number of memory addresses that will be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2030 used for data at run-time but which need not be included in the binary file.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2031 These memory addresses are not initialized until run-time, either by the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2032 program itself or by the program loader, depending on the operating environment.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2033 Such sections are often known as BSS sections. LWASM supports generating
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2034 sections with a BSS attribute set which causes the section definition including
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2035 symbols exported from that section and those symbols required to resolve
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2036 references from the local file, but with no actual code in the object file.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2037 It is illegal for any source lines within a BSS flagged section to cause any
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2038 bytes to be output.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2039 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2040 >The following directives apply to section handling.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2041 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2042 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2043 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2044 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2045 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2046 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2047 >SECTION <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2048 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2049 >name[,flags]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2050 >, SECT <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2051 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2052 >name[,flags]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2053 >, .AREA <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2054 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2055 >name[,flags]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2056 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2057 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2058 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2059 >Instructs the assembler that the code following this directive is to be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2060 considered part of the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2061 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2062 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2063 >. A section name
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2064 may appear multiple times in which case it is as though all the code from
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2065 all the instances of that section appeared adjacent within the source file.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2066 However, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2067 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2068 >flags</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2069 > may only be specified on the first
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2070 instance of the section.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2071 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2072 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2073 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2074 >flags</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2075 > is a comma separated list of flags. If a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2076 flag is "bss", the section will be treated as a BSS section and no
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2077 statements that generate output are permitted.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2078 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2079 >If the flag is "constant",
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2080 the same restrictions apply as for BSS sections. Additionally, all symbols
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2081 defined in a constant section define absolute values and will not be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2082 adjusted by the linker at link time. Constant sections cannot define
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2083 complex expressions for symbols; the value must be fully defined at assembly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2084 time. Additionally, multiple instances of a constant section do not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2085 coalesce into a single addressing unit; each instance starts again at offset
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2086 0.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2087 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2088 >If the section name is "bss" or ".bss" in any combination of upper and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2089 lower case, the section is assumed to be a BSS section. In that case,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2090 the flag <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2091 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2092 >!bss</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2093 > can be used to override this assumption.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2094 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2095 > If the section name is "_constants" or "_constant", in any
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2096 combination of upper and lower case, the section is assumed to be a constant
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2097 section. This assumption can be overridden with the "!constant"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2098 flag.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2099 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2100 >If assembly is already happening within a section, the section is implicitly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2101 ended and the new section started. This is not considered an error although
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2102 it is recommended that all sections be explicitly closed.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2103 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2104 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2105 >ENDSECTION, ENDSECT</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2106 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2107 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2108 >This directive ends the current section. This puts assembly outside of any
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2109 sections until the next SECTION directive. ENDSECTION is the preferred form.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2110 Prior to version 3.0 of LWASM, ENDS could also be used to end a section but
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2111 as of version 3.0, it is now an alias for ENDSTRUCT instead.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2112 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2113 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2114 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2115 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2116 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2117 > EXTERN, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2118 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2119 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2120 > EXTERNAL, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2121 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2122 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2123 > IMPORT</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2124 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2125 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2126 >This directive defines <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2127 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2128 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2129 > as an external symbol.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2130 This directive may occur at any point in the source code. EXTERN definitions
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2131 are resolved on the first pass so an EXTERN definition anywhere in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2132 source file is valid for the entire file. The use of this directive is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2133 optional when the assembler is instructed to assume that all undefined
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2134 symbols are external. In fact, in that mode, if the symbol is referenced
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2135 before the EXTERN directive, an error will occur.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2136 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2137 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2138 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2139 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2140 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2141 > EXPORT, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2142 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2143 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2144 > .GLOBL, EXPORT <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2145 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2146 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2147 >, .GLOBL <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2148 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2149 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2150 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2151 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2152 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2153 >This directive defines <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2154 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2155 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2156 > as an exported symbol.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2157 This directive may occur at any point in the source code, even before the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2158 definition of the exported symbol.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2159 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2160 >Note that <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2161 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2162 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2163 > may appear as the operand or as the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2164 statement's symbol. If there is a symbol on the statement, that will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2165 take precedence over any operand that is present.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2166 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2167 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2168 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2169 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2170 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2171 > EXTDEP</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2172 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2173 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2174 >This directive forces an external dependency on
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2175 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2176 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2177 >sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2178 >, even if it is never referenced anywhere else in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2179 this file.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2180 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2181 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2182 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2183 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2184 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2185 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2186 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2187 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2188 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2189 NAME="AEN659"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2190 >3.10. Assembler Modes and Pragmas</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2191 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2192 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2193 >There are a number of options that affect the way assembly is performed.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2194 Some of these options can only be specified on the command line because
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2195 they determine something absolute about the assembly process. These include
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2196 such things as the output target. Other things may be switchable during
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2197 the assembly process. These are known as pragmas and are, by definition,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2198 not portable between assemblers.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2199 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2200 >LWASM supports a number of pragmas that affect code generation or
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2201 otherwise affect the behaviour of the assembler. These may be specified by
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2202 way of a command line option or by assembler directives. The directives
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2203 are as follows.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2204 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2205 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2206 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2207 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2208 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2209 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2210 >PRAGMA <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2211 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2212 >pragma[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2213 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2214 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2215 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2216 >Specifies that the assembler should bring into force all <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2217 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2218 >pragma</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2219 >s
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2220 specified. Any unrecognized pragma will cause an assembly error. The new
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2221 pragmas will take effect immediately. This directive should be used when
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2222 the program will assemble incorrectly if the pragma is ignored or not supported.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2223 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2224 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2225 >*PRAGMA <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2226 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2227 >pragma[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2228 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2229 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2230 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2231 >This is identical to the PRAGMA directive except no error will occur with
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2232 unrecognized or unsupported pragmas. This directive, by virtue of starting
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2233 with a comment character, will also be ignored by assemblers that do not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2234 support this directive. Use this variation if the pragma is not required
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2235 for correct functioning of the code.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2236 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2237 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2238 >*PRAGMAPUSH <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2239 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2240 >pragma[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2241 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2242 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2243 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2244 >This directive saves the current state of the specified pragma(s) for later retrieval. See discussion below for more information.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2245 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2246 >This directive will not throw any errors for any reason.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2247 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2248 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2249 >*PRAGMAPOP <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2250 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2251 >pragma[,...]</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2252 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2253 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2254 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2255 >This directive restores the previously saved state of the specified pragma(s). See discussion below for more information.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2256 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2257 >This directive will not throw any errors for any reason.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2258 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2259 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2260 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2261 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2262 >Each pragma supported has a positive version and a negative version.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2263 The positive version enables the pragma while the negative version disables
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2264 it. The negatitve version is simply the positive version with "no" prefixed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2265 to it. For instance, "pragma" vs. "nopragma". When only one version is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2266 listed below, its opposite can be obtained by prepending "no" if it is not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2267 present or removing "no" from the beginning if it is present.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2268 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2269 >Pragmas are not case sensitive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2270 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2271 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2272 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2273 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2274 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2275 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2276 >6800compat</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2277 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2278 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2279 >When in force, this pragma enables recognition of various
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2280 compatibility instructions useful when assembling 6800 code. These
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2281 compatibility instructions are assembled into equivalent 6809 instructions.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2282 This mode also includes several analogous instructions which are not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2283 strictly 6800 instructions but allow the similar style to be applied to 6809
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2284 specific features.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2285 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2286 >Technically, a compliant 6809 assembler must recognize these
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2287 instructions by default since Motorola advertised the 6809 as being source
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2288 compatible with the 6800. However, most source code does not require this
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2289 compatibility and LWASM itself did not support these instructions prior to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2290 version 4.11 so this mode is disabled by default.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2291 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2292 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2293 >6809</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2294 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2295 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2296 >This pragma allows you to mark a section of code as 6809-only. In ths mode,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2297 the assembler will throw an error if any 6309 instructions are used.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2298 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2299 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2300 >6309</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2301 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2302 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2303 >This pragma enables the use of 6309 instructions and disables any 6809 specific
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2304 instructions. It also changes the cycle count listing output (if selected)
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2305 to display 6309 timings.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2306 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2307 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2308 >6809conv, 6309conv</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2309 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2310 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2311 >These pragmas enable convenience instructions extending the 6809 and 6309
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2312 instruction sets respectively. For more information, see
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2313 <A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2314 HREF="#CONVINST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2315 >Section 3.11</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2316 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2317 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2318 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2319 >index0tonone</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2320 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2321 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2322 >When in force, this pragma enables an optimization affecting indexed addressing
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2323 modes. When the offset expression in an indexed mode evaluates to zero but is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2324 not explicity written as 0, this will replace the operand with the equivalent
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2325 no offset mode, thus creating slightly faster code. Because of the advantages
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2326 of this optimization, it is enabled by default.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2327 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2328 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2329 >cescapes</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2330 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2331 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2332 >This pragma will cause strings in the FCC, FCS, and FCN pseudo operations to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2333 have C-style escape sequences interpreted. The one departure from the official
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2334 spec is that unrecognized escape sequences will return either the character
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2335 immediately following the backslash or some undefined value. Do not rely
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2336 on the behaviour of undefined escape sequences.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2337 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2338 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2339 >importundefexport</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2340 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2341 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2342 >This pragma is only valid for targets that support external references. When
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2343 in force, it will cause the EXPORT directive to act as IMPORT if the symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2344 to be exported is not defined. This is provided for compatibility with the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2345 output of gcc6809 and should not be used in hand written code. Because of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2346 the confusion this pragma can cause, it is disabled by default.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2347 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2348 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2349 >undefextern</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2350 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2351 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2352 >This pragma is only valid for targets that support external references. When in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2353 force, if the assembler sees an undefined symbol on the second pass, it will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2354 automatically define it as an external symbol. This automatic definition will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2355 apply for the remainder of the assembly process, even if the pragma is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2356 subsequently turned off. Because this behaviour would be potentially surprising,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2357 this pragma defaults to off.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2358 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2359 >The primary use for this pragma is for projects that share a large number of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2360 symbols between source files. In such cases, it is impractical to enumerate
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2361 all the external references in every source file. This allows the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2362 and linker to do the heavy lifting while not preventing a particular source
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2363 module from defining a local symbol of the same name as an external symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2364 if it does not need the external symbol. (This pragma will not cause an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2365 automatic external definition if there is already a locally defined symbol.)</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2366 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2367 >This pragma will often be specified on the command line for large projects.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2368 However, depending on the specific dynamics of the project, it may be sufficient
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2369 for one or two files to use this pragma internally.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2370 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2371 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2372 >export</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2373 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2374 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2375 >This pragma causes all symbols to be added to the export list
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2376 automatically. This is useful when a large number of symbols need to be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2377 exported but you do not wish to include an EXPORT directive for all of them.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2378 This is often useful on the command line but might be useful even inline
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2379 with the PRAGMA directive if a large number of symbols in a row are to be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2380 exported.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2381 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2382 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2383 >dollarlocal</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2384 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2385 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2386 >When set, a "$" in a symbol makes it local. When not set, "$" does not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2387 cause a symbol to be local. It is set by default except when using the OS9
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2388 target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2389 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2390 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2391 >dollarnotlocal</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2392 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2393 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2394 > This is the same as the "dollarlocal" pragma except its sense is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2395 reversed. That is, "dollarlocal" and "nodollarnotlocal" are equivalent and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2396 "nodollarlocal" and "dollarnotlocal" are equivalent. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2397 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2398 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2399 >pcaspcr</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2400 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2401 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2402 > Normally, LWASM makes a distinction between PC and PCR in program
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2403 counter relative addressing. In particular, the use of PC means an absolute
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2404 offset from PC while PCR causes the assembler to calculate the offset to the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2405 specified operand and use that as the offset from PC. By setting this
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2406 pragma, you can have PC treated the same as PCR. </P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2407 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2408 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2409 >shadow</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2410 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2411 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2412 >When this pragma is in effect, it becomes possible to define a macro
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2413 that matches an internal operation code. Thus, it makes it possible to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2414 redefine either CPU instructions or pseudo operations. Because this feature
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2415 is of dubious utility, it is disabled by default.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2416 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2417 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2418 >nolist</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2419 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2420 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2421 >Lines where this pragma is in effect will not appear in the assembly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2422 listing. Also, any symbols defined under this pragma will not show up in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2423 the symbol list. This is most useful in include files to avoid spamming the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2424 assembly listing with dozens, hundreds, or thousands of irrelevant
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2425 symbols.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2426 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2427 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2428 >autobranchlength</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2429 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2430 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2431 >One of the perennial annoyances for 6809 programmers is that the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2432 mneumonics for the short and long branch instructions are different (bxx vs.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2433 lbxx), which is at odds with the rest of the instruction set. This pragma
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2434 is a solution to those annoying byte overflow errors that short branch
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2435 instructions tend to aquire.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2436 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2437 >When this pragma is in effect, which is not the default, whenever any
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2438 relative branch instruction is used, its size will be automatically
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2439 determined based on the actual distance to the destination. In other words,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2440 one can write code with long or short branches everywhere and the assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2441 will choose a size for the branch.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2442 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2443 >Also, while this pragma is in effect, the &#62; and &#60; symbols can be used
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2444 to force the branch size, analogous to their use for other instructions with
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2445 &#60; forcing 8 bit offsets and &#62; forcing 16 bit offets.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2446 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2447 >Because this pragma leads to source that is incompatible with other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2448 assemblers, it is strongly recommended that it be invoked using the PRAGMA
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2449 directive within the source code rather than on the command line or via the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2450 *PRAGMA directive. This way, an error will be raised if someone tries to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2451 assemble the code under a different assembler.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2452 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2453 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2454 >nosymbolcase, symbolnocase</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2455 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2456 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2457 >Any symbol defined while this pragma is in force will be treated as
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2458 case insensitive, regardless whether the pragma is in force when the symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2459 is referenced.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2460 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2461 >It is important to note that this pragma will not work as expected in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2462 all cases when using the object file assembly target. It is intended for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2463 use only when the assembler will be producing the final binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2464 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2465 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2466 >condundefzero</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2467 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2468 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2469 >This pragma will cause the assembler to change the way it handles
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2470 symbols in conditional expressions. Ordinarily, any symbol that is not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2471 defined prior to the conditional will throw an undefined symbol error. With
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2472 this pragma in effect, symbols that are not yet defined at the point the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2473 conditional is encountered will be treated as zero.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2474 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2475 >This is not the default because it encourages poor code design. One
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2476 should use the "IFDEF" or "IFNDEF" conditionals to test for the presence of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2477 a symbol.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2478 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2479 >It is important to note that if a symbol is defined but it does not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2480 yet evaluate to a constant value at the point where the conditional appears,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2481 the assembler will still complain about a non constant condition.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2482 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2483 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2484 >forwardrefmax</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2485 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2486 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2487 >This pragma will disable forward reference optimization completely.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2488 Ordinarily, LWASM will attempt to select the shortest possible addressing
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2489 mode for forward references. However, in many source files, especially
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2490 those not using the PCR relative addressing modes, this optimization is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2491 pointless since the assembler will almost certainly settle on a 16 bit
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2492 offset or address. If all variables in the direct page are defined before
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2493 the main body of the code, the benefit of forward reference optimization
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2494 almost certainly vanishes completely. However, the cost of doing that
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2495 optimization remains and can result in a very long assembly time.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2496 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2497 >Enabling this pragma will cause all forward references to use the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2498 maximum offset or address size, much the same has EDTASM and other pure
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2499 two pass assemblers do. The side effect is that all line lengths and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2500 symbol values are fully resolved after the initial parsing pass and the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2501 amount of work to resolve everything becomes almost nil.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2502 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2503 >While this pragma can be applied selectively to sections of source
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2504 code (use *PRAGMA if doing so and compatibility with other assemblers
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2505 is desired), it is likely more useful when provided as a command line
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2506 pragma.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2507 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2508 >It should be noted that the presence or absence of this pragma
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2509 will not change the correctness of the generated code unless cycle counts
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2510 or byte counts are critical (which they usually are not). It also will
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2511 not override the operand size override prefixes (&lt; and &gt;). It only
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2512 applies when the assembler is left to guess what the operand size is.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2513 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2514 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2515 >operandsizewarning</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2516 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2517 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2518 >Enabling this pragma will cause LWASM to show a warning when it
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2519 detects that a smaller addressing mode could be used for an instruction.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2520 This is particularly useful for finding places where long branches are used
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2521 where short branches could be used instead. It will also show the warnings
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2522 for indexing offsets (regardless of whether the operand size is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2523 forced).</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2524 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2525 >As of LWASM 4.16, no other checks are performed.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2526 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2527 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2528 >qrts</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2529 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2530 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2531 >&#13;Enables the use of the ?RTS branch target. ?RTS is implemented to maintain
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2532 compatibility with the MACRO-80c assembler. It works by searching backward
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2533 in the code for an RTS instruction. If none is found, it inverts the branch
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2534 logic and inserts an RTS following the branch instruction. Below you can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2535 see how a BMI (2B xx) has been assembled as a BPL *+1 (2A 01) to skip over an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2536 inserted RTS (39).</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2537 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2538 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2539 >1D1E 7D1D1D TST WHICH1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2540 1D21 2A0139 BMI ?RTS
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2541 1D24 BD1D65 JSR INV</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2542 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2543 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2544 >m80ext</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2545 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2546 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2547 >&#13;This pragma (along with pragma qrts) enables some uncommon behaviors to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2548 accomodate The Micro Works MACRO-80c assembler from 1982. This assembler
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2549 was used by a number of notable TRS-80 Color Computer applications and the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2550 goal of this pragma is to allow them to build identical binaries from
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2551 unmodified, vintage source code.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2552 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2553 >&#13;In m80ext mode, the handling of the "END" pseudo-op changes when used inside
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2554 an include file. Instead of terminating all assembly, it merely stops
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2555 processing of the current include file (this behavior matches the original
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2556 Motorola 6809 assembler). In addition, loading an ASCII value with a single
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2557 quote (e.g., LDA #'N) is extended to 16-bit registers (e.g., LDD #'NO).
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2558 LWASM normally supports this via double quote and that is the proper use in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2559 modern code. Finally, the FCC pseudo-op is extended to handle FCB-like
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2560 behavior after the closing delimiter:</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2561 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2562 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2563 > FCC "Greetings from 1982",13,0</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2564 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2565 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2566 >testmode</DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2567 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2568 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2569 >&#13;This pragma is intended for internal testing purposes. In testmode, the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2570 assembler searches for a specially-formatted comment starting with a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2571 semicolon followed by a period. Immediately afterward are a list of hex
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2572 bytes that the assembler is expected to generate. Likewise, if the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2573 assembler is expected to throw an error or warning on a given line, you can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2574 check by specifying "E:" followed by the error number. In this case the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2575 error is ignored and the assembler continues ignoring the line in question.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2576 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2577 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2578 >1D1E 7D1D1D TST WHICH1 ;.7d1d1d
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2579 1D21 2A0139 BMI ?RTS ;.2a0139
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2580 1D24 1D24 FDB * ;.1d24
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2581 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode")</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2582 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2583 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2584 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2585 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2586 >As a convenience, each input file has a pragma state stack. This
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2587 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2588 pragma state and then restore it to the precise state it had previously.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2589 If, at the end of an input file, all pragma states have not been popped,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2590 they will be removed from the stack. Thus, it is critical to employ
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2591 *PRAGMAPOP correctly. Because each input file has its own pragma stack,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2592 using *PRAGMAPUSH in one file and *PRAGMAPOP in another file will not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2593 work.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2594 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2595 >Pragma stacks are more useful in include files, in particular in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2596 conjunction with the nolist pragma. One can push the state of the nolist
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2597 pragma, engage the nolist pragma, and then pop the state of the nolist
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2598 pragma at the end of the include file. This will cause the entire include
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2599 file to operate under the nolist pragma. However, if the file is included
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2600 while nolist is already engaged, it will not undo that state.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2601 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2602 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2603 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2604 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2605 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2606 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2607 NAME="CONVINST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2608 >3.11. Convenience Instructions</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2609 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2610 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2611 >&#13;Similar to the 6800 compatibility instructions (pragma 6800compat) these
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2612 pragma 6809conv and pragma 6309conv enable convenience extensions to the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2613 6809 and 6309 instruction set. Originally intended for compatibility with
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2614 the MACRO-80c assembler, these have proven useful in large codebases that
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2615 target both the 6809 and the 6309.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2616 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2617 >&#13;The 6809 extensions are straightforward with the exception of "TSTD" which
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2618 assembles as "STD -2,S". A benefit of using these is they will "just work"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2619 and take on their 6309 equivalent when you enable 6309 assembly mode.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2620 Supported instructions: ASRD, CLRD, COMD, LSLD, LSRD, NEGD, TSTD.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2621 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2622 >&#13;6309 extensions are based on common patterns described by Chris Burke and
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2623 Darren Atkinson in their 6309 documentation and include the following
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2624 instructions: ASRQ, CLRQ, COMQ, LSLE, LSLF, LSLQ, LSRQ, NEGE,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2625 NEGF, NEGW, NEGQ, TSTQ.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2626 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2627 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2628 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2629 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2630 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2631 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2632 NAME="AEN805"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2633 >3.12. Cycle Counts</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2634 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2635 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2636 >&#13;The following options for displaying cycle counts in listings are provided.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2637 These options are enabled from pragmas on the command line or in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2638 assembly files themselves. For compatibility with other assemblers you can
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2639 use the "OPT" keyword in addition to "PRAGMA."</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2640 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2641 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2642 >opt c - enable cycle counts: [8]
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2643 opt cd - enable detailed cycle counts breaking down addressing modes: [5+3]
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2644 opt ct - show a running subtotal of cycles
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2645 opt cc - clear the running subtotal</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2646 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2647 >&#13;The assembler supports both 6809 as well as native-mode 6309 cycle counts.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2648 In 6309 mode the counts are displayed in parenthesis instead of brackets.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2649 In addition, some operations have a variable cycle count. In this case a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2650 "+?" is displayed to alert the reader. Sample output is shown below.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2651 ><PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2652 CLASS="PROGRAMLISTING"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2653 >266f 7d25e2 (window.asm):00313 [7] 7 move tst putflg
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2654 2672 2602 (window.asm):00314 [5] 12 bne a@
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2655 2674 1e13 (window.asm):00315 [8] 20 exg x,u
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2656 2676 0dd6 (window.asm):00316 [6] 26 a@ tst is6309
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2657 2678 2618 (window.asm):00317 [5] 31 bne exit@
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2658 (window.asm):00318 opt 6309
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2659 267a 10860085 (window.asm):00319 (4) 35 b@ ldw #133
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2660 267e 113813 (window.asm):00320 (6+?) 41 tfm x+,u+
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2661 2681 30881b (window.asm):00321 (4+1) 46 leax 27,x
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2662 2684 33c81b (window.asm):00322 (4+1) 51 leau 27,u
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2663 2687 4a (window.asm):00323 (1) 52 deca
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2664 2688 26f0 (window.asm):00324 (5) 57 bne b@</PRE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2665 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2666 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2667 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2668 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2669 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2670 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2671 NAME="AEN811"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2672 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2673 >Chapter 4. LWLINK</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2674 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2675 >The LWTOOLS linker is called LWLINK. This chapter documents the various features
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2676 of the linker.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2677 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2678 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2679 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2680 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2681 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2682 NAME="AEN814"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2683 >4.1. Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2684 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2685 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2686 >The binary for LWLINK is called "lwlink". Note that the binary is in lower
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2687 case. lwlink takes the following command line arguments.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2688 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2689 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2690 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2691 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2692 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2693 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2694 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2695 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2696 >--decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2697 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2698 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2699 >-b</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2700 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2701 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2702 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2703 >Selects the DECB output format target. This is equivalent to <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2704 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2705 >--format=decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2706 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2707 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2708 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2709 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2710 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2711 >--output=FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2712 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2713 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2714 >-o FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2715 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2716 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2717 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2718 >This option specifies the name of the output file. If not specified, the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2719 default is <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2720 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2721 >a.out</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2722 >.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2723 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2724 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2725 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2726 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2727 >--format=TYPE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2728 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2729 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2730 >-f TYPE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2731 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2732 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2733 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2734 >This option specifies the output format. Valid values are <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2735 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2736 >decb</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2737 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2738 and <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2739 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2740 >raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2741 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2742 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2743 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2744 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2745 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2746 >--raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2747 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2748 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2749 >-r</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2750 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2751 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2752 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2753 >This option specifies the raw output format.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2754 It is equivalent to <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2755 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2756 >--format=raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2757 >
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2758 and <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2759 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2760 >-f raw</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2761 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2762 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2763 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2764 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2765 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2766 >--script=FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2767 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2768 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2769 >-s</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2770 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2771 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2772 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2773 >This option allows specifying a linking script to override the linker's
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2774 built in defaults.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2775 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2776 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2777 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2778 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2779 >--section-base=SECT=BASE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2780 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2781 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2782 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2783 >Cause section SECT to load at base address BASE. This will be prepended
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2784 to the built-in link script. It is ignored if a link script is provided.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2785 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2786 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2787 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2788 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2789 >--map=FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2790 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2791 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2792 >-m FILE</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2793 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2794 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2795 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2796 >This will output a description of the link result to FILE.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2797 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2798 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2799 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2800 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2801 >--library=LIBSPEC</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2802 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2803 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2804 >-l LIBSPEC</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2805 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2806 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2807 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2808 >Load a library using the library search path. If LIBSPEC is prefixed with a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2809 colon (":"), then LIBSPEC is the precise filename to be searched for in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2810 library path. Otherwise, LIBSPEC will have "lib" prepended and ".a" appended.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2811 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2812 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2813 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2814 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2815 >--library-path=DIR</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2816 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2817 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2818 >-L DIR</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2819 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2820 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2821 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2822 >Add DIR to the library search path.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2823 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2824 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2825 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2826 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2827 >--debug</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2828 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2829 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2830 >-d</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2831 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2832 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2833 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2834 >This option increases the debugging level. It is only useful for LWTOOLS
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2835 developers.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2836 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2837 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2838 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2839 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2840 >--help</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2841 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2842 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2843 >-?</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2844 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2845 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2846 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2847 >This provides a listing of command line options and a brief description
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2848 of each.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2849 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2850 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2851 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2852 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2853 >--usage</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2854 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2855 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2856 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2857 >This will display a usage summary
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2858 of each command line option.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2859 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2860 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2861 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2862 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2863 >--version</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2864 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2865 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2866 >-V</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2867 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2868 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2869 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2870 >This will display the version of LWLINK.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2871 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2872 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2873 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2874 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2875 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2876 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2877 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2878 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2879 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2880 NAME="AEN911"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2881 >4.2. Linker Operation</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2882 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2883 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2884 >&#13;LWLINK takes one or more files in supported input formats and links them
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2885 into a single binary. Currently supported formats are the LWTOOLS object
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2886 file format and the archive format used by LWAR. While the precise method is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2887 slightly different, linking can be conceptualized as the following steps.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2888 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2889 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2890 ><OL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2891 TYPE="1"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2892 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2893 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2894 >First, the linker loads a linking script. If no script is specified, it
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2895 loads a built-in default script based on the output format selected. This
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2896 script tells the linker how to lay out the various sections in the final
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2897 binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2898 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2899 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2900 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2901 >Next, the linker reads all the input files into memory. At this time, it
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2902 flags any format errors in those files. It constructs a table of symbols
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2903 for each object at this time.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2904 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2905 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2906 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2907 >The linker then proceeds with organizing the sections loaded from each file
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2908 according to the linking script. As it does so, it is able to assign addresses
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2909 to each symbol defined in each object file. At this time, the linker may
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2910 also collapse different instances of the same section name into a single
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2911 section by appending the data from each subsequent instance of the section
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2912 to the first instance of the section.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2913 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2914 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2915 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2916 >Next, the linker looks through every object file for every incomplete reference.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2917 It then attempts to fully resolve that reference. If it cannot do so, it
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2918 throws an error. Once a reference is resolved, the value is placed into
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2919 the binary code at the specified section. It should be noted that an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2920 incomplete reference can reference either a symbol internal to the object
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2921 file or an external symbol which is in the export list of another object
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2922 file.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2923 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2924 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2925 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2926 >If all of the above steps are successful, the linker opens the output file
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2927 and actually constructs the binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2928 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2929 ></OL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2930 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2931 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2932 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2933 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2934 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2935 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2936 NAME="AEN925"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2937 >4.3. Linking Scripts</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2938 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2939 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2940 >A linker script is used to instruct the linker about how to assemble the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2941 various sections into a completed binary. It consists of a series of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2942 directives which are considered in the order they are encountered.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2943 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2944 >The sections will appear in the resulting binary in the order they are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2945 specified in the script file. If a referenced section is not found, the linker will behave as though the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2946 section did exist but had a zero size, no relocations, and no exports.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2947 A section should only be referenced once. Any subsequent references will have
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2948 an undefined effect.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2949 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2950 >All numbers are in linking scripts are specified in hexadecimal. All directives
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2951 are case sensitive although the hexadecimal numbers are not.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2952 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2953 >A section name can be specified as a "*", then any section not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2954 already matched by the script will be matched. The "*" can be followed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2955 by a comma and a flag to narrow the section down slightly, also.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2956 If the flag is "!bss", then any section that is not flagged as a bss section
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2957 will be matched. If the flag is "bss", then any section that is flagged as
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2958 bss will be matched.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2959 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2960 >The following directives are understood in a linker script.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2961 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2962 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2963 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2964 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2965 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2966 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2967 >sectopt <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2968 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2969 >section</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2970 > padafter <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2971 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2972 >byte,...</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2973 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2974 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2975 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2976 >&#13;This will cause the linker to append the specified list of byte values
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2977 (specified in hexadecimal separated by commas) to the end of the named
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2978 section. This is done once all instances of the specified section are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2979 collected together. This has no effect if the specified section does not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2980 appear anywhere in any of the objects specified for linking. &#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2981 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2982 >&#13;If code depends on the presence of this padding somewhere, it is sufficient
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2983 to include an empty section of the specified name in the object that depends
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2984 on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2985 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2986 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2987 >define basesympat <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2988 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2989 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2990 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2991 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2992 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2993 >&#13;This causes the linker to define a symbol for the ultimate base address of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2994 each section using the pattern specified by <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2995 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2996 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2997 >.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2998 In the string, %s can appear exactly once and will be replaced with the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2999 section name. The base address is calculated after all instances of each
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3000 section have been collapsed together.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3001 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3002 >&#13;It should be noted that if none of the objects to be linked contains a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3003 particular section name, there will be no base symbol defined for it, even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3004 if it is listed explicitly in the link script. If code depends on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3005 presence of these symbols, it is sufficient to include an empty section of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3006 the specified name in the object that depends on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3007 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3008 > If the pattern resolves to the same string for multiple
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3009 sections, the results are undefined.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3010 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3011 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3012 >define lensympat <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3013 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3014 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3015 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3016 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3017 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3018 >&#13;This causes the linker to define a symbol for the ultimate length of each
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3019 section using the pattern specified by <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3020 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3021 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3022 >. In
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3023 the string, %s can appear exactly once and will be replaced with the section
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3024 name. The length is calculated after all instances of a section have been
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3025 collapsed together.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3026 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3027 >&#13;It should be noted that if none of the objects to be linked contains a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3028 particular section name, there will be no length symbol defined for it, even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3029 if it is listed explicitly in the link script. If code depends on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3030 presence of these symbols, it is sufficient to include an empty section of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3031 the specified name in the object that depends on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3032 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3033 >If the pattern resolves to the same string for multiple
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3034 sections, the results are undefined.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3035 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3036 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3037 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3038 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3039 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3040 > load <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3041 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3042 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3043 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3044 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3045 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3046 >&#13;This causes the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3047 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3048 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3049 > to load at
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3050 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3051 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3052 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3053 >. For the raw target, only one "load at" entry is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3054 allowed for non-bss sections and it must be the first one. For raw targets,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3055 it affects the addresses the linker assigns to symbols but has no other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3056 affect on the output. bss sections may all have separate load addresses but
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3057 since they will not appear in the binary anyway, this is okay.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3058 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3059 >For the decb target, each "load" entry will cause a new "block" to be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3060 output to the binary which will contain the load address. It is legal for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3061 sections to overlap in this manner - the linker assumes the loader will sort
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3062 everything out.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3063 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3064 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3065 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3066 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3067 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3068 > high <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3069 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3070 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3071 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3072 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3073 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3074 >&#13;This causes the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3075 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3076 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3077 > to load with its end
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3078 address just below <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3079 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3080 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3081 >. Subsequent sections are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3082 loaded at progressively lower addresses. This may lead to inefficient file
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3083 encoding for some targets. As of this writing, it will also almost
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3084 certainly do the wrong thing for a raw target.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3085 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3086 >&#13;This is useful for aligning a block of code with high memory. As an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3087 example, if the total size of a section is $100 bytes and a high address of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3088 $FE00 is specified, the section will actually load at $FD00.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3089 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3090 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3091 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3092 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3093 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3094 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3095 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3096 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3097 >&#13;This will cause the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3098 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3099 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3100 > to load after the previously listed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3101 section.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3102 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3103 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3104 >entry <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3105 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3106 >addr or sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3107 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3108 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3109 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3110 >This will cause the execution address (entry point) to be the address
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3111 specified (in hex) or the specified symbol name. The symbol name must
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3112 match a symbol that is exported by one of the object files being linked.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3113 This has no effect for targets that do not encode the entry point into the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3114 resulting file. If not specified, the entry point is assumed to be address 0
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3115 which is probably not what you want. The default link scripts for targets
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3116 that support this directive automatically starts at the beginning of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3117 first section (usually "init" or "code") that is emitted in the binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3118 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3119 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3120 >pad <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3121 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3122 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3123 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3124 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3125 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3126 >This will cause the output file to be padded with NUL bytes to be exactly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3127 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3128 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3129 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3130 > bytes in length. This only makes sense for a raw target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3131 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3132 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3133 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3134 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3135 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3136 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3137 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3138 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3139 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3140 NAME="AEN991"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3141 >4.4. Format Specific Linking Notes</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3142 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3143 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3144 >Some formats require special information to be able to generate actual
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3145 binaries. If the specific format you are interested in is not listed in
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3146 this section, then there is nothing special you need to know about to create
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3147 a final binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3148 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3149 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3150 ><HR><H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3151 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3152 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3153 NAME="AEN994"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3154 >4.4.1. OS9 Modules</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3155 ></H3
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3156 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3157 >OS9 modules need to embed several items into the module header. These
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3158 items are the type of module, the langauge of the module, the module
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3159 attributes, the module revision number, the data size (bss), and the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3160 execution offset. These are all either calculated or default to reasonable
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3161 values.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3162 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3163 >The data size is calcuated as the sum of all sections named "bss" or
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3164 ".bss" in all object files that are linked together.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3165 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3166 >The execution offset is calculated from the address of the special
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3167 symbol "__start" which must be an exported (external) symbol in one of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3168 objects to be linked.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3169 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3170 >The type defaults to "Prgrm" or "Program module". The language
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3171 defaults to "Objct" or "6809 object code". Attributes default to enabling
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3172 the re-entrant flag. And finally, the revision defaults to zero.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3173 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3174 >The embedded module name is the output filename. If the output
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3175 filename includes more than just the filename, this will probably not be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3176 what you want.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3177 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3178 >The type, language, attributes, revision, and module name can all be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3179 overridden by providing a special section in exactly one of the object files
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3180 to be linked. This section is called "__os9" (note the two underscores).
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3181 To override the type, language, attributes, or revision values, define a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3182 non-exported symbol in this section called "type", "lang", "attr", or "rev"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3183 respectively. Any other symbols defined are ignored. To override the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3184 module name, include as the only actual code in the section a NUL terminated
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3185 string (the FCN directive is useful for this). If there is no code in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3186 section or it beings with a NUL, the default name will be used. Any of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3187 preceeding that are not defined in the special section will retain their
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3188 default values.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3189 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3190 >The built-in link script for OS9 modules will place the following
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3191 sections, in order, in the module: "code", ".text", "data", ".data". It
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3192 will merge all sections with the name "bss" or ".bss" into the "data"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3193 section. All other section names are ignored. What this means is that you
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3194 must define your data variables in the a section called "bss" or ".bss" even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3195 though you will be refencing them all as offsets from U. This does have the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3196 unpleasant side effect that all BSS references will end up being 16 bit
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3197 offsets because the assembler cannot know what the offset will be once the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3198 linker is finished its work. Thus, if the tightest possible code is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3199 required, having LWASM directly output the module is a better choice.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3200 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3201 >While the built-in link script is probably sufficient for most
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3202 purposes, you can provide your own script. If you provide a custom link
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3203 script, you must start your code and data sections at location 000D to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3204 accommodate the module header. Otherwise, you will have an incorrect
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3205 location for the execution offset. You must use the ENTRY directive in the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3206 script to define the entry point for the module.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3207 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3208 >It should also be obvious from the above that you cannot mix the bss
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3209 (rmb) definitions with the module code when linking separately. Those
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3210 familiar with typical module creation will probably find this an unpleasant
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3211 difference but it is unavoidable.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3212 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3213 >It should also be noted that direct page references should also be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3214 avoided because you cannot know ahead of time whether the linker is going to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3215 end up putting a particular variable in the first 256 bytes of the module's
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3216 data space. If, however, you know for certain you will have less than 256
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3217 bytes of defined data space across all of the object files that will be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3218 linked, you can instead use forced DP addressing for your data addresses
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3219 instead of the ,u notation. When linking with 3rd party libraries, this
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3220 practice should be avoided. Also, when creating libraries, always use the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3221 offset from U technique.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3222 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3223 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3224 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3225 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3226 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3227 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3228 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3229 NAME="AEN1006"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3230 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3231 >Chapter 5. Libraries and LWAR</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3232 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3233 >LWTOOLS also includes a tool for managing libraries. These are analogous to
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3234 the static libraries created with the "ar" tool on POSIX systems. Each library
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3235 file contains one or more object files. The linker will treat the object
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3236 files within a library as though they had been specified individually on
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3237 the command line except when resolving external references. External references
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3238 are looked up first within the object files within the library and then, if
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3239 not found, the usual lookup based on the order the files are specified on
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3240 the command line occurs.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3241 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3242 >The tool for creating these libary files is called LWAR.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3243 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3244 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3245 ><HR><H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3246 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3247 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3248 NAME="AEN1010"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3249 >5.1. Command Line Options</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3250 ></H2
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3251 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3252 >The binary for LWAR is called "lwar". Note that the binary is in lower
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3253 case. The options lwar understands are listed below. For archive manipulation
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3254 options, the first non-option argument is the name of the archive. All other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3255 non-option arguments are the names of files to operate on.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3256 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3257 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3258 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3259 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3260 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3261 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3262 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3263 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3264 >--add</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3265 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3266 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3267 >-a</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3268 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3269 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3270 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3271 >This option specifies that an archive is going to have files added to it.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3272 If the archive does not already exist, it is created. New files are added
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3273 to the end of the archive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3274 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3275 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3276 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3277 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3278 >--create</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3279 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3280 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3281 >-c</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3282 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3283 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3284 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3285 >This option specifies that an archive is going to be created and have files
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3286 added to it. If the archive already exists, it is truncated.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3287 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3288 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3289 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3290 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3291 >--merge</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3292 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3293 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3294 >-m</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3295 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3296 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3297 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3298 >If specified, any files specified to be added to an archive will be checked
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3299 to see if they are archives themselves. If so, their constituent members are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3300 added to the archive. This is useful for avoiding archives containing archives.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3301 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3302 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3303 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3304 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3305 >--list</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3306 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3307 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3308 >-l</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3309 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3310 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3311 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3312 >This will display a list of the files contained in the archive.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3313 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3314 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3315 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3316 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3317 >--debug</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3318 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3319 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3320 >-d</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3321 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3322 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3323 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3324 >This option increases the debugging level. It is only useful for LWTOOLS
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3325 developers.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3326 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3327 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3328 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3329 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3330 >--help</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3331 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3332 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3333 >-?</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3334 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3335 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3336 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3337 >This provides a listing of command line options and a brief description
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3338 of each.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3339 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3340 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3341 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3342 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3343 >--usage</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3344 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3345 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3346 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3347 >This will display a usage summary
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3348 of each command line option.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3349 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3350 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3351 ><CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3352 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3353 >--version</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3354 >, <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3355 CLASS="OPTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3356 >-V</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3357 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3358 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3359 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3360 >This will display the version of LWLINK.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3361 of each.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3362 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3363 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3364 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3365 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3366 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3367 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3368 CLASS="CHAPTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3369 ><HR><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3370 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3371 NAME="OBJCHAP"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3372 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3373 >Chapter 6. Object Files</H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3374 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3375 >LWTOOLS uses a proprietary object file format. It is proprietary in the sense
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3376 that it is specific to LWTOOLS, not that it is a hidden format. It would be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3377 hard to keep it hidden in an open source tool chain anyway. This chapter
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3378 documents the object file format.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3379 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3380 >An object file consists of a series of sections each of which contains a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3381 list of exported symbols, a list of incomplete references, and a list of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3382 "local" symbols which may be used in calculating incomplete references. Each
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3383 section will obviously also contain the object code.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3384 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3385 >Exported symbols must be completely resolved to an address within the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3386 section it is exported from. That is, an exported symbol must be a constant
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3387 rather than defined in terms of other symbols.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3388 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3389 >Each object file starts with a magic number and version number. The magic
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3390 number is the string "LWOBJ16" for this 16 bit object file format. The only
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3391 defined version number is currently 0. Thus, the first 8 bytes of the object
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3392 file are <FONT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3393 COLOR="RED"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3394 >4C574F424A313600</FONT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3395 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3396 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3397 >Each section has the following items in order:</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3398 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3399 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3400 ><UL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3401 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3402 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3403 >section name</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3404 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3405 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3406 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3407 >flags</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3408 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3409 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3410 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3411 >list of local symbols (and addresses within the section)</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3412 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3413 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3414 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3415 >list of exported symbols (and addresses within the section)</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3416 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3417 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3418 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3419 >list of incomplete references along with the expressions to calculate them</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3420 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3421 ><LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3422 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3423 >the actual object code (for non-BSS sections)</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3424 ></LI
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3425 ></UL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3426 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3427 >The section starts with the name of the section with a NUL termination
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3428 followed by a series of flag bytes terminated by NUL. There are only two
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3429 flag bytes defined. A NUL (0) indicates no more flags and a value of 1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3430 indicates the section is a BSS section. For a BSS section, no actual
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3431 code is included in the object file.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3432 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3433 >Either a NULL section name or end of file indicate the presence of no more
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3434 sections.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3435 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3436 >Each entry in the exported and local symbols table consists of the symbol
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3437 (NUL terminated) followed by two bytes which contain the value in big endian
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3438 order. The end of a symbol table is indicated by a NULL symbol name.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3439 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3440 >Each entry in the incomplete references table consists of an expression
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3441 followed by a 16 bit offset where the reference goes. Expressions are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3442 defined as a series of terms up to an "end of expression" term. Each term
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3443 consists of a single byte which identifies the type of term (see below)
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3444 followed by any data required by the term. Then end of the list is flagged
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3445 by a NULL expression (only an end of expression term).</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3446 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3447 CLASS="TABLE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3448 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3449 NAME="AEN1093"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3450 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3451 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3452 ><B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3453 >Table 6-1. Object File Term Types</B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3454 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3455 ><TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3456 BORDER="1"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3457 FRAME="border"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3458 CLASS="CALSTABLE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3459 ><COL><COL><THEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3460 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3461 ><TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3462 >TERMTYPE</TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3463 ><TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3464 >Meaning</TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3465 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3466 ></THEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3467 ><TBODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3468 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3469 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3470 >00</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3471 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3472 >end of expression</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3473 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3474 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3475 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3476 >01</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3477 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3478 >integer (16 bit in big endian order follows)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3479 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3480 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3481 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3482 >02</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3483 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3484 > external symbol reference (NUL terminated symbol name follows)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3485 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3486 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3487 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3488 >03</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3489 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3490 >local symbol reference (NUL terminated symbol name follows)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3491 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3492 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3493 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3494 >04</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3495 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3496 >operator (1 byte operator number)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3497 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3498 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3499 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3500 >05</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3501 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3502 >section base address reference</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3503 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3504 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3505 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3506 >FF</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3507 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3508 >This term will set flags for the expression. Each one of these terms will set a single flag. All of them should be specified first in an expression. If they are not, the behaviour is undefined. The byte following is the flag. Flag 01 indicates an 8 bit relocation. Flag 02 indicates a zero-width relocation (see the EXTDEP pseudo op in LWASM).</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3509 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3510 ></TBODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3511 ></TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3512 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3513 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3514 >External references are resolved using other object files while local
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3515 references are resolved using the local symbol table(s) from this file. This
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3516 allows local symbols that are not exported to have the same names as
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3517 exported symbols or external references.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3518 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3519 CLASS="TABLE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3520 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3521 NAME="AEN1123"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3522 ></A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3523 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3524 ><B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3525 >Table 6-2. Object File Operator Numbers</B
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3526 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3527 ><TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3528 BORDER="1"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3529 FRAME="border"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3530 CLASS="CALSTABLE"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3531 ><COL><COL><THEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3532 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3533 ><TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3534 >Number</TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3535 ><TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3536 >Operator</TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3537 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3538 ></THEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3539 ><TBODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3540 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3541 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3542 >01</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3543 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3544 >addition (+)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3545 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3546 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3547 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3548 >02</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3549 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3550 >subtraction (-)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3551 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3552 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3553 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3554 >03</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3555 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3556 >multiplication (*)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3557 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3558 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3559 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3560 >04</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3561 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3562 >division (/)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3563 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3564 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3565 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3566 >05</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3567 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3568 >modulus (%)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3569 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3570 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3571 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3572 >06</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3573 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3574 >integer division (\) (same as division)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3575 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3576 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3577 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3578 >07</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3579 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3580 >bitwise and</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3581 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3582 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3583 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3584 >08</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3585 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3586 >bitwise or</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3587 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3588 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3589 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3590 >09</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3591 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3592 >bitwise xor</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3593 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3594 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3595 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3596 >0A</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3597 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3598 >boolean and</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3599 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3600 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3601 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3602 >0B</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3603 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3604 >boolean or</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3605 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3606 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3607 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3608 >0C</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3609 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3610 >unary negation, 2's complement (-)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3611 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3612 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3613 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3614 >0D</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3615 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3616 >unary 1's complement (^)</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3617 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3618 ></TBODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3619 ></TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3620 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3621 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3622 >An expression is represented in a postfix manner with both operands for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3623 binary operators preceding the operator and the single operand for unary
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3624 operators preceding the operator.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3625 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3626 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3627 ></BODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3628 ></HTML
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3629 >