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